* [PATH] libertas: speeds up downloading of CF firmware
@ 2008-05-23 8:18 Holger Schurig
2008-05-23 11:20 ` Andreas Schwab
2008-05-23 13:41 ` Dan Williams
0 siblings, 2 replies; 4+ messages in thread
From: Holger Schurig @ 2008-05-23 8:18 UTC (permalink / raw)
To: libertas-dev, Dan Williams, linux-wireless, John W. Linville
Keep the timeout the same (1000*500 == 100000 * 5), but take shorter
naps. Makes downloading the firmware slightly faster.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
--- linux.orig/drivers/net/wireless/libertas/if_cs.c
+++ linux/drivers/net/wireless/libertas/if_cs.c
@@ -148,11 +148,11 @@
{
int i;
- for (i = 0; i < 1000; i++) {
+ for (i = 0; i < 100000; i++) {
u8 val = if_cs_read8(card, addr);
if (val == reg)
return i;
- udelay(500);
+ udelay(5);
}
return -ETIME;
}
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATH] libertas: speeds up downloading of CF firmware
2008-05-23 8:18 [PATH] libertas: speeds up downloading of CF firmware Holger Schurig
@ 2008-05-23 11:20 ` Andreas Schwab
2008-05-23 11:26 ` Holger Schurig
2008-05-23 13:41 ` Dan Williams
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2008-05-23 11:20 UTC (permalink / raw)
To: Holger Schurig
Cc: libertas-dev, Dan Williams, linux-wireless, John W. Linville
Holger Schurig <hs4233@mail.mn-solutions.de> writes:
> Keep the timeout the same (1000*500 =3D=3D 100000 * 5), but take shor=
ter
> naps. Makes downloading the firmware slightly faster.
>
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
>
> --- linux.orig/drivers/net/wireless/libertas/if_cs.c
> +++ linux/drivers/net/wireless/libertas/if_cs.c
> @@ -148,11 +148,11 @@
> {
> int i;
> =20
> - for (i =3D 0; i < 1000; i++) {
> + for (i =3D 0; i < 100000; i++) {
> u8 val =3D if_cs_read8(card, addr);
> if (val =3D=3D reg)
> return i;
That changes the return value. Although it doesn't matter since all
callers only check for < 0, it should perhaps be changed to return 0
here to avoid confusion.
Andreas.
--=20
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany
PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4=
ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" 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] 4+ messages in thread* Re: [PATH] libertas: speeds up downloading of CF firmware
2008-05-23 11:20 ` Andreas Schwab
@ 2008-05-23 11:26 ` Holger Schurig
0 siblings, 0 replies; 4+ messages in thread
From: Holger Schurig @ 2008-05-23 11:26 UTC (permalink / raw)
To: Andreas Schwab
Cc: libertas-dev, Dan Williams, linux-wireless, John W. Linville
> That changes the return value. Although it doesn't matter
> since all callers only check for < 0, it should perhaps be
> changed to return 0 here to avoid confusion.
You're right, the function returns now different things. But no
caller cares for the different return value, therefore the code
is correct as it is.
I actually used the return value to find out how many loops
usually are needed to program, and found that I wait way to long
in usleep() function.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATH] libertas: speeds up downloading of CF firmware
2008-05-23 8:18 [PATH] libertas: speeds up downloading of CF firmware Holger Schurig
2008-05-23 11:20 ` Andreas Schwab
@ 2008-05-23 13:41 ` Dan Williams
1 sibling, 0 replies; 4+ messages in thread
From: Dan Williams @ 2008-05-23 13:41 UTC (permalink / raw)
To: Holger Schurig; +Cc: libertas-dev, linux-wireless, John W. Linville
On Fri, 2008-05-23 at 10:18 +0200, Holger Schurig wrote:
> Keep the timeout the same (1000*500 == 100000 * 5), but take shorter
> naps. Makes downloading the firmware slightly faster.
>
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
> --- linux.orig/drivers/net/wireless/libertas/if_cs.c
> +++ linux/drivers/net/wireless/libertas/if_cs.c
> @@ -148,11 +148,11 @@
> {
> int i;
>
> - for (i = 0; i < 1000; i++) {
> + for (i = 0; i < 100000; i++) {
> u8 val = if_cs_read8(card, addr);
> if (val == reg)
> return i;
> - udelay(500);
> + udelay(5);
> }
> return -ETIME;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-23 13:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-23 8:18 [PATH] libertas: speeds up downloading of CF firmware Holger Schurig
2008-05-23 11:20 ` Andreas Schwab
2008-05-23 11:26 ` Holger Schurig
2008-05-23 13:41 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox