Lines Matching refs:sh
113 static int eata_pio_release(struct Scsi_Host *sh) in eata_pio_release() argument
115 hostdata *hd = SD(sh); in eata_pio_release()
116 if (sh->irq && reg_IRQ[sh->irq] == 1) in eata_pio_release()
117 free_irq(sh->irq, NULL); in eata_pio_release()
119 reg_IRQ[sh->irq]--; in eata_pio_release()
120 if (SD(sh)->channel == 0) { in eata_pio_release()
121 if (sh->io_port && sh->n_io_port) in eata_pio_release()
122 release_region(sh->io_port, sh->n_io_port); in eata_pio_release()
166 struct Scsi_Host *sh; in eata_pio_int_handler() local
171 for (x = 1, sh = first_HBA; x <= registered_HBAs; x++, sh = SD(sh)->prev) in eata_pio_int_handler()
173 if (sh->irq != irq) in eata_pio_int_handler()
175 if (inb(sh->base + HA_RSTATUS) & HA_SBUSY) in eata_pio_int_handler()
181 hd = SD(sh); in eata_pio_int_handler()
309 struct Scsi_Host *sh; in eata_pio_queue_lck() local
315 sh = cmd->device->host; in eata_pio_queue_lck()
316 base = sh->base; in eata_pio_queue_lck()
324 DBG(DBG_QUEUE, printk(KERN_EMERG "can_queue %d, x %d, y %d\n", sh->can_queue, x, y)); in eata_pio_queue_lck()
399 "slot %d irq %d\n", sh->base, cmd, y, sh->irq)); in eata_pio_queue_lck()
662 struct Scsi_Host *sh; in register_pio_HBA() local
685 sh = scsi_register(&driver_template, size); in register_pio_HBA()
686 if (sh == NULL) in register_pio_HBA()
690 if (!request_irq(gc->IRQ, do_eata_pio_int_handler, 0, "EATA-PIO", sh)) { in register_pio_HBA()
706 hd = SD(sh); in register_pio_HBA()
711 strlcpy(SD(sh)->vendor, &buff[8], sizeof(SD(sh)->vendor)); in register_pio_HBA()
712 strlcpy(SD(sh)->name, &buff[16], sizeof(SD(sh)->name)); in register_pio_HBA()
713 SD(sh)->revision[0] = buff[32]; in register_pio_HBA()
714 SD(sh)->revision[1] = buff[33]; in register_pio_HBA()
715 SD(sh)->revision[2] = buff[34]; in register_pio_HBA()
716 SD(sh)->revision[3] = '.'; in register_pio_HBA()
717 SD(sh)->revision[4] = buff[35]; in register_pio_HBA()
718 SD(sh)->revision[5] = 0; in register_pio_HBA()
722 SD(sh)->EATA_revision = 'a'; in register_pio_HBA()
725 SD(sh)->EATA_revision = 'b'; in register_pio_HBA()
728 SD(sh)->EATA_revision = 'c'; in register_pio_HBA()
731 SD(sh)->EATA_revision = 'z'; in register_pio_HBA()
733 SD(sh)->EATA_revision = '?'; in register_pio_HBA()
752 SD(sh)->cplen = cplen; in register_pio_HBA()
753 SD(sh)->cppadlen = cppadlen; in register_pio_HBA()
754 SD(sh)->hostid = gc->scsi_id[3]; in register_pio_HBA()
755 SD(sh)->devflags = 1 << gc->scsi_id[3]; in register_pio_HBA()
756 SD(sh)->moresupport = gc->MORE_support; in register_pio_HBA()
757 sh->unique_id = base; in register_pio_HBA()
758 sh->base = base; in register_pio_HBA()
759 sh->io_port = base; in register_pio_HBA()
760 sh->n_io_port = 9; in register_pio_HBA()
761 sh->irq = gc->IRQ; in register_pio_HBA()
762 sh->dma_channel = PIO; in register_pio_HBA()
763 sh->this_id = gc->scsi_id[3]; in register_pio_HBA()
764 sh->can_queue = 1; in register_pio_HBA()
765 sh->cmd_per_lun = 1; in register_pio_HBA()
766 sh->sg_tablesize = SG_ALL; in register_pio_HBA()
772 sh->max_id = 8; in register_pio_HBA()
773 sh->max_lun = 8; in register_pio_HBA()
783 SD(hd->prev)->next = sh; in register_pio_HBA()
784 last_HBA = sh; in register_pio_HBA()
786 first_HBA = sh; in register_pio_HBA()