sfc: Enable autonegotiated flow-control by default if supported
[safe/jmp/linux-2.6] / drivers / net / sfc / falcon.c
index 48d28d8..1e78585 100644 (file)
@@ -1,7 +1,7 @@
 /****************************************************************************
  * Driver for Solarflare Solarstorm network controllers and boards
  * Copyright 2005-2006 Fen Systems Ltd.
- * Copyright 2006-2008 Solarflare Communications Inc.
+ * Copyright 2006-2009 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
@@ -909,6 +909,8 @@ static int falcon_probe_port(struct efx_nic *efx)
                efx->wanted_fc = EFX_FC_RX | EFX_FC_TX;
        else
                efx->wanted_fc = EFX_FC_RX;
+       if (efx->mdio.mmds & MDIO_DEVS_AN)
+               efx->wanted_fc |= EFX_FC_AUTO;
 
        /* Allocate buffer for stats */
        rc = efx_nic_alloc_buffer(efx, &efx->stats_buffer,
@@ -925,6 +927,7 @@ static int falcon_probe_port(struct efx_nic *efx)
 
 static void falcon_remove_port(struct efx_nic *efx)
 {
+       efx->phy_op->remove(efx);
        efx_nic_free_buffer(efx, &efx->stats_buffer);
 }