All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "John Efstathiades" <john.efstathiades@pebblebay.com>
Cc: <linux-usb@vger.kernel.org>, <UNGLinuxDriver@microchip.com>,
	<woojung.huh@microchip.com>, <davem@davemloft.net>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 05/10] lan78xx: Disable USB3 link power state transitions
Date: Tue, 24 Aug 2021 06:53:03 -0700	[thread overview]
Message-ID: <20210824065303.17f23421@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <001b01d798c6$5b4d7b30$11e87190$@pebblebay.com>

On Tue, 24 Aug 2021 09:59:12 +0100 John Efstathiades wrote:
> > > +/* Enabling link power state transitions will reduce power consumption
> > > + * when the link is idle. However, this can cause problems with some
> > > + * USB3 hubs resulting in erratic packet flow.
> > > + */
> > > +static bool enable_link_power_states;  
> > 
> > How is the user supposed to control this? Are similar issues not
> > addressed at the USB layer? There used to be a "no autosuspend"
> > flag that all netdev drivers set..  
> 
> The change is specific to U1 and U2 transitions initiated by the device
> itself and does not affect ability of the device to respond to
> host-initiated U1 and U2 transitions.
> 
> There is no user access to this. The driver would have to be recompiled to
> change the default. 

Do you expect the device-initiated transitions to always be causing
trouble or are there scenarios where they are useful?

Having to recompile the driver is a middle ground rarely chosen
upstream. If the code has very low chance of being useful - let's
remove it (git will hold it forever if needed); if there are reasonable
chances someone will find it useful it should be configurable from user
space, or preferably automatically enabled based on some device match
list.

> > Was linux-usb consulted? Adding the list to Cc.
>  
> No, they weren't, but the change was discussed with the driver maintainer at
> Microchip.

Good to hear manufacturer is advising but the Linux USB community 
may have it's own preferences / experience.

> > >  		/* reset MAC */
> > >  		ret = lan78xx_read_reg(dev, MAC_CR, &buf);
> > >  		if (unlikely(ret < 0))
> > > -			return -EIO;
> > > +			return ret;
> > >  		buf |= MAC_CR_RST_;
> > >  		ret = lan78xx_write_reg(dev, MAC_CR, buf);
> > >  		if (unlikely(ret < 0))
> > > -			return -EIO;
> > > +			return ret;  
> > 
> > Please split the ret code changes to a separate, earlier patch.  
> 
> There are ret code changes in later patches in this set. As a general, rule
> should ret code changes be put into their own patch?

It's case by case, in this patch the ret code changes and error
propagation does not seem to be inherently related to the main 
change the patch is making. I think you're referring to patch 7 -
similar comment indeed applies there. I'd recommend taking the 
error propagation changes into a separate patch (can be a single 
one for code extracted from both patches).

  reply	other threads:[~2021-08-24 13:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 13:52 [PATCH net-next 00/10] LAN7800 driver improvements John Efstathiades
2021-08-23 13:52 ` [PATCH net-next 01/10] lan78xx: Fix white space and style issues John Efstathiades
2021-08-23 13:52 ` [PATCH net-next 02/10] lan78xx: Remove unused timer John Efstathiades
2021-08-23 13:52 ` [PATCH net-next 03/10] lan78xx: Set flow control threshold to prevent packet loss John Efstathiades
2021-08-23 13:52 ` [PATCH net-next 04/10] lan78xx: Remove unused pause frame queue John Efstathiades
2021-08-23 13:52 ` [PATCH net-next 05/10] lan78xx: Disable USB3 link power state transitions John Efstathiades
2021-08-23 22:40   ` Jakub Kicinski
2021-08-24  8:59     ` John Efstathiades
2021-08-24 13:53       ` Jakub Kicinski [this message]
2021-08-24 14:33         ` John Efstathiades
2021-08-24 15:19           ` Jakub Kicinski
2021-08-24 15:52             ` John Efstathiades
2021-08-23 13:52 ` [PATCH net-next 06/10] lan78xx: Fix exception on link speed change John Efstathiades
2021-08-23 22:42   ` Jakub Kicinski
2021-08-23 13:52 ` [PATCH net-next 07/10] lan78xx: Fix partial packet errors on suspend/resume John Efstathiades
2021-08-23 13:52 ` [PATCH net-next 08/10] lan78xx: Fix race conditions in suspend/resume handling John Efstathiades
2021-08-23 13:52 ` [PATCH net-next 09/10] lan78xx: Fix race condition in disconnect handling John Efstathiades
2021-08-23 13:52 ` [PATCH net-next 10/10] lan78xx: Limit number of driver warning messages John Efstathiades

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=20210824065303.17f23421@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=john.efstathiades@pebblebay.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=woojung.huh@microchip.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.