aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-12-03 02:58:21 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-03 16:18:01 -0500
commit8e95a2026f3b43f7c3d676adaccd2de9532e8dcc (patch)
tree3733318168cd512480b6db58c5c16d1c8847f0b7 /drivers/net/sky2.c
parent3454f835837609d60b29a266e3bd9d701073b060 (diff)
drivers/net: Move && and || to end of previous line
Only files where David Miller is the primary git-signer. wireless, wimax, ixgbe, etc are not modified. Compile tested x86 allyesconfig only Not all files compiled (not x86 compatible) Added a few > 80 column lines, which I ignored. Existing checkpatch complaints ignored. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index a3d99913f184..3943d89afb2b 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -374,8 +374,8 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
374 ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO); 374 ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO);
375 375
376 /* downshift on PHY 88E1112 and 88E1149 is changed */ 376 /* downshift on PHY 88E1112 and 88E1149 is changed */
377 if ( (sky2->flags & SKY2_FLAG_AUTO_SPEED) 377 if ( (sky2->flags & SKY2_FLAG_AUTO_SPEED) &&
378 && (hw->flags & SKY2_HW_NEWER_PHY)) { 378 (hw->flags & SKY2_HW_NEWER_PHY)) {
379 /* set downshift counter to 3x and enable downshift */ 379 /* set downshift counter to 3x and enable downshift */
380 ctrl &= ~PHY_M_PC_DSC_MSK; 380 ctrl &= ~PHY_M_PC_DSC_MSK;
381 ctrl |= PHY_M_PC_DSC(2) | PHY_M_PC_DOWN_S_ENA; 381 ctrl |= PHY_M_PC_DSC(2) | PHY_M_PC_DOWN_S_ENA;
@@ -619,8 +619,8 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
619 /* no effect on Yukon-XL */ 619 /* no effect on Yukon-XL */
620 gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl); 620 gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl);
621 621
622 if ( !(sky2->flags & SKY2_FLAG_AUTO_SPEED) 622 if (!(sky2->flags & SKY2_FLAG_AUTO_SPEED) ||
623 || sky2->speed == SPEED_100) { 623 sky2->speed == SPEED_100) {
624 /* turn on 100 Mbps LED (LED_LINK100) */ 624 /* turn on 100 Mbps LED (LED_LINK100) */
625 ledover |= PHY_M_LED_MO_100(MO_LED_ON); 625 ledover |= PHY_M_LED_MO_100(MO_LED_ON);
626 } 626 }
@@ -937,8 +937,8 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
937 /* On chips without ram buffer, pause is controled by MAC level */ 937 /* On chips without ram buffer, pause is controled by MAC level */
938 if (!(hw->flags & SKY2_HW_RAM_BUFFER)) { 938 if (!(hw->flags & SKY2_HW_RAM_BUFFER)) {
939 /* Pause threshold is scaled by 8 in bytes */ 939 /* Pause threshold is scaled by 8 in bytes */
940 if (hw->chip_id == CHIP_ID_YUKON_FE_P 940 if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
941 && hw->chip_rev == CHIP_REV_YU_FE2_A0) 941 hw->chip_rev == CHIP_REV_YU_FE2_A0)
942 reg = 1568 / 8; 942 reg = 1568 / 8;
943 else 943 else
944 reg = 1024 / 8; 944 reg = 1024 / 8;
@@ -1353,8 +1353,8 @@ static int sky2_rx_start(struct sky2_port *sky2)
1353 /* These chips have no ram buffer? 1353 /* These chips have no ram buffer?
1354 * MAC Rx RAM Read is controlled by hardware */ 1354 * MAC Rx RAM Read is controlled by hardware */
1355 if (hw->chip_id == CHIP_ID_YUKON_EC_U && 1355 if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
1356 (hw->chip_rev == CHIP_REV_YU_EC_U_A1 1356 (hw->chip_rev == CHIP_REV_YU_EC_U_A1 ||
1357 || hw->chip_rev == CHIP_REV_YU_EC_U_B0)) 1357 hw->chip_rev == CHIP_REV_YU_EC_U_B0))
1358 sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS); 1358 sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS);
1359 1359
1360 sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1); 1360 sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1);
@@ -1560,8 +1560,8 @@ static int sky2_up(struct net_device *dev)
1560 sky2_write32(hw, Q_ADDR(txqaddr[port], Q_TEST), F_TX_CHK_AUTO_OFF); 1560 sky2_write32(hw, Q_ADDR(txqaddr[port], Q_TEST), F_TX_CHK_AUTO_OFF);
1561 1561
1562 /* Set almost empty threshold */ 1562 /* Set almost empty threshold */
1563 if (hw->chip_id == CHIP_ID_YUKON_EC_U 1563 if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
1564 && hw->chip_rev == CHIP_REV_YU_EC_U_A0) 1564 hw->chip_rev == CHIP_REV_YU_EC_U_A0)
1565 sky2_write16(hw, Q_ADDR(txqaddr[port], Q_AL), ECU_TXFF_LEV); 1565 sky2_write16(hw, Q_ADDR(txqaddr[port], Q_AL), ECU_TXFF_LEV);
1566 1566
1567 sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map, 1567 sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map,
@@ -1907,8 +1907,8 @@ static int sky2_down(struct net_device *dev)
1907 sky2_write8(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET); 1907 sky2_write8(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET);
1908 1908
1909 /* Workaround shared GMAC reset */ 1909 /* Workaround shared GMAC reset */
1910 if (!(hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0 1910 if (!(hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0 &&
1911 && port == 0 && hw->dev[1] && netif_running(hw->dev[1]))) 1911 port == 0 && hw->dev[1] && netif_running(hw->dev[1])))
1912 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET); 1912 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET);
1913 1913
1914 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); 1914 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
@@ -2085,8 +2085,8 @@ static int sky2_autoneg_done(struct sky2_port *sky2, u16 aux)
2085 sky2->flow_status = FC_TX; 2085 sky2->flow_status = FC_TX;
2086 } 2086 }
2087 2087
2088 if (sky2->duplex == DUPLEX_HALF && sky2->speed < SPEED_1000 2088 if (sky2->duplex == DUPLEX_HALF && sky2->speed < SPEED_1000 &&
2089 && !(hw->chip_id == CHIP_ID_YUKON_EC_U || hw->chip_id == CHIP_ID_YUKON_EX)) 2089 !(hw->chip_id == CHIP_ID_YUKON_EC_U || hw->chip_id == CHIP_ID_YUKON_EX))
2090 sky2->flow_status = FC_NONE; 2090 sky2->flow_status = FC_NONE;
2091 2091
2092 if (sky2->flow_status & FC_TX) 2092 if (sky2->flow_status & FC_TX)
@@ -3244,8 +3244,8 @@ static int sky2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
3244 struct sky2_port *sky2 = netdev_priv(dev); 3244 struct sky2_port *sky2 = netdev_priv(dev);
3245 struct sky2_hw *hw = sky2->hw; 3245 struct sky2_hw *hw = sky2->hw;
3246 3246
3247 if ((wol->wolopts & ~sky2_wol_supported(sky2->hw)) 3247 if ((wol->wolopts & ~sky2_wol_supported(sky2->hw)) ||
3248 || !device_can_wakeup(&hw->pdev->dev)) 3248 !device_can_wakeup(&hw->pdev->dev))
3249 return -EOPNOTSUPP; 3249 return -EOPNOTSUPP;
3250 3250
3251 sky2->wol = wol->wolopts; 3251 sky2->wol = wol->wolopts;