diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-06-20 08:44:00 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-06-20 08:44:00 -0500 |
commit | d039ba24f135147f60a13bcaa768189a5b773b6e (patch) | |
tree | 444b7596ab8312b5954d15c3135052a7c09c6fbe /drivers/scsi/in2000.c | |
parent | 72e3148a6e987974e3e949c5668e5ca812d7c818 (diff) | |
parent | 8b22c249e7de453961e4d253b19fc2a0bdd65d53 (diff) | |
download | talos-op-linux-d039ba24f135147f60a13bcaa768189a5b773b6e.tar.gz talos-op-linux-d039ba24f135147f60a13bcaa768189a5b773b6e.zip |
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'drivers/scsi/in2000.c')
-rw-r--r-- | drivers/scsi/in2000.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c index 0bb0369efb2d..aed7e64865fa 100644 --- a/drivers/scsi/in2000.c +++ b/drivers/scsi/in2000.c @@ -1644,14 +1644,16 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd) struct Scsi_Host *instance; struct IN2000_hostdata *hostdata; int x; + unsigned long flags; instance = cmd->device->host; hostdata = (struct IN2000_hostdata *) instance->hostdata; printk(KERN_WARNING "scsi%d: Reset. ", instance->host_no); - /* do scsi-reset here */ + spin_lock_irqsave(instance->host_lock, flags); + /* do scsi-reset here */ reset_hardware(instance, RESET_CARD_AND_BUS); for (x = 0; x < 8; x++) { hostdata->busy[x] = 0; @@ -1668,21 +1670,12 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd) hostdata->outgoing_len = 0; cmd->result = DID_RESET << 16; - return SUCCESS; -} -static int in2000_host_reset(Scsi_Cmnd * cmd) -{ - return FAILED; -} - -static int in2000_device_reset(Scsi_Cmnd * cmd) -{ - return FAILED; + spin_unlock_irqrestore(instance->host_lock, flags); + return SUCCESS; } - -static int in2000_abort(Scsi_Cmnd * cmd) +static int __in2000_abort(Scsi_Cmnd * cmd) { struct Scsi_Host *instance; struct IN2000_hostdata *hostdata; @@ -1803,6 +1796,16 @@ static int in2000_abort(Scsi_Cmnd * cmd) return SUCCESS; } +static int in2000_abort(Scsi_Cmnd * cmd) +{ + int rc; + + spin_lock_irq(cmd->device->host->host_lock); + rc = __in2000_abort(cmd); + spin_unlock_irq(cmd->device->host->host_lock); + + return rc; +} #define MAX_IN2000_HOSTS 3 @@ -2311,8 +2314,6 @@ static Scsi_Host_Template driver_template = { .queuecommand = in2000_queuecommand, .eh_abort_handler = in2000_abort, .eh_bus_reset_handler = in2000_bus_reset, - .eh_device_reset_handler = in2000_device_reset, - .eh_host_reset_handler = in2000_host_reset, .bios_param = in2000_biosparam, .can_queue = IN2000_CAN_Q, .this_id = IN2000_HOST_ID, |