<tmarri@...> writes: > > From: Tirumala Marri <tmarri-qTEPVZfXA3Y <at> public.gmane.org> > > Implements the DWC OTG PCD Interrupt Service routine. > > Signed-off-by: Tirumala R Marri <tmarri-qTEPVZfXA3Y <at> public.gmane.org> > Signed-off-by: Fushen Chen <fchen-qTEPVZfXA3Y <at> public.gmane.org> > Signed-off-by: Mark Miesfeld <mmiesfeld-qTEPVZfXA3Y <at> public.gmane.org> > --- > drivers/usb/dwc/pcd_intr.c | 2311 ++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 2311 insertions(+), 0 deletions(-) > create mode 100644 drivers/usb/dwc/pcd_intr.c > > diff --git a/drivers/usb/dwc/pcd_intr.c b/drivers/usb/dwc/pcd_intr.c > new file mode 100644 > index 0000000..bc1a9b3 > --- /dev/null > +++ b/drivers/usb/dwc/pcd_intr.c ... > + /* Get the epnum from the IN Token Learning Queue. */ > + epnum = get_ep_of_last_in_token(core_if); > + ep = get_in_ep(pcd, epnum); > + As per specs, IN token learning queue is valid only in non-periodic Shared FIFO. For dedicated fifo case, there should be another way to get the endpoint. > + txstatus = dwc_read32(global_regs + DWC_GNPTXSTS); > + ... > + /* Clear nptxfempty interrupt */ > + gintsts |= DWC_INTMSK_RXFIFO_NOT_EMPT; Are you trying to clear RXFIFO_NOT_EMPT or nptxfempty . > + dwc_write32(global_regs + DWC_GINTSTS, gintsts); > + > + /* Re-enable tx-fifo empty interrupt, if packets are stil pending */ > + if (len) > + dwc_modify32(global_regs + DWC_GINTSTS, 0, gintsts); > + return 1; > +} > + ... I have used these RFCs for our product and tried to test it with zero gadget. I am using testusb application. Test case with bulk out passes , however test with bulk in does not pass. In case of bulk IN, I observed that DWC sends arbitray number of bytes (like, 3, 4 etc). If I watch device register using a debugger, then I can see that data for complete packet(ie 512 bytes)were written in FIFO. Have somebody tested this driver. If yes, then what have been tested till now? Regards Pratyush -- 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