Re: [PATCH 2/2] USB: musb: gadget: fix MUSB_TXMAXP and MUSB_RXMAXP configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 29, 2010 at 07:55:44AM -0500, tom.leiming@xxxxxxxxx wrote:
From: Ming Lei <tom.leiming@xxxxxxxxx>

Commit 9f445cb29918dc488b7a9a92ef018599cce33df7[USB: musb: disable
double buffering for older RTL versions] tries to disable double
buffer mode by writing endpoint hw max packet size to TXMAP/RXMAP.

First this way taken is very wrong, which can break full speed mode
and cause overflow problem, and we should always set this registers
by the actual max packet size from endpoint descriptor.

Secondly, I have fixed the double buffer mode problem already in the
previous patchset, and found the problem of 'infinite hangs or data
corruption' decribled in Commit 9f445cb29918dc488b7a9a92ef018599cce33df7
is caused by musb gadget driver, nothing to do with older RTL chip.
My beagle B5 uses RTL 1.4 musb IP core, but either g_file_storage/g_ether
/g_zero can work well in double buffer mode.

So, fix the problem by always using actual max packet size from endpoint
descriptor to config TXMAP/RXMAP.

Cc: Cliff Cai <cliff.cai@xxxxxxxxxx>
Cc: Felipe Balbi <balbi@xxxxxx>
Cc: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
Cc: Anand Gadiyar <gadiyar@xxxxxx>
Cc: Mike Frysinger <vapier@xxxxxxxxxx>
Cc: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxx
Signed-off-by: Ming Lei <tom.leiming@xxxxxxxxx>

resend together with previous one.

--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux