patch-2.4.4 linux/drivers/scsi/wd7000.c
Next file: linux/drivers/sgi/Makefile
Previous file: linux/drivers/scsi/tmscsim.h
Back to the patch index
Back to the overall index
- Lines: 84
- Date:
Wed Apr 11 19:02:37 2001
- Orig file:
v2.4.3/linux/drivers/scsi/wd7000.c
- Orig date:
Fri Feb 9 11:30:23 2001
diff -u --recursive --new-file v2.4.3/linux/drivers/scsi/wd7000.c linux/drivers/scsi/wd7000.c
@@ -863,7 +863,7 @@
*/
if (freescbs < needed) {
busy = 0;
- panic ("wd7000: can't get enough free SCBs.\n");
+ printk (KERN_ERR "wd7000: can't get enough free SCBs.\n");
restore_flags (flags);
return (NULL);
}
@@ -1593,7 +1593,7 @@
printk ("wd7000_detect: check IO 0x%x region...\n", iobase);
#endif
- if (!check_region (iobase, 4)) {
+ if (request_region (iobase, 4, "wd7000")) {
#ifdef WD7000_DEBUG
printk ("wd7000_detect: ASC reset (IO 0x%x) ...", iobase);
@@ -1609,12 +1609,12 @@
#ifdef WD7000_DEBUG
{
printk ("failed!\n");
- continue;
+ goto err_release;
}
- else
+ else
printk ("ok!\n");
#else
- continue;
+ goto err_release;
#endif
if (inb (iobase + ASC_INTR_STAT) == 1) {
@@ -1627,7 +1627,8 @@
*/
sh = scsi_register (tpnt, sizeof (Adapter));
if(sh==NULL)
- continue;
+ goto err_release;
+
host = (Adapter *) sh->hostdata;
#ifdef WD7000_DEBUG
@@ -1650,11 +1651,8 @@
host->iobase, host->irq, host->dma);
#endif
- if (!wd7000_init (host)) { /* Initialization failed */
- scsi_unregister (sh);
-
- continue;
- }
+ if (!wd7000_init (host)) /* Initialization failed */
+ goto err_unregister;
/*
* OK from here - we'll use this adapter/configuration.
@@ -1662,11 +1660,6 @@
wd7000_revision (host); /* important for scatter/gather */
/*
- * Register our ports.
- */
- request_region (host->iobase, 4, "wd7000");
-
- /*
* For boards before rev 6.0, scatter/gather isn't supported.
*/
if (host->rev1 < 6)
@@ -1690,6 +1683,13 @@
else
printk ("wd7000_detect: IO 0x%x region already allocated!\n", iobase);
#endif
+
+ continue;
+
+ err_unregister:
+ scsi_unregister (sh);
+ err_release:
+ release_region(iobase, 4);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)