linux_dsm_epyc7002/drivers/usb
Mattias Jacobsson 090158555f USB: misc: appledisplay: fix backlight update_status return code
Upon success the update_status handler returns a positive number
corresponding to the number of bytes transferred by usb_control_msg.
However the return code of the update_status handler should indicate if
an error occurred(negative) or how many bytes of the user's input to sysfs
that was consumed. Return code zero indicates all bytes were consumed.

The bug can for example result in the update_status handler being called
twice, the second time with only the "unconsumed" part of the user's input
to sysfs. Effectively setting an incorrect brightness.

Change the update_status handler to return zero for all successful
transactions and forward usb_control_msg's error code upon failure.

Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-18 19:44:39 +02:00
..
atm USB: atm: fix up some remaining DEVICE_ATTR() usage 2018-01-24 08:49:52 +01:00
c67x00 USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
chipidea usb: chipidea: Fix otg event handler 2018-09-20 17:04:22 +08:00
class Merge 4.19-rc7 into usb-next 2018-10-08 15:40:42 +02:00
common usb: roles: Take care of driver module reference counting 2018-09-20 13:20:24 +02:00
core USB: core: remove set but not used variable 'udev' 2018-10-09 16:02:29 +02:00
dwc2 usb: dwc2: disable power_down on rockchip devices 2018-10-05 10:50:14 +03:00
dwc3 usb: dwc3: Fix spelling of 'optimizations' 2018-10-02 10:43:51 +03:00
early usb/early: remove set but not used variable 'remain_length' 2018-10-09 16:07:55 +02:00
gadget USB: net2280: Remove ->disconnect() callback from net2280_pullup() 2018-10-05 10:50:23 +03:00
host usb: host: ohci-at91: fix request of irq for optional gpio 2018-10-15 15:57:29 +02:00
image USB/PHY patches for 4.15-rc1 2017-11-13 21:14:07 -08:00
isp1760 usb: isp1760: remove redundant variable 'selector' 2018-07-13 15:41:56 +02:00
misc USB: misc: appledisplay: fix backlight update_status return code 2018-10-18 19:44:39 +02:00
mon USB: mon: use ktime_get_real_ts64 instead of getnstimeofday64 2018-06-25 21:58:26 +08:00
mtu3 usb: mtu3: disable vbus rise/fall interrupts of ltssm 2018-10-02 10:39:02 +03:00
musb usb: musb: dsps: do not disable CPPI41 irq in driver teardown 2018-09-20 12:40:14 +02:00
phy usb: phy: mxs: fix spelling mistake "stardard" -> "standard" 2018-10-02 10:31:23 +03:00
renesas_usbhs usb: renesas_usbhs: add support for R-Car E3 2018-10-02 10:48:08 +03:00
roles usb: roles: intel_xhci: Enable runtime PM 2018-05-24 18:17:00 +02:00
serial USB-serial updates for v4.20-rc1 2018-10-18 14:59:04 +02:00
storage USB: STORAGE: ISD200 Fixed coding style issue "space required in for loop" 2018-09-20 15:10:29 +02:00
typec usb: typec: Fix copy/paste on typec_set_vconn_role() kerneldoc 2018-10-09 16:05:41 +02:00
usbip usb: usbip: remove redundant pointer ep 2018-07-13 15:41:55 +02:00
wusbcore USB: wusbcore: Switch to bitmap_zalloc() 2018-09-10 20:08:21 +02:00
Kconfig usb: select USB_COMMON for usb role switch config 2018-04-22 15:23:37 +02:00
Makefile usb: roles: Add Intel xHCI USB role switch driver 2018-03-22 13:49:27 +01:00
README
usb-skeleton.c usb: usb-skeleton: use irqsave() in USB's complete callback 2018-06-28 19:36:06 +09:00

To understand all the Linux-USB framework, you'll use these resources:

    * This source code.  This is necessarily an evolving work, and
      includes kerneldoc that should help you get a current overview.
      ("make pdfdocs", and then look at "usb.pdf" for host side and
      "gadget.pdf" for peripheral side.)  Also, Documentation/usb has
      more information.

    * The USB 2.0 specification (from www.usb.org), with supplements
      such as those for USB OTG and the various device classes.
      The USB specification has a good overview chapter, and USB
      peripherals conform to the widely known "Chapter 9".

    * Chip specifications for USB controllers.  Examples include
      host controllers (on PCs, servers, and more); peripheral
      controllers (in devices with Linux firmware, like printers or
      cell phones); and hard-wired peripherals like Ethernet adapters.

    * Specifications for other protocols implemented by USB peripheral
      functions.  Some are vendor-specific; others are vendor-neutral
      but just standardized outside of the www.usb.org team.

Here is a list of what each subdirectory here is, and what is contained in
them.

core/		- This is for the core USB host code, including the
		  usbfs files and the hub class driver ("hub_wq").

host/		- This is for USB host controller drivers.  This
		  includes UHCI, OHCI, EHCI, and others that might
		  be used with more specialized "embedded" systems.

gadget/		- This is for USB peripheral controller drivers and
		  the various gadget drivers which talk to them.


Individual USB driver directories.  A new driver should be added to the
first subdirectory in the list below that it fits into.

image/		- This is for still image drivers, like scanners or
		  digital cameras.
../input/	- This is for any driver that uses the input subsystem,
		  like keyboard, mice, touchscreens, tablets, etc.
../media/	- This is for multimedia drivers, like video cameras,
		  radios, and any other drivers that talk to the v4l
		  subsystem.
../net/		- This is for network drivers.
serial/		- This is for USB to serial drivers.
storage/	- This is for USB mass-storage drivers.
class/		- This is for all USB device drivers that do not fit
		  into any of the above categories, and work for a range
		  of USB Class specified devices. 
misc/		- This is for all USB device drivers that do not fit
		  into any of the above categories.