]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: pciehp: Don't re-read Slot Status when queuing hotplug event
authorMayurkumar Patel <mayurkumar.patel@intel.com>
Fri, 9 Sep 2016 14:10:17 +0000 (09:10 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 14 Sep 2016 19:24:40 +0000 (14:24 -0500)
commitcdabbfa64f4b43e43f1db23170e583e8274d870e
tree7a023b2ba1d8efbbb9a57c97ec40ff9a65a662d4
parentef863f8256e183fc72294952c113721c28ddc4c7
PCI: pciehp: Don't re-read Slot Status when queuing hotplug event

Previously we read Slot Status to learn about hotplug events, then cleared
the events, then re-read Slot Status to find out what happened.  But Slot
Status might have changed before the second read.

Capture the Slot Status once before clearing the events.  Also capture the
Link Status if we had a link status change.

[bhelgaas: changelog, split to separate patch]
Tested-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Mayurkumar Patel <mayurkumar.patel@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pci/hotplug/pciehp_hpc.c