aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2012-03-22 21:40:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-22 16:21:24 -0700
commitcaa6b6d39d177e872297a868d22c2fc3c770534a (patch)
treedf4d21d4e5e2ab85f35fe6ada0bf760a0cdeda50 /drivers/block
parentaeac9d304531167f19aac6bb914046a5c04785dd (diff)
downloadkernel_samsung_smdk4412-caa6b6d39d177e872297a868d22c2fc3c770534a.zip
kernel_samsung_smdk4412-caa6b6d39d177e872297a868d22c2fc3c770534a.tar.gz
kernel_samsung_smdk4412-caa6b6d39d177e872297a868d22c2fc3c770534a.tar.bz2
cciss: Fix scsi tape io with more than 255 scatter gather elements
commit bc67f63650fad6b3478d9ddfd5406d45a95987c9 upstream. The total number of scatter gather elements in the CISS command used by the scsi tape code was being cast to a u8, which can hold at most 255 scatter gather elements. It should have been cast to a u16. Without this patch the command gets rejected by the controller since the total scatter gather count did not add up to the right value resulting in an i/o error. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss_scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
index ff3d162..a552cab 100644
--- a/drivers/block/cciss_scsi.c
+++ b/drivers/block/cciss_scsi.c
@@ -1411,7 +1411,7 @@ static void cciss_scatter_gather(ctlr_info_t *h, CommandList_struct *c,
/* track how many SG entries we are using */
if (request_nsgs > h->maxSG)
h->maxSG = request_nsgs;
- c->Header.SGTotal = (__u8) request_nsgs + chained;
+ c->Header.SGTotal = (u16) request_nsgs + chained;
if (request_nsgs > h->max_cmd_sgentries)
c->Header.SGList = h->max_cmd_sgentries;
else