Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

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

 



On Sun, 10 Apr 2016, Sam Sany wrote:

> Alan Stern <stern@...> writes:
> 
> > 
> > On Sat, 9 Apr 2016, Sam Sany wrote:
>  
> > --- usb-3.15.orig/drivers/usb/core/hub.c
> > +++ usb-3.15/drivers/usb/core/hub.c
> >  <at>  <at>  -130,6 +130,8  <at>  <at>  struct usb_hub 
> *usb_hub_to_struct_hub(st
> > 
> >  static int usb_device_supports_lpm(struct usb_device *udev)
> >  {
> > +	return 0;
> > +
> >  	/* USB 2.1 (and greater) devices indicate LPM support through
> >  	 * their USB 2.0 Extended Capabilities BOS descriptor.
> >  	 */
> 
> Last stupid question... what do I do with the patch? Do I add it to a 
> particular file or just copy and paste the text to a terminal? Sorry, I know 
> I'm embarrassingly uneducated in these respects...

A patch describes a series of changes to an existing file.  This one 
describes adding two lines: one that says "return 0;" and one that is 
blank.

Normally people apply a patch using the "patch" program or a
source-code manager such as Git.  But you don't have to do that in this
case because the patch is so simple -- you can apply it by hand.  Just
edit the drivers/usb/core/hub.c file in the kernel source and add that
"return 0;" line at the start of the usb_device_supports_lpm()  
function, before you build the kernel.

> And one last question... I don't know too much C, but there is a missing 
> closing bracket at the end, right? On the line after the "return 0" statement?

No, there isn't.  The closing brace is lower down, beyond the end of 
the patch.

Alan Stern

--
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