cciss: Fix scsi tape io with more than 255 scatter gather elements
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Thu, 22 Mar 2012 20:40:09 +0000 (21:40 +0100)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 15:02:48 +0000 (20:02 +0530)
commitba03c67eb673c78b042be1b992370ac7eccdc102
tree79a538f2d128cccb316b37be53209b128e7a9a5a
parent89405c4733d7107713c34abccda56b76a9e75f98
cciss: Fix scsi tape io with more than 255 scatter gather elements

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>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/cciss_scsi.c