net/mlx4_core: Warn if device doesn't have enough PCI bandwidth
authorEyal Perry <eyalpe@mellanox.com>
Sun, 5 Jan 2014 15:41:08 +0000 (17:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jan 2014 01:37:05 +0000 (20:37 -0500)
commitb912b2f8fc71df4c3ffa7a9fe2c2227e8bcdaa07
treed66edc63a1cb1a83180ab004aef03fd919ecd128
parent3a2e15df50d011fa713d5c59769feade102e963e
net/mlx4_core: Warn if device doesn't have enough PCI bandwidth

Check if the device get enough bandwidth from the entire PCI chain to satisfy
its capabilities. This patch determines the PCIe device's bandwidth capabilities
by reading its PCIe Link Capabilities registers and then call the
pcie_get_minimum_link function to ensure that the adapter is hooked into a slot
which is capable of providing the necessary bandwidth capabilities.

Signed-off-by: Eyal Perry <eyalpe@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/main.c