android_kernel_xiaomi_sm8350/drivers/usb/gadget
Bryan O'Donoghue 8356f3113d USB: fix g_serial small error
A SET_LINE_CODING control request should return a zero length packet
as an ACK to the host, during the status phase of a USB transaction.

The return value of gs_setup_class() is treated as the number of
bytes to write in the status phase of the control request, by
gs_setup(). For this case, the value returned by gs_setup_class should
be zero for SET_LINE_CODING but, right now, appears to be
sizeof(struct usb_cdc_line_coding).

However, if after doing the memcpy of the line coding descriptor we
set the variable "ret" to be zero, we should return the appropiate ZLP
to the host as an ACK in the status phase of the control request.
I've tested this out using Linux as both host and slave and confirmed
that the following small change fixes the spurious return of
sizeof(struct usb_cdc_line_coding)/wLength bytes in the status phase
of a USB_CDC_REQ_SET_LINE_CODING request. It's not a huge bug but, it
is worth fixing.

Signed-off-by: Bryan O'Donoghue <bodonoghue@codehermit.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:20 -08:00
..
at91_udc.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
at91_udc.h USB: at91_udc wakeup event updates 2007-02-07 15:44:37 -08:00
config.c USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
dummy_hcd.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
epautoconf.c USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
ether.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
file_storage.c [PATCH] remove invalidate_inode_pages() 2007-02-11 10:51:31 -08:00
gadget_chips.h USB: list atmel husb2_udc gadget controller 2007-02-07 15:44:39 -08:00
gmidi.c USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
goku_udc.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
goku_udc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode.c USB: gadgetfs AIO tweaks 2007-02-07 15:44:39 -08:00
Kconfig [ARM] 3963/1: AT91: Update configuration files 2006-12-01 16:56:43 +00:00
lh7a40x_udc.c USB: gadget driver unbind() is optional; section fixes; misc 2006-12-20 10:14:26 -08:00
lh7a40x_udc.h USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
Makefile USB: gmidi: New USB MIDI Gadget class driver. 2006-09-27 11:58:52 -07:00
ndis.h [PATCH] USB: rndis updates (mostly cleanup) 2005-06-27 14:43:50 -07:00
net2280.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
net2280.h USB: net2280: don't send unwanted zero-length packets 2006-12-01 14:23:36 -08:00
omap_udc.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
omap_udc.h USB: omap_udc build fixes (sync with linux-omap) 2007-01-05 12:19:09 -08:00
pxa2xx_udc.c [PATCH] Scheduled removal of SA_xxx interrupt flags fixups 2007-02-14 08:09:54 -08:00
pxa2xx_udc.h USB: pxa2xx_udc understands GPIO based VBUS sensing 2006-09-27 11:58:48 -07:00
rndis.c [PATCH] proc: remove useless (and buggy) ->nlink settings 2007-02-11 10:51:32 -08:00
rndis.h [PATCH] USB: gadget section fixups 2006-07-12 16:03:24 -07:00
serial.c USB: fix g_serial small error 2007-02-16 15:32:20 -08:00
usbstring.c USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
zero.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00