Commit d7a297ba authored by Frederik Deweerdt's avatar Frederik Deweerdt Committed by Linus Torvalds

[PATCH] fix qla{2,4} build error

commit 0181944f adds a
'extended_error_logging' global variable to qla2xxx which is defined by
qla4xxx too.

Trying to build both drivers results in the following error:

  LD      drivers/scsi/built-in.o
  drivers/scsi/qla4xxx/built-in.o: In function `qla4xxx_slave_configure':
  drivers/scsi/qla4xxx/ql4_os.c:1433: multiple definition of `extended_error_logging'
  drivers/scsi/qla2xxx/built-in.o:drivers/scsi/qla2xxx/qla_os.c:2166:
  first defined here
  make[2]: *** [drivers/scsi/built-in.o] Error 1
  make[1]: *** [drivers/scsi] Error 2
  make: *** [drivers] Error 2

The following patch simply adds a qla2_ (qla4_ respectively) prefix to
the variable name.
Signed-off-by: default avatarFrederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d223a601
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
* Macros use for debugging the driver. * Macros use for debugging the driver.
*/ */
#define DEBUG(x) do { if (extended_error_logging) { x; } } while (0) #define DEBUG(x) do { if (qla2_extended_error_logging) { x; } } while (0)
#if defined(QL_DEBUG_LEVEL_1) #if defined(QL_DEBUG_LEVEL_1)
#define DEBUG1(x) do {x;} while (0) #define DEBUG1(x) do {x;} while (0)
...@@ -46,12 +46,12 @@ ...@@ -46,12 +46,12 @@
#define DEBUG1(x) do {} while (0) #define DEBUG1(x) do {} while (0)
#endif #endif
#define DEBUG2(x) do { if (extended_error_logging) { x; } } while (0) #define DEBUG2(x) do { if (qla2_extended_error_logging) { x; } } while (0)
#define DEBUG2_3(x) do { if (extended_error_logging) { x; } } while (0) #define DEBUG2_3(x) do { if (qla2_extended_error_logging) { x; } } while (0)
#define DEBUG2_3_11(x) do { if (extended_error_logging) { x; } } while (0) #define DEBUG2_3_11(x) do { if (qla2_extended_error_logging) { x; } } while (0)
#define DEBUG2_9_10(x) do { if (extended_error_logging) { x; } } while (0) #define DEBUG2_9_10(x) do { if (qla2_extended_error_logging) { x; } } while (0)
#define DEBUG2_11(x) do { if (extended_error_logging) { x; } } while (0) #define DEBUG2_11(x) do { if (qla2_extended_error_logging) { x; } } while (0)
#define DEBUG2_13(x) do { if (extended_error_logging) { x; } } while (0) #define DEBUG2_13(x) do { if (qla2_extended_error_logging) { x; } } while (0)
#if defined(QL_DEBUG_LEVEL_3) #if defined(QL_DEBUG_LEVEL_3)
#define DEBUG3(x) do {x;} while (0) #define DEBUG3(x) do {x;} while (0)
......
...@@ -60,7 +60,7 @@ extern int ql2xplogiabsentdevice; ...@@ -60,7 +60,7 @@ extern int ql2xplogiabsentdevice;
extern int ql2xloginretrycount; extern int ql2xloginretrycount;
extern int ql2xfdmienable; extern int ql2xfdmienable;
extern int ql2xallocfwdump; extern int ql2xallocfwdump;
extern int extended_error_logging; extern int qla2_extended_error_logging;
extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *);
......
...@@ -1644,7 +1644,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) ...@@ -1644,7 +1644,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
* Set host adapter parameters. * Set host adapter parameters.
*/ */
if (nv->host_p[0] & BIT_7) if (nv->host_p[0] & BIT_7)
extended_error_logging = 1; qla2_extended_error_logging = 1;
ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0);
/* Always load RISC code on non ISP2[12]00 chips. */ /* Always load RISC code on non ISP2[12]00 chips. */
if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) if (!IS_QLA2100(ha) && !IS_QLA2200(ha))
......
...@@ -61,9 +61,9 @@ MODULE_PARM_DESC(ql2xallocfwdump, ...@@ -61,9 +61,9 @@ MODULE_PARM_DESC(ql2xallocfwdump,
"during HBA initialization. Memory allocation requirements " "during HBA initialization. Memory allocation requirements "
"vary by ISP type. Default is 1 - allocate memory."); "vary by ISP type. Default is 1 - allocate memory.");
int extended_error_logging; int qla2_extended_error_logging;
module_param(extended_error_logging, int, S_IRUGO|S_IRUSR); module_param(qla2_extended_error_logging, int, S_IRUGO|S_IRUSR);
MODULE_PARM_DESC(extended_error_logging, MODULE_PARM_DESC(qla2_extended_error_logging,
"Option to enable extended error logging, " "Option to enable extended error logging, "
"Default is 0 - no logging. 1 - log errors."); "Default is 0 - no logging. 1 - log errors.");
...@@ -2697,7 +2697,7 @@ qla2x00_module_init(void) ...@@ -2697,7 +2697,7 @@ qla2x00_module_init(void)
/* Derive version string. */ /* Derive version string. */
strcpy(qla2x00_version_str, QLA2XXX_VERSION); strcpy(qla2x00_version_str, QLA2XXX_VERSION);
if (extended_error_logging) if (qla2_extended_error_logging)
strcat(qla2x00_version_str, "-debug"); strcat(qla2x00_version_str, "-debug");
qla2xxx_transport_template = qla2xxx_transport_template =
......
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
#endif #endif
#if defined(QL_DEBUG_LEVEL_2) #if defined(QL_DEBUG_LEVEL_2)
#define DEBUG2(x) do {if(extended_error_logging == 2) x;} while (0); #define DEBUG2(x) do {if(qla4_extended_error_logging == 2) x;} while (0);
#define DEBUG2_3(x) do {x;} while (0); #define DEBUG2_3(x) do {x;} while (0);
#else /* */ #else /* */
#define DEBUG2(x) do {} while (0); #define DEBUG2(x) do {} while (0);
#endif /* */ #endif /* */
#if defined(QL_DEBUG_LEVEL_3) #if defined(QL_DEBUG_LEVEL_3)
#define DEBUG3(x) do {if(extended_error_logging == 3) x;} while (0); #define DEBUG3(x) do {if(qla4_extended_error_logging == 3) x;} while (0);
#else /* */ #else /* */
#define DEBUG3(x) do {} while (0); #define DEBUG3(x) do {} while (0);
#if !defined(QL_DEBUG_LEVEL_2) #if !defined(QL_DEBUG_LEVEL_2)
......
...@@ -72,7 +72,7 @@ int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host * ha); ...@@ -72,7 +72,7 @@ int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host * ha);
int qla4xxx_process_ddb_changed(struct scsi_qla_host * ha, int qla4xxx_process_ddb_changed(struct scsi_qla_host * ha,
uint32_t fw_ddb_index, uint32_t state); uint32_t fw_ddb_index, uint32_t state);
extern int extended_error_logging; extern int qla4_extended_error_logging;
extern int ql4xdiscoverywait; extern int ql4xdiscoverywait;
extern int ql4xdontresethba; extern int ql4xdontresethba;
#endif /* _QLA4x_GBL_H */ #endif /* _QLA4x_GBL_H */
...@@ -701,7 +701,7 @@ void qla4xxx_get_conn_event_log(struct scsi_qla_host * ha) ...@@ -701,7 +701,7 @@ void qla4xxx_get_conn_event_log(struct scsi_qla_host * ha)
DEBUG3(printk("scsi%ld: Connection Event Log Dump (%d entries):\n", DEBUG3(printk("scsi%ld: Connection Event Log Dump (%d entries):\n",
ha->host_no, num_valid_entries)); ha->host_no, num_valid_entries));
if (extended_error_logging == 3) { if (qla4_extended_error_logging == 3) {
if (oldest_entry == 0) { if (oldest_entry == 0) {
/* Circular Buffer has not wrapped around */ /* Circular Buffer has not wrapped around */
for (i=0; i < num_valid_entries; i++) { for (i=0; i < num_valid_entries; i++) {
......
...@@ -34,9 +34,9 @@ MODULE_PARM_DESC(ql4xdontresethba, ...@@ -34,9 +34,9 @@ MODULE_PARM_DESC(ql4xdontresethba,
" default it will reset hba :0" " default it will reset hba :0"
" set to 1 to avoid resetting HBA"); " set to 1 to avoid resetting HBA");
int extended_error_logging = 0; /* 0 = off, 1 = log errors */ int qla4_extended_error_logging = 0; /* 0 = off, 1 = log errors */
module_param(extended_error_logging, int, S_IRUGO | S_IRUSR); module_param(qla4_extended_error_logging, int, S_IRUGO | S_IRUSR);
MODULE_PARM_DESC(extended_error_logging, MODULE_PARM_DESC(qla4_extended_error_logging,
"Option to enable extended error logging, " "Option to enable extended error logging, "
"Default is 0 - no logging, 1 - debug logging"); "Default is 0 - no logging, 1 - debug logging");
...@@ -1714,7 +1714,7 @@ static int __init qla4xxx_module_init(void) ...@@ -1714,7 +1714,7 @@ static int __init qla4xxx_module_init(void)
/* Derive version string. */ /* Derive version string. */
strcpy(qla4xxx_version_str, QLA4XXX_DRIVER_VERSION); strcpy(qla4xxx_version_str, QLA4XXX_DRIVER_VERSION);
if (extended_error_logging) if (qla4_extended_error_logging)
strcat(qla4xxx_version_str, "-debug"); strcat(qla4xxx_version_str, "-debug");
qla4xxx_scsi_transport = qla4xxx_scsi_transport =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment