From patchwork Mon Jul 23 22:55:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 142666 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp6580695ljj; Mon, 23 Jul 2018 15:55:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfmS+hPh2Zw+IsQ0jK7XhnP4yNU9v1ZwHFhi/h/8P1WbBMCnRIfaTG9UjUhEuNhYTzhZdJy X-Received: by 2002:a62:e18:: with SMTP id w24-v6mr15112128pfi.145.1532386545880; Mon, 23 Jul 2018 15:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532386545; cv=none; d=google.com; s=arc-20160816; b=wGqB7seH3q6ExEFj0QNtnSjy4KiLDGwy3NB3nPhC5eDJFJch2yRqQHa4c6H3R5dS6b Tp2P59H7CZeDaVL+T/YxrB7EizR1YZFaRAr+Qsi+UyPAFDxzf/XBF9I7xfRUmrcZSnRR MMk+WhLGlqDW1RVdz5THN9f3eVS5H/ruMt5fwE/izPHukP5dvi94UbzKskxZO/jZCH0j EzpOExl/P5z6MC0cTTgmdygrPr9bn8TOPaVedzMcI9a4gccC48FltXJkGJ48ld1jyTJ5 8op8YtZtGo594ZMz+5tpSG6kZ7Mi2dsQ5L/fy/COPFMLnZAVxk9j+GUWOCs/TSjxn2h6 rkLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=ut9G2hWhnkFu2633W0B1aUOYtyYrudgefDMkqklgGv0=; b=SOQjAJ6zqCWwsG+U7Y0PbgqujPmP3yPWUK0NGw3YXUjCi+77L/AjlFdKfRmBAU8zq2 dOmw+4vpKgXSY42Z85sPRIha5Y269rO8lOxVOdJesyqUsWCM3Kz/2fRRyjQczYZVjXp4 LfFpuqPtf+/oU7LHz8JhhrpaJI9WckKBkkytLreDWvFuqF80P67VdN045+taynPZs+lw VHzOAnGquNJ8prY7zVbU6IrKGZKJHWpdfLKIn76np4+0iEus0wByqLPz2UZzL8/cQSWx H9jXqaEBwHtm6sHMMq7tBnyR8a7u+88Otj5BKrriiW84YMwpgzKZJGPIboKWoYtIkDAT XoYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x66-v6si9891087pfx.67.2018.07.23.15.55.45; Mon, 23 Jul 2018 15:55:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388263AbeGWX7J (ORCPT + 31 others); Mon, 23 Jul 2018 19:59:09 -0400 Received: from complete.lackof.org ([198.49.126.79]:36618 "EHLO complete.lackof.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388109AbeGWX7J (ORCPT ); Mon, 23 Jul 2018 19:59:09 -0400 Received: from localhost (c-73-78-137-212.hsd1.co.comcast.net [73.78.137.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by complete.lackof.org (Postfix) with ESMTPSA id 1EABE33E018A; Mon, 23 Jul 2018 16:55:41 -0600 (MDT) Date: Mon, 23 Jul 2018 16:55:40 -0600 From: dann frazier To: Aviad Krawczyk , "David S. Miller" Cc: Zhao Chen , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] hinic: Link the logical network device to the pci device in sysfs Message-ID: <20180723225540.GA6905@xps13.dannf> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Virus-Scanned: clamav-milter 0.100.0 at complete.lackof.org X-Virus-Status: Clean X-Spam-Status: No, score=0.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on complete.lackof.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Otherwise interfaces get exposed under /sys/devices/virtual, which doesn't give udev the context it needs for PCI-based predictable interface names. Signed-off-by: dann frazier --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 1 + 1 file changed, 1 insertion(+) -- 2.18.0 diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c index 5b122728dcb47..09e9da10b7865 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c @@ -983,6 +983,7 @@ static int nic_dev_init(struct pci_dev *pdev) hinic_hwdev_cb_register(nic_dev->hwdev, HINIC_MGMT_MSG_CMD_LINK_STATUS, nic_dev, link_status_event_handler); + SET_NETDEV_DEV(netdev, &pdev->dev); err = register_netdev(netdev); if (err) { dev_err(&pdev->dev, "Failed to register netdev\n");