From: Stephen M. Cameron Date: Wed, 26 Oct 2011 21:21:17 +0000 (-0500) Subject: [SCSI] hpsa: fix flush cache transfer length X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~721 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d25e6622a29b1c56a1c826d588fec6fda5838866;p=users%2Fjedix%2Flinux-maple.git [SCSI] hpsa: 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: James Bottomley (cherry picked from commit bb158eabda984851d7964d968b9859383f98a701) Signed-off-by: Joe Jin --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 9a7baacf51bb..a69381dac9fe 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -2933,6 +2933,8 @@ static void fill_cmd(struct CommandList *c, u8 cmd, struct ctlr_info *h, 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;