Page MenuHomeFreeBSD

acpi_spmc(4): Check DSMs only on attach, do not return 0 on probe
ClosedPublic

Authored by olce on Mon, May 4, 8:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 19, 5:22 AM
Unknown Object (File)
Sun, May 17, 10:18 AM
Unknown Object (File)
Sat, May 16, 10:54 PM
Unknown Object (File)
Thu, May 14, 2:28 AM
Unknown Object (File)
Wed, May 13, 7:29 PM
Unknown Object (File)
Tue, May 12, 11:52 AM
Unknown Object (File)
Mon, May 11, 3:20 PM
Unknown Object (File)
Sun, May 10, 8:21 AM
Subscribers

Details

Summary

Once we have recognized a device by PNP ID, declare support
unconditionally on probe, and only check for DSMs in attach.

We do this for these reasons:

  1. PNP0D80 is de-facto a device supposed to hold DSMs related to suspend-to-idle, so we assume it cannot be used for other purposes. And if that changes, we need another architecture anyway (e.g., have a new driver claiming those devices and behaving like a bus, to which this driver would be a sub-driver).
  2. If there are no DSMs that we support on such a device, then a new DSM was added that the driver does not know about and which "replaces" (in terms of functionality) the known ones, or the firmware is buggy. In both cases, failing the attach instead of the probe is reasonable, as that leads to printing some error which we (and probably users too) would like to know about.
  3. This is a step to enable multiple instances of this driver (just to be a good citizen, and also to be future proof against weird firmwares that would, e.g., implement the Microsoft DSM on another device than the Intel one).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

olce requested review of this revision.Mon, May 4, 8:32 PM
This revision is now accepted and ready to land.Thu, May 7, 2:37 AM

Make sure we only print the "DSMs supported" message only if there is at least one, as before (else, we just print a weird empty string as the content of the mask thanks to print_bit_field(), since we are not printing the value of the mask itself anymore).

This revision now requires review to proceed.Thu, May 7, 8:03 PM
This revision is now accepted and ready to land.Sun, May 10, 1:16 PM

Impacts of changes in earlier revisions, no real change.

This revision now requires review to proceed.Tue, May 12, 1:32 PM
This revision is now accepted and ready to land.Tue, May 12, 2:09 PM