diff options
author | Robert Elliott <elliott@hp.com> | 2015-01-23 17:41:40 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2015-02-02 12:57:36 -0500 |
commit | ec501a18637d04a7ee78a1754817f57125552fd6 (patch) | |
tree | eb59a3ae64ac6ac731b01db35e9872a4e233d743 /drivers/scsi/hpsa.c | |
parent | f2ef0ce712828e368b0303219d7bd70063481c16 (diff) |
hpsa: rename free_irqs to hpsa_free_irqs
Change the function names to have hpsa prefix.
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r-- | drivers/scsi/hpsa.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 4252b639bc74..dc81d8851645 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -6491,6 +6491,25 @@ static void hpsa_irq_affinity_hints(struct ctlr_info *h) | |||
6491 | } | 6491 | } |
6492 | } | 6492 | } |
6493 | 6493 | ||
6494 | /* clear affinity hints and free MSI-X, MSI, or legacy INTx vectors */ | ||
6495 | static void hpsa_free_irqs(struct ctlr_info *h) | ||
6496 | { | ||
6497 | int i; | ||
6498 | |||
6499 | if (!h->msix_vector || h->intr_mode != PERF_MODE_INT) { | ||
6500 | /* Single reply queue, only one irq to free */ | ||
6501 | i = h->intr_mode; | ||
6502 | irq_set_affinity_hint(h->intr[i], NULL); | ||
6503 | free_irq(h->intr[i], &h->q[i]); | ||
6504 | return; | ||
6505 | } | ||
6506 | |||
6507 | for (i = 0; i < h->msix_vector; i++) { | ||
6508 | irq_set_affinity_hint(h->intr[i], NULL); | ||
6509 | free_irq(h->intr[i], &h->q[i]); | ||
6510 | } | ||
6511 | } | ||
6512 | |||
6494 | static int hpsa_request_irq(struct ctlr_info *h, | 6513 | static int hpsa_request_irq(struct ctlr_info *h, |
6495 | irqreturn_t (*msixhandler)(int, void *), | 6514 | irqreturn_t (*msixhandler)(int, void *), |
6496 | irqreturn_t (*intxhandler)(int, void *)) | 6515 | irqreturn_t (*intxhandler)(int, void *)) |
@@ -6555,27 +6574,9 @@ static int hpsa_kdump_soft_reset(struct ctlr_info *h) | |||
6555 | return 0; | 6574 | return 0; |
6556 | } | 6575 | } |
6557 | 6576 | ||
6558 | static void free_irqs(struct ctlr_info *h) | ||
6559 | { | ||
6560 | int i; | ||
6561 | |||
6562 | if (!h->msix_vector || h->intr_mode != PERF_MODE_INT) { | ||
6563 | /* Single reply queue, only one irq to free */ | ||
6564 | i = h->intr_mode; | ||
6565 | irq_set_affinity_hint(h->intr[i], NULL); | ||
6566 | free_irq(h->intr[i], &h->q[i]); | ||
6567 | return; | ||
6568 | } | ||
6569 | |||
6570 | for (i = 0; i < h->msix_vector; i++) { | ||
6571 | irq_set_affinity_hint(h->intr[i], NULL); | ||
6572 | free_irq(h->intr[i], &h->q[i]); | ||
6573 | } | ||
6574 | } | ||
6575 | |||
6576 | static void hpsa_free_irqs_and_disable_msix(struct ctlr_info *h) | 6577 | static void hpsa_free_irqs_and_disable_msix(struct ctlr_info *h) |
6577 | { | 6578 | { |
6578 | free_irqs(h); | 6579 | hpsa_free_irqs(h); |
6579 | #ifdef CONFIG_PCI_MSI | 6580 | #ifdef CONFIG_PCI_MSI |
6580 | if (h->msix_vector) { | 6581 | if (h->msix_vector) { |
6581 | if (h->pdev->msix_enabled) | 6582 | if (h->pdev->msix_enabled) |
@@ -6937,7 +6938,7 @@ reinit_after_soft_reset: | |||
6937 | spin_lock_irqsave(&h->lock, flags); | 6938 | spin_lock_irqsave(&h->lock, flags); |
6938 | h->access.set_intr_mask(h, HPSA_INTR_OFF); | 6939 | h->access.set_intr_mask(h, HPSA_INTR_OFF); |
6939 | spin_unlock_irqrestore(&h->lock, flags); | 6940 | spin_unlock_irqrestore(&h->lock, flags); |
6940 | free_irqs(h); | 6941 | hpsa_free_irqs(h); |
6941 | rc = hpsa_request_irq(h, hpsa_msix_discard_completions, | 6942 | rc = hpsa_request_irq(h, hpsa_msix_discard_completions, |
6942 | hpsa_intx_discard_completions); | 6943 | hpsa_intx_discard_completions); |
6943 | if (rc) { | 6944 | if (rc) { |
@@ -6997,7 +6998,7 @@ reinit_after_soft_reset: | |||
6997 | clean4: | 6998 | clean4: |
6998 | hpsa_free_sg_chain_blocks(h); | 6999 | hpsa_free_sg_chain_blocks(h); |
6999 | hpsa_free_cmd_pool(h); | 7000 | hpsa_free_cmd_pool(h); |
7000 | free_irqs(h); | 7001 | hpsa_free_irqs(h); |
7001 | clean2: | 7002 | clean2: |
7002 | clean1: | 7003 | clean1: |
7003 | if (h->lockup_detected) | 7004 | if (h->lockup_detected) |