* [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue
@ 2022-06-24 7:51 Oleksij Rempel
2022-06-24 7:51 ` [PATCH net v1 2/2] net: usb: asix: do not force pause frames support Oleksij Rempel
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Oleksij Rempel @ 2022-06-24 7:51 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Oleksij Rempel, Anton Lundin, kernel, linux-kernel, netdev,
Lukas Wunner
If cable is attached after probe sequence, the usbnet framework would
not automatically start processing RX packets except at least one
packet was transmitted.
On systems with any kind of address auto configuration this issue was
not detected, because some packets are send immediately after link state
is changed to "running".
With this patch we will notify usbnet about link status change provided by the
PHYlib.
Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Reported-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
drivers/net/usb/asix_common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
index 632fa6c1d5e3..b4a1b7abcfc9 100644
--- a/drivers/net/usb/asix_common.c
+++ b/drivers/net/usb/asix_common.c
@@ -431,6 +431,7 @@ void asix_adjust_link(struct net_device *netdev)
asix_write_medium_mode(dev, mode, 0);
phy_print_status(phydev);
+ usbnet_link_change(dev, phydev->link, 0);
}
int asix_write_gpio(struct usbnet *dev, u16 value, int sleep, int in_pm)
--
2.30.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net v1 2/2] net: usb: asix: do not force pause frames support
2022-06-24 7:51 [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue Oleksij Rempel
@ 2022-06-24 7:51 ` Oleksij Rempel
2022-06-28 4:49 ` Oleksij Rempel
2022-06-28 4:49 ` [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue Oleksij Rempel
2022-06-28 5:10 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 7+ messages in thread
From: Oleksij Rempel @ 2022-06-24 7:51 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Oleksij Rempel, Anton Lundin, kernel, linux-kernel, netdev,
Lukas Wunner
We should respect link partner capabilities and not force flow control
support on every link. Even more, in current state the MAC driver do not
advertises pause support so we should not keep flow control enabled at
all.
Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Reported-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
drivers/net/usb/asix.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/usb/asix.h b/drivers/net/usb/asix.h
index 2c81236c6c7c..45d3cc5cc355 100644
--- a/drivers/net/usb/asix.h
+++ b/drivers/net/usb/asix.h
@@ -126,8 +126,7 @@
AX_MEDIUM_RE)
#define AX88772_MEDIUM_DEFAULT \
- (AX_MEDIUM_FD | AX_MEDIUM_RFC | \
- AX_MEDIUM_TFC | AX_MEDIUM_PS | \
+ (AX_MEDIUM_FD | AX_MEDIUM_PS | \
AX_MEDIUM_AC | AX_MEDIUM_RE)
/* AX88772 & AX88178 RX_CTL values */
--
2.30.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue
2022-06-24 7:51 [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue Oleksij Rempel
2022-06-24 7:51 ` [PATCH net v1 2/2] net: usb: asix: do not force pause frames support Oleksij Rempel
@ 2022-06-28 4:49 ` Oleksij Rempel
2022-06-28 7:50 ` Lucas Stach
2022-06-28 5:10 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 7+ messages in thread
From: Oleksij Rempel @ 2022-06-28 4:49 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Anton Lundin, kernel, linux-kernel, netdev, Lukas Wunner
On Fri, Jun 24, 2022 at 09:51:38AM +0200, Oleksij Rempel wrote:
> If cable is attached after probe sequence, the usbnet framework would
> not automatically start processing RX packets except at least one
> packet was transmitted.
>
> On systems with any kind of address auto configuration this issue was
> not detected, because some packets are send immediately after link state
> is changed to "running".
>
> With this patch we will notify usbnet about link status change provided by the
> PHYlib.
>
> Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
> Reported-by: Anton Lundin <glance@acc.umu.se>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
In different mail thread Anton reported as tested.
Tested-by: Anton Lundin <glance@acc.umu.se>
> ---
> drivers/net/usb/asix_common.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
> index 632fa6c1d5e3..b4a1b7abcfc9 100644
> --- a/drivers/net/usb/asix_common.c
> +++ b/drivers/net/usb/asix_common.c
> @@ -431,6 +431,7 @@ void asix_adjust_link(struct net_device *netdev)
>
> asix_write_medium_mode(dev, mode, 0);
> phy_print_status(phydev);
> + usbnet_link_change(dev, phydev->link, 0);
> }
>
> int asix_write_gpio(struct usbnet *dev, u16 value, int sleep, int in_pm)
> --
> 2.30.2
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v1 2/2] net: usb: asix: do not force pause frames support
2022-06-24 7:51 ` [PATCH net v1 2/2] net: usb: asix: do not force pause frames support Oleksij Rempel
@ 2022-06-28 4:49 ` Oleksij Rempel
0 siblings, 0 replies; 7+ messages in thread
From: Oleksij Rempel @ 2022-06-28 4:49 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Anton Lundin, kernel, linux-kernel, netdev, Lukas Wunner
On Fri, Jun 24, 2022 at 09:51:39AM +0200, Oleksij Rempel wrote:
> We should respect link partner capabilities and not force flow control
> support on every link. Even more, in current state the MAC driver do not
> advertises pause support so we should not keep flow control enabled at
> all.
>
> Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
> Reported-by: Anton Lundin <glance@acc.umu.se>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
In different mail thread Anton reported as tested.
Tested-by: Anton Lundin <glance@acc.umu.se>
> ---
> drivers/net/usb/asix.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/usb/asix.h b/drivers/net/usb/asix.h
> index 2c81236c6c7c..45d3cc5cc355 100644
> --- a/drivers/net/usb/asix.h
> +++ b/drivers/net/usb/asix.h
> @@ -126,8 +126,7 @@
> AX_MEDIUM_RE)
>
> #define AX88772_MEDIUM_DEFAULT \
> - (AX_MEDIUM_FD | AX_MEDIUM_RFC | \
> - AX_MEDIUM_TFC | AX_MEDIUM_PS | \
> + (AX_MEDIUM_FD | AX_MEDIUM_PS | \
> AX_MEDIUM_AC | AX_MEDIUM_RE)
>
> /* AX88772 & AX88178 RX_CTL values */
> --
> 2.30.2
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue
2022-06-24 7:51 [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue Oleksij Rempel
2022-06-24 7:51 ` [PATCH net v1 2/2] net: usb: asix: do not force pause frames support Oleksij Rempel
2022-06-28 4:49 ` [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue Oleksij Rempel
@ 2022-06-28 5:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-28 5:10 UTC (permalink / raw)
To: Oleksij Rempel
Cc: davem, edumazet, kuba, pabeni, glance, kernel, linux-kernel,
netdev, lukas
Hello:
This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 24 Jun 2022 09:51:38 +0200 you wrote:
> If cable is attached after probe sequence, the usbnet framework would
> not automatically start processing RX packets except at least one
> packet was transmitted.
>
> On systems with any kind of address auto configuration this issue was
> not detected, because some packets are send immediately after link state
> is changed to "running".
>
> [...]
Here is the summary with links:
- [net,v1,1/2] net: asix: fix "can't send until first packet is send" issue
https://git.kernel.org/netdev/net/c/805206e66fab
- [net,v1,2/2] net: usb: asix: do not force pause frames support
https://git.kernel.org/netdev/net/c/ce95ab775f8d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue
2022-06-28 4:49 ` [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue Oleksij Rempel
@ 2022-06-28 7:50 ` Lucas Stach
2022-06-28 8:00 ` Oleksij Rempel
0 siblings, 1 reply; 7+ messages in thread
From: Lucas Stach @ 2022-06-28 7:50 UTC (permalink / raw)
To: Oleksij Rempel, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni
Cc: Anton Lundin, Lukas Wunner, linux-kernel, kernel, netdev
Hi Oleksij,
subject of this patch looks strange. It should probably read "can't
receive until first packet is sent".
Regards,
Lucas
Am Dienstag, dem 28.06.2022 um 06:49 +0200 schrieb Oleksij Rempel:
> On Fri, Jun 24, 2022 at 09:51:38AM +0200, Oleksij Rempel wrote:
> > If cable is attached after probe sequence, the usbnet framework would
> > not automatically start processing RX packets except at least one
> > packet was transmitted.
> >
> > On systems with any kind of address auto configuration this issue was
> > not detected, because some packets are send immediately after link state
> > is changed to "running".
> >
> > With this patch we will notify usbnet about link status change provided by the
> > PHYlib.
> >
> > Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
> > Reported-by: Anton Lundin <glance@acc.umu.se>
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
>
> In different mail thread Anton reported as tested.
> Tested-by: Anton Lundin <glance@acc.umu.se>
>
> > ---
> > drivers/net/usb/asix_common.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
> > index 632fa6c1d5e3..b4a1b7abcfc9 100644
> > --- a/drivers/net/usb/asix_common.c
> > +++ b/drivers/net/usb/asix_common.c
> > @@ -431,6 +431,7 @@ void asix_adjust_link(struct net_device *netdev)
> >
> > asix_write_medium_mode(dev, mode, 0);
> > phy_print_status(phydev);
> > + usbnet_link_change(dev, phydev->link, 0);
> > }
> >
> > int asix_write_gpio(struct usbnet *dev, u16 value, int sleep, int in_pm)
> > --
> > 2.30.2
> >
> >
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue
2022-06-28 7:50 ` Lucas Stach
@ 2022-06-28 8:00 ` Oleksij Rempel
0 siblings, 0 replies; 7+ messages in thread
From: Oleksij Rempel @ 2022-06-28 8:00 UTC (permalink / raw)
To: Lucas Stach
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Anton Lundin, Lukas Wunner, linux-kernel, kernel, netdev
On Tue, Jun 28, 2022 at 09:50:42AM +0200, Lucas Stach wrote:
> Hi Oleksij,
>
> subject of this patch looks strange. It should probably read "can't
> receive until first packet is sent".
rigth. But it is already taken.
> Regards,
> Lucas
>
> Am Dienstag, dem 28.06.2022 um 06:49 +0200 schrieb Oleksij Rempel:
> > On Fri, Jun 24, 2022 at 09:51:38AM +0200, Oleksij Rempel wrote:
> > > If cable is attached after probe sequence, the usbnet framework would
> > > not automatically start processing RX packets except at least one
> > > packet was transmitted.
> > >
> > > On systems with any kind of address auto configuration this issue was
> > > not detected, because some packets are send immediately after link state
> > > is changed to "running".
> > >
> > > With this patch we will notify usbnet about link status change provided by the
> > > PHYlib.
> > >
> > > Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
> > > Reported-by: Anton Lundin <glance@acc.umu.se>
> > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> >
> > In different mail thread Anton reported as tested.
> > Tested-by: Anton Lundin <glance@acc.umu.se>
> >
> > > ---
> > > drivers/net/usb/asix_common.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
> > > index 632fa6c1d5e3..b4a1b7abcfc9 100644
> > > --- a/drivers/net/usb/asix_common.c
> > > +++ b/drivers/net/usb/asix_common.c
> > > @@ -431,6 +431,7 @@ void asix_adjust_link(struct net_device *netdev)
> > >
> > > asix_write_medium_mode(dev, mode, 0);
> > > phy_print_status(phydev);
> > > + usbnet_link_change(dev, phydev->link, 0);
> > > }
> > >
> > > int asix_write_gpio(struct usbnet *dev, u16 value, int sleep, int in_pm)
> > > --
> > > 2.30.2
> > >
> > >
> >
>
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-06-28 8:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-24 7:51 [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue Oleksij Rempel
2022-06-24 7:51 ` [PATCH net v1 2/2] net: usb: asix: do not force pause frames support Oleksij Rempel
2022-06-28 4:49 ` Oleksij Rempel
2022-06-28 4:49 ` [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue Oleksij Rempel
2022-06-28 7:50 ` Lucas Stach
2022-06-28 8:00 ` Oleksij Rempel
2022-06-28 5:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox