aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon_boards.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/falcon_boards.c')
-rw-r--r--drivers/net/sfc/falcon_boards.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c
index c7a933a3292e..92b35e3d1100 100644
--- a/drivers/net/sfc/falcon_boards.c
+++ b/drivers/net/sfc/falcon_boards.c
@@ -106,12 +106,12 @@ static int efx_check_lm87(struct efx_nic *efx, unsigned mask)
106 alarms1 &= mask; 106 alarms1 &= mask;
107 alarms2 &= mask >> 8; 107 alarms2 &= mask >> 8;
108 if (alarms1 || alarms2) { 108 if (alarms1 || alarms2) {
109 EFX_ERR(efx, 109 netif_err(efx, hw, efx->net_dev,
110 "LM87 detected a hardware failure (status %02x:%02x)" 110 "LM87 detected a hardware failure (status %02x:%02x)"
111 "%s%s\n", 111 "%s%s\n",
112 alarms1, alarms2, 112 alarms1, alarms2,
113 (alarms1 & LM87_ALARM_TEMP_INT) ? " INTERNAL" : "", 113 (alarms1 & LM87_ALARM_TEMP_INT) ? " INTERNAL" : "",
114 (alarms1 & LM87_ALARM_TEMP_EXT1) ? " EXTERNAL" : ""); 114 (alarms1 & LM87_ALARM_TEMP_EXT1) ? " EXTERNAL" : "");
115 return -ERANGE; 115 return -ERANGE;
116 } 116 }
117 117
@@ -243,7 +243,7 @@ static int sfe4001_poweron(struct efx_nic *efx)
243 (0 << P0_EN_3V3X_LBN) | (0 << P0_EN_5V_LBN) | 243 (0 << P0_EN_3V3X_LBN) | (0 << P0_EN_5V_LBN) |
244 (0 << P0_EN_1V0X_LBN)); 244 (0 << P0_EN_1V0X_LBN));
245 if (rc != out) { 245 if (rc != out) {
246 EFX_INFO(efx, "power-cycling PHY\n"); 246 netif_info(efx, hw, efx->net_dev, "power-cycling PHY\n");
247 rc = i2c_smbus_write_byte_data(ioexp_client, P0_OUT, out); 247 rc = i2c_smbus_write_byte_data(ioexp_client, P0_OUT, out);
248 if (rc) 248 if (rc)
249 goto fail_on; 249 goto fail_on;
@@ -269,7 +269,8 @@ static int sfe4001_poweron(struct efx_nic *efx)
269 if (rc) 269 if (rc)
270 goto fail_on; 270 goto fail_on;
271 271
272 EFX_INFO(efx, "waiting for DSP boot (attempt %d)...\n", i); 272 netif_info(efx, hw, efx->net_dev,
273 "waiting for DSP boot (attempt %d)...\n", i);
273 274
274 /* In flash config mode, DSP does not turn on AFE, so 275 /* In flash config mode, DSP does not turn on AFE, so
275 * just wait 1 second. 276 * just wait 1 second.
@@ -291,7 +292,7 @@ static int sfe4001_poweron(struct efx_nic *efx)
291 } 292 }
292 } 293 }
293 294
294 EFX_INFO(efx, "timed out waiting for DSP boot\n"); 295 netif_info(efx, hw, efx->net_dev, "timed out waiting for DSP boot\n");
295 rc = -ETIMEDOUT; 296 rc = -ETIMEDOUT;
296fail_on: 297fail_on:
297 sfe4001_poweroff(efx); 298 sfe4001_poweroff(efx);
@@ -377,7 +378,7 @@ static void sfe4001_fini(struct efx_nic *efx)
377{ 378{
378 struct falcon_board *board = falcon_board(efx); 379 struct falcon_board *board = falcon_board(efx);
379 380
380 EFX_INFO(efx, "%s\n", __func__); 381 netif_info(efx, drv, efx->net_dev, "%s\n", __func__);
381 382
382 device_remove_file(&efx->pci_dev->dev, &dev_attr_phy_flash_cfg); 383 device_remove_file(&efx->pci_dev->dev, &dev_attr_phy_flash_cfg);
383 sfe4001_poweroff(efx); 384 sfe4001_poweroff(efx);
@@ -461,7 +462,7 @@ static int sfe4001_init(struct efx_nic *efx)
461 if (rc) 462 if (rc)
462 goto fail_on; 463 goto fail_on;
463 464
464 EFX_INFO(efx, "PHY is powered on\n"); 465 netif_info(efx, hw, efx->net_dev, "PHY is powered on\n");
465 return 0; 466 return 0;
466 467
467fail_on: 468fail_on:
@@ -493,7 +494,7 @@ static int sfn4111t_check_hw(struct efx_nic *efx)
493 494
494static void sfn4111t_fini(struct efx_nic *efx) 495static void sfn4111t_fini(struct efx_nic *efx)
495{ 496{
496 EFX_INFO(efx, "%s\n", __func__); 497 netif_info(efx, drv, efx->net_dev, "%s\n", __func__);
497 498
498 device_remove_file(&efx->pci_dev->dev, &dev_attr_phy_flash_cfg); 499 device_remove_file(&efx->pci_dev->dev, &dev_attr_phy_flash_cfg);
499 i2c_unregister_device(falcon_board(efx)->hwmon_client); 500 i2c_unregister_device(falcon_board(efx)->hwmon_client);
@@ -742,13 +743,14 @@ int falcon_probe_board(struct efx_nic *efx, u16 revision_info)
742 board->type = &board_types[i]; 743 board->type = &board_types[i];
743 744
744 if (board->type) { 745 if (board->type) {
745 EFX_INFO(efx, "board is %s rev %c%d\n", 746 netif_info(efx, probe, efx->net_dev, "board is %s rev %c%d\n",
746 (efx->pci_dev->subsystem_vendor == EFX_VENDID_SFC) 747 (efx->pci_dev->subsystem_vendor == EFX_VENDID_SFC)
747 ? board->type->ref_model : board->type->gen_type, 748 ? board->type->ref_model : board->type->gen_type,
748 'A' + board->major, board->minor); 749 'A' + board->major, board->minor);
749 return 0; 750 return 0;
750 } else { 751 } else {
751 EFX_ERR(efx, "unknown board type %d\n", type_id); 752 netif_err(efx, probe, efx->net_dev, "unknown board type %d\n",
753 type_id);
752 return -ENODEV; 754 return -ENODEV;
753 } 755 }
754} 756}