Commit b3733263 authored by David S. Miller's avatar David S. Miller

Merge branch 'nfp-add-two-user-friendly-errors'

Jakub Kicinski says:

====================
nfp: add two user friendly errors

This small series adds two error messages based on recent
bug reports which turned out not to be bugs..
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents d42176c6 f767fc66
...@@ -596,6 +596,10 @@ static int nfp_pci_probe(struct pci_dev *pdev, ...@@ -596,6 +596,10 @@ static int nfp_pci_probe(struct pci_dev *pdev,
struct nfp_pf *pf; struct nfp_pf *pf;
int err; int err;
if (pdev->vendor == PCI_VENDOR_ID_NETRONOME &&
pdev->device == PCI_DEVICE_ID_NETRONOME_NFP6000_VF)
dev_warn(&pdev->dev, "Binding NFP VF device to the NFP PF driver, the VF driver is called 'nfp_netvf'\n");
err = pci_enable_device(pdev); err = pci_enable_device(pdev);
if (err < 0) if (err < 0)
return err; return err;
......
...@@ -241,11 +241,16 @@ static int nfp_nsp_check(struct nfp_nsp *state) ...@@ -241,11 +241,16 @@ static int nfp_nsp_check(struct nfp_nsp *state)
state->ver.major = FIELD_GET(NSP_STATUS_MAJOR, reg); state->ver.major = FIELD_GET(NSP_STATUS_MAJOR, reg);
state->ver.minor = FIELD_GET(NSP_STATUS_MINOR, reg); state->ver.minor = FIELD_GET(NSP_STATUS_MINOR, reg);
if (state->ver.major != NSP_MAJOR || state->ver.minor < NSP_MINOR) { if (state->ver.major != NSP_MAJOR) {
nfp_err(cpp, "Unsupported ABI %hu.%hu\n", nfp_err(cpp, "Unsupported ABI %hu.%hu\n",
state->ver.major, state->ver.minor); state->ver.major, state->ver.minor);
return -EINVAL; return -EINVAL;
} }
if (state->ver.minor < NSP_MINOR) {
nfp_err(cpp, "ABI too old to support NIC operation (%u.%hu < %u.%u), please update the management FW on the flash\n",
NSP_MAJOR, state->ver.minor, NSP_MAJOR, NSP_MINOR);
return -EINVAL;
}
if (reg & NSP_STATUS_BUSY) { if (reg & NSP_STATUS_BUSY) {
nfp_err(cpp, "Service processor busy!\n"); nfp_err(cpp, "Service processor busy!\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment