Lines Matching refs:aha1542
281 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_interrupt() local
287 struct mailbox *mb = aha1542->mb; in aha1542_interrupt()
288 struct ccb *ccb = aha1542->ccb; in aha1542_interrupt()
329 mbi = aha1542->aha1542_last_mbi_used + 1; in aha1542_interrupt()
339 } while (mbi != aha1542->aha1542_last_mbi_used); in aha1542_interrupt()
349 mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb); in aha1542_interrupt()
352 aha1542->aha1542_last_mbi_used = mbi; in aha1542_interrupt()
367 tmp_cmd = aha1542->int_cmds[mbo]; in aha1542_interrupt()
406 aha1542->int_cmds[mbo] = NULL; /* This effectively frees up the mailbox slot, as in aha1542_interrupt()
417 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_queuecommand() local
424 struct mailbox *mb = aha1542->mb; in aha1542_queuecommand()
425 struct ccb *ccb = aha1542->ccb; in aha1542_queuecommand()
464 mbo = aha1542->aha1542_last_mbo_used + 1; in aha1542_queuecommand()
469 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL) in aha1542_queuecommand()
474 } while (mbo != aha1542->aha1542_last_mbo_used); in aha1542_queuecommand()
476 if (mb[mbo].status || aha1542->int_cmds[mbo]) in aha1542_queuecommand()
479 aha1542->int_cmds[mbo] = cmd; /* This will effectively prevent someone else from in aha1542_queuecommand()
483 aha1542->aha1542_last_mbo_used = mbo; in aha1542_queuecommand()
490 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb)); in aha1542_queuecommand()
528 struct aha1542_hostdata *aha1542 = shost_priv(sh); in setup_mailboxes() local
533 aha1542->mb[i].status = 0; in setup_mailboxes()
534 any2scsi(aha1542->mb[i].ccbptr, in setup_mailboxes()
535 aha1542->ccb_handle + i * sizeof(struct ccb)); in setup_mailboxes()
536 aha1542->mb[AHA1542_MAILBOXES + i].status = 0; in setup_mailboxes()
539 any2scsi(mb_cmd + 2, aha1542->mb_handle); in setup_mailboxes()
651 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_query() local
664 aha1542->bios_translation = BIOS_TRANSLATION_6432; /* Default case */ in aha1542_query()
683 aha1542->bios_translation = aha1542_mbenable(sh); in aha1542_query()
745 struct aha1542_hostdata *aha1542; in aha1542_hw_init() local
757 aha1542 = shost_priv(sh); in aha1542_hw_init()
762 aha1542->aha1542_last_mbi_used = 2 * AHA1542_MAILBOXES - 1; in aha1542_hw_init()
763 aha1542->aha1542_last_mbo_used = AHA1542_MAILBOXES - 1; in aha1542_hw_init()
778 if (aha1542->bios_translation == BIOS_TRANSLATION_25563) in aha1542_hw_init()
784 aha1542->mb = dma_alloc_coherent(pdev, in aha1542_hw_init()
786 &aha1542->mb_handle, GFP_KERNEL); in aha1542_hw_init()
787 if (!aha1542->mb) in aha1542_hw_init()
790 aha1542->ccb = dma_alloc_coherent(pdev, in aha1542_hw_init()
792 &aha1542->ccb_handle, GFP_KERNEL); in aha1542_hw_init()
793 if (!aha1542->ccb) in aha1542_hw_init()
827 aha1542->ccb, aha1542->ccb_handle); in aha1542_hw_init()
830 aha1542->mb, aha1542->mb_handle); in aha1542_hw_init()
841 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_release() local
848 aha1542->ccb, aha1542->ccb_handle); in aha1542_release()
850 aha1542->mb, aha1542->mb_handle); in aha1542_release()
867 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_dev_reset() local
869 struct mailbox *mb = aha1542->mb; in aha1542_dev_reset()
873 struct ccb *ccb = aha1542->ccb; in aha1542_dev_reset()
876 mbo = aha1542->aha1542_last_mbo_used + 1; in aha1542_dev_reset()
881 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL) in aha1542_dev_reset()
886 } while (mbo != aha1542->aha1542_last_mbo_used); in aha1542_dev_reset()
888 if (mb[mbo].status || aha1542->int_cmds[mbo]) in aha1542_dev_reset()
891 aha1542->int_cmds[mbo] = cmd; /* This will effectively in aha1542_dev_reset()
896 aha1542->aha1542_last_mbo_used = mbo; in aha1542_dev_reset()
899 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb)); in aha1542_dev_reset()
926 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_reset() local
961 if (aha1542->int_cmds[i] != NULL) { in aha1542_reset()
963 tmp_cmd = aha1542->int_cmds[i]; in aha1542_reset()
975 aha1542->int_cmds[i] = NULL; in aha1542_reset()
976 aha1542->mb[i].status = 0; in aha1542_reset()
997 struct aha1542_hostdata *aha1542 = shost_priv(sdev->host); in aha1542_biosparam() local
1000 aha1542->bios_translation == BIOS_TRANSLATION_25563) { in aha1542_biosparam()