patch-2.0.29 linux/drivers/scsi/AM53C974.c
Next file: linux/drivers/scsi/scsi_ioctl.c
Previous file: linux/drivers/pci/pci.c
Back to the patch index
Back to the overall index
- Lines: 80
- Date:
Mon Feb 3 14:06:20 1997
- Orig file:
v2.0.28/linux/drivers/scsi/AM53C974.c
- Orig date:
Thu Oct 31 12:08:52 1996
diff -u --recursive --new-file v2.0.28/linux/drivers/scsi/AM53C974.c linux/drivers/scsi/AM53C974.c
@@ -158,6 +158,11 @@
static int commandline_current = 0;
override_t overrides[7] = { {-1, 0, 0, 0}, }; /* LILO overrides */
+struct proc_dir_entry proc_scsi_am53c974 = {
+ PROC_SCSI_AM53C974, 8, "am53c974",
+ S_IFDIR | S_IRUGO | S_IXUGO, 2
+};
+
#ifdef AM53C974_DEBUG
static int deb_stop = 1;
@@ -566,6 +571,8 @@
{
int count; /* number of boards detected */
+tpnt->proc_dir = &proc_scsi_am53c974;
+
#if defined (CONFIG_PCI)
if (pcibios_present())
count = AM53C974_bios_detect(tpnt);
@@ -598,7 +605,7 @@
#ifdef AM53C974_OPTION_DEBUG_PROBE_ONLY
printk ("AM53C974: probe only enabled, aborting initialization\n");
- return -1;
+ return 0;
#endif
instance = scsi_register(tpnt, sizeof(struct AM53C974_hostdata));
@@ -661,7 +668,7 @@
if (request_irq(instance->irq, AM53C974_intr, SA_INTERRUPT, "AM53C974", NULL)) {
printk("scsi%d: IRQ%d not free, detaching\n", instance->host_no, instance->irq);
scsi_unregister(instance);
- return -1; }
+ return 0; }
}
else {
printk("scsi%d: using interrupt handler previously installed for scsi%d\n",
@@ -679,8 +686,7 @@
AM53C974_write_8(CMDREG, CMDREG_RBUS); /* reset SCSI bus */
udelay(10);
AM53C974_config_after_reset(instance);
-
-return(0);
+return(1);
}
/*********************************************************************
@@ -2007,7 +2013,7 @@
AM53C974_write_8(STCMREG, (unsigned char)((length & 0xff00) >> 8));
AM53C974_write_8(STCHREG, (unsigned char)((length & 0xff0000) >> 16));
AM53C974_write_32(DMASTC, length & 0xffffff);
-AM53C974_write_32(DMASPA, (unsigned long)data);
+AM53C974_write_32(DMASPA, virt_to_bus(data));
AM53C974_write_8(CMDREG, CMDREG_IT | CMDREG_DMA);
AM53C974_write_8(DMACMD, (dir << 7) | DMACMD_INTE_D | DMACMD_START);
}
@@ -2243,6 +2249,21 @@
cmd->scsi_done(cmd);
return SCSI_ABORT_SUCCESS;
}
+
+
+/*
+ * AM53C974_release()
+ *
+ * Release resources allocated for a single AM53C974 adapter.
+ */
+int
+AM53C974_release(struct Scsi_Host *shp)
+{
+ free_irq(shp->irq, NULL);
+ scsi_unregister(shp);
+ return 0;
+}
+
#ifdef MODULE
/* Eventually this will go into an include file, but this will be later */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov