patch-2.3.1 linux/drivers/scsi/scsi.c
Next file: linux/drivers/scsi/scsi.h
Previous file: linux/drivers/scsi/pluto.c
Back to the patch index
Back to the overall index
- Lines: 63
- Date:
Tue May 11 14:37:40 1999
- Orig file:
v2.3.0/linux/drivers/scsi/scsi.c
- Orig date:
Thu Apr 29 11:53:41 1999
diff -u --recursive --new-file v2.3.0/linux/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c
@@ -473,6 +473,8 @@
SDpnt->host = shpnt;
SDpnt->online = TRUE;
+ init_waitqueue_head(&SDpnt->device_wait);
+
/*
* Next, hook the device to the host in question.
*/
@@ -660,7 +662,7 @@
SCpnt->lun = SDpnt->lun;
SCpnt->channel = SDpnt->channel;
{
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);
SCpnt->request.sem = &sem;
SCpnt->request.rq_status = RQ_SCSI_BUSY;
spin_lock_irq(&io_request_lock);
@@ -703,7 +705,7 @@
scsi_cmd[5] = 0;
SCpnt->cmd_len = 0;
{
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);
SCpnt->request.sem = &sem;
SCpnt->request.rq_status = RQ_SCSI_BUSY;
spin_lock_irq(&io_request_lock);
@@ -849,7 +851,7 @@
scsi_cmd[5] = 0;
SCpnt->cmd_len = 0;
{
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);
SCpnt->request.rq_status = RQ_SCSI_BUSY;
SCpnt->request.sem = &sem;
spin_lock_irq(&io_request_lock);
@@ -890,6 +892,8 @@
SDpnt->device_queue = SCpnt;
SDpnt->online = TRUE;
+ init_waitqueue_head(&SDpnt->device_wait);
+
/*
* Since we just found one device, there had damn well better be one in the list
* already.
@@ -2639,7 +2643,7 @@
{
if( shpnt->hostt == tpnt && shpnt->hostt->use_new_eh_code )
{
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);
shpnt->eh_notify = &sem;
kernel_thread((int (*)(void *))scsi_error_handler,
@@ -2876,7 +2880,7 @@
&& shpnt->hostt->use_new_eh_code
&& shpnt->ehandler != NULL )
{
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);
shpnt->eh_notify = &sem;
send_sig(SIGKILL, shpnt->ehandler, 1);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)