Commit fd9cd67c3d89f9ee350ea6fda802375bf1d66b0b
Committed by
Christoph Hellwig
1 parent
710ddd0d50
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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>
Showing 1 changed file with 8 additions and 17 deletions Side-by-side Diff
drivers/scsi/dmx3191d.c
... | ... | @@ -34,6 +34,8 @@ |
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 | |
40 | 42 | |
41 | 43 | |
42 | 44 | |
43 | 45 | |
... | ... | @@ -89,32 +91,23 @@ |
89 | 91 | if (!shost) |
90 | 92 | goto out_release_region; |
91 | 93 | shost->io_port = io; |
92 | - shost->irq = pdev->irq; | |
93 | 94 | |
95 | + /* This card does not seem to raise an interrupt on pdev->irq. | |
96 | + * Steam-powered SCSI controllers run without an IRQ anyway. | |
97 | + */ | |
98 | + shost->irq = NO_IRQ; | |
99 | + | |
94 | 100 | NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); |
95 | 101 | |
96 | - if (request_irq(pdev->irq, NCR5380_intr, IRQF_SHARED, | |
97 | - DMX3191D_DRIVER_NAME, shost)) { | |
98 | - /* | |
99 | - * Steam powered scsi controllers run without an IRQ anyway | |
100 | - */ | |
101 | - printk(KERN_WARNING "dmx3191: IRQ %d not available - " | |
102 | - "switching to polled mode.\n", pdev->irq); | |
103 | - shost->irq = NO_IRQ; | |
104 | - } | |
105 | - | |
106 | 102 | pci_set_drvdata(pdev, shost); |
107 | 103 | |
108 | 104 | error = scsi_add_host(shost, &pdev->dev); |
109 | 105 | if (error) |
110 | - goto out_free_irq; | |
106 | + goto out_release_region; | |
111 | 107 | |
112 | 108 | scsi_scan_host(shost); |
113 | 109 | return 0; |
114 | 110 | |
115 | - out_free_irq: | |
116 | - if (shost->irq != NO_IRQ) | |
117 | - free_irq(shost->irq, shost); | |
118 | 111 | out_release_region: |
119 | 112 | release_region(io, DMX3191D_REGION_LEN); |
120 | 113 | out_disable_device: |
... | ... | @@ -131,8 +124,6 @@ |
131 | 124 | |
132 | 125 | NCR5380_exit(shost); |
133 | 126 | |
134 | - if (shost->irq != NO_IRQ) | |
135 | - free_irq(shost->irq, shost); | |
136 | 127 | release_region(shost->io_port, DMX3191D_REGION_LEN); |
137 | 128 | pci_disable_device(pdev); |
138 | 129 |