patch-2.0.21-2.1.0 linux/drivers/scsi/AM53C974.c
Next file: linux/drivers/scsi/AM53C974.h
Previous file: linux/drivers/scsi/53c7,8xx.c
Back to the patch index
Back to the overall index
- Lines: 80
- Date:
Sat Sep 28 11:22:47 1996
- Orig file:
lx2.0/v2.0.21/linux/drivers/scsi/AM53C974.c
- Orig date:
Fri Apr 12 09:49:40 1996
diff -u --recursive --new-file lx2.0/v2.0.21/linux/drivers/scsi/AM53C974.c linux/drivers/scsi/AM53C974.c
@@ -156,6 +156,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;
@@ -564,6 +569,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);
@@ -596,7 +603,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));
@@ -659,7 +666,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",
@@ -677,8 +684,7 @@
AM53C974_write_8(CMDREG, CMDREG_RBUS); /* reset SCSI bus */
udelay(10);
AM53C974_config_after_reset(instance);
-
-return(0);
+return(1);
}
/*********************************************************************
@@ -1797,7 +1803,11 @@
AM53C974_write_8(CMDREG, CMDREG_CFIFO); /* clear FIFO */
}
+#ifdef AM53C974_PROHIBIT_DISCONNECT
+tmp[0] = IDENTIFY(0, cmd->lun);
+#else
tmp[0] = IDENTIFY(1, cmd->lun);
+#endif
#ifdef SCSI2
if (cmd->device->tagged_queue && (tag != TAG_NONE)) {
@@ -2005,7 +2015,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);
}
@@ -2241,3 +2251,9 @@
cmd->scsi_done(cmd);
return SCSI_ABORT_SUCCESS;
}
+
+#ifdef MODULE
+static Scsi_Host_Template driver_template = AM53C974;
+
+#include "scsi_module.c"
+#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov