On Fri, Feb 20, 2009 at 02:27:52PM -0800, David Brownell wrote: > On Friday 20 February 2009, Felipe Balbi wrote: > > On Fri, Feb 20, 2009 at 02:04:41PM -0800, David Brownell wrote: > > > Which means that unlike most low level USB drivers, it's got > > > folk from several teams working concurrently: one from Analog, > > > two or three from TI, one from MontaVista, a couple from Nokia. > > > > There was one guy from STmicro as well, I think his name is Giuseppe > > (hope I spelled it right), there's actually a patch from him fixing > > ep_config_from_hw(). That should probably be queued for -rc. > > ISTR that needed to be reissued against mainline; the patch I > saw was against some older code,a. (And didn't he have some other > bugfix too?) > > Yeah, you're right. More than just those folk. Some PPC chips > seem to be using the same silicon IP, but I don't recall seeing > patches from them. he did, here it is (updated as he made a patch -p0 version): >From 96da2c37a19e3a003ba0484af129e66c13d9b81f Mon Sep 17 00:00:00 2001 From: Giuseppe GORGOGLIONE <giuseppe.gorgoglione@xxxxxx> Date: Sat, 21 Feb 2009 00:35:43 +0200 Subject: [PATCH] usb: musb: fix crash due to uninitialized pointer Corrected musb_read_fifosize() and musb_configure_ep0() functions for the #ifndef BLACKFIN branch, Signed-off-by: Giuseppe GORGOGLIONE <giuseppe.gorgoglione@xxxxxx> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxx> --- drivers/usb/musb/musb_core.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 630946a..925c5c2 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -479,10 +479,11 @@ static inline void musb_configure_ep0(struct musb *musb) static inline int musb_read_fifosize(struct musb *musb, struct musb_hw_ep *hw_ep, u8 epnum) { + void *mbase = musb->mregs; u8 reg = 0; /* read from core using indexed model */ - reg = musb_readb(hw_ep->regs, 0x10 + MUSB_FIFOSIZE); + reg = musb_readb(mbase, MUSB_EP_OFFSET(epnum, MUSB_FIFOSIZE)); /* 0's returned when no more endpoints */ if (!reg) return -ENODEV; @@ -509,6 +510,7 @@ static inline void musb_configure_ep0(struct musb *musb) { musb->endpoints[0].max_packet_sz_tx = MUSB_EP0_FIFOSIZE; musb->endpoints[0].max_packet_sz_rx = MUSB_EP0_FIFOSIZE; + musb->endpoints[0].is_shared_fifo = true; } #endif /* CONFIG_BLACKFIN */ -- 1.6.1.3 -- 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