diff options
author | Sony Chacko <sony.chacko@qlogic.com> | 2010-08-19 01:08:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-19 19:52:38 -0400 |
commit | 251b036a22f530aff26cf70f5cdb0cf64a072e46 (patch) | |
tree | 1e4aba3bedbd87c0ff1f9e0365d6888f41bc0a14 /drivers | |
parent | 39895e07ca8ce13d8b38d00bf66236b93907c027 (diff) |
qlcnic: replace magic numbers with defines
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/qlcnic/qlcnic.h | 1 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_hdr.h | 4 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_init.c | 4 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 2 |
4 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index 5c549c5c2dd7..d19836758c6e 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h | |||
@@ -148,6 +148,7 @@ | |||
148 | 148 | ||
149 | #define DEFAULT_RCV_DESCRIPTORS_1G 2048 | 149 | #define DEFAULT_RCV_DESCRIPTORS_1G 2048 |
150 | #define DEFAULT_RCV_DESCRIPTORS_10G 4096 | 150 | #define DEFAULT_RCV_DESCRIPTORS_10G 4096 |
151 | #define MAX_RDS_RINGS 2 | ||
151 | 152 | ||
152 | #define get_next_index(index, length) \ | 153 | #define get_next_index(index, length) \ |
153 | (((index) + 1) & ((length) - 1)) | 154 | (((index) + 1) & ((length) - 1)) |
diff --git a/drivers/net/qlcnic/qlcnic_hdr.h b/drivers/net/qlcnic/qlcnic_hdr.h index bd346d9aac94..39db4df0f650 100644 --- a/drivers/net/qlcnic/qlcnic_hdr.h +++ b/drivers/net/qlcnic/qlcnic_hdr.h | |||
@@ -745,6 +745,10 @@ enum { | |||
745 | #define FW_POLL_DELAY (1 * HZ) | 745 | #define FW_POLL_DELAY (1 * HZ) |
746 | #define FW_FAIL_THRESH 2 | 746 | #define FW_FAIL_THRESH 2 |
747 | 747 | ||
748 | #define QLCNIC_RESET_TIMEOUT_SECS 10 | ||
749 | #define QLCNIC_INIT_TIMEOUT_SECS 30 | ||
750 | |||
751 | |||
748 | #define ISR_MSI_INT_TRIGGER(FUNC) (QLCNIC_PCIX_PS_REG(PCIX_MSI_F(FUNC))) | 752 | #define ISR_MSI_INT_TRIGGER(FUNC) (QLCNIC_PCIX_PS_REG(PCIX_MSI_F(FUNC))) |
749 | #define ISR_LEGACY_INT_TRIGGERED(VAL) (((VAL) & 0x300) == 0x200) | 753 | #define ISR_LEGACY_INT_TRIGGERED(VAL) (((VAL) & 0x300) == 0x200) |
750 | 754 | ||
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 08da25895fad..90766757c314 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c | |||
@@ -553,12 +553,12 @@ qlcnic_setup_idc_param(struct qlcnic_adapter *adapter) { | |||
553 | } | 553 | } |
554 | adapter->physical_port = (val >> 2); | 554 | adapter->physical_port = (val >> 2); |
555 | if (qlcnic_rom_fast_read(adapter, QLCNIC_ROM_DEV_INIT_TIMEOUT, &timeo)) | 555 | if (qlcnic_rom_fast_read(adapter, QLCNIC_ROM_DEV_INIT_TIMEOUT, &timeo)) |
556 | timeo = 30; | 556 | timeo = QLCNIC_INIT_TIMEOUT_SECS; |
557 | 557 | ||
558 | adapter->dev_init_timeo = timeo; | 558 | adapter->dev_init_timeo = timeo; |
559 | 559 | ||
560 | if (qlcnic_rom_fast_read(adapter, QLCNIC_ROM_DRV_RESET_TIMEOUT, &timeo)) | 560 | if (qlcnic_rom_fast_read(adapter, QLCNIC_ROM_DRV_RESET_TIMEOUT, &timeo)) |
561 | timeo = 10; | 561 | timeo = QLCNIC_RESET_TIMEOUT_SECS; |
562 | 562 | ||
563 | adapter->reset_ack_timeo = timeo; | 563 | adapter->reset_ack_timeo = timeo; |
564 | 564 | ||
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index beadf2e41130..c6f19c961c3d 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -754,7 +754,7 @@ qlcnic_check_options(struct qlcnic_adapter *adapter) | |||
754 | 754 | ||
755 | adapter->num_txd = MAX_CMD_DESCRIPTORS; | 755 | adapter->num_txd = MAX_CMD_DESCRIPTORS; |
756 | 756 | ||
757 | adapter->max_rds_rings = 2; | 757 | adapter->max_rds_rings = MAX_RDS_RINGS; |
758 | } | 758 | } |
759 | 759 | ||
760 | static int | 760 | static int |