Project

General

Profile

Actions

Bug #14896

closed

pcieb speed overrides should check link cap

Added by Robert Mustacchi about 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

There are two issues today with the private development ioctls that the pcieb command and driver expose to set the target link speed on a device:

  1. To allow the link speed to be set, this requires the link control 2 register, which requires the PCIe cap version 2. This is not being checked right now.
  2. We aren't verifying that the speed we're requesting is one of the bridges supported speeds. While it's ok to ask for a target speed that a downstream device doesn't support, there's no sense asking for 64 GT/s operation on a device that only supports less than that.
Actions #1

Updated by Robert Mustacchi about 2 months ago

In addition to the basic testing in #14895 which shows how this is now working, here are some examples of this now rejecting unsupported link speeds:

rm@gilgamesh ~ $ pfexec /usr/lib/pci/pcieb /devices//pci@0,0/pci1022,14a7@7,1:devctl
Bridge target speed: 32.0 GT/s (gen5)
rm@gilgamesh ~ $ pfexec /usr/lib/pci/pcieb -s gen6 /devices//pci@0,0/pci1022,14a7@7,1:devctl
pcieb: failed to set target speed: Operation not supported
rm@gilgamesh ~ $ pfexec /usr/lib/pci/pcieb -s gen3 /devices/pci@bb,0/pci1022,14aa@5,2:devctl
pcieb: failed to set target speed: Operation not supported
Actions #2

Updated by Electric Monk about 2 months ago

  • Gerrit CR set to 2296
Actions #3

Updated by Electric Monk about 1 month ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 8942719269eba26304a9de8478e842928c665dfc

commit  8942719269eba26304a9de8478e842928c665dfc
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2022-08-17T18:16:41.000Z

    14895 System should report PCIe 32.0 and 64.0 GT/s speeds
    14896 pcieb speed overrides should check link cap
    Reviewed by: Rich Lowe <richlowe@richlowe.net>
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Approved by: Patrick Mooney <pmooney@pfmooney.com>

Actions

Also available in: Atom PDF