diff mbox series

[net,v1,1/2] net: asix: fix "can't send until first packet is send" issue

Message ID 20220624075139.3139300-1-o.rempel@pengutronix.de (mailing list archive)
State Accepted
Commit 805206e66fab4ba1e0ebd19402006d62cd1d4902
Delegated to: Netdev Maintainers
Headers show
Series [net,v1,1/2] net: asix: fix "can't send until first packet is send" issue | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: linux@rempel-privat.de; 4 maintainers not CCed: paskripkin@gmail.com linux-usb@vger.kernel.org andrew@lunn.ch linux@rempel-privat.de
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Oleksij Rempel June 24, 2022, 7:51 a.m. UTC
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(+)

Comments

Oleksij Rempel June 28, 2022, 4:49 a.m. UTC | #1
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
> 
>
patchwork-bot+netdevbpf@kernel.org June 28, 2022, 5:10 a.m. UTC | #2
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!
Lucas Stach June 28, 2022, 7:50 a.m. UTC | #3
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
> > 
> > 
>
Oleksij Rempel June 28, 2022, 8 a.m. UTC | #4
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
> > > 
> > > 
> > 
> 
> 
> 
>
diff mbox series

Patch

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)