Merge tag 'docs-5.3' of git://git.lwn.net/linux
[linux-2.6-block.git] / drivers / scsi / hpsa.c
index 53df6f7dd3f980776e56ca7dc1bed37f2ef0ec61..ffd7e9506570e0c77d32b5a068062b9baebca4b6 100644 (file)
@@ -4940,7 +4940,7 @@ static int hpsa_scsi_ioaccel2_queue_command(struct ctlr_info *h,
                        curr_sg->reserved[0] = 0;
                        curr_sg->reserved[1] = 0;
                        curr_sg->reserved[2] = 0;
-                       curr_sg->chain_indicator = 0x80;
+                       curr_sg->chain_indicator = IOACCEL2_CHAIN;
 
                        curr_sg = h->ioaccel2_cmd_sg_list[c->cmdindex];
                }
@@ -4957,6 +4957,11 @@ static int hpsa_scsi_ioaccel2_queue_command(struct ctlr_info *h,
                        curr_sg++;
                }
 
+               /*
+                * Set the last s/g element bit
+                */
+               (curr_sg - 1)->chain_indicator = IOACCEL2_LAST_SG;
+
                switch (cmd->sc_data_direction) {
                case DMA_TO_DEVICE:
                        cp->direction &= ~IOACCEL2_DIRECTION_MASK;