Lines Matching refs:ccb
64 struct ccb *ccb; member
288 struct ccb *ccb = aha1542->ccb; in aha1542_interrupt() local
349 mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb); in aha1542_interrupt()
355 if (ccb[mbo].tarstat | ccb[mbo].hastat) in aha1542_interrupt()
357 ccb[mbo].tarstat + ((int) ccb[mbo].hastat << 16), mb[mbi].status); in aha1542_interrupt()
372 shost_printk(KERN_WARNING, sh, "tarstat=%x, hastat=%x idlun=%x ccb#=%d\n", ccb[mbo].tarstat, in aha1542_interrupt()
373 ccb[mbo].hastat, ccb[mbo].idlun, mbo); in aha1542_interrupt()
382 if (ccb[mbo].tarstat == 2) in aha1542_interrupt()
383 memcpy(tmp_cmd->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], in aha1542_interrupt()
392 errstatus = makecode(ccb[mbo].hastat, ccb[mbo].tarstat); in aha1542_interrupt()
399 ccb[mbo].hastat, ccb[mbo].tarstat); in aha1542_interrupt()
400 if (ccb[mbo].tarstat == 2) in aha1542_interrupt()
401 print_hex_dump_bytes("sense: ", DUMP_PREFIX_NONE, &ccb[mbo].cdb[ccb[mbo].cdblen], 12); in aha1542_interrupt()
425 struct ccb *ccb = aha1542->ccb; in aha1542_queuecommand() local
490 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb)); in aha1542_queuecommand()
492 memset(&ccb[mbo], 0, sizeof(struct ccb)); in aha1542_queuecommand()
494 ccb[mbo].cdblen = cmd->cmd_len; in aha1542_queuecommand()
502 memcpy(ccb[mbo].cdb, cmd->cmnd, ccb[mbo].cdblen); in aha1542_queuecommand()
503 ccb[mbo].op = 0; /* SCSI Initiator Command */ in aha1542_queuecommand()
504 any2scsi(ccb[mbo].datalen, bufflen); in aha1542_queuecommand()
506 any2scsi(ccb[mbo].dataptr, acmd->data_buffer_handle); in aha1542_queuecommand()
508 any2scsi(ccb[mbo].dataptr, 0); in aha1542_queuecommand()
509 ccb[mbo].idlun = (target & 7) << 5 | direction | (lun & 7); /*SCSI Target Id */ in aha1542_queuecommand()
510 ccb[mbo].rsalen = 16; in aha1542_queuecommand()
511 ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0; in aha1542_queuecommand()
512 ccb[mbo].commlinkid = 0; in aha1542_queuecommand()
515 print_hex_dump_bytes("sending: ", DUMP_PREFIX_NONE, &ccb[mbo], sizeof(ccb[mbo]) - 10); in aha1542_queuecommand()
535 aha1542->ccb_handle + i * sizeof(struct ccb)); in setup_mailboxes()
789 aha1542->ccb = dma_alloc_coherent(pdev, in aha1542_hw_init()
790 AHA1542_MAILBOXES * sizeof(struct ccb), in aha1542_hw_init()
792 if (!aha1542->ccb) in aha1542_hw_init()
825 dma_free_coherent(pdev, AHA1542_MAILBOXES * sizeof(struct ccb), in aha1542_hw_init()
826 aha1542->ccb, aha1542->ccb_handle); in aha1542_hw_init()
846 dma_free_coherent(dev, AHA1542_MAILBOXES * sizeof(struct ccb), in aha1542_release()
847 aha1542->ccb, aha1542->ccb_handle); in aha1542_release()
872 struct ccb *ccb = aha1542->ccb; in aha1542_dev_reset() local
898 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb)); in aha1542_dev_reset()
900 memset(&ccb[mbo], 0, sizeof(struct ccb)); in aha1542_dev_reset()
902 ccb[mbo].op = 0x81; /* BUS DEVICE RESET */ in aha1542_dev_reset()
904 ccb[mbo].idlun = (target & 7) << 5 | (lun & 7); /*SCSI Target Id */ in aha1542_dev_reset()
906 ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0; in aha1542_dev_reset()
907 ccb[mbo].commlinkid = 0; in aha1542_dev_reset()