[SCSI] hpsa: fix flush cache transfer length
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Wed, 26 Oct 2011 21:21:17 +0000 (16:21 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 30 Oct 2011 10:34:27 +0000 (14:34 +0400)
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 <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/hpsa.c

index f3fd9f1711f7559217617ce6bb25a89165a1b8f0..57ed00f7050a18ff6ca74809d8a4869bb3c32f60 100644 (file)
@@ -2876,6 +2876,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;