Re: test procedure for cdc-wdm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 26 February 2013 14:59:23 Bjørn Mork wrote:
> Oliver Neukum <oliver@xxxxxxxxxx> writes:
> 
> > @@ -185,9 +187,17 @@ static void wdm_in_callback(struct urb *urb)
> >  	}
> >  
> >  	desc->rerr = status;
> > -	desc->reslength = urb->actual_length;
> > -	memmove(desc->ubuf + desc->length, desc->inbuf, desc->reslength);
> > -	desc->length += desc->reslength;
> > +	if (length + desc->length > desc->wMaxCommand) {
> > +		/* The buffer would overflow */
> > +		set_bit(WDM_OVERFLOW, &desc->flags);
> > +	} else {
> > +		/* we may already be in overflow */
> > +		if (!test_bit(WDM_OVERFLOW, &desc->flags)) {
> > +			memmove(desc->ubuf + desc->length, desc->inbuf, desc->reslength);
> > +			desc->length += length;
> > +			desc->reslength = length;
> > +		}
> 
> 
> This is not OK.  Should probably be

Thank you!
The tests failed and I couldn't find out why. Sometimes I am blind.

	Reagrds
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux