summary refs log tree commit diff
path: root/drivers/scsi/be2iscsi/be_main.h
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2011-08-24 16:05:30 -0700
committerJames Bottomley <JBottomley@Parallels.com>2011-08-29 00:16:17 -0700
commit8fcfb21073ea4f4261c8ee3ccd2fde8e281a4f28 (patch)
treede2eaebef137a95dcef0dc153531a53f6d0d53c0 /drivers/scsi/be2iscsi/be_main.h
parente5fdae5583e30bbc730e2035d0b6da33e7d8e4ee (diff)
downloadlinux-8fcfb21073ea4f4261c8ee3ccd2fde8e281a4f28.tar.gz
[SCSI] be2iscsi: Fixing the /proc/interrupts problem V3
Fix be2iscsi driver to use a separate pointer for each irq action->name
field and avoid display corruption in /proc/interrupts. The be2iscsi driver
was using a single static array in a function for the irq action->name field.
This results in garbage output from  /proc/interrupts

The pointer for action->name is garbage and scribbles the output on the screen.

This patch fixes the problem:

156:          0          0          0          0          0          0
0          0          0          0          0          0          0
0          0          0          0          0          0          0
0          0          0          0       PCI-MSI-X  beiscsi_msix_0017

This patch is based on Prarit's patch here:
http://www.spinics.net/lists/linux-scsi/msg52325.html
but I have fixed up the failure paths and removed
redundant check for !i suggested by Eike.

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.h')
-rw-r--r--drivers/scsi/be2iscsi/be_main.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index 5ce5170254ca..be0e0bd6f0ed 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;