netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* forcedeth: cat /sys/class/net/eth0/carrier = Invalid argument
@ 2010-03-22 17:36 Justin P. mattock
  2010-03-23  3:51 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Justin P. mattock @ 2010-03-22 17:36 UTC (permalink / raw)
  To: netdev; +Cc: Linux Kernel Mailing List

I've pushed my kernel from the latest HEAD to 2.6.31
and am still seeing:
cat /sys/class/net/eth0/carrier
cat: carrier: Invalid argument

with my other machine using sky2
the same results is:
cat /sys/class/net/eth0/carrier
0

is there anything on this? before I start
a bisect.(looking through bugzilla, I couldn't
see anything related).

Justin P. Mattock

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: forcedeth: cat /sys/class/net/eth0/carrier = Invalid argument
  2010-03-22 17:36 forcedeth: cat /sys/class/net/eth0/carrier = Invalid argument Justin P. mattock
@ 2010-03-23  3:51 ` David Miller
  2010-03-23  4:07   ` Justin P. Mattock
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2010-03-23  3:51 UTC (permalink / raw)
  To: justinmattock; +Cc: netdev, linux-kernel

From: "Justin P. mattock" <justinmattock@gmail.com>
Date: Mon, 22 Mar 2010 10:36:18 -0700

> I've pushed my kernel from the latest HEAD to 2.6.31
> and am still seeing:
> cat /sys/class/net/eth0/carrier
> cat: carrier: Invalid argument
> 
> with my other machine using sky2
> the same results is:
> cat /sys/class/net/eth0/carrier
> 0
> 
> is there anything on this? before I start
> a bisect.(looking through bugzilla, I couldn't
> see anything related).

A device is not able to indicate carrier accurately when
the device is not currently running.

So you will get an -EINVAL until the device is brought up.

The reason is that most drivers don't even probe the link
or negotiate link speed and flow control until the device
is brought up.  Many don't even power up the PHY when the
device is down, in order to save power.

So the behavior you observe is completely expected.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: forcedeth: cat /sys/class/net/eth0/carrier = Invalid argument
  2010-03-23  3:51 ` David Miller
@ 2010-03-23  4:07   ` Justin P. Mattock
  0 siblings, 0 replies; 3+ messages in thread
From: Justin P. Mattock @ 2010-03-23  4:07 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel

On 03/22/2010 08:51 PM, David Miller wrote:
> From: "Justin P. mattock"<justinmattock@gmail.com>
> Date: Mon, 22 Mar 2010 10:36:18 -0700
>
>> I've pushed my kernel from the latest HEAD to 2.6.31
>> and am still seeing:
>> cat /sys/class/net/eth0/carrier
>> cat: carrier: Invalid argument
>>
>> with my other machine using sky2
>> the same results is:
>> cat /sys/class/net/eth0/carrier
>> 0
>>
>> is there anything on this? before I start
>> a bisect.(looking through bugzilla, I couldn't
>> see anything related).
>
> A device is not able to indicate carrier accurately when
> the device is not currently running.
>
> So you will get an -EINVAL until the device is brought up.

ah.. the machine was up and running but nothing was running
(no dhclient, streaming music, etc..)
now
just ran the machine with ethernet,(up and running) and carrier reported 1

>
> The reason is that most drivers don't even probe the link
> or negotiate link speed and flow control until the device
> is brought up.  Many don't even power up the PHY when the
> device is down, in order to save power.
>
> So the behavior you observe is completely expected.
>


cool, this had me confused.

Thanks for the info on this..
(no bisect for this).


Justin P. Mattock

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-23  4:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-22 17:36 forcedeth: cat /sys/class/net/eth0/carrier = Invalid argument Justin P. mattock
2010-03-23  3:51 ` David Miller
2010-03-23  4:07   ` Justin P. Mattock

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).