Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase on upstream master #31

Merged
merged 27 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
56bb6c0
nightly build, scripts: Remove svn support
lnocturno Apr 26, 2024
d3a2fae
scripts/run-regression-tests: Explicitly set KBUILD_MODPOST_WARN=1
lnocturno May 2, 2024
71abad2
scst/include/backport.h: Fix backport for new stable kernels
lnocturno May 2, 2024
48ef509
scst/include/backport.h: Port to the latest UEK kernels
lnocturno May 2, 2024
52b5e84
scst/include/backport.h: Fix backport for new stable kernels
lnocturno May 3, 2024
8a1a7fa
scst/include/backport.h: Fix the build against UEK kernels
lnocturno May 3, 2024
1ea7200
qla2x00t-32gbit: use DEFINE_SHOW_STORE_ATTRIBUTE() helper for debugfs
lnocturno Apr 25, 2024
e322287
scst/include/backport.h: Backport DEFINE_SHOW_STORE_ATTRIBUTE()
lnocturno Apr 25, 2024
aabf1ce
qla2x00t-32gbit: Prevent command send on chip reset
lnocturno Apr 25, 2024
f91f314
qla2x00t-32gbit: Fix N2N stuck connection
lnocturno Apr 25, 2024
869135e
qla2x00t-32gbit: Split FCE|EFT trace control
lnocturno Apr 25, 2024
10c4006
qla2x00t-32gbit: Update manufacturer detail
lnocturno Apr 25, 2024
0929d81
qla2x00t-32gbit: NVME|FCP prefer flag not being honored
lnocturno Apr 25, 2024
5a325ea
qla2x00t-32gbit: Fix command flush on cable pull
lnocturno Apr 25, 2024
b0dd719
qla2x00t-32gbit: Fix double free of the ha->vp_map pointer
lnocturno Apr 25, 2024
f9329cc
qla2x00t-32gbit: Fix double free of fcport
lnocturno Apr 25, 2024
b7481e8
qla2x00t-32gbit: Change debug message during driver unload
lnocturno Apr 25, 2024
f8f70db
qla2x00t-32gbit: Delay I/O Abort on PCI error
lnocturno Apr 25, 2024
6c6f675
qla2x00t-32gbit: Update version to 10.02.09.200-k
lnocturno Apr 25, 2024
3e0408f
qla2x00t-32gbit: Fix off by one in qla_edif_app_getstats()
lnocturno Apr 25, 2024
3fba8e4
scst_lib: Allow REPORT LUNS to operate on an unsupported LUN
bmeagherix Feb 23, 2024
7c4e074
.github/workflows: Add a GitHub action to run regression tests upon push
lnocturno May 3, 2024
2df4770
Update packaging bits to build scst-dbg package
usaleem-ix Feb 3, 2023
74a2c02
Specify linux headers dependencies in control file
sonicaj May 9, 2023
eedaedc
Disable unused expensive code in addVirtualTarget
bmeagherix Jan 24, 2024
48479cb
When stopping scst turn off cluster_mode in parallel
bmeagherix Jan 29, 2024
ba0043f
Merge branch 'truenas-3.9.0-pre' into rebase_on_upstream_master
bmeagherix May 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/run_regression_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Regression tests upon push

on:
push:
branches:
- master

jobs:
regression_tests:
name: ${{matrix.version}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [
'6.8.7',
'6.7.12',
'6.6.28',
'6.1.87',
'5.15.156',
'5.10.215',
'5.4.274',
'4.19.312',
'4.14.336',
'4.9.337',
'3.18.140',
'3.10.108',
'5.14.0-284.30.1.el9_2^AlmaLinux^9.2',
'4.18.0-513.24.1.el8_9^AlmaLinux^8.9',
'4.18.0-477.13.1.el8_8^AlmaLinux^8.8',
'3.10.0-1160.108.1.el7^CentOS^7.9.2009',
'5.15.0-205.149.5.1.el9uek^UEK^9',
'5.4.17-2136.330.7.1.el8uek^UEK^8',
'5.4.17-2102.206.1.el7uek^UEK^7',
'4.1.12-124.48.6.el6uek^UEK^6'
]
steps:
- name: Checkout code
uses: actions/checkout@main

- name: Install libelf-dev
run: |
sudo apt-get install -y libelf-dev

- name: Install sparse
run: |
sudo apt-get install sparse

- name: Install smatch
run: |
git clone https://github.com/error27/smatch.git
cd smatch
make -j
sudo BINDIR=/bin SHAREDIR=/home/runner/share make install

- name: Run regression tests
run: |
err=0

./scripts/run-regression-tests -l -q -k -d /tmp/scst-${{matrix.version}} ${{matrix.version}}-nc-ns-nm | tee output.txt

cat output.txt | grep -A1 "Compiling the patched kernel" | grep -e "FAILED" -e "[^0] errors" > /dev/null 2>&1 && err=1

rm -f output.txt

exit $err
23 changes: 6 additions & 17 deletions nightly/bin/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@

# Returns the revision number of the source files with date $1.
get_revision() {
if svn info . >/dev/null 2>&1; then
svn info -r "{$1}" "${scst_repo}" | sed -n 's/^Revision: //p'
else
git log --before="$1" | head -n 1 | cut -f2 -d ' '
fi
git log --before="$1" | head -n 1 | cut -f2 -d ' '
}

runcmd () {
Expand Down Expand Up @@ -54,11 +50,7 @@ usage () {
#----------------------------------------------------------------------------

scst_rootdir="$(dirname "$(dirname "$(cd "$(dirname "$0")" && echo "$PWD")")")"
if svn info . >/dev/null 2>&1; then
scst_repo="$(svn info "$scst_rootdir" | sed -n -e 's|\+ssh://[^@]*@|://|' -e 's/^URL: //p')"
else
scst_repo="$scst_rootdir"
fi
scst_repo="$scst_rootdir"
sendmail_opts=""
run_if_unchanged="false"

Expand Down Expand Up @@ -151,13 +143,10 @@ for logfile in old new ; do
# Check out and run the tests.
runcmd ${logfile} \
"Checking out SCST source tree" \
"if svn info . >/dev/null 2>&1; then \
svn co -q -r {${date}} ${scst_repo} ${ABT_TMPDIR}/scst; \
else \
( rmdir ${ABT_TMPDIR}/scst && \
git clone -q ${scst_repo} ${ABT_TMPDIR}/scst && \
cd ${ABT_TMPDIR}/scst && git reset --hard ${rev} ); \
fi" &&
"( rmdir ${ABT_TMPDIR}/scst && \
git clone -q ${scst_repo} ${ABT_TMPDIR}/scst && \
cd ${ABT_TMPDIR}/scst && git reset --hard ${rev} ); \
" &&
runcmd ${logfile} \
"Running regression tests" \
"cd ${ABT_TMPDIR}/scst && \
Expand Down
14 changes: 12 additions & 2 deletions qla2x00t-32gbit/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2812,7 +2812,13 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
return;

if (unlikely(pci_channel_offline(fcport->vha->hw->pdev))) {
qla2x00_abort_all_cmds(fcport->vha, DID_NO_CONNECT << 16);
/* Will wait for wind down of adapter */
ql_dbg(ql_dbg_aer, fcport->vha, 0x900c,
"%s pci offline detected (id %06x)\n", __func__,
fcport->d_id.b24);
qla_pci_set_eeh_busy(fcport->vha);
qla2x00_eh_wait_for_pending_commands(fcport->vha, fcport->d_id.b24,
0, WAIT_TARGET);
return;
}
}
Expand All @@ -2834,7 +2840,11 @@ qla2x00_terminate_rport_io(struct fc_rport *rport)
vha = fcport->vha;

if (unlikely(pci_channel_offline(fcport->vha->hw->pdev))) {
qla2x00_abort_all_cmds(fcport->vha, DID_NO_CONNECT << 16);
/* Will wait for wind down of adapter */
ql_dbg(ql_dbg_aer, fcport->vha, 0x900b,
"%s pci offline detected (id %06x)\n", __func__,
fcport->d_id.b24);
qla_pci_set_eeh_busy(vha);
qla2x00_eh_wait_for_pending_commands(fcport->vha, fcport->d_id.b24,
0, WAIT_TARGET);
return;
Expand Down
2 changes: 1 addition & 1 deletion qla2x00t-32gbit/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ typedef union {
#include "qla_nvme.h"
#define QLA2XXX_DRIVER_NAME "qla2xxx"
#define QLA2XXX_APIDEV "ql2xapidev"
#define QLA2XXX_MANUFACTURER "Marvell Semiconductor, Inc."
#define QLA2XXX_MANUFACTURER "Marvell"

/*
* We have MAILBOX_REGISTER_COUNT sized arrays in a few places,
Expand Down
59 changes: 7 additions & 52 deletions qla2x00t-32gbit/qla_dfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,51 +532,22 @@ qla_dfs_naqp_show(struct seq_file *s, void *unused)
*
* Example for creating "TEST" sysfs file:
* 1. struct qla_hw_data { ... struct dentry *dfs_TEST; }
* 2. QLA_DFS_SETUP_RD(TEST, scsi_qla_host_t);
* 2. QLA_DFS_SETUP_RD(TEST);
* 3. In qla2x00_dfs_setup():
* QLA_DFS_CREATE_FILE(ha, TEST, 0600, ha->dfs_dir, vha);
* 4. In qla2x00_dfs_remove():
* QLA_DFS_REMOVE_FILE(ha, TEST);
*/
#define QLA_DFS_SETUP_RD(_name, _ctx_struct) \
static int \
qla_dfs_##_name##_open(struct inode *inode, struct file *file) \
{ \
_ctx_struct *__ctx = inode->i_private; \
\
return single_open(file, qla_dfs_##_name##_show, __ctx); \
} \
\
static const struct file_operations qla_dfs_##_name##_ops = { \
.open = qla_dfs_##_name##_open, \
.read = seq_read, \
.llseek = seq_lseek, \
.release = single_release, \
};
#define QLA_DFS_SETUP_RD(_name) DEFINE_SHOW_ATTRIBUTE(qla_dfs_##_name)

#define QLA_DFS_SETUP_RW(_name, _ctx_struct) \
static int \
qla_dfs_##_name##_open(struct inode *inode, struct file *file) \
{ \
_ctx_struct *__ctx = inode->i_private; \
\
return single_open(file, qla_dfs_##_name##_show, __ctx); \
} \
\
static const struct file_operations qla_dfs_##_name##_ops = { \
.open = qla_dfs_##_name##_open, \
.read = seq_read, \
.llseek = seq_lseek, \
.release = single_release, \
.write = qla_dfs_##_name##_write, \
};
#define QLA_DFS_SETUP_RW(_name) DEFINE_SHOW_STORE_ATTRIBUTE(qla_dfs_##_name)

#define QLA_DFS_ROOT_CREATE_FILE(_name, _perm, _ctx) \
do { \
if (!qla_dfs_##_name) \
qla_dfs_##_name = debugfs_create_file(#_name, \
_perm, qla2x00_dfs_root, _ctx, \
&qla_dfs_##_name##_ops); \
&qla_dfs_##_name##_fops); \
} while (0)

#define QLA_DFS_ROOT_REMOVE_FILE(_name) \
Expand All @@ -591,7 +562,7 @@ static const struct file_operations qla_dfs_##_name##_ops = { \
do { \
(_struct)->dfs_##_name = debugfs_create_file(#_name, \
_perm, _parent, _ctx, \
&qla_dfs_##_name##_ops) \
&qla_dfs_##_name##_fops) \
} while (0)

#define QLA_DFS_REMOVE_FILE(_struct, _name) \
Expand All @@ -602,14 +573,6 @@ static const struct file_operations qla_dfs_##_name##_ops = { \
} \
} while (0)

static int
qla_dfs_naqp_open(struct inode *inode, struct file *file)
{
struct scsi_qla_host *vha = inode->i_private;

return single_open(file, qla_dfs_naqp_show, vha);
}

static ssize_t
qla_dfs_naqp_write(struct file *file, const char __user *buffer,
size_t count, loff_t *pos)
Expand Down Expand Up @@ -657,15 +620,7 @@ qla_dfs_naqp_write(struct file *file, const char __user *buffer,
kfree(buf);
return rc;
}

static const struct file_operations dfs_naqp_ops = {
.open = qla_dfs_naqp_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.write = qla_dfs_naqp_write,
};

QLA_DFS_SETUP_RW(naqp);

int
qla2x00_dfs_setup(scsi_qla_host_t *vha)
Expand Down Expand Up @@ -711,7 +666,7 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha)

if (IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha)) {
ha->tgt.dfs_naqp = debugfs_create_file("naqp",
0400, ha->dfs_dir, vha, &dfs_naqp_ops);
0400, ha->dfs_dir, vha, &qla_dfs_naqp_fops);
if (IS_ERR(ha->tgt.dfs_naqp)) {
ql_log(ql_log_warn, vha, 0xd011,
"Unable to create debugFS naqp node.\n");
Expand Down
2 changes: 1 addition & 1 deletion qla2x00t-32gbit/qla_edif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ qla_edif_app_getstats(scsi_qla_host_t *vha, BSG_JOB_TYPE *bsg_job)

list_for_each_entry_safe(fcport, tf, &vha->vp_fcports, list) {
if (fcport->edif.enable) {
if (pcnt > app_req.num_ports)
if (pcnt >= app_req.num_ports)
break;

app_reply->elem[pcnt].rekey_count =
Expand Down
2 changes: 1 addition & 1 deletion qla2x00t-32gbit/qla_gbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *);
extern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *);

extern int qla24xx_els_dcmd_iocb(scsi_qla_host_t *, int, port_id_t);
extern int qla24xx_els_dcmd2_iocb(scsi_qla_host_t *, int, fc_port_t *, bool);
extern int qla24xx_els_dcmd2_iocb(scsi_qla_host_t *, int, fc_port_t *);
extern void qla2x00_els_dcmd2_free(scsi_qla_host_t *vha,
struct els_plogi *els_plogi);

Expand Down
Loading
Loading