diff options
author | David C Somayajulu <david.somayajulu@qlogic.com> | 2007-06-08 20:37:16 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-06-17 15:54:50 -0400 |
commit | 46235e600acfb6d13ee164c5539ad4309e848eab (patch) | |
tree | 89b2b2ef322656116554315b8034cc8735da2101 /drivers | |
parent | a1f6e0211b71a6c3ff401ad1d345ab024d0c6f01 (diff) |
[SCSI] qla4xxx: allow hba to be online when initiator ip address is uninitialized
This patch provides the following:
1. remove warning ignoring the return value of pci_set_mwi()
2. allows HBA to be online when the initiator ip address is uninitialized.
Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_init.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index d8c064c2afc3..1e29f51d596b 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c | |||
@@ -883,11 +883,12 @@ static int qla4xxx_config_nvram(struct scsi_qla_host *ha) | |||
883 | static void qla4x00_pci_config(struct scsi_qla_host *ha) | 883 | static void qla4x00_pci_config(struct scsi_qla_host *ha) |
884 | { | 884 | { |
885 | uint16_t w; | 885 | uint16_t w; |
886 | int status; | ||
886 | 887 | ||
887 | dev_info(&ha->pdev->dev, "Configuring PCI space...\n"); | 888 | dev_info(&ha->pdev->dev, "Configuring PCI space...\n"); |
888 | 889 | ||
889 | pci_set_master(ha->pdev); | 890 | pci_set_master(ha->pdev); |
890 | pci_set_mwi(ha->pdev); | 891 | status = pci_set_mwi(ha->pdev); |
891 | /* | 892 | /* |
892 | * We want to respect framework's setting of PCI configuration space | 893 | * We want to respect framework's setting of PCI configuration space |
893 | * command register and also want to make sure that all bits of | 894 | * command register and also want to make sure that all bits of |
@@ -1143,32 +1144,30 @@ int qla4xxx_initialize_adapter(struct scsi_qla_host *ha, | |||
1143 | 1144 | ||
1144 | /* Initialize the Host adapter request/response queues and firmware */ | 1145 | /* Initialize the Host adapter request/response queues and firmware */ |
1145 | if (qla4xxx_start_firmware(ha) == QLA_ERROR) | 1146 | if (qla4xxx_start_firmware(ha) == QLA_ERROR) |
1146 | return status; | 1147 | goto exit_init_hba; |
1147 | 1148 | ||
1148 | if (qla4xxx_validate_mac_address(ha) == QLA_ERROR) | 1149 | if (qla4xxx_validate_mac_address(ha) == QLA_ERROR) |
1149 | return status; | 1150 | goto exit_init_hba; |
1150 | 1151 | ||
1151 | if (qla4xxx_init_local_data(ha) == QLA_ERROR) | 1152 | if (qla4xxx_init_local_data(ha) == QLA_ERROR) |
1152 | return status; | 1153 | goto exit_init_hba; |
1153 | 1154 | ||
1154 | status = qla4xxx_init_firmware(ha); | 1155 | status = qla4xxx_init_firmware(ha); |
1155 | if (status == QLA_ERROR) | 1156 | if (status == QLA_ERROR) |
1156 | return status; | 1157 | goto exit_init_hba; |
1157 | 1158 | ||
1158 | /* | 1159 | /* |
1159 | * FW is waiting to get an IP address from DHCP server: Skip building | 1160 | * FW is waiting to get an IP address from DHCP server: Skip building |
1160 | * the ddb_list and wait for DHCP lease acquired aen to come in | 1161 | * the ddb_list and wait for DHCP lease acquired aen to come in |
1161 | * followed by 0x8014 aen" to trigger the tgt discovery process. | 1162 | * followed by 0x8014 aen" to trigger the tgt discovery process. |
1162 | */ | 1163 | */ |
1163 | if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS){ | 1164 | if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS) |
1164 | set_bit(AF_ONLINE, &ha->flags); | 1165 | goto exit_init_online; |
1165 | return status; | ||
1166 | } | ||
1167 | 1166 | ||
1168 | /* Skip device discovery if ip and subnet is zero */ | 1167 | /* Skip device discovery if ip and subnet is zero */ |
1169 | if (memcmp(ha->ip_address, ip_address, IP_ADDR_LEN) == 0 || | 1168 | if (memcmp(ha->ip_address, ip_address, IP_ADDR_LEN) == 0 || |
1170 | memcmp(ha->subnet_mask, ip_address, IP_ADDR_LEN) == 0) | 1169 | memcmp(ha->subnet_mask, ip_address, IP_ADDR_LEN) == 0) |
1171 | return status; | 1170 | goto exit_init_online; |
1172 | 1171 | ||
1173 | if (renew_ddb_list == PRESERVE_DDB_LIST) { | 1172 | if (renew_ddb_list == PRESERVE_DDB_LIST) { |
1174 | /* | 1173 | /* |
@@ -1197,10 +1196,10 @@ int qla4xxx_initialize_adapter(struct scsi_qla_host *ha, | |||
1197 | ha->host_no)); | 1196 | ha->host_no)); |
1198 | } | 1197 | } |
1199 | 1198 | ||
1199 | exit_init_online: | ||
1200 | set_bit(AF_ONLINE, &ha->flags); | 1200 | set_bit(AF_ONLINE, &ha->flags); |
1201 | exit_init_hba: | 1201 | exit_init_hba: |
1202 | return status; | 1202 | return status; |
1203 | |||
1204 | } | 1203 | } |
1205 | 1204 | ||
1206 | /** | 1205 | /** |