Even when mounting modern protocol version the server may be
configured without supporting SMB2.1 leases and the client
uses SMB2 oplock to optimize IO performance through local caching.
However there is a problem in oplock break handling that leads
to missing a break notification on the client who has a file
opened. It latter causes big latencies to other clients that
are trying to open the same file.
The problem reproduces when there are multiple shares from the
same server mounted on the client. The processing code tries to
match persistent and volatile file ids from the break notification
with an open file but it skips all share besides the first one.
Fix this by looking up in all shares belonging to the server that
issued the oplock break.
Cc: Stable <stable(a)vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov(a)microsoft.com>
---
fs/cifs/smb2misc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index 8db6201b18ba..527c9efd3de0 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -664,10 +664,10 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
spin_lock(&cifs_tcp_ses_lock);
list_for_each(tmp, &server->smb_ses_list) {
ses = list_entry(tmp, struct cifs_ses, smb_ses_list);
+
list_for_each(tmp1, &ses->tcon_list) {
tcon = list_entry(tmp1, struct cifs_tcon, tcon_list);
- cifs_stats_inc(&tcon->stats.cifs_stats.num_oplock_brks);
spin_lock(&tcon->open_file_lock);
list_for_each(tmp2, &tcon->openFileList) {
cfile = list_entry(tmp2, struct cifsFileInfo,
@@ -679,6 +679,8 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
continue;
cifs_dbg(FYI, "file id match, oplock break\n");
+ cifs_stats_inc(
+ &tcon->stats.cifs_stats.num_oplock_brks);
cinode = CIFS_I(d_inode(cfile->dentry));
spin_lock(&cfile->file_info_lock);
if (!CIFS_CACHE_WRITE(cinode) &&
@@ -702,9 +704,6 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
return true;
}
spin_unlock(&tcon->open_file_lock);
- spin_unlock(&cifs_tcp_ses_lock);
- cifs_dbg(FYI, "No matching file for oplock break\n");
- return true;
}
}
spin_unlock(&cifs_tcp_ses_lock);
--
2.17.1
It is reported that sysfs buffer overflow can be triggered in case
of too many CPU cores(>841 on 4K PAGE_SIZE) when showing CPUs of
hctx via /sys/block/$DEV/mq/$N/cpu_list.
So use snprintf for avoiding the potential buffer overflow.
This version doesn't change the attribute format, and simply stop
to show CPU number if the buffer is to be overflow.
Cc: stable(a)vger.kernel.org
Fixes: 676141e48af7("blk-mq: don't dump CPU -> hw queue map on driver load")
Signed-off-by: Ming Lei <ming.lei(a)redhat.com>
---
block/blk-mq-sysfs.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c
index a0d3ce30fa08..68996ef1d339 100644
--- a/block/blk-mq-sysfs.c
+++ b/block/blk-mq-sysfs.c
@@ -166,20 +166,25 @@ static ssize_t blk_mq_hw_sysfs_nr_reserved_tags_show(struct blk_mq_hw_ctx *hctx,
static ssize_t blk_mq_hw_sysfs_cpus_show(struct blk_mq_hw_ctx *hctx, char *page)
{
+ const size_t size = PAGE_SIZE - 1;
unsigned int i, first = 1;
- ssize_t ret = 0;
+ int ret = 0, pos = 0;
for_each_cpu(i, hctx->cpumask) {
if (first)
- ret += sprintf(ret + page, "%u", i);
+ ret = snprintf(pos + page, size - pos, "%u", i);
else
- ret += sprintf(ret + page, ", %u", i);
+ ret = snprintf(pos + page, size - pos, ", %u", i);
+
+ if (ret >= size - pos)
+ break;
first = 0;
+ pos += ret;
}
- ret += sprintf(ret + page, "\n");
- return ret;
+ ret = snprintf(pos + page, size - pos, "\n");
+ return pos + ret;
}
static struct blk_mq_hw_ctx_sysfs_entry blk_mq_hw_sysfs_nr_tags = {
--
2.20.1
Greetings,
Find this mail very confidential. reply for more details
Thanks.
Peter Wong
----------------------------------------------------
This email was sent by the shareware version of Postman Professional.
Hello,
We ran automated tests on a patchset that was proposed for merging into this
kernel tree. The patches were applied to:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Commit: 95180e47e77a - Linux 5.3.8
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/261488
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Merge testing
-------------
We cloned this repository and checked out the following commit:
Repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Commit: 95180e47e77a - Linux 5.3.8
We grabbed the ae4b15aa39ba commit of the stable queue repository.
We then merged the patchset with `git am`:
io_uring-fix-up-o_nonblock-handling-for-sockets.patch
dm-snapshot-introduce-account_start_copy-and-account.patch
dm-snapshot-rework-cow-throttling-to-fix-deadlock.patch
btrfs-fix-inode-cache-block-reserve-leak-on-failure-.patch
btrfs-qgroup-always-free-prealloc-meta-reserve-in-bt.patch
iio-adc-meson_saradc-fix-memory-allocation-order.patch
iio-fix-center-temperature-of-bmc150-accel-core.patch
libsubcmd-make-_fortify_source-defines-dependent-on-.patch
perf-tests-avoid-raising-segv-using-an-obvious-null-.patch
perf-map-fix-overlapped-map-handling.patch
perf-script-brstackinsn-fix-recovery-from-lbr-binary.patch
perf-jevents-fix-period-for-intel-fixed-counters.patch
perf-tools-propagate-get_cpuid-error.patch
perf-annotate-propagate-perf_env__arch-error.patch
perf-annotate-fix-the-signedness-of-failure-returns.patch
perf-annotate-propagate-the-symbol__annotate-error-r.patch
perf-annotate-fix-arch-specific-init-failure-errors.patch
perf-annotate-return-appropriate-error-code-for-allo.patch
perf-annotate-don-t-return-1-for-error-when-doing-bp.patch
staging-rtl8188eu-fix-null-dereference-when-kzalloc-.patch
rdma-siw-fix-serialization-issue-in-write_space.patch
rdma-hfi1-prevent-memory-leak-in-sdma_init.patch
rdma-iw_cxgb4-fix-srq-access-from-dump_qp.patch
rdma-iwcm-fix-a-lock-inversion-issue.patch
hid-hyperv-use-in-place-iterator-api-in-the-channel-.patch
kselftest-exclude-failed-targets-from-runlist.patch
selftests-kselftest-runner.sh-add-45-second-timeout-.patch
nfs-fix-nfsi-nrequests-count-error-on-nfs_inode_remo.patch
arm64-cpufeature-effectively-expose-frint-capability.patch
arm64-fix-incorrect-irqflag-restore-for-priority-mas.patch
arm64-ftrace-ensure-synchronisation-in-plt-setup-for.patch
tty-serial-owl-fix-the-link-time-qualifier-of-owl_ua.patch
tty-serial-rda-fix-the-link-time-qualifier-of-rda_ua.patch
serial-sifive-select-serial_earlycon.patch
tty-n_hdlc-fix-build-on-sparc.patch
misc-fastrpc-prevent-memory-leak-in-fastrpc_dma_buf_.patch
rdma-core-fix-an-error-handling-path-in-res_get_comm.patch
rdma-cm-fix-memory-leak-in-cm_add-remove_one.patch
rdma-nldev-reshuffle-the-code-to-avoid-need-to-rebin.patch
rdma-mlx5-do-not-allow-rereg-of-a-odp-mr.patch
rdma-mlx5-order-num_pending_prefetch-properly-with-s.patch
rdma-mlx5-add-missing-synchronize_srcu-for-mw-cases.patch
gpio-max77620-use-correct-unit-for-debounce-times.patch
fs-cifs-mute-wunused-const-variable-message.patch
arm64-vdso32-fix-broken-compat-vdso-build-warnings.patch
arm64-vdso32-detect-binutils-support-for-dmb-ishld.patch
serial-mctrl_gpio-check-for-null-pointer.patch
serial-8250_omap-fix-gpio-check-for-auto-rts-cts.patch
arm64-default-to-building-compat-vdso-with-clang-whe.patch
arm64-vdso32-don-t-use-kbuild_cppflags-unconditional.patch
efi-cper-fix-endianness-of-pcie-class-code.patch
efi-x86-do-not-clean-dummy-variable-in-kexec-path.patch
mips-include-mark-__cmpxchg-as-__always_inline.patch
riscv-avoid-kernel-hangs-when-trapped-in-bug.patch
riscv-avoid-sending-a-sigtrap-to-a-user-thread-trapp.patch
riscv-correct-the-handling-of-unexpected-ebreak-in-d.patch
x86-xen-return-from-panic-notifier.patch
ocfs2-clear-zero-in-unaligned-direct-io.patch
fs-ocfs2-fix-possible-null-pointer-dereferences-in-o.patch
fs-ocfs2-fix-a-possible-null-pointer-dereference-in-.patch
fs-ocfs2-fix-a-possible-null-pointer-dereference-in-.patch
btrfs-silence-maybe-uninitialized-warning-in-clone_r.patch
arm64-armv8_deprecated-checking-return-value-for-mem.patch
x86-cpu-add-comet-lake-to-the-intel-cpu-models-heade.patch
sched-fair-scale-bandwidth-quota-and-period-without-.patch
sched-vtime-fix-guest-system-mis-accounting-on-task-.patch
perf-core-rework-memory-accounting-in-perf_mmap.patch
perf-core-fix-corner-case-in-perf_rotate_context.patch
perf-x86-amd-change-fix-nmi-latency-mitigation-to-us.patch
drm-amdgpu-fix-memory-leak.patch
iio-imu-adis16400-release-allocated-memory-on-failur.patch
iio-imu-adis16400-fix-memory-leak.patch
iio-imu-st_lsm6dsx-fix-waitime-for-st_lsm6dsx-i2c-co.patch
mips-include-mark-__xchg-as-__always_inline.patch
mips-fw-sni-fix-out-of-bounds-init-of-o32-stack.patch
s390-cio-fix-virtio-ccw-dma-without-pv.patch
virt-vbox-fix-memory-leak-in-hgcm_call_preprocess_li.patch
nbd-fix-possible-sysfs-duplicate-warning.patch
nfsv4-fix-leak-of-clp-cl_acceptor-string.patch
sunrpc-fix-race-to-sk_err-after-xs_error_report.patch
s390-uaccess-avoid-false-positive-compiler-warnings.patch
tracing-initialize-iter-seq-after-zeroing-in-tracing.patch
perf-annotate-fix-multiple-memory-and-file-descripto.patch
perf-aux-fix-tracking-of-auxiliary-trace-buffer-allo.patch
usb-legousbtower-fix-a-signedness-bug-in-tower_probe.patch
nbd-verify-socket-is-supported-during-setup.patch
arm64-dts-qcom-add-lenovo-miix-630.patch
arm64-dts-qcom-add-hp-envy-x2.patch
arm64-dts-qcom-add-asus-novago-tp370ql.patch
rtw88-fix-misuse-of-genmask-macro.patch
s390-pci-fix-msi-message-data.patch
thunderbolt-correct-path-indices-for-pcie-tunnel.patch
thunderbolt-use-32-bit-writes-when-writing-ring-prod.patch
ath6kl-fix-a-null-ptr-deref-bug-in-ath6kl_usb_alloc_.patch
Compile testing
---------------
We compiled the kernel for 3 architectures:
aarch64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
✅ Boot test
✅ selinux-policy: serge-testsuite
✅ storage: software RAID testing
🚧 ✅ xfstests: xfs
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ storage: dm/common
ppc64le:
Host 1:
✅ Boot test
✅ selinux-policy: serge-testsuite
✅ storage: software RAID testing
🚧 ✅ xfstests: xfs
🚧 ✅ Storage blktests
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ Usex - version 1.9-29
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ storage: dm/common
x86_64:
Host 1:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ Usex - version 1.9-29
✅ stress: stress-ng
✅ trace: ftrace/tracer
🚧 ✅ CIFS Connectathon
🚧 ✅ POSIX pjd-fstest suites
🚧 ✅ storage: dm/common
Host 2:
✅ Boot test
✅ selinux-policy: serge-testsuite
✅ storage: software RAID testing
🚧 ✅ xfstests: xfs
🚧 ✅ Storage blktests
Host 3:
✅ Boot test
🚧 ❌ /kernel/infiniband/env_setup
🚧 ⚡⚡⚡ /kernel/infiniband/sanity
Host 4:
✅ Boot test
🚧 ❌ /kernel/infiniband/env_setup
🚧 ⚡⚡⚡ /kernel/infiniband/sanity
Host 5:
⏱ Boot test
⏱ /kernel/infiniband/env_setup
⏱ /kernel/infiniband/sanity
Host 6:
⏱ Boot test
⏱ /kernel/infiniband/env_setup
⏱ /kernel/infiniband/sanity
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
Waived tests
------------
If the test run included waived tests, they are marked with 🚧. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
The patch titled
Subject: mm: fix trying to reclaim unevictable lru page when calling madvise_pageout
has been added to the -mm tree. Its filename is
mm-fix-trying-to-reclaim-unevictable-lru-page-when-calling-madvise_pageout.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-fix-trying-to-reclaim-unevictab…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-fix-trying-to-reclaim-unevictab…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: zhong jiang <zhongjiang(a)huawei.com>
Subject: mm: fix trying to reclaim unevictable lru page when calling madvise_pageout
Recently, I hit the following issue when running upstream.
kernel BUG at mm/vmscan.c:1521!
invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 23385 Comm: syz-executor.6 Not tainted 5.4.0-rc4+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
RIP: 0010:shrink_page_list+0x12b6/0x3530 mm/vmscan.c:1521
Code: de f5 ff ff e8 ab 79 eb ff 4c 89 f7 e8 43 33 0d 00 e9 cc f5 ff ff e8 99 79 eb ff 48 c7 c6 a0 34 2b a0 4c 89 f7 e8 1a 4d 05 00 <0f> 0b e8 83 79 eb ff 48 89 d8 48 c1 e8 03 42 80 3c 38 00 0f 85 74
RSP: 0018:ffff88819a3df5a0 EFLAGS: 00010286
RAX: 0000000000040000 RBX: ffffea00061c3980 RCX: ffffffff814fba36
RDX: 00000000000056f7 RSI: ffffc9000c02c000 RDI: ffff8881f70268cc
RBP: ffff88819a3df898 R08: ffffed103ee05de0 R09: ffffed103ee05de0
R10: 0000000000000001 R11: ffffed103ee05ddf R12: ffff88819a3df6f0
R13: ffff88819a3df6f0 R14: ffffea00061c3980 R15: dffffc0000000000
FS: 00007f21b9d8e700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2d621000 CR3: 00000001c8c46004 CR4: 00000000007606f0
DR0: 0000000020000140 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
PKRU: 55555554
Call Trace:
reclaim_pages+0x499/0x800 mm/vmscan.c:2188
madvise_cold_or_pageout_pte_range+0x58a/0x710 mm/madvise.c:453
walk_pmd_range mm/pagewalk.c:53 [inline]
walk_pud_range mm/pagewalk.c:112 [inline]
walk_p4d_range mm/pagewalk.c:139 [inline]
walk_pgd_range mm/pagewalk.c:166 [inline]
__walk_page_range+0x45a/0xc20 mm/pagewalk.c:261
walk_page_range+0x179/0x310 mm/pagewalk.c:349
madvise_pageout_page_range mm/madvise.c:506 [inline]
madvise_pageout+0x1f0/0x330 mm/madvise.c:542
madvise_vma mm/madvise.c:931 [inline]
__do_sys_madvise+0x7d2/0x1600 mm/madvise.c:1113
do_syscall_64+0x9f/0x4c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
madvise_pageout() accesses the specified range of the vma and isolates
them, then runs shrink_page_list() to reclaim its memory. But it also
isolates the unevictable pages to reclaim. Hence, we can catch the cases
in shrink_page_list().
The root cause is that we scan the page tables instead of specific LRU
list. and so we need to filter out the unevictable lru pages from our
end.
Link: http://lkml.kernel.org/r/1572616245-18946-1-git-send-email-zhongjiang@huawe…
Fixes: 1a4e58cce84e ("mm: introduce MADV_PAGEOUT")
Signed-off-by: zhong jiang <zhongjiang(a)huawei.com>
Suggested-by: Johannes Weiner <hannes(a)cmpxchg.org>
Acked-by: Johannes Weiner <hannes(a)cmpxchg.org>
Acked-by: Minchan Kim <minchan(a)kernel.org>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/madvise.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
--- a/mm/madvise.c~mm-fix-trying-to-reclaim-unevictable-lru-page-when-calling-madvise_pageout
+++ a/mm/madvise.c
@@ -363,8 +363,12 @@ static int madvise_cold_or_pageout_pte_r
ClearPageReferenced(page);
test_and_clear_page_young(page);
if (pageout) {
- if (!isolate_lru_page(page))
- list_add(&page->lru, &page_list);
+ if (!isolate_lru_page(page)) {
+ if (PageUnevictable(page))
+ putback_lru_page(page);
+ else
+ list_add(&page->lru, &page_list);
+ }
} else
deactivate_page(page);
huge_unlock:
@@ -441,8 +445,12 @@ regular_page:
ClearPageReferenced(page);
test_and_clear_page_young(page);
if (pageout) {
- if (!isolate_lru_page(page))
- list_add(&page->lru, &page_list);
+ if (!isolate_lru_page(page)) {
+ if (PageUnevictable(page))
+ putback_lru_page(page);
+ else
+ list_add(&page->lru, &page_list);
+ }
} else
deactivate_page(page);
}
_
Patches currently in -mm which might be from zhongjiang(a)huawei.com are
mm-fix-trying-to-reclaim-unevictable-lru-page-when-calling-madvise_pageout.patch
mm-gup-allow-cma-migration-to-propagate-errors-back-to-caller.patch
mm-split_huge_pages_fops-should-be-defined-with-define_debugfs_attribute.patch
mm-cma_debug-use-define_debugfs_attribute-to-define-debugfs-fops.patch
mm-hwpoison-inject-use-define_debugfs_attribute-to-define-debugfs-fops.patch
Could not figure out whether I sent this pull request or not. Sorry about
the noise if I did.
The following changes since commit 7d194c2100ad2a6dded545887d02754948ca5241:
Linux 5.4-rc4 (2019-10-20 15:56:22 -0400)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
for you to fetch changes up to b3683dee840274e9997d958b9d82e5de95950f0b:
vringh: fix copy direction of vringh_iov_push_kern() (2019-10-28 04:25:04 -0400)
----------------------------------------------------------------
virtio: fixes
Some minor fixes
Signed-off-by: Michael S. Tsirkin <mst(a)redhat.com>
----------------------------------------------------------------
Jason Wang (1):
vringh: fix copy direction of vringh_iov_push_kern()
Marvin Liu (1):
virtio_ring: fix stalls for packed rings
Stefano Garzarella (1):
vsock/virtio: remove unused 'work' field from 'struct virtio_vsock_pkt'
drivers/vhost/vringh.c | 8 +++++++-
drivers/virtio/virtio_ring.c | 7 +++----
include/linux/virtio_vsock.h | 1 -
3 files changed, 10 insertions(+), 6 deletions(-)
From: James Erwin <james.erwin(a)intel.com>
The driver avoids the gen3 speed bump when the parent
bus speed isn't identical to gen3, 8.0GT/s. This is not
compatible with gen4 and newer speeds.
Fix by relaxing the test to explicitly look for the lower
capability speeds which inherently allows for all future speeds.
Fixes: 7724105686e7 ("IB/hfi1: add driver files")
Cc: <stable(a)vger.kernel.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro(a)intel.com>
Reviewed-by: Kaike Wan <kaike.wan(a)intel.com>
Signed-off-by: James Erwin <james.erwin(a)intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn(a)intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro(a)intel.com>
---
drivers/infiniband/hw/hfi1/pcie.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hfi1/pcie.c b/drivers/infiniband/hw/hfi1/pcie.c
index 61aa550..61362bd 100644
--- a/drivers/infiniband/hw/hfi1/pcie.c
+++ b/drivers/infiniband/hw/hfi1/pcie.c
@@ -319,7 +319,9 @@ int pcie_speeds(struct hfi1_devdata *dd)
/*
* bus->max_bus_speed is set from the bridge's linkcap Max Link Speed
*/
- if (parent && dd->pcidev->bus->max_bus_speed != PCIE_SPEED_8_0GT) {
+ if (parent &&
+ (dd->pcidev->bus->max_bus_speed == PCIE_SPEED_2_5GT ||
+ dd->pcidev->bus->max_bus_speed == PCIE_SPEED_5_0GT)) {
dd_dev_info(dd, "Parent PCIe bridge does not support Gen3\n");
dd->link_gen3_capable = 0;
}
On Sat, Nov 2, 2019 at 12:15 AM Jeffrin Thalakkottoor
<jeffrin(a)rajagiritech.edu.in> wrote:
> But i think when i tried again today i could not reprodu....
i do not know why, but now iam able to reproduce the error
more details follows
---------------------x------x------------------------------------------
GNU Make 4.2.1
Binutils 2.33.1
Util-linux 2.33.1
Mount 2.33.1
Linux C Library 2.29
Dynamic linker (ldd) 2.29
Procps 3.3.15
Kbd 2.0.4
Console-tools 2.0.4
Sh-utils 8.30
Udev 241
------------------------x-----------------x---------------------------
$gcc --version
gcc (Debian 9.2.1-14) 9.2.1 20191025
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---------------------x----------x----------------------------------
--
software engineer
rajagiri school of engineering and technology