linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antti Järvinen" <antti.jarvinen@gmail.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: kw@linux.com, alex.williamson@redhat.com, bhelgaas@google.com,
	kishon@ti.com, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, m-karicheri2@ti.com
Subject: Re: [PATCH v3] PCI: Add quirk for preventing bus reset on TI C667X
Date: Mon, 15 Mar 2021 12:45:09 +0200	[thread overview]
Message-ID: <e1802666-8f99-c7d6-b72c-3fcf960a87e4@gmail.com> (raw)
In-Reply-To: <20210312210917.GA2290948@bjorn-Precision-5520>



On 12.3.2021 23.09, Bjorn Helgaas wrote:
> On Mon, Mar 08, 2021 at 02:21:30PM +0000, Antti Järvinen wrote:
>> Some TI KeyStone C667X devices do no support bus/hot reset. Its PCIESS
>> automatically disables LTSSM when secondary bus reset is received and
>> device stops working. Prevent bus reset by adding quirk_no_bus_reset to
>> the device. With this change device can be assigned to VMs with VFIO,
>> but it will leak state between VMs.
> 
> s/do no/do/not/ (also in the comment below)
> 

Should be fixed in v4 patch.
 
> Does the user get any indication of this leaking state?  I looked
> through drivers/vfio and drivers/pci, but I haven't found anything
> yet.
> 

I haven't seen any indication too. 

Overall I think all devices having this quirk will leak state, as they
don't get resetted.


> We *could* log something in quirk_no_bus_reset(), but that would just
> be noise for people who don't pass the device through to a VM.  So
> maybe it would be nicer if we logged something when we actually *do*
> pass it through to a VM.
> 
>> Reference: https://e2e.ti.com/support/processors/f/791/t/954382
>> Signed-off-by: Antti Järvinen <antti.jarvinen@gmail.com>
>> ---
>>  drivers/pci/quirks.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
>> index 653660e3ba9e..d9201ad1ca39 100644
>> --- a/drivers/pci/quirks.c
>> +++ b/drivers/pci/quirks.c
>> @@ -3578,6 +3578,16 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, quirk_no_bus_reset);
>>   */
>>  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CAVIUM, 0xa100, quirk_no_bus_reset);
>>  
>> +/*
>> + * Some TI keystone C667X devices do no support bus/hot reset.
>> + * Its PCIESS automatically disables LTSSM when secondary bus reset is
>> + * received and device stops working. Prevent bus reset by adding
>> + * quirk_no_bus_reset to the device. With this change device can be
>> + * assigned to VMs with VFIO, but it will leak state between VMs.
>> + * Reference https://e2e.ti.com/support/processors/f/791/t/954382
>> + */
>> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0xb005, quirk_no_bus_reset);
>> +
>>  static void quirk_no_pm_reset(struct pci_dev *dev)
>>  {
>>  	/*
>> -- 
>> 2.17.1
>>

  parent reply	other threads:[~2021-03-15 10:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 15:36 [PATCH] PCI: quirk for preventing bus reset on TI C667X Antti Järvinen
2021-01-21 23:55 ` Bjorn Helgaas
2021-01-26 11:22   ` Antti Järvinen
2021-01-29 23:49     ` Bjorn Helgaas
2021-02-17 21:18   ` Bjorn Helgaas
2021-02-28 13:53     ` [PATCH v2] " Antti Järvinen
2021-03-07  0:22       ` Krzysztof Wilczyński
2021-03-08 14:21         ` [PATCH v3] PCI: Add " Antti Järvinen
2021-03-12 21:09           ` Bjorn Helgaas
2021-03-15 10:26             ` [PATCH v4] " Antti Järvinen
2021-04-19 12:44               ` Kishon Vijay Abraham I
2021-05-27 23:07               ` Bjorn Helgaas
2021-03-15 10:45             ` Antti Järvinen [this message]
2021-03-08 14:28         ` [PATCH v2] PCI: " Antti Järvinen

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=e1802666-8f99-c7d6-b72c-3fcf960a87e4@gmail.com \
    --to=antti.jarvinen@gmail.com \
    --cc=alex.williamson@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=kishon@ti.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=m-karicheri2@ti.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).