Lines Matching refs:aha1542

262 	struct aha1542_hostdata *aha1542 = shost_priv(sh);  in aha1542_interrupt()  local
269 struct mailbox *mb = aha1542->mb; in aha1542_interrupt()
270 struct ccb *ccb = aha1542->ccb; in aha1542_interrupt()
309 mbi = aha1542->aha1542_last_mbi_used + 1; in aha1542_interrupt()
319 } while (mbi != aha1542->aha1542_last_mbi_used); in aha1542_interrupt()
329 mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb); in aha1542_interrupt()
332 aha1542->aha1542_last_mbi_used = mbi; in aha1542_interrupt()
347 tmp_cmd = aha1542->int_cmds[mbo]; in aha1542_interrupt()
385 aha1542->int_cmds[mbo] = NULL; /* This effectively frees up the mailbox slot, as in aha1542_interrupt()
395 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_queuecommand() local
402 struct mailbox *mb = aha1542->mb; in aha1542_queuecommand()
403 struct ccb *ccb = aha1542->ccb; in aha1542_queuecommand()
440 mbo = aha1542->aha1542_last_mbo_used + 1; in aha1542_queuecommand()
445 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL) in aha1542_queuecommand()
450 } while (mbo != aha1542->aha1542_last_mbo_used); in aha1542_queuecommand()
452 if (mb[mbo].status || aha1542->int_cmds[mbo]) in aha1542_queuecommand()
455 aha1542->int_cmds[mbo] = cmd; /* This will effectively prevent someone else from in aha1542_queuecommand()
458 aha1542->aha1542_last_mbo_used = mbo; in aha1542_queuecommand()
465 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb)); in aha1542_queuecommand()
524 struct aha1542_hostdata *aha1542 = shost_priv(sh); in setup_mailboxes() local
529 aha1542->mb[i].status = 0; in setup_mailboxes()
530 any2scsi(aha1542->mb[i].ccbptr, in setup_mailboxes()
531 aha1542->ccb_handle + i * sizeof(struct ccb)); in setup_mailboxes()
532 aha1542->mb[AHA1542_MAILBOXES + i].status = 0; in setup_mailboxes()
535 any2scsi(mb_cmd + 2, aha1542->mb_handle); in setup_mailboxes()
643 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_query() local
656 aha1542->bios_translation = BIOS_TRANSLATION_6432; /* Default case */ in aha1542_query()
672 aha1542->bios_translation = aha1542_mbenable(sh); in aha1542_query()
733 struct aha1542_hostdata *aha1542; in aha1542_hw_init() local
745 aha1542 = shost_priv(sh); in aha1542_hw_init()
750 aha1542->aha1542_last_mbi_used = 2 * AHA1542_MAILBOXES - 1; in aha1542_hw_init()
751 aha1542->aha1542_last_mbo_used = AHA1542_MAILBOXES - 1; in aha1542_hw_init()
766 if (aha1542->bios_translation == BIOS_TRANSLATION_25563) in aha1542_hw_init()
772 aha1542->mb = dma_alloc_coherent(pdev, in aha1542_hw_init()
774 &aha1542->mb_handle, GFP_KERNEL); in aha1542_hw_init()
775 if (!aha1542->mb) in aha1542_hw_init()
778 aha1542->ccb = dma_alloc_coherent(pdev, in aha1542_hw_init()
780 &aha1542->ccb_handle, GFP_KERNEL); in aha1542_hw_init()
781 if (!aha1542->ccb) in aha1542_hw_init()
815 aha1542->ccb, aha1542->ccb_handle); in aha1542_hw_init()
818 aha1542->mb, aha1542->mb_handle); in aha1542_hw_init()
829 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_release() local
836 aha1542->ccb, aha1542->ccb_handle); in aha1542_release()
838 aha1542->mb, aha1542->mb_handle); in aha1542_release()
855 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_dev_reset() local
857 struct mailbox *mb = aha1542->mb; in aha1542_dev_reset()
861 struct ccb *ccb = aha1542->ccb; in aha1542_dev_reset()
864 mbo = aha1542->aha1542_last_mbo_used + 1; in aha1542_dev_reset()
869 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL) in aha1542_dev_reset()
874 } while (mbo != aha1542->aha1542_last_mbo_used); in aha1542_dev_reset()
876 if (mb[mbo].status || aha1542->int_cmds[mbo]) in aha1542_dev_reset()
879 aha1542->int_cmds[mbo] = cmd; /* This will effectively in aha1542_dev_reset()
883 aha1542->aha1542_last_mbo_used = mbo; in aha1542_dev_reset()
886 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb)); in aha1542_dev_reset()
913 struct aha1542_hostdata *aha1542 = shost_priv(sh); in aha1542_reset() local
948 if (aha1542->int_cmds[i] != NULL) { in aha1542_reset()
950 tmp_cmd = aha1542->int_cmds[i]; in aha1542_reset()
962 aha1542->int_cmds[i] = NULL; in aha1542_reset()
963 aha1542->mb[i].status = 0; in aha1542_reset()
984 struct aha1542_hostdata *aha1542 = shost_priv(sdev->host); in aha1542_biosparam() local
987 aha1542->bios_translation == BIOS_TRANSLATION_25563) { in aha1542_biosparam()