Lines Matching defs:aha1542
26 #include "aha1542.h"
201 printk(KERN_ERR "aha1542: makecode: unknown hoststatus %x\n", hosterr);
281 struct aha1542_hostdata *aha1542 = shost_priv(sh);
287 struct mailbox *mb = aha1542->mb;
288 struct ccb *ccb = aha1542->ccb;
329 mbi = aha1542->aha1542_last_mbi_used + 1;
339 } while (mbi != aha1542->aha1542_last_mbi_used);
349 mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb);
352 aha1542->aha1542_last_mbi_used = mbi;
367 tmp_cmd = aha1542->int_cmds[mbo];
398 shost_printk(KERN_DEBUG, sh, "(aha1542 error:%x %x %x) ", errstatus,
406 aha1542->int_cmds[mbo] = NULL; /* This effectively frees up the mailbox slot, as
417 struct aha1542_hostdata *aha1542 = shost_priv(sh);
424 struct mailbox *mb = aha1542->mb;
425 struct ccb *ccb = aha1542->ccb;
464 mbo = aha1542->aha1542_last_mbo_used + 1;
469 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL)
474 } while (mbo != aha1542->aha1542_last_mbo_used);
476 if (mb[mbo].status || aha1542->int_cmds[mbo])
477 panic("Unable to find empty mailbox for aha1542.\n");
479 aha1542->int_cmds[mbo] = cmd; /* This will effectively prevent someone else from
483 aha1542->aha1542_last_mbo_used = mbo;
490 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb));
528 struct aha1542_hostdata *aha1542 = shost_priv(sh);
533 aha1542->mb[i].status = 0;
534 any2scsi(aha1542->mb[i].ccbptr,
535 aha1542->ccb_handle + i * sizeof(struct ccb));
536 aha1542->mb[AHA1542_MAILBOXES + i].status = 0;
539 any2scsi(mb_cmd + 2, aha1542->mb_handle);
651 struct aha1542_hostdata *aha1542 = shost_priv(sh);
664 aha1542->bios_translation = BIOS_TRANSLATION_6432; /* Default case */
683 aha1542->bios_translation = aha1542_mbenable(sh);
745 struct aha1542_hostdata *aha1542;
751 if (!request_region(base_io, AHA1542_REGION_SIZE, "aha1542"))
757 aha1542 = shost_priv(sh);
762 aha1542->aha1542_last_mbi_used = 2 * AHA1542_MAILBOXES - 1;
763 aha1542->aha1542_last_mbo_used = AHA1542_MAILBOXES - 1;
778 if (aha1542->bios_translation == BIOS_TRANSLATION_25563)
784 aha1542->mb = dma_alloc_coherent(pdev,
786 &aha1542->mb_handle, GFP_KERNEL);
787 if (!aha1542->mb)
790 aha1542->ccb = dma_alloc_coherent(pdev,
792 &aha1542->ccb_handle, GFP_KERNEL);
793 if (!aha1542->ccb)
798 if (request_irq(sh->irq, aha1542_interrupt, 0, "aha1542", sh)) {
803 if (request_dma(sh->dma_channel, "aha1542")) {
827 aha1542->ccb, aha1542->ccb_handle);
830 aha1542->mb, aha1542->mb_handle);
841 struct aha1542_hostdata *aha1542 = shost_priv(sh);
848 aha1542->ccb, aha1542->ccb_handle);
850 aha1542->mb, aha1542->mb_handle);
867 struct aha1542_hostdata *aha1542 = shost_priv(sh);
869 struct mailbox *mb = aha1542->mb;
873 struct ccb *ccb = aha1542->ccb;
876 mbo = aha1542->aha1542_last_mbo_used + 1;
881 if (mb[mbo].status == 0 && aha1542->int_cmds[mbo] == NULL)
886 } while (mbo != aha1542->aha1542_last_mbo_used);
888 if (mb[mbo].status || aha1542->int_cmds[mbo])
889 panic("Unable to find empty mailbox for aha1542.\n");
891 aha1542->int_cmds[mbo] = cmd; /* This will effectively
896 aha1542->aha1542_last_mbo_used = mbo;
899 any2scsi(mb[mbo].ccbptr, aha1542->ccb_handle + mbo * sizeof(*ccb));
926 struct aha1542_hostdata *aha1542 = shost_priv(sh);
961 if (aha1542->int_cmds[i] != NULL) {
963 tmp_cmd = aha1542->int_cmds[i];
975 aha1542->int_cmds[i] = NULL;
976 aha1542->mb[i].status = 0;
997 struct aha1542_hostdata *aha1542 = shost_priv(sdev->host);
1000 aha1542->bios_translation == BIOS_TRANSLATION_25563) {
1037 .proc_name = "aha1542",
1075 .name = "aha1542"
1124 .name = "aha1542",