]> git.proxmox.com Git - pve-kernel-jessie.git/blob - 0008-aacraid-use-pci-enable-msix-range.patch
update spl/zfs to 0.6.5.4
[pve-kernel-jessie.git] / 0008-aacraid-use-pci-enable-msix-range.patch
1 From 84859c926b0828b07b2c3dd66a440ef4120a8668 Mon Sep 17 00:00:00 2001
2 From: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
3 Date: Fri, 28 Aug 2015 06:38:40 -0400
4 Subject: aacraid: Use pci_enable_msix_range()
5
6 As pci_enable_msix() deprecated, replaced with pci_enable_msix_range()
7
8 Reviewed-by: Tomas Henzl <thenzl@redhat.com>
9 Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com>
10 Reviewed-by: Karthikeya Sunkesula <Karthikeya.Sunkesula@pmcs.com>
11 Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
12 Signed-off-by: James Bottomley <JBottomley@Odin.com>
13 ---
14 drivers/scsi/aacraid/aacraid.h | 2 +-
15 drivers/scsi/aacraid/comminit.c | 20 ++++++--------------
16 2 files changed, 7 insertions(+), 15 deletions(-)
17
18 diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
19 index 7b95227..2de5ebc 100644
20 --- a/drivers/scsi/aacraid/aacraid.h
21 +++ b/drivers/scsi/aacraid/aacraid.h
22 @@ -12,7 +12,7 @@
23 * D E F I N E S
24 *----------------------------------------------------------------------------*/
25
26 -#define AAC_MAX_MSIX 8 /* vectors */
27 +#define AAC_MAX_MSIX 32 /* vectors */
28 #define AAC_PCI_MSI_ENABLE 0x8000
29
30 enum {
31 diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
32 index b4b6088..0e954e3 100644
33 --- a/drivers/scsi/aacraid/comminit.c
34 +++ b/drivers/scsi/aacraid/comminit.c
35 @@ -338,7 +338,7 @@ static int aac_comm_init(struct aac_dev * dev)
36
37 void aac_define_int_mode(struct aac_dev *dev)
38 {
39 - int i, msi_count;
40 + int i, msi_count, min_msix;
41
42 msi_count = i = 0;
43 /* max. vectors from GET_COMM_PREFERRED_SETTINGS */
44 @@ -366,22 +366,14 @@ void aac_define_int_mode(struct aac_dev *dev)
45
46 if (msi_count > 1 &&
47 pci_find_capability(dev->pdev, PCI_CAP_ID_MSIX)) {
48 - i = pci_enable_msix(dev->pdev,
49 + min_msix = 2;
50 + i = pci_enable_msix_range(dev->pdev,
51 dev->msixentry,
52 + min_msix,
53 msi_count);
54 - /* Check how many MSIX vectors are allocated */
55 - if (i >= 0) {
56 + if (i > 0) {
57 dev->msi_enabled = 1;
58 - if (i) {
59 - msi_count = i;
60 - if (pci_enable_msix(dev->pdev,
61 - dev->msixentry,
62 - msi_count)) {
63 - dev->msi_enabled = 0;
64 - printk(KERN_ERR "%s%d: MSIX not supported!! Will try MSI 0x%x.\n",
65 - dev->name, dev->id, i);
66 - }
67 - }
68 + msi_count = i;
69 } else {
70 dev->msi_enabled = 0;
71 printk(KERN_ERR "%s%d: MSIX not supported!! Will try MSI 0x%x.\n",
72 --
73 cgit v0.11.2
74