]> pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[SCSI] sym53c8xx: handle pci_iomap() failures
authorTony Battersby <tonyb@cybernetics.com>
Thu, 8 Jan 2009 17:56:58 +0000 (12:56 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 12 Mar 2009 17:58:16 +0000 (12:58 -0500)
commit783fa7311b2c639f39c6163f9fbb05253fb2d702
treebdb1f754113aac781190d104e85de475b04d0c1c
parenta71d035de835caa7d14ef69928e0fde9fc241cc0
[SCSI] sym53c8xx: handle pci_iomap() failures

sym_init_device() doesn't check if pci_iomap() fails.  It also tries
to map device RAM without first checking FE_RAM.

1) Move some initialization from sym_init_device() to the top of
   sym2_probe().
2) Rename sym_init_device() to sym_iomap_device().
3) Call sym_iomap_device() after sym_check_supported() instead of
   before so that device->chip.features will be set.
4) Check FE_RAM in sym_iomap_device() before mapping RAM.
5) If sym_iomap_device() cannot map registers, then abort.
6) If sym_iomap_device() cannot map RAM, then fall back to not using
   RAM and continue.
7) Remove the check for FE_RAM in sym_attach() since dev->ram_base
   is now always set correctly.

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/sym53c8xx_2/sym_glue.c