net/ncsi: Probe single packages to avoid conflict

Currently the NCSI driver sends a select-package command to all possible
packages simultaneously to discover what packages are available. However
at this stage in the probe process the driver does not know if
hardware arbitration is available: if it isn't then this process could
cause collisions on the RMII bus when packages try to respond.

Update the probe loop to probe each package one by one, and once
complete check if HWA is universally supported.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Samuel Mendoza-Jonas
2018-11-16 15:51:55 +11:00
committed by David S. Miller
parent 60ab49bfe4
commit 8e13f70be0
2 changed files with 33 additions and 57 deletions

View File

@@ -292,6 +292,7 @@ struct ncsi_dev_priv {
#if IS_ENABLED(CONFIG_IPV6)
unsigned int inet6_addr_num; /* Number of IPv6 addresses */
#endif
unsigned int package_probe_id;/* Current ID during probe */
unsigned int package_num; /* Number of packages */
struct list_head packages; /* List of packages */
struct ncsi_channel *hot_channel; /* Channel was ever active */