Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmx3191d: Use NO_IRQ

Testing shows that the Domex 3191D card never asserts its IRQ. Hence it is
non-functional with Linux (worse, the EH bugs in the core driver are fatal
but that's a problem for another patch). Perhaps the DT-536 chip needs
special setup? I can't find documentation for it. The NetBSD driver uses
polling apparently because of this issue.

Set host->irq = NO_IRQ so the core driver will prevent targets from
disconnecting. Don't request host->irq.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>

authored by

Finn Thain and committed by
Christoph Hellwig
fd9cd67c 710ddd0d

+8 -17
+8 -17
drivers/scsi/dmx3191d.c
··· 34 34 * Definitions for the generic 5380 driver. 35 35 */ 36 36 37 + #define DONT_USE_INTR 38 + 37 39 #define NCR5380_read(reg) inb(port + reg) 38 40 #define NCR5380_write(reg, value) outb(value, port + reg) 39 41 ··· 91 89 if (!shost) 92 90 goto out_release_region; 93 91 shost->io_port = io; 94 - shost->irq = pdev->irq; 92 + 93 + /* This card does not seem to raise an interrupt on pdev->irq. 94 + * Steam-powered SCSI controllers run without an IRQ anyway. 95 + */ 96 + shost->irq = NO_IRQ; 95 97 96 98 NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); 97 - 98 - if (request_irq(pdev->irq, NCR5380_intr, IRQF_SHARED, 99 - DMX3191D_DRIVER_NAME, shost)) { 100 - /* 101 - * Steam powered scsi controllers run without an IRQ anyway 102 - */ 103 - printk(KERN_WARNING "dmx3191: IRQ %d not available - " 104 - "switching to polled mode.\n", pdev->irq); 105 - shost->irq = NO_IRQ; 106 - } 107 99 108 100 pci_set_drvdata(pdev, shost); 109 101 110 102 error = scsi_add_host(shost, &pdev->dev); 111 103 if (error) 112 - goto out_free_irq; 104 + goto out_release_region; 113 105 114 106 scsi_scan_host(shost); 115 107 return 0; 116 108 117 - out_free_irq: 118 - if (shost->irq != NO_IRQ) 119 - free_irq(shost->irq, shost); 120 109 out_release_region: 121 110 release_region(io, DMX3191D_REGION_LEN); 122 111 out_disable_device: ··· 124 131 125 132 NCR5380_exit(shost); 126 133 127 - if (shost->irq != NO_IRQ) 128 - free_irq(shost->irq, shost); 129 134 release_region(shost->io_port, DMX3191D_REGION_LEN); 130 135 pci_disable_device(pdev); 131 136