diff options
author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-23 01:50:57 (GMT) |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-23 01:50:57 (GMT) |
commit | a5324343955997d1439f26518ddac567cd5d134b (patch) | |
tree | f43558389c41e3a0f076c4ee55d77c4aa1561779 /drivers/fc4 | |
parent | 8199d3a79c224bbe5943fa08684e1f93a17881b0 (diff) | |
parent | a4936044001694f033fe4ea94d6034d51a6b465c (diff) | |
download | linux-fsl-qoriq-a5324343955997d1439f26518ddac567cd5d134b.tar.xz |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/fc4')
-rw-r--r-- | drivers/fc4/fc.c | 32 | ||||
-rw-r--r-- | drivers/fc4/fc_syms.c | 1 | ||||
-rw-r--r-- | drivers/fc4/fcp_impl.h | 1 |
3 files changed, 17 insertions, 17 deletions
diff --git a/drivers/fc4/fc.c b/drivers/fc4/fc.c index 1fbb219..e3c9588 100644 --- a/drivers/fc4/fc.c +++ b/drivers/fc4/fc.c @@ -765,12 +765,8 @@ void fcp_release(fc_channel *fcchain, int count) /* count must > 0 */ 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) @@ -909,12 +905,8 @@ int fcp_scsi_abort(Scsi_Cmnd *SCpnt) */ if (++fc->abort_count < (fc->can_queue >> 1)) { - 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 { @@ -935,6 +927,7 @@ void fcp_scsi_reset_done(Scsi_Cmnd *SCpnt) int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt) { + unsigned long flags; fcp_cmd *cmd; fcp_cmnd *fcmd; fc_channel *fc = FC_SCMND(SCpnt); @@ -987,7 +980,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 +1002,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 +1023,18 @@ int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt) else return FAILED; } +int fcp_scsi_host_reset(Scsi_Cmnd *SCpnt) +{ + unsigned long flags; + 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 8bac2c4..ed85dfc 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 e44d652..c397c84 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) */ |