public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Linux kernel ntedev mailing list <netdev@vger.kernel.org>
Subject: Re: consequences of setting net_device_ops ndo_change_carrier()?
Date: Sun, 5 Aug 2018 06:43:11 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.21.1808050625220.7483@localhost.localdomain> (raw)
In-Reply-To: <20180805011121.GA19202@lunn.ch>

On Sun, 5 Aug 2018, Andrew Lunn wrote:

> On Sat, Aug 04, 2018 at 07:06:58AM -0400, Robert P. J. Day wrote:
> >
> >   i'll try to keep this (relatively) short as there may be a
> > simple answer to this, or it could just be a stupid question --
> > sort of related to previous question (thank you, florian).
> >
> >   currently messing with networking device involving FPGA and some
> > quad-port transceivers, and noticed that, when one unplugs or
> > plugs a device into one of the ports, there is no change in the
> > contents of the corresponding sysfs files
> > /sys/class/net/<ifname>/carrier (or operstate, for that matter,
> > which might be related to this as well).
>
> Hi Robert
>
> As other have pointed out, ndo_change_carrier is not what you want
> here.

  i think i see that now ... based on the really adamant comment in
netdevice.h:

"Devices that determine carrier state from physical hardware
properties (eg network cables) or protocol-dependent mechanisms (eg
USB_CDC_NOTIFY_NETWORK_CONNECTION) should NOT implement this
function."

the impression i got was that implementing that routine for a physical
device would actually cause problems, but it seems only that it would
be a strange thing to do, but wouldn't necessarily cause problems if
you chose not to take advantage of it. which brings me back to one of
my original questions -- why *would* someone implement it? as some
sort of debugging feature? in any event, i'm convinced that that's not
where the problem lies.

> You should have a PHY device of some sort. Either a traditional
> copper PHY, or an SFP module. There should be a driver for this PHY.
> This could be one of those in drivers/net/phy. Or it could be
> firmware running, running on a little microcontroller inside your
> FPGA?

  in my case, it's properly in drivers/net/phy, so at least that part
is normal. back to investigating ...

rday

  reply	other threads:[~2018-08-05 12:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-04 11:06 consequences of setting net_device_ops ndo_change_carrier()? Robert P. J. Day
2018-08-04 11:47 ` Jiri Pirko
2018-08-04 11:57   ` Robert P. J. Day
2018-08-04 17:26     ` Stephen Hemminger
2018-08-04 17:32       ` Robert P. J. Day
2018-08-05  1:11 ` Andrew Lunn
2018-08-05 10:43   ` Robert P. J. Day [this message]
2018-08-05 14:58     ` Andrew Lunn

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=alpine.LFD.2.21.1808050625220.7483@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --cc=andrew@lunn.ch \
    --cc=netdev@vger.kernel.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