Page MenuHomeFreeBSD

Rework managing hotplug commands with command completions.
ClosedPublic

Authored by jhb on May 14 2016, 1:26 AM.
Tags
None
Referenced Files
F101909309: D6363.id16436.diff
Tue, Nov 5, 12:11 PM
F101908782: D6363.id16484.diff
Tue, Nov 5, 12:02 PM
Unknown Object (File)
Mon, Oct 21, 1:47 PM
Unknown Object (File)
Oct 2 2024, 4:24 PM
Unknown Object (File)
Oct 2 2024, 5:26 AM
Unknown Object (File)
Oct 2 2024, 12:16 AM
Unknown Object (File)
Sep 22 2024, 12:46 PM
Unknown Object (File)
Sep 17 2024, 9:21 PM
Subscribers
None

Details

Summary

Rework managing hotplug commands with command completions.

Previously the command completion interrupt would post any pending
command immediately, but before pcib_pcie_hotplug_update() had been
run to inspect the current status. Now, the command completion
interrupt merely clears the flag and stops the timer assuming that
the caller is always going to call pcib_pcie_hotplug_update() to
generate the next hotplug command if one is needed.

Test Plan
  • only tested ExpressCard to ensure no regressions, but that doesn't actually use command completion interrupts. :(

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Rework managing hotplug commands with command completions..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: imp.
sys/dev/pci/pci_pci.c
894 โ†—(On Diff #16321)

Since pcib_pcie_hotplug_update() always updates the full mask/value now, I think I can probably get rid of the pending things entirely and just write whatever values are needed for the current state after a command completion interrupt posts.

1030 โ†—(On Diff #16321)

This was the only place that wasn't already setting the mask on every update. Here though we want to be sure to not change the EI's state (so write a zero to the bit) if it's in the correct setting already.

  • Drop the pending link fields entirely.
  • Write the new value, not the old.
jhb updated this object.

Updated commit message for removal of pending fields.

This revision was automatically updated to reflect the committed changes.