Page MenuHomeFreeBSD

Rework managing hotplug commands with command completions.
ClosedPublic

Authored by jhb on May 14 2016, 1:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 19, 7:51 AM
Unknown Object (File)
Mon, Aug 19, 2:17 AM
Unknown Object (File)
Sun, Aug 18, 7:28 PM
Unknown Object (File)
Sat, Aug 17, 4:39 PM
Unknown Object (File)
Sun, Aug 4, 7:29 PM
Unknown Object (File)
Fri, Aug 2, 10:13 AM
Unknown Object (File)
Jul 12 2024, 4:46 AM
Unknown Object (File)
Jul 3 2024, 8:03 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.