Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dwc_eqos - Load ACPI configuration information #27

Merged
merged 1 commit into from
Dec 31, 2023
Merged

Conversation

idigdoug
Copy link
Collaborator

Changes to acpiutil:

  • acpiutil.hpp depends on definitions from acpiioct.h, so #include it.
  • Fix code analysis warnings about SAL annotations.
  • Make AcpiEvaluateMethod be public.
  • Fix C++ conformance issues with goto jumping past variable initialization.

Changes to driver:

  • Define a DeviceConfig struct with all of the configuration information.
  • Pass DeviceConfig to queues.
  • Queues use DeviceConfig instead of constants.
  • Initialize DeviceConfig based on feature registers and ACPI.

Notes:

  • Current ACPI sets mixed-burst=1, tso=1, wr_osr_lmt=4, rd_osr_lmt=8, blen=16,8,4.
  • NetBSD driver references other settings that are not present in the current ACPI, and sets defaults for them: pbl=8, txpbl=8, rxpbl=8, fixed-burst=0.
  • I invented a new value pblx8 (default = 1) to control whether the X8 flag is set. Existing code assumes that it is set.
  • I don't use the tso value for anything. I assume it is to enable/disable TCP segmentation offload, which seems more appropriate to configure in the registry.
  • The docs say that mixed-burst=1 should translate into FB=0 (same as fixed-burst=0), but the NetBSD driver translates mixed-burst=1 into Reserved14=1. I'll keep that behavior since it doesn't seem to cause any harm.

Changes to acpiutil:

- `acpiutil.hpp` depends on definitions from `acpiioct.h`, so `#include`
  it.
- Fix code analysis warnings about SAL annotations.
- Make `AcpiEvaluateMethod` be public.
- Fix C++ conformance issues with goto jumping past variable initialization.

Changes to driver:

- Define a DeviceConfig struct with all of the configuration
  information.
- Pass DeviceConfig to queues.
- Queues use DeviceConfig instead of constants.
- Initialize DeviceConfig based on feature registers and ACPI.

Notes:

- Current ACPI sets mixed-burst=1, tso=1, wr_osr_lmt=4, rd_osr_lmt=8,
  blen=16,8,4.
- NetBSD driver references other settings that are not present in the
  current ACPI, and sets defaults for them: pbl=8, txpbl=8, rxpbl=8,
  fixed-burst=0.
- I invented a new value `pblx8` (default = 1) to control whether the X8
  flag is set. Existing code assumes that it is set.
- I don't use the `tso` value for anything. I assume it is to
  enable/disable TCP segmentation offload, which seems more appropriate
  to configure in the registry.
- The docs say that mixed-burst=1 should translate into FB=0 (same as
  fixed-burst=0), but the NetBSD driver translates mixed-burst=1 into
  Reserved14=1. I'll keep that behavior since it doesn't seem to cause any
  harm.
@idigdoug idigdoug merged commit af08b2c into master Dec 31, 2023
2 checks passed
@idigdoug idigdoug deleted the dwc_eqos_acpi branch December 31, 2023 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants