double_buffer_not_ok compile error
Subsystems (2)
Hi Felipe,
In commit 0662481855c389b75a0a54c32870cc90563d80a9, the member 'double_buffer_not_ok' was added to 'struct musb', but only inside #ifdef CONFIG_USB_GADGET_MUSB_HDRC. In musb_host.c, this member is used outside of the same #ifdef, so I get a compile error because I have CONFIG_USB_GADGET_MUSB_HDRC=n (because I have CONFIG_USB_GADGET_OMAP=y).
here is the error:drivers/usb/musb/musb_host.c: In function 'musb_rx_reinit':drivers/usb/musb/musb_host.c:612: error: 'struct musb' has no member named 'double_buffer_not_ok'
I'm not familiar enough with this to propose a correct patch, but for example with the patch below, I can compile the kernel. Maybe the member definition can just be taken out of the #ifdef.
Can you propose a proper fix for this?
thanks,
Michael Jones
drivers/usb/musb/musb_host.c +4 -0
@@ -609,9 +609,11 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep)/* Set RXMAXP with the FIFO size of the endpoint * to disable double buffer mode. */ +#ifdef CONFIG_USB_GADGET_MUSB_HDRC if (musb->double_buffer_not_ok)musb_writew (ep->regs,MUSB_RXMAXP , ep->max_packet_sz_rx); else +#endif musb_writew (ep->regs,MUSB_RXMAXP , qh->maxpacket | ((qh->hb_mult -1 ) <<11 ));
@@ -784,10 +786,12 @@ static void musb_ep_program(struct musb *musb, u8 epnum,/* protocol/endpoint/interval/NAKlimit */ if (epnum) {musb_writeb (epio,MUSB_TXTYPE , qh->type_reg); +#ifdef CONFIG_USB_GADGET_MUSB_HDRC if (musb->double_buffer_not_ok)musb_writew (epio,MUSB_TXMAXP , hw_ep->max_packet_sz_tx); else +#endif musb_writew (epio,MUSB_TXMAXP , qh->maxpacket | ((qh->hb_mult -1 ) <<11 ));
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
Hi,
Quoted 11 lines · Michael Jones
In commit
0662481855c389b75a0a54c32870cc90563d80a9, the member 'double_buffer_not_ok' was added to 'struct musb', but only inside #ifdefCONFIG_USB_GADGET_MUSB_HDRC. Inmusb_host.c, this member is used outside of the same #ifdef, so I get a compile error because I haveCONFIG_USB_GADGET_MUSB_HDRC=n(because I haveCONFIG_USB_GADGET_OMAP=y).here is the error:
drivers/usb/musb/musb_host.c: In function 'musb_rx_reinit':drivers/usb/musb/musb_host.c:612: error: 'struct musb' has no member named 'double_buffer_not_ok'
Quoted 5 lines
I'm not familiar enough with this to propose a correct patch, but for example with the patch below, I can compile the kernel. Maybe the member definition can just be taken out of the #ifdef.
Can you propose a proper fix for this?
There's already a fix for that queued on Greg's queue ;-)
Thanks though
Here it is:
commit 5990378b393429244559f4750f2ee3a50929b932
Author: Felipe Balbi <[email protected]> Date: Fri Feb 11 10:00:02 2011 +0200
usb: musb: fix build breakage
commit 0662481855c389b75a0a54c32870cc90563d80a9 (usb: musb: disable double buffering when it's broken), introduced a compile error when gadget API is disabled.
Fix it.
drivers/usb/musb/musb_core.h +9 -8
@@ -488,6 +488,15 @@ struct musb { unsigned set_address:1; unsigned test_mode:1; unsigned softconnect:1; + +u8 address; +u8 test_mode_nr; +u16 ackpend;/* ep0 */ +enum musb_g_ep0_state ep0_state; +struct usb_gadget g;/* the gadget */ +struct usb_gadget_driver *gadget_driver;/* its driver */ +#endif +/* * FIXME: Remove this flag. *
@@ -501,14 +510,6 @@ struct musb {*/ unsigned double_buffer_not_ok:1 __deprecated; -u8 address; -u8 test_mode_nr; -u16 ackpend;/* ep0 */ -enum musb_g_ep0_state ep0_state; -struct usb_gadget g;/* the gadget */ -struct usb_gadget_driver *gadget_driver;/* its driver */ -#endif -struct musb_hdrc_config *config;#ifdef MUSB_CONFIG_PROC_FS
Signature · 1 line
balbi
Hi Felipe,
Sorry, thanks. I tried to avoid getting that reply by searching the mailing list to see whether this was already discovered. I searched for "double_buffer_not_ok" and "musb_host" on the mailing list but didn't see anything newer than the original patch.
Where is the correct place to search for such a recent fix? Where is Greg's queue?
-Michael
Quoted 66 lines · Felipe Balbi
Hi,
Quoted 11 lines · Michael Jones
In commit
0662481855c389b75a0a54c32870cc90563d80a9, the member 'double_buffer_not_ok' was added to 'struct musb', but only inside #ifdefCONFIG_USB_GADGET_MUSB_HDRC. Inmusb_host.c, this member is used outside of the same #ifdef, so I get a compile error because I haveCONFIG_USB_GADGET_MUSB_HDRC=n(because I haveCONFIG_USB_GADGET_OMAP=y).here is the error:
drivers/usb/musb/musb_host.c: In function 'musb_rx_reinit':drivers/usb/musb/musb_host.c:612: error: 'struct musb' has no member named 'double_buffer_not_ok'Quoted 5 lines
I'm not familiar enough with this to propose a correct patch, but for example with the patch below, I can compile the kernel. Maybe the member definition can just be taken out of the #ifdef.
Can you propose a proper fix for this?
There's already a fix for that queued on Greg's queue ;-)
Thanks though
Here it is:
commit
5990378b393429244559f4750f2ee3a50929b932Author: Felipe Balbi <[email protected]> Date: Fri Feb 11 10:00:02 2011 +0200usb: musb: fix build breakage
commit
0662481855c389b75a0a54c32870cc90563d80a9(usb: musb: disable double buffering when it's broken), introduced a compile error when gadget API is disabled.Fix it.
Signed-off-by Felipe Balbi <[email protected]>drivers/usb/musb/musb_core.h +9
-1@@ -488,6 +488,15 @@ struct musb { unsigned set_address:1; unsigned test_mode:1; unsigned softconnect:1; + +u8 address; +u8 test_mode_nr; +u16 ackpend;/* ep0 */ +enum musb_g_ep0_state ep0_state; +struct usb_gadget g;/* the gadget */ +struct usb_gadget_driver *gadget_driver;/* its driver */ +#endif +/* * FIXME: Remove this flag. * @@ -501,14 +510,6 @@ struct musb {*/ unsigned double_buffer_not_ok:1 __deprecated; -u8 address;
drivers/usb/musb/musb_core.h struct musb { · line 515
Quoted 10 lines
drivers/usb/musb/musb_core.h +0
-7-u8 test_mode_nr; -u16 ackpend;/* ep0 */ -enum musb_g_ep0_state ep0_state; -struct usb_gadget g;/* the gadget */ -struct usb_gadget_driver *gadget_driver;/* its driver */ -#endif -struct musb_hdrc_config *config;#ifdef MUSB_CONFIG_PROC_FS
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
Quoted 9 lines · Michael Jones
Hi Felipe,
Sorry, thanks. I tried to avoid getting that reply by searching the mailing list to see whether this was already discovered. I searched for "
double_buffer_not_ok" and "musb_host" on the mailing list but didn't see anything newer than the original patch.Where is the correct place to search for such a recent fix? Where is Greg's queue?
Yes, Greg's usb-linux or my gitorious musb branch.
Signature · 1 line
balbi
Quoted 8 lines · Felipe Balbi
Quoted 7 lines · Michael Jones
Hi Felipe,
Sorry, thanks. I tried to avoid getting that reply by searching the mailing list to see whether this was already discovered. I searched for "
double_buffer_not_ok" and "musb_host" on the mailing list but didn't see anything newer than the original patch.
Quoted 11 lines
Quoted 2 lines
Where is the correct place to search for such a recent fix? Where is Greg's queue?
Yes, Greg's usb-linux or my gitorious musb branch.
Signature · 5 lines
balbi -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, thanks for that. Ran into the same problem whilst trying the linux-linaro-2.6.38 tree. I hope your patch will make it to this tree soon
Regards,
Signature · 1 line
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2