All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Gabriele Paoloni <gabriele.paoloni@huawei.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Bjorn Helgaas <helgaas@kernel.org>
Cc: Daniel Axtens <dja@axtens.net>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"Liuxinliang (Matthew Liu)" <z.liuxinliang@hisilicon.com>,
	Rongrong Zou <zourongrong@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH v4] PCI: Support hibmc VGA cards behind a misbehaving HiSilicon bridge
Date: Sat, 15 Jul 2017 09:54:33 +1000	[thread overview]
Message-ID: <1500076473.2865.99.camel@kernel.crashing.org> (raw)
In-Reply-To: <EE11001F9E5DDD47B7634E2F8A612F2E40B39FC4@FRAEML521-MBX.china.huawei.com>

On Fri, 2017-07-14 at 17:03 +0000, Gabriele Paoloni wrote:
> > I'd rather we have no default device until a driver actually picks up
> > though, and then, if we still have no default, use the first driver to
> > pick up.
> 
> Well from my understanding the PCI host controller driver will enumerate
> all the devices in the PCI hierarchy and call pci_device_add() for each of
> them, that in turn will call device_add(), at this stage if there is a
> driver available for the device such driver will probe otherwise it will not.
> 
> Are you suggesting to add the code above in pci_device_add() after device_add()
> and after checking that a driver has been bound for such dev?

I don't like us turning on MEM/IO decoding on a device that has
potentially not been initialized by its driver.

Ben.

WARNING: multiple messages have this Message-ID (diff)
From: benh@kernel.crashing.org (Benjamin Herrenschmidt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] PCI: Support hibmc VGA cards behind a misbehaving HiSilicon bridge
Date: Sat, 15 Jul 2017 09:54:33 +1000	[thread overview]
Message-ID: <1500076473.2865.99.camel@kernel.crashing.org> (raw)
In-Reply-To: <EE11001F9E5DDD47B7634E2F8A612F2E40B39FC4@FRAEML521-MBX.china.huawei.com>

On Fri, 2017-07-14 at 17:03 +0000, Gabriele Paoloni wrote:
> > I'd rather we have no default device until a driver actually picks up
> > though, and then, if we still have no default, use the first driver to
> > pick up.
> 
> Well from my understanding the PCI host controller driver will enumerate
> all the devices in the PCI hierarchy and call pci_device_add() for each of
> them, that in turn will call device_add(), at this stage if there is a
> driver available for the device such driver will probe otherwise it will not.
> 
> Are you suggesting to add the code above in pci_device_add() after device_add()
> and after checking that a driver has been bound for such dev?

I don't like us turning on MEM/IO decoding on a device that has
potentially not been initialized by its driver.

Ben.

  reply	other threads:[~2017-07-14 23:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  5:08 [PATCH v4] PCI: Support hibmc VGA cards behind a misbehaving HiSilicon bridge Daniel Axtens
2017-07-12 20:04 ` Bjorn Helgaas
2017-07-12 20:04   ` Bjorn Helgaas
2017-07-13 10:29   ` Gabriele Paoloni
2017-07-13 10:29     ` Gabriele Paoloni
2017-07-13 11:29     ` Bjorn Helgaas
2017-07-13 11:29       ` Bjorn Helgaas
2017-07-13 20:45       ` Benjamin Herrenschmidt
2017-07-13 20:45         ` Benjamin Herrenschmidt
2017-07-14 12:14         ` Gabriele Paoloni
2017-07-14 12:14           ` Gabriele Paoloni
2017-07-13 21:11       ` Alex Williamson
2017-07-13 21:11         ` Alex Williamson
2017-07-13 21:21         ` Benjamin Herrenschmidt
2017-07-13 21:21           ` Benjamin Herrenschmidt
2017-07-14 12:26           ` Gabriele Paoloni
2017-07-14 12:26             ` Gabriele Paoloni
2017-07-14 13:50             ` Benjamin Herrenschmidt
2017-07-14 13:50               ` Benjamin Herrenschmidt
2017-07-14 17:03               ` Gabriele Paoloni
2017-07-14 17:03                 ` Gabriele Paoloni
2017-07-14 23:54                 ` Benjamin Herrenschmidt [this message]
2017-07-14 23:54                   ` Benjamin Herrenschmidt
2017-07-14 14:43             ` Alex Williamson
2017-07-14 14:43               ` Alex Williamson
2017-07-14  1:35   ` Will Deacon
2017-07-14  1:35     ` Will Deacon

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=1500076473.2865.99.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=airlied@linux.ie \
    --cc=alex.williamson@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.vetter@intel.com \
    --cc=dja@axtens.net \
    --cc=gabriele.paoloni@huawei.com \
    --cc=helgaas@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=will.deacon@arm.com \
    --cc=z.liuxinliang@hisilicon.com \
    --cc=zourongrong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.