2

I am trying to remove and rescan a set of pci network cards using :

$echo 1 > /sys/bus/pci/devices/pci-id/remove

$echo 1 > /sys/bus/pci/rescan

As I see echo 1 > /sys/bus/pci/rescan to be trigged for all pci devices will it affect the network traffic on network cards which I am not removing ??

Thanks,

danglingpointer
  • 4,708
  • 3
  • 24
  • 42
user8070445
  • 43
  • 1
  • 7
  • 1
    It is implemented in http://elixir.free-electrons.com/linux/v4.11/source/drivers/pci/pci-sysfs.c#L306. [`pci_rescan_bus` is documented as](http://elixir.free-electrons.com/linux/v4.11/source/drivers/pci/probe.c#L2497) "Scan a PCI bus and child buses for new devices, adds them, and enables them." And https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-pci says "Writing a non-zero value to this attribute will force a rescan of all PCI buses in the system, and re-discover previously removed devices.". I think rescan for removed cards will have little or no effect on non-removed cards. – osgx May 27 '17 at 02:25
  • Is there a solution for this question ? I wanted to ask the same question – ransh Jul 10 '18 at 04:56
  • @ransh I used it as stated above and it works fine without affecting other pci cards. – user8070445 Jul 10 '18 at 11:44
  • Thanks, I understand, maybe you can write it as a solution for this question. – ransh Jul 11 '18 at 06:06
  • @ransh not sure if its the answer. The only thing is it works without any issue. – user8070445 Jul 11 '18 at 10:46
  • making the same pci rescan hangs linux for me – xealits Dec 23 '19 at 20:35

0 Answers0