netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: stephen@networkplumber.org
Cc: sthemmin@microsoft.com, linux-pci@vger.kernel.org,
	haiyangz@microsoft.com, netdev@vger.kernel.org,
	devel@linuxdriverproject.org
Subject: Re: [PATCH net-next 1/2] PCI: hv: support reporting serial number as slot information
Date: Sat, 01 Sep 2018 17:39:25 -0700 (PDT)	[thread overview]
Message-ID: <20180901.173925.56106529065602504.davem@davemloft.net> (raw)
In-Reply-To: <20180829162452.25805-2-sthemmin@microsoft.com>

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 29 Aug 2018 09:24:51 -0700

> +	spin_lock_irqsave(&hbus->device_list_lock, flags);
> +	list_for_each_entry(hpdev, &hbus->children, list_entry) {
> +		if (hpdev->pci_slot)
> +			continue;
> +
> +		slot_nr = PCI_SLOT(wslot_to_devfn(hpdev->desc.win_slot.slot));
> +		snprintf(name, SLOT_NAME_SIZE, "%u", hpdev->desc.ser);
> +		hpdev->pci_slot = pci_create_slot(hbus->pci_bus, slot_nr,
> +					  name, NULL);

pci_create_slot() takes a mutex, therefore you can't hold a spinlock or
disable interrupts here.

  reply	other threads:[~2018-09-02  0:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 16:24 [PATCH net-next 0/2] hv_netvsc: associate VF and PV device by serial number Stephen Hemminger
2018-08-29 16:24 ` [PATCH net-next 1/2] PCI: hv: support reporting serial number as slot information Stephen Hemminger
2018-09-02  0:39   ` David Miller [this message]
2018-08-29 16:24 ` [PATCH net-next 2/2] hv_netvsc: pair VF based on serial number Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180901.173925.56106529065602504.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).