mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	nic_swsd@realtek.com, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 3/3] r8169: release firmware on application failure
Date: Thu, 17 Sep 2026 21:45:52 -0300	[thread overview]
Message-ID: <714971be06fbb8d5c519d1d710d214fa@inf.ufrgs.br> (raw)
In-Reply-To: <0845552d-158b-4c46-b984-c0ea18237eed@lunn.ch>

>> Right now, firmware application failures are ignored, so the device
>> can keep going even if applying the firmware fails. The TODO also
>> specifically says to release the firmware on failure, which seems to
>> imply that continuing without it was the intended behavior, and that
>> releasing it was mainly meant to prevent retrying the same failed
>> firmware application later.
>> 
>> Making firmware application failures fatal also creates a state problem.
> 
> I don't know this driver in detail, but fatal errors generally don't
> cause state problem. The probe method fails, so the device is
> destroyed. Is firmware download not performed in probe?
> 
> This driver does support a number of different devices. How many do
> you have for testing? If you artificially cause firmware download to
> fail, is the device usable?
> 
> 	   Andrew

In the r8169 case, the firmware is not applied during probe, but rather
during rtl_open().

I got my hands on a machine with an RTL8105E. While it runs without
firmware, partial firmware application causes the NIC to stop working
unless the failure happens near the beginning or end of the application.

At this point I think the TODO I was trying to solve is stale. The proper
handling here would be, as you suggested, to fail rtl_open() on a firmware
application failure, which would release the firmware through the existing
rtl_open() error cleanup. That would instead turn this into broader
initialization error handling, which I am not knowledgeable enough about
the netdev and r8169 code yet to do confidently.

If desired, I could send the iopoll patch separately, but I do not think
I am going to continue with this series. Thanks for your help and patience.
I am still new to Linux kernel development and trying to get the hang of it.

      reply	other threads:[~2026-09-18  0:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 15:24 [PATCH net-next 0/3] r8169: handle firmware application errors Matheus Alves de Almeida
2026-09-16 15:24 ` [PATCH net-next 1/3] r8169: propagate errors from PHY write operations Matheus Alves de Almeida
2026-09-16 18:38   ` Andrew Lunn
2026-09-16 21:10     ` Matheus Alves de Almeida
2026-09-16 21:14       ` Andrew Lunn
2026-09-16 21:19         ` Matheus Alves de Almeida
2026-09-16 15:24 ` [PATCH net-next 2/3] r8169: propagate firmware access errors Matheus Alves de Almeida
2026-09-16 15:24 ` [PATCH net-next 3/3] r8169: release firmware on application failure Matheus Alves de Almeida
2026-09-16 18:42   ` Andrew Lunn
2026-09-16 21:15     ` Matheus Alves de Almeida
2026-09-16 22:02       ` Andrew Lunn
2026-09-16 22:21         ` Matheus Alves de Almeida
2026-09-17  2:19         ` Matheus Alves de Almeida
2026-09-17 12:14           ` Andrew Lunn
2026-09-18  0:45             ` Matheus Alves de Almeida [this message]

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=714971be06fbb8d5c519d1d710d214fa@inf.ufrgs.br \
    --to=matheus.aalmeida@inf.ufrgs.br \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®