]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/sfc/siena.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[net-next-2.6.git] / drivers / net / sfc / siena.c
index f8c6771e66d861488bd12fc69d51346a0fedebb6..38dcc42c4f790648fb2add771b0610ee394e3380 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/delay.h>
 #include <linux/pci.h>
 #include <linux/module.h>
+#include <linux/slab.h>
 #include "net_driver.h"
 #include "bitfield.h"
 #include "efx.h"
@@ -106,16 +107,11 @@ static int siena_probe_port(struct efx_nic *efx)
        efx->mdio.mdio_read = siena_mdio_read;
        efx->mdio.mdio_write = siena_mdio_write;
 
-       /* Fill out MDIO structure and loopback modes */
+       /* Fill out MDIO structure, loopback modes, and initial link state */
        rc = efx->phy_op->probe(efx);
        if (rc != 0)
                return rc;
 
-       /* Initial assumption */
-       efx->link_state.speed = 10000;
-       efx->link_state.fd = true;
-       efx->wanted_fc = EFX_FC_RX | EFX_FC_TX;
-
        /* Allocate buffer for stats */
        rc = efx_nic_alloc_buffer(efx, &efx->stats_buffer,
                                  MC_CMD_MAC_NSTATS * sizeof(u64));
@@ -139,7 +135,7 @@ void siena_remove_port(struct efx_nic *efx)
 
 static const struct efx_nic_register_test siena_register_tests[] = {
        { FR_AZ_ADR_REGION,
-         EFX_OWORD32(0x0001FFFF, 0x0001FFFF, 0x0001FFFF, 0x0001FFFF) },
+         EFX_OWORD32(0x0003FFFF, 0x0003FFFF, 0x0003FFFF, 0x0003FFFF) },
        { FR_CZ_USR_EV_CFG,
          EFX_OWORD32(0x000103FF, 0x00000000, 0x00000000, 0x00000000) },
        { FR_AZ_RX_CFG,
@@ -181,6 +177,12 @@ static int siena_test_registers(struct efx_nic *efx)
 
 static int siena_reset_hw(struct efx_nic *efx, enum reset_type method)
 {
+       int rc;
+
+       /* Recover from a failed assertion pre-reset */
+       rc = efx_mcdi_handle_assertion(efx);
+       if (rc)
+               return rc;
 
        if (method == RESET_TYPE_WORLD)
                return efx_mcdi_reset_mc(efx);
@@ -582,6 +584,7 @@ struct efx_nic_type siena_a0_nic_type = {
        .set_wol = siena_set_wol,
        .resume_wol = siena_init_wol,
        .test_registers = siena_test_registers,
+       .test_nvram = efx_mcdi_nvram_test_all,
        .default_mac_ops = &efx_mcdi_mac_operations,
 
        .revision = EFX_REV_SIENA_A0,