All of lore.kernel.org
 help / color / mirror / Atom feed
* reprobing BAR sizes and capabilities after a FLR?
@ 2019-07-09 15:40 Christoph Hellwig
  2019-07-09 16:27 ` Sinan Kaya
  2019-07-10 14:14 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2019-07-09 15:40 UTC (permalink / raw)
  To: linux-pci

Hi all,

I've just been talking to some firmware developers that were a little
surprised that Linux does not reprobe BAR sizes after a FLR.  I looked
at our code and we do not reprobe anything at all after a FLR.  Is it
a good assumption that a devices comes back in exactly the same state
after an FLR?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: reprobing BAR sizes and capabilities after a FLR?
  2019-07-09 15:40 reprobing BAR sizes and capabilities after a FLR? Christoph Hellwig
@ 2019-07-09 16:27 ` Sinan Kaya
  2019-07-10 14:14 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Sinan Kaya @ 2019-07-09 16:27 UTC (permalink / raw)
  To: Christoph Hellwig, linux-pci

On 7/9/2019 11:40 AM, Christoph Hellwig wrote:
> Hi all,
> 
> I've just been talking to some firmware developers that were a little
> surprised that Linux does not reprobe BAR sizes after a FLR.  I looked
> at our code and we do not reprobe anything at all after a FLR.  Is it
> a good assumption that a devices comes back in exactly the same state
> after an FLR?
> 

What's the use case for BAR size changing? I do remember that code was
saving the assigned BAR values.

I don't think FLR can be treated as a full enumeration.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: reprobing BAR sizes and capabilities after a FLR?
  2019-07-09 15:40 reprobing BAR sizes and capabilities after a FLR? Christoph Hellwig
  2019-07-09 16:27 ` Sinan Kaya
@ 2019-07-10 14:14 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2019-07-10 14:14 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-pci, Alex Williamson

[+cc Alex]

On Tue, Jul 09, 2019 at 08:40:19AM -0700, Christoph Hellwig wrote:
> Hi all,
> 
> I've just been talking to some firmware developers that were a little
> surprised that Linux does not reprobe BAR sizes after a FLR.  I looked
> at our code and we do not reprobe anything at all after a FLR.  Is it
> a good assumption that a devices comes back in exactly the same state
> after an FLR?

I am a little nervous about the fact that we don't reprobe devices
after reset because the reset may cause the device to load new
firmware, which may cause arbitrary changes (device type, number and
size of BARs, etc).  FLR is a little more restrictive than
Conventional Reset, e.g., FLR must not affect the link state, so maybe
it's safer to assume BAR sizes are unchanged.  But I'm not at all
confident about that.

I mooted the idea of reprobing after reset, but that would break higher
level software that isn't prepared to see hotplug-like events caused by
reset, so haven't gone that direction (yet).

Bjorn

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-10 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-09 15:40 reprobing BAR sizes and capabilities after a FLR? Christoph Hellwig
2019-07-09 16:27 ` Sinan Kaya
2019-07-10 14:14 ` Bjorn Helgaas

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.