aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/commctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aacraid/commctrl.c')
-rw-r--r--drivers/scsi/aacraid/commctrl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index fbcd48d0bfc3..54195a117f72 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -689,7 +689,10 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
689 kfree (usg); 689 kfree (usg);
690 } 690 }
691 srbcmd->count = cpu_to_le32(byte_count); 691 srbcmd->count = cpu_to_le32(byte_count);
692 psg->count = cpu_to_le32(sg_indx+1); 692 if (user_srbcmd->sg.count)
693 psg->count = cpu_to_le32(sg_indx+1);
694 else
695 psg->count = 0;
693 status = aac_fib_send(ScsiPortCommand64, srbfib, actual_fibsize, FsaNormal, 1, 1,NULL,NULL); 696 status = aac_fib_send(ScsiPortCommand64, srbfib, actual_fibsize, FsaNormal, 1, 1,NULL,NULL);
694 } else { 697 } else {
695 struct user_sgmap* upsg = &user_srbcmd->sg; 698 struct user_sgmap* upsg = &user_srbcmd->sg;
@@ -775,7 +778,10 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
775 } 778 }
776 } 779 }
777 srbcmd->count = cpu_to_le32(byte_count); 780 srbcmd->count = cpu_to_le32(byte_count);
778 psg->count = cpu_to_le32(sg_indx+1); 781 if (user_srbcmd->sg.count)
782 psg->count = cpu_to_le32(sg_indx+1);
783 else
784 psg->count = 0;
779 status = aac_fib_send(ScsiPortCommand, srbfib, actual_fibsize, FsaNormal, 1, 1, NULL, NULL); 785 status = aac_fib_send(ScsiPortCommand, srbfib, actual_fibsize, FsaNormal, 1, 1, NULL, NULL);
780 } 786 }
781 if (status == -ERESTARTSYS) { 787 if (status == -ERESTARTSYS) {