* [PATCH] TG3: limit reaches -1
@ 2009-02-11 10:49 Roel Kluin
2009-02-11 20:40 ` Michael Chan
2009-02-15 22:17 ` [PATCH] TG3: &&/|| confusion Roel Kluin
0 siblings, 2 replies; 7+ messages in thread
From: Roel Kluin @ 2009-02-11 10:49 UTC (permalink / raw)
To: mchan; +Cc: netdev, Andrew Morton
With while (limit--) { ... } limit reaches -1, so 0 means success.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 8b3f846..4595962 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -852,7 +852,7 @@ static int tg3_bmcr_reset(struct tg3 *tp)
}
udelay(10);
}
- if (limit <= 0)
+ if (limit < 0)
return -EBUSY;
return 0;
@@ -1603,7 +1603,7 @@ static int tg3_wait_macro_done(struct tg3 *tp)
break;
}
}
- if (limit <= 0)
+ if (limit < 0)
return -EBUSY;
return 0;
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] TG3: limit reaches -1
2009-02-11 10:49 [PATCH] TG3: limit reaches -1 Roel Kluin
@ 2009-02-11 20:40 ` Michael Chan
2009-02-13 0:33 ` David Miller
2009-02-15 22:17 ` [PATCH] TG3: &&/|| confusion Roel Kluin
1 sibling, 1 reply; 7+ messages in thread
From: Michael Chan @ 2009-02-11 20:40 UTC (permalink / raw)
To: Roel Kluin; +Cc: netdev@vger.kernel.org, Andrew Morton, mcarlson
On Wed, 2009-02-11 at 02:49 -0800, Roel Kluin wrote:
> With while (limit--) { ... } limit reaches -1, so 0 means success.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Thanks.
> ---
> diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
> index 8b3f846..4595962 100644
> --- a/drivers/net/tg3.c
> +++ b/drivers/net/tg3.c
> @@ -852,7 +852,7 @@ static int tg3_bmcr_reset(struct tg3 *tp)
> }
> udelay(10);
> }
> - if (limit <= 0)
> + if (limit < 0)
> return -EBUSY;
>
> return 0;
> @@ -1603,7 +1603,7 @@ static int tg3_wait_macro_done(struct tg3 *tp)
> break;
> }
> }
> - if (limit <= 0)
> + if (limit < 0)
> return -EBUSY;
>
> return 0;
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] TG3: limit reaches -1
2009-02-11 20:40 ` Michael Chan
@ 2009-02-13 0:33 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2009-02-13 0:33 UTC (permalink / raw)
To: mchan; +Cc: roel.kluin, netdev, akpm, mcarlson
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 11 Feb 2009 12:40:16 -0800
>
> On Wed, 2009-02-11 at 02:49 -0800, Roel Kluin wrote:
> > With while (limit--) { ... } limit reaches -1, so 0 means success.
> >
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
>
> Acked-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] TG3: &&/|| confusion
2009-02-11 10:49 [PATCH] TG3: limit reaches -1 Roel Kluin
2009-02-11 20:40 ` Michael Chan
@ 2009-02-15 22:17 ` Roel Kluin
2009-02-16 17:27 ` Michael Chan
1 sibling, 1 reply; 7+ messages in thread
From: Roel Kluin @ 2009-02-15 22:17 UTC (permalink / raw)
To: mchan; +Cc: netdev, Andrew Morton
phyid Can't be both TG3_PHY_OUI_1 and TG3_PHY_OUI_2 and TG3_PHY_OUI_3.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
// vi drivers/net/tg3.h +2698
#define TG3_PHY_OUI_1 0x00206000
#define TG3_PHY_OUI_2 0x0143bc00
#define TG3_PHY_OUI_3 0x03625c00
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 4595962..b080f94 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -2237,8 +2237,8 @@ static int tg3_set_power_state(struct tg3 *tp, pci_power_t state)
phyid = phydev->drv->phy_id & phydev->drv->phy_id_mask;
if (phyid != TG3_PHY_ID_BCMAC131) {
phyid &= TG3_PHY_OUI_MASK;
- if (phyid == TG3_PHY_OUI_1 &&
- phyid == TG3_PHY_OUI_2 &&
+ if (phyid == TG3_PHY_OUI_1 ||
+ phyid == TG3_PHY_OUI_2 ||
phyid == TG3_PHY_OUI_3)
do_low_power = true;
}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] TG3: &&/|| confusion
2009-02-15 22:17 ` [PATCH] TG3: &&/|| confusion Roel Kluin
@ 2009-02-16 17:27 ` Michael Chan
2009-02-17 18:34 ` Matt Carlson
0 siblings, 1 reply; 7+ messages in thread
From: Michael Chan @ 2009-02-16 17:27 UTC (permalink / raw)
To: 'Roel Kluin'
Cc: netdev@vger.kernel.org, Andrew Morton, Matthew Carlson
Roel Kluin wrote:
> phyid Can't be both TG3_PHY_OUI_1 and TG3_PHY_OUI_2 and TG3_PHY_OUI_3.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> // vi drivers/net/tg3.h +2698
> #define TG3_PHY_OUI_1 0x00206000
> #define TG3_PHY_OUI_2 0x0143bc00
> #define TG3_PHY_OUI_3 0x03625c00
>
> diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
> index 4595962..b080f94 100644
> --- a/drivers/net/tg3.c
> +++ b/drivers/net/tg3.c
> @@ -2237,8 +2237,8 @@ static int tg3_set_power_state(struct
> tg3 *tp, pci_power_t state)
> phyid = phydev->drv->phy_id &
> phydev->drv->phy_id_mask;
> if (phyid != TG3_PHY_ID_BCMAC131) {
> phyid &= TG3_PHY_OUI_MASK;
> - if (phyid == TG3_PHY_OUI_1 &&
> - phyid == TG3_PHY_OUI_2 &&
> + if (phyid == TG3_PHY_OUI_1 ||
> + phyid == TG3_PHY_OUI_2 ||
> phyid == TG3_PHY_OUI_3)
> do_low_power = true;
> }
>
>
Thanks, this looks good to me, but I need Matt to ACK this patch.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] TG3: &&/|| confusion
2009-02-16 17:27 ` Michael Chan
@ 2009-02-17 18:34 ` Matt Carlson
2009-02-19 1:42 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Matt Carlson @ 2009-02-17 18:34 UTC (permalink / raw)
To: Michael Chan
Cc: 'Roel Kluin', netdev@vger.kernel.org, Andrew Morton,
Matthew Carlson
On Mon, Feb 16, 2009 at 09:27:19AM -0800, Michael Chan wrote:
> Roel Kluin wrote:
>
> > phyid Can't be both TG3_PHY_OUI_1 and TG3_PHY_OUI_2 and TG3_PHY_OUI_3.
> >
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> > ---
> > // vi drivers/net/tg3.h +2698
> > #define TG3_PHY_OUI_1 0x00206000
> > #define TG3_PHY_OUI_2 0x0143bc00
> > #define TG3_PHY_OUI_3 0x03625c00
> >
> > diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
> > index 4595962..b080f94 100644
> > --- a/drivers/net/tg3.c
> > +++ b/drivers/net/tg3.c
> > @@ -2237,8 +2237,8 @@ static int tg3_set_power_state(struct
> > tg3 *tp, pci_power_t state)
> > phyid = phydev->drv->phy_id &
> > phydev->drv->phy_id_mask;
> > if (phyid != TG3_PHY_ID_BCMAC131) {
> > phyid &= TG3_PHY_OUI_MASK;
> > - if (phyid == TG3_PHY_OUI_1 &&
> > - phyid == TG3_PHY_OUI_2 &&
> > + if (phyid == TG3_PHY_OUI_1 ||
> > + phyid == TG3_PHY_OUI_2 ||
> > phyid == TG3_PHY_OUI_3)
> > do_low_power = true;
> > }
> >
> >
>
> Thanks, this looks good to me, but I need Matt to ACK this patch.
Yes. This is correct.
Acked-by: Matt Carlson <mcarlson@broadcom.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] TG3: &&/|| confusion
2009-02-17 18:34 ` Matt Carlson
@ 2009-02-19 1:42 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2009-02-19 1:42 UTC (permalink / raw)
To: mcarlson; +Cc: mchan, roel.kluin, netdev, akpm
From: "Matt Carlson" <mcarlson@broadcom.com>
Date: Tue, 17 Feb 2009 10:34:39 -0800
> On Mon, Feb 16, 2009 at 09:27:19AM -0800, Michael Chan wrote:
> > Roel Kluin wrote:
> >
> > > phyid Can't be both TG3_PHY_OUI_1 and TG3_PHY_OUI_2 and TG3_PHY_OUI_3.
> > >
> > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
...
> Yes. This is correct.
>
> Acked-by: Matt Carlson <mcarlson@broadcom.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-02-19 1:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 10:49 [PATCH] TG3: limit reaches -1 Roel Kluin
2009-02-11 20:40 ` Michael Chan
2009-02-13 0:33 ` David Miller
2009-02-15 22:17 ` [PATCH] TG3: &&/|| confusion Roel Kluin
2009-02-16 17:27 ` Michael Chan
2009-02-17 18:34 ` Matt Carlson
2009-02-19 1:42 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).