usb: fixes for v3.7-rc4
We're reverting MUSB Mode 1 DMA patch which caused many regressions. Meanwhile Roger is cooking a better version of that patch, which will hopefully be ready for v3.8 merge window. We also fix an undeclared error in ux5000_remove() and another build error when we try to build USB_MUSB_OMAP2PLUS as a module. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJQj8prAAoJEIaOsuA1yqREHq8P/RYhQkCXdn9VqhhZGJwRWNve b46rNsWw0qWsGefi4yTRxzLSFpASI9dH+BMs8eC7DA5JrwbRlQsL8SeY41pxclyz yH/hFxsUen2oUMkoFQ6Ydm04VP0YDOplQ62HSIjtTYcE2eUqPKtxkXlZpIy80HD/ 9QI/R4bJNOR6LqtZSXOK3ySUkSiTCwxtrJh4bGIgxYaVxwXwuIoc2HTFVf3FkypD oT240npC+/xOUAFjs8a0b6AoAs6GEjePUvhX6J+cfdGIRylfro0/sEGfs4yt9dBi juKMje0h5VMtLHRUutBcEv2daDXd97htkYL2Qh/MaUIftJ5vCKtb+4/VjfZSainf +S5aLWfGgHxXc0+AscJbk45WOEBVEakL6IvuTScO2/wvxhwH+Ag9RHs6DeViGl27 qU4i8MliF3zAeNt+ErDwLhMxslkbqekYUSVEgoAm7RQkqoW+VkAjSxVA0sBzhtVQ 6PRF83WPgfLpUqbvuE8fA/qCCnGv8rpo66Ljd67BRZplUme5RVIMvsbvy9e9mBU4 85Ujz3p8ouVAFRABHaYr/8aSKsdtF+lUQYdrthb5TMHbq2eW76xTWCZCRdjgOpsC kA/6I+h1rThA1VGlbyWUwYZSUSLrLWktCx/EZijI7IreVdpiLtWp3gd/YpKQbzq2 ylZe/DoQMCND0wwT9sCE =caV/ -----END PGP SIGNATURE----- Merge tag 'fixes-for-v3.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus usb: fixes for v3.7-rc4 We're reverting MUSB Mode 1 DMA patch which caused many regressions. Meanwhile Roger is cooking a better version of that patch, which will hopefully be ready for v3.8 merge window. We also fix an undeclared error in ux5000_remove() and another build error when we try to build USB_MUSB_OMAP2PLUS as a module.
This commit is contained in:
Коммит
169b245a72
|
@ -707,11 +707,12 @@ static void rxstate(struct musb *musb, struct musb_request *req)
|
|||
fifo_count = musb_readw(epio, MUSB_RXCOUNT);
|
||||
|
||||
/*
|
||||
* use mode 1 only if we expect data of at least ep packet_sz
|
||||
* and have not yet received a short packet
|
||||
* Enable Mode 1 on RX transfers only when short_not_ok flag
|
||||
* is set. Currently short_not_ok flag is set only from
|
||||
* file_storage and f_mass_storage drivers
|
||||
*/
|
||||
if ((request->length - request->actual >= musb_ep->packet_sz) &&
|
||||
(fifo_count >= musb_ep->packet_sz))
|
||||
|
||||
if (request->short_not_ok && fifo_count == musb_ep->packet_sz)
|
||||
use_mode_1 = 1;
|
||||
else
|
||||
use_mode_1 = 0;
|
||||
|
@ -727,6 +728,27 @@ static void rxstate(struct musb *musb, struct musb_request *req)
|
|||
c = musb->dma_controller;
|
||||
channel = musb_ep->dma;
|
||||
|
||||
/* We use DMA Req mode 0 in rx_csr, and DMA controller operates in
|
||||
* mode 0 only. So we do not get endpoint interrupts due to DMA
|
||||
* completion. We only get interrupts from DMA controller.
|
||||
*
|
||||
* We could operate in DMA mode 1 if we knew the size of the tranfer
|
||||
* in advance. For mass storage class, request->length = what the host
|
||||
* sends, so that'd work. But for pretty much everything else,
|
||||
* request->length is routinely more than what the host sends. For
|
||||
* most these gadgets, end of is signified either by a short packet,
|
||||
* or filling the last byte of the buffer. (Sending extra data in
|
||||
* that last pckate should trigger an overflow fault.) But in mode 1,
|
||||
* we don't get DMA completion interrupt for short packets.
|
||||
*
|
||||
* Theoretically, we could enable DMAReq irq (MUSB_RXCSR_DMAMODE = 1),
|
||||
* to get endpoint interrupt on every DMA req, but that didn't seem
|
||||
* to work reliably.
|
||||
*
|
||||
* REVISIT an updated g_file_storage can set req->short_not_ok, which
|
||||
* then becomes usable as a runtime "use mode 1" hint...
|
||||
*/
|
||||
|
||||
/* Experimental: Mode1 works with mass storage use cases */
|
||||
if (use_mode_1) {
|
||||
csr |= MUSB_RXCSR_AUTOCLEAR;
|
||||
|
|
|
@ -65,7 +65,7 @@ static int __devinit ux500_probe(struct platform_device *pdev)
|
|||
struct platform_device *musb;
|
||||
struct ux500_glue *glue;
|
||||
struct clk *clk;
|
||||
|
||||
int musbid;
|
||||
int ret = -ENOMEM;
|
||||
|
||||
glue = kzalloc(sizeof(*glue), GFP_KERNEL);
|
||||
|
|
|
@ -58,7 +58,7 @@ config USB_ULPI_VIEWPORT
|
|||
|
||||
config TWL4030_USB
|
||||
tristate "TWL4030 USB Transceiver Driver"
|
||||
depends on TWL4030_CORE && REGULATOR_TWL4030
|
||||
depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS
|
||||
select USB_OTG_UTILS
|
||||
help
|
||||
Enable this to support the USB OTG transceiver on TWL4030
|
||||
|
@ -68,7 +68,7 @@ config TWL4030_USB
|
|||
|
||||
config TWL6030_USB
|
||||
tristate "TWL6030 USB Transceiver Driver"
|
||||
depends on TWL4030_CORE && OMAP_USB2
|
||||
depends on TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS
|
||||
select USB_OTG_UTILS
|
||||
help
|
||||
Enable this to support the USB OTG transceiver on TWL6030
|
||||
|
|
Загрузка…
Ссылка в новой задаче