android_kernel_xiaomi_sm7250/drivers
David Moore 0642b6577f firewire: fw-ohci: Fix for dualbuffer three-or-more buffers
This patch fixes the problem where different OHCI 1.1 controllers behave
differently when a received iso packet straddles three or more buffers
when using the dual-buffer receive mode.  Two changes are made in order
to handle this situation:

1. The packet sync DMA descriptor is given a non-zero header length and
non-zero payload length.  This is because zero-payload descriptors are
not discussed in the OHCI 1.1 specs and their behavior is thus
undefined.  Instead we use a header size just large enough for a single
header and a payload length of 4 bytes for this first descriptor.

2. As we process received packets in the context's tasklet, read the
packet length out of the headers.  Keep track of the running total of
the packet length as "excess_bytes", so we can ignore any descriptors
where no packet starts or ends.  These descriptors may not have had
their first_res_count or second_res_count fields updated by the
controller so we cannot rely on those values.

The main drawback of this patch is that the excess_bytes value might get
"out of sync" with the packet descriptors if something strange happens
to the DMA program.  I'm not if such a thing could ever happen, but I
appreciate any suggestions in making it more robust.

Also, the packet-per-buffer support may need a similar fix to deal with
issue 1, but I haven't done any work on that yet.

Stefan, I'm hoping that with this patch, all your OHCI 1.1 controllers
will work properly with an unmodified version of libdc1394.

Signed-off-by: David Moore <dcm@acm.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-01-30 22:22:23 +01:00
..
acorn/char
acpi x86: don't disable TSC in any C states on AMD Fam10h 2008-01-30 13:32:41 +01:00
amba
ata
atm
auxdisplay
base
block cciss: fix bug in overriding ->data_len before completion 2008-01-29 21:55:18 +01:00
bluetooth
cdrom
char x86: remove flush_agp_mappings() 2008-01-30 13:34:07 +01:00
clocksource
connector [NETNS]: Consolidate kernel netlink socket destruction. 2008-01-28 15:08:07 -08:00
cpufreq cpufreq: fix obvious condition statement error 2008-01-30 13:33:34 +01:00
cpuidle
crypto
dca
dio
dma
edac
eisa
firewire firewire: fw-ohci: Fix for dualbuffer three-or-more buffers 2008-01-30 22:22:23 +01:00
firmware x86: left over fix for leak of early_ioremp in dmi_scan 2008-01-30 13:33:32 +01:00
hid
hwmon
i2c
ide
ieee1394 ieee1394: ohci1394: don't schedule IT tasklets on IR events 2008-01-30 22:22:21 +01:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25 2008-01-29 22:54:01 +11:00
input x86: replace outb_p() with udelay(2) in drivers/input/mouse/pc110pad.c 2008-01-30 13:31:24 +01:00
isdn
kvm x86: get rid of _MASK flags 2008-01-30 13:31:27 +01:00
leds
lguest x86: use generic register name in the thread and tss structures 2008-01-30 13:31:02 +01:00
macintosh
mca
md
media
message
mfd
misc
mmc
mtd
net [net] Gracefully handle shared e1000/1000e driver PCI ID's 2008-01-31 00:30:15 +11:00
nubus
of
oprofile
parisc
parport
pci
pcmcia
pnp git-x86: drivers/pnp/pnpbios/bioscalls.c build fix 2008-01-30 13:32:31 +01:00
power
ps3
rapidio
rtc
s390 [VLAN]: Turn VLAN_DEV_INFO into inline function 2008-01-28 15:08:32 -08:00
sbus
scsi [NETNS]: Consolidate kernel netlink socket destruction. 2008-01-28 15:08:07 -08:00
serial
sh
sn
spi
ssb ssb: Add boardflags_hi field to the sprom data structure 2008-01-28 15:09:52 -08:00
tc
telephony
uio
usb
video x86: cpa: move flush to cpa 2008-01-30 13:34:07 +01:00
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile x86: early boot debugging via FireWire (ohci1394_dma=early) 2008-01-30 13:34:11 +01:00