From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 26 Apr 2016 10:53:34 -0600 Subject: [U-Boot] [RFC PATCH] net: rtl8169: allow multiple devices In-Reply-To: References: <1461195110-11119-1-git-send-email-swarren@wwwdotorg.org> Message-ID: <571F9D0E.8070705@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/25/2016 11:08 AM, Joe Hershberger wrote: > Hi Stephen, > > On Wed, Apr 20, 2016 at 6:31 PM, Stephen Warren wrote: >> From: Stephen Warren >> >> Currently, if multiple rtl8169 devices exist on the PCI bus, they all >> get the same name, which prevents the user from selecting which to use >> via the ethact environment variable. Port the auto-naming code from the >> e1000 driver to solve this. ... (issues with ethprime/ethact) >> Equally, >> simply running e.g. "dhcp zImage" twice in a row doesn't seem to work; >> perhaps the subsequent attempts perform another lookup by name from ethact >> rather than just using the same device pointer from before? > > I believe it does work in general. Are you saying that it doesn't work > on your board without this patch? Ah. The problem is that modifying ethprime after it's been used the first time has no effect. So, the following work: pci enum setenv ethprime 'RTL8169#0' dhcp zImage or: pci enum setenv ethprime 'RTL8169#1' dhcp zImage but this doesn't: pci enum setenv ethprime 'RTL8169#0' dhcp zImage # Move Ethernet cable setenv ethprime 'RTL8169#1' dhcp zImage I guess that makes sense given how ethprime is supposed to work, but was a bit confusing when I wasn't aware.