Re: issues with commit c1da59dad0eb ("cdc-wdm: Clear read pipeline in case of error")

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

 



Am Donnerstag, den 20.04.2017, 10:32 +0200 schrieb Bjørn Mork:
> > @@ -189,7 +192,13 @@ static void wdm_in_callback(struct urb *urb)
> >               }
> >       }
>
> > -     desc->rerr = status;
> > +     /*
> > +      * only set a new error if there is no previous error.
> > +      * Errors are only cleared during read/open
> > +      */
> > +     if (desc->rerr  == 0)
> > +             desc->rerr = status;
> > +
> >       if (length + desc->length > desc->wMaxCommand) {
> >               /* The buffer would overflow */
> >               set_bit(WDM_OVERFLOW, &desc->flags);
> > 
> 
> 
> This is minor, but in my opinion this change is flawed.  It changes the
> meaning of "desc->rerr" from the original "last status code" to the new
> "first error since last userspace read".

Indeed. And that will preserve the initial cause of the problem better.
We could run into the zero length read case. Are you sure you want the
old behavior back?

	Regards
		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