Re: confuse about qh_link_async

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

 



>>         The following code in qh_link_async:
>>
>>         if (!head->qh_next.qh) {
>>                 u32     cmd = ehci_readl(ehci, &ehci->regs->command);
>>
>>                 if (!(cmd & CMD_ASE)) {
>>                         /* in case a clear of CMD_ASE didn't take yet */
>>                         (void)handshake(ehci, &ehci->regs->status,
>>                                         STS_ASS, 0, 150);
>>                         cmd |= CMD_ASE | CMD_RUN;
>>                         ehci_writel(ehci, cmd, &ehci->regs->command);
>>                         ehci_to_hcd(ehci)->state = HC_STATE_RUNNING;
>>                         /* posted write need not be known to HC yet ... */
>>                 }
>>         }
>>         Why only the null queue head is checked? I think it is
>> possible that non-empty queue head link list also have asynchronous
>> list disabled
>
> No, it is not possible.
>
>>         (hc encounter queue head of which H=1 and scan_async havent's
>> unlink the queue head).
>
> Only one QH, ehci->async, ever has H set to 1.  It is never removed
> from the async schedule.

I means when hc encounter QH, ehci->async, has H set to 1. HC stop
traversing the qh list (HC disable CMD_ASE & CMD_RUN??). And ehci_work
havent't call at this time before ehci_urb_enqueue is comming(those
QHs which is completed haven't deleted by scan_async called by
ehci_work). At this time when ehci_urb_enqueue is execute, there are
some undeleted QHs existing in the QH link list pointed by
asynclistaddr register. Then qh_link_async want to add a new qh to
link list, doesn't it need to restart the CMD_ASE & CMD_RUN for
non-empty link list condition??

>
>>         If the non-empty queue head list condition is met, and
>> qh_link_async add new queue head directly without enable CMD_ASE &
>> CMD_RUN.
>>         The host controller will not go ahead to process the new queue
>> head?? or if it's possible that hc could enable CMD_ASE & CMD_RUN in
>> other place ??
>>         Could someone please tell me how this work ??
>
> The async schedule is turned off in only one place: when
> ehci_watchdog() calls start_unlink_async(ehci, ehci->async).  That
> happens only when the timer_action(ehci, TIMER_ASYNC_OFF) is called,
> and that happens only in end_unlink_async() when the async list is
> empty.

Does the condition that HC stop traversing the QH link list due to H=1
QH is met will result in CMD_ASE & CMD_RUN disabled ??
if doesn't, where is the point?? and how HC will be restarted after stopping??
Maybe my concept is wrong at this point.

Thanks for your kind reply.

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