Lines Matching refs:ccb
64 struct ccb *ccb; member
270 struct ccb *ccb = aha1542->ccb; in aha1542_interrupt() local
329 mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb); in aha1542_interrupt()
335 if (ccb[mbo].tarstat | ccb[mbo].hastat) in aha1542_interrupt()
337 ccb[mbo].tarstat + ((int) ccb[mbo].hastat << 16), mb[mbi].status); in aha1542_interrupt()
352 shost_printk(KERN_WARNING, sh, "tarstat=%x, hastat=%x idlun=%x ccb#=%d\n", ccb[mbo].tarstat, in aha1542_interrupt()
353 ccb[mbo].hastat, ccb[mbo].idlun, mbo); in aha1542_interrupt()
361 if (ccb[mbo].tarstat == 2) in aha1542_interrupt()
362 memcpy(tmp_cmd->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], in aha1542_interrupt()
371 errstatus = makecode(ccb[mbo].hastat, ccb[mbo].tarstat); in aha1542_interrupt()
378 ccb[mbo].hastat, ccb[mbo].tarstat); in aha1542_interrupt()
379 if (ccb[mbo].tarstat == 2) in aha1542_interrupt()
380 print_hex_dump_bytes("sense: ", DUMP_PREFIX_NONE, &ccb[mbo].cdb[ccb[mbo].cdblen], 12); in aha1542_interrupt()
403 struct ccb *ccb = aha1542->ccb; in aha1542_queuecommand() local
465 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb)); in aha1542_queuecommand()
467 memset(&ccb[mbo], 0, sizeof(struct ccb)); in aha1542_queuecommand()
469 ccb[mbo].cdblen = cmd->cmd_len; in aha1542_queuecommand()
477 memcpy(ccb[mbo].cdb, cmd->cmnd, ccb[mbo].cdblen); in aha1542_queuecommand()
483 ccb[mbo].op = 2; /* SCSI Initiator Command w/scatter-gather */ in aha1542_queuecommand()
488 any2scsi(ccb[mbo].datalen, sg_count * sizeof(struct chain)); in aha1542_queuecommand()
489 any2scsi(ccb[mbo].dataptr, acmd->chain_handle); in aha1542_queuecommand()
495 ccb[mbo].op = 0; /* SCSI Initiator Command */ in aha1542_queuecommand()
496 any2scsi(ccb[mbo].datalen, 0); in aha1542_queuecommand()
497 any2scsi(ccb[mbo].dataptr, 0); in aha1542_queuecommand()
499 ccb[mbo].idlun = (target & 7) << 5 | direction | (lun & 7); /*SCSI Target Id */ in aha1542_queuecommand()
500 ccb[mbo].rsalen = 16; in aha1542_queuecommand()
501 ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0; in aha1542_queuecommand()
502 ccb[mbo].commlinkid = 0; in aha1542_queuecommand()
505 print_hex_dump_bytes("sending: ", DUMP_PREFIX_NONE, &ccb[mbo], sizeof(ccb[mbo]) - 10); in aha1542_queuecommand()
531 aha1542->ccb_handle + i * sizeof(struct ccb)); in setup_mailboxes()
778 aha1542->ccb = dma_alloc_coherent(pdev, in aha1542_hw_init()
779 AHA1542_MAILBOXES * sizeof(struct ccb), in aha1542_hw_init()
781 if (!aha1542->ccb) in aha1542_hw_init()
814 dma_free_coherent(pdev, AHA1542_MAILBOXES * sizeof(struct ccb), in aha1542_hw_init()
815 aha1542->ccb, aha1542->ccb_handle); in aha1542_hw_init()
835 dma_free_coherent(dev, AHA1542_MAILBOXES * sizeof(struct ccb), in aha1542_release()
836 aha1542->ccb, aha1542->ccb_handle); in aha1542_release()
861 struct ccb *ccb = aha1542->ccb; in aha1542_dev_reset() local
886 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb)); in aha1542_dev_reset()
888 memset(&ccb[mbo], 0, sizeof(struct ccb)); in aha1542_dev_reset()
890 ccb[mbo].op = 0x81; /* BUS DEVICE RESET */ in aha1542_dev_reset()
892 ccb[mbo].idlun = (target & 7) << 5 | (lun & 7); /*SCSI Target Id */ in aha1542_dev_reset()
894 ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0; in aha1542_dev_reset()
895 ccb[mbo].commlinkid = 0; in aha1542_dev_reset()