Re: hard lockup with USB3380

2015-01-19 Thread Ricardo Ribalda Delgado
Hello Paul Check an old topic on the list "net2280: tracing", where Jorge Ramirez-Ortiz and Felipe Balbi are working on tracing the chip Regards! On Sun, Jan 18, 2015 at 4:49 PM, Paul Jones wrote: > Ricardo, > > I think I figured out the problem: my 3380 was running in legacy adapter mode. > I

Re: hard lockup with USB3380

2015-01-18 Thread Paul Jones
Ricardo, I think I figured out the problem: my 3380 was running in legacy adapter mode. I am now capable of connecting both g_mass_storage and g_ether without any kernel panics after ensuring the 3380 is in enhanced adapter mode. My only concern is the speed from my Mac to Linux: - g_ether: scp

Re: hard lockup with USB3380

2014-11-25 Thread Paul Jones
Ricardo, Unfortunately your latest change gives similar results, cycling errors in the log: [ 201.287706] [ cut here ] [ 201.288328] WARNING: CPU: 3 PID: 1500 at drivers/usb/gadget/udc/net2280.c:816 start_dma+0x153/0x160 [net2280]() [ 201.288991] Modules linked in: g_m

Re: hard lockup with USB3380

2014-11-25 Thread Ricardo Ribalda Delgado
One last try :) Instead of: if (likely(t & BIT(FIFO_EMPTY))) { have this: if ( t & BIT(NAK_OUT_PACKETS)){ count = readl(&ep->dma->dmacount); count &= DMA_BYTE_COUNT_MASK; break; } if (likely(t & BIT(FIFO_EMPTY))) { On Tue, Nov 25, 2014 at 3:54 PM, Paul Jones wrote: > R

Re: hard lockup with USB3380

2014-11-25 Thread Paul Jones
Ricardo, it no longer locks up but if I try to write to the drive, I get cycles of: [ 2334.127653] [ cut here ] [ 2334.128318] WARNING: CPU: 0 PID: 2140 at drivers/usb/gadget/udc/net2280.c:816 start_dma+0x153/0x160 [net2280]() [ 2334.129105] Modules linked in: g_mass_stora

Re: hard lockup with USB3380

2014-11-25 Thread Ricardo Ribalda Delgado
Could you try if (likely(t & (BIT(FIFO_EMPTY) | BIT(NAK_OUT_PACKETS{ instead of if (likely(t & BIT(FIFO_EMPTY))) And tell if it works better On Tue, Nov 25, 2014 at 2:58 PM, Paul Jones wrote: > dmactl=37158946, dmastat=50331648, dmacount=805306368, dmadesc=778727536, > epstat=16528, td_d

Re: hard lockup with USB3380

2014-11-25 Thread Paul Jones
dmactl=37158946, dmastat=50331648, dmacount=805306368, dmadesc=778727536, epstat=16528, td_dma=ce40c050 Paul. On 25 Nov 2014, at 14:08, Ricardo Ribalda Delgado wrote: > hmm it seems that the code is waiting for a dma to complete. Please print > > ep->dma->dmactl > ep->dma->dmastat > ep->dma-

Re: hard lockup with USB3380

2014-11-25 Thread Ricardo Ribalda Delgado
hmm it seems that the code is waiting for a dma to complete. Please print ep->dma->dmactl ep->dma->dmastat ep->dma->dmacount ep->dma->dmadesc req->td_dma ep->regs->ep_stat Thanks On Tue, Nov 25, 2014 at 1:58 PM, Paul Jones wrote: > Ricardo, > > count = 0, req->valid = 1, le32_to_cpu(req->td-

Re: hard lockup with USB3380

2014-11-25 Thread Paul Jones
Ricardo, count = 0, req->valid = 1, le32_to_cpu(req->td->dmacount) = 2952791040 Paul. On 25 Nov 2014, at 13:09, Ricardo Ribalda Delgado wrote: > Could you print > > count, req->valid and le32_to_cpu(req->td->dmacount) just before udelay(1) > > Thanks! > > On Tue, Nov 25, 2014 at 12:05 P

Re: hard lockup with USB3380

2014-11-25 Thread Ricardo Ribalda Delgado
Could you print count, req->valid and le32_to_cpu(req->td->dmacount) just before udelay(1) Thanks! On Tue, Nov 25, 2014 at 12:05 PM, Paul Jones wrote: > Ricardo, > > I added a ep_warn before and after the loop and right after connecting my Mac > it passes through that loop many times. > Even w

Re: hard lockup with USB3380

2014-11-25 Thread Paul Jones
Ricardo, I added a ep_warn before and after the loop and right after connecting my Mac it passes through that loop many times. Even without writing to the device I then get the lockup message while inside the loop (ep->dev = ep-b). Paul. On 25 Nov 2014, at 02:06, Ricardo Ribalda Delgado wrot

Re: hard lockup with USB3380

2014-11-24 Thread Ricardo Ribalda Delgado
Hello Could you check if the code is stalled at this loop ? https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/gadget/udc/net2280.c#n2594 Regards! On Thu, Nov 13, 2014 at 3:37 PM, Paul Jones wrote: > Hi, > > using the latest kernel from > https://git.kernel.org/cg