Commit af667a29 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher

e1000e: consistent use of Rx/Tx vs. RX/TX/rx/tx in comments/logs

Some minor comment errors and whitespace issues discovered while looking
into this are also addressed.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 0d6057e4
...@@ -1310,7 +1310,7 @@ static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw) ...@@ -1310,7 +1310,7 @@ static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
* apply workaround for hardware errata documented in errata * apply workaround for hardware errata documented in errata
* docs Fixes issue where some error prone or unreliable PCIe * docs Fixes issue where some error prone or unreliable PCIe
* completions are occurring, particularly with ASPM enabled. * completions are occurring, particularly with ASPM enabled.
* Without fix, issue can cause tx timeouts. * Without fix, issue can cause Tx timeouts.
*/ */
reg = er32(GCR2); reg = er32(GCR2);
reg |= 1; reg |= 1;
......
...@@ -102,7 +102,7 @@ enum e1e_registers { ...@@ -102,7 +102,7 @@ enum e1e_registers {
E1000_RDTR = 0x02820, /* Rx Delay Timer - RW */ E1000_RDTR = 0x02820, /* Rx Delay Timer - RW */
E1000_RXDCTL_BASE = 0x02828, /* Rx Descriptor Control - RW */ E1000_RXDCTL_BASE = 0x02828, /* Rx Descriptor Control - RW */
#define E1000_RXDCTL(_n) (E1000_RXDCTL_BASE + (_n << 8)) #define E1000_RXDCTL(_n) (E1000_RXDCTL_BASE + (_n << 8))
E1000_RADV = 0x0282C, /* RX Interrupt Absolute Delay Timer - RW */ E1000_RADV = 0x0282C, /* Rx Interrupt Absolute Delay Timer - RW */
/* Convenience macros /* Convenience macros
* *
......
...@@ -533,7 +533,7 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw) ...@@ -533,7 +533,7 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw)
mac->autoneg_failed = 1; mac->autoneg_failed = 1;
return 0; return 0;
} }
e_dbg("NOT RXing /C/, disable AutoNeg and force link.\n"); e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link.\n");
/* Disable auto-negotiation in the TXCW register */ /* Disable auto-negotiation in the TXCW register */
ew32(TXCW, (mac->txcw & ~E1000_TXCW_ANE)); ew32(TXCW, (mac->txcw & ~E1000_TXCW_ANE));
...@@ -556,7 +556,7 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw) ...@@ -556,7 +556,7 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw)
* and disable forced link in the Device Control register * and disable forced link in the Device Control register
* in an attempt to auto-negotiate with our link partner. * in an attempt to auto-negotiate with our link partner.
*/ */
e_dbg("RXing /C/, enable AutoNeg and stop forcing link.\n"); e_dbg("Rx'ing /C/, enable AutoNeg and stop forcing link.\n");
ew32(TXCW, mac->txcw); ew32(TXCW, mac->txcw);
ew32(CTRL, (ctrl & ~E1000_CTRL_SLU)); ew32(CTRL, (ctrl & ~E1000_CTRL_SLU));
...@@ -598,7 +598,7 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw) ...@@ -598,7 +598,7 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
mac->autoneg_failed = 1; mac->autoneg_failed = 1;
return 0; return 0;
} }
e_dbg("NOT RXing /C/, disable AutoNeg and force link.\n"); e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link.\n");
/* Disable auto-negotiation in the TXCW register */ /* Disable auto-negotiation in the TXCW register */
ew32(TXCW, (mac->txcw & ~E1000_TXCW_ANE)); ew32(TXCW, (mac->txcw & ~E1000_TXCW_ANE));
...@@ -621,7 +621,7 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw) ...@@ -621,7 +621,7 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
* and disable forced link in the Device Control register * and disable forced link in the Device Control register
* in an attempt to auto-negotiate with our link partner. * in an attempt to auto-negotiate with our link partner.
*/ */
e_dbg("RXing /C/, enable AutoNeg and stop forcing link.\n"); e_dbg("Rx'ing /C/, enable AutoNeg and stop forcing link.\n");
ew32(TXCW, mac->txcw); ew32(TXCW, mac->txcw);
ew32(CTRL, (ctrl & ~E1000_CTRL_SLU)); ew32(CTRL, (ctrl & ~E1000_CTRL_SLU));
...@@ -1189,7 +1189,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw) ...@@ -1189,7 +1189,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
} else { } else {
hw->fc.current_mode = e1000_fc_rx_pause; hw->fc.current_mode = e1000_fc_rx_pause;
e_dbg("Flow Control = " e_dbg("Flow Control = "
"RX PAUSE frames only.\r\n"); "Rx PAUSE frames only.\r\n");
} }
} }
/* /*
......
...@@ -99,7 +99,7 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = { ...@@ -99,7 +99,7 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = {
/* Interrupt Registers */ /* Interrupt Registers */
{E1000_ICR, "ICR"}, {E1000_ICR, "ICR"},
/* RX Registers */ /* Rx Registers */
{E1000_RCTL, "RCTL"}, {E1000_RCTL, "RCTL"},
{E1000_RDLEN, "RDLEN"}, {E1000_RDLEN, "RDLEN"},
{E1000_RDH, "RDH"}, {E1000_RDH, "RDH"},
...@@ -115,7 +115,7 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = { ...@@ -115,7 +115,7 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = {
{E1000_RDFTS, "RDFTS"}, {E1000_RDFTS, "RDFTS"},
{E1000_RDFPC, "RDFPC"}, {E1000_RDFPC, "RDFPC"},
/* TX Registers */ /* Tx Registers */
{E1000_TCTL, "TCTL"}, {E1000_TCTL, "TCTL"},
{E1000_TDBAL, "TDBAL"}, {E1000_TDBAL, "TDBAL"},
{E1000_TDBAH, "TDBAH"}, {E1000_TDBAH, "TDBAH"},
...@@ -171,9 +171,8 @@ static void e1000_regdump(struct e1000_hw *hw, struct e1000_reg_info *reginfo) ...@@ -171,9 +171,8 @@ static void e1000_regdump(struct e1000_hw *hw, struct e1000_reg_info *reginfo)
printk(KERN_CONT "\n"); printk(KERN_CONT "\n");
} }
/* /*
* e1000e_dump - Print registers, tx-ring and rx-ring * e1000e_dump - Print registers, Tx-ring and Rx-ring
*/ */
static void e1000e_dump(struct e1000_adapter *adapter) static void e1000e_dump(struct e1000_adapter *adapter)
{ {
...@@ -182,12 +181,20 @@ static void e1000e_dump(struct e1000_adapter *adapter) ...@@ -182,12 +181,20 @@ static void e1000e_dump(struct e1000_adapter *adapter)
struct e1000_reg_info *reginfo; struct e1000_reg_info *reginfo;
struct e1000_ring *tx_ring = adapter->tx_ring; struct e1000_ring *tx_ring = adapter->tx_ring;
struct e1000_tx_desc *tx_desc; struct e1000_tx_desc *tx_desc;
struct my_u0 { u64 a; u64 b; } *u0; struct my_u0 {
u64 a;
u64 b;
} *u0;
struct e1000_buffer *buffer_info; struct e1000_buffer *buffer_info;
struct e1000_ring *rx_ring = adapter->rx_ring; struct e1000_ring *rx_ring = adapter->rx_ring;
union e1000_rx_desc_packet_split *rx_desc_ps; union e1000_rx_desc_packet_split *rx_desc_ps;
struct e1000_rx_desc *rx_desc; struct e1000_rx_desc *rx_desc;
struct my_u1 { u64 a; u64 b; u64 c; u64 d; } *u1; struct my_u1 {
u64 a;
u64 b;
u64 c;
u64 d;
} *u1;
u32 staterr; u32 staterr;
int i = 0; int i = 0;
...@@ -200,9 +207,7 @@ static void e1000e_dump(struct e1000_adapter *adapter) ...@@ -200,9 +207,7 @@ static void e1000e_dump(struct e1000_adapter *adapter)
printk(KERN_INFO "Device Name state " printk(KERN_INFO "Device Name state "
"trans_start last_rx\n"); "trans_start last_rx\n");
printk(KERN_INFO "%-15s %016lX %016lX %016lX\n", printk(KERN_INFO "%-15s %016lX %016lX %016lX\n",
netdev->name, netdev->name, netdev->state, netdev->trans_start,
netdev->state,
netdev->trans_start,
netdev->last_rx); netdev->last_rx);
} }
...@@ -214,11 +219,11 @@ static void e1000e_dump(struct e1000_adapter *adapter) ...@@ -214,11 +219,11 @@ static void e1000e_dump(struct e1000_adapter *adapter)
e1000_regdump(hw, reginfo); e1000_regdump(hw, reginfo);
} }
/* Print TX Ring Summary */ /* Print Tx Ring Summary */
if (!netdev || !netif_running(netdev)) if (!netdev || !netif_running(netdev))
goto exit; goto exit;
dev_info(&adapter->pdev->dev, "TX Rings Summary\n"); dev_info(&adapter->pdev->dev, "Tx Ring Summary\n");
printk(KERN_INFO "Queue [NTU] [NTC] [bi(ntc)->dma ]" printk(KERN_INFO "Queue [NTU] [NTC] [bi(ntc)->dma ]"
" leng ntw timestamp\n"); " leng ntw timestamp\n");
buffer_info = &tx_ring->buffer_info[tx_ring->next_to_clean]; buffer_info = &tx_ring->buffer_info[tx_ring->next_to_clean];
...@@ -229,11 +234,11 @@ static void e1000e_dump(struct e1000_adapter *adapter) ...@@ -229,11 +234,11 @@ static void e1000e_dump(struct e1000_adapter *adapter)
buffer_info->next_to_watch, buffer_info->next_to_watch,
(unsigned long long)buffer_info->time_stamp); (unsigned long long)buffer_info->time_stamp);
/* Print TX Rings */ /* Print Tx Ring */
if (!netif_msg_tx_done(adapter)) if (!netif_msg_tx_done(adapter))
goto rx_ring_summary; goto rx_ring_summary;
dev_info(&adapter->pdev->dev, "TX Rings Dump\n"); dev_info(&adapter->pdev->dev, "Tx Ring Dump\n");
/* Transmit Descriptor Formats - DEXT[29] is 0 (Legacy) or 1 (Extended) /* Transmit Descriptor Formats - DEXT[29] is 0 (Legacy) or 1 (Extended)
* *
...@@ -277,8 +282,8 @@ static void e1000e_dump(struct e1000_adapter *adapter) ...@@ -277,8 +282,8 @@ static void e1000e_dump(struct e1000_adapter *adapter)
u0 = (struct my_u0 *)tx_desc; u0 = (struct my_u0 *)tx_desc;
printk(KERN_INFO "T%c[0x%03X] %016llX %016llX %016llX " printk(KERN_INFO "T%c[0x%03X] %016llX %016llX %016llX "
"%04X %3X %016llX %p", "%04X %3X %016llX %p",
(!(le64_to_cpu(u0->b) & (1<<29)) ? 'l' : (!(le64_to_cpu(u0->b) & (1 << 29)) ? 'l' :
((le64_to_cpu(u0->b) & (1<<20)) ? 'd' : 'c')), i, ((le64_to_cpu(u0->b) & (1 << 20)) ? 'd' : 'c')), i,
(unsigned long long)le64_to_cpu(u0->a), (unsigned long long)le64_to_cpu(u0->a),
(unsigned long long)le64_to_cpu(u0->b), (unsigned long long)le64_to_cpu(u0->b),
(unsigned long long)buffer_info->dma, (unsigned long long)buffer_info->dma,
...@@ -300,18 +305,18 @@ static void e1000e_dump(struct e1000_adapter *adapter) ...@@ -300,18 +305,18 @@ static void e1000e_dump(struct e1000_adapter *adapter)
buffer_info->length, true); buffer_info->length, true);
} }
/* Print RX Rings Summary */ /* Print Rx Ring Summary */
rx_ring_summary: rx_ring_summary:
dev_info(&adapter->pdev->dev, "RX Rings Summary\n"); dev_info(&adapter->pdev->dev, "Rx Ring Summary\n");
printk(KERN_INFO "Queue [NTU] [NTC]\n"); printk(KERN_INFO "Queue [NTU] [NTC]\n");
printk(KERN_INFO " %5d %5X %5X\n", 0, printk(KERN_INFO " %5d %5X %5X\n", 0,
rx_ring->next_to_use, rx_ring->next_to_clean); rx_ring->next_to_use, rx_ring->next_to_clean);
/* Print RX Rings */ /* Print Rx Ring */
if (!netif_msg_rx_status(adapter)) if (!netif_msg_rx_status(adapter))
goto exit; goto exit;
dev_info(&adapter->pdev->dev, "RX Rings Dump\n"); dev_info(&adapter->pdev->dev, "Rx Ring Dump\n");
switch (adapter->rx_ps_pages) { switch (adapter->rx_ps_pages) {
case 1: case 1:
case 2: case 2:
...@@ -422,7 +427,8 @@ static void e1000e_dump(struct e1000_adapter *adapter) ...@@ -422,7 +427,8 @@ static void e1000e_dump(struct e1000_adapter *adapter)
if (netif_msg_pktdata(adapter)) if (netif_msg_pktdata(adapter))
print_hex_dump(KERN_INFO, "", print_hex_dump(KERN_INFO, "",
DUMP_PREFIX_ADDRESS, DUMP_PREFIX_ADDRESS,
16, 1, phys_to_virt(buffer_info->dma), 16, 1,
phys_to_virt(buffer_info->dma),
adapter->rx_buffer_len, true); adapter->rx_buffer_len, true);
} }
} }
...@@ -450,8 +456,7 @@ static int e1000_desc_unused(struct e1000_ring *ring) ...@@ -450,8 +456,7 @@ static int e1000_desc_unused(struct e1000_ring *ring)
* @skb: pointer to sk_buff to be indicated to stack * @skb: pointer to sk_buff to be indicated to stack
**/ **/
static void e1000_receive_skb(struct e1000_adapter *adapter, static void e1000_receive_skb(struct e1000_adapter *adapter,
struct net_device *netdev, struct net_device *netdev, struct sk_buff *skb,
struct sk_buff *skb,
u8 status, __le16 vlan) u8 status, __le16 vlan)
{ {
skb->protocol = eth_type_trans(skb, netdev); skb->protocol = eth_type_trans(skb, netdev);
...@@ -464,7 +469,7 @@ static void e1000_receive_skb(struct e1000_adapter *adapter, ...@@ -464,7 +469,7 @@ static void e1000_receive_skb(struct e1000_adapter *adapter,
} }
/** /**
* e1000_rx_checksum - Receive Checksum Offload for 82543 * e1000_rx_checksum - Receive Checksum Offload
* @adapter: board private structure * @adapter: board private structure
* @status_err: receive descriptor status and error fields * @status_err: receive descriptor status and error fields
* @csum: receive descriptor csum field * @csum: receive descriptor csum field
...@@ -548,7 +553,7 @@ static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter, ...@@ -548,7 +553,7 @@ static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
adapter->rx_buffer_len, adapter->rx_buffer_len,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
if (dma_mapping_error(&pdev->dev, buffer_info->dma)) { if (dma_mapping_error(&pdev->dev, buffer_info->dma)) {
dev_err(&pdev->dev, "RX DMA map failed\n"); dev_err(&pdev->dev, "Rx DMA map failed\n");
adapter->rx_dma_failed++; adapter->rx_dma_failed++;
break; break;
} }
...@@ -601,7 +606,8 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, ...@@ -601,7 +606,8 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
ps_page = &buffer_info->ps_pages[j]; ps_page = &buffer_info->ps_pages[j];
if (j >= adapter->rx_ps_pages) { if (j >= adapter->rx_ps_pages) {
/* all unused desc entries get hw null ptr */ /* all unused desc entries get hw null ptr */
rx_desc->read.buffer_addr[j+1] = ~cpu_to_le64(0); rx_desc->read.buffer_addr[j + 1] =
~cpu_to_le64(0);
continue; continue;
} }
if (!ps_page->page) { if (!ps_page->page) {
...@@ -617,7 +623,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, ...@@ -617,7 +623,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
if (dma_mapping_error(&pdev->dev, if (dma_mapping_error(&pdev->dev,
ps_page->dma)) { ps_page->dma)) {
dev_err(&adapter->pdev->dev, dev_err(&adapter->pdev->dev,
"RX DMA page map failed\n"); "Rx DMA page map failed\n");
adapter->rx_dma_failed++; adapter->rx_dma_failed++;
goto no_buffers; goto no_buffers;
} }
...@@ -627,7 +633,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, ...@@ -627,7 +633,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
* didn't change because each write-back * didn't change because each write-back
* erases this info. * erases this info.
*/ */
rx_desc->read.buffer_addr[j+1] = rx_desc->read.buffer_addr[j + 1] =
cpu_to_le64(ps_page->dma); cpu_to_le64(ps_page->dma);
} }
...@@ -644,7 +650,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, ...@@ -644,7 +650,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
adapter->rx_ps_bsize0, adapter->rx_ps_bsize0,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
if (dma_mapping_error(&pdev->dev, buffer_info->dma)) { if (dma_mapping_error(&pdev->dev, buffer_info->dma)) {
dev_err(&pdev->dev, "RX DMA map failed\n"); dev_err(&pdev->dev, "Rx DMA map failed\n");
adapter->rx_dma_failed++; adapter->rx_dma_failed++;
/* cleanup skb */ /* cleanup skb */
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
...@@ -662,7 +668,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, ...@@ -662,7 +668,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
* such as IA-64). * such as IA-64).
*/ */
wmb(); wmb();
writel(i<<1, adapter->hw.hw_addr + rx_ring->tail); writel(i << 1, adapter->hw.hw_addr + rx_ring->tail);
} }
i++; i++;
...@@ -1106,11 +1112,10 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, ...@@ -1106,11 +1112,10 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
cleaned = 1; cleaned = 1;
cleaned_count++; cleaned_count++;
dma_unmap_single(&pdev->dev, buffer_info->dma, dma_unmap_single(&pdev->dev, buffer_info->dma,
adapter->rx_ps_bsize0, adapter->rx_ps_bsize0, DMA_FROM_DEVICE);
DMA_FROM_DEVICE);
buffer_info->dma = 0; buffer_info->dma = 0;
/* see !EOP comment in other rx routine */ /* see !EOP comment in other Rx routine */
if (!(staterr & E1000_RXD_STAT_EOP)) if (!(staterr & E1000_RXD_STAT_EOP))
adapter->flags2 |= FLAG2_IS_DISCARDING; adapter->flags2 |= FLAG2_IS_DISCARDING;
...@@ -2610,7 +2615,7 @@ static void e1000_init_manageability_pt(struct e1000_adapter *adapter) ...@@ -2610,7 +2615,7 @@ static void e1000_init_manageability_pt(struct e1000_adapter *adapter)
} }
/** /**
* e1000_configure_tx - Configure 8254x Transmit Unit after Reset * e1000_configure_tx - Configure Transmit Unit after Reset
* @adapter: board private structure * @adapter: board private structure
* *
* Configure the Tx unit of the MAC after a reset. * Configure the Tx unit of the MAC after a reset.
...@@ -2663,7 +2668,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter) ...@@ -2663,7 +2668,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
* hthresh = 1 ==> prefetch when one or more available * hthresh = 1 ==> prefetch when one or more available
* pthresh = 0x1f ==> prefetch if internal cache 31 or less * pthresh = 0x1f ==> prefetch if internal cache 31 or less
* BEWARE: this seems to work but should be considered first if * BEWARE: this seems to work but should be considered first if
* there are tx hangs or other tx related bugs * there are Tx hangs or other Tx related bugs
*/ */
txdctl |= E1000_TXDCTL_DMA_BURST_ENABLE; txdctl |= E1000_TXDCTL_DMA_BURST_ENABLE;
ew32(TXDCTL(0), txdctl); ew32(TXDCTL(0), txdctl);
...@@ -2900,7 +2905,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) ...@@ -2900,7 +2905,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
/* /*
* set the writeback threshold (only takes effect if the RDTR * set the writeback threshold (only takes effect if the RDTR
* is set). set GRAN=1 and write back up to 0x4 worth, and * is set). set GRAN=1 and write back up to 0x4 worth, and
* enable prefetching of 0x20 rx descriptors * enable prefetching of 0x20 Rx descriptors
* granularity = 01 * granularity = 01
* wthresh = 04, * wthresh = 04,
* hthresh = 04, * hthresh = 04,
...@@ -2981,11 +2986,9 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) ...@@ -2981,11 +2986,9 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
* excessive C-state transition latencies result in * excessive C-state transition latencies result in
* dropped transactions. * dropped transactions.
*/ */
pm_qos_update_request( pm_qos_update_request(&adapter->netdev->pm_qos_req, 55);
&adapter->netdev->pm_qos_req, 55);
} else { } else {
pm_qos_update_request( pm_qos_update_request(&adapter->netdev->pm_qos_req,
&adapter->netdev->pm_qos_req,
PM_QOS_DEFAULT_VALUE); PM_QOS_DEFAULT_VALUE);
} }
} }
...@@ -3152,7 +3155,7 @@ void e1000e_reset(struct e1000_adapter *adapter) ...@@ -3152,7 +3155,7 @@ void e1000e_reset(struct e1000_adapter *adapter)
/* lower 16 bits has Rx packet buffer allocation size in KB */ /* lower 16 bits has Rx packet buffer allocation size in KB */
pba &= 0xffff; pba &= 0xffff;
/* /*
* the Tx fifo also stores 16 bytes of information about the tx * the Tx fifo also stores 16 bytes of information about the Tx
* but don't include ethernet FCS because hardware appends it * but don't include ethernet FCS because hardware appends it
*/ */
min_tx_space = (adapter->max_frame_size + min_tx_space = (adapter->max_frame_size +
...@@ -3175,7 +3178,7 @@ void e1000e_reset(struct e1000_adapter *adapter) ...@@ -3175,7 +3178,7 @@ void e1000e_reset(struct e1000_adapter *adapter)
pba -= min_tx_space - tx_space; pba -= min_tx_space - tx_space;
/* /*
* if short on Rx space, Rx wins and must trump tx * if short on Rx space, Rx wins and must trump Tx
* adjustment or use Early Receive if available * adjustment or use Early Receive if available
*/ */
if ((pba < min_rx_space) && if ((pba < min_rx_space) &&
...@@ -4041,9 +4044,9 @@ static void e1000_print_link_info(struct e1000_adapter *adapter) ...@@ -4041,9 +4044,9 @@ static void e1000_print_link_info(struct e1000_adapter *adapter)
(adapter->link_duplex == FULL_DUPLEX) ? (adapter->link_duplex == FULL_DUPLEX) ?
"Full Duplex" : "Half Duplex", "Full Duplex" : "Half Duplex",
((ctrl & E1000_CTRL_TFCE) && (ctrl & E1000_CTRL_RFCE)) ? ((ctrl & E1000_CTRL_TFCE) && (ctrl & E1000_CTRL_RFCE)) ?
"RX/TX" : "Rx/Tx" :
((ctrl & E1000_CTRL_RFCE) ? "RX" : ((ctrl & E1000_CTRL_RFCE) ? "Rx" :
((ctrl & E1000_CTRL_TFCE) ? "TX" : "None" ))); ((ctrl & E1000_CTRL_TFCE) ? "Tx" : "None")));
} }
static bool e1000e_has_link(struct e1000_adapter *adapter) static bool e1000e_has_link(struct e1000_adapter *adapter)
...@@ -4338,7 +4341,7 @@ static void e1000_watchdog_task(struct work_struct *work) ...@@ -4338,7 +4341,7 @@ static void e1000_watchdog_task(struct work_struct *work)
/* Force detection of hung controller every watchdog period */ /* Force detection of hung controller every watchdog period */
adapter->detect_tx_hung = 1; adapter->detect_tx_hung = 1;
/* flush partial descriptors to memory before detecting tx hang */ /* flush partial descriptors to memory before detecting Tx hang */
if (adapter->flags2 & FLAG2_DMA_BURST) { if (adapter->flags2 & FLAG2_DMA_BURST) {
ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD); ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD);
ew32(RDTR, adapter->rx_int_delay | E1000_RDTR_FPD); ew32(RDTR, adapter->rx_int_delay | E1000_RDTR_FPD);
...@@ -4576,7 +4579,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter, ...@@ -4576,7 +4579,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
} }
} }
segs = skb_shinfo(skb)->gso_segs ?: 1; segs = skb_shinfo(skb)->gso_segs ? : 1;
/* multiply data chunks by size of headers */ /* multiply data chunks by size of headers */
bytecount = ((segs - 1) * skb_headlen(skb)) + skb->len; bytecount = ((segs - 1) * skb_headlen(skb)) + skb->len;
...@@ -4588,13 +4591,13 @@ static int e1000_tx_map(struct e1000_adapter *adapter, ...@@ -4588,13 +4591,13 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
return count; return count;
dma_error: dma_error:
dev_err(&pdev->dev, "TX DMA map failed\n"); dev_err(&pdev->dev, "Tx DMA map failed\n");
buffer_info->dma = 0; buffer_info->dma = 0;
if (count) if (count)
count--; count--;
while (count--) { while (count--) {
if (i==0) if (i == 0)
i += tx_ring->count; i += tx_ring->count;
i--; i--;
buffer_info = &tx_ring->buffer_info[i]; buffer_info = &tx_ring->buffer_info[i];
......
...@@ -62,10 +62,9 @@ MODULE_PARM_DESC(copybreak, ...@@ -62,10 +62,9 @@ MODULE_PARM_DESC(copybreak,
module_param_array_named(X, X, int, &num_##X, 0); \ module_param_array_named(X, X, int, &num_##X, 0); \
MODULE_PARM_DESC(X, desc); MODULE_PARM_DESC(X, desc);
/* /*
* Transmit Interrupt Delay in units of 1.024 microseconds * Transmit Interrupt Delay in units of 1.024 microseconds
* Tx interrupt delay needs to typically be set to something non zero * Tx interrupt delay needs to typically be set to something non-zero
* *
* Valid Range: 0-65535 * Valid Range: 0-65535
*/ */
...@@ -112,6 +111,7 @@ E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate"); ...@@ -112,6 +111,7 @@ E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
#define DEFAULT_ITR 3 #define DEFAULT_ITR 3
#define MAX_ITR 100000 #define MAX_ITR 100000
#define MIN_ITR 100 #define MIN_ITR 100
/* IntMode (Interrupt Mode) /* IntMode (Interrupt Mode)
* *
* Valid Range: 0 - 2 * Valid Range: 0 - 2
......
...@@ -640,7 +640,7 @@ s32 e1000_copper_link_setup_82577(struct e1000_hw *hw) ...@@ -640,7 +640,7 @@ s32 e1000_copper_link_setup_82577(struct e1000_hw *hw)
s32 ret_val; s32 ret_val;
u16 phy_data; u16 phy_data;
/* Enable CRS on TX. This must be set for half-duplex operation. */ /* Enable CRS on Tx. This must be set for half-duplex operation. */
ret_val = e1e_rphy(hw, I82577_CFG_REG, &phy_data); ret_val = e1e_rphy(hw, I82577_CFG_REG, &phy_data);
if (ret_val) if (ret_val)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment