Re: xhci DWC3 flavor problem

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

 



Hi Felipe!

On 5/19/2016 10:57 AM, Felipe Balbi wrote:
> 
> Hi João,
> 
> Adding Mathias, who's xHCI's maintainer
> 
> Joao Pinto <Joao.Pinto@xxxxxxxxxxxx> writes:
>> Hi Felipe,
>>
>> I am trying to bring up a DWC USB 3.0 Host with linux (v4.6-rc5)
>> running in a ARM64 development board.
> 
> Just to be clear, is this Juno with dwc3 in FPGA or do you have dwc3 in ASIC?

yes, this is Juno r1.

> 
>> I have implemented the following suggested fix to overcome the DMA
>> problem I was having:
>>
>> https://lkml.org/lkml/2016/3/31/609
>>
>> I received one interrupt but I am getting cyclic crashes like this:
> 
> if they happen all the time, it probably means your command ring is
> completely messed up and no command ever completes. Can you share a more
> complete snippet of logs?
> 
>> [<ffffff8008086c60>] __switch_to+0xc8/0xd4
>> [<ffffff80086386d4>] __schedule+0x18c/0x5c8
>> [<ffffff8008638b48>] schedule+0x38/0x98
>> [<ffffff800863b67c>] schedule_timeout+0x160/0x1ac
>> [<ffffff8008639674>] wait_for_common+0xac/0x150
>> [<ffffff800863972c>] wait_for_completion+0x14/0x1c
>> [<ffffff80084898f4>] xhci_alloc_dev+0xf4/0x2a0
>> [<ffffff800844ffd0>] usb_alloc_dev+0x68/0x2cc
>> [<ffffff8008456994>] hub_event+0x784/0x11f4
>> [<ffffff80080ce444>] process_one_work+0x130/0x2f4
>> [<ffffff80080ce65c>] worker_thread+0x54/0x434
>> [<ffffff80080d40fc>] kthread+0xd4/0xe8
>> [<ffffff8008085e10>] ret_from_fork+0x10/0x40
>>
>> Any thoughts about what might be happening?
> 
> pasting xhci_alloc_dev here:
> 
>> int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
>> {
>> 	struct xhci_hcd *xhci = hcd_to_xhci(hcd);
>> 	unsigned long flags;
>> 	int ret, slot_id;
>> 	struct xhci_command *command;
>>
>> 	command = xhci_alloc_command(xhci, false, false, GFP_KERNEL);
>> 	if (!command)
>> 		return 0;
> 
> we allocate a command fine
> 
>> 	/* xhci->slot_id and xhci->addr_dev are not thread-safe */
>> 	mutex_lock(&xhci->mutex);
>> 	spin_lock_irqsave(&xhci->lock, flags);
>> 	command->completion = &xhci->addr_dev;
>> 	ret = xhci_queue_slot_control(xhci, command, TRB_ENABLE_SLOT, 0);
> 
> queue it to the command ring
> 
>> 	if (ret) {
>> 		spin_unlock_irqrestore(&xhci->lock, flags);
>> 		mutex_unlock(&xhci->mutex);
>> 		xhci_dbg(xhci, "FIXME: allocate a command ring segment\n");
>> 		kfree(command);
>> 		return 0;
>> 	}
>> 	xhci_ring_cmd_db(xhci);
>> 	spin_unlock_irqrestore(&xhci->lock, flags);
>>
>> 	wait_for_completion(command->completion);
> 
> but the command never completes. I wonder if your command doorbell
> completed before wait_for_completion() was called, or if it didn't
> complete at all.

Ok I am going to activate dynamic debug for xhci and send you complete log.
> 
> Can you enable XHCI debugging logs and try again? (Mathias, what was the
> easy trick to enable all XHCI debugging logs?)
> 

Thanks!

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