patch-2.4.0-test11 linux/drivers/scsi/sgiwd93.c
Next file: linux/drivers/scsi/sr_ioctl.c
Previous file: linux/drivers/scsi/seagate.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Sat Nov 11 19:01:11 2000
- Orig file:
v2.4.0-test10/linux/drivers/scsi/sgiwd93.c
- Orig date:
Sun Oct 8 10:50:25 2000
diff -u --recursive --new-file v2.4.0-test10/linux/drivers/scsi/sgiwd93.c linux/drivers/scsi/sgiwd93.c
@@ -275,6 +275,8 @@
SGIblows->proc_name = "SGIWD93";
sgiwd93_host = scsi_register(SGIblows, sizeof(struct WD33C93_hostdata));
+ if(sgiwd93_host == NULL)
+ return 0;
sgiwd93_host->base = (unsigned long) hregs;
sgiwd93_host->irq = SGI_WD93_0_IRQ;
@@ -294,22 +296,25 @@
/* set up second controller on the Indigo2 */
if(!sgi_guiness) {
sgiwd93_host1 = scsi_register(SGIblows, sizeof(struct WD33C93_hostdata));
- sgiwd93_host1->base = (unsigned long) hregs1;
- sgiwd93_host1->irq = SGI_WD93_1_IRQ;
-
- buf = (uchar *) get_free_page(GFP_KERNEL);
- init_hpc_chain(buf);
- dma_cache_wback_inv((unsigned long) buf, PAGE_SIZE);
- /* HPC_SCSI_REG1 | 0x03 | KSEG1 */
- wd33c93_init(sgiwd93_host1, (wd33c93_regs *) 0xbfbc8003,
- dma_setup, dma_stop, WD33C93_FS_16_20);
-
- hdata1 = (struct WD33C93_hostdata *)sgiwd93_host1->hostdata;
- hdata1->no_sync = 0;
- hdata1->dma_bounce_buffer = (uchar *) (KSEG1ADDR(buf));
- dma_cache_wback_inv((unsigned long) buf, PAGE_SIZE);
-
- request_irq(SGI_WD93_1_IRQ, sgiwd93_intr, 0, "SGI WD93", (void *) sgiwd93_host1);
+ if(sgiwd93_host1 != NULL)
+ {
+ sgiwd93_host1->base = (unsigned long) hregs1;
+ sgiwd93_host1->irq = SGI_WD93_1_IRQ;
+
+ buf = (uchar *) get_free_page(GFP_KERNEL);
+ init_hpc_chain(buf);
+ dma_cache_wback_inv((unsigned long) buf, PAGE_SIZE);
+ /* HPC_SCSI_REG1 | 0x03 | KSEG1 */
+ wd33c93_init(sgiwd93_host1, (wd33c93_regs *) 0xbfbc8003,
+ dma_setup, dma_stop, WD33C93_FS_16_20);
+
+ hdata1 = (struct WD33C93_hostdata *)sgiwd93_host1->hostdata;
+ hdata1->no_sync = 0;
+ hdata1->dma_bounce_buffer = (uchar *) (KSEG1ADDR(buf));
+ dma_cache_wback_inv((unsigned long) buf, PAGE_SIZE);
+
+ request_irq(SGI_WD93_1_IRQ, sgiwd93_intr, 0, "SGI WD93", (void *) sgiwd93_host1);
+ }
}
called = 1;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)