On Thu, 20 Dec 2007 14:13:15 +1100
"Julian Calaby" <[EMAIL PROTECTED]> wrote:

> On Dec 20, 2007 1:44 PM, FUJITA Tomonori <[EMAIL PROTECTED]> wrote:
> > --- 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;
> 
> Would
> 
> +               rsp->data_len = -smprep->ResponseDataLength;
> 
> not work?

The definition of resid is:

        __s32 dout_resid;       /* [o] dout_xfer_len - actual_dout_xfer_len */

We need to have:

rsp->data_len = rsp->data_len - smprep->ResponseDataLength;


Then block/bsg.c sets up dout_resid in the following way:

hdr->dout_resid = rq->data_len;

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to