Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175151
b: refs/heads/master
c: c2f6118
h: refs/heads/master
i:
  175149: a7dd302
  175147: 40c2f2e
  175143: 861db03
  175135: 093774e
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent d7f72b3 commit 565e427
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 40 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: 308e93e0a36676f22060b3a4cf0135497b32e9f2
refs/heads/master: c2f6118a3009b3606cc6e77b474a46ce4075b0a2
41 changes: 11 additions & 30 deletions trunk/drivers/staging/et131x/et1310_address_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -1395,38 +1395,19 @@ typedef union _MAC_CFG2_t {
* 22-16: non B2B ipg 2
* 15-8: Min ifg enforce
* 7-0: B2B ipg
*/

/*
*
* structure for half duplex reg in mac address map.
* located at address 0x500C
* 31-24: reserved
* 23-20: Alt BEB trunc
* 19: Alt BEB enable
* 18: BP no backoff
* 17: no backoff
* 16: excess defer
* 15-12: re-xmit max
* 11-10: reserved
* 9-0: collision window
*/
typedef union _MAC_HFDP_t {
u32 value;
struct {
#ifdef _BIT_FIELDS_HTOL
u32 reserved2:8; /* bits 24-31 */
u32 alt_beb_trunc:4; /* bits 23-20 */
u32 alt_beb_enable:1; /* bit 19 */
u32 bp_no_backoff:1; /* bit 18 */
u32 no_backoff:1; /* bit 17 */
u32 excess_defer:1; /* bit 16 */
u32 rexmit_max:4; /* bits 12-15 */
u32 reserved1:2; /* bits 10-11 */
u32 coll_window:10; /* bits 0-9 */
#else
u32 coll_window:10; /* bits 0-9 */
u32 reserved1:2; /* bits 10-11 */
u32 rexmit_max:4; /* bits 12-15 */
u32 excess_defer:1; /* bit 16 */
u32 no_backoff:1; /* bit 17 */
u32 bp_no_backoff:1; /* bit 18 */
u32 alt_beb_enable:1; /* bit 19 */
u32 alt_beb_trunc:4; /* bits 23-20 */
u32 reserved2:8; /* bits 24-31 */
#endif
} bits;
} MAC_HFDP_t, *PMAC_HFDP_t;

/*
* structure for Maximum Frame Length reg in mac address map.
Expand Down Expand Up @@ -1717,7 +1698,7 @@ typedef struct _MAC_t { /* Location: */
MAC_CFG1_t cfg1; /* 0x5000 */
MAC_CFG2_t cfg2; /* 0x5004 */
u32 ipg; /* 0x5008 */
MAC_HFDP_t hfdp; /* 0x500C */
u32 hfdp; /* 0x500C */
MAC_MAX_FM_LEN_t max_fm_len; /* 0x5010 */
u32 rsv1; /* 0x5014 */
u32 rsv2; /* 0x5018 */
Expand Down
11 changes: 2 additions & 9 deletions trunk/drivers/staging/et131x/et1310_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ void ConfigMACRegs1(struct et131x_adapter *etdev)
MAC_STATION_ADDR1_t station1;
MAC_STATION_ADDR2_t station2;
u32 ipg;
MAC_HFDP_t hfdp;
MII_MGMT_CFG_t mii_mgmt_cfg;

/* First we need to reset everything. Write to MAC configuration
Expand All @@ -116,14 +115,8 @@ void ConfigMACRegs1(struct et131x_adapter *etdev)
writel(ipg, &pMac->ipg);

/* Next lets configure the MAC Half Duplex register */
hfdp.bits.alt_beb_trunc = 0xA;
hfdp.bits.alt_beb_enable = 0x0;
hfdp.bits.bp_no_backoff = 0x0;
hfdp.bits.no_backoff = 0x0;
hfdp.bits.excess_defer = 0x1;
hfdp.bits.rexmit_max = 0xF;
hfdp.bits.coll_window = 0x37; /* 55d */
writel(hfdp.value, &pMac->hfdp.value);
/* BEB trunc 0xA, Ex Defer, Rexmit 0xF Coll 0x37 */
writel(0x00A1F037, &pMac->hfdp);

/* Next lets configure the MAC Interface Control register */
writel(0, &pMac->if_ctrl.value);
Expand Down

0 comments on commit 565e427

Please sign in to comment.