Re: how to distinguish between PHYs that are not distinguished in the device tree?

2018-12-12 Thread rpjday
Quoting Andrew Lunn : On Wed, Dec 12, 2018 at 08:16:55AM -0500, rpj...@crashcourse.ca wrote: (i asked about this on the kernel newbies list earlier as a kind of puzzle but i think i really want a definitive answer so i'm taking it to the experts. (i will *try* to be concise.) imagine i'm

confusing inconsistency between "PHY ID" and "PHY type" in comments

2018-12-12 Thread rpjday
(totally willing to embarrass myself further, this time with respect to inconsistency in basic terminology in the kernel files.) from include/linux/mod_devicetable.h: /** * struct mdio_device_id - identifies PHY devices on an MDIO/MII bus * @phy_id: The result of * (mdio_read(&MII_PHY

how to distinguish between PHYs that are not distinguished in the device tree?

2018-12-12 Thread rpjday
(i asked about this on the kernel newbies list earlier as a kind of puzzle but i think i really want a definitive answer so i'm taking it to the experts. (i will *try* to be concise.) imagine i'm building a bunch of 8-port switches, using PHYs from acme corp, who manufacture four different PHY

Re: any reason for "!!netif_carrier_ok" and "!!netif_dormant" in net-sysfs.c?

2018-08-27 Thread rpjday
Quoting Eric Dumazet : On 08/27/2018 09:16 AM, rpj...@crashcourse.ca wrote: Quoting David Miller : From: "Robert P. J. Day" Date: Mon, 27 Aug 2018 04:55:29 -0400 (EDT)   another pedantic oddity -- is there a reason for these two double negations in net/core/net-sysfs.c? It turns an ar

Re: any reason for "!!netif_carrier_ok" and "!!netif_dormant" in net-sysfs.c?

2018-08-27 Thread rpjday
Quoting David Miller : From: "Robert P. J. Day" Date: Mon, 27 Aug 2018 04:55:29 -0400 (EDT) another pedantic oddity -- is there a reason for these two double negations in net/core/net-sysfs.c? It turns an arbitrary integer into a boolean, this is a common construct across the kernel tre

Re: misleading comment in netdevice.h?

2018-08-24 Thread rpjday
Quoting Michal Kubecek : On Fri, Aug 24, 2018 at 06:58:38AM -0400, rpj...@crashcourse.ca wrote: just pedantry here ... was perusing include/linux/netdevice.h, and in the declaration for struct net_device, the kerneldoc, one reads: * @flags: Interface flags (a la BSD) *

should __LINK_STATE_* enums really be restricted to generic queueing layer?

2018-08-24 Thread rpjday
more curious pedantry ... in netdevice.h, one reads: /* These flag bits are private to the generic network queueing * layer; they may not be explicitly referenced by any other * code. */ enum netdev_state_t { __LINK_STATE_START, __LINK_STATE_PRESENT, __LINK

misleading comment in netdevice.h?

2018-08-24 Thread rpjday
just pedantry here ... was perusing include/linux/netdevice.h, and in the declaration for struct net_device, the kerneldoc, one reads: * @flags: Interface flags (a la BSD) * @priv_flags:Like 'flags' but invisible to userspace, * see if.h for the def

what exactly does "volatile" mean WRT net_device_flags?

2018-08-24 Thread rpjday
i'm still unclear what the qualifier "volatile" means when used WRT net_device_flags. the explanation given in include/uapi/linux/if.h: "Flags which can be toggled through sysfs are annotated below, note that only a few flags can be toggled and some other flags are always preserved from the ori

Under what conditions is phy_device "adjust_link()" called?

2018-08-16 Thread rpjday
I can see from the documentation that the callback adjust_link() is invoked "for the enet controller to respond to changes in the link state." Is there a specific list of the events that would generate such a change? Are we talking initially opening the device, ifup/ifdown, physically unplugging

how PHY driver is notified that cable is unplugged? (possibly related to IFF_RUNNING flag)

2018-08-01 Thread rpjday
(warning that i have a few questions that are probably trivial until i get up to speed with networking code.) a colleague asked for advice about the following -- apparently a new PHY driver works properly when being brought up with "ifconfig up", part of that process apparently set