Re: xHCI host controller failure during DMA transfers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/29/2011 11:27 PM, Bora Sahin wrote:
> Hi all,
> 
> We have some problems regarding the use of Freesco Logic FL1009 xhci
> controller in our embedded board.
> 
> xHCI is connected to the system through PCIe. Our kernel is
> linux-2.6.30 so did not have xHCI support. Fresco Logic provided
> patches (in the form of file replacements). We applied those patches
> and put it into the test. We are using a USB stick (filesystem is
> vfat) for this purpose. We can mount the disk without any problem, ls
> seems working, however, when we try to read files (60, 70KB) (by using
> cat) and/or creating dummy files on it, it crashes. We opened DEBUG
> feature and caught some log while this is happening.
> 

I don't know what patches Fresco provided to you, so it's hard to tell
the differences from current kernel and debug. Can you try the latest
stable kernel?


> 
> -----------
> I suppose the above is okay, and it continues for a while.
> -----------
> 

...

> 
> -----------
> I think all of the above log is okay.
> 
> Then things start going bad. Look at the below output:
> -----------
> 
> xhci_hcd 0000:00:00.0: Ring deq = 0x313d460 (DMA)
> xhci_hcd 0000:00:00.0: Event ring deq = 0x313c570 (DMA)
> xhci_hcd 0000:00:00.0: Giveback URB 834087c0, len = 31, status = 0
> xhci_hcd 0000:00:00.0: xhci_handle_event - returned from handle_tx_event
> xhci_hcd 0000:00:00.0: In xhci_handle_event
> xhci_hcd 0000:00:00.0: `MEM_WRITE_DWORD(3'b000, 64'h79002038,
> 64'h313c578, 4'hf);
> xhci_hcd 0000:00:00.0: count sg list trbs:
> xhci_hcd 0000:00:00.0: sg #0: dma = 0x13b4000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #1: dma = 0x1384000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #2: dma = 0x1388000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #3: dma = 0x138c000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #4: dma = 0x1390000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #5: dma = 0x1394000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #6: dma = 0x1398000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #7: dma = 0x139c000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #8: dma = 0x600000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #9: dma = 0x604000, len = 0x2000 (8192), num_trbs = 1
> xhci_hcd 0000:00:00.0: sg #10: dma = 0x608000, len = 0xa000 (40960),
> num_trbs = 2
> xhci_hcd 0000:00:00.0:
> usb 1-1: ep 0x2 - urb len = 122880, sglist used, num_trbs = 12
> xhci_hcd 0000:00:00.0: Endpoint state = 0x1
> xhci_hcd 0000:00:00.0: First length to xfer from 1st sglist entry = 8192
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x13b4000, len = 0x2000 (8192),
> 64KB boundary at 0x13c0000, end dma = 0x13b6000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d470 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x1384000, len = 0x2000 (8192),
> 64KB boundary at 0x1390000, end dma = 0x1386000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d480 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x1388000, len = 0x2000 (8192),
> 64KB boundary at 0x1390000, end dma = 0x138a000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d490 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x138c000, len = 0x2000 (8192),
> 64KB boundary at 0x1390000, end dma = 0x138e000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d4a0 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x1390000, len = 0x2000 (8192),
> 64KB boundary at 0x13a0000, end dma = 0x1392000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d4b0 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x1394000, len = 0x2000 (8192),
> 64KB boundary at 0x13a0000, end dma = 0x1396000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d4c0 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x1398000, len = 0x2000 (8192),
> 64KB boundary at 0x13a0000, end dma = 0x139a000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d4d0 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x139c000, len = 0x2000 (8192),
> 64KB boundary at 0x13a0000, end dma = 0x139e000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d4e0 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x600000, len = 0x2000 (8192),
> 64KB boundary at 0x610000, end dma = 0x602000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d4f0 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x604000, len = 0x2000 (8192),
> 64KB boundary at 0x610000, end dma = 0x606000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d500 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x608000, len = 0x8000 (32768),
> 64KB boundary at 0x610000, end dma = 0x610000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d510 (DMA)
> xhci_hcd 0000:00:00.0: sg entry: dma = 0x610000, len = 0x2000 (8192),
> 64KB boundary at 0x620000, end dma = 0x612000
> xhci_hcd 0000:00:00.0: Ring enq = 0x313d520 (DMA)
> xhci_hcd 0000:00:00.0: `MEM_WRITE_DWORD(3'b000, 32'h79003004, 32'h4, 4'hf);
> xhci_hcd 0000:00:00.0: Cancel URB 834086c0
> 

Here xhci_urb_dequeue() is called, means usb core wants to unlink or
kill a URB. Seems the driver does not handle that correctly. To dequeue
a URB, xHCI driver needs to do many things, including adding the
unfinished TDs to a list, issue a stop endpoint command, giveback the
URB when the command is executed successfully, and ring the doorbell to
continue transfer or issue a set TRDP command if necessary. It's a
complex process. Perhaps you can ask Fresco to check that part.

Thanks,
Andiry


> After that it prints event_ring, command_ring, endpoint_ring etc. You
> can find the details in the log file.
> 
> Could you please comment on that?
> 
> Regards,
> 
> PS: I am not subscribed to the list. Please cc to me.
> 
> --
> Bora Sahin
> --
> 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
> 
> 


--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux