Microsemi / switchtec-kernel

A kernel module for the Microsemi PCIe switch
GNU General Public License v2.0
45 stars 31 forks source link

Is there a way to use the driver to enable/disable link for a specific port? #46

Closed danglus closed 5 years ago

danglus commented 5 years ago

Hi, I'm looking for a way to enable/disable a PCIe link of a specific port from the host. Basically, I'm trying to do automatic hot-insertion of PCI devices under certain conditions. Therefore, I want to bind the port but keep the 'enabled' box unchecked in the configuration file 'PCI port setting' of the relevant ports.

Unfortunately, the 'switchtec' app can only bind ports but not control the PCI link status of bounded ports.

Is there a way to do it from the driver?

Thanks, Dan

danglus commented 5 years ago

@wesleywesley any insights about this one?

kelvin-cao commented 5 years ago

Hi, @danglus

Wesley is on vacation. Please expect delayed response sometime next week.

Thanks, Kelvin

hachevin commented 5 years ago

Hey @danglus,

This is more of a switch feature question than a driver question. It might be best to get in touch with your designated Microsemi support contacts.

Cheers, Vince

danglus commented 5 years ago

Hi, I

danglus commented 5 years ago

The workaround is to unbind the port - a function that is already supported by the switchtec driver and user space app.