Re: [PATCH v4] pciehp: only wait command complete for real hotplug control

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

 



On Fri, May 30, 2014 at 3:50 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> On Fri, May 30, 2014 at 3:28 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
>> On Tue, May 20, 2014 at 1:53 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
>>> I don't understand this change.  Why do you test "slot_status &
>>> PCI_EXP_SLTSTA_CC" here?  Did you mean to write this:
>>>
>>>   if (!ctrl->no_cmd_complete && !(slot_status & PCI_EXP_SLTSTA_CC) && ...
>>>
>>> instead?  I think we want to wait if (1) the controller generates Command
>>> Complete events and (2) Slot Status indicates that a command is still in
>>> progress.
>>
>> Yes. your logic is right for those real hotplug event, that means
>> CC is not set, and isr is not called to clear cmd_busy.
>>
>> but it will wait for real or non-real cmd right after non-real hotplug cmd.
>>
>> looks like we need to start one timer for non-real hotplug to clear cmd_busy?
>
> That looks make it too complicated.
>
> I would revert back to first way
>    change to only wait when (EIC, PCC, PIC, AIC) bits get changed.
> and add one flag in ctrl to see if need to apply the rule.
>

Please check update one with method 1 at

http://patchwork.ozlabs.org/patch/354365/

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux