From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Felipe W Damasio <felipewd@terra.com.br>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
netdev@oss.sgi.com
Subject: Re: ALTPATCH: 8139cp: LinkChg support
Date: Fri, 20 Sep 2002 09:21:17 -0400 [thread overview]
Message-ID: <3D8B20CD.80403@mandrakesoft.com> (raw)
In-Reply-To: 1032494983.247.70.camel@tank
Felipe W Damasio wrote:
>>+ int advertise, lpa, media, duplex;
>
>
> Shouldn't advertise and lpa be either "unsigned short" or u16?
No, they don't need to be.
>>+ lpa = mii->mdio_read(mii->dev, mii->phy_id, MII_LPA);
>>+
>>+ /* figure out media and duplex from advertise and LPA values */
>>+ media = mii_nway_result(lpa & advertise);
>
> ^^^^^^^^^^^^^^^^^^^^^^^
>
> mii_nway_result returns a "unsigned int", so media also doesn't look
> good.
mii_nway_result _really_ returns a small bitmapped value, so it doesn't
matter.
>>+ duplex = (media & (ADVERTISE_100FULL | ADVERTISE_10FULL)) ? 1 : 0;
>
>
> Or we could do
>
> duplex = (media & ADVERTISE_FULL) ? 1 : 0;
True. I forgot about that constant...
Jeff
prev parent reply other threads:[~2002-09-20 13:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1032487254.247.7.camel@tank>
2002-09-20 6:15 ` ALTPATCH: 8139cp: LinkChg support Jeff Garzik
2002-09-20 4:09 ` Felipe W Damasio
2002-09-20 13:21 ` Jeff Garzik [this message]
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=3D8B20CD.80403@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=felipewd@terra.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
/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).