diff mbox

[1/4] forcedeth: fix MAC address detection on network card (regression in 2.6.23)

Message ID 200901092023.n09KN72t020166@imap1.linux-foundation.org
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Andrew Morton Jan. 9, 2009, 8:23 p.m. UTC
From: Michael Pyne <michael.pyne@kdemail.net>

Partially revert a change to mac address detection introduced to the forcedeth
driver.  The change was intended to correct mac address detection for newer
nVidia chipsets where the mac address was stored in reverse order.  One of
those chipsets appears to still have the mac address in reverse order (or at
least, it does on my system).

The change that broke mac address detection for my card was commit
ef756b3e56c68a4d76d9d7b9a73fa8f4f739180f "forcedeth: mac address correct"

My network card is an nVidia built-in Ethernet card, output from lspci as
follows (with text and numeric ids):
$ lspci | grep Ethernet
00:07.0 Bridge: nVidia Corporation MCP61 Ethernet (rev a2)
$ lspci -n | grep 07.0
00:07.0 0680: 10de:03ef (rev a2)

The vendor id is, of course, nVidia.  The device id corresponds to the
NVIDIA_NVENET_19 entry.

The included patch fixes the MAC address detection on my system.
Interestingly, the MAC address appears to be in the range reserved for my
motherboard manufacturer (Gigabyte) and not nVidia.

Signed-off-by: Michael J. Pyne <michael.pyne@kdemail.net>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: <stable@kernel.org>

On Wed, 21 Nov 2007 15:34:52 -0800
"Ayaz Abdulla" <AAbdulla@nvidia.com> wrote:

> The solution is to get the OEM to update their BIOS (instead of
> integrating this patch) since the MCP61 specs indicate that the MAC
> Address should be in correct order from BIOS.
> 
> By changing the feature DEV_HAS_CORRECT_MACADDR to all MCP61 boards, it
> could cause it to break on other OEM systems who have implemented it
> correctly.
> 

On Tue, 05 Feb 2008 13:20:59 -0500 Jeff Garzik <jeff@garzik.org> wrote:
> NAK - this fixes one set of users, and breaks a working set of users.
> 
> Need to add DMI check for the specific motherboard (dmi_check_system), 
> and flip flag according to success/failure of that check.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/forcedeth.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Garzik Jan. 9, 2009, 9:23 p.m. UTC | #1
> On Tue, 05 Feb 2008 13:20:59 -0500 Jeff Garzik <jeff@garzik.org> wrote:
>> NAK - this fixes one set of users, and breaks a working set of users.
>>
>> Need to add DMI check for the specific motherboard (dmi_check_system), 
>> and flip flag according to success/failure of that check.
> 
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

I'll just highlight this quoted bit for David...

I've already posted a dmi_check_system() solution too -- you just need 
to fill in the motherboard details to fix the regression while keeping 
others' systems working.

	Jeff




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andrew Morton Jan. 9, 2009, 9:37 p.m. UTC | #2
On Fri, 09 Jan 2009 16:23:38 -0500
Jeff Garzik <jeff@garzik.org> wrote:

> > On Tue, 05 Feb 2008 13:20:59 -0500 Jeff Garzik <jeff@garzik.org> wrote:
> >> NAK - this fixes one set of users, and breaks a working set of users.
> >>
> >> Need to add DMI check for the specific motherboard (dmi_check_system), 
> >> and flip flag according to success/failure of that check.
> > 
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> 
> I'll just highlight this quoted bit for David...
> 
> I've already posted a dmi_check_system() solution too

What is the status of that?  Where is it?

> -- you just need 
> to fill in the motherboard details to fix the regression while keeping 
> others' systems working.

Can you please tell Michael what info is needed to wrap this up?  And
how he is to obtain it?

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Garzik Jan. 9, 2009, 10:04 p.m. UTC | #3
Andrew Morton wrote:
> On Fri, 09 Jan 2009 16:23:38 -0500
> Jeff Garzik <jeff@garzik.org> wrote:
> 
>>> On Tue, 05 Feb 2008 13:20:59 -0500 Jeff Garzik <jeff@garzik.org> wrote:
>>>> NAK - this fixes one set of users, and breaks a working set of users.
>>>>
>>>> Need to add DMI check for the specific motherboard (dmi_check_system), 
>>>> and flip flag according to success/failure of that check.
>>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>> I'll just highlight this quoted bit for David...
>>
>> I've already posted a dmi_check_system() solution too
> 
> What is the status of that?  Where is it?

You were CC'd on it each time...  Here's a copy from the archives:

http://www.mail-archive.com/netdev@vger.kernel.org/msg61096.html


>> -- you just need 
>> to fill in the motherboard details to fix the regression while keeping 
>> others' systems working.
> 
> Can you please tell Michael what info is needed to wrap this up?  And
> how he is to obtain it?

I think he posted dmidecode output.

I also think he said a BIOS update fixed the problem, at least according 
to the mail thread.

	Jeff


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Jan. 10, 2009, 7:10 a.m. UTC | #4
From: akpm@linux-foundation.org
Date: Fri, 09 Jan 2009 12:23:07 -0800

> On Tue, 05 Feb 2008 13:20:59 -0500 Jeff Garzik <jeff@garzik.org> wrote:
> > NAK - this fixes one set of users, and breaks a working set of users.
> > 
> > Need to add DMI check for the specific motherboard (dmi_check_system), 
> > and flip flag according to success/failure of that check.
> 
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

I'm holding off on this until the DMI angle is worked out.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff -puN drivers/net/forcedeth.c~forcedeth-fix-mac-address-detection-on-network-card-regression-in-2623 drivers/net/forcedeth.c
--- a/drivers/net/forcedeth.c~forcedeth-fix-mac-address-detection-on-network-card-regression-in-2623
+++ a/drivers/net/forcedeth.c
@@ -6087,7 +6087,7 @@  static struct pci_device_id pci_tbl[] = 
 	},
 	{	/* MCP61 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_16),
-		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX_V1|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX_V1|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
 	},
 	{	/* MCP61 Ethernet Controller */
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_17),