From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Alex Williamson <alex.williamson@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
David Gibson <david@gibson.dropbear.id.au>,
Alexander Graf <agraf@suse.de>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] PCI: Mark INTx masking support of Chelsio T310 10GbE NIC as broken
Date: Thu, 07 Jun 2012 15:14:07 +1000 [thread overview]
Message-ID: <4FD0389F.7030400@ozlabs.ru> (raw)
In-Reply-To: <4FCE19DA.1070802@siemens.com>
On 06/06/12 00:38, Jan Kiszka wrote:
> On 2012-05-25 16:02, Jan Kiszka wrote:
>> According to Alexey, the T310 does not properly support INTx masking as
>> it fails to keep the PCI_STATUS_INTERRUPT bit updated once the interrupt
>> is masked. Mark this adapter as broken so that pci_intx_mask_supported
>> won't report it as compatible.
>>
>> Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>> Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
>> ---
>>
>> Alexey, please test if this catches your case correctly.
>
> Alexey? Ping for testing.
Sorry, was in vacation and then a bit busy.
Yes, that works, thanks. It just a device ID is wrong, should be 0x0030 rather than 0x0010 in your patch - may be 0x10 is broken too, I do not know, mine is 0x30 :)
Here:
>> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CHELSIO, 0x0010,
>> + quirk_broken_intx_masking);
>
> Jan
>
>>
>> drivers/pci/pci.c | 3 +++
>> drivers/pci/quirks.c | 12 ++++++++++++
>> include/linux/pci.h | 2 ++
>> 3 files changed, 17 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
>> index 8f16900..3a1aeb5 100644
>> --- a/drivers/pci/pci.c
>> +++ b/drivers/pci/pci.c
>> @@ -2876,6 +2876,9 @@ bool pci_intx_mask_supported(struct pci_dev *dev)
>> bool mask_supported = false;
>> u16 orig, new;
>>
>> + if (dev->broken_intx_masking)
>> + return false;
>> +
>> pci_cfg_access_lock(dev);
>>
>> pci_read_config_word(dev, PCI_COMMAND, &orig);
>> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
>> index 2a75216..151e174 100644
>> --- a/drivers/pci/quirks.c
>> +++ b/drivers/pci/quirks.c
>> @@ -2929,6 +2929,18 @@ static void __devinit disable_igfx_irq(struct pci_dev *dev)
>> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);
>> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
>>
>> +/*
>> + * Some devices may pass our check in pci_intx_mask_supported if
>> + * PCI_COMMAND_INTX_DISABLE works though they actually do not properly
>> + * support this feature.
>> + */
>> +static void __devinit quirk_broken_intx_masking(struct pci_dev *dev)
>> +{
>> + dev->broken_intx_masking = 1;
>> +}
>> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CHELSIO, 0x0010,
>> + quirk_broken_intx_masking);
>> +
>> static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
>> struct pci_fixup *end)
>> {
>> diff --git a/include/linux/pci.h b/include/linux/pci.h
>> index 17b7b5b..c7cfd73 100644
>> --- a/include/linux/pci.h
>> +++ b/include/linux/pci.h
>> @@ -324,6 +324,8 @@ struct pci_dev {
>> unsigned int is_hotplug_bridge:1;
>> unsigned int __aer_firmware_first_valid:1;
>> unsigned int __aer_firmware_first:1;
>> + unsigned int broken_intx_masking:1; /* device's INTx masking
>> + support is not working */
>> pci_dev_flags_t dev_flags;
>> atomic_t enable_cnt; /* pci_enable_device has been called */
>>
>
--
Alexey
next prev parent reply other threads:[~2012-06-07 5:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 14:02 [PATCH] PCI: Mark INTx masking support of Chelsio T310 10GbE NIC as broken Jan Kiszka
2012-05-25 14:11 ` Bjorn Helgaas
2012-05-25 14:20 ` Jan Kiszka
2012-05-28 12:39 ` Michael S. Tsirkin
2012-05-28 12:51 ` Jan Kiszka
2012-05-28 13:21 ` Michael S. Tsirkin
2012-05-28 13:29 ` Jan Kiszka
2012-05-28 13:39 ` Michael S. Tsirkin
2012-05-29 7:51 ` Jan Kiszka
2012-05-29 9:51 ` Michael S. Tsirkin
2012-06-05 14:38 ` Jan Kiszka
2012-06-07 5:14 ` Alexey Kardashevskiy [this message]
2012-06-07 8:30 ` [PATCH v2] " Jan Kiszka
2012-06-18 18:29 ` Bjorn Helgaas
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=4FD0389F.7030400@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=david@gibson.dropbear.id.au \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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.