summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/siena.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-08-31 22:24:24 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-31 22:24:24 -0400
commitae5dbf1ad83cb90921a400d15fb18afae66e1e56 (patch)
tree92492ce47c6caf7851c2a6e5abda31286fc2421b /drivers/net/ethernet/sfc/siena.c
parent34aedd3f3b289edba118e66450e95790ccab5091 (diff)
parentf7a6d2c4427790cc8695401576dc594fcce8fc80 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next
Ben Hutchings says: ==================== 1. A little more refactoring. 2. Remove the unnecessary use of atomic_t that you pointed out. 3. Add support for starting or queueing firmware requests from atomic context. 4. Add hwmon support for additional sensors found on some new boards. 5. Add support for the EF10 controller architecture, the SFC9100 family and specifically the SFC9120 controller. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/siena.c')
-rw-r--r--drivers/net/ethernet/sfc/siena.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index 89180d47536..d034bcd124e 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * Driver for Solarflare Solarstorm network controllers and boards
+ * Driver for Solarflare network controllers and boards
* Copyright 2005-2006 Fen Systems Ltd.
- * Copyright 2006-2010 Solarflare Communications Inc.
+ * Copyright 2006-2013 Solarflare Communications Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
@@ -177,13 +177,14 @@ static int siena_probe_nvconfig(struct efx_nic *efx)
return rc;
}
-static void siena_dimension_resources(struct efx_nic *efx)
+static int siena_dimension_resources(struct efx_nic *efx)
{
/* Each port has a small block of internal SRAM dedicated to
* the buffer table and descriptor caches. In theory we can
* map both blocks to one port, but we don't.
*/
efx_farch_dimension_resources(efx, FR_CZ_BUF_FULL_TBL_ROWS / 2);
+ return 0;
}
static unsigned int siena_mem_map_size(struct efx_nic *efx)
@@ -195,7 +196,6 @@ static unsigned int siena_mem_map_size(struct efx_nic *efx)
static int siena_probe_nic(struct efx_nic *efx)
{
struct siena_nic_data *nic_data;
- bool already_attached = false;
efx_oword_t reg;
int rc;
@@ -221,19 +221,6 @@ static int siena_probe_nic(struct efx_nic *efx)
if (rc)
goto fail1;
- /* Let the BMC know that the driver is now in charge of link and
- * filter settings. We must do this before we reset the NIC */
- rc = efx_mcdi_drv_attach(efx, true, &already_attached);
- if (rc) {
- netif_err(efx, probe, efx->net_dev,
- "Unable to register driver with MCPU\n");
- goto fail2;
- }
- if (already_attached)
- /* Not a fatal error */
- netif_err(efx, probe, efx->net_dev,
- "Host already registered with MCPU\n");
-
/* Now we can reset the NIC */
rc = efx_mcdi_reset(efx, RESET_TYPE_ALL);
if (rc) {
@@ -280,8 +267,6 @@ fail5:
efx_nic_free_buffer(efx, &efx->irq_status);
fail4:
fail3:
- efx_mcdi_drv_attach(efx, false, NULL);
-fail2:
efx_mcdi_fini(efx);
fail1:
kfree(efx->nic_data);
@@ -370,14 +355,11 @@ static void siena_remove_nic(struct efx_nic *efx)
efx_mcdi_reset(efx, RESET_TYPE_ALL);
- /* Relinquish the device back to the BMC */
- efx_mcdi_drv_attach(efx, false, NULL);
+ efx_mcdi_fini(efx);
/* Tear down the private nic state */
kfree(efx->nic_data);
efx->nic_data = NULL;
-
- efx_mcdi_fini(efx);
}
#define SIENA_DMA_STAT(ext_name, mcdi_name) \