| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * QLogic iSCSI HBA Driver |
|---|
| 3 | 4 | * Copyright (c) 2003-2013 QLogic Corporation |
|---|
| 4 | | - * |
|---|
| 5 | | - * See LICENSE.qla4xxx for copyright and licensing details. |
|---|
| 6 | 5 | */ |
|---|
| 7 | 6 | |
|---|
| 8 | 7 | #include <scsi/iscsi_if.h> |
|---|
| .. | .. |
|---|
| 14 | 13 | static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) |
|---|
| 15 | 14 | { |
|---|
| 16 | 15 | uint32_t value; |
|---|
| 17 | | - uint8_t func_number; |
|---|
| 18 | 16 | unsigned long flags; |
|---|
| 19 | 17 | |
|---|
| 20 | 18 | /* Get the function number */ |
|---|
| .. | .. |
|---|
| 22 | 20 | value = readw(&ha->reg->ctrl_status); |
|---|
| 23 | 21 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
|---|
| 24 | 22 | |
|---|
| 25 | | - func_number = (uint8_t) ((value >> 4) & 0x30); |
|---|
| 26 | 23 | switch (value & ISP_CONTROL_FN_MASK) { |
|---|
| 27 | 24 | case ISP_CONTROL_FN0_SCSI: |
|---|
| 28 | 25 | ha->mac_index = 1; |
|---|
| .. | .. |
|---|
| 153 | 150 | dma_addr_t sys_info_dma; |
|---|
| 154 | 151 | int status = QLA_ERROR; |
|---|
| 155 | 152 | |
|---|
| 156 | | - sys_info = dma_zalloc_coherent(&ha->pdev->dev, sizeof(*sys_info), |
|---|
| 157 | | - &sys_info_dma, GFP_KERNEL); |
|---|
| 153 | + sys_info = dma_alloc_coherent(&ha->pdev->dev, sizeof(*sys_info), |
|---|
| 154 | + &sys_info_dma, GFP_KERNEL); |
|---|
| 158 | 155 | if (sys_info == NULL) { |
|---|
| 159 | 156 | DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n", |
|---|
| 160 | 157 | ha->host_no, __func__)); |
|---|
| .. | .. |
|---|
| 667 | 664 | |
|---|
| 668 | 665 | pci_set_master(ha->pdev); |
|---|
| 669 | 666 | status = pci_set_mwi(ha->pdev); |
|---|
| 667 | + if (status) |
|---|
| 668 | + ql4_printk(KERN_WARNING, ha, "Failed to set MWI\n"); |
|---|
| 669 | + |
|---|
| 670 | 670 | /* |
|---|
| 671 | 671 | * We want to respect framework's setting of PCI configuration space |
|---|
| 672 | 672 | * command register and also want to make sure that all bits of |
|---|
| .. | .. |
|---|
| 766 | 766 | while (drvr_wait) { |
|---|
| 767 | 767 | if (ql4xxx_lock_drvr(a) == 0) { |
|---|
| 768 | 768 | ssleep(QL4_LOCK_DRVR_SLEEP); |
|---|
| 769 | | - if (drvr_wait) { |
|---|
| 770 | | - DEBUG2(printk("scsi%ld: %s: Waiting for " |
|---|
| 771 | | - "Global Init Semaphore(%d)...\n", |
|---|
| 772 | | - a->host_no, |
|---|
| 773 | | - __func__, drvr_wait)); |
|---|
| 774 | | - } |
|---|
| 769 | + DEBUG2(printk("scsi%ld: %s: Waiting for " |
|---|
| 770 | + "Global Init Semaphore(%d)...\n", |
|---|
| 771 | + a->host_no, |
|---|
| 772 | + __func__, drvr_wait)); |
|---|
| 775 | 773 | drvr_wait -= QL4_LOCK_DRVR_SLEEP; |
|---|
| 776 | 774 | } else { |
|---|
| 777 | 775 | DEBUG2(printk("scsi%ld: %s: Global Init Semaphore " |
|---|
| .. | .. |
|---|
| 947 | 945 | /** |
|---|
| 948 | 946 | * qla4xxx_initialize_adapter - initiailizes hba |
|---|
| 949 | 947 | * @ha: Pointer to host adapter structure. |
|---|
| 948 | + * @is_reset: Is this init path or reset path |
|---|
| 950 | 949 | * |
|---|
| 951 | 950 | * This routine parforms all of the steps necessary to initialize the adapter. |
|---|
| 952 | 951 | * |
|---|
| .. | .. |
|---|
| 1158 | 1157 | |
|---|
| 1159 | 1158 | /** |
|---|
| 1160 | 1159 | * qla4xxx_process_ddb_changed - process ddb state change |
|---|
| 1161 | | - * @ha - Pointer to host adapter structure. |
|---|
| 1162 | | - * @fw_ddb_index - Firmware's device database index |
|---|
| 1163 | | - * @state - Device state |
|---|
| 1160 | + * @ha: Pointer to host adapter structure. |
|---|
| 1161 | + * @fw_ddb_index: Firmware's device database index |
|---|
| 1162 | + * @state: Device state |
|---|
| 1163 | + * @conn_err: Unused |
|---|
| 1164 | 1164 | * |
|---|
| 1165 | 1165 | * This routine processes a Decive Database Changed AEN Event. |
|---|
| 1166 | 1166 | **/ |
|---|
| .. | .. |
|---|
| 1169 | 1169 | uint32_t state, uint32_t conn_err) |
|---|
| 1170 | 1170 | { |
|---|
| 1171 | 1171 | struct ddb_entry *ddb_entry; |
|---|
| 1172 | | - int status = QLA_ERROR; |
|---|
| 1173 | 1172 | |
|---|
| 1174 | 1173 | /* check for out of range index */ |
|---|
| 1175 | 1174 | if (fw_ddb_index >= MAX_DDB_ENTRIES) |
|---|
| .. | .. |
|---|
| 1191 | 1190 | ddb_entry->ddb_change(ha, fw_ddb_index, ddb_entry, state); |
|---|
| 1192 | 1191 | |
|---|
| 1193 | 1192 | exit_ddb_event: |
|---|
| 1194 | | - return status; |
|---|
| 1193 | + return QLA_ERROR; |
|---|
| 1195 | 1194 | } |
|---|
| 1196 | 1195 | |
|---|
| 1197 | 1196 | /** |
|---|