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
..
acorn
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
acpi
[PATCH] clockevents: i386 drivers
2007-02-16 08:13:59 -08:00
amba
ata
sata_vsc: use default cache line size if non-zero
2007-02-15 18:13:46 -05:00
atm
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
auxdisplay
base
block
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
bluetooth
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
cdrom
[PATCH] sysctl: remove insert_at_head from register_sysctl
2007-02-14 08:09:59 -08:00
char
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
2007-02-16 08:17:04 -08:00
clocksource
[PATCH] Allow early access to the power management timer
2007-02-16 08:13:58 -08:00
connector
cpufreq
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
2007-02-16 08:16:01 -08:00
crypto
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
dio
dma
edac
eisa
fc4
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
firmware
hid
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
hwmon
i2c/vt8231: Remove superfluous initialization
2007-02-13 22:08:58 +01:00
i2c
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
ide
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
ieee1394
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
infiniband
[PATCH] Scheduled removal of SA_xxx interrupt flags fixups
2007-02-14 08:09:54 -08:00
input
[PATCH] hrtimers: namespace and enum cleanup
2007-02-16 08:13:58 -08:00
isdn
[PATCH] correct CONFIG_GIGASET_M101 Makefile entry
2007-02-16 08:13:56 -08:00
kvm
[PATCH] i386: Convert i386 PDA code to use %fs
2007-02-13 13:26:20 +01:00
leds
macintosh
[PATCH] sysctl: remove insert_at_head from register_sysctl
2007-02-14 08:09:59 -08:00
mca
md
[PATCH] sysctl: remove insert_at_head from register_sysctl
2007-02-14 08:09:59 -08:00
media
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
message
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
mfd
misc
[PATCH] Scheduled removal of SA_xxx interrupt flags fixups
2007-02-14 08:09:54 -08:00
mmc
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
mtd
[PATCH] Scheduled removal of SA_xxx interrupt flags fixups 2
2007-02-14 08:09:55 -08:00
net
[PATCH] sysctl: remove insert_at_head from register_sysctl
2007-02-14 08:09:59 -08:00
nubus
oprofile
[PATCH] mark struct file_operations const 5
2007-02-12 09:48:45 -08:00
parisc
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
parport
[PATCH] sysctl: remove insert_at_head from register_sysctl
2007-02-14 08:09:59 -08:00
pci
[PATCH] Scheduled removal of SA_xxx interrupt flags fixups
2007-02-14 08:09:54 -08:00
pcmcia
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
pnp
[PATCH] mark struct file_operations const 5
2007-02-12 09:48:45 -08:00
ps3
[PATCH] ps3: disable display flipping during mode changes
2007-02-12 09:48:44 -08:00
rapidio
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
rtc
[PATCH] Scheduled removal of SA_xxx interrupt flags fixups
2007-02-14 08:09:54 -08:00
s390
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
sbus
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
scsi
USB Storage: indistinguishable devices with broken and unbroken firmware
2007-02-16 15:32:19 -08:00
serial
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
sh
sn
spi
[PATCH] SPI: atmel_spi driver
2007-02-14 08:09:53 -08:00
tc
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
telephony
[PATCH] remove many unneeded #includes of sched.h
2007-02-14 08:09:54 -08:00
usb
USB: fix g_serial small error
2007-02-16 15:32:20 -08:00
video
[PATCH] s3c2410fb: fix un-initialised dev field
2007-02-16 08:14:01 -08:00
w1
zorro
[PATCH] mark struct file_operations const 6
2007-02-12 09:48:45 -08:00
Kconfig
Makefile