OSDN Git Service

nfp: populate bus-info on representors
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 30 Jun 2018 00:04:38 +0000 (17:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 12:31:56 +0000 (21:31 +0900)
commit5d4b0b4068f1dc637d8a9b53c2960bbad8ce654d
treeb876fbbf586a9c39576849fecd2d4b00f55b6fe5
parentd387b8a19a3921e291ebeb26b55495479cd36b21
nfp: populate bus-info on representors

We used to leave bus-info in ethtool driver info empty for
representors in case multi-PCIe-to-single-host cards make
the association between PCIe device and NFP many to one.
It seems these attempts are futile, we need to link the
representors to one PCIe device in sysfs to get consistent
naming, plus devlink uses one PCIe as a handle, anyway.
The multi-PCIe-to-single-system support won't be clean,
if it ever comes.

Turns out some user space (RHEL tests) likes to read bus-info
so just populate it.

While at it remove unnecessary app NULL-check, representors
are spawned by an app, so it must exist.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c