diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2010-03-03 20:42:11 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-03-04 04:59:46 -0500 |
commit | 4c147dd81966bd4ba7f026476237ba67ea72d5d9 (patch) | |
tree | a01ed5dfc849dd166e3b1d1950d286ff2db10a42 /drivers | |
parent | fac829fdcaf451a20106cbc468ff886466320956 (diff) |
[SCSI] bfa: Added separate MSI-X module parameters.
Added separate MSI-X module parameters to selectively
enable / disable MSI-X interrupts for both Brocade HBA and CNA's.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/bfa/bfad_attr.c | 3 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfad_intr.c | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c index 9129ae3040ff..adf801dbfa15 100644 --- a/drivers/scsi/bfa/bfad_attr.c +++ b/drivers/scsi/bfa/bfad_attr.c | |||
@@ -229,7 +229,9 @@ bfad_im_get_host_speed(struct Scsi_Host *shost) | |||
229 | (struct bfad_im_port_s *) shost->hostdata[0]; | 229 | (struct bfad_im_port_s *) shost->hostdata[0]; |
230 | struct bfad_s *bfad = im_port->bfad; | 230 | struct bfad_s *bfad = im_port->bfad; |
231 | struct bfa_pport_attr_s attr; | 231 | struct bfa_pport_attr_s attr; |
232 | unsigned long flags; | ||
232 | 233 | ||
234 | spin_lock_irqsave(shost->host_lock, flags); | ||
233 | bfa_pport_get_attr(&bfad->bfa, &attr); | 235 | bfa_pport_get_attr(&bfad->bfa, &attr); |
234 | switch (attr.speed) { | 236 | switch (attr.speed) { |
235 | case BFA_PPORT_SPEED_8GBPS: | 237 | case BFA_PPORT_SPEED_8GBPS: |
@@ -248,6 +250,7 @@ bfad_im_get_host_speed(struct Scsi_Host *shost) | |||
248 | fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN; | 250 | fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN; |
249 | break; | 251 | break; |
250 | } | 252 | } |
253 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
251 | } | 254 | } |
252 | 255 | ||
253 | /** | 256 | /** |
diff --git a/drivers/scsi/bfa/bfad_intr.c b/drivers/scsi/bfa/bfad_intr.c index 7de8832f6fee..2b7dbecbebca 100644 --- a/drivers/scsi/bfa/bfad_intr.c +++ b/drivers/scsi/bfa/bfad_intr.c | |||
@@ -23,8 +23,10 @@ BFA_TRC_FILE(LDRV, INTR); | |||
23 | /** | 23 | /** |
24 | * bfa_isr BFA driver interrupt functions | 24 | * bfa_isr BFA driver interrupt functions |
25 | */ | 25 | */ |
26 | static int msix_disable; | 26 | static int msix_disable_cb; |
27 | module_param(msix_disable, int, S_IRUGO | S_IWUSR); | 27 | static int msix_disable_ct; |
28 | module_param(msix_disable_cb, int, S_IRUGO | S_IWUSR); | ||
29 | module_param(msix_disable_ct, int, S_IRUGO | S_IWUSR); | ||
28 | /** | 30 | /** |
29 | * Line based interrupt handler. | 31 | * Line based interrupt handler. |
30 | */ | 32 | */ |
@@ -141,6 +143,7 @@ bfad_setup_intr(struct bfad_s *bfad) | |||
141 | int error = 0; | 143 | int error = 0; |
142 | u32 mask = 0, i, num_bit = 0, max_bit = 0; | 144 | u32 mask = 0, i, num_bit = 0, max_bit = 0; |
143 | struct msix_entry msix_entries[MAX_MSIX_ENTRY]; | 145 | struct msix_entry msix_entries[MAX_MSIX_ENTRY]; |
146 | struct pci_dev *pdev = bfad->pcidev; | ||
144 | 147 | ||
145 | /* Call BFA to get the msix map for this PCI function. */ | 148 | /* Call BFA to get the msix map for this PCI function. */ |
146 | bfa_msix_getvecs(&bfad->bfa, &mask, &num_bit, &max_bit); | 149 | bfa_msix_getvecs(&bfad->bfa, &mask, &num_bit, &max_bit); |
@@ -148,7 +151,9 @@ bfad_setup_intr(struct bfad_s *bfad) | |||
148 | /* Set up the msix entry table */ | 151 | /* Set up the msix entry table */ |
149 | bfad_init_msix_entry(bfad, msix_entries, mask, max_bit); | 152 | bfad_init_msix_entry(bfad, msix_entries, mask, max_bit); |
150 | 153 | ||
151 | if (!msix_disable) { | 154 | if ((pdev->device == BFA_PCI_DEVICE_ID_CT && !msix_disable_ct) || |
155 | (pdev->device != BFA_PCI_DEVICE_ID_CT && !msix_disable_cb)) { | ||
156 | |||
152 | error = pci_enable_msix(bfad->pcidev, msix_entries, bfad->nvec); | 157 | error = pci_enable_msix(bfad->pcidev, msix_entries, bfad->nvec); |
153 | if (error) { | 158 | if (error) { |
154 | /* | 159 | /* |