diff options
author | Hannes Reinecke <hare@suse.de> | 2006-01-24 04:43:26 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-31 15:39:46 -0500 |
commit | 53467e636b7beb350c307cc88323aae4676577f2 (patch) | |
tree | ca6348fb6d7d0059d72b5b633ad69574329eb133 /drivers/scsi/aic7xxx/aic79xx_osm_pci.c | |
parent | 2628ed2b1aa3fd115bb8e14925e180e9ecd07055 (diff) |
[SCSI] aic79xx: sequencer fixes
This patch updates the aic79xx sequencer with latest fixes from adaptec.
The sequencer code now corresponds with adaptec version 2.0.15.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_osm_pci.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c index bf360ae021ab..ebbf7e4ff4cc 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c | |||
@@ -220,10 +220,10 @@ ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, u_long *base, | |||
220 | *base2 = pci_resource_start(ahd->dev_softc, 3); | 220 | *base2 = pci_resource_start(ahd->dev_softc, 3); |
221 | if (*base == 0 || *base2 == 0) | 221 | if (*base == 0 || *base2 == 0) |
222 | return (ENOMEM); | 222 | return (ENOMEM); |
223 | if (request_region(*base, 256, "aic79xx") == 0) | 223 | if (!request_region(*base, 256, "aic79xx")) |
224 | return (ENOMEM); | 224 | return (ENOMEM); |
225 | if (request_region(*base2, 256, "aic79xx") == 0) { | 225 | if (!request_region(*base2, 256, "aic79xx")) { |
226 | release_region(*base2, 256); | 226 | release_region(*base, 256); |
227 | return (ENOMEM); | 227 | return (ENOMEM); |
228 | } | 228 | } |
229 | return (0); | 229 | return (0); |
@@ -237,7 +237,7 @@ ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, | |||
237 | u_long start; | 237 | u_long start; |
238 | u_long base_page; | 238 | u_long base_page; |
239 | u_long base_offset; | 239 | u_long base_offset; |
240 | int error; | 240 | int error = 0; |
241 | 241 | ||
242 | if (aic79xx_allow_memio == 0) | 242 | if (aic79xx_allow_memio == 0) |
243 | return (ENOMEM); | 243 | return (ENOMEM); |
@@ -245,16 +245,15 @@ ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, | |||
245 | if ((ahd->bugs & AHD_PCIX_MMAPIO_BUG) != 0) | 245 | if ((ahd->bugs & AHD_PCIX_MMAPIO_BUG) != 0) |
246 | return (ENOMEM); | 246 | return (ENOMEM); |
247 | 247 | ||
248 | error = 0; | ||
249 | start = pci_resource_start(ahd->dev_softc, 1); | 248 | start = pci_resource_start(ahd->dev_softc, 1); |
250 | base_page = start & PAGE_MASK; | 249 | base_page = start & PAGE_MASK; |
251 | base_offset = start - base_page; | 250 | base_offset = start - base_page; |
252 | if (start != 0) { | 251 | if (start != 0) { |
253 | *bus_addr = start; | 252 | *bus_addr = start; |
254 | if (request_mem_region(start, 0x1000, "aic79xx") == 0) | 253 | if (!request_mem_region(start, 0x1000, "aic79xx")) |
255 | error = ENOMEM; | 254 | error = ENOMEM; |
256 | if (error == 0) { | 255 | if (!error) { |
257 | *maddr = ioremap_nocache(base_page, base_offset + 256); | 256 | *maddr = ioremap_nocache(base_page, base_offset + 512); |
258 | if (*maddr == NULL) { | 257 | if (*maddr == NULL) { |
259 | error = ENOMEM; | 258 | error = ENOMEM; |
260 | release_mem_region(start, 0x1000); | 259 | release_mem_region(start, 0x1000); |
@@ -344,7 +343,7 @@ ahd_pci_map_int(struct ahd_softc *ahd) | |||
344 | 343 | ||
345 | error = request_irq(ahd->dev_softc->irq, ahd_linux_isr, | 344 | error = request_irq(ahd->dev_softc->irq, ahd_linux_isr, |
346 | SA_SHIRQ, "aic79xx", ahd); | 345 | SA_SHIRQ, "aic79xx", ahd); |
347 | if (error == 0) | 346 | if (!error) |
348 | ahd->platform_data->irq = ahd->dev_softc->irq; | 347 | ahd->platform_data->irq = ahd->dev_softc->irq; |
349 | 348 | ||
350 | return (-error); | 349 | return (-error); |