Lines Matching refs:shost
1083 struct Scsi_Host *shost; in port_detect() local
1262 sh[j] = shost = scsi_register(tpnt, sizeof(struct hostdata)); in port_detect()
1263 if (shost == NULL) { in port_detect()
1268 shost->io_port = port_base; in port_detect()
1269 shost->unique_id = port_base; in port_detect()
1270 shost->n_io_port = REGION_SIZE; in port_detect()
1271 shost->dma_channel = dma_channel; in port_detect()
1272 shost->irq = irq; in port_detect()
1273 shost->sg_tablesize = (ushort) info.scatt_size; in port_detect()
1274 shost->this_id = (ushort) info.host_addr[3]; in port_detect()
1275 shost->can_queue = (ushort) info.queue_size; in port_detect()
1276 shost->cmd_per_lun = MAX_CMD_PER_LUN; in port_detect()
1278 ha = (struct hostdata *)shost->hostdata; in port_detect()
1288 shost->unchecked_isa_dma = 0; in port_detect()
1291 shost->unchecked_isa_dma = 1; in port_detect()
1305 if (shost->sg_tablesize > MAX_SGLIST || shost->sg_tablesize < 2) { in port_detect()
1307 ha->board_name, shost->sg_tablesize); in port_detect()
1308 shost->sg_tablesize = MAX_SGLIST; in port_detect()
1312 if (shost->can_queue > MAX_MAILBOXES || shost->can_queue < 2) { in port_detect()
1314 ha->board_name, shost->can_queue); in port_detect()
1315 shost->can_queue = MAX_MAILBOXES; in port_detect()
1320 shost->max_channel = info.max_chan; in port_detect()
1323 shost->max_id = info.max_id + 1; in port_detect()
1325 if (info.large_sg && shost->sg_tablesize == MAX_SGLIST) in port_detect()
1326 shost->sg_tablesize = MAX_LARGE_SGLIST; in port_detect()
1331 shost->max_lun = info.max_lun + 1; in port_detect()
1339 for (i = 0; i < shost->can_queue; i++) in port_detect()
1345 for (i = 0; i < shost->can_queue; i++) { in port_detect()
1346 size_t sz = shost->sg_tablesize *sizeof(struct sg_list); in port_detect()
1347 gfp_t gfp_mask = (shost->unchecked_isa_dma ? GFP_DMA : 0) | GFP_ATOMIC; in port_detect()
1386 (unsigned long)shost->io_port, shost->irq, dma_name, in port_detect()
1387 shost->sg_tablesize, shost->can_queue); in port_detect()
1389 if (shost->max_id > 8 || shost->max_lun > 8) in port_detect()
1392 ha->board_name, shost->max_id, shost->max_lun); in port_detect()
1394 for (i = 0; i <= shost->max_channel; i++) in port_detect()
1436 eata2x_release(shost); in port_detect()
1751 struct Scsi_Host *shost = SCpnt->device->host; in eata2x_queuecommand_lck() local
1752 struct hostdata *ha = (struct hostdata *)shost->hostdata; in eata2x_queuecommand_lck()
1764 for (k = 0; k < shost->can_queue; k++, i++) { in eata2x_queuecommand_lck()
1765 if (i >= shost->can_queue) in eata2x_queuecommand_lck()
1773 if (k == shost->can_queue) { in eata2x_queuecommand_lck()
1821 if (do_dma(shost->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) { in eata2x_queuecommand_lck()
1836 struct Scsi_Host *shost = SCarg->device->host; in DEF_SCSI_QCMD() local
1837 struct hostdata *ha = (struct hostdata *)shost->hostdata; in DEF_SCSI_QCMD()
1848 if (i >= shost->can_queue) in DEF_SCSI_QCMD()
1851 if (wait_on_busy(shost->io_port, MAXLOOP)) { in DEF_SCSI_QCMD()
1868 if (inb(shost->io_port + REG_AUX_STATUS) & IRQ_ASSERTED) in DEF_SCSI_QCMD()
1904 struct Scsi_Host *shost = SCarg->device->host; in eata2x_eh_host_reset() local
1905 struct hostdata *ha = (struct hostdata *)shost->hostdata; in eata2x_eh_host_reset()
1909 spin_lock_irq(shost->host_lock); in eata2x_eh_host_reset()
1916 spin_unlock_irq(shost->host_lock); in eata2x_eh_host_reset()
1920 if (wait_on_busy(shost->io_port, MAXLOOP)) { in eata2x_eh_host_reset()
1922 spin_unlock_irq(shost->host_lock); in eata2x_eh_host_reset()
1928 for (c = 0; c <= shost->max_channel; c++) in eata2x_eh_host_reset()
1929 for (k = 0; k < shost->max_id; k++) { in eata2x_eh_host_reset()
1934 for (i = 0; i < shost->can_queue; i++) { in eata2x_eh_host_reset()
1975 if (do_dma(shost->io_port, 0, RESET_PIO)) { in eata2x_eh_host_reset()
1977 spin_unlock_irq(shost->host_lock); in eata2x_eh_host_reset()
1989 spin_unlock_irq(shost->host_lock); in eata2x_eh_host_reset()
1996 spin_lock_irq(shost->host_lock); in eata2x_eh_host_reset()
2000 for (i = 0; i < shost->can_queue; i++) { in eata2x_eh_host_reset()
2045 spin_unlock_irq(shost->host_lock); in eata2x_eh_host_reset()
2284 static irqreturn_t ihdlr(struct Scsi_Host *shost) in ihdlr() argument
2290 struct hostdata *ha = (struct hostdata *)shost->hostdata; in ihdlr()
2291 int irq = shost->irq; in ihdlr()
2294 if (!(inb(shost->io_port + REG_AUX_STATUS) & IRQ_ASSERTED)) in ihdlr()
2304 if (wait_on_busy(shost->io_port, 20 * MAXLOOP)) { in ihdlr()
2305 reg = inb(shost->io_port + REG_STATUS); in ihdlr()
2321 reg = inb(shost->io_port + REG_STATUS); in ihdlr()
2342 if (spp->cpp_index < 0 || spp->cpp_index >= shost->can_queue) in ihdlr()
2347 || spp->cpp_index >= shost->can_queue) in ihdlr()
2466 for (c = 0; c <= shost->max_channel; c++) in ihdlr()
2467 for (k = 0; k < shost->max_id; k++) in ihdlr()
2532 struct Scsi_Host *shost; in do_interrupt_handler() local
2540 shost = sh[j]; in do_interrupt_handler()
2542 spin_lock_irqsave(shost->host_lock, spin_flags); in do_interrupt_handler()
2543 ret = ihdlr(shost); in do_interrupt_handler()
2544 spin_unlock_irqrestore(shost->host_lock, spin_flags); in do_interrupt_handler()
2548 static int eata2x_release(struct Scsi_Host *shost) in eata2x_release() argument
2550 struct hostdata *ha = (struct hostdata *)shost->hostdata; in eata2x_release()
2553 for (i = 0; i < shost->can_queue; i++) in eata2x_release()
2556 for (i = 0; i < shost->can_queue; i++) in eata2x_release()
2564 free_irq(shost->irq, &sha[ha->board_number]); in eata2x_release()
2566 if (shost->dma_channel != NO_DMA) in eata2x_release()
2567 free_dma(shost->dma_channel); in eata2x_release()
2569 release_region(shost->io_port, shost->n_io_port); in eata2x_release()
2570 scsi_unregister(shost); in eata2x_release()