diff options
author | Sarang Radke <sarang.radke@qlogic.com> | 2010-03-10 05:03:04 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-03-27 15:08:08 -0400 |
commit | d88a714bfefa7aed7b9cb6c3721707fcd056b472 (patch) | |
tree | ea791b7a50c10a035ec4819a4eb0b5977c107cc5 /drivers/scsi | |
parent | 4ae0a6c15efcc37e94e3f30e3533bdec03c53126 (diff) |
[SCSI] scsi_transport_fc: Make sure commands are completed when rport is offline
blk_end_request doesn't complete a bidi request
successfully
The unfinished request eventually triggers a panic in
timeout handling routine fc_bsg_job_timeout as
req->special is NULL
Use blk_end_request_all to end the request unconditionally
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 1d5b72173dd8..e37aeeb407fa 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -3852,7 +3852,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost, | |||
3852 | if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) { | 3852 | if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) { |
3853 | req->errors = -ENXIO; | 3853 | req->errors = -ENXIO; |
3854 | spin_unlock_irq(q->queue_lock); | 3854 | spin_unlock_irq(q->queue_lock); |
3855 | blk_end_request(req, -ENXIO, blk_rq_bytes(req)); | 3855 | blk_end_request_all(req, -ENXIO); |
3856 | spin_lock_irq(q->queue_lock); | 3856 | spin_lock_irq(q->queue_lock); |
3857 | continue; | 3857 | continue; |
3858 | } | 3858 | } |
@@ -3862,7 +3862,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost, | |||
3862 | ret = fc_req_to_bsgjob(shost, rport, req); | 3862 | ret = fc_req_to_bsgjob(shost, rport, req); |
3863 | if (ret) { | 3863 | if (ret) { |
3864 | req->errors = ret; | 3864 | req->errors = ret; |
3865 | blk_end_request(req, ret, blk_rq_bytes(req)); | 3865 | blk_end_request_all(req, ret); |
3866 | spin_lock_irq(q->queue_lock); | 3866 | spin_lock_irq(q->queue_lock); |
3867 | continue; | 3867 | continue; |
3868 | } | 3868 | } |