Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755775AbbBLPMA (ORCPT ); Thu, 12 Feb 2015 10:12:00 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:54972 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753816AbbBLPL6 convert rfc822-to-8bit (ORCPT ); Thu, 12 Feb 2015 10:11:58 -0500 MIME-Version: 1.0 In-Reply-To: <20150212064855.5d7ac655@uryu.home.lan> References: <20150212064855.5d7ac655@uryu.home.lan> Date: Thu, 12 Feb 2015 17:11:58 +0200 Message-ID: Subject: Re: Question on MSI support in PCI and PCI-E devices From: Andrey Utkin To: Stephen Hemminger Cc: "linux-kernel@vger.kernel.org" , kernelnewbies , "kernel-mentors@selenic.com" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4931 Lines: 132 2015-02-12 16:48 GMT+02:00 Stephen Hemminger : > On Wed, 11 Feb 2015 18:19:00 +0000 > Andrey Utkin wrote: > >> Is it true that _every_ PCI or PCI Express device supporting MSI is >> indicated by some mention of MSI in "lspci -v", and if there's no such >> mention, it surely doesn't support MSI? >> > > Look at kernel source (drivers/pci/msi.c) function pci_msi_supported > there are many things which can block MSI. > > There can be cases where PCI quirks in kernel block MSI > because for example the device supports MSI, but the motherboard > BIOS is broken. This only happens on really old systems. Thank you for your reply. However, I was more interested in the case when lspci for device doesn't mention MSI at all, so I wonder if it makes sense to try to enable it in the driver at all. 04:05.0 Multimedia video controller: Bluecherry BC-H16480A 16 port H.264 video and audio encoder / decoder Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- 1) + solo_dev->isr_more_laps++; + return IRQ_RETVAL(handled); } static void free_solo_dev(struct solo_dev *solo_dev) @@ -232,6 +239,16 @@ static ssize_t p2m_timeouts_show(struct device *dev, return sprintf(buf, "%d\n", solo_dev->p2m_timeouts); } +static ssize_t isr_more_laps_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct solo_dev *solo_dev = + container_of(dev, struct solo_dev, dev); + + return sprintf(buf, "%d\n", solo_dev->isr_more_laps); +} + static ssize_t sdram_size_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -415,6 +432,7 @@ static const struct device_attribute solo_dev_attrs[] = { __ATTR_RO(input_map), __ATTR_RO(intervals), __ATTR_RO(sdram_offsets), + __ATTR_RO(isr_more_laps), }; static void solo_device_release(struct device *dev) index d19c0ae..dffd7d7 --- a/drivers/media/pci/solo6x10/solo6x10-enc.c +++ b/drivers/media/pci/solo6x10/solo6x10-enc.c @@ -28,7 +28,7 @@ #define VI_PROG_HSIZE (1280 - 16) #define VI_PROG_VSIZE (1024 - 16) -#define IRQ_LEVEL 2 +#define IRQ_LEVEL 3 static void solo_capture_config(struct solo_dev *solo_dev) { index 6c9bc70..4799ea2 --- a/drivers/media/pci/solo6x10/solo6x10.h +++ b/drivers/media/pci/solo6x10/solo6x10.h @@ -277,6 +277,8 @@ struct solo_dev { spinlock_t slock; int old_write; struct list_head vidq_active; + + int isr_more_laps; }; static inline u32 solo_reg_read(struct solo_dev *solo_dev, int reg) -- Andrey Utkin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/