diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-05-16 21:22:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-17 20:30:54 -0400 |
commit | 4d5bdb384813f1928016661f28fd45f8327c081d (patch) | |
tree | e8de3d90c5f7a6e53e6571bcd48dc45528269f07 /drivers/net/qlcnic | |
parent | 7e382594a258f8733fd5b1790dc9362a05b9dbd9 (diff) |
qlcnic: module param for firmware load option
By default fw is loaded from flash, user can
change this priority using load_fw_file module param.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 0a52d24cae78..b076474389b9 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -61,6 +61,10 @@ static int auto_fw_reset = AUTO_FW_RESET_ENABLED; | |||
61 | module_param(auto_fw_reset, int, 0644); | 61 | module_param(auto_fw_reset, int, 0644); |
62 | MODULE_PARM_DESC(auto_fw_reset, "Auto firmware reset (0=disabled, 1=enabled"); | 62 | MODULE_PARM_DESC(auto_fw_reset, "Auto firmware reset (0=disabled, 1=enabled"); |
63 | 63 | ||
64 | static int load_fw_file; | ||
65 | module_param(load_fw_file, int, 0644); | ||
66 | MODULE_PARM_DESC(load_fw_file, "Load firmware from (0=flash, 1=file"); | ||
67 | |||
64 | static int __devinit qlcnic_probe(struct pci_dev *pdev, | 68 | static int __devinit qlcnic_probe(struct pci_dev *pdev, |
65 | const struct pci_device_id *ent); | 69 | const struct pci_device_id *ent); |
66 | static void __devexit qlcnic_remove(struct pci_dev *pdev); | 70 | static void __devexit qlcnic_remove(struct pci_dev *pdev); |
@@ -585,7 +589,10 @@ qlcnic_start_firmware(struct qlcnic_adapter *adapter) | |||
585 | /* This is the first boot after power up */ | 589 | /* This is the first boot after power up */ |
586 | QLCWR32(adapter, QLCNIC_CAM_RAM(0x1fc), QLCNIC_BDINFO_MAGIC); | 590 | QLCWR32(adapter, QLCNIC_CAM_RAM(0x1fc), QLCNIC_BDINFO_MAGIC); |
587 | 591 | ||
588 | qlcnic_request_firmware(adapter); | 592 | if (load_fw_file) |
593 | qlcnic_request_firmware(adapter); | ||
594 | else | ||
595 | adapter->fw_type = QLCNIC_FLASH_ROMIMAGE; | ||
589 | 596 | ||
590 | err = qlcnic_need_fw_reset(adapter); | 597 | err = qlcnic_need_fw_reset(adapter); |
591 | if (err < 0) | 598 | if (err < 0) |