Hi, Sergei, You are correct. I had only thought to submit the least number of changes to eliminate the problem. A better fix is to make the leading part of the names EP_MODE_AUTOREQ consistent for the [mode] parameter to cppi41_set_autoreq_mode( struct cppi41_dma_channel *cppi41_channel, unsigned mode ), as follows: --- --- linux-3.18.29/drivers/usb/musb/musb_cppi41.c 2016-03-18 02:09:52.000000000 +0800 +++ linux-3.18.1/drivers/usb/musb/musb_cppi41.c 2016-03-30 19:58:31.486965871 +0800 @@ -9,9 +9,9 @@ #define RNDIS_REG(x) (0x80 + ((x - 1) * 4)) -#define EP_MODE_AUTOREG_NONE 0 -#define EP_MODE_AUTOREG_ALL_NEOP 1 -#define EP_MODE_AUTOREG_ALWAYS 3 +#define EP_MODE_AUTOREQ_NONE 0 +#define EP_MODE_AUTOREQ_ALL_NEOP 1 +#define EP_MODE_AUTOREQ_ALWAYS 3 #define EP_MODE_DMA_TRANSPARENT 0 #define EP_MODE_DMA_RNDIS 1 @@ -396,19 +396,19 @@ static bool cppi41_configure_channel(str /* auto req */ cppi41_set_autoreq_mode(cppi41_channel, - EP_MODE_AUTOREG_ALL_NEOP); + EP_MODE_AUTOREQ_ALL_NEOP); } else { musb_writel(musb->ctrl_base, RNDIS_REG(cppi41_channel->port_num), 0); cppi41_set_dma_mode(cppi41_channel, EP_MODE_DMA_TRANSPARENT); cppi41_set_autoreq_mode(cppi41_channel, - EP_MODE_AUTOREG_NONE); + EP_MODE_AUTOREQ_NONE); } } else { /* fallback mode */ cppi41_set_dma_mode(cppi41_channel, EP_MODE_DMA_TRANSPARENT); - cppi41_set_autoreq_mode(cppi41_channel, EP_MODE_AUTOREG_NONE); + cppi41_set_autoreq_mode(cppi41_channel, EP_MODE_AUTOREQ_NONE); len = min_t(u32, packet_sz, len); } cppi41_channel->prog_len = len; --- > On 30 Mar 2016, at 19:29, Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx> wrote: > > Hello. > > On 3/30/2016 1:56 AM, Antonio Victor Hilario wrote: > >> I'd been using kernel 3.18.10-29 on a set of Beaglebone Black boards, and had found and corrected this on my local build tree. >> >> Kernel build fails when the source file drivers/usb/musb/musb_cppi41.c is built, with these kernel options enabled: >> >> CONFIG_USB_MUSB_HDRC=y >> CONFIG_USB_TI_CPPI41_DMA=y >> >> The build fails with these errors, due to a misspelled constant name EP_MODE_AUTOREQ_NONE: >> >> drivers/usb/musb/musb_cppi41.c: In function 'cppi41_dma_channel_abort': >> drivers/usb/musb/musb_cppi41.c:544:43: error: 'EP_MODE_AUTOREQ_NONE' undeclared (first use in this function) >> cppi41_set_autoreq_mode(cppi41_channel, EP_MODE_AUTOREQ_NONE); >> ^ >> drivers/usb/musb/musb_cppi41.c:544:43: note: each undeclared identifier is reported only once for each function it appears in >> scripts/Makefile.build:257: recipe for target 'drivers/usb/musb/musb_cppi41.o' failed >> make[3]: *** [drivers/usb/musb/musb_cppi41.o] Error 1 >> scripts/Makefile.build:402: recipe for target 'drivers/usb/musb' failed >> make[2]: *** [drivers/usb/musb] Error 2 >> scripts/Makefile.build:402: recipe for target 'drivers/usb' failed >> make[1]: *** [drivers/usb] Error 2 >> Makefile:937: recipe for target 'drivers' failed >> >> Signed-off-by: Antonio VA Hilario <avahilario@xxxxxxxxx> >> --- >> >> --- drivers/usb/musb/musb_cppi41.c 2016-03-18 02:09:52.000000000 +0800 >> +++ ../../linux-3.18.29/drivers/usb/musb/musb_cppi41.c 2016-02-08 13:30:43.334822382 +0800 >> @@ -541,7 +541,7 @@ static int cppi41_dma_channel_abort(stru >> csr &= ~MUSB_TXCSR_DMAENAB; >> musb_writew(epio, MUSB_TXCSR, csr); >> } else { >> - cppi41_set_autoreq_mode(cppi41_channel, EP_MODE_AUTOREQ_NONE); >> + cppi41_set_autoreq_mode(cppi41_channel, EP_MODE_AUTOREG_NONE); > > That simply doesn't make sense. Need to rename the #define, the typo is there. > > MBR, Sergei -- 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