Re: [PATCH v3 1/4] usb: core: quirks: add remote wakeup quirk for Pixart mice

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

 



On Fri, Sep 06, 2013 at 11:32:51PM +0800, Greg Kroah-Hartman wrote:
> On Fri, Sep 06, 2013 at 06:24:41PM +0800, Huang Rui wrote:
> > It adds all issue mice on AMD special platforms for remote wakeup quirk.
> > 
> > Some mice with on Pixart controller would trigger remote wakeup quirk on
> > some AMD special platforms, this patch added all issue mice which tested.
> > 
> > But some manufactures might overwrite vendor id and product id in the
> > firmware when they get their USB hardware from other suppliers. So it might
> > not cover all the issue devices, and if find another issue device in
> > future, will add to mark as USB_QUIRK_AMD_REMOTE_WAKEUP.
> 
> Who should we email about these problems, so that they can be tested,
> you?
> 
> > Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
> > ---
> >  drivers/usb/core/hub.c     | 14 ++++++++++++++
> >  drivers/usb/core/quirks.c  | 11 +++++++++++
> >  include/linux/usb.h        |  1 +
> >  include/linux/usb/quirks.h |  4 ++++
> >  4 files changed, 30 insertions(+)
> > 
> > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> > index dde4c83..d8fb0ad 100644
> > --- a/drivers/usb/core/hub.c
> > +++ b/drivers/usb/core/hub.c
> > @@ -5461,3 +5461,17 @@ acpi_handle usb_get_hub_port_acpi_handle(struct usb_device *hdev,
> >  	return DEVICE_ACPI_HANDLE(&hub->ports[port1 - 1]->dev);
> >  }
> >  #endif
> > +
> > +bool is_issue_device_for_amd_quirk(struct usb_device *udev)
> > +{
> > +	if (!udev) {
> > +		dev_warn(&udev->dev, "Warn: no device attached!\n");
> > +		return false;
> > +	}
> > +
> > +	if (udev->quirks & USB_QUIRK_AMD_REMOTE_WAKEUP)
> > +		return true;
> > +	else
> > +		return false;
> > +}
> > +EXPORT_SYMBOL_GPL(is_issue_device_for_amd_quirk);
> 
> That's a really ackward name for a global symbol.  Please follow the
> naming scheme of the usb global symbols please (hint, put "usb_" at the
> front, and don't use a whole sentance for a function name.)
> 
> Also, as no one is calling this function in this patch, why do you have
> it here?
> 
> This patch really doesn't even do anything, does it?
> 

Yes, this function is called by the following patch 3(xhci) and
4(ohci). I want to separate core codes from host controllers, so I
have it here. But I will refactor patches as Alan's suggestion, maybe
this function will be gone.

Thanks,
Rui 

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