Skip to content

Commit

Permalink
Merge pull request #13 from opencomputeproject/bugfix/params_range_ce…
Browse files Browse the repository at this point in the history
…hcks

Removed the invalid Voltage range checks
  • Loading branch information
sksekar authored Apr 7, 2024
2 parents a4d4d7a + 9a6fdda commit 3712011
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/pci_lmt/pcie_lane_margining.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import typing as ty
from dataclasses import dataclass

from pci_lmt.constants import MARGIN_RESPONSE, PARAMETERS
from pci_lmt.constants import MARGIN_RESPONSE
from pci_lmt.device import PciDevice

logger: logging.Logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -718,14 +718,6 @@ def step_margin_voltage_offset_up_down_of_default(
if receiver_number not in [*range(0x1, 0x7)]:
return {"error": f"ERROR: StepMarginVoltageOffsetUpDownOfDefault - BAD receiver_number {receiver_number}"}

if steps not in [
*range(
PARAMETERS["NumVoltageSteps"].min,
PARAMETERS["NumVoltageSteps"].max + 1,
)
]:
return {"error": f"ERROR: StepMarginVoltageOffsetUpDownOfDefault - BAD Steps {steps}"}

if up_down in (0, 1):
margin_payload = up_down << 6 | steps
else:
Expand Down

0 comments on commit 3712011

Please sign in to comment.