From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Martin Date: Wed, 24 Oct 2012 10:24:20 -0700 Subject: [U-Boot] [PATCH v2 1/3] USB: make usb_kbd obey USB DMA alignment requirements In-Reply-To: <201210240931.40351.marex@denx.de> References: <1350971254-11412-1-git-send-email-amartin@nvidia.com> <201210240003.34903.marex@denx.de> <20121024003950.GI13201@badger> <201210240931.40351.marex@denx.de> Message-ID: <20121024172420.GK13201@badger> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Oct 24, 2012 at 12:31:40AM -0700, Marek Vasut wrote: > Dear Allen Martin, > > > On Tue, Oct 23, 2012 at 03:03:34PM -0700, Marek Vasut wrote: > > > Dear Allen Martin, > > > > > > > On Tue, Oct 23, 2012 at 09:51:06AM -0700, Stephen Warren wrote: > > > > > On 10/22/2012 11:47 PM, Allen Martin wrote: > > > > > > Change usb_kbd driver to obey alignment requirements for USB DMA on > > > > > > the buffer used for data transfer. This is necessary for > > > > > > architectures that enable dcache and enable USB DMA. > > > > > > > > > > The series, > > > > > Tested-by: Stephen Warren > > > > > > > > > > BTW, I tested tegra-kbc too, and that does indeed currently work (at > > > > > least in my local dev branch based on u-boot/master). > > > > > > > > Yes, I also tried on a seaboard with internal keyboard and it works, > > > > although once the USB keyboard driver loads the internal keyboard > > > > stops working. I haven't tracked down why, but it seems like a bug I > > > > can live with for now as seaboards with internal keyboards are pretty > > > > rare these days, and how many keyboards do you need in u-boot anyway? > > > > > > Good thing you pointed it out. Please let's not ignore a bug. How come it > > > happens? What happens if you have two usb keyboards connected? > > > > I'm pretty sure the USB keyboard driver doesn't support multiple > > devices, I see this in drv_usb_kbd_init(): > > > > /* We found a keyboard, check if it is already > > registered. */ > > USB_KBD_PRINTF("USB KBD: found set up device.\n"); > > old_dev = stdio_get_by_name(DEVNAME); > > if (old_dev) { > > /* Already registered, just return ok. */ > > USB_KBD_PRINTF("USB KBD: is already > > registered.\n"); > > return 1; > > } > > > > The bug is almost certainly inside the tegra kbd driver, which is why > > I'm not terribly concerned about it. The only boards that use that > > driver are inside NVIDIA, and even those are rare. > [...] > > Good, now please fix the bug. I'm terribly unhappy seeing there is a bug that is > about to go unfixed. I didn't say the bug will go unfixed, I've opened an issue in our internal bug tracker so it doesn't go forgotten. It's just a matter of prioritization. It's just not important to fix a corner case bug in a driver that noone outside of NVIDIA can actually use when there are major functionality holes and regressions (like your change to serial_assign() that broke serial output on tegra). I only work on u-boot on the side, so I have to pick my battles carefully. -Allen -- nvpublic