On Fri, Jan 07, 2011 at 12:51:19AM +0300, Sergei Shtylyov wrote: > Hello. > > On 06-01-2011 18:17, Alan Stern wrote: > > >This patch (as1440) fixes a bug in ehci-hcd. ehci->periodic_size is > >used to compute the size in a dma_alloc_coherent() call, but then it > >gets changed later on. As a result, the corresponding call to > >dma_free_coherent() passes a different size from the original > >allocation. Fix the problem by adjusting ehci->periodic_size before > >carrying out any of the memory allocations. > > >Signed-off-by: Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> > >Tested-by: Larry Finger<Larry.Finger@xxxxxxxxxxxx> > >CC: David Brownell<david-b@xxxxxxxxxxx> > >CC:<stable@xxxxxxxxxx> > > [...] > > >Index: usb-2.6/drivers/usb/host/ehci-hcd.c > >=================================================================== > >--- usb-2.6.orig/drivers/usb/host/ehci-hcd.c > >+++ usb-2.6/drivers/usb/host/ehci-hcd.c > [...] > >@@ -571,11 +573,20 @@ static int ehci_init(struct usb_hcd *hcd > > ehci->periodic_size = DEFAULT_I_TDPS; > > INIT_LIST_HEAD(&ehci->cached_itd_list); > > INIT_LIST_HEAD(&ehci->cached_sitd_list); > >+ > >+ if (HCC_PGM_FRAMELISTLEN(hcc_params)) { > >+ /* periodic schedule size can be smaller than default */ > >+ switch (EHCI_TUNE_FLS) { > >+ case 0: ehci->periodic_size = 1024; break; > >+ case 1: ehci->periodic_size = 512; break; > >+ case 2: ehci->periodic_size = 256; break; > > I undertand that you're only moving the code but this should > cause checkpatch.pl to complain because it thinks that trailing > statements should be on the next line after the *case*... Then checkpatch is stupid. Seriously, not all patches _HAVE_ to pass that script, especially ones from developers that are trusted. Just stop the nit-picking, it really isn't helpful to anyone, and wastes everyone's time. thanks, greg k-h -- 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