]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] mpt fusion: make mptsas_smp_handler update resid
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Sun, 30 Dec 2007 10:34:52 +0000 (19:34 +0900)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 12 Jan 2008 00:29:09 +0000 (18:29 -0600)
This patch fixes mptsas_smp_handler to update both din_resid or
dout_resid on success. bsg can report back the residual.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/message/fusion/mptsas.c

index e4c94f93de16a98462518419c923bb24f24d9414..f77b329f6923baab6e4b23742981b97b58393046 100644 (file)
@@ -1343,6 +1343,8 @@ static int mptsas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
                smprep = (SmpPassthroughReply_t *)ioc->sas_mgmt.reply;
                memcpy(req->sense, smprep, sizeof(*smprep));
                req->sense_len = sizeof(*smprep);
+               req->data_len = 0;
+               rsp->data_len -= smprep->ResponseDataLength;
        } else {
                printk(MYIOC_s_ERR_FMT "%s: smp passthru reply failed to be returned\n",
                    ioc->name, __FUNCTION__);