Lines Matching defs:aha1542

26 #include "aha1542.h"
187 printk(KERN_ERR "aha1542: makecode: unknown hoststatus %x\n", hosterr);
262 struct aha1542_hostdata *aha1542 = shost_priv(sh);
269 struct mailbox *mb = aha1542->mb;
270 struct ccb *ccb = aha1542->ccb;
309 mbi = aha1542->aha1542_last_mbi_used + 1;
319 } while (mbi != aha1542->aha1542_last_mbi_used);
329 mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb);
332 aha1542->aha1542_last_mbi_used = mbi;
347 tmp_cmd = aha1542->int_cmds[mbo];
377 shost_printk(KERN_DEBUG, sh, "(aha1542 error:%x %x %x) ", errstatus,
385 aha1542->int_cmds[mbo] = NULL; /* This effectively frees up the mailbox slot, as
395 struct aha1542_hostdata *aha1542 = shost_priv(sh);
402 struct mailbox *mb = aha1542->mb;
403 struct ccb *ccb = aha1542->ccb;
440 mbo = aha1542->aha1542_last_mbo_used + 1;
445 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL)
450 } while (mbo != aha1542->aha1542_last_mbo_used);
452 if (mb[mbo].status || aha1542->int_cmds[mbo])
453 panic("Unable to find empty mailbox for aha1542.\n");
455 aha1542->int_cmds[mbo] = cmd; /* This will effectively prevent someone else from
458 aha1542->aha1542_last_mbo_used = mbo;
465 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb));
524 struct aha1542_hostdata *aha1542 = shost_priv(sh);
529 aha1542->mb[i].status = 0;
530 any2scsi(aha1542->mb[i].ccbptr,
531 aha1542->ccb_handle + i * sizeof(struct ccb));
532 aha1542->mb[AHA1542_MAILBOXES + i].status = 0;
535 any2scsi(mb_cmd + 2, aha1542->mb_handle);
643 struct aha1542_hostdata *aha1542 = shost_priv(sh);
656 aha1542->bios_translation = BIOS_TRANSLATION_6432; /* Default case */
672 aha1542->bios_translation = aha1542_mbenable(sh);
733 struct aha1542_hostdata *aha1542;
739 if (!request_region(base_io, AHA1542_REGION_SIZE, "aha1542"))
745 aha1542 = shost_priv(sh);
750 aha1542->aha1542_last_mbi_used = 2 * AHA1542_MAILBOXES - 1;
751 aha1542->aha1542_last_mbo_used = AHA1542_MAILBOXES - 1;
766 if (aha1542->bios_translation == BIOS_TRANSLATION_25563)
772 aha1542->mb = dma_alloc_coherent(pdev,
774 &aha1542->mb_handle, GFP_KERNEL);
775 if (!aha1542->mb)
778 aha1542->ccb = dma_alloc_coherent(pdev,
780 &aha1542->ccb_handle, GFP_KERNEL);
781 if (!aha1542->ccb)
786 if (request_irq(sh->irq, aha1542_interrupt, 0, "aha1542", sh)) {
791 if (request_dma(sh->dma_channel, "aha1542")) {
815 aha1542->ccb, aha1542->ccb_handle);
818 aha1542->mb, aha1542->mb_handle);
829 struct aha1542_hostdata *aha1542 = shost_priv(sh);
836 aha1542->ccb, aha1542->ccb_handle);
838 aha1542->mb, aha1542->mb_handle);
855 struct aha1542_hostdata *aha1542 = shost_priv(sh);
857 struct mailbox *mb = aha1542->mb;
861 struct ccb *ccb = aha1542->ccb;
864 mbo = aha1542->aha1542_last_mbo_used + 1;
869 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL)
874 } while (mbo != aha1542->aha1542_last_mbo_used);
876 if (mb[mbo].status || aha1542->int_cmds[mbo])
877 panic("Unable to find empty mailbox for aha1542.\n");
879 aha1542->int_cmds[mbo] = cmd; /* This will effectively
883 aha1542->aha1542_last_mbo_used = mbo;
886 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb));
913 struct aha1542_hostdata *aha1542 = shost_priv(sh);
948 if (aha1542->int_cmds[i] != NULL) {
950 tmp_cmd = aha1542->int_cmds[i];
962 aha1542->int_cmds[i] = NULL;
963 aha1542->mb[i].status = 0;
984 struct aha1542_hostdata *aha1542 = shost_priv(sdev->host);
987 aha1542->bios_translation == BIOS_TRANSLATION_25563) {
1003 .proc_name = "aha1542",
1040 .name = "aha1542"
1087 .name = "aha1542",