Commit b4617240 authored by Peter P Waskiewicz's avatar Peter P Waskiewicz Committed by Jeff Garzik

ixgbe: Whitespace, copyright update and version number change patch

This patch cleans up a bit of whitespace issues with the driver, updates
the copyright information, and bumps the version number up.
Signed-off-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 51ac6445
/******************************************************************************* /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2007 Intel Corporation. Copyright(c) 1999 - 2008 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License, under the terms and conditions of the GNU General Public License,
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
the file called "COPYING". the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
...@@ -321,15 +320,11 @@ extern int ixgbe_up(struct ixgbe_adapter *adapter); ...@@ -321,15 +320,11 @@ extern int ixgbe_up(struct ixgbe_adapter *adapter);
extern void ixgbe_down(struct ixgbe_adapter *adapter); extern void ixgbe_down(struct ixgbe_adapter *adapter);
extern void ixgbe_reinit_locked(struct ixgbe_adapter *adapter); extern void ixgbe_reinit_locked(struct ixgbe_adapter *adapter);
extern void ixgbe_reset(struct ixgbe_adapter *adapter); extern void ixgbe_reset(struct ixgbe_adapter *adapter);
extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
extern void ixgbe_set_ethtool_ops(struct net_device *netdev); extern void ixgbe_set_ethtool_ops(struct net_device *netdev);
extern int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter, extern int ixgbe_setup_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
struct ixgbe_ring *rxdr); extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *adapter, extern void ixgbe_free_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
struct ixgbe_ring *txdr); extern void ixgbe_free_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
extern void ixgbe_free_rx_resources(struct ixgbe_adapter *adapter, extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
struct ixgbe_ring *rxdr);
extern void ixgbe_free_tx_resources(struct ixgbe_adapter *adapter,
struct ixgbe_ring *txdr);
#endif /* _IXGBE_H_ */ #endif /* _IXGBE_H_ */
/******************************************************************************* /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2007 Intel Corporation. Copyright(c) 1999 - 2008 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License, under the terms and conditions of the GNU General Public License,
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
the file called "COPYING". the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
...@@ -42,33 +41,11 @@ ...@@ -42,33 +41,11 @@
static s32 ixgbe_get_copper_link_capabilities_82598(struct ixgbe_hw *hw, static s32 ixgbe_get_copper_link_capabilities_82598(struct ixgbe_hw *hw,
ixgbe_link_speed *speed, ixgbe_link_speed *speed,
bool *autoneg); bool *autoneg);
static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw);
static s32 ixgbe_setup_fc_82598(struct ixgbe_hw *hw, s32 packetbuf_num);
static s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw);
static s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw,
ixgbe_link_speed *speed,
bool *link_up, bool link_up_wait_to_complete);
static s32 ixgbe_setup_mac_link_speed_82598(struct ixgbe_hw *hw,
ixgbe_link_speed speed,
bool autoneg,
bool autoneg_wait_to_complete);
static s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw); static s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw);
static s32 ixgbe_setup_copper_link_speed_82598(struct ixgbe_hw *hw, static s32 ixgbe_setup_copper_link_speed_82598(struct ixgbe_hw *hw,
ixgbe_link_speed speed, ixgbe_link_speed speed,
bool autoneg, bool autoneg,
bool autoneg_wait_to_complete); bool autoneg_wait_to_complete);
static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw);
static s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq);
static s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq);
static s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan,
u32 vind, bool vlan_on);
static s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw);
static s32 ixgbe_blink_led_stop_82598(struct ixgbe_hw *hw, u32 index);
static s32 ixgbe_blink_led_start_82598(struct ixgbe_hw *hw, u32 index);
static s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val);
static s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val);
static s32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw);
static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw);
/** /**
*/ */
...@@ -112,8 +89,8 @@ static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw) ...@@ -112,8 +89,8 @@ static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw)
* Determines the link capabilities by reading the AUTOC register. * Determines the link capabilities by reading the AUTOC register.
**/ **/
static s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw, static s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw,
ixgbe_link_speed *speed, ixgbe_link_speed *speed,
bool *autoneg) bool *autoneg)
{ {
s32 status = 0; s32 status = 0;
s32 autoc_reg; s32 autoc_reg;
...@@ -180,8 +157,8 @@ s32 ixgbe_get_copper_link_capabilities_82598(struct ixgbe_hw *hw, ...@@ -180,8 +157,8 @@ s32 ixgbe_get_copper_link_capabilities_82598(struct ixgbe_hw *hw,
*autoneg = true; *autoneg = true;
status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_PHY_SPEED_ABILITY, status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_PHY_SPEED_ABILITY,
IXGBE_MDIO_PMA_PMD_DEV_TYPE, IXGBE_MDIO_PMA_PMD_DEV_TYPE,
&speed_ability); &speed_ability);
if (status == 0) { if (status == 0) {
if (speed_ability & IXGBE_MDIO_PHY_SPEED_10G) if (speed_ability & IXGBE_MDIO_PHY_SPEED_10G)
...@@ -408,8 +385,9 @@ static s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw) ...@@ -408,8 +385,9 @@ static s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw)
* *
* Reads the links register to determine if link is up and the current speed * Reads the links register to determine if link is up and the current speed
**/ **/
static s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed *speed, static s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw,
bool *link_up, bool link_up_wait_to_complete) ixgbe_link_speed *speed, bool *link_up,
bool link_up_wait_to_complete)
{ {
u32 links_reg; u32 links_reg;
u32 i; u32 i;
...@@ -452,8 +430,8 @@ static s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed *spe ...@@ -452,8 +430,8 @@ static s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed *spe
* Set the link speed in the AUTOC register and restarts link. * Set the link speed in the AUTOC register and restarts link.
**/ **/
static s32 ixgbe_setup_mac_link_speed_82598(struct ixgbe_hw *hw, static s32 ixgbe_setup_mac_link_speed_82598(struct ixgbe_hw *hw,
ixgbe_link_speed speed, bool autoneg, ixgbe_link_speed speed, bool autoneg,
bool autoneg_wait_to_complete) bool autoneg_wait_to_complete)
{ {
s32 status = 0; s32 status = 0;
...@@ -525,15 +503,15 @@ static s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw) ...@@ -525,15 +503,15 @@ static s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw)
* Sets the link speed in the AUTOC register in the MAC and restarts link. * Sets the link speed in the AUTOC register in the MAC and restarts link.
**/ **/
static s32 ixgbe_setup_copper_link_speed_82598(struct ixgbe_hw *hw, static s32 ixgbe_setup_copper_link_speed_82598(struct ixgbe_hw *hw,
ixgbe_link_speed speed, ixgbe_link_speed speed,
bool autoneg, bool autoneg,
bool autoneg_wait_to_complete) bool autoneg_wait_to_complete)
{ {
s32 status; s32 status;
/* Setup the PHY according to input speed */ /* Setup the PHY according to input speed */
status = hw->phy.ops.setup_link_speed(hw, speed, autoneg, status = hw->phy.ops.setup_link_speed(hw, speed, autoneg,
autoneg_wait_to_complete); autoneg_wait_to_complete);
/* Set MAC to KX/KX4 autoneg, which defaults to Parallel detection */ /* Set MAC to KX/KX4 autoneg, which defaults to Parallel detection */
hw->mac.link_attach_type = (IXGBE_AUTOC_10G_KX4 | IXGBE_AUTOC_1G_KX); hw->mac.link_attach_type = (IXGBE_AUTOC_10G_KX4 | IXGBE_AUTOC_1G_KX);
...@@ -653,7 +631,7 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw) ...@@ -653,7 +631,7 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw)
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc); IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc);
} else { } else {
hw->mac.link_attach_type = hw->mac.link_attach_type =
(autoc & IXGBE_AUTOC_LMS_ATTACH_TYPE); (autoc & IXGBE_AUTOC_LMS_ATTACH_TYPE);
hw->mac.link_mode_select = (autoc & IXGBE_AUTOC_LMS_MASK); hw->mac.link_mode_select = (autoc & IXGBE_AUTOC_LMS_MASK);
hw->mac.link_settings_loaded = true; hw->mac.link_settings_loaded = true;
} }
...@@ -715,7 +693,7 @@ static s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) ...@@ -715,7 +693,7 @@ static s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
* Turn on/off specified VLAN in the VLAN filter table. * Turn on/off specified VLAN in the VLAN filter table.
**/ **/
s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind, s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind,
bool vlan_on) bool vlan_on)
{ {
u32 regindex; u32 regindex;
u32 bitindex; u32 bitindex;
...@@ -770,7 +748,7 @@ static s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw) ...@@ -770,7 +748,7 @@ static s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw)
for (vlanbyte = 0; vlanbyte < 4; vlanbyte++) for (vlanbyte = 0; vlanbyte < 4; vlanbyte++)
for (offset = 0; offset < hw->mac.vft_size; offset++) for (offset = 0; offset < hw->mac.vft_size; offset++)
IXGBE_WRITE_REG(hw, IXGBE_VFTAVIND(vlanbyte, offset), IXGBE_WRITE_REG(hw, IXGBE_VFTAVIND(vlanbyte, offset),
0); 0);
return 0; return 0;
} }
......
/******************************************************************************* /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2007 Intel Corporation. Copyright(c) 1999 - 2008 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License, under the terms and conditions of the GNU General Public License,
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
the file called "COPYING". the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
...@@ -481,7 +480,7 @@ s32 ixgbe_read_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 *data) ...@@ -481,7 +480,7 @@ s32 ixgbe_read_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 *data)
if (status == 0) if (status == 0)
*data = (IXGBE_READ_REG(hw, IXGBE_EERD) >> *data = (IXGBE_READ_REG(hw, IXGBE_EERD) >>
IXGBE_EEPROM_READ_REG_DATA); IXGBE_EEPROM_READ_REG_DATA);
else else
hw_dbg(hw, "Eeprom read timed out\n"); hw_dbg(hw, "Eeprom read timed out\n");
...@@ -620,7 +619,7 @@ static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw) ...@@ -620,7 +619,7 @@ static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw)
*/ */
if (i >= timeout) { if (i >= timeout) {
hw_dbg(hw, "Driver can't access the Eeprom - Semaphore " hw_dbg(hw, "Driver can't access the Eeprom - Semaphore "
"not granted.\n"); "not granted.\n");
ixgbe_release_eeprom_semaphore(hw); ixgbe_release_eeprom_semaphore(hw);
status = IXGBE_ERR_EEPROM; status = IXGBE_ERR_EEPROM;
} }
...@@ -1018,14 +1017,14 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, ...@@ -1018,14 +1017,14 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
/* Make sure we are using a valid rar index range */ /* Make sure we are using a valid rar index range */
if (index < rar_entries) { if (index < rar_entries) {
/* /*
* HW expects these in little endian so we reverse the byte * HW expects these in little endian so we reverse the byte
* order from network order (big endian) to little endian * order from network order (big endian) to little endian
*/ */
rar_low = ((u32)addr[0] | rar_low = ((u32)addr[0] |
((u32)addr[1] << 8) | ((u32)addr[1] << 8) |
((u32)addr[2] << 16) | ((u32)addr[2] << 16) |
((u32)addr[3] << 24)); ((u32)addr[3] << 24));
/* /*
* Some parts put the VMDq setting in the extra RAH bits, * Some parts put the VMDq setting in the extra RAH bits,
* so save everything except the lower 16 bits that hold part * so save everything except the lower 16 bits that hold part
...@@ -1035,11 +1034,11 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, ...@@ -1035,11 +1034,11 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
rar_high &= ~(0x0000FFFF | IXGBE_RAH_AV); rar_high &= ~(0x0000FFFF | IXGBE_RAH_AV);
rar_high |= ((u32)addr[4] | ((u32)addr[5] << 8)); rar_high |= ((u32)addr[4] | ((u32)addr[5] << 8));
if (enable_addr != 0) if (enable_addr != 0)
rar_high |= IXGBE_RAH_AV; rar_high |= IXGBE_RAH_AV;
IXGBE_WRITE_REG(hw, IXGBE_RAL(index), rar_low); IXGBE_WRITE_REG(hw, IXGBE_RAL(index), rar_low);
IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high);
} else { } else {
hw_dbg(hw, "RAR index %d is out of range.\n", index); hw_dbg(hw, "RAR index %d is out of range.\n", index);
} }
...@@ -1137,18 +1136,18 @@ s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw) ...@@ -1137,18 +1136,18 @@ s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw)
hw->mac.ops.get_mac_addr(hw, hw->mac.addr); hw->mac.ops.get_mac_addr(hw, hw->mac.addr);
hw_dbg(hw, " Keeping Current RAR0 Addr =%.2X %.2X %.2X ", hw_dbg(hw, " Keeping Current RAR0 Addr =%.2X %.2X %.2X ",
hw->mac.addr[0], hw->mac.addr[1], hw->mac.addr[0], hw->mac.addr[1],
hw->mac.addr[2]); hw->mac.addr[2]);
hw_dbg(hw, "%.2X %.2X %.2X\n", hw->mac.addr[3], hw_dbg(hw, "%.2X %.2X %.2X\n", hw->mac.addr[3],
hw->mac.addr[4], hw->mac.addr[5]); hw->mac.addr[4], hw->mac.addr[5]);
} else { } else {
/* Setup the receive address. */ /* Setup the receive address. */
hw_dbg(hw, "Overriding MAC Address in RAR[0]\n"); hw_dbg(hw, "Overriding MAC Address in RAR[0]\n");
hw_dbg(hw, " New MAC Addr =%.2X %.2X %.2X ", hw_dbg(hw, " New MAC Addr =%.2X %.2X %.2X ",
hw->mac.addr[0], hw->mac.addr[1], hw->mac.addr[0], hw->mac.addr[1],
hw->mac.addr[2]); hw->mac.addr[2]);
hw_dbg(hw, "%.2X %.2X %.2X\n", hw->mac.addr[3], hw_dbg(hw, "%.2X %.2X %.2X\n", hw->mac.addr[3],
hw->mac.addr[4], hw->mac.addr[5]); hw->mac.addr[4], hw->mac.addr[5]);
hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV); hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
} }
...@@ -1296,19 +1295,19 @@ static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr) ...@@ -1296,19 +1295,19 @@ static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr)
u32 vector = 0; u32 vector = 0;
switch (hw->mac.mc_filter_type) { switch (hw->mac.mc_filter_type) {
case 0: /* use bits [47:36] of the address */ case 0: /* use bits [47:36] of the address */
vector = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4)); vector = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4));
break; break;
case 1: /* use bits [46:35] of the address */ case 1: /* use bits [46:35] of the address */
vector = ((mc_addr[4] >> 3) | (((u16)mc_addr[5]) << 5)); vector = ((mc_addr[4] >> 3) | (((u16)mc_addr[5]) << 5));
break; break;
case 2: /* use bits [45:34] of the address */ case 2: /* use bits [45:34] of the address */
vector = ((mc_addr[4] >> 2) | (((u16)mc_addr[5]) << 6)); vector = ((mc_addr[4] >> 2) | (((u16)mc_addr[5]) << 6));
break; break;
case 3: /* use bits [43:32] of the address */ case 3: /* use bits [43:32] of the address */
vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8)); vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8));
break; break;
default: /* Invalid mc_filter_type */ default: /* Invalid mc_filter_type */
hw_dbg(hw, "MC filter type param set incorrectly\n"); hw_dbg(hw, "MC filter type param set incorrectly\n");
break; break;
} }
...@@ -1366,8 +1365,8 @@ static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr) ...@@ -1366,8 +1365,8 @@ static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr)
u32 rar; u32 rar;
hw_dbg(hw, " MC Addr =%.2X %.2X %.2X %.2X %.2X %.2X\n", hw_dbg(hw, " MC Addr =%.2X %.2X %.2X %.2X %.2X %.2X\n",
mc_addr[0], mc_addr[1], mc_addr[2], mc_addr[0], mc_addr[1], mc_addr[2],
mc_addr[3], mc_addr[4], mc_addr[5]); mc_addr[3], mc_addr[4], mc_addr[5]);
/* /*
* Place this multicast address in the RAR if there is room, * Place this multicast address in the RAR if there is room,
...@@ -1400,7 +1399,7 @@ static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr) ...@@ -1400,7 +1399,7 @@ static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr)
* multicast table. * multicast table.
**/ **/
s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list,
u32 mc_addr_count, ixgbe_mc_addr_itr next) u32 mc_addr_count, ixgbe_mc_addr_itr next)
{ {
u32 i; u32 i;
u32 rar_entries = hw->mac.num_rar_entries; u32 rar_entries = hw->mac.num_rar_entries;
...@@ -1437,7 +1436,7 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, ...@@ -1437,7 +1436,7 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list,
/* Enable mta */ /* Enable mta */
if (hw->addr_ctrl.mta_in_use > 0) if (hw->addr_ctrl.mta_in_use > 0)
IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL, IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL,
IXGBE_MCSTCTRL_MFE | hw->mac.mc_filter_type); IXGBE_MCSTCTRL_MFE | hw->mac.mc_filter_type);
hw_dbg(hw, "ixgbe_update_mc_addr_list_generic Complete\n"); hw_dbg(hw, "ixgbe_update_mc_addr_list_generic Complete\n");
return 0; return 0;
......
/******************************************************************************* /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2007 Intel Corporation. Copyright(c) 1999 - 2008 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License, under the terms and conditions of the GNU General Public License,
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
the file called "COPYING". the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
......
/******************************************************************************* /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2007 Intel Corporation. Copyright(c) 1999 - 2008 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License, under the terms and conditions of the GNU General Public License,
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
the file called "COPYING". the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
...@@ -48,7 +47,7 @@ struct ixgbe_stats { ...@@ -48,7 +47,7 @@ struct ixgbe_stats {
}; };
#define IXGBE_STAT(m) sizeof(((struct ixgbe_adapter *)0)->m), \ #define IXGBE_STAT(m) sizeof(((struct ixgbe_adapter *)0)->m), \
offsetof(struct ixgbe_adapter, m) offsetof(struct ixgbe_adapter, m)
static struct ixgbe_stats ixgbe_gstrings_stats[] = { static struct ixgbe_stats ixgbe_gstrings_stats[] = {
{"rx_packets", IXGBE_STAT(net_stats.rx_packets)}, {"rx_packets", IXGBE_STAT(net_stats.rx_packets)},
{"tx_packets", IXGBE_STAT(net_stats.tx_packets)}, {"tx_packets", IXGBE_STAT(net_stats.tx_packets)},
...@@ -95,14 +94,15 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { ...@@ -95,14 +94,15 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = {
}; };
#define IXGBE_QUEUE_STATS_LEN \ #define IXGBE_QUEUE_STATS_LEN \
((((struct ixgbe_adapter *)netdev->priv)->num_tx_queues + \ ((((struct ixgbe_adapter *)netdev->priv)->num_tx_queues + \
((struct ixgbe_adapter *)netdev->priv)->num_rx_queues) * \ ((struct ixgbe_adapter *)netdev->priv)->num_rx_queues) * \
(sizeof(struct ixgbe_queue_stats) / sizeof(u64))) (sizeof(struct ixgbe_queue_stats) / sizeof(u64)))
#define IXGBE_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbe_gstrings_stats) #define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + IXGBE_QUEUE_STATS_LEN)
#define IXGBE_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbe_gstrings_stats)
#define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + IXGBE_QUEUE_STATS_LEN) #define IXGBE_STATS_LEN (IXGBE_GLOBAL_STATS_LEN + IXGBE_QUEUE_STATS_LEN)
static int ixgbe_get_settings(struct net_device *netdev, static int ixgbe_get_settings(struct net_device *netdev,
struct ethtool_cmd *ecmd) struct ethtool_cmd *ecmd)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
...@@ -114,7 +114,7 @@ static int ixgbe_get_settings(struct net_device *netdev, ...@@ -114,7 +114,7 @@ static int ixgbe_get_settings(struct net_device *netdev,
ecmd->transceiver = XCVR_EXTERNAL; ecmd->transceiver = XCVR_EXTERNAL;
if (hw->phy.media_type == ixgbe_media_type_copper) { if (hw->phy.media_type == ixgbe_media_type_copper) {
ecmd->supported |= (SUPPORTED_1000baseT_Full | ecmd->supported |= (SUPPORTED_1000baseT_Full |
SUPPORTED_TP | SUPPORTED_Autoneg); SUPPORTED_TP | SUPPORTED_Autoneg);
ecmd->advertising = (ADVERTISED_TP | ADVERTISED_Autoneg); ecmd->advertising = (ADVERTISED_TP | ADVERTISED_Autoneg);
if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL) if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL)
...@@ -126,7 +126,7 @@ static int ixgbe_get_settings(struct net_device *netdev, ...@@ -126,7 +126,7 @@ static int ixgbe_get_settings(struct net_device *netdev,
} else { } else {
ecmd->supported |= SUPPORTED_FIBRE; ecmd->supported |= SUPPORTED_FIBRE;
ecmd->advertising = (ADVERTISED_10000baseT_Full | ecmd->advertising = (ADVERTISED_10000baseT_Full |
ADVERTISED_FIBRE); ADVERTISED_FIBRE);
ecmd->port = PORT_FIBRE; ecmd->port = PORT_FIBRE;
ecmd->autoneg = AUTONEG_DISABLE; ecmd->autoneg = AUTONEG_DISABLE;
} }
...@@ -134,7 +134,7 @@ static int ixgbe_get_settings(struct net_device *netdev, ...@@ -134,7 +134,7 @@ static int ixgbe_get_settings(struct net_device *netdev,
hw->mac.ops.check_link(hw, &link_speed, &link_up, false); hw->mac.ops.check_link(hw, &link_speed, &link_up, false);
if (link_up) { if (link_up) {
ecmd->speed = (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? ecmd->speed = (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ?
SPEED_10000 : SPEED_1000; SPEED_10000 : SPEED_1000;
ecmd->duplex = DUPLEX_FULL; ecmd->duplex = DUPLEX_FULL;
} else { } else {
ecmd->speed = -1; ecmd->speed = -1;
...@@ -145,7 +145,7 @@ static int ixgbe_get_settings(struct net_device *netdev, ...@@ -145,7 +145,7 @@ static int ixgbe_get_settings(struct net_device *netdev,
} }
static int ixgbe_set_settings(struct net_device *netdev, static int ixgbe_set_settings(struct net_device *netdev,
struct ethtool_cmd *ecmd) struct ethtool_cmd *ecmd)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
...@@ -165,7 +165,7 @@ static int ixgbe_set_settings(struct net_device *netdev, ...@@ -165,7 +165,7 @@ static int ixgbe_set_settings(struct net_device *netdev,
} }
static void ixgbe_get_pauseparam(struct net_device *netdev, static void ixgbe_get_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause) struct ethtool_pauseparam *pause)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
...@@ -183,7 +183,7 @@ static void ixgbe_get_pauseparam(struct net_device *netdev, ...@@ -183,7 +183,7 @@ static void ixgbe_get_pauseparam(struct net_device *netdev,
} }
static int ixgbe_set_pauseparam(struct net_device *netdev, static int ixgbe_set_pauseparam(struct net_device *netdev,
struct ethtool_pauseparam *pause) struct ethtool_pauseparam *pause)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
...@@ -282,7 +282,7 @@ static int ixgbe_get_regs_len(struct net_device *netdev) ...@@ -282,7 +282,7 @@ static int ixgbe_get_regs_len(struct net_device *netdev)
#define IXGBE_GET_STAT(_A_, _R_) _A_->stats._R_ #define IXGBE_GET_STAT(_A_, _R_) _A_->stats._R_
static void ixgbe_get_regs(struct net_device *netdev, static void ixgbe_get_regs(struct net_device *netdev,
struct ethtool_regs *regs, void *p) struct ethtool_regs *regs, void *p)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
...@@ -583,7 +583,7 @@ static int ixgbe_get_eeprom_len(struct net_device *netdev) ...@@ -583,7 +583,7 @@ static int ixgbe_get_eeprom_len(struct net_device *netdev)
} }
static int ixgbe_get_eeprom(struct net_device *netdev, static int ixgbe_get_eeprom(struct net_device *netdev,
struct ethtool_eeprom *eeprom, u8 *bytes) struct ethtool_eeprom *eeprom, u8 *bytes)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
...@@ -607,7 +607,7 @@ static int ixgbe_get_eeprom(struct net_device *netdev, ...@@ -607,7 +607,7 @@ static int ixgbe_get_eeprom(struct net_device *netdev,
for (i = 0; i < eeprom_len; i++) { for (i = 0; i < eeprom_len; i++) {
if ((ret_val = hw->eeprom.ops.read(hw, first_word + i, if ((ret_val = hw->eeprom.ops.read(hw, first_word + i,
&eeprom_buff[i]))) &eeprom_buff[i])))
break; break;
} }
...@@ -622,7 +622,7 @@ static int ixgbe_get_eeprom(struct net_device *netdev, ...@@ -622,7 +622,7 @@ static int ixgbe_get_eeprom(struct net_device *netdev,
} }
static void ixgbe_get_drvinfo(struct net_device *netdev, static void ixgbe_get_drvinfo(struct net_device *netdev,
struct ethtool_drvinfo *drvinfo) struct ethtool_drvinfo *drvinfo)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
...@@ -635,7 +635,7 @@ static void ixgbe_get_drvinfo(struct net_device *netdev, ...@@ -635,7 +635,7 @@ static void ixgbe_get_drvinfo(struct net_device *netdev,
} }
static void ixgbe_get_ringparam(struct net_device *netdev, static void ixgbe_get_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring) struct ethtool_ringparam *ring)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_ring *tx_ring = adapter->tx_ring; struct ixgbe_ring *tx_ring = adapter->tx_ring;
...@@ -652,7 +652,7 @@ static void ixgbe_get_ringparam(struct net_device *netdev, ...@@ -652,7 +652,7 @@ static void ixgbe_get_ringparam(struct net_device *netdev,
} }
static int ixgbe_set_ringparam(struct net_device *netdev, static int ixgbe_set_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ring) struct ethtool_ringparam *ring)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_ring *temp_ring; struct ixgbe_ring *temp_ring;
...@@ -706,7 +706,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev, ...@@ -706,7 +706,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
if (err) { if (err) {
while (i) { while (i) {
i--; i--;
ixgbe_free_tx_resources(adapter, &temp_ring[i]); ixgbe_free_tx_resources(adapter,
&temp_ring[i]);
} }
goto err_setup; goto err_setup;
} }
...@@ -731,7 +732,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev, ...@@ -731,7 +732,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
if (err) { if (err) {
while (i) { while (i) {
i--; i--;
ixgbe_free_rx_resources(adapter, &temp_ring[i]); ixgbe_free_rx_resources(adapter,
&temp_ring[i]);
} }
goto err_setup; goto err_setup;
} }
...@@ -767,7 +769,7 @@ static int ixgbe_get_sset_count(struct net_device *netdev, int sset) ...@@ -767,7 +769,7 @@ static int ixgbe_get_sset_count(struct net_device *netdev, int sset)
} }
static void ixgbe_get_ethtool_stats(struct net_device *netdev, static void ixgbe_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats, u64 *data) struct ethtool_stats *stats, u64 *data)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
u64 *queue_stat; u64 *queue_stat;
...@@ -788,7 +790,7 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, ...@@ -788,7 +790,7 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) { for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) {
char *p = (char *)adapter + ixgbe_gstrings_stats[i].stat_offset; char *p = (char *)adapter + ixgbe_gstrings_stats[i].stat_offset;
data[i] = (ixgbe_gstrings_stats[i].sizeof_stat == data[i] = (ixgbe_gstrings_stats[i].sizeof_stat ==
sizeof(u64)) ? *(u64 *)p : *(u32 *)p; sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
} }
for (j = 0; j < adapter->num_tx_queues; j++) { for (j = 0; j < adapter->num_tx_queues; j++) {
queue_stat = (u64 *)&adapter->tx_ring[j].stats; queue_stat = (u64 *)&adapter->tx_ring[j].stats;
...@@ -805,7 +807,7 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, ...@@ -805,7 +807,7 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
} }
static void ixgbe_get_strings(struct net_device *netdev, u32 stringset, static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
u8 *data) u8 *data)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
char *p = (char *)data; char *p = (char *)data;
...@@ -830,14 +832,14 @@ static void ixgbe_get_strings(struct net_device *netdev, u32 stringset, ...@@ -830,14 +832,14 @@ static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
sprintf(p, "rx_queue_%u_bytes", i); sprintf(p, "rx_queue_%u_bytes", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
} }
/* BUG_ON(p - data != IXGBE_STATS_LEN * ETH_GSTRING_LEN); */ /* BUG_ON(p - data != IXGBE_STATS_LEN * ETH_GSTRING_LEN); */
break; break;
} }
} }
static void ixgbe_get_wol(struct net_device *netdev, static void ixgbe_get_wol(struct net_device *netdev,
struct ethtool_wolinfo *wol) struct ethtool_wolinfo *wol)
{ {
wol->supported = 0; wol->supported = 0;
wol->wolopts = 0; wol->wolopts = 0;
...@@ -879,7 +881,7 @@ static int ixgbe_phys_id(struct net_device *netdev, u32 data) ...@@ -879,7 +881,7 @@ static int ixgbe_phys_id(struct net_device *netdev, u32 data)
} }
static int ixgbe_get_coalesce(struct net_device *netdev, static int ixgbe_get_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec) struct ethtool_coalesce *ec)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
...@@ -904,7 +906,7 @@ static int ixgbe_get_coalesce(struct net_device *netdev, ...@@ -904,7 +906,7 @@ static int ixgbe_get_coalesce(struct net_device *netdev,
} }
static int ixgbe_set_coalesce(struct net_device *netdev, static int ixgbe_set_coalesce(struct net_device *netdev,
struct ethtool_coalesce *ec) struct ethtool_coalesce *ec)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
...@@ -974,7 +976,7 @@ static const struct ethtool_ops ixgbe_ethtool_ops = { ...@@ -974,7 +976,7 @@ static const struct ethtool_ops ixgbe_ethtool_ops = {
.set_tso = ixgbe_set_tso, .set_tso = ixgbe_set_tso,
.get_strings = ixgbe_get_strings, .get_strings = ixgbe_get_strings,
.phys_id = ixgbe_phys_id, .phys_id = ixgbe_phys_id,
.get_sset_count = ixgbe_get_sset_count, .get_sset_count = ixgbe_get_sset_count,
.get_ethtool_stats = ixgbe_get_ethtool_stats, .get_ethtool_stats = ixgbe_get_ethtool_stats,
.get_coalesce = ixgbe_get_coalesce, .get_coalesce = ixgbe_get_coalesce,
.set_coalesce = ixgbe_set_coalesce, .set_coalesce = ixgbe_set_coalesce,
......
This diff is collapsed.
/******************************************************************************* /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2007 Intel Corporation. Copyright(c) 1999 - 2008 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License, under the terms and conditions of the GNU General Public License,
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
the file called "COPYING". the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
......
/******************************************************************************* /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2007 Intel Corporation. Copyright(c) 1999 - 2008 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License, under the terms and conditions of the GNU General Public License,
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
the file called "COPYING". the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
......
/******************************************************************************* /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2007 Intel Corporation. Copyright(c) 1999 - 2008 Intel Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License, under the terms and conditions of the GNU General Public License,
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
the file called "COPYING". the file called "COPYING".
Contact Information: Contact Information:
Linux NICS <linux.nics@intel.com>
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
......
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