Skip to contentSkip to conversation

qlge: fix an "&&" vs "||" bug

PATCH Applied Dan Carpenter 3 participants 3 messages Jul 12, 2012 – Jul 18, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qlge: fix an "&&" vs "||" bug

The condition is always true so WOL will never work.

drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c +1 -1
index 3d4462b..6f316ab 100644
@@ -440,7 +440,7 @@ static int ql_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
 	unsigned short ssys_dev = qdev->pdev->subsystem_device;
 
 	/* WOL is only supported for mezz card. */
-	if (ssys_dev != QLGE_MEZZ_SSYS_ID_068 ||
+	if (ssys_dev != QLGE_MEZZ_SSYS_ID_068 &&
 			ssys_dev != QLGE_MEZZ_SSYS_ID_180) {
 		netif_info(qdev, drv, qdev->ndev,
 				"WOL is only supported for mezz card\n");
Acked-by on v1 1/1
#1 lore raw

-----Original Message-----

Quoted 15 lines

From: Dan Carpenter [mailto:[email protected]]
Sent: Thursday, July 12, 2012 7:47 AM
To: Anirban Chakraborty
Cc: Jitendra Kalsaria; Ron Mercer; Dept-Eng Linux Driver; netdev; [email protected]
Subject: [patch] qlge: fix an "&&" vs "||" bug

The condition is always true so WOL will never work.

drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c +0 -0
index 3d4462b..6f316ab 100644

drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c static int ql_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) · line 446

Quoted 8 lines
drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c +1 -1
@@ -440,7 +440,7 @@ static int ql_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
 	unsigned short ssys_dev = qdev->pdev->subsystem_device;
 
 	/* WOL is only supported for mezz card. */
-	if (ssys_dev != QLGE_MEZZ_SSYS_ID_068 ||
+	if (ssys_dev != QLGE_MEZZ_SSYS_ID_068 &&
 			ssys_dev != QLGE_MEZZ_SSYS_ID_180) {
 		netif_info(qdev, drv, qdev->ndev,
 				"WOL is only supported for mezz card\n");
maintainer Applied
#2 lore raw

From: Jitendra Kalsaria <[email protected]>
Date: Thu, 12 Jul 2012 11:15:56 -0700

Quoted 10 lines

-----Original Message-----

Quoted 9 lines

From: Dan Carpenter [mailto:[email protected]]
Sent: Thursday, July 12, 2012 7:47 AM
To: Anirban Chakraborty
Cc: Jitendra Kalsaria; Ron Mercer; Dept-Eng Linux Driver; netdev; [email protected]
Subject: [patch] qlge: fix an "&&" vs "||" bug

The condition is always true so WOL will never work.

...

Quoted 1 line

Applied.