public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: rtl8169: fix switching between adapters
Date: Thu, 16 Jun 2016 13:03:18 -0600	[thread overview]
Message-ID: <5762F7F6.30206@wwwdotorg.org> (raw)
In-Reply-To: <CANr=Z=biq_VJZOVcOVxZFThfDgGAhEiv-FMNXS-9+52krdoS6g@mail.gmail.com>

On 06/02/2016 04:06 PM, Joe Hershberger wrote:
> On Wed, Jun 1, 2016 at 11:40 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 04/26/2016 04:05 PM, Joe Hershberger wrote:
>>>
>>> On Tue, Apr 26, 2016 at 4:29 PM, Stephen Warren <swarren@wwwdotorg.org>
>>> wrote:
>>>>
>>>> From: Stephen Warren <swarren@nvidia.com>
>>>>
>>>> The rtl8169 driver uses a global variable to store the register address
>>>> of the adapter being operated upon. This is updated to point at the
>>>> correct adapter when sending or receiving a packet, or shutting down the
>>>> adapter, but not when initializing the adapter. Consequently, switching
>>>> between different adapters within the same U-Boot runtime does not work
>>>> correctly since the driver programs the wrong registers during
>>>> rtl8169_eth_start() -> rtl8169_common_start() -> rtl8169_hw_start().
>>>>
>>>> Note that since rtl8169_eth_stop() does set the global variable, the
>>>> second consecutive attempt to use the "new" adapter did work even before
>>>> this patch, because each time network usage is shut down, the network
>>>> core calls stop, which sets the variable so that the next start does
>>>> actually initialize the hardware, and the adapter works.
>>>>
>>>> Equally, rtl8169_eth_probe() calls rtl_init() which sets the global, so
>>>> if using only a single device, or if picking the "right" device (based on
>>>> probe order) when multiple devices are present, ioaddr will already be
>>>> set
>>>> correctly from the get-go, so the issue does not occur.
>>>>
>>>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>>>
>>>
>>> Looks reasonable to me.
>>> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
>>
>>
>> Joe,
>>
>> I assume you'll be applying this?
>
> Yes.

I don't see this applied anywhere yet.

  reply	other threads:[~2016-06-16 19:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 21:29 [U-Boot] [PATCH] net: rtl8169: fix switching between adapters Stephen Warren
2016-04-26 22:05 ` Joe Hershberger
2016-06-01 16:40   ` Stephen Warren
2016-06-02 22:06     ` Joe Hershberger
2016-06-16 19:03       ` Stephen Warren [this message]
2016-06-21 22:09 ` [U-Boot] " Joe Hershberger

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=5762F7F6.30206@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=u-boot@lists.denx.de \
    /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