Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150779
b: refs/heads/master
c: 18760f1
h: refs/heads/master
i:
  150777: c158d4d
  150775: 948932f
v: v3
  • Loading branch information
Chaitanya Lala authored and David S. Miller committed Jun 9, 2009
1 parent 8aba303 commit 5530195
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: edfea6e641edee07bc69c70dd978088fc1cecd74
refs/heads/master: 18760f1e74e8dfe8f30d4891e66163d1e6feb893
9 changes: 9 additions & 0 deletions trunk/drivers/net/e1000e/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ static int e1000_get_settings(struct net_device *netdev,

ecmd->autoneg = ((hw->phy.media_type == e1000_media_type_fiber) ||
hw->mac.autoneg) ? AUTONEG_ENABLE : AUTONEG_DISABLE;

/* MDI-X => 2; MDI =>1; Invalid =>0 */
if ((hw->phy.media_type == e1000_media_type_copper) &&
!hw->mac.get_link_status)
ecmd->eth_tp_mdix = hw->phy.is_mdix ? ETH_TP_MDI_X :
ETH_TP_MDI;
else
ecmd->eth_tp_mdix = ETH_TP_MDI_INVALID;

return 0;
}

Expand Down
8 changes: 7 additions & 1 deletion trunk/include/linux/ethtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ struct ethtool_cmd {
__u32 maxtxpkt; /* Tx pkts before generating tx int */
__u32 maxrxpkt; /* Rx pkts before generating rx int */
__u16 speed_hi;
__u16 reserved2;
__u8 eth_tp_mdix;
__u8 reserved2;
__u32 lp_advertising; /* Features the link partner advertises */
__u32 reserved[2];
};
Expand Down Expand Up @@ -632,6 +633,11 @@ struct ethtool_ops {
#define AUTONEG_DISABLE 0x00
#define AUTONEG_ENABLE 0x01

/* Mode MDI or MDI-X */
#define ETH_TP_MDI_INVALID 0x00
#define ETH_TP_MDI 0x01
#define ETH_TP_MDI_X 0x02

/* Wake-On-Lan options. */
#define WAKE_PHY (1 << 0)
#define WAKE_UCAST (1 << 1)
Expand Down

0 comments on commit 5530195

Please sign in to comment.