forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SCSI] bsg: update sg_io_v4 structure
This updates sg_io_v4 structure (based on Doug's RFC, release 1.3). The major changes are: - add dout_resid field - increase tag size to 64 bits to comply with SAM-4 and SRP - add dout_iovec_count and din_iovec_count dout_iovec_count and din_iovec_count aren't supported now. I'm not sure whether they will be supported or not but they were added for the possible future changes. Signed-off-by: FUJITA Tomonori <[email protected]> Signed-off-by: James Bottomley <[email protected]>
- Loading branch information
FUJITA Tomonori
authored and
James Bottomley
committed
Jul 31, 2007
1 parent
db47c2d
commit 0c6a89b
Showing
2 changed files
with
16 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* bsg.c - block layer implementation of the sg v3 interface | ||
* bsg.c - block layer implementation of the sg v4 interface | ||
* | ||
* Copyright (C) 2004 Jens Axboe <[email protected]> SUSE Labs | ||
* Copyright (C) 2004 Peter M. Jones <[email protected]> | ||
|
@@ -421,7 +421,6 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr, | |
hdr->info = 0; | ||
if (hdr->device_status || hdr->transport_status || hdr->driver_status) | ||
hdr->info |= SG_INFO_CHECK; | ||
hdr->din_resid = rq->data_len; | ||
hdr->response_len = 0; | ||
|
||
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, | |
} | ||
|
||
if (rq->next_rq) { | ||
hdr->dout_resid = rq->data_len; | ||
hdr->din_resid = rq->next_rq->data_len; | ||
blk_rq_unmap_user(bidi_bio); | ||
blk_put_request(rq->next_rq); | ||
} | ||
} else if (rq_data_dir(rq) == READ) | ||
hdr->din_resid = rq->data_len; | ||
else | ||
hdr->dout_resid = rq->data_len; | ||
|
||
blk_rq_unmap_user(bio); | ||
blk_put_request(rq); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters