From patchwork Mon Sep 22 21:52:09 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 962 X-Patchwork-Delegate: jgarzik@pobox.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 356D2DDE06 for ; Tue, 23 Sep 2008 07:54:10 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbYIVVyF (ORCPT ); Mon, 22 Sep 2008 17:54:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753724AbYIVVyE (ORCPT ); Mon, 22 Sep 2008 17:54:04 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35293 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753154AbYIVVyC (ORCPT ); Mon, 22 Sep 2008 17:54:02 -0400 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id m8MLqA9N018331 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Sep 2008 14:52:11 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id m8MLq9N3031938; Mon, 22 Sep 2008 14:52:09 -0700 Message-Id: <200809222152.m8MLq9N3031938@imap1.linux-foundation.org> Subject: [patch 02/21] forcedeth: fix MAC address detection on network card (regression in 2.6.23) To: jeff@garzik.org Cc: netdev@vger.kernel.org, akpm@linux-foundation.org, michael.pyne@kdemail.net, AAbdulla@nvidia.com, aabdulla@nvidia.com, stable@kernel.org From: akpm@linux-foundation.org Date: Mon, 22 Sep 2008 14:52:09 -0700 X-Spam-Status: No, hits=-3.359 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Michael Pyne 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 Cc: Jeff Garzik Cc: Ayaz Abdulla Cc: On Wed, 21 Nov 2007 15:34:52 -0800 "Ayaz Abdulla" 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 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 --- drivers/net/forcedeth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ -6069,7 +6069,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),