diff options
Diffstat (limited to 'drivers/fc4')
-rw-r--r-- | drivers/fc4/fc.c | 26 | ||||
-rw-r--r-- | drivers/fc4/fc_syms.c | 1 | ||||
-rw-r--r-- | drivers/fc4/fcp_impl.h | 1 |
3 files changed, 15 insertions, 13 deletions
diff --git a/drivers/fc4/fc.c b/drivers/fc4/fc.c index 1fbb219aa9b..fbd9ff79b7b 100644 --- a/drivers/fc4/fc.c +++ b/drivers/fc4/fc.c @@ -767,10 +767,8 @@ static void fcp_scsi_done (Scsi_Cmnd *SCpnt) { unsigned long flags; - spin_lock_irqsave(SCpnt->device->host->host_lock, flags); if (FCP_CMND(SCpnt)->done) FCP_CMND(SCpnt)->done(SCpnt); - spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags); } static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, int prepare) @@ -912,9 +910,7 @@ int fcp_scsi_abort(Scsi_Cmnd *SCpnt) unsigned long flags; SCpnt->result = DID_ABORT; - spin_lock_irqsave(SCpnt->device->host->host_lock, flags); fcmd->done(SCpnt); - spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags); printk("FC: soft abort\n"); return SUCCESS; } else { @@ -987,7 +983,10 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt) fc->rst_pkt->request->rq_status = RQ_SCSI_BUSY; fc->rst_pkt->done = fcp_scsi_reset_done; + + spin_lock_irqsave(SCpnt->device->host->host_lock, flags); fcp_scsi_queue_it(fc, fc->rst_pkt, fcmd, 0); + spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags); down(&sem); @@ -1006,13 +1005,7 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt) return SUCCESS; } -int fcp_scsi_bus_reset(Scsi_Cmnd *SCpnt) -{ - printk ("FC: bus reset!\n"); - return FAILED; -} - -int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt) +static int __fcp_scsi_host_reset(Scsi_Cmnd *SCpnt) { fc_channel *fc = FC_SCMND(SCpnt); fcp_cmnd *fcmd = FCP_CMND(SCpnt); @@ -1033,6 +1026,17 @@ int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt) else return FAILED; } +int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt) +{ + int rc; + + spin_lock_irqsave(SCpnt->device->host->host_lock, flags); + rc = __fcp_scsi_host_reset(SCpnt); + spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags); + + return rc; +} + static int fcp_els_queue_it(fc_channel *fc, fcp_cmnd *fcmd) { long i; diff --git a/drivers/fc4/fc_syms.c b/drivers/fc4/fc_syms.c index 8bac2c45302..ed85dfcef69 100644 --- a/drivers/fc4/fc_syms.c +++ b/drivers/fc4/fc_syms.c @@ -27,7 +27,6 @@ EXPORT_SYMBOL(fc_do_prli); EXPORT_SYMBOL(fcp_scsi_queuecommand); EXPORT_SYMBOL(fcp_scsi_abort); EXPORT_SYMBOL(fcp_scsi_dev_reset); -EXPORT_SYMBOL(fcp_scsi_bus_reset); EXPORT_SYMBOL(fcp_scsi_host_reset); #endif /* CONFIG_MODULES */ diff --git a/drivers/fc4/fcp_impl.h b/drivers/fc4/fcp_impl.h index e44d652a83d..c397c84bef6 100644 --- a/drivers/fc4/fcp_impl.h +++ b/drivers/fc4/fcp_impl.h @@ -158,7 +158,6 @@ int fc_do_prli(fc_channel *, unsigned char); int fcp_scsi_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *)); int fcp_scsi_abort(Scsi_Cmnd *); int fcp_scsi_dev_reset(Scsi_Cmnd *); -int fcp_scsi_bus_reset(Scsi_Cmnd *); int fcp_scsi_host_reset(Scsi_Cmnd *); #endif /* !(_FCP_SCSI_H) */ |