]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
qla3xxx: bugfix: Fix bad logical operation in link state machine.
authorRon Mercer <ron.mercer@qlogic.com>
Wed, 7 Nov 2007 21:59:07 +0000 (13:59 -0800)
committerJeff Garzik <jeff@garzik.org>
Sat, 10 Nov 2007 09:25:15 +0000 (04:25 -0500)
Luckily, this wasn't reported or reproduced. The logical operation for
setting duplex had wrong grouping.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/qla3xxx.c

index 4f0fd41dce19cac7272b729801d92b209a1b5815..a5791114b7bde59eddd6aed9c0dc79c590a8d688 100644 (file)
@@ -1456,16 +1456,11 @@ static void ql_phy_start_neg_ex(struct ql3_adapter *qdev)
                           PHYAddr[qdev->mac_index]);
        reg &= ~PHY_GIG_ALL_PARAMS;
 
-       if(portConfiguration &
-          PORT_CONFIG_FULL_DUPLEX_ENABLED &
-          PORT_CONFIG_1000MB_SPEED) {
-               reg |= PHY_GIG_ADV_1000F;
-       }
-
-       if(portConfiguration &
-          PORT_CONFIG_HALF_DUPLEX_ENABLED &
-          PORT_CONFIG_1000MB_SPEED) {
-               reg |= PHY_GIG_ADV_1000H;
+       if(portConfiguration & PORT_CONFIG_1000MB_SPEED) {
+               if(portConfiguration & PORT_CONFIG_FULL_DUPLEX_ENABLED) 
+                       reg |= PHY_GIG_ADV_1000F;
+               else 
+                       reg |= PHY_GIG_ADV_1000H;
        }
 
        ql_mii_write_reg_ex(qdev, PHY_GIG_CONTROL, reg,