aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2011-05-19 08:12:54 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-19 18:00:01 -0400
commit6ff6f81dd4ec08945e10147dbfe611569ef4cc09 (patch)
tree5469349b17b5ae07b1ce6fbd047092c9ab9c415f /drivers/net/tg3.c
parent0da0606f493c5cdab74bdcc96b12f4305ad94085 (diff)
tg3: Remove excessive parenthesis
This patch removes some excessive parenthesizing. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 5bf2ce125421..eb8dc7b1a28a 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -553,7 +553,7 @@ static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val)
553{ 553{
554 unsigned long flags; 554 unsigned long flags;
555 555
556 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) && 556 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906 &&
557 (off >= NIC_SRAM_STATS_BLK) && (off < NIC_SRAM_TX_BUFFER_DESC)) 557 (off >= NIC_SRAM_STATS_BLK) && (off < NIC_SRAM_TX_BUFFER_DESC))
558 return; 558 return;
559 559
@@ -578,7 +578,7 @@ static void tg3_read_mem(struct tg3 *tp, u32 off, u32 *val)
578{ 578{
579 unsigned long flags; 579 unsigned long flags;
580 580
581 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) && 581 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906 &&
582 (off >= NIC_SRAM_STATS_BLK) && (off < NIC_SRAM_TX_BUFFER_DESC)) { 582 (off >= NIC_SRAM_STATS_BLK) && (off < NIC_SRAM_TX_BUFFER_DESC)) {
583 *val = 0; 583 *val = 0;
584 return; 584 return;
@@ -2806,7 +2806,7 @@ static int tg3_power_down_prepare(struct tg3 *tp)
2806 CLOCK_CTRL_PWRDOWN_PLL133, 40); 2806 CLOCK_CTRL_PWRDOWN_PLL133, 40);
2807 } else if (tg3_flag(tp, 5780_CLASS) || 2807 } else if (tg3_flag(tp, 5780_CLASS) ||
2808 tg3_flag(tp, CPMU_PRESENT) || 2808 tg3_flag(tp, CPMU_PRESENT) ||
2809 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)) { 2809 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
2810 /* do nothing */ 2810 /* do nothing */
2811 } else if (!(tg3_flag(tp, 5750_PLUS) && tg3_flag(tp, ENABLE_ASF))) { 2811 } else if (!(tg3_flag(tp, 5750_PLUS) && tg3_flag(tp, ENABLE_ASF))) {
2812 u32 newbits1, newbits2; 2812 u32 newbits1, newbits2;
@@ -8646,7 +8646,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
8646 } 8646 }
8647 8647
8648 if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) && 8648 if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) &&
8649 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) { 8649 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714) {
8650 u32 tmp; 8650 u32 tmp;
8651 8651
8652 tmp = tr32(SERDES_RX_CTRL); 8652 tmp = tr32(SERDES_RX_CTRL);
@@ -11636,7 +11636,7 @@ static void __devinit tg3_get_nvram_info(struct tg3 *tp)
11636 tw32(NVRAM_CFG1, nvcfg1); 11636 tw32(NVRAM_CFG1, nvcfg1);
11637 } 11637 }
11638 11638
11639 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) || 11639 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 ||
11640 tg3_flag(tp, 5780_CLASS)) { 11640 tg3_flag(tp, 5780_CLASS)) {
11641 switch (nvcfg1 & NVRAM_CFG1_VENDOR_MASK) { 11641 switch (nvcfg1 & NVRAM_CFG1_VENDOR_MASK) {
11642 case FLASH_VENDOR_ATMEL_FLASH_BUFFERED: 11642 case FLASH_VENDOR_ATMEL_FLASH_BUFFERED:
@@ -12640,9 +12640,9 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
12640 12640
12641 tg3_read_mem(tp, NIC_SRAM_DATA_VER, &ver); 12641 tg3_read_mem(tp, NIC_SRAM_DATA_VER, &ver);
12642 ver >>= NIC_SRAM_DATA_VER_SHIFT; 12642 ver >>= NIC_SRAM_DATA_VER_SHIFT;
12643 if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) && 12643 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 &&
12644 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) && 12644 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701 &&
12645 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5703) && 12645 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5703 &&
12646 (ver > 0) && (ver < 0x100)) 12646 (ver > 0) && (ver < 0x100))
12647 tg3_read_mem(tp, NIC_SRAM_DATA_CFG_2, &cfg2); 12647 tg3_read_mem(tp, NIC_SRAM_DATA_CFG_2, &cfg2);
12648 12648
@@ -13498,7 +13498,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13498 } 13498 }
13499 } 13499 }
13500 13500
13501 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) { 13501 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) {
13502 static struct tg3_dev_id { 13502 static struct tg3_dev_id {
13503 u32 vendor; 13503 u32 vendor;
13504 u32 device; 13504 u32 device;
@@ -13598,7 +13598,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13598 tg3_flag(tp, 5780_CLASS)) 13598 tg3_flag(tp, 5780_CLASS))
13599 tg3_flag_set(tp, 5750_PLUS); 13599 tg3_flag_set(tp, 5750_PLUS);
13600 13600
13601 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) || 13601 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
13602 tg3_flag(tp, 5750_PLUS)) 13602 tg3_flag(tp, 5750_PLUS))
13603 tg3_flag_set(tp, 5705_PLUS); 13603 tg3_flag_set(tp, 5705_PLUS);
13604 13604
@@ -13627,9 +13627,9 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13627 } 13627 }
13628 13628
13629 /* Selectively allow TSO based on operating conditions */ 13629 /* Selectively allow TSO based on operating conditions */
13630 if ((tg3_flag(tp, HW_TSO_1) || 13630 if (tg3_flag(tp, HW_TSO_1) ||
13631 tg3_flag(tp, HW_TSO_2) || 13631 tg3_flag(tp, HW_TSO_2) ||
13632 tg3_flag(tp, HW_TSO_3)) || 13632 tg3_flag(tp, HW_TSO_3) ||
13633 (tp->fw_needed && !tg3_flag(tp, ENABLE_ASF))) 13633 (tp->fw_needed && !tg3_flag(tp, ENABLE_ASF)))
13634 tg3_flag_set(tp, TSO_CAPABLE); 13634 tg3_flag_set(tp, TSO_CAPABLE);
13635 else { 13635 else {
@@ -13891,7 +13891,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13891 * It is also used as eeprom write protect on LOMs. 13891 * It is also used as eeprom write protect on LOMs.
13892 */ 13892 */
13893 tp->grc_local_ctrl = GRC_LCLCTRL_INT_ON_ATTN | GRC_LCLCTRL_AUTO_SEEPROM; 13893 tp->grc_local_ctrl = GRC_LCLCTRL_INT_ON_ATTN | GRC_LCLCTRL_AUTO_SEEPROM;
13894 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) || 13894 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
13895 tg3_flag(tp, EEPROM_WRITE_PROT)) 13895 tg3_flag(tp, EEPROM_WRITE_PROT))
13896 tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 | 13896 tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 |
13897 GRC_LCLCTRL_GPIO_OUTPUT1); 13897 GRC_LCLCTRL_GPIO_OUTPUT1);
@@ -13943,8 +13943,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13943 tp->phy_flags |= TG3_PHYFLG_IS_FET; 13943 tp->phy_flags |= TG3_PHYFLG_IS_FET;
13944 13944
13945 /* A few boards don't want Ethernet@WireSpeed phy feature */ 13945 /* A few boards don't want Ethernet@WireSpeed phy feature */
13946 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) || 13946 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
13947 ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) && 13947 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 &&
13948 (tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) && 13948 (tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) &&
13949 (tp->pci_chip_rev_id != CHIPREV_ID_5705_A1)) || 13949 (tp->pci_chip_rev_id != CHIPREV_ID_5705_A1)) ||
13950 (tp->phy_flags & TG3_PHYFLG_IS_FET) || 13950 (tp->phy_flags & TG3_PHYFLG_IS_FET) ||
@@ -14064,7 +14064,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
14064 tg3_flag_set(tp, IS_5788); 14064 tg3_flag_set(tp, IS_5788);
14065 14065
14066 if (!tg3_flag(tp, IS_5788) && 14066 if (!tg3_flag(tp, IS_5788) &&
14067 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700)) 14067 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700)
14068 tg3_flag_set(tp, TAGGED_STATUS); 14068 tg3_flag_set(tp, TAGGED_STATUS);
14069 if (tg3_flag(tp, TAGGED_STATUS)) { 14069 if (tg3_flag(tp, TAGGED_STATUS)) {
14070 tp->coalesce_mode |= (HOSTCC_MODE_CLRTICK_RXBD | 14070 tp->coalesce_mode |= (HOSTCC_MODE_CLRTICK_RXBD |
@@ -14215,7 +14215,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
14215#endif 14215#endif
14216 14216
14217 mac_offset = 0x7c; 14217 mac_offset = 0x7c;
14218 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || 14218 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 ||
14219 tg3_flag(tp, 5780_CLASS)) { 14219 tg3_flag(tp, 5780_CLASS)) {
14220 if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID) 14220 if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID)
14221 mac_offset = 0xcc; 14221 mac_offset = 0xcc;