Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
This commit is contained in:
commit
f85fa27913
@ -448,7 +448,6 @@ void e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value);
|
|||||||
#define E1000_DEV_ID_INTEL_CE4100_GBE 0x2E6E
|
#define E1000_DEV_ID_INTEL_CE4100_GBE 0x2E6E
|
||||||
|
|
||||||
#define NODE_ADDRESS_SIZE 6
|
#define NODE_ADDRESS_SIZE 6
|
||||||
#define ETH_LENGTH_OF_ADDRESS 6
|
|
||||||
|
|
||||||
/* MAC decode size is 128K - This is the size of BAR0 */
|
/* MAC decode size is 128K - This is the size of BAR0 */
|
||||||
#define MAC_DECODE_SIZE (128 * 1024)
|
#define MAC_DECODE_SIZE (128 * 1024)
|
||||||
|
@ -163,16 +163,13 @@ static void e1000_regdump(struct e1000_hw *hw, struct e1000_reg_info *reginfo)
|
|||||||
regs[n] = __er32(hw, E1000_TARC(n));
|
regs[n] = __er32(hw, E1000_TARC(n));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_INFO "%-15s %08x\n",
|
pr_info("%-15s %08x\n",
|
||||||
reginfo->name, __er32(hw, reginfo->ofs));
|
reginfo->name, __er32(hw, reginfo->ofs));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(rname, 16, "%s%s", reginfo->name, "[0-1]");
|
snprintf(rname, 16, "%s%s", reginfo->name, "[0-1]");
|
||||||
printk(KERN_INFO "%-15s ", rname);
|
pr_info("%-15s %08x %08x\n", rname, regs[0], regs[1]);
|
||||||
for (n = 0; n < 2; n++)
|
|
||||||
printk(KERN_CONT "%08x ", regs[n]);
|
|
||||||
printk(KERN_CONT "\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -208,16 +205,15 @@ static void e1000e_dump(struct e1000_adapter *adapter)
|
|||||||
/* Print netdevice Info */
|
/* Print netdevice Info */
|
||||||
if (netdev) {
|
if (netdev) {
|
||||||
dev_info(&adapter->pdev->dev, "Net device Info\n");
|
dev_info(&adapter->pdev->dev, "Net device Info\n");
|
||||||
printk(KERN_INFO "Device Name state "
|
pr_info("Device Name state trans_start last_rx\n");
|
||||||
"trans_start last_rx\n");
|
pr_info("%-15s %016lX %016lX %016lX\n",
|
||||||
printk(KERN_INFO "%-15s %016lX %016lX %016lX\n",
|
netdev->name, netdev->state, netdev->trans_start,
|
||||||
netdev->name, netdev->state, netdev->trans_start,
|
netdev->last_rx);
|
||||||
netdev->last_rx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print Registers */
|
/* Print Registers */
|
||||||
dev_info(&adapter->pdev->dev, "Register Dump\n");
|
dev_info(&adapter->pdev->dev, "Register Dump\n");
|
||||||
printk(KERN_INFO " Register Name Value\n");
|
pr_info(" Register Name Value\n");
|
||||||
for (reginfo = (struct e1000_reg_info *)e1000_reg_info_tbl;
|
for (reginfo = (struct e1000_reg_info *)e1000_reg_info_tbl;
|
||||||
reginfo->name; reginfo++) {
|
reginfo->name; reginfo++) {
|
||||||
e1000_regdump(hw, reginfo);
|
e1000_regdump(hw, reginfo);
|
||||||
@ -228,15 +224,14 @@ static void e1000e_dump(struct e1000_adapter *adapter)
|
|||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
dev_info(&adapter->pdev->dev, "Tx Ring Summary\n");
|
dev_info(&adapter->pdev->dev, "Tx Ring Summary\n");
|
||||||
printk(KERN_INFO "Queue [NTU] [NTC] [bi(ntc)->dma ]"
|
pr_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];
|
||||||
printk(KERN_INFO " %5d %5X %5X %016llX %04X %3X %016llX\n",
|
pr_info(" %5d %5X %5X %016llX %04X %3X %016llX\n",
|
||||||
0, tx_ring->next_to_use, tx_ring->next_to_clean,
|
0, tx_ring->next_to_use, tx_ring->next_to_clean,
|
||||||
(unsigned long long)buffer_info->dma,
|
(unsigned long long)buffer_info->dma,
|
||||||
buffer_info->length,
|
buffer_info->length,
|
||||||
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 Ring */
|
/* Print Tx Ring */
|
||||||
if (!netif_msg_tx_done(adapter))
|
if (!netif_msg_tx_done(adapter))
|
||||||
@ -271,37 +266,32 @@ static void e1000e_dump(struct e1000_adapter *adapter)
|
|||||||
* +----------------------------------------------------------------+
|
* +----------------------------------------------------------------+
|
||||||
* 63 48 47 40 39 36 35 32 31 24 23 20 19 0
|
* 63 48 47 40 39 36 35 32 31 24 23 20 19 0
|
||||||
*/
|
*/
|
||||||
printk(KERN_INFO "Tl[desc] [address 63:0 ] [SpeCssSCmCsLen]"
|
pr_info("Tl[desc] [address 63:0 ] [SpeCssSCmCsLen] [bi->dma ] leng ntw timestamp bi->skb <-- Legacy format\n");
|
||||||
" [bi->dma ] leng ntw timestamp bi->skb "
|
pr_info("Tc[desc] [Ce CoCsIpceCoS] [MssHlRSCm0Plen] [bi->dma ] leng ntw timestamp bi->skb <-- Ext Context format\n");
|
||||||
"<-- Legacy format\n");
|
pr_info("Td[desc] [address 63:0 ] [VlaPoRSCm1Dlen] [bi->dma ] leng ntw timestamp bi->skb <-- Ext Data format\n");
|
||||||
printk(KERN_INFO "Tc[desc] [Ce CoCsIpceCoS] [MssHlRSCm0Plen]"
|
|
||||||
" [bi->dma ] leng ntw timestamp bi->skb "
|
|
||||||
"<-- Ext Context format\n");
|
|
||||||
printk(KERN_INFO "Td[desc] [address 63:0 ] [VlaPoRSCm1Dlen]"
|
|
||||||
" [bi->dma ] leng ntw timestamp bi->skb "
|
|
||||||
"<-- Ext Data format\n");
|
|
||||||
for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) {
|
for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) {
|
||||||
|
const char *next_desc;
|
||||||
tx_desc = E1000_TX_DESC(*tx_ring, i);
|
tx_desc = E1000_TX_DESC(*tx_ring, i);
|
||||||
buffer_info = &tx_ring->buffer_info[i];
|
buffer_info = &tx_ring->buffer_info[i];
|
||||||
u0 = (struct my_u0 *)tx_desc;
|
u0 = (struct my_u0 *)tx_desc;
|
||||||
printk(KERN_INFO "T%c[0x%03X] %016llX %016llX %016llX "
|
|
||||||
"%04X %3X %016llX %p",
|
|
||||||
(!(le64_to_cpu(u0->b) & (1 << 29)) ? 'l' :
|
|
||||||
((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->b),
|
|
||||||
(unsigned long long)buffer_info->dma,
|
|
||||||
buffer_info->length, buffer_info->next_to_watch,
|
|
||||||
(unsigned long long)buffer_info->time_stamp,
|
|
||||||
buffer_info->skb);
|
|
||||||
if (i == tx_ring->next_to_use && i == tx_ring->next_to_clean)
|
if (i == tx_ring->next_to_use && i == tx_ring->next_to_clean)
|
||||||
printk(KERN_CONT " NTC/U\n");
|
next_desc = " NTC/U";
|
||||||
else if (i == tx_ring->next_to_use)
|
else if (i == tx_ring->next_to_use)
|
||||||
printk(KERN_CONT " NTU\n");
|
next_desc = " NTU";
|
||||||
else if (i == tx_ring->next_to_clean)
|
else if (i == tx_ring->next_to_clean)
|
||||||
printk(KERN_CONT " NTC\n");
|
next_desc = " NTC";
|
||||||
else
|
else
|
||||||
printk(KERN_CONT "\n");
|
next_desc = "";
|
||||||
|
pr_info("T%c[0x%03X] %016llX %016llX %016llX %04X %3X %016llX %p%s\n",
|
||||||
|
(!(le64_to_cpu(u0->b) & (1 << 29)) ? 'l' :
|
||||||
|
((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->b),
|
||||||
|
(unsigned long long)buffer_info->dma,
|
||||||
|
buffer_info->length, buffer_info->next_to_watch,
|
||||||
|
(unsigned long long)buffer_info->time_stamp,
|
||||||
|
buffer_info->skb, next_desc);
|
||||||
|
|
||||||
if (netif_msg_pktdata(adapter) && buffer_info->dma != 0)
|
if (netif_msg_pktdata(adapter) && buffer_info->dma != 0)
|
||||||
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS,
|
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS,
|
||||||
@ -312,9 +302,9 @@ static void e1000e_dump(struct e1000_adapter *adapter)
|
|||||||
/* Print Rx Ring Summary */
|
/* Print Rx Ring Summary */
|
||||||
rx_ring_summary:
|
rx_ring_summary:
|
||||||
dev_info(&adapter->pdev->dev, "Rx Ring Summary\n");
|
dev_info(&adapter->pdev->dev, "Rx Ring Summary\n");
|
||||||
printk(KERN_INFO "Queue [NTU] [NTC]\n");
|
pr_info("Queue [NTU] [NTC]\n");
|
||||||
printk(KERN_INFO " %5d %5X %5X\n", 0,
|
pr_info(" %5d %5X %5X\n",
|
||||||
rx_ring->next_to_use, rx_ring->next_to_clean);
|
0, rx_ring->next_to_use, rx_ring->next_to_clean);
|
||||||
|
|
||||||
/* Print Rx Ring */
|
/* Print Rx Ring */
|
||||||
if (!netif_msg_rx_status(adapter))
|
if (!netif_msg_rx_status(adapter))
|
||||||
@ -337,10 +327,7 @@ rx_ring_summary:
|
|||||||
* 24 | Buffer Address 3 [63:0] |
|
* 24 | Buffer Address 3 [63:0] |
|
||||||
* +-----------------------------------------------------+
|
* +-----------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
printk(KERN_INFO "R [desc] [buffer 0 63:0 ] "
|
pr_info("R [desc] [buffer 0 63:0 ] [buffer 1 63:0 ] [buffer 2 63:0 ] [buffer 3 63:0 ] [bi->dma ] [bi->skb] <-- Ext Pkt Split format\n");
|
||||||
"[buffer 1 63:0 ] "
|
|
||||||
"[buffer 2 63:0 ] [buffer 3 63:0 ] [bi->dma ] "
|
|
||||||
"[bi->skb] <-- Ext Pkt Split format\n");
|
|
||||||
/* [Extended] Receive Descriptor (Write-Back) Format
|
/* [Extended] Receive Descriptor (Write-Back) Format
|
||||||
*
|
*
|
||||||
* 63 48 47 32 31 13 12 8 7 4 3 0
|
* 63 48 47 32 31 13 12 8 7 4 3 0
|
||||||
@ -352,35 +339,40 @@ rx_ring_summary:
|
|||||||
* +------------------------------------------------------+
|
* +------------------------------------------------------+
|
||||||
* 63 48 47 32 31 20 19 0
|
* 63 48 47 32 31 20 19 0
|
||||||
*/
|
*/
|
||||||
printk(KERN_INFO "RWB[desc] [ck ipid mrqhsh] "
|
pr_info("RWB[desc] [ck ipid mrqhsh] [vl l0 ee es] [ l3 l2 l1 hs] [reserved ] ---------------- [bi->skb] <-- Ext Rx Write-Back format\n");
|
||||||
"[vl l0 ee es] "
|
|
||||||
"[ l3 l2 l1 hs] [reserved ] ---------------- "
|
|
||||||
"[bi->skb] <-- Ext Rx Write-Back format\n");
|
|
||||||
for (i = 0; i < rx_ring->count; i++) {
|
for (i = 0; i < rx_ring->count; i++) {
|
||||||
|
const char *next_desc;
|
||||||
buffer_info = &rx_ring->buffer_info[i];
|
buffer_info = &rx_ring->buffer_info[i];
|
||||||
rx_desc_ps = E1000_RX_DESC_PS(*rx_ring, i);
|
rx_desc_ps = E1000_RX_DESC_PS(*rx_ring, i);
|
||||||
u1 = (struct my_u1 *)rx_desc_ps;
|
u1 = (struct my_u1 *)rx_desc_ps;
|
||||||
staterr =
|
staterr =
|
||||||
le32_to_cpu(rx_desc_ps->wb.middle.status_error);
|
le32_to_cpu(rx_desc_ps->wb.middle.status_error);
|
||||||
|
|
||||||
|
if (i == rx_ring->next_to_use)
|
||||||
|
next_desc = " NTU";
|
||||||
|
else if (i == rx_ring->next_to_clean)
|
||||||
|
next_desc = " NTC";
|
||||||
|
else
|
||||||
|
next_desc = "";
|
||||||
|
|
||||||
if (staterr & E1000_RXD_STAT_DD) {
|
if (staterr & E1000_RXD_STAT_DD) {
|
||||||
/* Descriptor Done */
|
/* Descriptor Done */
|
||||||
printk(KERN_INFO "RWB[0x%03X] %016llX "
|
pr_info("%s[0x%03X] %016llX %016llX %016llX %016llX ---------------- %p%s\n",
|
||||||
"%016llX %016llX %016llX "
|
"RWB", i,
|
||||||
"---------------- %p", i,
|
(unsigned long long)le64_to_cpu(u1->a),
|
||||||
(unsigned long long)le64_to_cpu(u1->a),
|
(unsigned long long)le64_to_cpu(u1->b),
|
||||||
(unsigned long long)le64_to_cpu(u1->b),
|
(unsigned long long)le64_to_cpu(u1->c),
|
||||||
(unsigned long long)le64_to_cpu(u1->c),
|
(unsigned long long)le64_to_cpu(u1->d),
|
||||||
(unsigned long long)le64_to_cpu(u1->d),
|
buffer_info->skb, next_desc);
|
||||||
buffer_info->skb);
|
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_INFO "R [0x%03X] %016llX "
|
pr_info("%s[0x%03X] %016llX %016llX %016llX %016llX %016llX %p%s\n",
|
||||||
"%016llX %016llX %016llX %016llX %p", i,
|
"R ", i,
|
||||||
(unsigned long long)le64_to_cpu(u1->a),
|
(unsigned long long)le64_to_cpu(u1->a),
|
||||||
(unsigned long long)le64_to_cpu(u1->b),
|
(unsigned long long)le64_to_cpu(u1->b),
|
||||||
(unsigned long long)le64_to_cpu(u1->c),
|
(unsigned long long)le64_to_cpu(u1->c),
|
||||||
(unsigned long long)le64_to_cpu(u1->d),
|
(unsigned long long)le64_to_cpu(u1->d),
|
||||||
(unsigned long long)buffer_info->dma,
|
(unsigned long long)buffer_info->dma,
|
||||||
buffer_info->skb);
|
buffer_info->skb, next_desc);
|
||||||
|
|
||||||
if (netif_msg_pktdata(adapter))
|
if (netif_msg_pktdata(adapter))
|
||||||
print_hex_dump(KERN_INFO, "",
|
print_hex_dump(KERN_INFO, "",
|
||||||
@ -388,13 +380,6 @@ rx_ring_summary:
|
|||||||
phys_to_virt(buffer_info->dma),
|
phys_to_virt(buffer_info->dma),
|
||||||
adapter->rx_ps_bsize0, true);
|
adapter->rx_ps_bsize0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == rx_ring->next_to_use)
|
|
||||||
printk(KERN_CONT " NTU\n");
|
|
||||||
else if (i == rx_ring->next_to_clean)
|
|
||||||
printk(KERN_CONT " NTC\n");
|
|
||||||
else
|
|
||||||
printk(KERN_CONT "\n");
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -407,9 +392,7 @@ rx_ring_summary:
|
|||||||
* 8 | Reserved |
|
* 8 | Reserved |
|
||||||
* +-----------------------------------------------------+
|
* +-----------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
printk(KERN_INFO "R [desc] [buf addr 63:0 ] "
|
pr_info("R [desc] [buf addr 63:0 ] [reserved 63:0 ] [bi->dma ] [bi->skb] <-- Ext (Read) format\n");
|
||||||
"[reserved 63:0 ] [bi->dma ] "
|
|
||||||
"[bi->skb] <-- Ext (Read) format\n");
|
|
||||||
/* Extended Receive Descriptor (Write-Back) Format
|
/* Extended Receive Descriptor (Write-Back) Format
|
||||||
*
|
*
|
||||||
* 63 48 47 32 31 24 23 4 3 0
|
* 63 48 47 32 31 24 23 4 3 0
|
||||||
@ -423,29 +406,37 @@ rx_ring_summary:
|
|||||||
* +------------------------------------------------------+
|
* +------------------------------------------------------+
|
||||||
* 63 48 47 32 31 20 19 0
|
* 63 48 47 32 31 20 19 0
|
||||||
*/
|
*/
|
||||||
printk(KERN_INFO "RWB[desc] [cs ipid mrq] "
|
pr_info("RWB[desc] [cs ipid mrq] [vt ln xe xs] [bi->skb] <-- Ext (Write-Back) format\n");
|
||||||
"[vt ln xe xs] "
|
|
||||||
"[bi->skb] <-- Ext (Write-Back) format\n");
|
|
||||||
|
|
||||||
for (i = 0; i < rx_ring->count; i++) {
|
for (i = 0; i < rx_ring->count; i++) {
|
||||||
|
const char *next_desc;
|
||||||
|
|
||||||
buffer_info = &rx_ring->buffer_info[i];
|
buffer_info = &rx_ring->buffer_info[i];
|
||||||
rx_desc = E1000_RX_DESC_EXT(*rx_ring, i);
|
rx_desc = E1000_RX_DESC_EXT(*rx_ring, i);
|
||||||
u1 = (struct my_u1 *)rx_desc;
|
u1 = (struct my_u1 *)rx_desc;
|
||||||
staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
|
staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
|
||||||
|
|
||||||
|
if (i == rx_ring->next_to_use)
|
||||||
|
next_desc = " NTU";
|
||||||
|
else if (i == rx_ring->next_to_clean)
|
||||||
|
next_desc = " NTC";
|
||||||
|
else
|
||||||
|
next_desc = "";
|
||||||
|
|
||||||
if (staterr & E1000_RXD_STAT_DD) {
|
if (staterr & E1000_RXD_STAT_DD) {
|
||||||
/* Descriptor Done */
|
/* Descriptor Done */
|
||||||
printk(KERN_INFO "RWB[0x%03X] %016llX "
|
pr_info("%s[0x%03X] %016llX %016llX ---------------- %p%s\n",
|
||||||
"%016llX ---------------- %p", i,
|
"RWB", i,
|
||||||
(unsigned long long)le64_to_cpu(u1->a),
|
(unsigned long long)le64_to_cpu(u1->a),
|
||||||
(unsigned long long)le64_to_cpu(u1->b),
|
(unsigned long long)le64_to_cpu(u1->b),
|
||||||
buffer_info->skb);
|
buffer_info->skb, next_desc);
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_INFO "R [0x%03X] %016llX "
|
pr_info("%s[0x%03X] %016llX %016llX %016llX %p%s\n",
|
||||||
"%016llX %016llX %p", i,
|
"R ", i,
|
||||||
(unsigned long long)le64_to_cpu(u1->a),
|
(unsigned long long)le64_to_cpu(u1->a),
|
||||||
(unsigned long long)le64_to_cpu(u1->b),
|
(unsigned long long)le64_to_cpu(u1->b),
|
||||||
(unsigned long long)buffer_info->dma,
|
(unsigned long long)buffer_info->dma,
|
||||||
buffer_info->skb);
|
buffer_info->skb, next_desc);
|
||||||
|
|
||||||
if (netif_msg_pktdata(adapter))
|
if (netif_msg_pktdata(adapter))
|
||||||
print_hex_dump(KERN_INFO, "",
|
print_hex_dump(KERN_INFO, "",
|
||||||
@ -456,13 +447,6 @@ rx_ring_summary:
|
|||||||
adapter->rx_buffer_len,
|
adapter->rx_buffer_len,
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == rx_ring->next_to_use)
|
|
||||||
printk(KERN_CONT " NTU\n");
|
|
||||||
else if (i == rx_ring->next_to_clean)
|
|
||||||
printk(KERN_CONT " NTC\n");
|
|
||||||
else
|
|
||||||
printk(KERN_CONT "\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1222,8 +1206,7 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
|
|||||||
adapter->flags2 |= FLAG2_IS_DISCARDING;
|
adapter->flags2 |= FLAG2_IS_DISCARDING;
|
||||||
|
|
||||||
if (adapter->flags2 & FLAG2_IS_DISCARDING) {
|
if (adapter->flags2 & FLAG2_IS_DISCARDING) {
|
||||||
e_dbg("Packet Split buffers didn't pick up the full "
|
e_dbg("Packet Split buffers didn't pick up the full packet\n");
|
||||||
"packet\n");
|
|
||||||
dev_kfree_skb_irq(skb);
|
dev_kfree_skb_irq(skb);
|
||||||
if (staterr & E1000_RXD_STAT_EOP)
|
if (staterr & E1000_RXD_STAT_EOP)
|
||||||
adapter->flags2 &= ~FLAG2_IS_DISCARDING;
|
adapter->flags2 &= ~FLAG2_IS_DISCARDING;
|
||||||
@ -1238,8 +1221,7 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
|
|||||||
length = le16_to_cpu(rx_desc->wb.middle.length0);
|
length = le16_to_cpu(rx_desc->wb.middle.length0);
|
||||||
|
|
||||||
if (!length) {
|
if (!length) {
|
||||||
e_dbg("Last part of the packet spanning multiple "
|
e_dbg("Last part of the packet spanning multiple descriptors\n");
|
||||||
"descriptors\n");
|
|
||||||
dev_kfree_skb_irq(skb);
|
dev_kfree_skb_irq(skb);
|
||||||
goto next_desc;
|
goto next_desc;
|
||||||
}
|
}
|
||||||
@ -1917,8 +1899,7 @@ void e1000e_set_interrupt_capability(struct e1000_adapter *adapter)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* MSI-X failed, so fall through and try MSI */
|
/* MSI-X failed, so fall through and try MSI */
|
||||||
e_err("Failed to initialize MSI-X interrupts. "
|
e_err("Failed to initialize MSI-X interrupts. Falling back to MSI interrupts.\n");
|
||||||
"Falling back to MSI interrupts.\n");
|
|
||||||
e1000e_reset_interrupt_capability(adapter);
|
e1000e_reset_interrupt_capability(adapter);
|
||||||
}
|
}
|
||||||
adapter->int_mode = E1000E_INT_MODE_MSI;
|
adapter->int_mode = E1000E_INT_MODE_MSI;
|
||||||
@ -1928,8 +1909,7 @@ void e1000e_set_interrupt_capability(struct e1000_adapter *adapter)
|
|||||||
adapter->flags |= FLAG_MSI_ENABLED;
|
adapter->flags |= FLAG_MSI_ENABLED;
|
||||||
} else {
|
} else {
|
||||||
adapter->int_mode = E1000E_INT_MODE_LEGACY;
|
adapter->int_mode = E1000E_INT_MODE_LEGACY;
|
||||||
e_err("Failed to initialize MSI interrupts. Falling "
|
e_err("Failed to initialize MSI interrupts. Falling back to legacy interrupts.\n");
|
||||||
"back to legacy interrupts.\n");
|
|
||||||
}
|
}
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
case E1000E_INT_MODE_LEGACY:
|
case E1000E_INT_MODE_LEGACY:
|
||||||
@ -3113,79 +3093,147 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* e1000_update_mc_addr_list - Update Multicast addresses
|
* e1000e_write_mc_addr_list - write multicast addresses to MTA
|
||||||
* @hw: pointer to the HW structure
|
|
||||||
* @mc_addr_list: array of multicast addresses to program
|
|
||||||
* @mc_addr_count: number of multicast addresses to program
|
|
||||||
*
|
|
||||||
* Updates the Multicast Table Array.
|
|
||||||
* The caller must have a packed mc_addr_list of multicast addresses.
|
|
||||||
**/
|
|
||||||
static void e1000_update_mc_addr_list(struct e1000_hw *hw, u8 *mc_addr_list,
|
|
||||||
u32 mc_addr_count)
|
|
||||||
{
|
|
||||||
hw->mac.ops.update_mc_addr_list(hw, mc_addr_list, mc_addr_count);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* e1000_set_multi - Multicast and Promiscuous mode set
|
|
||||||
* @netdev: network interface device structure
|
* @netdev: network interface device structure
|
||||||
*
|
*
|
||||||
* The set_multi entry point is called whenever the multicast address
|
* Writes multicast address list to the MTA hash table.
|
||||||
* list or the network interface flags are updated. This routine is
|
* Returns: -ENOMEM on failure
|
||||||
* responsible for configuring the hardware for proper multicast,
|
* 0 on no addresses written
|
||||||
* promiscuous mode, and all-multi behavior.
|
* X on writing X addresses to MTA
|
||||||
**/
|
*/
|
||||||
static void e1000_set_multi(struct net_device *netdev)
|
static int e1000e_write_mc_addr_list(struct net_device *netdev)
|
||||||
{
|
{
|
||||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||||
struct e1000_hw *hw = &adapter->hw;
|
struct e1000_hw *hw = &adapter->hw;
|
||||||
struct netdev_hw_addr *ha;
|
struct netdev_hw_addr *ha;
|
||||||
u8 *mta_list;
|
u8 *mta_list;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (netdev_mc_empty(netdev)) {
|
||||||
|
/* nothing to program, so clear mc list */
|
||||||
|
hw->mac.ops.update_mc_addr_list(hw, NULL, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
mta_list = kzalloc(netdev_mc_count(netdev) * ETH_ALEN, GFP_ATOMIC);
|
||||||
|
if (!mta_list)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
/* update_mc_addr_list expects a packed array of only addresses. */
|
||||||
|
i = 0;
|
||||||
|
netdev_for_each_mc_addr(ha, netdev)
|
||||||
|
memcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN);
|
||||||
|
|
||||||
|
hw->mac.ops.update_mc_addr_list(hw, mta_list, i);
|
||||||
|
kfree(mta_list);
|
||||||
|
|
||||||
|
return netdev_mc_count(netdev);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e1000e_write_uc_addr_list - write unicast addresses to RAR table
|
||||||
|
* @netdev: network interface device structure
|
||||||
|
*
|
||||||
|
* Writes unicast address list to the RAR table.
|
||||||
|
* Returns: -ENOMEM on failure/insufficient address space
|
||||||
|
* 0 on no addresses written
|
||||||
|
* X on writing X addresses to the RAR table
|
||||||
|
**/
|
||||||
|
static int e1000e_write_uc_addr_list(struct net_device *netdev)
|
||||||
|
{
|
||||||
|
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||||
|
struct e1000_hw *hw = &adapter->hw;
|
||||||
|
unsigned int rar_entries = hw->mac.rar_entry_count;
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
/* save a rar entry for our hardware address */
|
||||||
|
rar_entries--;
|
||||||
|
|
||||||
|
/* save a rar entry for the LAA workaround */
|
||||||
|
if (adapter->flags & FLAG_RESET_OVERWRITES_LAA)
|
||||||
|
rar_entries--;
|
||||||
|
|
||||||
|
/* return ENOMEM indicating insufficient memory for addresses */
|
||||||
|
if (netdev_uc_count(netdev) > rar_entries)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
if (!netdev_uc_empty(netdev) && rar_entries) {
|
||||||
|
struct netdev_hw_addr *ha;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* write the addresses in reverse order to avoid write
|
||||||
|
* combining
|
||||||
|
*/
|
||||||
|
netdev_for_each_uc_addr(ha, netdev) {
|
||||||
|
if (!rar_entries)
|
||||||
|
break;
|
||||||
|
e1000e_rar_set(hw, ha->addr, rar_entries--);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* zero out the remaining RAR entries not used above */
|
||||||
|
for (; rar_entries > 0; rar_entries--) {
|
||||||
|
ew32(RAH(rar_entries), 0);
|
||||||
|
ew32(RAL(rar_entries), 0);
|
||||||
|
}
|
||||||
|
e1e_flush();
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e1000e_set_rx_mode - secondary unicast, Multicast and Promiscuous mode set
|
||||||
|
* @netdev: network interface device structure
|
||||||
|
*
|
||||||
|
* The ndo_set_rx_mode entry point is called whenever the unicast or multicast
|
||||||
|
* address list or the network interface flags are updated. This routine is
|
||||||
|
* responsible for configuring the hardware for proper unicast, multicast,
|
||||||
|
* promiscuous mode, and all-multi behavior.
|
||||||
|
**/
|
||||||
|
static void e1000e_set_rx_mode(struct net_device *netdev)
|
||||||
|
{
|
||||||
|
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||||
|
struct e1000_hw *hw = &adapter->hw;
|
||||||
u32 rctl;
|
u32 rctl;
|
||||||
|
|
||||||
/* Check for Promiscuous and All Multicast modes */
|
/* Check for Promiscuous and All Multicast modes */
|
||||||
|
|
||||||
rctl = er32(RCTL);
|
rctl = er32(RCTL);
|
||||||
|
|
||||||
|
/* clear the affected bits */
|
||||||
|
rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE);
|
||||||
|
|
||||||
if (netdev->flags & IFF_PROMISC) {
|
if (netdev->flags & IFF_PROMISC) {
|
||||||
rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
|
rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
|
||||||
rctl &= ~E1000_RCTL_VFE;
|
|
||||||
/* Do not hardware filter VLANs in promisc mode */
|
/* Do not hardware filter VLANs in promisc mode */
|
||||||
e1000e_vlan_filter_disable(adapter);
|
e1000e_vlan_filter_disable(adapter);
|
||||||
} else {
|
} else {
|
||||||
|
int count;
|
||||||
if (netdev->flags & IFF_ALLMULTI) {
|
if (netdev->flags & IFF_ALLMULTI) {
|
||||||
rctl |= E1000_RCTL_MPE;
|
rctl |= E1000_RCTL_MPE;
|
||||||
rctl &= ~E1000_RCTL_UPE;
|
|
||||||
} else {
|
} else {
|
||||||
rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE);
|
/*
|
||||||
|
* Write addresses to the MTA, if the attempt fails
|
||||||
|
* then we should just turn on promiscuous mode so
|
||||||
|
* that we can at least receive multicast traffic
|
||||||
|
*/
|
||||||
|
count = e1000e_write_mc_addr_list(netdev);
|
||||||
|
if (count < 0)
|
||||||
|
rctl |= E1000_RCTL_MPE;
|
||||||
}
|
}
|
||||||
e1000e_vlan_filter_enable(adapter);
|
e1000e_vlan_filter_enable(adapter);
|
||||||
|
/*
|
||||||
|
* Write addresses to available RAR registers, if there is not
|
||||||
|
* sufficient space to store all the addresses then enable
|
||||||
|
* unicast promiscuous mode
|
||||||
|
*/
|
||||||
|
count = e1000e_write_uc_addr_list(netdev);
|
||||||
|
if (count < 0)
|
||||||
|
rctl |= E1000_RCTL_UPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ew32(RCTL, rctl);
|
ew32(RCTL, rctl);
|
||||||
|
|
||||||
if (!netdev_mc_empty(netdev)) {
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
mta_list = kmalloc(netdev_mc_count(netdev) * 6, GFP_ATOMIC);
|
|
||||||
if (!mta_list)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* prepare a packed array of only addresses. */
|
|
||||||
netdev_for_each_mc_addr(ha, netdev)
|
|
||||||
memcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN);
|
|
||||||
|
|
||||||
e1000_update_mc_addr_list(hw, mta_list, i);
|
|
||||||
kfree(mta_list);
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
* if we're called from probe, we might not have
|
|
||||||
* anything to do here, so clear out the list
|
|
||||||
*/
|
|
||||||
e1000_update_mc_addr_list(hw, NULL, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (netdev->features & NETIF_F_HW_VLAN_RX)
|
if (netdev->features & NETIF_F_HW_VLAN_RX)
|
||||||
e1000e_vlan_strip_enable(adapter);
|
e1000e_vlan_strip_enable(adapter);
|
||||||
else
|
else
|
||||||
@ -3198,7 +3246,7 @@ static void e1000_set_multi(struct net_device *netdev)
|
|||||||
**/
|
**/
|
||||||
static void e1000_configure(struct e1000_adapter *adapter)
|
static void e1000_configure(struct e1000_adapter *adapter)
|
||||||
{
|
{
|
||||||
e1000_set_multi(adapter->netdev);
|
e1000e_set_rx_mode(adapter->netdev);
|
||||||
|
|
||||||
e1000_restore_vlan(adapter);
|
e1000_restore_vlan(adapter);
|
||||||
e1000_init_manageability_pt(adapter);
|
e1000_init_manageability_pt(adapter);
|
||||||
@ -4168,16 +4216,13 @@ static void e1000_print_link_info(struct e1000_adapter *adapter)
|
|||||||
u32 ctrl = er32(CTRL);
|
u32 ctrl = er32(CTRL);
|
||||||
|
|
||||||
/* Link status message must follow this format for user tools */
|
/* Link status message must follow this format for user tools */
|
||||||
printk(KERN_INFO "e1000e: %s NIC Link is Up %d Mbps %s, "
|
printk(KERN_INFO "e1000e: %s NIC Link is Up %d Mbps %s Duplex, Flow Control: %s\n",
|
||||||
"Flow Control: %s\n",
|
adapter->netdev->name,
|
||||||
adapter->netdev->name,
|
adapter->link_speed,
|
||||||
adapter->link_speed,
|
adapter->link_duplex == FULL_DUPLEX ? "Full" : "Half",
|
||||||
(adapter->link_duplex == FULL_DUPLEX) ?
|
(ctrl & E1000_CTRL_TFCE) && (ctrl & E1000_CTRL_RFCE) ? "Rx/Tx" :
|
||||||
"Full Duplex" : "Half Duplex",
|
(ctrl & E1000_CTRL_RFCE) ? "Rx" :
|
||||||
((ctrl & E1000_CTRL_TFCE) && (ctrl & E1000_CTRL_RFCE)) ?
|
(ctrl & E1000_CTRL_TFCE) ? "Tx" : "None");
|
||||||
"Rx/Tx" :
|
|
||||||
((ctrl & E1000_CTRL_RFCE) ? "Rx" :
|
|
||||||
((ctrl & E1000_CTRL_TFCE) ? "Tx" : "None")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool e1000e_has_link(struct e1000_adapter *adapter)
|
static bool e1000e_has_link(struct e1000_adapter *adapter)
|
||||||
@ -4323,10 +4368,7 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||||||
e1e_rphy(hw, PHY_AUTONEG_EXP, &autoneg_exp);
|
e1e_rphy(hw, PHY_AUTONEG_EXP, &autoneg_exp);
|
||||||
|
|
||||||
if (!(autoneg_exp & NWAY_ER_LP_NWAY_CAPS))
|
if (!(autoneg_exp & NWAY_ER_LP_NWAY_CAPS))
|
||||||
e_info("Autonegotiated half duplex but"
|
e_info("Autonegotiated half duplex but link partner cannot autoneg. Try forcing full duplex if link gets many collisions.\n");
|
||||||
" link partner cannot autoneg. "
|
|
||||||
" Try forcing full duplex if "
|
|
||||||
"link gets many collisions.\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* adjust timeout factor according to speed/duplex */
|
/* adjust timeout factor according to speed/duplex */
|
||||||
@ -5110,8 +5152,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
|
|||||||
if ((adapter->hw.mac.type == e1000_pch2lan) &&
|
if ((adapter->hw.mac.type == e1000_pch2lan) &&
|
||||||
!(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
|
!(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
|
||||||
(new_mtu > ETH_DATA_LEN)) {
|
(new_mtu > ETH_DATA_LEN)) {
|
||||||
e_err("Jumbo Frames not supported on 82579 when CRC "
|
e_err("Jumbo Frames not supported on 82579 when CRC stripping is disabled.\n");
|
||||||
"stripping is disabled.\n");
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5331,7 +5372,7 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake,
|
|||||||
|
|
||||||
if (wufc) {
|
if (wufc) {
|
||||||
e1000_setup_rctl(adapter);
|
e1000_setup_rctl(adapter);
|
||||||
e1000_set_multi(netdev);
|
e1000e_set_rx_mode(netdev);
|
||||||
|
|
||||||
/* turn on all-multi mode if wake on multicast is enabled */
|
/* turn on all-multi mode if wake on multicast is enabled */
|
||||||
if (wufc & E1000_WUFC_MC) {
|
if (wufc & E1000_WUFC_MC) {
|
||||||
@ -5527,8 +5568,8 @@ static int __e1000_resume(struct pci_dev *pdev)
|
|||||||
phy_data & E1000_WUS_MC ? "Multicast Packet" :
|
phy_data & E1000_WUS_MC ? "Multicast Packet" :
|
||||||
phy_data & E1000_WUS_BC ? "Broadcast Packet" :
|
phy_data & E1000_WUS_BC ? "Broadcast Packet" :
|
||||||
phy_data & E1000_WUS_MAG ? "Magic Packet" :
|
phy_data & E1000_WUS_MAG ? "Magic Packet" :
|
||||||
phy_data & E1000_WUS_LNKC ? "Link Status "
|
phy_data & E1000_WUS_LNKC ?
|
||||||
" Change" : "other");
|
"Link Status Change" : "other");
|
||||||
}
|
}
|
||||||
e1e_wphy(&adapter->hw, BM_WUS, ~0);
|
e1e_wphy(&adapter->hw, BM_WUS, ~0);
|
||||||
} else {
|
} else {
|
||||||
@ -5885,7 +5926,7 @@ static const struct net_device_ops e1000e_netdev_ops = {
|
|||||||
.ndo_stop = e1000_close,
|
.ndo_stop = e1000_close,
|
||||||
.ndo_start_xmit = e1000_xmit_frame,
|
.ndo_start_xmit = e1000_xmit_frame,
|
||||||
.ndo_get_stats64 = e1000e_get_stats64,
|
.ndo_get_stats64 = e1000e_get_stats64,
|
||||||
.ndo_set_rx_mode = e1000_set_multi,
|
.ndo_set_rx_mode = e1000e_set_rx_mode,
|
||||||
.ndo_set_mac_address = e1000_set_mac,
|
.ndo_set_mac_address = e1000_set_mac,
|
||||||
.ndo_change_mtu = e1000_change_mtu,
|
.ndo_change_mtu = e1000_change_mtu,
|
||||||
.ndo_do_ioctl = e1000_ioctl,
|
.ndo_do_ioctl = e1000_ioctl,
|
||||||
@ -5950,8 +5991,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
|
|||||||
err = dma_set_coherent_mask(&pdev->dev,
|
err = dma_set_coherent_mask(&pdev->dev,
|
||||||
DMA_BIT_MASK(32));
|
DMA_BIT_MASK(32));
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&pdev->dev, "No usable DMA "
|
dev_err(&pdev->dev, "No usable DMA configuration, aborting\n");
|
||||||
"configuration, aborting\n");
|
|
||||||
goto err_dma;
|
goto err_dma;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6077,6 +6117,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
|
|||||||
NETIF_F_TSO6 |
|
NETIF_F_TSO6 |
|
||||||
NETIF_F_HW_CSUM);
|
NETIF_F_HW_CSUM);
|
||||||
|
|
||||||
|
netdev->priv_flags |= IFF_UNICAST_FLT;
|
||||||
|
|
||||||
if (pci_using_dac) {
|
if (pci_using_dac) {
|
||||||
netdev->features |= NETIF_F_HIGHDMA;
|
netdev->features |= NETIF_F_HIGHDMA;
|
||||||
netdev->vlan_features |= NETIF_F_HIGHDMA;
|
netdev->vlan_features |= NETIF_F_HIGHDMA;
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
* e1000_82576
|
* e1000_82576
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/if_ether.h>
|
#include <linux/if_ether.h>
|
||||||
|
|
||||||
@ -244,8 +246,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
|
|||||||
* Check for invalid size
|
* Check for invalid size
|
||||||
*/
|
*/
|
||||||
if ((hw->mac.type == e1000_82576) && (size > 15)) {
|
if ((hw->mac.type == e1000_82576) && (size > 15)) {
|
||||||
printk("igb: The NVM size is not valid, "
|
pr_notice("The NVM size is not valid, defaulting to 32K\n");
|
||||||
"defaulting to 32K.\n");
|
|
||||||
size = 15;
|
size = 15;
|
||||||
}
|
}
|
||||||
nvm->word_size = 1 << size;
|
nvm->word_size = 1 << size;
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@ -325,16 +327,13 @@ static void igb_regdump(struct e1000_hw *hw, struct igb_reg_info *reginfo)
|
|||||||
regs[n] = rd32(E1000_TXDCTL(n));
|
regs[n] = rd32(E1000_TXDCTL(n));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_INFO "%-15s %08x\n",
|
pr_info("%-15s %08x\n", reginfo->name, rd32(reginfo->ofs));
|
||||||
reginfo->name, rd32(reginfo->ofs));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(rname, 16, "%s%s", reginfo->name, "[0-3]");
|
snprintf(rname, 16, "%s%s", reginfo->name, "[0-3]");
|
||||||
printk(KERN_INFO "%-15s ", rname);
|
pr_info("%-15s %08x %08x %08x %08x\n", rname, regs[0], regs[1],
|
||||||
for (n = 0; n < 4; n++)
|
regs[2], regs[3]);
|
||||||
printk(KERN_CONT "%08x ", regs[n]);
|
|
||||||
printk(KERN_CONT "\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -359,18 +358,15 @@ static void igb_dump(struct igb_adapter *adapter)
|
|||||||
/* Print netdevice Info */
|
/* Print netdevice Info */
|
||||||
if (netdev) {
|
if (netdev) {
|
||||||
dev_info(&adapter->pdev->dev, "Net device Info\n");
|
dev_info(&adapter->pdev->dev, "Net device Info\n");
|
||||||
printk(KERN_INFO "Device Name state "
|
pr_info("Device Name state trans_start "
|
||||||
"trans_start last_rx\n");
|
"last_rx\n");
|
||||||
printk(KERN_INFO "%-15s %016lX %016lX %016lX\n",
|
pr_info("%-15s %016lX %016lX %016lX\n", netdev->name,
|
||||||
netdev->name,
|
netdev->state, netdev->trans_start, netdev->last_rx);
|
||||||
netdev->state,
|
|
||||||
netdev->trans_start,
|
|
||||||
netdev->last_rx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print Registers */
|
/* Print Registers */
|
||||||
dev_info(&adapter->pdev->dev, "Register Dump\n");
|
dev_info(&adapter->pdev->dev, "Register Dump\n");
|
||||||
printk(KERN_INFO " Register Name Value\n");
|
pr_info(" Register Name Value\n");
|
||||||
for (reginfo = (struct igb_reg_info *)igb_reg_info_tbl;
|
for (reginfo = (struct igb_reg_info *)igb_reg_info_tbl;
|
||||||
reginfo->name; reginfo++) {
|
reginfo->name; reginfo++) {
|
||||||
igb_regdump(hw, reginfo);
|
igb_regdump(hw, reginfo);
|
||||||
@ -381,18 +377,17 @@ static void igb_dump(struct igb_adapter *adapter)
|
|||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
dev_info(&adapter->pdev->dev, "TX Rings Summary\n");
|
dev_info(&adapter->pdev->dev, "TX Rings Summary\n");
|
||||||
printk(KERN_INFO "Queue [NTU] [NTC] [bi(ntc)->dma ]"
|
pr_info("Queue [NTU] [NTC] [bi(ntc)->dma ] leng ntw timestamp\n");
|
||||||
" leng ntw timestamp\n");
|
|
||||||
for (n = 0; n < adapter->num_tx_queues; n++) {
|
for (n = 0; n < adapter->num_tx_queues; n++) {
|
||||||
struct igb_tx_buffer *buffer_info;
|
struct igb_tx_buffer *buffer_info;
|
||||||
tx_ring = adapter->tx_ring[n];
|
tx_ring = adapter->tx_ring[n];
|
||||||
buffer_info = &tx_ring->tx_buffer_info[tx_ring->next_to_clean];
|
buffer_info = &tx_ring->tx_buffer_info[tx_ring->next_to_clean];
|
||||||
printk(KERN_INFO " %5d %5X %5X %016llX %04X %p %016llX\n",
|
pr_info(" %5d %5X %5X %016llX %04X %p %016llX\n",
|
||||||
n, tx_ring->next_to_use, tx_ring->next_to_clean,
|
n, tx_ring->next_to_use, tx_ring->next_to_clean,
|
||||||
(u64)buffer_info->dma,
|
(u64)buffer_info->dma,
|
||||||
buffer_info->length,
|
buffer_info->length,
|
||||||
buffer_info->next_to_watch,
|
buffer_info->next_to_watch,
|
||||||
(u64)buffer_info->time_stamp);
|
(u64)buffer_info->time_stamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print TX Rings */
|
/* Print TX Rings */
|
||||||
@ -414,36 +409,38 @@ static void igb_dump(struct igb_adapter *adapter)
|
|||||||
|
|
||||||
for (n = 0; n < adapter->num_tx_queues; n++) {
|
for (n = 0; n < adapter->num_tx_queues; n++) {
|
||||||
tx_ring = adapter->tx_ring[n];
|
tx_ring = adapter->tx_ring[n];
|
||||||
printk(KERN_INFO "------------------------------------\n");
|
pr_info("------------------------------------\n");
|
||||||
printk(KERN_INFO "TX QUEUE INDEX = %d\n", tx_ring->queue_index);
|
pr_info("TX QUEUE INDEX = %d\n", tx_ring->queue_index);
|
||||||
printk(KERN_INFO "------------------------------------\n");
|
pr_info("------------------------------------\n");
|
||||||
printk(KERN_INFO "T [desc] [address 63:0 ] "
|
pr_info("T [desc] [address 63:0 ] [PlPOCIStDDM Ln] "
|
||||||
"[PlPOCIStDDM Ln] [bi->dma ] "
|
"[bi->dma ] leng ntw timestamp "
|
||||||
"leng ntw timestamp bi->skb\n");
|
"bi->skb\n");
|
||||||
|
|
||||||
for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) {
|
for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) {
|
||||||
|
const char *next_desc;
|
||||||
struct igb_tx_buffer *buffer_info;
|
struct igb_tx_buffer *buffer_info;
|
||||||
tx_desc = IGB_TX_DESC(tx_ring, i);
|
tx_desc = IGB_TX_DESC(tx_ring, i);
|
||||||
buffer_info = &tx_ring->tx_buffer_info[i];
|
buffer_info = &tx_ring->tx_buffer_info[i];
|
||||||
u0 = (struct my_u0 *)tx_desc;
|
u0 = (struct my_u0 *)tx_desc;
|
||||||
printk(KERN_INFO "T [0x%03X] %016llX %016llX %016llX"
|
if (i == tx_ring->next_to_use &&
|
||||||
" %04X %p %016llX %p", i,
|
i == tx_ring->next_to_clean)
|
||||||
|
next_desc = " NTC/U";
|
||||||
|
else if (i == tx_ring->next_to_use)
|
||||||
|
next_desc = " NTU";
|
||||||
|
else if (i == tx_ring->next_to_clean)
|
||||||
|
next_desc = " NTC";
|
||||||
|
else
|
||||||
|
next_desc = "";
|
||||||
|
|
||||||
|
pr_info("T [0x%03X] %016llX %016llX %016llX"
|
||||||
|
" %04X %p %016llX %p%s\n", i,
|
||||||
le64_to_cpu(u0->a),
|
le64_to_cpu(u0->a),
|
||||||
le64_to_cpu(u0->b),
|
le64_to_cpu(u0->b),
|
||||||
(u64)buffer_info->dma,
|
(u64)buffer_info->dma,
|
||||||
buffer_info->length,
|
buffer_info->length,
|
||||||
buffer_info->next_to_watch,
|
buffer_info->next_to_watch,
|
||||||
(u64)buffer_info->time_stamp,
|
(u64)buffer_info->time_stamp,
|
||||||
buffer_info->skb);
|
buffer_info->skb, next_desc);
|
||||||
if (i == tx_ring->next_to_use &&
|
|
||||||
i == tx_ring->next_to_clean)
|
|
||||||
printk(KERN_CONT " NTC/U\n");
|
|
||||||
else if (i == tx_ring->next_to_use)
|
|
||||||
printk(KERN_CONT " NTU\n");
|
|
||||||
else if (i == tx_ring->next_to_clean)
|
|
||||||
printk(KERN_CONT " NTC\n");
|
|
||||||
else
|
|
||||||
printk(KERN_CONT "\n");
|
|
||||||
|
|
||||||
if (netif_msg_pktdata(adapter) && buffer_info->dma != 0)
|
if (netif_msg_pktdata(adapter) && buffer_info->dma != 0)
|
||||||
print_hex_dump(KERN_INFO, "",
|
print_hex_dump(KERN_INFO, "",
|
||||||
@ -456,11 +453,11 @@ static void igb_dump(struct igb_adapter *adapter)
|
|||||||
/* Print RX Rings Summary */
|
/* Print RX Rings Summary */
|
||||||
rx_ring_summary:
|
rx_ring_summary:
|
||||||
dev_info(&adapter->pdev->dev, "RX Rings Summary\n");
|
dev_info(&adapter->pdev->dev, "RX Rings Summary\n");
|
||||||
printk(KERN_INFO "Queue [NTU] [NTC]\n");
|
pr_info("Queue [NTU] [NTC]\n");
|
||||||
for (n = 0; n < adapter->num_rx_queues; n++) {
|
for (n = 0; n < adapter->num_rx_queues; n++) {
|
||||||
rx_ring = adapter->rx_ring[n];
|
rx_ring = adapter->rx_ring[n];
|
||||||
printk(KERN_INFO " %5d %5X %5X\n", n,
|
pr_info(" %5d %5X %5X\n",
|
||||||
rx_ring->next_to_use, rx_ring->next_to_clean);
|
n, rx_ring->next_to_use, rx_ring->next_to_clean);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print RX Rings */
|
/* Print RX Rings */
|
||||||
@ -492,36 +489,43 @@ rx_ring_summary:
|
|||||||
|
|
||||||
for (n = 0; n < adapter->num_rx_queues; n++) {
|
for (n = 0; n < adapter->num_rx_queues; n++) {
|
||||||
rx_ring = adapter->rx_ring[n];
|
rx_ring = adapter->rx_ring[n];
|
||||||
printk(KERN_INFO "------------------------------------\n");
|
pr_info("------------------------------------\n");
|
||||||
printk(KERN_INFO "RX QUEUE INDEX = %d\n", rx_ring->queue_index);
|
pr_info("RX QUEUE INDEX = %d\n", rx_ring->queue_index);
|
||||||
printk(KERN_INFO "------------------------------------\n");
|
pr_info("------------------------------------\n");
|
||||||
printk(KERN_INFO "R [desc] [ PktBuf A0] "
|
pr_info("R [desc] [ PktBuf A0] [ HeadBuf DD] "
|
||||||
"[ HeadBuf DD] [bi->dma ] [bi->skb] "
|
"[bi->dma ] [bi->skb] <-- Adv Rx Read format\n");
|
||||||
"<-- Adv Rx Read format\n");
|
pr_info("RWB[desc] [PcsmIpSHl PtRs] [vl er S cks ln] -----"
|
||||||
printk(KERN_INFO "RWB[desc] [PcsmIpSHl PtRs] "
|
"----------- [bi->skb] <-- Adv Rx Write-Back format\n");
|
||||||
"[vl er S cks ln] ---------------- [bi->skb] "
|
|
||||||
"<-- Adv Rx Write-Back format\n");
|
|
||||||
|
|
||||||
for (i = 0; i < rx_ring->count; i++) {
|
for (i = 0; i < rx_ring->count; i++) {
|
||||||
|
const char *next_desc;
|
||||||
struct igb_rx_buffer *buffer_info;
|
struct igb_rx_buffer *buffer_info;
|
||||||
buffer_info = &rx_ring->rx_buffer_info[i];
|
buffer_info = &rx_ring->rx_buffer_info[i];
|
||||||
rx_desc = IGB_RX_DESC(rx_ring, i);
|
rx_desc = IGB_RX_DESC(rx_ring, i);
|
||||||
u0 = (struct my_u0 *)rx_desc;
|
u0 = (struct my_u0 *)rx_desc;
|
||||||
staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
|
staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
|
||||||
|
|
||||||
|
if (i == rx_ring->next_to_use)
|
||||||
|
next_desc = " NTU";
|
||||||
|
else if (i == rx_ring->next_to_clean)
|
||||||
|
next_desc = " NTC";
|
||||||
|
else
|
||||||
|
next_desc = "";
|
||||||
|
|
||||||
if (staterr & E1000_RXD_STAT_DD) {
|
if (staterr & E1000_RXD_STAT_DD) {
|
||||||
/* Descriptor Done */
|
/* Descriptor Done */
|
||||||
printk(KERN_INFO "RWB[0x%03X] %016llX "
|
pr_info("%s[0x%03X] %016llX %016llX -------"
|
||||||
"%016llX ---------------- %p", i,
|
"--------- %p%s\n", "RWB", i,
|
||||||
le64_to_cpu(u0->a),
|
le64_to_cpu(u0->a),
|
||||||
le64_to_cpu(u0->b),
|
le64_to_cpu(u0->b),
|
||||||
buffer_info->skb);
|
buffer_info->skb, next_desc);
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_INFO "R [0x%03X] %016llX "
|
pr_info("%s[0x%03X] %016llX %016llX %016llX"
|
||||||
"%016llX %016llX %p", i,
|
" %p%s\n", "R ", i,
|
||||||
le64_to_cpu(u0->a),
|
le64_to_cpu(u0->a),
|
||||||
le64_to_cpu(u0->b),
|
le64_to_cpu(u0->b),
|
||||||
(u64)buffer_info->dma,
|
(u64)buffer_info->dma,
|
||||||
buffer_info->skb);
|
buffer_info->skb, next_desc);
|
||||||
|
|
||||||
if (netif_msg_pktdata(adapter)) {
|
if (netif_msg_pktdata(adapter)) {
|
||||||
print_hex_dump(KERN_INFO, "",
|
print_hex_dump(KERN_INFO, "",
|
||||||
@ -538,14 +542,6 @@ rx_ring_summary:
|
|||||||
PAGE_SIZE/2, true);
|
PAGE_SIZE/2, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == rx_ring->next_to_use)
|
|
||||||
printk(KERN_CONT " NTU\n");
|
|
||||||
else if (i == rx_ring->next_to_clean)
|
|
||||||
printk(KERN_CONT " NTC\n");
|
|
||||||
else
|
|
||||||
printk(KERN_CONT "\n");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,10 +595,10 @@ struct net_device *igb_get_hw_dev(struct e1000_hw *hw)
|
|||||||
static int __init igb_init_module(void)
|
static int __init igb_init_module(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
printk(KERN_INFO "%s - version %s\n",
|
pr_info("%s - version %s\n",
|
||||||
igb_driver_string, igb_driver_version);
|
igb_driver_string, igb_driver_version);
|
||||||
|
|
||||||
printk(KERN_INFO "%s\n", igb_copyright);
|
pr_info("%s\n", igb_copyright);
|
||||||
|
|
||||||
#ifdef CONFIG_IGB_DCA
|
#ifdef CONFIG_IGB_DCA
|
||||||
dca_register_notify(&dca_notifier);
|
dca_register_notify(&dca_notifier);
|
||||||
@ -3642,23 +3638,23 @@ static void igb_watchdog_task(struct work_struct *work)
|
|||||||
|
|
||||||
ctrl = rd32(E1000_CTRL);
|
ctrl = rd32(E1000_CTRL);
|
||||||
/* Links status message must follow this format */
|
/* Links status message must follow this format */
|
||||||
printk(KERN_INFO "igb: %s NIC Link is Up %d Mbps %s, "
|
printk(KERN_INFO "igb: %s NIC Link is Up %d Mbps %s "
|
||||||
"Flow Control: %s\n",
|
"Duplex, Flow Control: %s\n",
|
||||||
netdev->name,
|
netdev->name,
|
||||||
adapter->link_speed,
|
adapter->link_speed,
|
||||||
adapter->link_duplex == FULL_DUPLEX ?
|
adapter->link_duplex == FULL_DUPLEX ?
|
||||||
"Full Duplex" : "Half Duplex",
|
"Full" : "Half",
|
||||||
((ctrl & E1000_CTRL_TFCE) &&
|
(ctrl & E1000_CTRL_TFCE) &&
|
||||||
(ctrl & E1000_CTRL_RFCE)) ? "RX/TX" :
|
(ctrl & E1000_CTRL_RFCE) ? "RX/TX" :
|
||||||
((ctrl & E1000_CTRL_RFCE) ? "RX" :
|
(ctrl & E1000_CTRL_RFCE) ? "RX" :
|
||||||
((ctrl & E1000_CTRL_TFCE) ? "TX" : "None")));
|
(ctrl & E1000_CTRL_TFCE) ? "TX" : "None");
|
||||||
|
|
||||||
/* check for thermal sensor event */
|
/* check for thermal sensor event */
|
||||||
if (igb_thermal_sensor_event(hw, E1000_THSTAT_LINK_THROTTLE)) {
|
if (igb_thermal_sensor_event(hw,
|
||||||
printk(KERN_INFO "igb: %s The network adapter "
|
E1000_THSTAT_LINK_THROTTLE)) {
|
||||||
"link speed was downshifted "
|
netdev_info(netdev, "The network adapter link "
|
||||||
"because it overheated.\n",
|
"speed was downshifted because it "
|
||||||
netdev->name);
|
"overheated\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* adjust timeout factor according to speed/duplex */
|
/* adjust timeout factor according to speed/duplex */
|
||||||
@ -3688,11 +3684,10 @@ static void igb_watchdog_task(struct work_struct *work)
|
|||||||
adapter->link_duplex = 0;
|
adapter->link_duplex = 0;
|
||||||
|
|
||||||
/* check for thermal sensor event */
|
/* check for thermal sensor event */
|
||||||
if (igb_thermal_sensor_event(hw, E1000_THSTAT_PWR_DOWN)) {
|
if (igb_thermal_sensor_event(hw,
|
||||||
printk(KERN_ERR "igb: %s The network adapter "
|
E1000_THSTAT_PWR_DOWN)) {
|
||||||
"was stopped because it "
|
netdev_err(netdev, "The network adapter was "
|
||||||
"overheated.\n",
|
"stopped because it overheated\n");
|
||||||
netdev->name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Links status message must follow this format */
|
/* Links status message must follow this format */
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@ -1746,10 +1748,9 @@ void igbvf_update_stats(struct igbvf_adapter *adapter)
|
|||||||
|
|
||||||
static void igbvf_print_link_info(struct igbvf_adapter *adapter)
|
static void igbvf_print_link_info(struct igbvf_adapter *adapter)
|
||||||
{
|
{
|
||||||
dev_info(&adapter->pdev->dev, "Link is Up %d Mbps %s\n",
|
dev_info(&adapter->pdev->dev, "Link is Up %d Mbps %s Duplex\n",
|
||||||
adapter->link_speed,
|
adapter->link_speed,
|
||||||
((adapter->link_duplex == FULL_DUPLEX) ?
|
adapter->link_duplex == FULL_DUPLEX ? "Full" : "Half");
|
||||||
"Full Duplex" : "Half Duplex"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool igbvf_has_link(struct igbvf_adapter *adapter)
|
static bool igbvf_has_link(struct igbvf_adapter *adapter)
|
||||||
@ -2843,9 +2844,8 @@ static struct pci_driver igbvf_driver = {
|
|||||||
static int __init igbvf_init_module(void)
|
static int __init igbvf_init_module(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
printk(KERN_INFO "%s - version %s\n",
|
pr_info("%s - version %s\n", igbvf_driver_string, igbvf_driver_version);
|
||||||
igbvf_driver_string, igbvf_driver_version);
|
pr_info("%s\n", igbvf_copyright);
|
||||||
printk(KERN_INFO "%s\n", igbvf_copyright);
|
|
||||||
|
|
||||||
ret = pci_register_driver(&igbvf_driver);
|
ret = pci_register_driver(&igbvf_driver);
|
||||||
|
|
||||||
|
@ -572,7 +572,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
|
|||||||
|
|
||||||
/* reply to reset with ack and vf mac address */
|
/* reply to reset with ack and vf mac address */
|
||||||
msgbuf[0] = IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK;
|
msgbuf[0] = IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK;
|
||||||
memcpy(new_mac, vf_mac, IXGBE_ETH_LENGTH_OF_ADDRESS);
|
memcpy(new_mac, vf_mac, ETH_ALEN);
|
||||||
/*
|
/*
|
||||||
* Piggyback the multicast filter type so VF can compute the
|
* Piggyback the multicast filter type so VF can compute the
|
||||||
* correct vectors
|
* correct vectors
|
||||||
|
@ -1710,8 +1710,6 @@ enum {
|
|||||||
#define IXGBE_NVM_POLL_WRITE 1 /* Flag for polling for write complete */
|
#define IXGBE_NVM_POLL_WRITE 1 /* Flag for polling for write complete */
|
||||||
#define IXGBE_NVM_POLL_READ 0 /* Flag for polling for read complete */
|
#define IXGBE_NVM_POLL_READ 0 /* Flag for polling for read complete */
|
||||||
|
|
||||||
#define IXGBE_ETH_LENGTH_OF_ADDRESS 6
|
|
||||||
|
|
||||||
#define IXGBE_EEPROM_PAGE_SIZE_MAX 128
|
#define IXGBE_EEPROM_PAGE_SIZE_MAX 128
|
||||||
#define IXGBE_EEPROM_RD_BUFFER_MAX_COUNT 512 /* EEPROM words # read in burst */
|
#define IXGBE_EEPROM_RD_BUFFER_MAX_COUNT 512 /* EEPROM words # read in burst */
|
||||||
#define IXGBE_EEPROM_WR_BUFFER_MAX_COUNT 256 /* EEPROM words # wr in burst */
|
#define IXGBE_EEPROM_WR_BUFFER_MAX_COUNT 256 /* EEPROM words # wr in burst */
|
||||||
@ -2802,9 +2800,9 @@ struct ixgbe_eeprom_info {
|
|||||||
struct ixgbe_mac_info {
|
struct ixgbe_mac_info {
|
||||||
struct ixgbe_mac_operations ops;
|
struct ixgbe_mac_operations ops;
|
||||||
enum ixgbe_mac_type type;
|
enum ixgbe_mac_type type;
|
||||||
u8 addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
|
u8 addr[ETH_ALEN];
|
||||||
u8 perm_addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
|
u8 perm_addr[ETH_ALEN];
|
||||||
u8 san_addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
|
u8 san_addr[ETH_ALEN];
|
||||||
/* prefix for World Wide Node Name (WWNN) */
|
/* prefix for World Wide Node Name (WWNN) */
|
||||||
u16 wwnn_prefix;
|
u16 wwnn_prefix;
|
||||||
/* prefix for World Wide Port Name (WWPN) */
|
/* prefix for World Wide Port Name (WWPN) */
|
||||||
|
@ -751,16 +751,20 @@ static s32 ixgbe_blink_led_start_X540(struct ixgbe_hw *hw, u32 index)
|
|||||||
{
|
{
|
||||||
u32 macc_reg;
|
u32 macc_reg;
|
||||||
u32 ledctl_reg;
|
u32 ledctl_reg;
|
||||||
|
ixgbe_link_speed speed;
|
||||||
|
bool link_up;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In order for the blink bit in the LED control register
|
* Link should be up in order for the blink bit in the LED control
|
||||||
* to work, link and speed must be forced in the MAC. We
|
* register to work. Force link and speed in the MAC if link is down.
|
||||||
* will reverse this when we stop the blinking.
|
* This will be reversed when we stop the blinking.
|
||||||
*/
|
*/
|
||||||
macc_reg = IXGBE_READ_REG(hw, IXGBE_MACC);
|
hw->mac.ops.check_link(hw, &speed, &link_up, false);
|
||||||
macc_reg |= IXGBE_MACC_FLU | IXGBE_MACC_FSV_10G | IXGBE_MACC_FS;
|
if (link_up == false) {
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_MACC, macc_reg);
|
macc_reg = IXGBE_READ_REG(hw, IXGBE_MACC);
|
||||||
|
macc_reg |= IXGBE_MACC_FLU | IXGBE_MACC_FSV_10G | IXGBE_MACC_FS;
|
||||||
|
IXGBE_WRITE_REG(hw, IXGBE_MACC, macc_reg);
|
||||||
|
}
|
||||||
/* Set the LED to LINK_UP + BLINK. */
|
/* Set the LED to LINK_UP + BLINK. */
|
||||||
ledctl_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
|
ledctl_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
|
||||||
ledctl_reg &= ~IXGBE_LED_MODE_MASK(index);
|
ledctl_reg &= ~IXGBE_LED_MODE_MASK(index);
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
#define IXGBE_VF_IRQ_CLEAR_MASK 7
|
#define IXGBE_VF_IRQ_CLEAR_MASK 7
|
||||||
#define IXGBE_VF_MAX_TX_QUEUES 1
|
#define IXGBE_VF_MAX_TX_QUEUES 1
|
||||||
#define IXGBE_VF_MAX_RX_QUEUES 1
|
#define IXGBE_VF_MAX_RX_QUEUES 1
|
||||||
#define IXGBE_ETH_LENGTH_OF_ADDRESS 6
|
|
||||||
|
|
||||||
/* Link speed */
|
/* Link speed */
|
||||||
typedef u32 ixgbe_link_speed;
|
typedef u32 ixgbe_link_speed;
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
/* ethtool support for ixgbevf */
|
/* ethtool support for ixgbevf */
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
@ -549,8 +551,8 @@ static const u32 register_test_patterns[] = {
|
|||||||
writel((W & M), (adapter->hw.hw_addr + R)); \
|
writel((W & M), (adapter->hw.hw_addr + R)); \
|
||||||
val = readl(adapter->hw.hw_addr + R); \
|
val = readl(adapter->hw.hw_addr + R); \
|
||||||
if ((W & M) != (val & M)) { \
|
if ((W & M) != (val & M)) { \
|
||||||
printk(KERN_ERR "set/check reg %04X test failed: got 0x%08X " \
|
pr_err("set/check reg %04X test failed: got 0x%08X expected " \
|
||||||
"expected 0x%08X\n", R, (val & M), (W & M)); \
|
"0x%08X\n", R, (val & M), (W & M)); \
|
||||||
*data = R; \
|
*data = R; \
|
||||||
writel(before, (adapter->hw.hw_addr + R)); \
|
writel(before, (adapter->hw.hw_addr + R)); \
|
||||||
return 1; \
|
return 1; \
|
||||||
|
@ -29,6 +29,9 @@
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
Copyright (c)2006 - 2007 Myricom, Inc. for some LRO specific code
|
Copyright (c)2006 - 2007 Myricom, Inc. for some LRO specific code
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
@ -1437,7 +1440,7 @@ static int ixgbevf_write_uc_addr_list(struct net_device *netdev)
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
if ((netdev_uc_count(netdev)) > 10) {
|
if ((netdev_uc_count(netdev)) > 10) {
|
||||||
printk(KERN_ERR "Too many unicast filters - No Space\n");
|
pr_err("Too many unicast filters - No Space\n");
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2135,7 +2138,7 @@ static int ixgbevf_init_interrupt_scheme(struct ixgbevf_adapter *adapter)
|
|||||||
|
|
||||||
err = ixgbevf_alloc_queues(adapter);
|
err = ixgbevf_alloc_queues(adapter);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR "Unable to allocate memory for queues\n");
|
pr_err("Unable to allocate memory for queues\n");
|
||||||
goto err_alloc_queues;
|
goto err_alloc_queues;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2189,7 +2192,7 @@ static int __devinit ixgbevf_sw_init(struct ixgbevf_adapter *adapter)
|
|||||||
} else {
|
} else {
|
||||||
err = hw->mac.ops.init_hw(hw);
|
err = hw->mac.ops.init_hw(hw);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR "init_shared_code failed: %d\n", err);
|
pr_err("init_shared_code failed: %d\n", err);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2630,8 +2633,8 @@ static int ixgbevf_open(struct net_device *netdev)
|
|||||||
* the vf can't start. */
|
* the vf can't start. */
|
||||||
if (hw->adapter_stopped) {
|
if (hw->adapter_stopped) {
|
||||||
err = IXGBE_ERR_MBX;
|
err = IXGBE_ERR_MBX;
|
||||||
printk(KERN_ERR "Unable to start - perhaps the PF"
|
pr_err("Unable to start - perhaps the PF Driver isn't "
|
||||||
" Driver isn't up yet\n");
|
"up yet\n");
|
||||||
goto err_setup_reset;
|
goto err_setup_reset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2842,10 +2845,8 @@ static bool ixgbevf_tx_csum(struct ixgbevf_adapter *adapter,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (unlikely(net_ratelimit())) {
|
if (unlikely(net_ratelimit())) {
|
||||||
printk(KERN_WARNING
|
pr_warn("partial checksum but "
|
||||||
"partial checksum but "
|
"proto=%x!\n", skb->protocol);
|
||||||
"proto=%x!\n",
|
|
||||||
skb->protocol);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -3415,7 +3416,7 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev,
|
|||||||
memcpy(netdev->perm_addr, adapter->hw.mac.addr, netdev->addr_len);
|
memcpy(netdev->perm_addr, adapter->hw.mac.addr, netdev->addr_len);
|
||||||
|
|
||||||
if (!is_valid_ether_addr(netdev->dev_addr)) {
|
if (!is_valid_ether_addr(netdev->dev_addr)) {
|
||||||
printk(KERN_ERR "invalid MAC address\n");
|
pr_err("invalid MAC address\n");
|
||||||
err = -EIO;
|
err = -EIO;
|
||||||
goto err_sw_init;
|
goto err_sw_init;
|
||||||
}
|
}
|
||||||
@ -3536,10 +3537,10 @@ static struct pci_driver ixgbevf_driver = {
|
|||||||
static int __init ixgbevf_init_module(void)
|
static int __init ixgbevf_init_module(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
printk(KERN_INFO "ixgbevf: %s - version %s\n", ixgbevf_driver_string,
|
pr_info("%s - version %s\n", ixgbevf_driver_string,
|
||||||
ixgbevf_driver_version);
|
ixgbevf_driver_version);
|
||||||
|
|
||||||
printk(KERN_INFO "%s\n", ixgbevf_copyright);
|
pr_info("%s\n", ixgbevf_copyright);
|
||||||
|
|
||||||
ret = pci_register_driver(&ixgbevf_driver);
|
ret = pci_register_driver(&ixgbevf_driver);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -108,7 +108,7 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
|
|||||||
if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK))
|
if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK))
|
||||||
return IXGBE_ERR_INVALID_MAC_ADDR;
|
return IXGBE_ERR_INVALID_MAC_ADDR;
|
||||||
|
|
||||||
memcpy(hw->mac.perm_addr, addr, IXGBE_ETH_LENGTH_OF_ADDRESS);
|
memcpy(hw->mac.perm_addr, addr, ETH_ALEN);
|
||||||
hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD];
|
hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD];
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -211,7 +211,7 @@ static s32 ixgbevf_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr)
|
|||||||
**/
|
**/
|
||||||
static s32 ixgbevf_get_mac_addr_vf(struct ixgbe_hw *hw, u8 *mac_addr)
|
static s32 ixgbevf_get_mac_addr_vf(struct ixgbe_hw *hw, u8 *mac_addr)
|
||||||
{
|
{
|
||||||
memcpy(mac_addr, hw->mac.perm_addr, IXGBE_ETH_LENGTH_OF_ADDRESS);
|
memcpy(mac_addr, hw->mac.perm_addr, ETH_ALEN);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user