Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225459
b: refs/heads/master
c: f0298f8
h: refs/heads/master
i:
  225457: 914e768
  225455: f3f090f
v: v3
  • Loading branch information
françois romieu authored and David S. Miller committed Jan 4, 2011
1 parent 09ee207 commit cf3259b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 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: bca03d5f32c8ee9b5cfa1d32640a63fded6cb3c0
refs/heads/master: f0298f8143e89ac4da306e14b9aa1927e93916d0
22 changes: 14 additions & 8 deletions trunk/drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ static const int multicast_filter_limit = 32;
#define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before first PCI xfer. */
#define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
#define EarlyTxThld 0x3F /* 0x3F means NO early transmit */
#define SafeMtu 0x1c20 /* ... actually life sucks beyond ~7k */
#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */

Expand Down Expand Up @@ -231,7 +230,14 @@ enum rtl_registers {
IntrMitigate = 0xe2,
RxDescAddrLow = 0xe4,
RxDescAddrHigh = 0xe8,
EarlyTxThres = 0xec,
EarlyTxThres = 0xec, /* 8169. Unit of 32 bytes. */

#define NoEarlyTx 0x3f /* Max value : no early transmit. */

MaxTxPacketSize = 0xec, /* 8101/8168. Unit of 128 bytes. */

#define TxPacketMax (8064 >> 7)

FuncEvent = 0xf0,
FuncEventMask = 0xf4,
FuncPresetState = 0xf8,
Expand Down Expand Up @@ -2901,7 +2907,7 @@ static void rtl_hw_start_8169(struct net_device *dev)
(tp->mac_version == RTL_GIGA_MAC_VER_04))
RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);

RTL_W8(EarlyTxThres, EarlyTxThld);
RTL_W8(EarlyTxThres, NoEarlyTx);

rtl_set_rx_max_size(ioaddr, rx_buf_sz);

Expand Down Expand Up @@ -3036,7 +3042,7 @@ static void rtl_hw_start_8168bef(void __iomem *ioaddr, struct pci_dev *pdev)
{
rtl_hw_start_8168bb(ioaddr, pdev);

RTL_W8(EarlyTxThres, EarlyTxThld);
RTL_W8(MaxTxPacketSize, TxPacketMax);

RTL_W8(Config4, RTL_R8(Config4) & ~(1 << 0));
}
Expand Down Expand Up @@ -3091,7 +3097,7 @@ static void rtl_hw_start_8168cp_3(void __iomem *ioaddr, struct pci_dev *pdev)
/* Magic. */
RTL_W8(DBG_REG, 0x20);

RTL_W8(EarlyTxThres, EarlyTxThld);
RTL_W8(MaxTxPacketSize, TxPacketMax);

rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);

Expand Down Expand Up @@ -3147,7 +3153,7 @@ static void rtl_hw_start_8168d(void __iomem *ioaddr, struct pci_dev *pdev)

rtl_disable_clock_request(pdev);

RTL_W8(EarlyTxThres, EarlyTxThld);
RTL_W8(MaxTxPacketSize, TxPacketMax);

rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);

Expand All @@ -3162,7 +3168,7 @@ static void rtl_hw_start_8168(struct net_device *dev)

RTL_W8(Cfg9346, Cfg9346_Unlock);

RTL_W8(EarlyTxThres, EarlyTxThld);
RTL_W8(MaxTxPacketSize, TxPacketMax);

rtl_set_rx_max_size(ioaddr, rx_buf_sz);

Expand Down Expand Up @@ -3342,7 +3348,7 @@ static void rtl_hw_start_8101(struct net_device *dev)

RTL_W8(Cfg9346, Cfg9346_Unlock);

RTL_W8(EarlyTxThres, EarlyTxThld);
RTL_W8(MaxTxPacketSize, TxPacketMax);

rtl_set_rx_max_size(ioaddr, rx_buf_sz);

Expand Down

0 comments on commit cf3259b

Please sign in to comment.