[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87fxsksnrt.fsf@free.fr>
Date: 14 May 2008 21:12:38 +0200
From: Robert Jarzmik <rjarzmik@...e.fr>
To: Roel Kluin <roel.kluin@...il.com>
Cc: dbrownell@...rs.sourceforge.net, linux-usb@...r.kernel.org,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH ?] usb/gadget/pxa27x_udc: test ep0state == IN_DATA_STAGE rather than non-bool USB_DIR_IN
Roel Kluin <roel.kluin@...il.com> writes:
> drivers/usb/gadget/pxa27x_udc.c uses USB_DIR_IN as if boolean in functions
> inc_ep_stats_{reqs,bytes}, lines 763, 795, 933, 985, 1037 and 1074, but
> USB_DIR_IN is defined 0x80.
Yes, USB_DIR_IN could be considered as a boolean (0x80 => true, 0x0 =>
false). I'm pretty sure it's correct.
> handle_ep0_ctrl_req() tests USB_DIR_IN bitwise and pxa_udc's ep0_state is set
> IN_DATA_STAGE or OUT_DATA_STAGE. so ep->dev->ep0state == IN_DATA_STAGE should be
> tested rather than USB_DIR_IN
No, I don't agree. Have you checked the USB 2.0 spec, especially on control
endpoint handling and control requests ?
Sorry Roel, I can't ack this patch.
--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists