Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268267
b: refs/heads/master
c: 06530d8
h: refs/heads/master
i:
  268265: c9eb8ab
  268263: 2d741df
v: v3
  • Loading branch information
Mark Einon authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 4db3720 commit cbe0ce8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 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: 412f8e0c52b126c6f54d0626a9dede9438d76c03
refs/heads/master: 06530d81d6a6b9cccd6433868fc0bb68fe0361e3
8 changes: 5 additions & 3 deletions trunk/drivers/staging/et131x/et1310_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ void et1310_config_mac_regs2(struct et131x_adapter *adapter)
cfg2 &= ~0x0021;

/* Turn on duplex if needed */
if (adapter->duplex_mode)
if (phydev && phydev->duplex == DUPLEX_FULL)
cfg2 |= 0x01;

ifctrl &= ~(1 << 26);
if (!adapter->duplex_mode)
if (phydev && phydev->duplex == DUPLEX_HALF)
ifctrl |= (1<<26); /* Enable ghd */

writel(ifctrl, &mac->if_ctrl);
Expand Down Expand Up @@ -450,7 +450,9 @@ void et1310_config_macstat_regs(struct et131x_adapter *adapter)

void et1310_config_flow_control(struct et131x_adapter *adapter)
{
if (adapter->duplex_mode == 0) {
struct phy_device *phydev = adapter->phydev;

if (phydev->duplex == DUPLEX_HALF) {
adapter->flowcontrol = FLOW_NONE;
} else {
char remote_pause, remote_async_pause;
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/staging/et131x/et1310_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,6 @@ void et131x_mii_check(struct et131x_adapter *adapter,

netif_carrier_off(adapter->netdev);

adapter->duplex_mode = 0;

/* Free the packets being actively sent & stopped */
et131x_free_busy_send_packets(adapter);

Expand Down Expand Up @@ -516,8 +514,6 @@ void et131x_mii_check(struct et131x_adapter *adapter,
&speed, &duplex, &mdi_mdix,
&masterslave, &polarity);

adapter->duplex_mode = duplex;

adapter->boot_coma = 20;

if (phydev && phydev->speed == SPEED_10) {
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/staging/et131x/et1310_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,6 @@ struct mi_regs {
#define TRUEPHY_MASK 2
#endif

/* Define duplex modes */
#define TRUEPHY_DUPLEX_HALF 0
#define TRUEPHY_DUPLEX_FULL 1

/* Define master/slave configuration values */
#define TRUEPHY_CFG_SLAVE 0
#define TRUEPHY_CFG_MASTER 1
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/et131x/et131x_adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ struct et131x_adapter {

/* Packet Filter and look ahead size */
u32 packet_filter;
u32 duplex_mode;

/* multicast list */
u32 multicast_addr_count;
Expand Down

0 comments on commit cbe0ce8

Please sign in to comment.