diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-06 20:48:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-06 20:48:34 -0400 |
commit | bced13738405b62c8203df9c103d4ba63d747872 (patch) | |
tree | 566795dc7493591182668a94855487dff034a2b3 /block/bsg.c | |
parent | 21f16289270447673a7263ccc0b22d562fb01ecb (diff) | |
parent | 2b053729a84b6aac197df51b8729bc9fec743bff (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (32 commits)
[SCSI] aacraid: prevent panic on adapter resource failure
[SCSI] aha152x: use data accessors and !use_sg cleanup
[SCSI] aha152x: Fix check_condition code-path
[SCSI] aha152x: Clean Reset path
[SCSI] aha152x: preliminary fixes and some comments
[SCSI] aha152x: use bounce buffer
[SCSI] aha152x: fix debug mode symbol conflict
[SCSI] sd: disentangle barriers in SCSI
[SCSI] lpfc : scsi command accessor fix for 8.2.2
[SCSI] qlogicpti: Some cosmetic changes
[SCSI] lpfc 8.2.2 : Change version number to 8.2.2
[SCSI] lpfc 8.2.2 : Style cleanups
[SCSI] lpfc 8.2.2 : Miscellaneous Bug Fixes
[SCSI] lpfc 8.2.2 : Miscellaneous management and logging mods
[SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macro
[SCSI] lpfc 8.2.2 : Attribute and Parameter splits for vport and physical port
[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list
[SCSI] lpfc 8.2.2 : Error messages and debugfs updates
[SCSI] initialize shost_data to zero
[SCSI] mptsas: add SMP passthrough support via bsg
...
Diffstat (limited to 'block/bsg.c')
-rw-r--r-- | block/bsg.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/block/bsg.c b/block/bsg.c index d60eee549405..ed2646827234 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * bsg.c - block layer implementation of the sg v3 interface | 2 | * bsg.c - block layer implementation of the sg v4 interface |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Jens Axboe <axboe@suse.de> SUSE Labs | 4 | * Copyright (C) 2004 Jens Axboe <axboe@suse.de> SUSE Labs |
5 | * Copyright (C) 2004 Peter M. Jones <pjones@redhat.com> | 5 | * Copyright (C) 2004 Peter M. Jones <pjones@redhat.com> |
@@ -421,7 +421,6 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr, | |||
421 | hdr->info = 0; | 421 | hdr->info = 0; |
422 | if (hdr->device_status || hdr->transport_status || hdr->driver_status) | 422 | if (hdr->device_status || hdr->transport_status || hdr->driver_status) |
423 | hdr->info |= SG_INFO_CHECK; | 423 | hdr->info |= SG_INFO_CHECK; |
424 | hdr->din_resid = rq->data_len; | ||
425 | hdr->response_len = 0; | 424 | hdr->response_len = 0; |
426 | 425 | ||
427 | if (rq->sense_len && hdr->response) { | 426 | if (rq->sense_len && hdr->response) { |
@@ -437,9 +436,14 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr, | |||
437 | } | 436 | } |
438 | 437 | ||
439 | if (rq->next_rq) { | 438 | if (rq->next_rq) { |
439 | hdr->dout_resid = rq->data_len; | ||
440 | hdr->din_resid = rq->next_rq->data_len; | ||
440 | blk_rq_unmap_user(bidi_bio); | 441 | blk_rq_unmap_user(bidi_bio); |
441 | blk_put_request(rq->next_rq); | 442 | blk_put_request(rq->next_rq); |
442 | } | 443 | } else if (rq_data_dir(rq) == READ) |
444 | hdr->din_resid = rq->data_len; | ||
445 | else | ||
446 | hdr->dout_resid = rq->data_len; | ||
443 | 447 | ||
444 | blk_rq_unmap_user(bio); | 448 | blk_rq_unmap_user(bio); |
445 | blk_put_request(rq); | 449 | blk_put_request(rq); |