]> 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)
commit6c87fb414aabb88bbf099361d8e7dbf9e18c00e5
tree7a023b2ba1d8efbbb9a57c97ec40ff9a65a662d4
parent6698aeaa959b5e34f8c6a0cf1850bf6b3db3ab4b
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