mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-20 15:04:19 +00:00
Merged revisions 7233-7244 via svnmerge from
svn+ssh://svn.code.sf.net/p/scst/svn/trunk ........ r7233 | bvassche | 2017-09-20 08:09:38 -0700 (Wed, 20 Sep 2017) | 4 lines ib_srpt: Support systems with more than 255 CPU cores Signed-off-by: Kirill Malkin <kirillmalkin.km@gmail.com> ........ r7234 | bvassche | 2017-09-24 18:52:53 -0700 (Sun, 24 Sep 2017) | 2 lines iscsi-scst/Makefile: Change MOFED path into /usr/src/ofa_kernel/default ........ r7235 | bvassche | 2017-09-25 16:35:49 -0700 (Mon, 25 Sep 2017) | 1 line iscsi-scst/Makefile, Ubuntu: Simplify code for version querying ........ r7236 | bvassche | 2017-10-02 16:56:47 -0700 (Mon, 02 Oct 2017) | 1 line scripts/specialize-patch: Process ENABLE_NPIV and FC_VPORT_CREATE_DEFINED correctly ........ r7237 | bvassche | 2017-10-02 17:04:53 -0700 (Mon, 02 Oct 2017) | 2 lines scripts/generate-kernel-patch: Fix a regression introduced in r7164 ........ r7238 | bvassche | 2017-10-02 17:05:42 -0700 (Mon, 02 Oct 2017) | 1 line scripts/specialize-patch: Process CONFIG_SCST_STRICT_SERIALIZING correctly ........ r7239 | bvassche | 2017-10-03 15:49:35 -0700 (Tue, 03 Oct 2017) | 1 line isert-scst: Make an error message more informative ........ r7240 | bvassche | 2017-10-03 16:08:29 -0700 (Tue, 03 Oct 2017) | 1 line scst: Port to kernel v4.13 ........ r7241 | bvassche | 2017-10-03 16:10:03 -0700 (Tue, 03 Oct 2017) | 1 line nightly build: Update kernel versions ........ r7242 | bvassche | 2017-10-05 09:57:27 -0700 (Thu, 05 Oct 2017) | 1 line scst: Port to openSUSE Leap 42.x ........ r7243 | bvassche | 2017-10-05 16:48:25 -0700 (Thu, 05 Oct 2017) | 1 line fcst: Port to openSUSE Leap ........ r7244 | bvassche | 2017-10-05 16:48:51 -0700 (Thu, 05 Oct 2017) | 1 line qla2x00t: Port to openSUSE Leap ........ git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7246 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -19,9 +19,15 @@
|
||||
|
||||
#ifdef INSIDE_KERNEL_TREE
|
||||
#include <scst/scst.h>
|
||||
#define NEW_LIBFC_API
|
||||
#else
|
||||
#include <linux/version.h>
|
||||
#include "scst.h"
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) || \
|
||||
defined(CONFIG_SUSE_KERNEL) && \
|
||||
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
|
||||
#define NEW_LIBFC_API
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define FT_VERSION "3.3.0-rc"
|
||||
|
||||
+12
-12
@@ -256,12 +256,12 @@ static void ft_cmd_done(struct ft_cmd *fcmd)
|
||||
{
|
||||
struct fc_frame *fp = fcmd->req_frame;
|
||||
struct fc_seq *sp = fcmd->seq;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
||||
#ifndef NEW_LIBFC_API
|
||||
struct fc_lport *lport = fr_dev(fp);
|
||||
#endif
|
||||
|
||||
if (sp)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
fc_exch_done(sp);
|
||||
#else
|
||||
lport->tt.exch_done(sp);
|
||||
@@ -269,7 +269,7 @@ static void ft_cmd_done(struct ft_cmd *fcmd)
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
|
||||
if (fr_seq(fp))
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
fc_seq_release(fr_seq(fp));
|
||||
#else
|
||||
lport->tt.seq_release(fr_seq(fp));
|
||||
@@ -395,7 +395,7 @@ int ft_send_response(struct scst_cmd *cmd)
|
||||
/*
|
||||
* Send response.
|
||||
*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
fcmd->seq = fc_seq_start_next(fcmd->seq);
|
||||
#else
|
||||
fcmd->seq = lport->tt.seq_start_next(fcmd->seq);
|
||||
@@ -403,7 +403,7 @@ int ft_send_response(struct scst_cmd *cmd)
|
||||
fc_fill_fc_hdr(fp, FC_RCTL_DD_CMD_STATUS, ep->did, ep->sid, FC_TYPE_FCP,
|
||||
FC_FC_EX_CTX | FC_FC_LAST_SEQ | FC_FC_END_SEQ, 0);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
error = FCST_INJ_SEND_ERR(fc_seq_send(lport, fcmd->seq, fp));
|
||||
#else
|
||||
error = FCST_INJ_SEND_ERR(lport->tt.seq_send(lport, fcmd->seq, fp));
|
||||
@@ -505,14 +505,14 @@ int ft_send_xfer_rdy(struct scst_cmd *cmd)
|
||||
txrdy->ft_data_ro = 0;
|
||||
txrdy->ft_burst_len = htonl(scst_cmd_get_bufflen(cmd));
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
fcmd->seq = fc_seq_start_next(fcmd->seq);
|
||||
#else
|
||||
fcmd->seq = lport->tt.seq_start_next(fcmd->seq);
|
||||
#endif
|
||||
fc_fill_fc_hdr(fp, FC_RCTL_DD_DATA_DESC, ep->did, ep->sid, FC_TYPE_FCP,
|
||||
FC_FC_EX_CTX | FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
error = FCST_INJ_SEND_ERR(fc_seq_send(lport, fcmd->seq, fp));
|
||||
#else
|
||||
error = FCST_INJ_SEND_ERR(lport->tt.seq_send(lport, fcmd->seq, fp));
|
||||
@@ -586,7 +586,7 @@ out:
|
||||
fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_DD_CMD_STATUS, 0);
|
||||
sp = fr_seq(fp);
|
||||
if (sp)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
fc_seq_send(lport, sp, fp);
|
||||
#else
|
||||
lport->tt.seq_send(lport, sp, fp);
|
||||
@@ -718,7 +718,7 @@ static void ft_recv_cmd(struct ft_sess *sess, struct fc_frame *fp)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
|
||||
sp = fr_seq(fp);
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
sp = fc_seq_assign(lport, fp);
|
||||
#else
|
||||
sp = lport->tt.seq_assign(lport, fp);
|
||||
@@ -771,7 +771,7 @@ static void ft_recv_cmd(struct ft_sess *sess, struct fc_frame *fp)
|
||||
cmd->state = FT_STATE_NEW;
|
||||
|
||||
fcmd->seq = sp;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
fc_seq_set_resp(sp, ft_recv_seq, cmd);
|
||||
#else
|
||||
lport->tt.seq_set_resp(sp, ft_recv_seq, cmd);
|
||||
@@ -824,7 +824,7 @@ busy:
|
||||
if (fcmd)
|
||||
ft_cmd_done(fcmd);
|
||||
else if (sp)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
fc_exch_done(sp);
|
||||
#else
|
||||
lport->tt.exch_done(sp);
|
||||
@@ -867,7 +867,7 @@ static void ft_cmd_ls_rjt(struct fc_frame *rx_fp, enum fc_els_rjt_reason reason,
|
||||
lport = fr_dev(rx_fp);
|
||||
rjt_data.reason = reason;
|
||||
rjt_data.explan = explan;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
fc_seq_els_rsp_send(rx_fp, ELS_LS_RJT, &rjt_data);
|
||||
#else
|
||||
lport->tt.seq_els_rsp_send(rx_fp, ELS_LS_RJT, &rjt_data);
|
||||
|
||||
+2
-2
@@ -89,7 +89,7 @@ int ft_send_read_data(struct scst_cmd *cmd)
|
||||
mem_len -= tlen;
|
||||
mem_off = tlen;
|
||||
} else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
fcmd->seq = fc_seq_start_next(fcmd->seq);
|
||||
#else
|
||||
fcmd->seq = lport->tt.seq_start_next(fcmd->seq);
|
||||
@@ -179,7 +179,7 @@ int ft_send_read_data(struct scst_cmd *cmd)
|
||||
remaining ? (FC_FC_EX_CTX | FC_FC_REL_OFF) :
|
||||
(FC_FC_EX_CTX | FC_FC_REL_OFF | FC_FC_END_SEQ),
|
||||
fh_off);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
#ifdef NEW_LIBFC_API
|
||||
error = FCST_INJ_SEND_ERR(fc_seq_send(lport, fcmd->seq, fp));
|
||||
#else
|
||||
error = FCST_INJ_SEND_ERR(lport->tt.seq_send(lport, fcmd->seq,
|
||||
|
||||
Reference in New Issue
Block a user