RE: [PATCH 1/1] usb: lpm: add boot flag to disable lpm

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

 



Thank you for the feedback Greg. This is my first attempt to submit a
kernel patch.

Is there a better approach to this? The only other option at my disposal
is to add about 200 products to the quirks.c file, and routinely update
that list as new products are released. I need to implement some means
of disabling LPM, ideally on a per-device basis.

> -------- Original Message --------
> Subject: Re: [PATCH 1/1] usb: lpm: add boot flag to disable lpm
> From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
> Date: Wed, April 13, 2016 2:33 pm
> To: Matthew Giassa <matthew@xxxxxxxxxx>
> Cc: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>,
> linux-usb@xxxxxxxxxxxxxxx
> 
> 
> On Wed, Apr 13, 2016 at 02:25:08PM -0700, Matthew Giassa wrote:
> > commit 4e8998d462ab06900949a3099706a19177484c09
> > Author: Matthew <matthew@xxxxxxxxxx>
> > Date:   Wed Apr 13 13:37:21 2016 -0700
> 
> Why is this here?
> 
> > 
> >     Adding new kernel parameter that allows users to skip the check
> >     for whether or not LPM is supported. This resolves erratic power
> >     state changes with certain U3V machine vision cameras.
> >     
> >     Signed-off-by: Matthew Giassa <matthew@xxxxxxxxxx>
> > 
> 
> Why is this oddly indented?
> 
> Please use git send-email to send a patch.
> 
> > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> > index df0e3b9..ab6eb62 100644
> > --- a/drivers/usb/core/hcd.c
> > +++ b/drivers/usb/core/hcd.c
> > @@ -118,6 +118,12 @@ static inline int is_root_hub(struct usb_device
> > *udev)
> >  	return (udev->parent == NULL);
> >  }
> >  
> > +/* allow LPM to be disabled */
> > +static bool usb_hcd_lpm_disable = false;
> > +module_param(usb_hcd_lpm_disable, bool, S_IRUGO | S_IWUSR);
> > +MODULE_PARM_DESC(usb_hcd_lpm_disable, "true to disable link power
> > management");
> 
> Patch is line-wrapped :(
> 
> But larger issue, no new module parameters for things like this.  No one
> will use them and they aren't device or bus specific.  It's a huge
> hammer that isn't nice to use.
> 
> thanks,
> 
> greg k-h
--
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