SMSC: timeout reaches -1
Subsystems (2)
PATCH 1/1 SMSC: timeout reaches -1
With a postfix decrement timeouts will reach -1 rather than 0, so the error path does not appear.
---
drivers/net/smsc911x.c +1 -1
@@ -1624,7 +1624,7 @@ static int smsc911x_eeprom_send_cmd(struct smsc911x_data *pdata, u32 op)do {msleep (1 ); e2cmd =smsc911x_reg_read (pdata,E2P_CMD ); - }while ((e2cmd &E2P_CMD_EPC_BUSY_ ) && (timeout--)); + }while ((e2cmd &E2P_CMD_EPC_BUSY_ ) && (--timeout));if (!timeout) {SMSC_TRACE (DRV ,"TIMED OUT" );
drivers/net/smsc9420.c +1 -1
@@ -341,7 +341,7 @@ static int smsc9420_eeprom_send_cmd(struct smsc9420_pdata *pd, u32 op)do {msleep (1 ); e2cmd =smsc9420_reg_read (pd,E2P_CMD ); - }while ((e2cmd &E2P_CMD_EPC_BUSY_ ) && (timeout--)); + }while ((e2cmd &E2P_CMD_EPC_BUSY_ ) && (--timeout));if (!timeout) {smsc_info (HW ,"TIMED OUT" );
David Miller
maintainerFrom: Roel Kluin <[email protected]>
Date: Mon, 16 Feb 2009 11:21:33 +0100
Quoted 4 lines
With a postfix decrement timeouts will reach -1 rather than 0, so the error path does not appear.
Signed-off-by Roel Kluin <[email protected]>
Steve Glendinning submitted the smsc9420 side of this patch, please resubmit this with only the smsc911x.c part present.
Thanks.
Quoted 6 lines · David Miller
From: Roel Kluin <[email protected]>
Date: Mon, 16 Feb 2009 11:21:33 +0100Quoted 3 lines
With a postfix decrement timeouts will reach -1 rather than 0, so the error path does not appear.
Quoted 7 lines
Quoted 1 line
Signed-off-by Roel Kluin <[email protected]>Steve Glendinning submitted the smsc9420 side of this patch, please resubmit this with only the
smsc911x.cpart present.Thanks.
ok, here:
--------------------------->8-------------8<------------------------------ With a postfix decrement timeouts will reach -1 rather than 0, so the error path does not appear.
---
drivers/net/smsc911x.c +1 -1
@@ -1624,7 +1624,7 @@ static int smsc911x_eeprom_send_cmd(struct smsc911x_data *pdata, u32 op)do {msleep (1 ); e2cmd =smsc911x_reg_read (pdata,E2P_CMD ); - }while ((e2cmd &E2P_CMD_EPC_BUSY_ ) && (timeout--)); + }while ((e2cmd &E2P_CMD_EPC_BUSY_ ) && (--timeout));if (!timeout) {SMSC_TRACE (DRV ,"TIMED OUT" );
From: Roel Kluin <[email protected]>
Date: Fri, 20 Feb 2009 09:51:36 +0100
Quoted 4 lines
With a postfix decrement timeouts will reach -1 rather than 0, so the error path does not appear.
Signed-off-by Roel Kluin <[email protected]>
Applied, thanks.