summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
commitf1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch)
tree562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /drivers/scsi
parent00f11569ac8ca73cbcdef8822de1583e79aee571 (diff)
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/pluto.c5
-rw-r--r--drivers/scsi/scsi_scan.c4
-rw-r--r--drivers/scsi/sg.c26
-rw-r--r--drivers/scsi/st.c10
4 files changed, 24 insertions, 21 deletions
diff --git a/drivers/scsi/pluto.c b/drivers/scsi/pluto.c
index 518f1e26e..b4ebd88f3 100644
--- a/drivers/scsi/pluto.c
+++ b/drivers/scsi/pluto.c
@@ -48,7 +48,6 @@ static struct ctrl_inquiry {
} *fcs __initdata = { 0 };
static int fcscount __initdata = 0;
static atomic_t fcss __initdata = ATOMIC_INIT(0);
-static struct timer_list fc_timer __initdata = { function: NULL };
DECLARE_MUTEX_LOCKED(fc_sem);
static int pluto_encode_addr(Scsi_Cmnd *SCpnt, u16 *addr, fc_channel *fc, fcp_cmnd *fcmd);
@@ -92,6 +91,7 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
int i, retry, nplutos;
fc_channel *fc;
Scsi_Device dev;
+ struct timer_list fc_timer = { function: pluto_detect_timeout };
tpnt->proc_name = "pluto";
fcscount = 0;
@@ -121,7 +121,6 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
memset (fcs, 0, sizeof (struct ctrl_inquiry) * fcscount);
memset (&dev, 0, sizeof(dev));
atomic_set (&fcss, fcscount);
- fc_timer.function = pluto_detect_timeout;
i = 0;
for_each_online_fc_channel(fc) {
@@ -192,7 +191,7 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
if (!atomic_read(&fcss))
break; /* All fc channels have answered us */
}
- del_timer(&fc_timer);
+ del_timer_sync(&fc_timer);
PLND(("Finished search\n"))
for (i = 0, nplutos = 0; i < fcscount; i++) {
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 056b2f1b5..fd705d425 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -138,6 +138,10 @@ static struct dev_info device_list[] =
{"iomega", "jaz 1GB", "J.86", BLIST_NOTQ | BLIST_NOLUN},
{"TOSHIBA","CDROM","*", BLIST_ISROM},
{"MegaRAID", "LD", "*", BLIST_FORCELUN},
+ {"DGC", "RAID", "*", BLIST_SPARSELUN}, // Dell PV 650F (tgt @ LUN 0)
+ {"DGC", "DISK", "*", BLIST_SPARSELUN}, // Dell PV 650F (no tgt @ LUN 0)
+ {"DELL", "PV530F", "*", BLIST_SPARSELUN}, // Dell PV 530F
+ {"SONY", "TSL", "*", BLIST_FORCELUN}, // DDS3 & DDS4 autoloaders
/*
* Must be at end of list...
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 4bfdc59f4..4ac3dbcfb 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -52,6 +52,7 @@
#include <linux/fcntl.h>
#include <linux/init.h>
#include <linux/poll.h>
+#include <linux/smp_lock.h>
#include <asm/io.h>
#include <asm/uaccess.h>
@@ -304,8 +305,6 @@ static int sg_open(struct inode * inode, struct file * filp)
if (sdp->device->host->hostt->module)
__MOD_INC_USE_COUNT(sdp->device->host->hostt->module);
- if (sg_template.module)
- __MOD_INC_USE_COUNT(sg_template.module);
return 0;
}
@@ -315,8 +314,11 @@ static int sg_release(struct inode * inode, struct file * filp)
Sg_device * sdp;
Sg_fd * sfp;
- if ((! (sfp = (Sg_fd *)filp->private_data)) || (! (sdp = sfp->parentdp)))
+ lock_kernel();
+ if ((! (sfp = (Sg_fd *)filp->private_data)) || (! (sdp = sfp->parentdp))) {
+ unlock_kernel();
return -ENXIO;
+ }
SCSI_LOG_TIMEOUT(3, printk("sg_release: dev=%d\n", MINOR(sdp->i_rdev)));
sg_fasync(-1, filp, 0); /* remove filp from async notification list */
sg_remove_sfp(sdp, sfp);
@@ -325,10 +327,9 @@ static int sg_release(struct inode * inode, struct file * filp)
if (sdp->device->host->hostt->module)
__MOD_DEC_USE_COUNT(sdp->device->host->hostt->module);
- if(sg_template.module)
- __MOD_DEC_USE_COUNT(sg_template.module);
sdp->exclude = 0;
wake_up_interruptible(&sdp->o_excl_wait);
+ unlock_kernel();
return 0;
}
@@ -1094,13 +1095,14 @@ static void sg_cmd_done_bh(Scsi_Cmnd * SCpnt)
}
static struct file_operations sg_fops = {
- read: sg_read,
- write: sg_write,
- poll: sg_poll,
- ioctl: sg_ioctl,
- open: sg_open,
- release: sg_release,
- fasync: sg_fasync,
+ owner: THIS_MODULE,
+ read: sg_read,
+ write: sg_write,
+ poll: sg_poll,
+ ioctl: sg_ioctl,
+ open: sg_open,
+ release: sg_release,
+ fasync: sg_fasync,
};
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index a605233c0..2ac10c832 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -31,6 +31,7 @@
#include <linux/ioctl.h>
#include <linux/fcntl.h>
#include <linux/spinlock.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/dma.h>
#include <asm/system.h>
@@ -620,8 +621,6 @@ static int scsi_tape_open(struct inode *inode, struct file *filp)
if (STp->device->host->hostt->module)
__MOD_INC_USE_COUNT(STp->device->host->hostt->module);
- if (st_template.module)
- __MOD_INC_USE_COUNT(st_template.module);
if (mode != STp->current_mode) {
DEBC(printk(ST_DEB_MSG "st%d: Mode change from %d to %d.\n",
@@ -859,8 +858,6 @@ static int scsi_tape_open(struct inode *inode, struct file *filp)
STp->in_use = 0;
if (STp->device->host->hostt->module)
__MOD_DEC_USE_COUNT(STp->device->host->hostt->module);
- if (st_template.module)
- __MOD_DEC_USE_COUNT(st_template.module);
return retval;
}
@@ -995,6 +992,7 @@ static int scsi_tape_close(struct inode *inode, struct file *filp)
int dev;
dev = TAPE_NR(devt);
+ lock_kernel();
read_lock(&st_dev_arr_lock);
STp = scsi_tapes[dev];
read_unlock(&st_dev_arr_lock);
@@ -1010,8 +1008,7 @@ static int scsi_tape_close(struct inode *inode, struct file *filp)
STp->in_use = 0;
if (STp->device->host->hostt->module)
__MOD_DEC_USE_COUNT(STp->device->host->hostt->module);
- if (st_template.module)
- __MOD_DEC_USE_COUNT(st_template.module);
+ unlock_kernel();
return result;
}
@@ -3428,6 +3425,7 @@ __setup("st=", st_setup);
static struct file_operations st_fops =
{
+ owner: THIS_MODULE,
read: st_read,
write: st_write,
ioctl: st_ioctl,