* [PATCH 2/2] be2iscsi: Fixing the /proc/interrupts problem V3
[not found] <1310490756-2210-1-git-send-email-jayamohan.kallickal@emulex.com>
@ 2011-07-12 17:12 ` jayamohan.kallickal
2011-07-12 17:21 ` James Bottomley
2011-07-12 17:12 ` be2iscsi: Patches for inclusion jayamohan.kallickal
1 sibling, 1 reply; 4+ messages in thread
From: jayamohan.kallickal @ 2011-07-12 17:12 UTC (permalink / raw)
To: linux-scsi, James.Bottomley, michaelc
Cc: Jayamohan Kallickal, Prarit Bhargava
From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
This patch is based on one by Prarit Bhargava. I have made minor
changes. Also, removed the redundant check for i == 0 and adding changelog as suggested
by Rolf.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Jayamohan Kallickal <jayamohan,kallickal@emulex.com>
---
drivers/scsi/be2iscsi/be_main.c | 33 +++++++++++++++++++++++++--------
drivers/scsi/be2iscsi/be_main.h | 3 +++
2 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 97c134a..a8a80e4 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -822,33 +822,46 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
struct hwi_controller *phwi_ctrlr;
struct hwi_context_memory *phwi_context;
int ret, msix_vec, i, j;
- char desc[32];
phwi_ctrlr = phba->phwi_ctrlr;
phwi_context = phwi_ctrlr->phwi_ctxt;
if (phba->msix_enabled) {
for (i = 0; i < phba->num_cpus; i++) {
- sprintf(desc, "beiscsi_msix_%04x", i);
+ phba->msi_name[i] = kzalloc(BEISCSI_MSI_NAME, GFP_KERNEL);
+ if (!phba->msi_name[i]) {
+ ret = -ENOMEM;
+ goto free_msix_irqs;
+ }
+
+ sprintf(phba->msi_name[i], "beiscsi_%02x_%02x",
+ phba->shost->host_no, i);
msix_vec = phba->msix_entries[i].vector;
- ret = request_irq(msix_vec, be_isr_msix, 0, desc,
+ ret = request_irq(msix_vec, be_isr_msix, 0,
+ phba->msi_name[i],
&phwi_context->be_eq[i]);
if (ret) {
shost_printk(KERN_ERR, phba->shost,
"beiscsi_init_irqs-Failed to"
"register msix for i = %d\n", i);
- if (!i)
- return ret;
+ kfree(phba->msi_name[i]);
goto free_msix_irqs;
}
}
+ phba->msi_name[i] = kzalloc(BEISCSI_MSI_NAME, GFP_KERNEL);
+ if (!phba->msi_name[i]) {
+ ret = -ENOMEM;
+ goto free_msix_irqs;
+ }
+ sprintf(phba->msi_name[i], "beiscsi_mcc_%02x",
+ phba->shost->host_no);
msix_vec = phba->msix_entries[i].vector;
- ret = request_irq(msix_vec, be_isr_mcc, 0, "beiscsi_msix_mcc",
+ ret = request_irq(msix_vec, be_isr_mcc, 0, phba->msi_name[i],
&phwi_context->be_eq[i]);
if (ret) {
shost_printk(KERN_ERR, phba->shost, "beiscsi_init_irqs-"
"Failed to register beiscsi_msix_mcc\n");
- i++;
+ kfree(phba->msi_name[i]);
goto free_msix_irqs;
}
@@ -863,8 +876,11 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
}
return 0;
free_msix_irqs:
- for (j = i - 1; j == 0; j++)
+ for (j = i - 1; j >= 0; j--) {
+ kfree(phba->msi_name[j]);
+ msix_vec = phba->msix_entries[j].vector;
free_irq(msix_vec, &phwi_context->be_eq[j]);
+ }
return ret;
}
@@ -4125,6 +4141,7 @@ static void beiscsi_remove(struct pci_dev *pcidev)
for (i = 0; i <= phba->num_cpus; i++) {
msix_vec = phba->msix_entries[i].vector;
free_irq(msix_vec, &phwi_context->be_eq[i]);
+ kfree(phba->msi_name[i]);
}
} else
if (phba->pcidev->irq)
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index 4677de9..7b6578e 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -162,6 +162,8 @@ do { \
#define PAGES_REQUIRED(x) \
((x < PAGE_SIZE) ? 1 : ((x + PAGE_SIZE - 1) / PAGE_SIZE))
+#define BEISCSI_MSI_NAME 20 /* size of msi_name string */
+
enum be_mem_enum {
HWI_MEM_ADDN_CONTEXT,
HWI_MEM_WRB,
@@ -287,6 +289,7 @@ struct beiscsi_hba {
unsigned int num_cpus;
unsigned int nxt_cqid;
struct msix_entry msix_entries[MAX_CPUS + 1];
+ char *msi_name[MAX_CPUS + 1];
bool msix_enabled;
struct be_mem_descriptor *init_mem;
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* be2iscsi: Patches for inclusion
[not found] <1310490756-2210-1-git-send-email-jayamohan.kallickal@emulex.com>
2011-07-12 17:12 ` [PATCH 2/2] be2iscsi: Fixing the /proc/interrupts problem V3 jayamohan.kallickal
@ 2011-07-12 17:12 ` jayamohan.kallickal
1 sibling, 0 replies; 4+ messages in thread
From: jayamohan.kallickal @ 2011-07-12 17:12 UTC (permalink / raw)
To: linux-scsi, James.Bottomley, michaelc; +Cc: Jayamohan Kallickal
From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Hi
These set of patches have been made on
latest scsi-misc tree pulled today.
0001 Adding a Shutdown routine
0002 Fixing the /proc/interrupts corruption
Changelog:
- Added shutdown routine
- Fix for the /proc/interrupts corruption issue
Thanks
Jayamohan Kallickal
Signed off by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] be2iscsi: Fixing the /proc/interrupts problem V3
2011-07-12 17:12 ` [PATCH 2/2] be2iscsi: Fixing the /proc/interrupts problem V3 jayamohan.kallickal
@ 2011-07-12 17:21 ` James Bottomley
2011-07-12 19:24 ` Rolf Eike Beer
0 siblings, 1 reply; 4+ messages in thread
From: James Bottomley @ 2011-07-12 17:21 UTC (permalink / raw)
To: jayamohan.kallickal; +Cc: linux-scsi, michaelc, Prarit Bhargava
On Tue, 2011-07-12 at 10:12 -0700, jayamohan.kallickal@emulex.com wrote:
> From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
>
> This patch is based on one by Prarit Bhargava. I have made minor
> changes. Also, removed the redundant check for i == 0 and adding changelog as suggested
> by Rolf.
This changelog doesn't actually say what the patch does. From the
description, it sounds like a stable candidate, but I can't really tell.
Please send an actual description including what the problem was and
what was done to fix it. What's above can be the last paragraph
recording the patch history.
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] be2iscsi: Fixing the /proc/interrupts problem V3
2011-07-12 17:21 ` James Bottomley
@ 2011-07-12 19:24 ` Rolf Eike Beer
0 siblings, 0 replies; 4+ messages in thread
From: Rolf Eike Beer @ 2011-07-12 19:24 UTC (permalink / raw)
To: James Bottomley
Cc: jayamohan.kallickal, linux-scsi, michaelc, Prarit Bhargava
[-- Attachment #1: Type: Text/Plain, Size: 776 bytes --]
Am Dienstag 12 Juli 2011, 19:21:52 schrieb James Bottomley:
> On Tue, 2011-07-12 at 10:12 -0700, jayamohan.kallickal@emulex.com wrote:
> > From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
> >
> > This patch is based on one by Prarit Bhargava. I have made minor
> > changes. Also, removed the redundant check for i == 0 and adding
> > changelog as suggested by Rolf.
>
> This changelog doesn't actually say what the patch does. From the
> description, it sounds like a stable candidate, but I can't really tell.
>
> Please send an actual description including what the problem was and
> what was done to fix it. What's above can be the last paragraph
> recording the patch history.
When you change the text anyway write "Eike".
Thx,
Eike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-12 19:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1310490756-2210-1-git-send-email-jayamohan.kallickal@emulex.com>
2011-07-12 17:12 ` [PATCH 2/2] be2iscsi: Fixing the /proc/interrupts problem V3 jayamohan.kallickal
2011-07-12 17:21 ` James Bottomley
2011-07-12 19:24 ` Rolf Eike Beer
2011-07-12 17:12 ` be2iscsi: Patches for inclusion jayamohan.kallickal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox