From patchwork Mon Apr 29 21:46:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tedheadster X-Patchwork-Id: 240520 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 AEB1C2C00C4 for ; Tue, 30 Apr 2013 07:47:16 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933130Ab3D2VrA (ORCPT ); Mon, 29 Apr 2013 17:47:00 -0400 Received: from mail-qc0-f182.google.com ([209.85.216.182]:33996 "EHLO mail-qc0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933125Ab3D2Vq5 (ORCPT ); Mon, 29 Apr 2013 17:46:57 -0400 Received: by mail-qc0-f182.google.com with SMTP id k19so3342144qcs.41 for ; Mon, 29 Apr 2013 14:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=/s9tYMxBqKYFFByY3z3KU7D2IlY/DgOizB2vREq7rD0=; b=khyuH5hXN7NK/InJzz1X/yjQqjcpL49AJgEVaTKpLivBm4Ax3Eo7tf4aNEMQNb/1SV xkjK7gVeTREV5m+j22ZxB6Nm6vAjnzrTYKEzd/YSDLmTKFmpSv8BUiOPJMlfaJdVIfWF DIjhAzEs+if0BZSaWxDaFiZTpoQy53IctleaJkLr+tmc3TZakNJyidMuWtSdYK1xD1oO u9XD/HmGBTJJ/hKq1xu6gSCt58K97d21yfaMk4QcySsxSXKnWU+R37OF0uwIFXYG+2y6 HePBuFBpgkNpj3eeB3QjYWfEmXwkfTYA28ORq/kJKyAlKxw0bocRad0bNbn3U1nfiyGR t02g== X-Received: by 10.224.168.140 with SMTP id u12mr26705567qay.43.1367272017030; Mon, 29 Apr 2013 14:46:57 -0700 (PDT) Received: from localhost.localdomain (pool-74-103-8-160.bltmmd.fios.verizon.net. [74.103.8.160]) by mx.google.com with ESMTPSA id n3sm36912062qat.6.2013.04.29.14.46.55 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 29 Apr 2013 14:46:56 -0700 (PDT) From: Matthew Whitehead To: netdev@vger.kernel.org Cc: Matthew Whitehead Subject: [PATCH] 3c509.c: call SET_NETDEV_DEV for all device types (ISA/ISAPnP/EISA) Date: Mon, 29 Apr 2013 17:46:53 -0400 Message-Id: <1367272013-2496-1-git-send-email-tedheadster@gmail.com> X-Mailer: git-send-email 1.7.2.5 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(-) 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); 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);