From patchwork Tue Apr 23 17:49:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tedheadster X-Patchwork-Id: 238973 X-Patchwork-Delegate: davem@davemloft.net 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.180.67]) by ozlabs.org (Postfix) with ESMTP id B43332C011C for ; Wed, 24 Apr 2013 03:49:44 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756673Ab3DWRtl (ORCPT ); Tue, 23 Apr 2013 13:49:41 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:48920 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756419Ab3DWRtk (ORCPT ); Tue, 23 Apr 2013 13:49:40 -0400 Received: by mail-wg0-f53.google.com with SMTP id z11so433363wgg.20 for ; Tue, 23 Apr 2013 10:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=8vcS/V/zpOdlgs3e+GAduwC7bCtcVRTNfcVnLJm9agQ=; b=Eg9wPlxMS2WIdcG871LcFy3gElvDxFObM+WgiUhOzJpzDsoyKtEDSgqpCR2a1R+Sm5 uyX1CXnmlDcnbSyqwZ7D1QPlAGY7TxluSTN4ZPDVmEoqXQ03E5PQ99CbQN+KZREE2JzS S+tELIBZ76MmXXsd7Gt07TARmVzbNkJw72d26tCntvhB2rdosrRmO+08LgcPOidvW/l6 +qu5tF+5Mp57GAfqHwEFwzBwAgpYU1FPJ/0k+h+2meGdy3BO4QqprMPGIwDMadPYiAUV LHG184IEowJTbvaHcJ5oAw6QTirVAUbzmuHfNa2KCeI9Mf2/1Zgb5uflGhWzMRJb6fq4 tjVg== MIME-Version: 1.0 X-Received: by 10.180.85.103 with SMTP id g7mr76376166wiz.23.1366739379556; Tue, 23 Apr 2013 10:49:39 -0700 (PDT) Received: by 10.180.3.229 with HTTP; Tue, 23 Apr 2013 10:49:39 -0700 (PDT) Date: Tue, 23 Apr 2013 13:49:39 -0400 Message-ID: Subject: [PATCH] 3c509.c: call SET_NETDEV_DEV for all device types (ISA/ISAPnP/EISA) From: Matthew Whitehead To: netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The venerable 3c509 driver only sets its device parent in one case, the ISAPnP one. It does this with the SET_NETDEV_DEV function. It should register with the device hierarchy in two additional cases: standard (non-PnP) ISA and EISA. - Currently they appear here: /sys/devices/virtual/net/eth0 (standard ISA) /sys/devices/virtual/net/eth1 (EISA) - Rather, they should instead be here: /sys/devices/isa/3c509.0/net/eth0 (standard ISA) /sys/devices/pci0000:00/0000:00:07.0/00:04/net/eth1 (EISA) Tested on ISA and EISA boards. Signed-off-by: Matthew Whitehead --- drivers/net/ethernet/3com/3c509.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509-isa")) { @@ -595,6 +596,7 @@ static int __init el3_eisa_probe (struct device *device) return -ENOMEM; } + SET_NETDEV_DEV(dev, device); netdev_boot_setup_check(dev); el3_dev_fill(dev, phys_addr, ioaddr, irq, if_port, EL3_EISA); -- 1.7.2.5 -- 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 --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c index f36ff99..adb4bf5 100644 --- a/drivers/net/ethernet/3com/3c509.c +++ b/drivers/net/ethernet/3com/3c509.c @@ -306,6 +306,7 @@ static int el3_isa_match(struct device *pdev, unsigned int ndev) if (!dev) return -ENOMEM; + SET_NETDEV_DEV(dev, pdev); netdev_boot_setup_check(dev);