5

Can someone please shed some light on driver .probe and .remove methods serialization?

For example if there are 10 PCIe cards attached to a server and there is a common driver to detect(probe) these 10 devices, then how is the probe function called? Is it called in parallel for all the devices or executed one by one - meaning, the second call to probe won't happen until the first probe call for the first device returns?

Thanks, Prathamesh

Capricorn
  • 701
  • 1
  • 10
  • 20
  • There was an attempt to add [such a feature](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f397f865076e3471ec884ee73ad5e34165fac2a), but later it was [reverted](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5adc55da4a7758021bcc374904b0f8b076508a11). So at the moment kernel doesn't seem to provide multi-theaded probe support, not even for PCI bus. – Sam Protsenko Apr 01 '17 at 17:24
  • @SamProtsenko, what about async probe? It's in the kernel and wasn't reverted as far as I know. – 0andriy Apr 01 '17 at 21:35
  • @0andriy Probably missed it, since those patches were merged not so long ago. Obviously you know this matter, so why don't you go ahead and answer the question? – Sam Protsenko Apr 01 '17 at 23:34

0 Answers0