[SCSI] zfcp: put threshold data in hba trace
[safe/jmp/linux-2.6] / drivers / s390 / scsi / zfcp_fsf.c
index 23dd908..f073fff 100644 (file)
@@ -68,7 +68,7 @@ static void zfcp_fsf_access_denied_port(struct zfcp_fsf_req *req,
        struct fsf_qtcb_header *header = &req->qtcb->header;
        dev_warn(&req->adapter->ccw_device->dev,
                 "Access denied to port 0x%016Lx\n",
-                port->wwpn);
+                (unsigned long long)port->wwpn);
        zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
        zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
        zfcp_erp_port_access_denied(port, 55, req);
@@ -81,7 +81,8 @@ static void zfcp_fsf_access_denied_unit(struct zfcp_fsf_req *req,
        struct fsf_qtcb_header *header = &req->qtcb->header;
        dev_warn(&req->adapter->ccw_device->dev,
                 "Access denied to unit 0x%016Lx on port 0x%016Lx\n",
-                unit->fcp_lun, unit->port->wwpn);
+                (unsigned long long)unit->fcp_lun,
+                (unsigned long long)unit->port->wwpn);
        zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
        zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
        zfcp_erp_unit_access_denied(unit, 59, req);
@@ -293,6 +294,7 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req)
                dev_warn(&adapter->ccw_device->dev,
                         "The error threshold for checksum statistics "
                         "has been exceeded\n");
+               zfcp_hba_dbf_event_berr(adapter, req);
                break;
        case FSF_STATUS_READ_LINK_DOWN:
                zfcp_fsf_status_read_link_down(req);
@@ -638,12 +640,14 @@ static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req)
        }
 }
 
-static int zfcp_fsf_sbal_check(struct zfcp_qdio_queue *queue)
+static int zfcp_fsf_sbal_check(struct zfcp_adapter *adapter)
 {
-       spin_lock_bh(&queue->lock);
-       if (atomic_read(&queue->count))
+       struct zfcp_qdio_queue *req_q = &adapter->req_q;
+
+       spin_lock_bh(&adapter->req_q_lock);
+       if (atomic_read(&req_q->count))
                return 1;
-       spin_unlock_bh(&queue->lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return 0;
 }
 
@@ -658,17 +662,16 @@ static int zfcp_fsf_sbal_available(struct zfcp_adapter *adapter)
 static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter)
 {
        long ret;
-       struct zfcp_qdio_queue *req_q = &adapter->req_q;
 
-       spin_unlock_bh(&req_q->lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        ret = wait_event_interruptible_timeout(adapter->request_wq,
-                                       zfcp_fsf_sbal_check(req_q), 5 * HZ);
+                                       zfcp_fsf_sbal_check(adapter), 5 * HZ);
        if (ret > 0)
                return 0;
        if (!ret)
                atomic_inc(&adapter->qdio_outb_full);
 
-       spin_lock_bh(&req_q->lock);
+       spin_lock_bh(&adapter->req_q_lock);
        return -EIO;
 }
 
@@ -810,7 +813,7 @@ int zfcp_fsf_status_read(struct zfcp_adapter *adapter)
        struct qdio_buffer_element *sbale;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -850,7 +853,7 @@ failed_buf:
        zfcp_fsf_req_free(req);
        zfcp_hba_dbf_event_fsf_unsol("fail", adapter, NULL);
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -923,7 +926,7 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
        struct qdio_buffer_element *sbale;
        struct zfcp_fsf_req *req = NULL;
 
-       spin_lock(&adapter->req_q.lock);
+       spin_lock(&adapter->req_q_lock);
        if (!zfcp_fsf_sbal_available(adapter))
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND,
@@ -953,7 +956,7 @@ out_error_free:
        zfcp_fsf_req_free(req);
        req = NULL;
 out:
-       spin_unlock(&adapter->req_q.lock);
+       spin_unlock(&adapter->req_q_lock);
        return req;
 }
 
@@ -1042,7 +1045,7 @@ int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool,
        struct zfcp_fsf_req *req;
        int ret = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -1084,7 +1087,7 @@ failed_send:
        if (erp_action)
                erp_action->fsf_req = NULL;
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return ret;
 }
 
@@ -1154,7 +1157,7 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els)
                       ZFCP_STATUS_COMMON_UNBLOCKED)))
                return -EBUSY;
 
-       spin_lock(&adapter->req_q.lock);
+       spin_lock(&adapter->req_q_lock);
        if (!zfcp_fsf_sbal_available(adapter))
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_SEND_ELS,
@@ -1188,7 +1191,7 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els)
 failed_send:
        zfcp_fsf_req_free(req);
 out:
-       spin_unlock(&adapter->req_q.lock);
+       spin_unlock(&adapter->req_q_lock);
        return ret;
 }
 
@@ -1199,7 +1202,7 @@ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action)
        struct zfcp_adapter *adapter = erp_action->adapter;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (!zfcp_fsf_sbal_available(adapter))
                goto out;
        req = zfcp_fsf_req_create(adapter,
@@ -1231,7 +1234,7 @@ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action)
                erp_action->fsf_req = NULL;
        }
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -1242,7 +1245,7 @@ int zfcp_fsf_exchange_config_data_sync(struct zfcp_adapter *adapter,
        struct zfcp_fsf_req *req = NULL;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -1270,7 +1273,7 @@ int zfcp_fsf_exchange_config_data_sync(struct zfcp_adapter *adapter,
        zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
        retval = zfcp_fsf_req_send(req);
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        if (!retval)
                wait_event(req->completion_wq,
                           req->status & ZFCP_STATUS_FSFREQ_COMPLETED);
@@ -1295,7 +1298,7 @@ int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action)
        if (!(adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT))
                return -EOPNOTSUPP;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (!zfcp_fsf_sbal_available(adapter))
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA,
@@ -1321,7 +1324,7 @@ int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action)
                erp_action->fsf_req = NULL;
        }
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -1341,7 +1344,7 @@ int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter,
        if (!(adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT))
                return -EOPNOTSUPP;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (!zfcp_fsf_sbal_available(adapter))
                goto out;
 
@@ -1363,7 +1366,7 @@ int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter,
        zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
        retval = zfcp_fsf_req_send(req);
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        if (!retval)
                wait_event(req->completion_wq,
                           req->status & ZFCP_STATUS_FSFREQ_COMPLETED);
@@ -1390,7 +1393,8 @@ static void zfcp_fsf_open_port_handler(struct zfcp_fsf_req *req)
        case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED:
                dev_warn(&req->adapter->ccw_device->dev,
                         "Not enough FCP adapter resources to open "
-                        "remote port 0x%016Lx\n", port->wwpn);
+                        "remote port 0x%016Lx\n",
+                        (unsigned long long)port->wwpn);
                zfcp_erp_port_failed(port, 31, req);
                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                break;
@@ -1403,7 +1407,7 @@ static void zfcp_fsf_open_port_handler(struct zfcp_fsf_req *req)
                case FSF_SQ_NO_RETRY_POSSIBLE:
                        dev_warn(&req->adapter->ccw_device->dev,
                                 "Remote port 0x%016Lx could not be opened\n",
-                                port->wwpn);
+                                (unsigned long long)port->wwpn);
                        zfcp_erp_port_failed(port, 32, req);
                        req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                        break;
@@ -1460,7 +1464,7 @@ int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
        struct zfcp_fsf_req *req;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -1490,7 +1494,7 @@ int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
                erp_action->fsf_req = NULL;
        }
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -1528,7 +1532,7 @@ int zfcp_fsf_close_port(struct zfcp_erp_action *erp_action)
        struct zfcp_fsf_req *req;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -1557,7 +1561,7 @@ int zfcp_fsf_close_port(struct zfcp_erp_action *erp_action)
                erp_action->fsf_req = NULL;
        }
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -1601,7 +1605,7 @@ int zfcp_fsf_open_wka_port(struct zfcp_wka_port *wka_port)
        struct zfcp_fsf_req *req;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -1627,7 +1631,7 @@ int zfcp_fsf_open_wka_port(struct zfcp_wka_port *wka_port)
        if (retval)
                zfcp_fsf_req_free(req);
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -1656,7 +1660,7 @@ int zfcp_fsf_close_wka_port(struct zfcp_wka_port *wka_port)
        struct zfcp_fsf_req *req;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -1681,7 +1685,7 @@ int zfcp_fsf_close_wka_port(struct zfcp_wka_port *wka_port)
        if (retval)
                zfcp_fsf_req_free(req);
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -1748,7 +1752,7 @@ int zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action)
        struct zfcp_fsf_req *req;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -1779,7 +1783,7 @@ int zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action)
                erp_action->fsf_req = NULL;
        }
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -1824,8 +1828,8 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
                        dev_warn(&adapter->ccw_device->dev,
                                 "LUN 0x%Lx on port 0x%Lx is already in "
                                 "use by CSS%d, MIF Image ID %x\n",
-                                unit->fcp_lun,
-                                unit->port->wwpn,
+                                (unsigned long long)unit->fcp_lun,
+                                (unsigned long long)unit->port->wwpn,
                                 queue_designator->cssid,
                                 queue_designator->hla);
                else
@@ -1840,7 +1844,8 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
                dev_warn(&adapter->ccw_device->dev,
                         "No handle is available for LUN "
                         "0x%016Lx on port 0x%016Lx\n",
-                        unit->fcp_lun, unit->port->wwpn);
+                        (unsigned long long)unit->fcp_lun,
+                        (unsigned long long)unit->port->wwpn);
                zfcp_erp_unit_failed(unit, 34, req);
                /* fall through */
        case FSF_INVALID_COMMAND_OPTION:
@@ -1879,7 +1884,8 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
                                dev_info(&adapter->ccw_device->dev,
                                         "SCSI device at LUN 0x%016Lx on port "
                                         "0x%016Lx opened read-only\n",
-                                        unit->fcp_lun, unit->port->wwpn);
+                                        (unsigned long long)unit->fcp_lun,
+                                        (unsigned long long)unit->port->wwpn);
                        }
 
                        if (exclusive && !readwrite) {
@@ -1887,7 +1893,8 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
                                        "Exclusive read-only access not "
                                        "supported (unit 0x%016Lx, "
                                        "port 0x%016Lx)\n",
-                                       unit->fcp_lun, unit->port->wwpn);
+                                       (unsigned long long)unit->fcp_lun,
+                                       (unsigned long long)unit->port->wwpn);
                                zfcp_erp_unit_failed(unit, 35, req);
                                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                                zfcp_erp_unit_shutdown(unit, 0, 80, req);
@@ -1896,7 +1903,8 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
                                        "Shared read-write access not "
                                        "supported (unit 0x%016Lx, port "
                                        "0x%016Lx\n)",
-                                       unit->fcp_lun, unit->port->wwpn);
+                                       (unsigned long long)unit->fcp_lun,
+                                       (unsigned long long)unit->port->wwpn);
                                zfcp_erp_unit_failed(unit, 36, req);
                                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                                zfcp_erp_unit_shutdown(unit, 0, 81, req);
@@ -1918,7 +1926,7 @@ int zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
        struct zfcp_fsf_req *req;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -1951,7 +1959,7 @@ int zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
                erp_action->fsf_req = NULL;
        }
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -2004,7 +2012,7 @@ int zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action)
        struct zfcp_fsf_req *req;
        int retval = -EIO;
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_CLOSE_LUN,
@@ -2033,7 +2041,7 @@ int zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action)
                erp_action->fsf_req = NULL;
        }
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
        return retval;
 }
 
@@ -2197,7 +2205,8 @@ static void zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *req)
                        "Incorrect direction %d, unit 0x%016Lx on port "
                        "0x%016Lx closed\n",
                        req->qtcb->bottom.io.data_direction,
-                       unit->fcp_lun, unit->port->wwpn);
+                       (unsigned long long)unit->fcp_lun,
+                       (unsigned long long)unit->port->wwpn);
                zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, req);
                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                break;
@@ -2206,7 +2215,8 @@ static void zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *req)
                        "Incorrect CDB length %d, unit 0x%016Lx on "
                        "port 0x%016Lx closed\n",
                        req->qtcb->bottom.io.fcp_cmnd_length,
-                       unit->fcp_lun, unit->port->wwpn);
+                       (unsigned long long)unit->fcp_lun,
+                       (unsigned long long)unit->port->wwpn);
                zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, req);
                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                break;
@@ -2237,6 +2247,20 @@ skip_fsfstatus:
        }
 }
 
+static void zfcp_set_fcp_dl(struct fcp_cmnd_iu *fcp_cmd, u32 fcp_dl)
+{
+       u32 *fcp_dl_ptr;
+
+       /*
+        * fcp_dl_addr = start address of fcp_cmnd structure +
+        * size of fixed part + size of dynamically sized add_dcp_cdb field
+        * SEE FCP-2 documentation
+        */
+       fcp_dl_ptr = (u32 *) ((unsigned char *) &fcp_cmd[1] +
+                       (fcp_cmd->add_fcp_cdb_length << 2));
+       *fcp_dl_ptr = fcp_dl;
+}
+
 /**
  * zfcp_fsf_send_fcp_command_task - initiate an FCP command (for a SCSI command)
  * @adapter: adapter where scsi command is issued
@@ -2259,7 +2283,7 @@ int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
                       ZFCP_STATUS_COMMON_UNBLOCKED)))
                return -EBUSY;
 
-       spin_lock(&adapter->req_q.lock);
+       spin_lock(&adapter->req_q_lock);
        if (!zfcp_fsf_sbal_available(adapter))
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags,
@@ -2322,7 +2346,7 @@ int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
        memcpy(fcp_cmnd_iu->fcp_cdb, scsi_cmnd->cmnd, scsi_cmnd->cmd_len);
 
        req->qtcb->bottom.io.fcp_cmnd_length = sizeof(struct fcp_cmnd_iu) +
-               fcp_cmnd_iu->add_fcp_cdb_length + sizeof(fcp_dl_t);
+               fcp_cmnd_iu->add_fcp_cdb_length + sizeof(u32);
 
        real_bytes = zfcp_qdio_sbals_from_sg(req, sbtype,
                                             scsi_sglist(scsi_cmnd),
@@ -2334,7 +2358,8 @@ int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
                        dev_err(&adapter->ccw_device->dev,
                                "Oversize data package, unit 0x%016Lx "
                                "on port 0x%016Lx closed\n",
-                               unit->fcp_lun, unit->port->wwpn);
+                               (unsigned long long)unit->fcp_lun,
+                               (unsigned long long)unit->port->wwpn);
                        zfcp_erp_unit_shutdown(unit, 0, 131, req);
                        retval = -EINVAL;
                }
@@ -2357,7 +2382,7 @@ failed_scsi_cmnd:
        zfcp_fsf_req_free(req);
        scsi_cmnd->host_scribble = NULL;
 out:
-       spin_unlock(&adapter->req_q.lock);
+       spin_unlock(&adapter->req_q_lock);
        return retval;
 }
 
@@ -2381,7 +2406,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
                       ZFCP_STATUS_COMMON_UNBLOCKED)))
                return NULL;
 
-       spin_lock(&adapter->req_q.lock);
+       spin_lock(&adapter->req_q_lock);
        if (!zfcp_fsf_sbal_available(adapter))
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags,
@@ -2397,7 +2422,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
        req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND;
        req->qtcb->bottom.io.service_class = FSF_CLASS_3;
        req->qtcb->bottom.io.fcp_cmnd_length =  sizeof(struct fcp_cmnd_iu) +
-                                               sizeof(fcp_dl_t);
+                                               sizeof(u32);
 
        sbale = zfcp_qdio_sbale_req(req);
        sbale[0].flags |= SBAL_FLAGS0_TYPE_WRITE;
@@ -2414,7 +2439,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
        zfcp_fsf_req_free(req);
        req = NULL;
 out:
-       spin_unlock(&adapter->req_q.lock);
+       spin_unlock(&adapter->req_q_lock);
        return req;
 }
 
@@ -2452,7 +2477,7 @@ struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter,
                return ERR_PTR(-EINVAL);
        }
 
-       spin_lock_bh(&adapter->req_q.lock);
+       spin_lock_bh(&adapter->req_q_lock);
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
 
@@ -2482,7 +2507,7 @@ struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter,
        zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
        retval = zfcp_fsf_req_send(req);
 out:
-       spin_unlock_bh(&adapter->req_q.lock);
+       spin_unlock_bh(&adapter->req_q_lock);
 
        if (!retval) {
                wait_event(req->completion_wq,