public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: <Parthiban.Veerasooran@microchip.com>
To: <oneukum@suse.com>
Cc: <netdev@vger.kernel.org>, <linux-usb@vger.kernel.org>,
	<piergiorgio.beruto@gmail.com>, <andrew@lunn.ch>,
	<hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <steve.glendinning@shawell.net>,
	<UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next 3/3] net: usb: smsc95xx: suspend PHY during USB suspend
Date: Wed, 1 Apr 2026 03:18:03 +0000	[thread overview]
Message-ID: <2e9bc390-c870-46a3-b673-c7cdb5187cc3@microchip.com> (raw)
In-Reply-To: <1c660862-de30-428d-a772-8bee9b990a59@suse.com>

Hi Oliver

Thank you for reviewing the patch.

On 30/03/26 11:09 pm, Oliver Neukum wrote:
>> @@ -1550,6 +1550,12 @@ static int smsc95xx_suspend(struct 
>> usb_interface *intf, pm_message_t message)
>>
>>       pdata->pm_task = current;
>>
>> +     if (pdata->phydev) {
>> +             ret = phy_suspend(pdata->phydev);
>> +             if (ret)
>> +                     return ret;
>> +     }
> 
> At this point you have suspended the phy.
> Hence the device can no longer transmit
> 
>> +
>>       ret = usbnet_suspend(intf, message);
> 
> This wants to
> 
> 1. drain the queue if you do runtime PM
> 2. can return -EBUSY
> 
>>       if (ret < 0) {
>>               netdev_warn(dev->net, "usbnet_suspend error\n");
> 
> And here it will return in the error case. With the phy
> already suspended.

Thank you for pointing it out. I agree with you. I didn’t note it 
earlier since the issue did not occur during my testing. I will move the 
phy_suspend() to the appropriate place.

> 
> And, as a question of principle: Why do you suspend the phy
> in suspend(), but take no action in resume()?

In resume(), I did not call phy_resume() because the resume path already 
invokes phy_init_hw(), which internally calls 
phydev->drv->config_init(). This reinitializes and reconfigures the PHY. 
This is the reason why I didn't call phy_resume(). If there is a 
preference or expectation to use phy_resume() for symmetry or to better 
align with the PHY framework’s suspend/resume semantics, I’m happy to 
update the code accordingly.

Moreover I will revisit the implementation with internal review and then 
post the next version. Thank you for your support.

Best regards,
Parthiban V
> 
>         Regards
>                 Oliver
> 
> 


  reply	other threads:[~2026-04-01  3:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 13:42 [PATCH net-next 0/3] Add OATC10 Sleep Wake-up support and LAN867x Rev.D0 handling Parthiban Veerasooran
2026-03-30 13:42 ` [PATCH net-next 1/3] net: phy: phy-c45: add OATC10 Sleep/Wakeup support in 10BASE-T1S PHYs Parthiban Veerasooran
2026-03-30 14:46   ` Andrew Lunn
2026-04-01  3:12     ` Parthiban.Veerasooran
2026-03-30 13:42 ` [PATCH net-next 2/3] net: phy: microchip_t1s: add suspend and WOL support for LAN867x Rev.D0 Parthiban Veerasooran
2026-03-30 13:42 ` [PATCH net-next 3/3] net: usb: smsc95xx: suspend PHY during USB suspend Parthiban Veerasooran
2026-03-30 17:39   ` Oliver Neukum
2026-04-01  3:18     ` Parthiban.Veerasooran [this message]
2026-04-01 17:24       ` Oliver Neukum
2026-04-02  5:18         ` Parthiban.Veerasooran

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=2e9bc390-c870-46a3-b673-c7cdb5187cc3@microchip.com \
    --to=parthiban.veerasooran@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=pabeni@redhat.com \
    --cc=piergiorgio.beruto@gmail.com \
    --cc=steve.glendinning@shawell.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox