Skip to content

Commit

Permalink
qla3xxx: bugfix: Fix bad logical operation in link state machine.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ron Mercer authored and Jeff Garzik committed Nov 10, 2007
1 parent 3e23b7d commit ad4c9a0
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions drivers/net/qla3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ad4c9a0

Please sign in to comment.