diff options
author | Peter P Waskiewicz <peter.p.waskiewicz.jr@intel.com> | 2008-09-11 23:04:46 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-24 18:55:05 -0400 |
commit | b46172402f39719e97b921cc3ca85141f3e8b1c2 (patch) | |
tree | 5dc5e2df7b0e08d3f6bc206594b835ae0d337b9d /drivers/net/ixgbe/ixgbe_common.c | |
parent | 51ac6445b108abab5e5ebeb5e68665d4509a6f29 (diff) |
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: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_common.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.c | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index a11ff0db9d25..f67c68404bb3 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2007 Intel Corporation. | 4 | Copyright(c) 1999 - 2008 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -20,7 +20,6 @@ | |||
20 | the file called "COPYING". | 20 | the file called "COPYING". |
21 | 21 | ||
22 | Contact Information: | 22 | Contact Information: |
23 | Linux NICS <linux.nics@intel.com> | ||
24 | e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> | 23 | e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> |
25 | Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | 24 | Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
26 | 25 | ||
@@ -481,7 +480,7 @@ s32 ixgbe_read_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 *data) | |||
481 | 480 | ||
482 | if (status == 0) | 481 | if (status == 0) |
483 | *data = (IXGBE_READ_REG(hw, IXGBE_EERD) >> | 482 | *data = (IXGBE_READ_REG(hw, IXGBE_EERD) >> |
484 | IXGBE_EEPROM_READ_REG_DATA); | 483 | IXGBE_EEPROM_READ_REG_DATA); |
485 | else | 484 | else |
486 | hw_dbg(hw, "Eeprom read timed out\n"); | 485 | hw_dbg(hw, "Eeprom read timed out\n"); |
487 | 486 | ||
@@ -620,7 +619,7 @@ static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw) | |||
620 | */ | 619 | */ |
621 | if (i >= timeout) { | 620 | if (i >= timeout) { |
622 | hw_dbg(hw, "Driver can't access the Eeprom - Semaphore " | 621 | hw_dbg(hw, "Driver can't access the Eeprom - Semaphore " |
623 | "not granted.\n"); | 622 | "not granted.\n"); |
624 | ixgbe_release_eeprom_semaphore(hw); | 623 | ixgbe_release_eeprom_semaphore(hw); |
625 | status = IXGBE_ERR_EEPROM; | 624 | status = IXGBE_ERR_EEPROM; |
626 | } | 625 | } |
@@ -1018,14 +1017,14 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, | |||
1018 | 1017 | ||
1019 | /* Make sure we are using a valid rar index range */ | 1018 | /* Make sure we are using a valid rar index range */ |
1020 | if (index < rar_entries) { | 1019 | if (index < rar_entries) { |
1021 | /* | 1020 | /* |
1022 | * HW expects these in little endian so we reverse the byte | 1021 | * HW expects these in little endian so we reverse the byte |
1023 | * order from network order (big endian) to little endian | 1022 | * order from network order (big endian) to little endian |
1024 | */ | 1023 | */ |
1025 | rar_low = ((u32)addr[0] | | 1024 | rar_low = ((u32)addr[0] | |
1026 | ((u32)addr[1] << 8) | | 1025 | ((u32)addr[1] << 8) | |
1027 | ((u32)addr[2] << 16) | | 1026 | ((u32)addr[2] << 16) | |
1028 | ((u32)addr[3] << 24)); | 1027 | ((u32)addr[3] << 24)); |
1029 | /* | 1028 | /* |
1030 | * Some parts put the VMDq setting in the extra RAH bits, | 1029 | * Some parts put the VMDq setting in the extra RAH bits, |
1031 | * so save everything except the lower 16 bits that hold part | 1030 | * 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 | rar_high &= ~(0x0000FFFF | IXGBE_RAH_AV); | 1034 | rar_high &= ~(0x0000FFFF | IXGBE_RAH_AV); |
1036 | rar_high |= ((u32)addr[4] | ((u32)addr[5] << 8)); | 1035 | rar_high |= ((u32)addr[4] | ((u32)addr[5] << 8)); |
1037 | 1036 | ||
1038 | if (enable_addr != 0) | 1037 | if (enable_addr != 0) |
1039 | rar_high |= IXGBE_RAH_AV; | 1038 | rar_high |= IXGBE_RAH_AV; |
1040 | 1039 | ||
1041 | IXGBE_WRITE_REG(hw, IXGBE_RAL(index), rar_low); | 1040 | IXGBE_WRITE_REG(hw, IXGBE_RAL(index), rar_low); |
1042 | IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); | 1041 | IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); |
1043 | } else { | 1042 | } else { |
1044 | hw_dbg(hw, "RAR index %d is out of range.\n", index); | 1043 | hw_dbg(hw, "RAR index %d is out of range.\n", index); |
1045 | } | 1044 | } |
@@ -1137,18 +1136,18 @@ s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw) | |||
1137 | hw->mac.ops.get_mac_addr(hw, hw->mac.addr); | 1136 | hw->mac.ops.get_mac_addr(hw, hw->mac.addr); |
1138 | 1137 | ||
1139 | hw_dbg(hw, " Keeping Current RAR0 Addr =%.2X %.2X %.2X ", | 1138 | hw_dbg(hw, " Keeping Current RAR0 Addr =%.2X %.2X %.2X ", |
1140 | hw->mac.addr[0], hw->mac.addr[1], | 1139 | hw->mac.addr[0], hw->mac.addr[1], |
1141 | hw->mac.addr[2]); | 1140 | hw->mac.addr[2]); |
1142 | hw_dbg(hw, "%.2X %.2X %.2X\n", hw->mac.addr[3], | 1141 | hw_dbg(hw, "%.2X %.2X %.2X\n", hw->mac.addr[3], |
1143 | hw->mac.addr[4], hw->mac.addr[5]); | 1142 | hw->mac.addr[4], hw->mac.addr[5]); |
1144 | } else { | 1143 | } else { |
1145 | /* Setup the receive address. */ | 1144 | /* Setup the receive address. */ |
1146 | hw_dbg(hw, "Overriding MAC Address in RAR[0]\n"); | 1145 | hw_dbg(hw, "Overriding MAC Address in RAR[0]\n"); |
1147 | hw_dbg(hw, " New MAC Addr =%.2X %.2X %.2X ", | 1146 | hw_dbg(hw, " New MAC Addr =%.2X %.2X %.2X ", |
1148 | hw->mac.addr[0], hw->mac.addr[1], | 1147 | hw->mac.addr[0], hw->mac.addr[1], |
1149 | hw->mac.addr[2]); | 1148 | hw->mac.addr[2]); |
1150 | hw_dbg(hw, "%.2X %.2X %.2X\n", hw->mac.addr[3], | 1149 | hw_dbg(hw, "%.2X %.2X %.2X\n", hw->mac.addr[3], |
1151 | hw->mac.addr[4], hw->mac.addr[5]); | 1150 | hw->mac.addr[4], hw->mac.addr[5]); |
1152 | 1151 | ||
1153 | hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV); | 1152 | hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV); |
1154 | } | 1153 | } |
@@ -1296,19 +1295,19 @@ static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr) | |||
1296 | u32 vector = 0; | 1295 | u32 vector = 0; |
1297 | 1296 | ||
1298 | switch (hw->mac.mc_filter_type) { | 1297 | switch (hw->mac.mc_filter_type) { |
1299 | case 0: /* use bits [47:36] of the address */ | 1298 | case 0: /* use bits [47:36] of the address */ |
1300 | vector = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4)); | 1299 | vector = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4)); |
1301 | break; | 1300 | break; |
1302 | case 1: /* use bits [46:35] of the address */ | 1301 | case 1: /* use bits [46:35] of the address */ |
1303 | vector = ((mc_addr[4] >> 3) | (((u16)mc_addr[5]) << 5)); | 1302 | vector = ((mc_addr[4] >> 3) | (((u16)mc_addr[5]) << 5)); |
1304 | break; | 1303 | break; |
1305 | case 2: /* use bits [45:34] of the address */ | 1304 | case 2: /* use bits [45:34] of the address */ |
1306 | vector = ((mc_addr[4] >> 2) | (((u16)mc_addr[5]) << 6)); | 1305 | vector = ((mc_addr[4] >> 2) | (((u16)mc_addr[5]) << 6)); |
1307 | break; | 1306 | break; |
1308 | case 3: /* use bits [43:32] of the address */ | 1307 | case 3: /* use bits [43:32] of the address */ |
1309 | vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8)); | 1308 | vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8)); |
1310 | break; | 1309 | break; |
1311 | default: /* Invalid mc_filter_type */ | 1310 | default: /* Invalid mc_filter_type */ |
1312 | hw_dbg(hw, "MC filter type param set incorrectly\n"); | 1311 | hw_dbg(hw, "MC filter type param set incorrectly\n"); |
1313 | break; | 1312 | break; |
1314 | } | 1313 | } |
@@ -1366,8 +1365,8 @@ static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr) | |||
1366 | u32 rar; | 1365 | u32 rar; |
1367 | 1366 | ||
1368 | hw_dbg(hw, " MC Addr =%.2X %.2X %.2X %.2X %.2X %.2X\n", | 1367 | hw_dbg(hw, " MC Addr =%.2X %.2X %.2X %.2X %.2X %.2X\n", |
1369 | mc_addr[0], mc_addr[1], mc_addr[2], | 1368 | mc_addr[0], mc_addr[1], mc_addr[2], |
1370 | mc_addr[3], mc_addr[4], mc_addr[5]); | 1369 | mc_addr[3], mc_addr[4], mc_addr[5]); |
1371 | 1370 | ||
1372 | /* | 1371 | /* |
1373 | * Place this multicast address in the RAR if there is room, | 1372 | * 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 | * multicast table. | 1399 | * multicast table. |
1401 | **/ | 1400 | **/ |
1402 | s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, | 1401 | s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, |
1403 | u32 mc_addr_count, ixgbe_mc_addr_itr next) | 1402 | u32 mc_addr_count, ixgbe_mc_addr_itr next) |
1404 | { | 1403 | { |
1405 | u32 i; | 1404 | u32 i; |
1406 | u32 rar_entries = hw->mac.num_rar_entries; | 1405 | 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 | /* Enable mta */ | 1436 | /* Enable mta */ |
1438 | if (hw->addr_ctrl.mta_in_use > 0) | 1437 | if (hw->addr_ctrl.mta_in_use > 0) |
1439 | IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL, | 1438 | IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL, |
1440 | IXGBE_MCSTCTRL_MFE | hw->mac.mc_filter_type); | 1439 | IXGBE_MCSTCTRL_MFE | hw->mac.mc_filter_type); |
1441 | 1440 | ||
1442 | hw_dbg(hw, "ixgbe_update_mc_addr_list_generic Complete\n"); | 1441 | hw_dbg(hw, "ixgbe_update_mc_addr_list_generic Complete\n"); |
1443 | return 0; | 1442 | return 0; |