> From: Sebastian Andrzej Siewior [mailto:bigeasy@xxxxxxxxxxxxx] > Sent: Monday, October 17, 2011 3:42 AM > > >>> It seems this patch is not complete. You are also using bitfields for the > >>> TRBs and events. Any plans to fix those? > > OTOH, Sebastian had already taken care of endianness by using that > > struct dwc3_trb and struct dwc3_trb_hw trick. Let's wait for his > > comment. > > > > Sebastian ? > > There should be no issues with this. The bit fields which are used as > parameters to commands are written handled with readl()/writel() which > should do the swap before writing to the hardware. For TRBs we have > dwc3_trb_to_hw() and dwc3_trb_to_nat(). > The only affected piece is probably only the event interrupt handling: > we read the content via memcpy() instead of doing the swapping here. > Right now we assume that every event is 4 bytes in size so a > le32_to_cpu() should fix this. Later we should think what to do with > the >4 bytes events :) Hi Sebastian, But wouldn't it be simpler and more efficient to just get rid of the bitfields and use the normal shift and mask method to do the TRBs and events? For e.g. high-bandwidth Isoc transfers, the driver needs to process a _lot_ of TRBs to keep up with the USB 3.0 bandwidth. We should avoid any unnecessary processing overhead in hot paths such as that. -- Paul ��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥