From: FUJITA Tomonori Date: Sun, 30 Dec 2007 10:34:52 +0000 (+0900) Subject: [SCSI] mpt fusion: make mptsas_smp_handler update resid X-Git-Tag: v2.6.25-rc1~1230^2~81 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=38b3167f75c9508156b974d19692c19b78292e2e;p=linux-2.6-omap-h63xx.git [SCSI] mpt fusion: make mptsas_smp_handler update resid 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 Signed-off-by: James Bottomley --- diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index e4c94f93de1..f77b329f692 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -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__);