From: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
To: Michael Wu <flamingice-R9e9/4HEdknk1uMJSBkQmQ@public.gmane.org>
Cc: Jeff Garzik <jeff-o2qLIJkoznsdnm+yROfE0A@public.gmane.org>,
"John W. Linville"
<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Subject: Re: Please pull 'upstream-rtl8187' branch of wireless-2.6
Date: Thu, 10 May 2007 13:23:40 +0200 [thread overview]
Message-ID: <200705101323.41310.mb@bu3sch.de> (raw)
In-Reply-To: <200705092216.26880.flamingice-R9e9/4HEdknk1uMJSBkQmQ@public.gmane.org>
On Thursday 10 May 2007 04:16:22 Michael Wu wrote:
> > > + rtl818x_iowrite8(priv, (u8 *)0xFE18, 0x10);
> > > + rtl818x_iowrite8(priv, (u8 *)0xFE18, 0x11);
> > > + rtl818x_iowrite8(priv, (u8 *)0xFE18, 0x00);
> > > + mdelay(200);
> >
> > ditto
> >
> > also, kill the magic numbers
> >
> I have no idea what that does so I don't see the point in moving the number to
> some define. However, the hardware does seem to work okay without this part
> so I can remove it if you bothers you so much.
Nah, Jeff. Please don't go this path.
If we have to remove all magic numbers from drivers, we'd have to either
*) Drop reverse engineered drivers like bcm43xx completely.
*) Clutter them with completely useless defines such as
#define RADIO_UNKNOWN97A_REG 0x97A
Better leave such magic registers/values in the code as-is
and probably convert them to good defines later, if reverse engineering
found out the meaning. That's what I'm doing for bcm43xx and it makes
a _whole_ lot more sense.
> > > + if (eeprom->reg_data_in)
> > > + reg |= RTL818X_EEPROM_CMD_WRITE;
> > > + if (eeprom->reg_data_out)
> > > + reg |= RTL818X_EEPROM_CMD_READ;
> > > + if (eeprom->reg_data_clock)
> > > + reg |= RTL818X_EEPROM_CMD_CK;
> > > + if (eeprom->reg_chip_select)
> > > + reg |= RTL818X_EEPROM_CMD_CS;
> > > +
> > > + rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, reg);
> > > + udelay(10);
> >
> > questionable delay
> >
> Most likely to prevent hitting the eeprom too fast.
Accessing eeproms is almost always some kind of critical
and timing dependent task on every device. That's because
of the electrical behavior of the eeprom and its bus.
--
Greetings Michael.
next prev parent reply other threads:[~2007-05-10 11:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 17:39 Please pull 'upstream' branch of wireless-2.6 John W. Linville
[not found] ` <20070508173907.GH6479-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2007-05-08 17:41 ` Please pull 'upstream-rtl8187' " John W. Linville
2007-05-09 23:12 ` Jeff Garzik
[not found] ` <46425564.3040505-o2qLIJkoznsdnm+yROfE0A@public.gmane.org>
2007-05-10 2:16 ` Michael Wu
2007-05-10 4:21 ` Jeff Garzik
[not found] ` <46429DC8.3090401-o2qLIJkoznsdnm+yROfE0A@public.gmane.org>
2007-05-10 4:47 ` Michael Wu
[not found] ` <200705092216.26880.flamingice-R9e9/4HEdknk1uMJSBkQmQ@public.gmane.org>
2007-05-10 11:23 ` Michael Buesch [this message]
2007-05-10 11:36 ` David Miller
2007-05-09 22:54 ` Please pull 'upstream' " Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200705101323.41310.mb@bu3sch.de \
--to=mb-fseuscv1ubazqb+pc5nmwq@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=flamingice-R9e9/4HEdknk1uMJSBkQmQ@public.gmane.org \
--cc=jeff-o2qLIJkoznsdnm+yROfE0A@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).