* [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1
@ 2019-05-31 13:57 Andrew Lunn
2019-05-31 13:57 ` [PATCH v2 1/2] ethtool: sync ethtool-copy.h with linux-next from 30/05/2019 Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Andrew Lunn @ 2019-05-31 13:57 UTC (permalink / raw)
To: linville; +Cc: netdev, Andrew Lunn
Import the latest ethtool.h and add two new links modes.
v2:
Move the new speeds to the end of the all_advertised_modes_bits[].
Remove the same_line bit for the new moved
Add the new modes to the man page.
Andrew Lunn (2):
ethtool: sync ethtool-copy.h with linux-next from 30/05/2019
ethtool: Add 100BaseT1 and 1000BaseT1 link modes
ethtool-copy.h | 7 ++++++-
ethtool.8.in | 2 ++
ethtool.c | 6 ++++++
3 files changed, 14 insertions(+), 1 deletion(-)
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 1/2] ethtool: sync ethtool-copy.h with linux-next from 30/05/2019 2019-05-31 13:57 [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1 Andrew Lunn @ 2019-05-31 13:57 ` Andrew Lunn 2019-05-31 15:53 ` Michal Kubecek 2019-05-31 13:57 ` [PATCH v2 2/2] ethtool: Add 100BaseT1 and 1000BaseT1 link modes Andrew Lunn 2019-06-14 18:40 ` [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1 John W. Linville 2 siblings, 1 reply; 7+ messages in thread From: Andrew Lunn @ 2019-05-31 13:57 UTC (permalink / raw) To: linville; +Cc: netdev, Andrew Lunn Sync ethtool-copy.h with linux-next from 22/05/2019. This provides access to the new link modes for 100BaseT1 and 1000BaseT1. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- ethtool-copy.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ethtool-copy.h b/ethtool-copy.h index 92ab10d65fc9..ad16e8f9c290 100644 --- a/ethtool-copy.h +++ b/ethtool-copy.h @@ -1481,6 +1481,8 @@ enum ethtool_link_mode_bit_indices { ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 64, ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT = 65, ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 66, + ETHTOOL_LINK_MODE_100baseT1_Full_BIT = 67, + ETHTOOL_LINK_MODE_1000baseT1_Full_BIT = 68, /* must be last entry */ __ETHTOOL_LINK_MODE_MASK_NBITS @@ -1597,7 +1599,7 @@ enum ethtool_link_mode_bit_indices { static __inline__ int ethtool_validate_speed(__u32 speed) { - return speed <= INT_MAX || speed == SPEED_UNKNOWN; + return speed <= INT_MAX || speed == (__u32)SPEED_UNKNOWN; } /* Duplex, half or full. */ @@ -1710,6 +1712,9 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) #define ETH_MODULE_SFF_8436 0x4 #define ETH_MODULE_SFF_8436_LEN 256 +#define ETH_MODULE_SFF_8636_MAX_LEN 640 +#define ETH_MODULE_SFF_8436_MAX_LEN 640 + /* Reset flags */ /* The reset() operation must clear the flags for the components which * were actually reset. On successful return, the flags indicate the -- 2.20.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] ethtool: sync ethtool-copy.h with linux-next from 30/05/2019 2019-05-31 13:57 ` [PATCH v2 1/2] ethtool: sync ethtool-copy.h with linux-next from 30/05/2019 Andrew Lunn @ 2019-05-31 15:53 ` Michal Kubecek 2019-05-31 16:04 ` Andrew Lunn 0 siblings, 1 reply; 7+ messages in thread From: Michal Kubecek @ 2019-05-31 15:53 UTC (permalink / raw) To: netdev; +Cc: Andrew Lunn, linville On Fri, May 31, 2019 at 03:57:47PM +0200, Andrew Lunn wrote: > Sync ethtool-copy.h with linux-next from 22/05/2019. This provides > access to the new link modes for 100BaseT1 and 1000BaseT1. > > Signed-off-by: Andrew Lunn <andrew@lunn.ch> > --- Reviewed-by: Michal Kubecek <mkubecek@suse.cz> BtW, this differs from the file "make headers_install" produces in net-next but only in white space so that it doesn't really matter and it gets sorted in a future sync. > ethtool-copy.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/ethtool-copy.h b/ethtool-copy.h > index 92ab10d65fc9..ad16e8f9c290 100644 > --- a/ethtool-copy.h > +++ b/ethtool-copy.h > @@ -1481,6 +1481,8 @@ enum ethtool_link_mode_bit_indices { > ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 64, > ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT = 65, > ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 66, > + ETHTOOL_LINK_MODE_100baseT1_Full_BIT = 67, > + ETHTOOL_LINK_MODE_1000baseT1_Full_BIT = 68, > > /* must be last entry */ > __ETHTOOL_LINK_MODE_MASK_NBITS > @@ -1597,7 +1599,7 @@ enum ethtool_link_mode_bit_indices { > > static __inline__ int ethtool_validate_speed(__u32 speed) > { > - return speed <= INT_MAX || speed == SPEED_UNKNOWN; > + return speed <= INT_MAX || speed == (__u32)SPEED_UNKNOWN; > } > > /* Duplex, half or full. */ > @@ -1710,6 +1712,9 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) > #define ETH_MODULE_SFF_8436 0x4 > #define ETH_MODULE_SFF_8436_LEN 256 > > +#define ETH_MODULE_SFF_8636_MAX_LEN 640 > +#define ETH_MODULE_SFF_8436_MAX_LEN 640 > + > /* Reset flags */ > /* The reset() operation must clear the flags for the components which > * were actually reset. On successful return, the flags indicate the > -- > 2.20.1 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] ethtool: sync ethtool-copy.h with linux-next from 30/05/2019 2019-05-31 15:53 ` Michal Kubecek @ 2019-05-31 16:04 ` Andrew Lunn 0 siblings, 0 replies; 7+ messages in thread From: Andrew Lunn @ 2019-05-31 16:04 UTC (permalink / raw) To: Michal Kubecek; +Cc: netdev, linville > Reviewed-by: Michal Kubecek <mkubecek@suse.cz> > > BtW, this differs from the file "make headers_install" produces in > net-next but only in white space so that it doesn't really matter and it > gets sorted in a future sync. Yes, there is something odd going on. It looks like two tabs have been converted to spaces in the ethtool copy. I left them alone, since i did not add them. Andrew ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] ethtool: Add 100BaseT1 and 1000BaseT1 link modes 2019-05-31 13:57 [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1 Andrew Lunn 2019-05-31 13:57 ` [PATCH v2 1/2] ethtool: sync ethtool-copy.h with linux-next from 30/05/2019 Andrew Lunn @ 2019-05-31 13:57 ` Andrew Lunn 2019-05-31 15:50 ` Michal Kubecek 2019-06-14 18:40 ` [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1 John W. Linville 2 siblings, 1 reply; 7+ messages in thread From: Andrew Lunn @ 2019-05-31 13:57 UTC (permalink / raw) To: linville; +Cc: netdev, Andrew Lunn The kernel can now indicate if the PHY supports operating over a single pair at 100Mbps or 1000Mbps. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- ethtool.8.in | 2 ++ ethtool.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index 430d11b915af..6af63455c636 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -639,8 +639,10 @@ lB l lB. 0x002 10baseT Full 0x004 100baseT Half 0x008 100baseT Full +0x80000000000000000 100baseT1 Full 0x010 1000baseT Half (not supported by IEEE standards) 0x020 1000baseT Full +0x100000000000000000 1000baseT1 Full 0x20000 1000baseKX Full 0x20000000000 1000baseX Full 0x800000000000 2500baseT Full diff --git a/ethtool.c b/ethtool.c index 66a907edd97b..05fe05a080cd 100644 --- a/ethtool.c +++ b/ethtool.c @@ -545,6 +545,8 @@ static void init_global_link_mode_masks(void) ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT, ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT, ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT, + ETHTOOL_LINK_MODE_100baseT1_Full_BIT, + ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, }; static const enum ethtool_link_mode_bit_indices additional_advertised_flags_bits[] = { @@ -634,10 +636,14 @@ static void dump_link_caps(const char *prefix, const char *an_prefix, "100baseT/Half" }, { 1, ETHTOOL_LINK_MODE_100baseT_Full_BIT, "100baseT/Full" }, + { 0, ETHTOOL_LINK_MODE_100baseT1_Full_BIT, + "100baseT1/Full" }, { 0, ETHTOOL_LINK_MODE_1000baseT_Half_BIT, "1000baseT/Half" }, { 1, ETHTOOL_LINK_MODE_1000baseT_Full_BIT, "1000baseT/Full" }, + { 0, ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, + "1000baseT1/Full" }, { 0, ETHTOOL_LINK_MODE_1000baseKX_Full_BIT, "1000baseKX/Full" }, { 0, ETHTOOL_LINK_MODE_2500baseX_Full_BIT, -- 2.20.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] ethtool: Add 100BaseT1 and 1000BaseT1 link modes 2019-05-31 13:57 ` [PATCH v2 2/2] ethtool: Add 100BaseT1 and 1000BaseT1 link modes Andrew Lunn @ 2019-05-31 15:50 ` Michal Kubecek 0 siblings, 0 replies; 7+ messages in thread From: Michal Kubecek @ 2019-05-31 15:50 UTC (permalink / raw) To: netdev; +Cc: Andrew Lunn, linville On Fri, May 31, 2019 at 03:57:48PM +0200, Andrew Lunn wrote: > The kernel can now indicate if the PHY supports operating over a > single pair at 100Mbps or 1000Mbps. > > Signed-off-by: Andrew Lunn <andrew@lunn.ch> > --- Reviewed-by: Michal Kubecek <mkubecek@suse.cz> > ethtool.8.in | 2 ++ > ethtool.c | 6 ++++++ > 2 files changed, 8 insertions(+) > > diff --git a/ethtool.8.in b/ethtool.8.in > index 430d11b915af..6af63455c636 100644 > --- a/ethtool.8.in > +++ b/ethtool.8.in > @@ -639,8 +639,10 @@ lB l lB. > 0x002 10baseT Full > 0x004 100baseT Half > 0x008 100baseT Full > +0x80000000000000000 100baseT1 Full > 0x010 1000baseT Half (not supported by IEEE standards) > 0x020 1000baseT Full > +0x100000000000000000 1000baseT1 Full > 0x20000 1000baseKX Full > 0x20000000000 1000baseX Full > 0x800000000000 2500baseT Full This reminds me the earlier discussion about which syntax extension would be more useful: ethtool -s <dev> advertise 100baseT1/Full 1000baseT1/Full (listing modes to be advertised) or ethtool -s <dev> advertise 100baseT1/Full off 1000baseT1/Full on (enabling/disabling selected modes). But maybe we could support both; after all, it's unlikely there would ever be a link mode named "on" or "off". Michal ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1 2019-05-31 13:57 [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1 Andrew Lunn 2019-05-31 13:57 ` [PATCH v2 1/2] ethtool: sync ethtool-copy.h with linux-next from 30/05/2019 Andrew Lunn 2019-05-31 13:57 ` [PATCH v2 2/2] ethtool: Add 100BaseT1 and 1000BaseT1 link modes Andrew Lunn @ 2019-06-14 18:40 ` John W. Linville 2 siblings, 0 replies; 7+ messages in thread From: John W. Linville @ 2019-06-14 18:40 UTC (permalink / raw) To: Andrew Lunn; +Cc: linville, netdev On Fri, May 31, 2019 at 03:57:46PM +0200, Andrew Lunn wrote: > Import the latest ethtool.h and add two new links modes. > > v2: > Move the new speeds to the end of the all_advertised_modes_bits[]. > Remove the same_line bit for the new moved > Add the new modes to the man page. > > Andrew Lunn (2): > ethtool: sync ethtool-copy.h with linux-next from 30/05/2019 > ethtool: Add 100BaseT1 and 1000BaseT1 link modes > > ethtool-copy.h | 7 ++++++- > ethtool.8.in | 2 ++ > ethtool.c | 6 ++++++ > 3 files changed, 14 insertions(+), 1 deletion(-) Thanks for the patches! Queued for next release... John -- John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-06-14 18:45 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-05-31 13:57 [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1 Andrew Lunn 2019-05-31 13:57 ` [PATCH v2 1/2] ethtool: sync ethtool-copy.h with linux-next from 30/05/2019 Andrew Lunn 2019-05-31 15:53 ` Michal Kubecek 2019-05-31 16:04 ` Andrew Lunn 2019-05-31 13:57 ` [PATCH v2 2/2] ethtool: Add 100BaseT1 and 1000BaseT1 link modes Andrew Lunn 2019-05-31 15:50 ` Michal Kubecek 2019-06-14 18:40 ` [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1 John W. Linville
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).