diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-11-12 00:12:03 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 03:11:11 -0500 |
commit | fd9cd67c3d89f9ee350ea6fda802375bf1d66b0b (patch) | |
tree | 54a1ddbb23d4a6b6e31368b53ac1c753c73a9539 | |
parent | 710ddd0d50d22b40e3b644ea35966489ad178978 (diff) |
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>
-rw-r--r-- | drivers/scsi/dmx3191d.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index 159434a5cfdb..3e088125a8be 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c | |||
@@ -34,6 +34,8 @@ | |||
34 | * Definitions for the generic 5380 driver. | 34 | * Definitions for the generic 5380 driver. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #define DONT_USE_INTR | ||
38 | |||
37 | #define NCR5380_read(reg) inb(port + reg) | 39 | #define NCR5380_read(reg) inb(port + reg) |
38 | #define NCR5380_write(reg, value) outb(value, port + reg) | 40 | #define NCR5380_write(reg, value) outb(value, port + reg) |
39 | 41 | ||
@@ -89,32 +91,23 @@ static int dmx3191d_probe_one(struct pci_dev *pdev, | |||
89 | if (!shost) | 91 | if (!shost) |
90 | goto out_release_region; | 92 | goto out_release_region; |
91 | shost->io_port = io; | 93 | shost->io_port = io; |
92 | shost->irq = pdev->irq; | ||
93 | 94 | ||
94 | NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); | 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; | ||
95 | 99 | ||
96 | if (request_irq(pdev->irq, NCR5380_intr, IRQF_SHARED, | 100 | NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); |
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 | 101 | ||
106 | pci_set_drvdata(pdev, shost); | 102 | pci_set_drvdata(pdev, shost); |
107 | 103 | ||
108 | error = scsi_add_host(shost, &pdev->dev); | 104 | error = scsi_add_host(shost, &pdev->dev); |
109 | if (error) | 105 | if (error) |
110 | goto out_free_irq; | 106 | goto out_release_region; |
111 | 107 | ||
112 | scsi_scan_host(shost); | 108 | scsi_scan_host(shost); |
113 | return 0; | 109 | return 0; |
114 | 110 | ||
115 | out_free_irq: | ||
116 | if (shost->irq != NO_IRQ) | ||
117 | free_irq(shost->irq, shost); | ||
118 | out_release_region: | 111 | out_release_region: |
119 | release_region(io, DMX3191D_REGION_LEN); | 112 | release_region(io, DMX3191D_REGION_LEN); |
120 | out_disable_device: | 113 | out_disable_device: |
@@ -131,8 +124,6 @@ static void dmx3191d_remove_one(struct pci_dev *pdev) | |||
131 | 124 | ||
132 | NCR5380_exit(shost); | 125 | NCR5380_exit(shost); |
133 | 126 | ||
134 | if (shost->irq != NO_IRQ) | ||
135 | free_irq(shost->irq, shost); | ||
136 | release_region(shost->io_port, DMX3191D_REGION_LEN); | 127 | release_region(shost->io_port, DMX3191D_REGION_LEN); |
137 | pci_disable_device(pdev); | 128 | pci_disable_device(pdev); |
138 | 129 | ||