aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/selftest.c1
-rw-r--r--drivers/net/sfc/tenxpress.c11
-rw-r--r--drivers/net/sfc/tx.c7
3 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index 043795715955..b67ccca3fc1a 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -438,6 +438,7 @@ static int efx_begin_loopback(struct efx_tx_queue *tx_queue)
438 kfree_skb(skb); 438 kfree_skb(skb);
439 return -EPIPE; 439 return -EPIPE;
440 } 440 }
441 efx->net_dev->trans_start = jiffies;
441 } 442 }
442 443
443 return 0; 444 return 0;
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c
index db723c58f6f1..f4d509015f75 100644
--- a/drivers/net/sfc/tenxpress.c
+++ b/drivers/net/sfc/tenxpress.c
@@ -63,6 +63,7 @@
63 63
64/* extended status register */ 64/* extended status register */
65#define PMA_PMD_XSTATUS_REG 49153 65#define PMA_PMD_XSTATUS_REG 49153
66#define PMA_PMD_XSTAT_MDIX_LBN 14
66#define PMA_PMD_XSTAT_FLP_LBN (12) 67#define PMA_PMD_XSTAT_FLP_LBN (12)
67 68
68/* LED control register */ 69/* LED control register */
@@ -741,9 +742,17 @@ tenxpress_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd)
741 742
742 mdio45_ethtool_gset_npage(&efx->mdio, ecmd, adv, lpa); 743 mdio45_ethtool_gset_npage(&efx->mdio, ecmd, adv, lpa);
743 744
744 if (efx->phy_type != PHY_TYPE_SFX7101) 745 if (efx->phy_type != PHY_TYPE_SFX7101) {
745 ecmd->supported |= (SUPPORTED_100baseT_Full | 746 ecmd->supported |= (SUPPORTED_100baseT_Full |
746 SUPPORTED_1000baseT_Full); 747 SUPPORTED_1000baseT_Full);
748 if (ecmd->speed != SPEED_10000) {
749 ecmd->eth_tp_mdix =
750 (efx_mdio_read(efx, MDIO_MMD_PMAPMD,
751 PMA_PMD_XSTATUS_REG) &
752 (1 << PMA_PMD_XSTAT_MDIX_LBN))
753 ? ETH_TP_MDI_X : ETH_TP_MDI;
754 }
755 }
747 756
748 /* In loopback, the PHY automatically brings up the correct interface, 757 /* In loopback, the PHY automatically brings up the correct interface,
749 * but doesn't advertise the correct speed. So override it */ 758 * but doesn't advertise the correct speed. So override it */
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index d6681edb7014..14a14788566c 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -360,13 +360,6 @@ inline int efx_xmit(struct efx_nic *efx,
360 360
361 /* Map fragments for DMA and add to TX queue */ 361 /* Map fragments for DMA and add to TX queue */
362 rc = efx_enqueue_skb(tx_queue, skb); 362 rc = efx_enqueue_skb(tx_queue, skb);
363 if (unlikely(rc != NETDEV_TX_OK))
364 goto out;
365
366 /* Update last TX timer */
367 efx->net_dev->trans_start = jiffies;
368
369 out:
370 return rc; 363 return rc;
371} 364}
372 365