summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/fusb300_udc.c
diff options
context:
space:
mode:
authorFabian Godehardt <fg@emlix.com>2011-02-07 12:53:05 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-17 10:47:55 -0800
commit16f08a08d8148945022eb7d5ebb89e6ee8029f91 (patch)
treefac512e2900645fec08f9a28bd875a45b214573d /drivers/usb/gadget/fusb300_udc.c
parentc17f459c6ea5b569825445279fa21adb3cf3067f (diff)
downloadlinux-3.10-16f08a08d8148945022eb7d5ebb89e6ee8029f91.tar.gz
linux-3.10-16f08a08d8148945022eb7d5ebb89e6ee8029f91.tar.bz2
linux-3.10-16f08a08d8148945022eb7d5ebb89e6ee8029f91.zip
USB: s3c2410_udc: Add handling for S3C244X dual-packet mode
This is a patch that seems to make the USB hangs on the S3C244X go away. At least a good amount of ping torture didn't make them come back so far. The issue is that, if there are several back-to-back packets, sometimes no interrupt is generated for one of them. This seems to be caused by the mysterious dual packet mode, which the USB hardware enters automatically if the endpoint size is half that of the FIFO. (On the 244X, this is the normal situation for bulk data endpoints.) There is also a timing factor in this. It seems that what happens is that the USB hardware automatically sends an acknowledgement if there is only one packet in the FIFO (the FIFO has space for two). If another packet arrives before the host has retrieved and acknowledged the previous one, no interrupt is generated for that second one. However, there may be an indication. There is one undocumented bit (none of the 244x manuals document it), OUT_CRS1_REG[1], that seems to be set suspiciously often when this condition occurs. There is also CLR_DATA_TOGGLE, OUT_CRS1_REG[7], which may have a function related to this. (The Samsung manual is rather terse on that, as usual.) This needs to be examined further. For now, the patch seems to do the trick. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/fusb300_udc.c')
0 files changed, 0 insertions, 0 deletions