From: Stephen M. Cameron Date: Mon, 28 Nov 2011 19:12:05 +0000 (+0100) Subject: cciss: fix flush cache transfer length X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~725 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6c42b5cc1694215a2860f494b46809fedb8cfd8f;p=users%2Fjedix%2Flinux-maple.git cciss: fix flush cache transfer length We weren't filling in the transfer length of the flush cache command (it transfers 4 bytes of zeroes). Firmware didn't seem to be bothered by this, but it should be fixed. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe (cherry picked from commit 59bd71a81b66990564eac69aedd28ad87a2c81f4) Signed-off-by: Joe Jin --- diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 6bfc6caefe37..35e7d6f68008 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -2647,6 +2647,8 @@ static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff, c->Request.Timeout = 0; c->Request.CDB[0] = BMIC_WRITE; c->Request.CDB[6] = BMIC_CACHE_FLUSH; + c->Request.CDB[7] = (size >> 8) & 0xFF; + c->Request.CDB[8] = size & 0xFF; break; case TEST_UNIT_READY: c->Request.CDBLen = 6;