diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-04-28 09:01:50 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-28 12:18:27 -0700 |
commit | e41c11ee0cc602bcde68916be85fb97d1a484324 (patch) | |
tree | 0c88c7bad9062dfe35aedd9fca21108608ad12a0 /drivers/net/sfc/falcon_boards.c | |
parent | f49a4589e9e25ef525da449b1ce5597cb659bbb5 (diff) | |
download | linux-3.10-e41c11ee0cc602bcde68916be85fb97d1a484324.tar.gz linux-3.10-e41c11ee0cc602bcde68916be85fb97d1a484324.tar.bz2 linux-3.10-e41c11ee0cc602bcde68916be85fb97d1a484324.zip |
sfc: Change falcon_probe_board() to fail for unsupported boards
The driver needs specific PHY and board support code for each SFC4000
board; there is no point trying to continue if it is missing.
Currently unsupported boards can trigger an 'oops'.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_boards.c')
-rw-r--r-- | drivers/net/sfc/falcon_boards.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c index 5712fddd72f..c7a933a3292 100644 --- a/drivers/net/sfc/falcon_boards.c +++ b/drivers/net/sfc/falcon_boards.c @@ -728,15 +728,7 @@ static const struct falcon_board_type board_types[] = { }, }; -static const struct falcon_board_type falcon_dummy_board = { - .init = efx_port_dummy_op_int, - .init_phy = efx_port_dummy_op_void, - .fini = efx_port_dummy_op_void, - .set_id_led = efx_port_dummy_op_set_id_led, - .monitor = efx_port_dummy_op_int, -}; - -void falcon_probe_board(struct efx_nic *efx, u16 revision_info) +int falcon_probe_board(struct efx_nic *efx, u16 revision_info) { struct falcon_board *board = falcon_board(efx); u8 type_id = FALCON_BOARD_TYPE(revision_info); @@ -754,8 +746,9 @@ void falcon_probe_board(struct efx_nic *efx, u16 revision_info) (efx->pci_dev->subsystem_vendor == EFX_VENDID_SFC) ? board->type->ref_model : board->type->gen_type, 'A' + board->major, board->minor); + return 0; } else { EFX_ERR(efx, "unknown board type %d\n", type_id); - board->type = &falcon_dummy_board; + return -ENODEV; } } |