• K
    pciehp: fix slow probing · 5808639b
    Kenji Kaneshige 提交于
    Fix the "pciehp probing slow" problem reported from Jan C. Nordholz in
    http://bugzilla.kernel.org/show_bug.cgi?id=10751.
    
    The command completed bit in Slot Status register applies only to
    commands issued to control the attention indicator, power indicator,
    power controller, or electromechanical interlock. However, writes to
    other parts of the Slot Control register would end up writing to the
    control fields. Hence, any write to Slot Control register is
    considered as a command. However, if the controller doesn't support
    any of attention indicator, power indicator, power controller and
    electromechanical interlock, command completed bit would not set in
    writing to Slot Control register. In this case, we should not wait for
    command completed bit set, otherwise all commands would be considered
    not completed in timeout seconds (1 sec.).
    
    The cause of the problem is pciehp driver didn't take this situation
    into account. This patch changes pciehp to take it into account. This
    patch also add the check for "No Command Completed Support" bit in
    Slot Capability register. If it is set, we should not wait for command
    completed bit set as well.
    
    This problem seems to be revealed by the commit
    c27fb883 that fixed the bug that
    pciehp did not wait for command completed properly (pciehp just
    ignored the command completion event).
    Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
    Signed-off-by: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
    Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
    5808639b
pciehp_hpc.c 30.7 KB