[PATCH v4 0/9] PCI/MSI: Introduce pci_auto_enable_msi*() family helpers

2013-12-16 Thread Alexander Gordeev
nvec); Device drivers with more specific requirements (i.e. a number of MSI-Xs which is a multiple of a certain number within a specified range) would still need to implement the loop using the two old functions. The tree could be found in "pci-next-msi-v4" branch in repo: https://github.co

[PATCH v4 5/9] PCI/MSI: Make pci_enable_msi/msix() 'nvec' argument type as int

2013-12-16 Thread Alexander Gordeev
Make pci_enable_msi_block(), pci_enable_msi_block_auto() and pci_enable_msix() consistent with regard to the type of 'nvec' argument. Signed-off-by: Alexander Gordeev Reviewed-by: Tejun Heo --- Documentation/PCI/MSI-HOWTO.txt |2 +- drivers/pci/msi.c |4 ++-

[PATCH v4 3/9] PCI/MSI: Fix return value when populate_msi_sysfs() failed

2013-12-16 Thread Alexander Gordeev
If populate_msi_sysfs() function failed msix_capability_init() must return the error code, but it returns the success instead. This update fixes the described misbehaviour. Signed-off-by: Alexander Gordeev Reviewed-by: Tejun Heo --- drivers/pci/msi.c | 11 +-- 1 files changed, 5

Re: [PATCH v3 04/11] PCI/MSI/pSeries: Make quota traversing and requesting race-safe

2013-12-13 Thread Alexander Gordeev
a while reading only device's properties and gains constant result (well, assuming the device tree is not updated, but this is a different story). Which makes me confused about this note from a earlier thread: [quote] On Sat, 2013-10-05 at 16:20 +0200, Alexander Gordeev wrote: > So my point i

Re: [PATCH v3 11/11] PCI/MSI: Introduce pcim_enable_msi*() family helpers

2013-12-12 Thread Alexander Gordeev
tomatically > deallocated when the driver detaches. But I don't see anything like that > happening in this patch. Oh.. right. What about pci_auto_ prefix to indicate automatic fallback logic? Or may be even pcia_ ? -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe fro

Re: [PATCH v3 10/11] PCI/MSI: Convert pci_msix_table_size() to a public interface

2013-12-12 Thread Alexander Gordeev
es are more informative for me, since they hint where the MSI/MSI-X vector count comes from. Up to you. -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More m

Re: [PATCH v3 00/11] Introduce pcim_enable_msi*() family helpers

2013-12-06 Thread Alexander Gordeev
On Tue, Nov 26, 2013 at 10:09:49AM +0100, Alexander Gordeev wrote: > Patches 3,4 - fixes for PowerPC pSeries platform [...] > PCI/MSI/pSeries: Fix wrong error code reporting > PCI/MSI/pSeries: Make quota traversing and requesting race-safe Hi Bjorn, The two unreviewed PowerPC p

[PATCH v3 02/11] PCI/MSI/s390: Remove superfluous check of MSI type

2013-11-26 Thread Alexander Gordeev
arch_setup_msi_irqs() hook can only be called from the generic MSI code which ensures correct MSI type parameter. Signed-off-by: Alexander Gordeev Acked-by: Martin Schwidefsky --- arch/s390/pci/pci.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/s390/pci/pci.c

[PATCH v3 03/11] PCI/MSI/pSeries: Fix wrong error code reporting

2013-11-26 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- arch/powerpc/platforms/pseries/msi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 6d2f0ab..009ec73 100644 --- a/arch/powerpc/platforms/pseries

[PATCH v3 11/11] PCI/MSI: Introduce pcim_enable_msi*() family helpers

2013-11-26 Thread Alexander Gordeev
) would still need to implement the loop using the two old functions. Signed-off-by: Alexander Gordeev Suggested-by: Ben Hutchings Reviewed-by: Tejun Heo --- Documentation/PCI/MSI-HOWTO.txt | 134 +-- drivers/pci/msi.c | 74 ++

[PATCH v3 09/11] PCI/MSI: Get rid of pci_enable_msi_block_auto() interface

2013-11-26 Thread Alexander Gordeev
pci_enable_msi_block_auto() has been introduced recently and its only user is AHCI driver, which is also updated by this change. Signed-off-by: Alexander Gordeev Acked-by: Tejun Heo --- Documentation/PCI/MSI-HOWTO.txt | 39 --- drivers/ata/ahci.c | 56

[PATCH v3 08/11] PCI/MSI: Factor out pci_get_msi_cap() interface

2013-11-26 Thread Alexander Gordeev
Device drivers can use this interface to obtain maximum number of MSI interrupts the device supports and use that number i.e. in a following call to pci_enable_msi_block() interface. Signed-off-by: Alexander Gordeev Reviewed-by: Tejun Heo --- Documentation/PCI/MSI-HOWTO.txt | 15

[PATCH v3 10/11] PCI/MSI: Convert pci_msix_table_size() to a public interface

2013-11-26 Thread Alexander Gordeev
change. Signed-off-by: Alexander Gordeev Reviewed-by: Tejun Heo --- Documentation/PCI/MSI-HOWTO.txt | 13 + drivers/pci/msi.c | 12 ++-- drivers/pci/pcie/portdrv_core.c |5 +++-- include/linux/pci.h |2 +- 4 files changed, 27 insertions(+), 5

[PATCH v3 04/11] PCI/MSI/pSeries: Make quota traversing and requesting race-safe

2013-11-26 Thread Alexander Gordeev
evices() a driver might get a stalled value of MSI limit for its device or possibly even crash. This update introduces "rtas_quota_mutex" and serializes all accesses to msi_quota_for_device() function. As result, no driver could eat into other device's MSI limit. Signed-off-

[PATCH v3 00/11] Introduce pcim_enable_msi*() family helpers

2013-11-26 Thread Alexander Gordeev
,2 - ACK'ed tweaks for s390 architecture Patches 3,4 - fixes for PowerPC pSeries platform Patches 5-11- fixes, tweaks and changes of the generic MSI code The tree could be found in "pci-next-msi-v3" branch in repo: https://github.com/a-gordeev/linux.git Alexander

[PATCH v3 07/11] PCI/MSI: Make pci_enable_msi/msix() 'nvec' argument type as int

2013-11-26 Thread Alexander Gordeev
Make pci_enable_msi_block(), pci_enable_msi_block_auto() and pci_enable_msix() consistent with regard to the type of 'nvec' argument. Signed-off-by: Alexander Gordeev --- Documentation/PCI/MSI-HOWTO.txt |2 +- drivers/pci/msi.c |4 ++-- include/l

[PATCH v3 05/11] PCI/MSI: Fix return value when populate_msi_sysfs() failed

2013-11-26 Thread Alexander Gordeev
If populate_msi_sysfs() function failed msix_capability_init() must return the error code, but it returns the success instead. This update fixes the described misbehaviour. Signed-off-by: Alexander Gordeev Reviewed-by: Tejun Heo --- drivers/pci/msi.c | 11 +-- 1 files changed, 5

[PATCH v3 06/11] PCI/MSI: Return -ENOSYS for unimplemented interfaces, not -1

2013-11-26 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev Suggested-by: Ben Hutchings Reviewed-by: Tejun Heo --- include/linux/pci.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 835ec7b..d5cc0d3 100644 --- a/include/linux/pci.h +++ b

[PATCH v3 01/11] PCI/MSI/s390: Fix single MSI only check

2013-11-26 Thread Alexander Gordeev
Multiple MSIs have never been supported on s390 architecture, but the platform code fails to report single MSI only. Signed-off-by: Alexander Gordeev Acked-by: Martin Schwidefsky --- arch/s390/pci/pci.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/s390/pci

Re: [PATCH RFC v2 09/29] PCI/MSI: Factor out pci_get_msi_cap() interface

2013-11-25 Thread Alexander Gordeev
number"? Term "negative number" is used throughout the whole document. Could be updated in a separate patch if it worth it. > tejun -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body o

Re: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers

2013-11-22 Thread Alexander Gordeev
ven in different order. > tejun -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers

2013-11-22 Thread Alexander Gordeev
. Perfectly makes sense to me, but this is personal :) > tejun -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel

Re: [PATCH RFC v2 11/29] PCI/MSI: Convert pci_msix_table_size() to a public interface

2013-11-22 Thread Alexander Gordeev
On Wed, Nov 20, 2013 at 11:23:24AM -0500, Tejun Heo wrote: > On Fri, Oct 18, 2013 at 07:12:11PM +0200, Alexander Gordeev wrote: > > Make pci_msix_table_size() return error code if the device > > does not support MSI-X. This update is needed to create a > > consistent

Re: [PATCH RFC v2 08/29] PCI/MSI: Make pci_enable_msix() 'nvec' argument unsigned int

2013-11-22 Thread Alexander Gordeev
but I'd vote for converting things to > int. I will re-post with int's in next version unless Bjorn (someone) speaks up against. > Thanks. > > -- > tejun -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscri

Re: [PATCH RFC v2 06/29] PCI/MSI: Get rid of useless count of msi_desc leftovers

2013-11-22 Thread Alexander Gordeev
> okay in the description? Well, this is embarrassing. A quick check into x86 shows the partially initialized MSI-Xs are possible - something I should have noticed. Self-Nack. > tejun -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubsc

Re: [PATCH RFC v2 00/29] Introduce pcim_enable_msi*() family helpers

2013-11-11 Thread Alexander Gordeev
On Fri, Oct 18, 2013 at 07:12:00PM +0200, Alexander Gordeev wrote: > Patches 1,2 - ACK'ed tweaks for s390 architecture > Patches 3,4 - fixes for PowerPC pSeries platform > Patches 5-12 - fixes, tweaks and changes of the generic MSI code > Patches 12-29 - example updates of f

Re: [PATCH 0/5] percpu_ida: Various tweaks

2013-11-11 Thread Alexander Gordeev
planning to pull Shaohua's percpu_ida conversion? Thanks! > --nab -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://v

Re: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers

2013-11-04 Thread Alexander Gordeev
On Thu, Oct 24, 2013 at 11:51:58AM +0100, Tejun Heo wrote: Hi Tejun, > I haven't looked into any details but, if the above works for most use > cases, it looks really good to me. Could you please take a look (at least) at patches 10 and 12? > tejun -- Regards, Alexander

Re: [PATCH 0/5] percpu_ida: Various tweaks

2013-10-29 Thread Alexander Gordeev
rom Patch #5 for the moment.. Yeah, looking forward to try AHCI with percpu_ida. > --nab -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: [PATCH 0/5] percpu_ida: Various tweaks

2013-10-28 Thread Alexander Gordeev
right away. -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 5/5] percpu_ida: Allow variable maximum number of cached tags

2013-10-28 Thread Alexander Gordeev
big this threshold value should be. Signed-off-by: Alexander Gordeev --- block/blk-mq-tag.c |9 + include/linux/percpu_ida.h |5 +++-- lib/percpu_ida.c |7 +-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/block/blk-mq-tag.c b/block/blk-mq

[PATCH 2/5] percpu_ida: Move waking up waiters out of atomic contexts

2013-10-28 Thread Alexander Gordeev
Currently percpu_ida_free() waikes up waiters always with local interrupts disabled and sometimes with pool->lock held. Yet, it does not appear there is any reason why it could not be done out of these atomic contexts. Signed-off-by: Alexander Gordeev --- lib/percpu_ida.c | 11 +++

[PATCH 4/5] percpu_ida: Sanity check initialization parameters

2013-10-28 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- lib/percpu_ida.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/percpu_ida.c b/lib/percpu_ida.c index 4adc3e5..1fc89f9 100644 --- a/lib/percpu_ida.c +++ b/lib/percpu_ida.c @@ -298,6 +298,11 @@ int __percpu_ida_init(struct

[PATCH 3/5] percpu_ida: Optimize freeing tags when maximum cache size is 1

2013-10-28 Thread Alexander Gordeev
become largely negated. This update assumes stealing tags is faster than ping-ponging between local caches and the pool and prevents returning tags to the pool in case percpu_max_size is 1. Signed-off-by: Alexander Gordeev --- lib/percpu_ida.c |5 ++--- 1 files changed, 2 insertions(+), 3

[PATCH 0/5] percpu_ida: Various tweaks

2013-10-28 Thread Alexander Gordeev
Hi Kent, Here is an update of few behaviours which caught my eye. I have not tested any, so it is up to your judgement ;) Alexander Gordeev (5): percpu_ida: Fix data race on cpus_have_tags cpumask percpu_ida: Move waking up waiters out of atomic contexts percpu_ida: Optimize freeing tags

[PATCH 1/5] percpu_ida: Fix data race on cpus_have_tags cpumask

2013-10-28 Thread Alexander Gordeev
prepare_to_wait() and wake_up() calls at the moment and the aforementioned sequence does not appear could hit. Nevertheless, explicit memory barriers still seem justifiable. Signed-off-by: Alexander Gordeev --- lib/percpu_ida.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions

Re: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers

2013-10-25 Thread Alexander Gordeev
ems more reasonable to me. > David -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Plea

Re: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers

2013-10-24 Thread Alexander Gordeev
ble_msix() users. > tejun -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers

2013-10-24 Thread Alexander Gordeev
s semantics to function name rather than to extra parameters, i.e. pcim_enable_msix_min_max(struct pci_dev *dev, struct msix_entry *entries, unsigned int minvec, unsigned int maxvec); > Some static inline functions could be used for the common cases. > > David

Re: [PATCH RFC v2 29/29] vmxnet3: Make use of pcim_enable_msix_range() interface

2013-10-21 Thread Alexander Gordeev
rmediate number of interrupts - but > probably > only uses the minimum number. Yes, you are right. I missed the vectors = vector_threshold assignment. This driver is inapplicable as an example. -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "

[PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers

2013-10-19 Thread Alexander Gordeev
) would still need to implement the loop using the two old functions. Signed-off-by: Alexander Gordeev Suggested-by: Ben Hutchings --- Documentation/PCI/MSI-HOWTO.txt | 134 +-- drivers/pci/msi.c | 46 + include/linux/pci.h

[PATCH RFC v2 10/29] PCI/MSI: Get rid of pci_enable_msi_block_auto() interface

2013-10-19 Thread Alexander Gordeev
: Alexander Gordeev --- Documentation/PCI/MSI-HOWTO.txt | 30 +--- drivers/ata/ahci.c | 56 -- drivers/pci/msi.c | 22 --- include/linux/pci.h |7 - 4 files changed, 37 insertions(+), 78

[PATCH RFC v2 11/29] PCI/MSI: Convert pci_msix_table_size() to a public interface

2013-10-19 Thread Alexander Gordeev
. use that number in a following call to pci_enable_msix() interface. Signed-off-by: Alexander Gordeev --- Documentation/PCI/MSI-HOWTO.txt | 13 + drivers/pci/msi.c |5 - drivers/pci/pcie/portdrv_core.c |5 +++-- include/linux/pci.h |2 +- 4

[PATCH RFC v2 00/29] Introduce pcim_enable_msi*() family helpers

2013-10-19 Thread Alexander Gordeev
could be found in "pci-next-msi-v2" branch in repo: https://github.com/a-gordeev/linux.git Alexander Gordeev (29): PCI/MSI/s390: Fix single MSI only check PCI/MSI/s390: Remove superfluous check of MSI type PCI/MSI/pSeries: Fix wrong error code reporting PCI/MSI/pSeries: Make quota

[PATCH RFC v2 09/29] PCI/MSI: Factor out pci_get_msi_cap() interface

2013-10-19 Thread Alexander Gordeev
Device drivers can use this interface to obtain maximum number of MSI interrupts the device supports and use that number i.e. in a following call to pci_enable_msi_block() interface. Signed-off-by: Alexander Gordeev --- Documentation/PCI/MSI-HOWTO.txt | 15 +++ drivers/pci/msi.c

[PATCH RFC v2 04/29] PCI/MSI/pSeries: Make quota traversing and requesting race-safe

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- arch/powerpc/platforms/pseries/msi.c | 24 ++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 009ec73..0e1d288 100644 --- a/arch/powerpc

[PATCH RFC v2 08/29] PCI/MSI: Make pci_enable_msix() 'nvec' argument unsigned int

2013-10-18 Thread Alexander Gordeev
Make pci_enable_msix() and pci_enable_msi_block() consistent with regard to the type of 'nvec' argument. Indeed, a number of vectors to allocate is a natural value, so make it unsigned. Signed-off-by: Alexander Gordeev --- Documentation/PCI/MSI-HOWTO.txt |3 ++- drivers

[PATCH RFC v2 20/29] qib: Make use of pcim_enable_msix() and pci_msix_table_size() interfaces

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/infiniband/hw/qib/qib_pcie.c | 48 +- 1 files changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c index 3f14009..bad0ca3 100644 --- a

[PATCH RFC v2 16/29] ixgbevf: Make use of pcim_enable_msix_range() interface

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 33 +++- 1 files changed, 12 insertions(+), 21 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index

[PATCH RFC v2 14/29] ipr: Make use of pcim_enable_msi/msix() interfaces

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/scsi/ipr.c | 47 ++- 1 files changed, 18 insertions(+), 29 deletions(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index fb57e21..d7c94d5 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c

[PATCH RFC v2 19/29] ntb: Make use of pcim_enable_msix/msix_exact() interfaces

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/ntb/ntb_hw.c | 38 +- 1 files changed, 13 insertions(+), 25 deletions(-) diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c index de2062c..b7d6eed 100644 --- a/drivers/ntb/ntb_hw.c +++ b/drivers/ntb

[PATCH RFC v2 29/29] vmxnet3: Make use of pcim_enable_msix_range() interface

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/vmxnet3/vmxnet3_drv.c | 40 +--- 1 files changed, 10 insertions(+), 30 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index d33802c..e552d2b 100644 --- a/drivers

[PATCH RFC v2 21/29] qla2xxx: Make use of pcim_enable_msix_range() interface

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/scsi/qla2xxx/qla_isr.c | 28 1 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index df1b30b..3238a0ac 100644 --- a/drivers/scsi/qla2xxx

[PATCH RFC v2 15/29] ixgbe: Make use of pcim_enable_msix_range() interface

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 16 1 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c index 90b4e10..9954b7a 100644

[PATCH RFC v2 28/29] vmxnet3: Limit number of rx queues to 1 if per-queue MSI-Xs failed

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/vmxnet3/vmxnet3_drv.c | 18 -- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 3df7f32..d33802c 100644 --- a/drivers/net/vmxnet3

[PATCH RFC v2 23/29] qlge: Make use of pcim_enable_msix() interface

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 15 --- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c index ac54cb0..b142902 100644

[PATCH RFC v2 05/29] PCI/MSI: Fix return value when populate_msi_sysfs() failed

2013-10-18 Thread Alexander Gordeev
If populate_msi_sysfs() function failed msix_capability_init() must return the error code, but it returns the success instead. This update fixes the described misbehaviour. Signed-off-by: Alexander Gordeev --- drivers/pci/msi.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions

[PATCH RFC v2 06/29] PCI/MSI: Get rid of useless count of msi_desc leftovers

2013-10-18 Thread Alexander Gordeev
-off-by: Alexander Gordeev --- drivers/pci/msi.c | 19 +-- 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index b43f391..bbe3d3d 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -719,7 +719,7 @@ static int

[PATCH RFC v2 17/29] megaraid: Make use of pcim_enable_msix() interface

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/scsi/megaraid/megaraid_sas_base.c | 16 +--- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 3020921..e54c2e7 100644 --- a

[PATCH RFC v2 27/29] vmxnet3: Return -ENOSPC when not enough MSI-X vectors available

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/vmxnet3/vmxnet3_drv.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 3518173..3df7f32 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c

[PATCH RFC v2 07/29] PCI/MSI: Return -ENOSYS for unimplemented interfaces, not -1

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev Suggested-by: Ben Hutchings --- include/linux/pci.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index d3a888a..5cfe54c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h

[PATCH RFC v2 13/29] ipr: Do not call pci_disable_msi/msix() if pci_enable_msi/msix() failed

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/scsi/ipr.c |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 36ac1c3..fb57e21 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -9255,10 +9255,8 @@ static int

[PATCH RFC v2 18/29] ntb: Fix missed call to pci_enable_msix()

2013-10-18 Thread Alexander Gordeev
Current MSI-X enablement code assumes MSI-Xs were successfully allocated in case less than requested vectors were available. That assumption is wrong, since MSI-Xs should be enabled with a repeated call to pci_enable_msix(). This update fixes this. Signed-off-by: Alexander Gordeev Acked-by: Jon

[PATCH RFC v2 24/29] tg3: Make use of pcim_enable_msix() interface

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/ethernet/broadcom/tg3.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 12d961c..026c371 100644 --- a/drivers/net/ethernet/broadcom/tg3

[PATCH RFC v2 01/29] PCI/MSI/s390: Fix single MSI only check

2013-10-18 Thread Alexander Gordeev
Multiple MSIs have never been supported on s390 architecture, but the platform code fails to report single MSI only. Signed-off-by: Alexander Gordeev Acked-by: Martin Schwidefsky --- arch/s390/pci/pci.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/s390/pci

[PATCH RFC v2 02/29] PCI/MSI/s390: Remove superfluous check of MSI type

2013-10-18 Thread Alexander Gordeev
arch_setup_msi_irqs() hook can only be called from the generic MSI code which ensures correct MSI type parameter. Signed-off-by: Alexander Gordeev Acked-by: Martin Schwidefsky --- arch/s390/pci/pci.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/s390/pci/pci.c

[PATCH RFC v2 22/29] qlge: Get rid of an redundant assignment

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/ethernet/qlogic/qlge/qlge_main.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c index 2553cf4..ac54cb0 100644 --- a/drivers/net

[PATCH RFC v2 25/29] vmxnet3: Return -EINVAL if number of requested MSI-Xs is not enough

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/vmxnet3/vmxnet3_drv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 7e2788c..5b8ea71 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b

[PATCH RFC v2 03/29] PCI/MSI/pSeries: Fix wrong error code reporting

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- arch/powerpc/platforms/pseries/msi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 6d2f0ab..009ec73 100644 --- a/arch/powerpc/platforms/pseries

[PATCH RFC v2 26/29] vmxnet3: Fixup a weird loop exit

2013-10-18 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/vmxnet3/vmxnet3_drv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 5b8ea71..3518173 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-15 Thread Alexander Gordeev
_enable_msix() fails. Could you please explain why the value returned by pci_get_msix_limit() might change before pci_enable_msix() returned, while both protected by pci_lock_msi()? Anyway, although the loop-free code (IMHO) reads better, pci_lock_msi() it is not a part of the original pro

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-11 Thread Alexander Gordeev
ddown_pow_of_two(nvec); /* (a) */ xx_prep_for_msix_vectors(dev, nvec); rc = pci_enable_msix(dev->pdev, dev->irqs, nvec); /* (b) */ if (rc < 0) goto err; pci_unlock_msi(dev->pdev); dev->num_vectors = nvec; /*

Re: scsi-mq updated to latest linux-block/new-queue

2013-10-10 Thread Alexander Gordeev
h applied will fail. Yep, makes sense. Thanks for pointing out. -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.o

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-10 Thread Alexander Gordeev
On Thu, Oct 10, 2013 at 09:28:27AM -0700, H. Peter Anvin wrote: > On 10/10/2013 03:17 AM, Alexander Gordeev wrote: > > On Wed, Oct 09, 2013 at 03:24:08PM +1100, Benjamin Herrenschmidt wrote: > > > > Ok, this suggestion sounded in one or another form by several people. &

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-10 Thread Alexander Gordeev
eturn value seems odd, but I can not help to make it consistent with the first two. (Sorry if you see this message twice - my MUA seems struggle with one of CC). > Cheers, > Ben. > > -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the

Re: scsi-mq updated to latest linux-block/new-queue

2013-10-09 Thread Alexander Gordeev
ches to include in your tree? I would suggest to consider this one https://lkml.org/lkml/2013/8/9/90 if it fits. -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.ke

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-09 Thread Alexander Gordeev
the quota getting increased inbetween? That would entail.. kind of pci_get_msi_limit() :), but IMHO it is not worth it. > tejun -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord..

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-08 Thread Alexander Gordeev
t is available and try to allocate with than number. -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-08 Thread Alexander Gordeev
w pci_enable_msix() then we could first update pci/msi, then drivers (in few stages possibly) and finally remove the old implementation. > tejun -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH RFC 05/77] PCI/MSI: Convert pci_msix_table_size() to a public interface

2013-10-08 Thread Alexander Gordeev
On Mon, Oct 07, 2013 at 02:10:43PM -0400, Tejun Heo wrote: > On Wed, Oct 02, 2013 at 12:48:21PM +0200, Alexander Gordeev wrote: > > Make pci_msix_table_size() to return a error code if the device > > does not support MSI-X. This update is needed to facilitate a > > forthcomin

Re: [PATCH RFC 07/77] PCI/MSI: Re-design MSI/MSI-X interrupts enablement pattern

2013-10-08 Thread Alexander Gordeev
On Mon, Oct 07, 2013 at 02:17:49PM -0400, Tejun Heo wrote: > Hello, > > On Wed, Oct 02, 2013 at 12:48:23PM +0200, Alexander Gordeev wrote: > > +static int foo_driver_enable_msi(struct foo_adapter *adapter, int nvec) > > +{ > > + rc = pci_get_msi_cap(adapter

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-08 Thread Alexander Gordeev
On Tue, Oct 08, 2013 at 03:33:30PM +1100, Michael Ellerman wrote: > On Wed, Oct 02, 2013 at 12:29:04PM +0200, Alexander Gordeev wrote: > > This technique proved to be confusing and error-prone. Vast share > > of device drivers simply fail to follow the described guidelines. >

Re: [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt

2013-10-07 Thread Alexander Gordeev
On Mon, Oct 07, 2013 at 09:50:57AM -0700, Jon Mason wrote: > On Sat, Oct 05, 2013 at 11:43:04PM +0200, Alexander Gordeev wrote: > > On Wed, Oct 02, 2013 at 05:48:05PM -0700, Jon Mason wrote: > > > On Wed, Oct 02, 2013 at 12:49:10PM +0200, Alexander Gordeev wrote: > > >

Re: [PATCH RESEND 0/1] AHCI: Optimize interrupt processing

2013-10-07 Thread Alexander Gordeev
in interrupt [ 181.185483] drm_kms_helper: panic occurred, switching back to text console -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-06 Thread Alexander Gordeev
On Sun, Oct 06, 2013 at 05:19:46PM +1100, Benjamin Herrenschmidt wrote: > On Sun, 2013-10-06 at 08:02 +0200, Alexander Gordeev wrote: > > In fact, in the current design to address the quota race decently the > > drivers would have to protect the *loop* to prevent the quota chang

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-05 Thread Alexander Gordeev
On Sun, Oct 06, 2013 at 08:46:26AM +1100, Benjamin Herrenschmidt wrote: > On Sat, 2013-10-05 at 16:20 +0200, Alexander Gordeev wrote: > > So my point is - drivers should first obtain a number of MSIs they *can* > > get, then *derive* a number of MSIs the device is fine wit

Re: [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt

2013-10-05 Thread Alexander Gordeev
On Wed, Oct 02, 2013 at 05:48:05PM -0700, Jon Mason wrote: > On Wed, Oct 02, 2013 at 12:49:10PM +0200, Alexander Gordeev wrote: > > Signed-off-by: Alexander Gordeev > > --- > > drivers/ntb/ntb_hw.c |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > &

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-05 Thread Alexander Gordeev
On Fri, Oct 04, 2013 at 10:29:16PM +0100, Ben Hutchings wrote: > On Fri, 2013-10-04 at 10:29 +0200, Alexander Gordeev wrote: > All I can see there is that Tejun didn't think that the global limits > and positive return values were implemented by any architecture. I would say more

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-04 Thread Alexander Gordeev
pci_enable_msix(nvec2) where nvec1 < nvec2? > David -- Regards, Alexander Gordeev agord...@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.o

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-04 Thread Alexander Gordeev
On Thu, Oct 03, 2013 at 11:49:45PM +0100, Ben Hutchings wrote: > On Wed, 2013-10-02 at 12:48 +0200, Alexander Gordeev wrote: > > This update converts pci_enable_msix() and pci_enable_msi_block() > > interfaces to canonical kernel functions and makes them return a > > error co

Re: [PATCH RFC 06/77] PCI/MSI: Factor out pci_get_msi_cap() interface

2013-10-03 Thread Alexander Gordeev
On Thu, Oct 03, 2013 at 10:52:54PM +0100, Ben Hutchings wrote: > On Wed, 2013-10-02 at 12:48 +0200, Alexander Gordeev wrote: > > #ifndef CONFIG_PCI_MSI > > +static inline int pci_get_msi_cap(struct pci_dev *dev) > > +{ > > + return -1; > [...] > > Shouldn&#

Re: [PATCH RFC 34/77] ioat: Update MSI/MSI-X interrupts enablement code

2013-10-03 Thread Alexander Gordeev
le_msix() will never return a positive value. Therefore if the driver is not updated it will fallback to single MSI if device->common.chancnt MSI-X vectors were not allocated while it used to fallback to a single MSI-X in the same situation. Not to mention 'if (err > 0)' dead code.

Re: [PATCH RFC 50/77] mlx5: Update MSI/MSI-X interrupts enablement code

2013-10-03 Thread Alexander Gordeev
On Thu, Oct 03, 2013 at 10:14:33AM +0300, Eli Cohen wrote: > On Wed, Oct 02, 2013 at 12:49:06PM +0200, Alexander Gordeev wrote: > > > > + err = pci_msix_table_size(dev->pdev); > > + if (err < 0) > > + return err; > > + > >

[PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed

2013-10-02 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/pci/msi.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index d5f90d6..b43f391 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -719,7 +719,7 @@ static int

[PATCH RFC 44/77] lpfc: Make MSI-X initialization routine more readable

2013-10-02 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/scsi/lpfc/lpfc_init.c | 23 +++ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 0ec8008..0cfaf20 100644 --- a/drivers/scsi/lpfc/lpfc_init.c

[PATCH RFC 58/77] qib: Update MSI/MSI-X interrupts enablement code

2013-10-02 Thread Alexander Gordeev
As result of recent re-design of the MSI/MSI-X interrupts enabling pattern this driver has to be updated to use the new technique to obtain a optimal number of MSI/MSI-X interrupts required. Signed-off-by: Alexander Gordeev --- drivers/infiniband/hw/qib/qib_pcie.c |4 1 files changed

[PATCH RFC 34/77] ioat: Update MSI/MSI-X interrupts enablement code

2013-10-02 Thread Alexander Gordeev
As result of recent re-design of the MSI/MSI-X interrupts enabling pattern this driver has to be updated to use the new technique to obtain a optimal number of MSI/MSI-X interrupts required. Signed-off-by: Alexander Gordeev --- drivers/dma/ioat/dma.c | 10 +++--- 1 files changed, 7

[PATCH RFC 11/77] benet: Return -ENOSPC when not enough MSI-Xs available

2013-10-02 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/ethernet/emulex/benet/be_main.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 100b528..3e2c834 100644 --- a/drivers/net

[PATCH RFC 07/77] PCI/MSI: Re-design MSI/MSI-X interrupts enablement pattern

2013-10-02 Thread Alexander Gordeev
pci_msix_table_size() for MSI-X. More complex cases would entail matching device capabilities with the system environment, i.e. limiting number of hardware queues (and hence associated MSI/MSI-X interrupts) to the number of online CPUs. Suggested-by: Tejun Heo Signed-off-by: Alexander Gordeev

[PATCH RFC 74/77] vmxnet3: Limit number of rx queues to 1 if per-queue MSI-Xs failed

2013-10-02 Thread Alexander Gordeev
Signed-off-by: Alexander Gordeev --- drivers/net/vmxnet3/vmxnet3_drv.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 3df7f32..00dc0d0 100644 --- a/drivers/net/vmxnet3

<    4   5   6   7   8   9   10   11   12   >