Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f85fa279
Commit
f85fa279
authored
Nov 16, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
parents
358b8382
ea99d832
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
340 additions
and
299 deletions
+340
-299
drivers/net/ethernet/intel/e1000/e1000_hw.h
drivers/net/ethernet/intel/e1000/e1000_hw.h
+0
-1
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/e1000e/netdev.c
+215
-173
drivers/net/ethernet/intel/igb/e1000_82575.c
drivers/net/ethernet/intel/igb/e1000_82575.c
+3
-2
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igb/igb_main.c
+80
-85
drivers/net/ethernet/intel/igbvf/netdev.c
drivers/net/ethernet/intel/igbvf/netdev.c
+7
-7
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+1
-1
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+3
-5
drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
+11
-7
drivers/net/ethernet/intel/ixgbevf/defines.h
drivers/net/ethernet/intel/ixgbevf/defines.h
+0
-1
drivers/net/ethernet/intel/ixgbevf/ethtool.c
drivers/net/ethernet/intel/ixgbevf/ethtool.c
+4
-2
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+14
-13
drivers/net/ethernet/intel/ixgbevf/vf.c
drivers/net/ethernet/intel/ixgbevf/vf.c
+2
-2
No files found.
drivers/net/ethernet/intel/e1000/e1000_hw.h
View file @
f85fa279
...
...
@@ -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 NODE_ADDRESS_SIZE 6
#define ETH_LENGTH_OF_ADDRESS 6
/* MAC decode size is 128K - This is the size of BAR0 */
#define MAC_DECODE_SIZE (128 * 1024)
...
...
drivers/net/ethernet/intel/e1000e/netdev.c
View file @
f85fa279
This diff is collapsed.
Click to expand it.
drivers/net/ethernet/intel/igb/e1000_82575.c
View file @
f85fa279
...
...
@@ -29,6 +29,8 @@
* e1000_82576
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/types.h>
#include <linux/if_ether.h>
...
...
@@ -244,8 +246,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
* Check for invalid size
*/
if
((
hw
->
mac
.
type
==
e1000_82576
)
&&
(
size
>
15
))
{
printk
(
"igb: The NVM size is not valid, "
"defaulting to 32K.
\n
"
);
pr_notice
(
"The NVM size is not valid, defaulting to 32K
\n
"
);
size
=
15
;
}
nvm
->
word_size
=
1
<<
size
;
...
...
drivers/net/ethernet/intel/igb/igb_main.c
View file @
f85fa279
...
...
@@ -25,6 +25,8 @@
*******************************************************************************/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/types.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
));
break
;
default:
printk
(
KERN_INFO
"%-15s %08x
\n
"
,
reginfo
->
name
,
rd32
(
reginfo
->
ofs
));
pr_info
(
"%-15s %08x
\n
"
,
reginfo
->
name
,
rd32
(
reginfo
->
ofs
));
return
;
}
snprintf
(
rname
,
16
,
"%s%s"
,
reginfo
->
name
,
"[0-3]"
);
printk
(
KERN_INFO
"%-15s "
,
rname
);
for
(
n
=
0
;
n
<
4
;
n
++
)
printk
(
KERN_CONT
"%08x "
,
regs
[
n
]);
printk
(
KERN_CONT
"
\n
"
);
pr_info
(
"%-15s %08x %08x %08x %08x
\n
"
,
rname
,
regs
[
0
],
regs
[
1
],
regs
[
2
],
regs
[
3
]);
}
/*
...
...
@@ -359,18 +358,15 @@ static void igb_dump(struct igb_adapter *adapter)
/* Print netdevice Info */
if
(
netdev
)
{
dev_info
(
&
adapter
->
pdev
->
dev
,
"Net device Info
\n
"
);
printk
(
KERN_INFO
"Device Name state "
"trans_start last_rx
\n
"
);
printk
(
KERN_INFO
"%-15s %016lX %016lX %016lX
\n
"
,
netdev
->
name
,
netdev
->
state
,
netdev
->
trans_start
,
netdev
->
last_rx
);
pr_info
(
"Device Name state trans_start "
"last_rx
\n
"
);
pr_info
(
"%-15s %016lX %016lX %016lX
\n
"
,
netdev
->
name
,
netdev
->
state
,
netdev
->
trans_start
,
netdev
->
last_rx
);
}
/* Print Registers */
dev_info
(
&
adapter
->
pdev
->
dev
,
"Register Dump
\n
"
);
pr
intk
(
KERN_INFO
" Register Name Value
\n
"
);
pr
_info
(
" Register Name Value
\n
"
);
for
(
reginfo
=
(
struct
igb_reg_info
*
)
igb_reg_info_tbl
;
reginfo
->
name
;
reginfo
++
)
{
igb_regdump
(
hw
,
reginfo
);
...
...
@@ -381,13 +377,12 @@ static void igb_dump(struct igb_adapter *adapter)
goto
exit
;
dev_info
(
&
adapter
->
pdev
->
dev
,
"TX Rings Summary
\n
"
);
printk
(
KERN_INFO
"Queue [NTU] [NTC] [bi(ntc)->dma ]"
" leng ntw timestamp
\n
"
);
pr_info
(
"Queue [NTU] [NTC] [bi(ntc)->dma ] leng ntw timestamp
\n
"
);
for
(
n
=
0
;
n
<
adapter
->
num_tx_queues
;
n
++
)
{
struct
igb_tx_buffer
*
buffer_info
;
tx_ring
=
adapter
->
tx_ring
[
n
];
buffer_info
=
&
tx_ring
->
tx_buffer_info
[
tx_ring
->
next_to_clean
];
pr
intk
(
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
,
(
u64
)
buffer_info
->
dma
,
buffer_info
->
length
,
...
...
@@ -414,36 +409,38 @@ static void igb_dump(struct igb_adapter *adapter)
for
(
n
=
0
;
n
<
adapter
->
num_tx_queues
;
n
++
)
{
tx_ring
=
adapter
->
tx_ring
[
n
];
pr
intk
(
KERN_INFO
"------------------------------------
\n
"
);
pr
intk
(
KERN_INFO
"TX QUEUE INDEX = %d
\n
"
,
tx_ring
->
queue_index
);
pr
intk
(
KERN_INFO
"------------------------------------
\n
"
);
pr
intk
(
KERN_INFO
"T [desc] [address 63:0
] "
"[
PlPOCIStDDM Ln] [bi->dma ]
"
"
leng ntw timestamp
bi->skb
\n
"
);
pr
_info
(
"------------------------------------
\n
"
);
pr
_info
(
"TX QUEUE INDEX = %d
\n
"
,
tx_ring
->
queue_index
);
pr
_info
(
"------------------------------------
\n
"
);
pr
_info
(
"T [desc] [address 63:0 ] [PlPOCIStDDM Ln
] "
"[
bi->dma ] leng ntw timestamp
"
"bi->skb
\n
"
);
for
(
i
=
0
;
tx_ring
->
desc
&&
(
i
<
tx_ring
->
count
);
i
++
)
{
const
char
*
next_desc
;
struct
igb_tx_buffer
*
buffer_info
;
tx_desc
=
IGB_TX_DESC
(
tx_ring
,
i
);
buffer_info
=
&
tx_ring
->
tx_buffer_info
[
i
];
u0
=
(
struct
my_u0
*
)
tx_desc
;
printk
(
KERN_INFO
"T [0x%03X] %016llX %016llX %016llX"
" %04X %p %016llX %p"
,
i
,
if
(
i
==
tx_ring
->
next_to_use
&&
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
->
b
),
(
u64
)
buffer_info
->
dma
,
buffer_info
->
length
,
buffer_info
->
next_to_watch
,
(
u64
)
buffer_info
->
time_stamp
,
buffer_info
->
skb
);
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
"
);
buffer_info
->
skb
,
next_desc
);
if
(
netif_msg_pktdata
(
adapter
)
&&
buffer_info
->
dma
!=
0
)
print_hex_dump
(
KERN_INFO
,
""
,
...
...
@@ -456,11 +453,11 @@ static void igb_dump(struct igb_adapter *adapter)
/* Print RX Rings Summary */
rx_ring_summary:
dev_info
(
&
adapter
->
pdev
->
dev
,
"RX Rings Summary
\n
"
);
pr
intk
(
KERN_INFO
"Queue [NTU] [NTC]
\n
"
);
pr
_info
(
"Queue [NTU] [NTC]
\n
"
);
for
(
n
=
0
;
n
<
adapter
->
num_rx_queues
;
n
++
)
{
rx_ring
=
adapter
->
rx_ring
[
n
];
pr
intk
(
KERN_INFO
" %5d %5X %5X
\n
"
,
n
,
rx_ring
->
next_to_use
,
rx_ring
->
next_to_clean
);
pr
_info
(
" %5d %5X %5X
\n
"
,
n
,
rx_ring
->
next_to_use
,
rx_ring
->
next_to_clean
);
}
/* Print RX Rings */
...
...
@@ -492,36 +489,43 @@ static void igb_dump(struct igb_adapter *adapter)
for
(
n
=
0
;
n
<
adapter
->
num_rx_queues
;
n
++
)
{
rx_ring
=
adapter
->
rx_ring
[
n
];
printk
(
KERN_INFO
"------------------------------------
\n
"
);
printk
(
KERN_INFO
"RX QUEUE INDEX = %d
\n
"
,
rx_ring
->
queue_index
);
printk
(
KERN_INFO
"------------------------------------
\n
"
);
printk
(
KERN_INFO
"R [desc] [ PktBuf A0] "
"[ HeadBuf DD] [bi->dma ] [bi->skb] "
"<-- Adv Rx Read format
\n
"
);
printk
(
KERN_INFO
"RWB[desc] [PcsmIpSHl PtRs] "
"[vl er S cks ln] ---------------- [bi->skb] "
"<-- Adv Rx Write-Back format
\n
"
);
pr_info
(
"------------------------------------
\n
"
);
pr_info
(
"RX QUEUE INDEX = %d
\n
"
,
rx_ring
->
queue_index
);
pr_info
(
"------------------------------------
\n
"
);
pr_info
(
"R [desc] [ PktBuf A0] [ HeadBuf DD] "
"[bi->dma ] [bi->skb] <-- Adv Rx Read format
\n
"
);
pr_info
(
"RWB[desc] [PcsmIpSHl PtRs] [vl er S cks ln] -----"
"----------- [bi->skb] <-- Adv Rx Write-Back format
\n
"
);
for
(
i
=
0
;
i
<
rx_ring
->
count
;
i
++
)
{
const
char
*
next_desc
;
struct
igb_rx_buffer
*
buffer_info
;
buffer_info
=
&
rx_ring
->
rx_buffer_info
[
i
];
rx_desc
=
IGB_RX_DESC
(
rx_ring
,
i
);
u0
=
(
struct
my_u0
*
)
rx_desc
;
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
)
{
/* Descriptor Done */
pr
intk
(
KERN_INFO
"RWB[0x%03X] %016llX
"
"
%016llX ---------------- %p
"
,
i
,
pr
_info
(
"%s[0x%03X] %016llX %016llX -------
"
"
--------- %p%s
\n
"
,
"RWB
"
,
i
,
le64_to_cpu
(
u0
->
a
),
le64_to_cpu
(
u0
->
b
),
buffer_info
->
skb
);
buffer_info
->
skb
,
next_desc
);
}
else
{
pr
intk
(
KERN_INFO
"R [0x%03X] %016llX
"
"
%016llX %016llX %p
"
,
i
,
pr
_info
(
"%s[0x%03X] %016llX %016llX %016llX
"
"
%p%s
\n
"
,
"R
"
,
i
,
le64_to_cpu
(
u0
->
a
),
le64_to_cpu
(
u0
->
b
),
(
u64
)
buffer_info
->
dma
,
buffer_info
->
skb
);
buffer_info
->
skb
,
next_desc
);
if
(
netif_msg_pktdata
(
adapter
))
{
print_hex_dump
(
KERN_INFO
,
""
,
...
...
@@ -538,14 +542,6 @@ static void igb_dump(struct igb_adapter *adapter)
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
)
{
int
ret
;
pr
intk
(
KERN_INFO
"%s - version %s
\n
"
,
pr
_info
(
"%s - version %s
\n
"
,
igb_driver_string
,
igb_driver_version
);
pr
intk
(
KERN_INFO
"%s
\n
"
,
igb_copyright
);
pr
_info
(
"%s
\n
"
,
igb_copyright
);
#ifdef CONFIG_IGB_DCA
dca_register_notify
(
&
dca_notifier
);
...
...
@@ -3642,23 +3638,23 @@ static void igb_watchdog_task(struct work_struct *work)
ctrl
=
rd32
(
E1000_CTRL
);
/* Links status message must follow this format */
printk
(
KERN_INFO
"igb: %s NIC Link is Up %d Mbps %s
,
"
"
Flow Control: %s
\n
"
,
printk
(
KERN_INFO
"igb: %s NIC Link is Up %d Mbps %s "
"Duplex,
Flow Control: %s
\n
"
,
netdev
->
name
,
adapter
->
link_speed
,
adapter
->
link_duplex
==
FULL_DUPLEX
?
"Full Duplex"
:
"Half Duplex
"
,
(
(
ctrl
&
E1000_CTRL_TFCE
)
&&
(
ctrl
&
E1000_CTRL_RFCE
)
)
?
"RX/TX"
:
(
(
ctrl
&
E1000_CTRL_RFCE
)
?
"RX"
:
(
(
ctrl
&
E1000_CTRL_TFCE
)
?
"TX"
:
"None"
))
);
"Full"
:
"Half
"
,
(
ctrl
&
E1000_CTRL_TFCE
)
&&
(
ctrl
&
E1000_CTRL_RFCE
)
?
"RX/TX"
:
(
ctrl
&
E1000_CTRL_RFCE
)
?
"RX"
:
(
ctrl
&
E1000_CTRL_TFCE
)
?
"TX"
:
"None"
);
/* check for thermal sensor event */
if
(
igb_thermal_sensor_event
(
hw
,
E1000_THSTAT_LINK_THROTTLE
))
{
printk
(
KERN_INFO
"igb: %s The network adapter "
"link speed was downshifted
"
"because it overheated.
\n
"
,
netdev
->
name
);
if
(
igb_thermal_sensor_event
(
hw
,
E1000_THSTAT_LINK_THROTTLE
))
{
netdev_info
(
netdev
,
"The network adapter link
"
"speed was downshifted because it "
"overheated
\n
"
);
}
/* adjust timeout factor according to speed/duplex */
...
...
@@ -3688,11 +3684,10 @@ static void igb_watchdog_task(struct work_struct *work)
adapter
->
link_duplex
=
0
;
/* check for thermal sensor event */
if
(
igb_thermal_sensor_event
(
hw
,
E1000_THSTAT_PWR_DOWN
))
{
printk
(
KERN_ERR
"igb: %s The network adapter "
"was stopped because it "
"overheated.
\n
"
,
netdev
->
name
);
if
(
igb_thermal_sensor_event
(
hw
,
E1000_THSTAT_PWR_DOWN
))
{
netdev_err
(
netdev
,
"The network adapter was "
"stopped because it overheated
\n
"
);
}
/* Links status message must follow this format */
...
...
drivers/net/ethernet/intel/igbvf/netdev.c
View file @
f85fa279
...
...
@@ -25,6 +25,8 @@
*******************************************************************************/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/types.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
)
{
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_duplex
==
FULL_DUPLEX
)
?
"Full Duplex"
:
"Half Duplex"
));
adapter
->
link_duplex
==
FULL_DUPLEX
?
"Full"
:
"Half"
);
}
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
)
{
int
ret
;
printk
(
KERN_INFO
"%s - version %s
\n
"
,
igbvf_driver_string
,
igbvf_driver_version
);
printk
(
KERN_INFO
"%s
\n
"
,
igbvf_copyright
);
pr_info
(
"%s - version %s
\n
"
,
igbvf_driver_string
,
igbvf_driver_version
);
pr_info
(
"%s
\n
"
,
igbvf_copyright
);
ret
=
pci_register_driver
(
&
igbvf_driver
);
...
...
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
View file @
f85fa279
...
...
@@ -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 */
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
* correct vectors
...
...
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
View file @
f85fa279
...
...
@@ -1710,8 +1710,6 @@ enum {
#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_ETH_LENGTH_OF_ADDRESS 6
#define IXGBE_EEPROM_PAGE_SIZE_MAX 128
#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 */
...
...
@@ -2802,9 +2800,9 @@ struct ixgbe_eeprom_info {
struct
ixgbe_mac_info
{
struct
ixgbe_mac_operations
ops
;
enum
ixgbe_mac_type
type
;
u8
addr
[
IXGBE_ETH_LENGTH_OF_ADDRESS
];
u8
perm_addr
[
IXGBE_ETH_LENGTH_OF_ADDRESS
];
u8
san_addr
[
IXGBE_ETH_LENGTH_OF_ADDRESS
];
u8
addr
[
ETH_ALEN
];
u8
perm_addr
[
ETH_ALEN
];
u8
san_addr
[
ETH_ALEN
];
/* prefix for World Wide Node Name (WWNN) */
u16
wwnn_prefix
;
/* prefix for World Wide Port Name (WWPN) */
...
...
drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
View file @
f85fa279
...
...
@@ -751,16 +751,20 @@ static s32 ixgbe_blink_led_start_X540(struct ixgbe_hw *hw, u32 index)
{
u32
macc_reg
;
u32
ledctl_reg
;
ixgbe_link_speed
speed
;
bool
link_up
;
/*
*
In order for the blink bit in the LED control register
*
to work, link and speed must be forced in the MAC. We
*
will reverse this
when we stop the blinking.
*
Link should be up in order for the blink bit in the LED control
*
register to work. Force link and speed in the MAC if link is down.
*
This will be reversed
when we stop the blinking.
*/
hw
->
mac
.
ops
.
check_link
(
hw
,
&
speed
,
&
link_up
,
false
);
if
(
link_up
==
false
)
{
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. */
ledctl_reg
=
IXGBE_READ_REG
(
hw
,
IXGBE_LEDCTL
);
ledctl_reg
&=
~
IXGBE_LED_MODE_MASK
(
index
);
...
...
drivers/net/ethernet/intel/ixgbevf/defines.h
View file @
f85fa279
...
...
@@ -35,7 +35,6 @@
#define IXGBE_VF_IRQ_CLEAR_MASK 7
#define IXGBE_VF_MAX_TX_QUEUES 1
#define IXGBE_VF_MAX_RX_QUEUES 1
#define IXGBE_ETH_LENGTH_OF_ADDRESS 6
/* Link speed */
typedef
u32
ixgbe_link_speed
;
...
...
drivers/net/ethernet/intel/ixgbevf/ethtool.c
View file @
f85fa279
...
...
@@ -27,6 +27,8 @@
/* ethtool support for ixgbevf */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/types.h>
#include <linux/module.h>
#include <linux/slab.h>
...
...
@@ -549,8 +551,8 @@ static const u32 register_test_patterns[] = {
writel((W & M), (adapter->hw.hw_addr + R)); \
val = readl(adapter->hw.hw_addr + R); \
if ((W & M) != (val & M)) { \
pr
intk(KERN_ERR "set/check reg %04X test failed: got 0x%08X
" \
"expected 0x%08X\n", R, (val & M), (W & M));
\
pr
_err("set/check reg %04X test failed: got 0x%08X expected
" \
"0x%08X\n", R, (val & M), (W & M));
\
*data = R; \
writel(before, (adapter->hw.hw_addr + R)); \
return 1; \
...
...
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
View file @
f85fa279
...
...
@@ -29,6 +29,9 @@
/******************************************************************************
Copyright (c)2006 - 2007 Myricom, Inc. for some LRO specific code
******************************************************************************/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/module.h>
...
...
@@ -1437,7 +1440,7 @@ static int ixgbevf_write_uc_addr_list(struct net_device *netdev)
int
count
=
0
;
if
((
netdev_uc_count
(
netdev
))
>
10
)
{
pr
intk
(
KERN_ERR
"Too many unicast filters - No Space
\n
"
);
pr
_err
(
"Too many unicast filters - No Space
\n
"
);
return
-
ENOSPC
;
}
...
...
@@ -2135,7 +2138,7 @@ static int ixgbevf_init_interrupt_scheme(struct ixgbevf_adapter *adapter)
err
=
ixgbevf_alloc_queues
(
adapter
);
if
(
err
)
{
pr
intk
(
KERN_ERR
"Unable to allocate memory for queues
\n
"
);
pr
_err
(
"Unable to allocate memory for queues
\n
"
);
goto
err_alloc_queues
;
}
...
...
@@ -2189,7 +2192,7 @@ static int __devinit ixgbevf_sw_init(struct ixgbevf_adapter *adapter)
}
else
{
err
=
hw
->
mac
.
ops
.
init_hw
(
hw
);
if
(
err
)
{
pr
intk
(
KERN_ERR
"init_shared_code failed: %d
\n
"
,
err
);
pr
_err
(
"init_shared_code failed: %d
\n
"
,
err
);
goto
out
;
}
}
...
...
@@ -2630,8 +2633,8 @@ static int ixgbevf_open(struct net_device *netdev)
* the vf can't start. */
if
(
hw
->
adapter_stopped
)
{
err
=
IXGBE_ERR_MBX
;
pr
intk
(
KERN_ERR
"Unable to start - perhaps the PF
"
"
Driver isn't
up yet
\n
"
);
pr
_err
(
"Unable to start - perhaps the PF Driver isn't
"
"up yet
\n
"
);
goto
err_setup_reset
;
}
}
...
...
@@ -2842,10 +2845,8 @@ static bool ixgbevf_tx_csum(struct ixgbevf_adapter *adapter,
break
;
default:
if
(
unlikely
(
net_ratelimit
()))
{
printk
(
KERN_WARNING
"partial checksum but "
"proto=%x!
\n
"
,
skb
->
protocol
);
pr_warn
(
"partial checksum but "
"proto=%x!
\n
"
,
skb
->
protocol
);
}
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
);
if
(
!
is_valid_ether_addr
(
netdev
->
dev_addr
))
{
pr
intk
(
KERN_ERR
"invalid MAC address
\n
"
);
pr
_err
(
"invalid MAC address
\n
"
);
err
=
-
EIO
;
goto
err_sw_init
;
}
...
...
@@ -3536,10 +3537,10 @@ static struct pci_driver ixgbevf_driver = {
static
int
__init
ixgbevf_init_module
(
void
)
{
int
ret
;
pr
intk
(
KERN_INFO
"ixgbevf:
%s - version %s
\n
"
,
ixgbevf_driver_string
,
pr
_info
(
"
%s - version %s
\n
"
,
ixgbevf_driver_string
,
ixgbevf_driver_version
);
pr
intk
(
KERN_INFO
"%s
\n
"
,
ixgbevf_copyright
);
pr
_info
(
"%s
\n
"
,
ixgbevf_copyright
);
ret
=
pci_register_driver
(
&
ixgbevf_driver
);
return
ret
;
...
...
drivers/net/ethernet/intel/ixgbevf/vf.c
View file @
f85fa279
...
...
@@ -108,7 +108,7 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
if
(
msgbuf
[
0
]
!=
(
IXGBE_VF_RESET
|
IXGBE_VT_MSGTYPE_ACK
))
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
];
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
)
{
memcpy
(
mac_addr
,
hw
->
mac
.
perm_addr
,
IXGBE_ETH_LENGTH_OF_ADDRESS
);
memcpy
(
mac_addr
,
hw
->
mac
.
perm_addr
,
ETH_ALEN
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment