Merge a521fc3cfb ("Merge tag 'block-6.1-2022-10-13' of git://git.kernel.dk/linux") into android-mainline
Steps on the way to 6.1-rc1 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Icab63d7ed4dfe1c8f8d5b17943c20d0cb35a096f
This commit is contained in:
commit
79b5e8189e
137 changed files with 1015 additions and 540 deletions
|
|
@ -13,9 +13,6 @@ description: |
|
|||
This module is part of the MT6370 MFD device.
|
||||
Add MT6370 LED driver include 4-channel RGB LED support Register/PWM/Breath Mode
|
||||
|
||||
allOf:
|
||||
- $ref: leds-class-multicolor.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: mediatek,mt6370-indicator
|
||||
|
|
@ -29,6 +26,8 @@ properties:
|
|||
patternProperties:
|
||||
"^multi-led@[0-3]$":
|
||||
type: object
|
||||
$ref: leds-class-multicolor.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
reg:
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ examples:
|
|||
|
||||
charger {
|
||||
compatible = "mediatek,mt6370-charger";
|
||||
interrupts = <48>, <68>, <6>;
|
||||
interrupt-names = "attach_i", "uvp_d_evt", "mivr";
|
||||
interrupts = <68>, <48>, <6>;
|
||||
interrupt-names = "uvp_d_evt", "attach_i", "mivr";
|
||||
io-channels = <&mt6370_adc MT6370_CHAN_IBUS>;
|
||||
|
||||
mt6370_otg_vbus: usb-otg-vbus-regulator {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ differences.
|
|||
* JFFS2 is a write-through file-system, while UBIFS supports write-back,
|
||||
which makes UBIFS much faster on writes.
|
||||
|
||||
Similarly to JFFS2, UBIFS supports on-the-flight compression which makes
|
||||
Similarly to JFFS2, UBIFS supports on-the-fly compression which makes
|
||||
it possible to fit quite a lot of data to the flash.
|
||||
|
||||
Similarly to JFFS2, UBIFS is tolerant of unclean reboots and power-cuts.
|
||||
|
|
|
|||
|
|
@ -38,22 +38,10 @@ not affect to allocation performance, especially if the static keys jump
|
|||
label patching functionality is available. Following is the kernel's code
|
||||
size change due to this facility.
|
||||
|
||||
- Without page owner::
|
||||
|
||||
text data bss dec hex filename
|
||||
48392 2333 644 51369 c8a9 mm/page_alloc.o
|
||||
|
||||
- With page owner::
|
||||
|
||||
text data bss dec hex filename
|
||||
48800 2445 644 51889 cab1 mm/page_alloc.o
|
||||
6662 108 29 6799 1a8f mm/page_owner.o
|
||||
1025 8 8 1041 411 mm/page_ext.o
|
||||
|
||||
Although, roughly, 8 KB code is added in total, page_alloc.o increase by
|
||||
520 bytes and less than half of it is in hotpath. Building the kernel with
|
||||
page owner and turning it on if needed would be great option to debug
|
||||
kernel memory problem.
|
||||
Although enabling page owner increases kernel size by several kilobytes,
|
||||
most of this code is outside page allocator and its hot path. Building
|
||||
the kernel with page owner and turning it on if needed would be great
|
||||
option to debug kernel memory problem.
|
||||
|
||||
There is one notice that is caused by implementation detail. page owner
|
||||
stores information into the memory from struct page extension. This memory
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ required delays, as defined per the RGMII standard, several options may be
|
|||
available:
|
||||
|
||||
* Some SoCs may offer a pin pad/mux/controller capable of configuring a given
|
||||
set of pins'strength, delays, and voltage; and it may be a suitable
|
||||
set of pins' strength, delays, and voltage; and it may be a suitable
|
||||
option to insert the expected 2ns RGMII delay.
|
||||
|
||||
* Modifying the PCB design to include a fixed delay (e.g: using a specifically
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ to subscribe and unsubscribe from the list can be found at:
|
|||
There are archives of the mailing list on the web in many different
|
||||
places. Use a search engine to find these archives. For example:
|
||||
|
||||
http://dir.gmane.org/gmane.linux.kernel
|
||||
https://lore.kernel.org/lkml/
|
||||
|
||||
It is highly recommended that you search the archives about the topic
|
||||
you want to bring up, before you post it to the list. A lot of things
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ higher than *30 us*. It is also set to stop the session if a *Thread* timer
|
|||
latency higher than *30 us* is hit. Finally, it is set to save the trace
|
||||
buffer if the stop condition is hit::
|
||||
|
||||
[root@alien ~]# rtla timerlat top -s 30 -t 30 -T
|
||||
[root@alien ~]# rtla timerlat top -s 30 -T 30 -t
|
||||
Timer Latency
|
||||
0 00:00:59 | IRQ Timer Latency (us) | Thread Timer Latency (us)
|
||||
CPU COUNT | cur min avg max | cur min avg max
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ of ftrace. Here is a list of some of the key files:
|
|||
|
||||
start::
|
||||
|
||||
trace_fd = open("trace_marker", WR_ONLY);
|
||||
trace_fd = open("trace_marker", O_WRONLY);
|
||||
|
||||
Note: Writing into the trace_marker file can also initiate triggers
|
||||
that are written into /sys/kernel/tracing/events/ftrace/print/trigger
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ trovati al sito:
|
|||
Ci sono diversi archivi della lista di discussione. Usate un qualsiasi motore
|
||||
di ricerca per trovarli. Per esempio:
|
||||
|
||||
http://dir.gmane.org/gmane.linux.kernel
|
||||
https://lore.kernel.org/lkml/
|
||||
|
||||
É caldamente consigliata una ricerca in questi archivi sul tema che volete
|
||||
sollevare, prima di pubblicarlo sulla lista. Molte cose sono già state
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ https://bugzilla.kernel.org に行ってください。もし今後のバグレ
|
|||
このメーリングリストのアーカイブは web 上の多数の場所に存在します。こ
|
||||
れらのアーカイブを探すにはサーチエンジンを使いましょう。例えば-
|
||||
|
||||
http://dir.gmane.org/gmane.linux.kernel
|
||||
https://lore.kernel.org/lkml/
|
||||
|
||||
リストに投稿する前にすでにその話題がアーカイブに存在するかどうかを検索
|
||||
することを是非やってください。多数の事がすでに詳細に渡って議論されてお
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ https://bugzilla.kernel.org 를 체크하고자 할 수도 있다; 소수의 커
|
|||
웹상의 많은 다른 곳에도 메일링 리스트의 아카이브들이 있다.
|
||||
이러한 아카이브들을 찾으려면 검색 엔진을 사용하라. 예를 들어:
|
||||
|
||||
http://dir.gmane.org/gmane.linux.kernel
|
||||
https://lore.kernel.org/lkml/
|
||||
|
||||
여러분이 새로운 문제에 관해 리스트에 올리기 전에 말하고 싶은 주제에 관한
|
||||
것을 아카이브에서 먼저 찾아보기를 강력히 권장한다. 이미 상세하게 토론된 많은
|
||||
|
|
|
|||
29
Documentation/translations/zh_CN/arch.rst
Normal file
29
Documentation/translations/zh_CN/arch.rst
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
处理器体系结构
|
||||
==============
|
||||
|
||||
以下文档提供了具体架构实现的编程细节。
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
mips/index
|
||||
arm64/index
|
||||
riscv/index
|
||||
openrisc/index
|
||||
parisc/index
|
||||
loongarch/index
|
||||
|
||||
TODOList:
|
||||
|
||||
* arm/index
|
||||
* ia64/index
|
||||
* m68k/index
|
||||
* nios2/index
|
||||
* powerpc/index
|
||||
* s390/index
|
||||
* sh/index
|
||||
* sparc/index
|
||||
* x86/index
|
||||
* xtensa/index
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
.. include:: ../disclaimer-zh_CN.rst
|
||||
|
||||
:Original: Documentation/Devicetree/changesets.rst
|
||||
:Original: Documentation/devicetree/changesets.rst
|
||||
|
||||
:翻译:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
.. include:: ../disclaimer-zh_CN.rst
|
||||
|
||||
:Original: Documentation/Devicetree/dynamic-resolution-notes.rst
|
||||
:Original: Documentation/devicetree/dynamic-resolution-notes.rst
|
||||
|
||||
:翻译:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
.. include:: ../disclaimer-zh_CN.rst
|
||||
|
||||
:Original: Documentation/Devicetree/kernel-api.rst
|
||||
:Original: Documentation/devicetree/kernel-api.rst
|
||||
|
||||
:翻译:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
.. include:: ../disclaimer-zh_CN.rst
|
||||
|
||||
:Original: Documentation/Devicetree/overlay-notes.rst
|
||||
:Original: Documentation/devicetree/overlay-notes.rst
|
||||
|
||||
:翻译:
|
||||
|
||||
|
|
|
|||
|
|
@ -26,30 +26,78 @@
|
|||
顺便说下,中文文档也需要遵守内核编码风格,风格中中文和英文的主要不同就是中文
|
||||
的字符标点占用两个英文字符宽度, 所以,当英文要求不要超过每行100个字符时,
|
||||
中文就不要超过50个字符。另外,也要注意'-','=' 等符号与相关标题的对齐。在将
|
||||
补丁提交到社区之前,一定要进行必要的checkpatch.pl检查和编译测试。
|
||||
补丁提交到社区之前,一定要进行必要的 ``checkpatch.pl`` 检查和编译测试。
|
||||
|
||||
许可证文档
|
||||
----------
|
||||
与Linux 内核社区一起工作
|
||||
------------------------
|
||||
|
||||
下面的文档介绍了Linux内核源代码的许可证(GPLv2)、如何在源代码树中正确标记
|
||||
单个文件的许可证、以及指向完整许可证文本的链接。
|
||||
|
||||
* Documentation/translations/zh_CN/process/license-rules.rst
|
||||
|
||||
用户文档
|
||||
--------
|
||||
|
||||
下面的手册是为内核用户编写的——即那些试图让它在给定系统上以最佳方式工作的
|
||||
用户。
|
||||
与内核开发社区进行协作并将工作推向上游的基本指南。
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:maxdepth: 1
|
||||
|
||||
admin-guide/index
|
||||
process/development-process
|
||||
process/submitting-patches
|
||||
行为准则 <process/code-of-conduct>
|
||||
maintainer/index
|
||||
完整开发流程文档 <process/index>
|
||||
|
||||
内部API文档
|
||||
-----------
|
||||
|
||||
开发人员使用的内核内部交互接口手册。
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
core-api/index
|
||||
driver-api/index
|
||||
内核中的锁 <locking/index>
|
||||
|
||||
TODOList:
|
||||
|
||||
* kbuild/index
|
||||
* subsystem-apis
|
||||
|
||||
开发工具和流程
|
||||
--------------
|
||||
|
||||
为所有内核开发人员提供有用信息的各种其他手册。
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
process/license-rules
|
||||
doc-guide/index
|
||||
dev-tools/index
|
||||
dev-tools/testing-overview
|
||||
kernel-hacking/index
|
||||
|
||||
TODOList:
|
||||
|
||||
* trace/index
|
||||
* fault-injection/index
|
||||
* livepatch/index
|
||||
|
||||
面向用户的文档
|
||||
--------------
|
||||
|
||||
下列手册针对
|
||||
希望内核在给定系统上以最佳方式工作的*用户*,
|
||||
和查找内核用户空间API信息的程序开发人员。
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
admin-guide/index
|
||||
admin-guide/reporting-issues.rst
|
||||
|
||||
TODOList:
|
||||
|
||||
* 内核构建系统 <kbuild/index>
|
||||
* 用户空间工具 <tools/index>
|
||||
* userspace-api/index
|
||||
|
||||
也可参考独立于内核文档的 `Linux 手册页 <https://www.kernel.org/doc/man-pages/>`_ 。
|
||||
|
||||
固件相关文档
|
||||
------------
|
||||
|
|
@ -65,126 +113,13 @@ TODOList:
|
|||
|
||||
* firmware-guide/index
|
||||
|
||||
应用程序开发人员文档
|
||||
--------------------
|
||||
|
||||
用户空间API手册涵盖了描述应用程序开发人员可见内核接口方面的文档。
|
||||
|
||||
TODOlist:
|
||||
|
||||
* userspace-api/index
|
||||
|
||||
内核开发简介
|
||||
体系结构文档
|
||||
------------
|
||||
|
||||
这些手册包含有关如何开发内核的整体信息。内核社区非常庞大,一年下来有数千名
|
||||
开发人员做出贡献。与任何大型社区一样,知道如何完成任务将使得更改合并的过程
|
||||
变得更加容易。
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
process/index
|
||||
dev-tools/index
|
||||
doc-guide/index
|
||||
kernel-hacking/index
|
||||
maintainer/index
|
||||
|
||||
TODOList:
|
||||
|
||||
* trace/index
|
||||
* fault-injection/index
|
||||
* livepatch/index
|
||||
* rust/index
|
||||
|
||||
内核API文档
|
||||
-----------
|
||||
|
||||
以下手册从内核开发人员的角度详细介绍了特定的内核子系统是如何工作的。这里的
|
||||
大部分信息都是直接从内核源代码获取的,并根据需要添加补充材料(或者至少是在
|
||||
我们设法添加的时候——可能不是所有的都是有需要的)。
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
core-api/index
|
||||
driver-api/index
|
||||
locking/index
|
||||
accounting/index
|
||||
cpu-freq/index
|
||||
iio/index
|
||||
infiniband/index
|
||||
power/index
|
||||
virt/index
|
||||
sound/index
|
||||
filesystems/index
|
||||
scheduler/index
|
||||
mm/index
|
||||
peci/index
|
||||
PCI/index
|
||||
|
||||
TODOList:
|
||||
|
||||
* block/index
|
||||
* cdrom/index
|
||||
* ide/index
|
||||
* fb/index
|
||||
* fpga/index
|
||||
* hid/index
|
||||
* i2c/index
|
||||
* isdn/index
|
||||
* leds/index
|
||||
* netlabel/index
|
||||
* networking/index
|
||||
* pcmcia/index
|
||||
* target/index
|
||||
* timers/index
|
||||
* spi/index
|
||||
* w1/index
|
||||
* watchdog/index
|
||||
* input/index
|
||||
* hwmon/index
|
||||
* gpu/index
|
||||
* security/index
|
||||
* crypto/index
|
||||
* bpf/index
|
||||
* usb/index
|
||||
* scsi/index
|
||||
* misc-devices/index
|
||||
* mhi/index
|
||||
|
||||
体系结构无关文档
|
||||
----------------
|
||||
|
||||
TODOList:
|
||||
|
||||
* asm-annotations
|
||||
|
||||
特定体系结构文档
|
||||
----------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
mips/index
|
||||
arm64/index
|
||||
riscv/index
|
||||
openrisc/index
|
||||
parisc/index
|
||||
loongarch/index
|
||||
|
||||
TODOList:
|
||||
|
||||
* arm/index
|
||||
* ia64/index
|
||||
* m68k/index
|
||||
* nios2/index
|
||||
* powerpc/index
|
||||
* s390/index
|
||||
* sh/index
|
||||
* sparc/index
|
||||
* x86/index
|
||||
* xtensa/index
|
||||
arch
|
||||
|
||||
其他文档
|
||||
--------
|
||||
|
|
@ -195,9 +130,9 @@ TODOList:
|
|||
TODOList:
|
||||
|
||||
* staging/index
|
||||
* watch_queue
|
||||
|
||||
目录和表格
|
||||
|
||||
索引和表格
|
||||
----------
|
||||
|
||||
* :ref:`genindex`
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ KSM的用户空间的接口在Documentation/translations/zh_CN/admin-guide/mm/ks
|
|||
KSM维护着稳定树中的KSM页的逆映射信息。
|
||||
|
||||
当KSM页面的共享数小于 ``max_page_sharing`` 的虚拟内存区域(VMAs)时,则代表了
|
||||
KSM页的稳定树其中的节点指向了一个rmap_item结构体类型的列表。同时,这个KSM页
|
||||
KSM页的稳定树其中的节点指向了一个ksm_rmap_item结构体类型的列表。同时,这个KSM页
|
||||
的 ``page->mapping`` 指向了该稳定树节点。
|
||||
|
||||
如果共享数超过了阈值,KSM将给稳定树添加第二个维度。稳定树就变成链接一个或多
|
||||
|
|
|
|||
|
|
@ -74,15 +74,19 @@ page owner在默认情况下是禁用的。所以,如果你想使用它,你
|
|||
cat /sys/kernel/debug/page_owner > page_owner_full.txt
|
||||
./page_owner_sort page_owner_full.txt sorted_page_owner.txt
|
||||
|
||||
``page_owner_full.txt`` 的一般输出情况如下(输出信息无翻译价值)::
|
||||
``page_owner_full.txt`` 的一般输出情况如下::
|
||||
|
||||
Page allocated via order XXX, ...
|
||||
PFN XXX ...
|
||||
// Detailed stack
|
||||
// 栈详情
|
||||
|
||||
Page allocated via order XXX, ...
|
||||
PFN XXX ...
|
||||
// Detailed stack
|
||||
// 栈详情
|
||||
默认情况下,它将以一个给定的pfn开始,做完整的pfn转储,且page_owner支持fseek。
|
||||
|
||||
FILE *fp = fopen("/sys/kernel/debug/page_owner", "r");
|
||||
fseek(fp, pfn_start, SEEK_SET);
|
||||
|
||||
``page_owner_sort`` 工具忽略了 ``PFN`` 行,将剩余的行放在buf中,使用regexp提
|
||||
取页序值,计算buf的次数和页数,最后根据参数进行排序。
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ bugzilla.kernel.org是Linux内核开发者们用来跟踪内核Bug的网站。
|
|||
网上很多地方都有这个邮件列表的存档(archive)。可以使用搜索引擎来找到这些
|
||||
存档。比如:
|
||||
|
||||
http://dir.gmane.org/gmane.linux.kernel
|
||||
https://lore.kernel.org/lkml/
|
||||
|
||||
在发信之前,我们强烈建议你先在存档中搜索你想要讨论的问题。很多已经被详细
|
||||
讨论过的问题只在邮件列表的存档中可以找到。
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
.. _cn_process_index:
|
||||
|
||||
========================
|
||||
与Linux 内核社区一起工作
|
||||
========================
|
||||
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ bugzilla.kernel.org是Linux內核開發者們用來跟蹤內核Bug的網站。
|
|||
網上很多地方都有這個郵件列表的存檔(archive)。可以使用搜尋引擎來找到這些
|
||||
存檔。比如:
|
||||
|
||||
http://dir.gmane.org/gmane.linux.kernel
|
||||
https://lore.kernel.org/lkml/
|
||||
|
||||
在發信之前,我們強烈建議你先在存檔中搜索你想要討論的問題。很多已經被詳細
|
||||
討論過的問題只在郵件列表的存檔中可以找到。
|
||||
|
|
|
|||
22
MAINTAINERS
22
MAINTAINERS
|
|
@ -15366,17 +15366,6 @@ L: linux-rdma@vger.kernel.org
|
|||
S: Supported
|
||||
F: drivers/infiniband/ulp/opa_vnic
|
||||
|
||||
OPEN FIRMWARE AND DEVICE TREE OVERLAYS
|
||||
M: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
|
||||
M: Frank Rowand <frowand.list@gmail.com>
|
||||
L: devicetree@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/dynamic-resolution-notes.rst
|
||||
F: Documentation/devicetree/overlay-notes.rst
|
||||
F: drivers/of/overlay.c
|
||||
F: drivers/of/resolver.c
|
||||
K: of_overlay_notifier_
|
||||
|
||||
OPEN FIRMWARE AND FLATTENED DEVICE TREE
|
||||
M: Rob Herring <robh+dt@kernel.org>
|
||||
M: Frank Rowand <frowand.list@gmail.com>
|
||||
|
|
@ -15389,6 +15378,9 @@ F: Documentation/ABI/testing/sysfs-firmware-ofw
|
|||
F: drivers/of/
|
||||
F: include/linux/of*.h
|
||||
F: scripts/dtc/
|
||||
K: of_overlay_notifier_
|
||||
K: of_overlay_fdt_apply
|
||||
K: of_overlay_remove
|
||||
|
||||
OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
|
||||
M: Rob Herring <robh+dt@kernel.org>
|
||||
|
|
@ -18530,8 +18522,7 @@ S: Maintained
|
|||
F: drivers/mmc/host/sdhci-esdhc-imx.c
|
||||
|
||||
SECURE ENCRYPTING DEVICE (SED) OPAL DRIVER
|
||||
M: Jonathan Derrick <jonathan.derrick@intel.com>
|
||||
M: Revanth Rajashekar <revanth.rajashekar@intel.com>
|
||||
M: Jonathan Derrick <jonathan.derrick@linux.dev>
|
||||
L: linux-block@vger.kernel.org
|
||||
S: Supported
|
||||
F: block/opal_proto.h
|
||||
|
|
@ -18677,6 +18668,7 @@ F: drivers/misc/sgi-xp/
|
|||
SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS
|
||||
M: Karsten Graul <kgraul@linux.ibm.com>
|
||||
M: Wenjia Zhang <wenjia@linux.ibm.com>
|
||||
M: Jan Karcher <jaka@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||
|
|
@ -21746,6 +21738,10 @@ F: include/linux/virtio*.h
|
|||
F: include/uapi/linux/virtio_*.h
|
||||
F: tools/virtio/
|
||||
|
||||
IFCVF VIRTIO DATA PATH ACCELERATOR
|
||||
R: Zhu Lingshan <lingshan.zhu@intel.com>
|
||||
F: drivers/vdpa/ifcvf/
|
||||
|
||||
VIRTIO BALLOON
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
M: David Hildenbrand <david@redhat.com>
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ EXPORT_SYMBOL(bio_alloc_bioset);
|
|||
* be reused by calling bio_uninit() before calling bio_init() again.
|
||||
*
|
||||
* Note that unlike bio_alloc() or bio_alloc_bioset() allocations from this
|
||||
* function are not backed by a mempool can can fail. Do not use this function
|
||||
* function are not backed by a mempool can fail. Do not use this function
|
||||
* for allocations in the file system I/O path.
|
||||
*
|
||||
* Returns: Pointer to new bio on success, NULL on failure.
|
||||
|
|
|
|||
|
|
@ -841,12 +841,11 @@ int wbt_init(struct request_queue *q)
|
|||
rwb->last_comp = rwb->last_issue = jiffies;
|
||||
rwb->win_nsec = RWB_WINDOW_NSEC;
|
||||
rwb->enable_state = WBT_STATE_ON_DEFAULT;
|
||||
rwb->wc = 1;
|
||||
rwb->wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags);
|
||||
rwb->rq_depth.default_depth = RWB_DEF_DEPTH;
|
||||
rwb->min_lat_nsec = wbt_default_latency_nsec(q);
|
||||
|
||||
wbt_queue_depth_changed(&rwb->rqos);
|
||||
wbt_set_write_cache(q, test_bit(QUEUE_FLAG_WC, &q->queue_flags));
|
||||
|
||||
/*
|
||||
* Assign rwb and add the stats callback.
|
||||
|
|
|
|||
|
|
@ -507,6 +507,13 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
|
|||
*/
|
||||
dev_set_uevent_suppress(ddev, 0);
|
||||
disk_uevent(disk, KOBJ_ADD);
|
||||
} else {
|
||||
/*
|
||||
* Even if the block_device for a hidden gendisk is not
|
||||
* registered, it needs to have a valid bd_dev so that the
|
||||
* freeing of the dynamic major works.
|
||||
*/
|
||||
disk->part0->bd_dev = MKDEV(disk->major, disk->first_minor);
|
||||
}
|
||||
|
||||
disk_update_readahead(disk);
|
||||
|
|
|
|||
|
|
@ -2345,8 +2345,7 @@ HFC_init(void)
|
|||
static void __exit
|
||||
HFC_cleanup(void)
|
||||
{
|
||||
if (timer_pending(&hfc_tl))
|
||||
del_timer_sync(&hfc_tl);
|
||||
del_timer_sync(&hfc_tl);
|
||||
|
||||
pci_unregister_driver(&hfc_driver);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1140,8 +1140,12 @@ static void mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
|
|||
{
|
||||
struct mmc_blk_data *md = mq->blkdata;
|
||||
struct mmc_card *card = md->queue.card;
|
||||
unsigned int arg = card->erase_arg;
|
||||
|
||||
mmc_blk_issue_erase_rq(mq, req, MMC_BLK_DISCARD, card->erase_arg);
|
||||
if (mmc_card_broken_sd_discard(card))
|
||||
arg = SD_ERASE_ARG;
|
||||
|
||||
mmc_blk_issue_erase_rq(mq, req, MMC_BLK_DISCARD, arg);
|
||||
}
|
||||
|
||||
static void mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq,
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ struct mmc_fixup {
|
|||
#define EXT_CSD_REV_ANY (-1u)
|
||||
|
||||
#define CID_MANFID_SANDISK 0x2
|
||||
#define CID_MANFID_SANDISK_SD 0x3
|
||||
#define CID_MANFID_ATP 0x9
|
||||
#define CID_MANFID_TOSHIBA 0x11
|
||||
#define CID_MANFID_MICRON 0x13
|
||||
|
|
@ -258,4 +259,9 @@ static inline int mmc_card_broken_hpi(const struct mmc_card *c)
|
|||
return c->quirks & MMC_QUIRK_BROKEN_HPI;
|
||||
}
|
||||
|
||||
static inline int mmc_card_broken_sd_discard(const struct mmc_card *c)
|
||||
{
|
||||
return c->quirks & MMC_QUIRK_BROKEN_SD_DISCARD;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -100,6 +100,12 @@ static const struct mmc_fixup __maybe_unused mmc_blk_fixups[] = {
|
|||
MMC_FIXUP("V10016", CID_MANFID_KINGSTON, CID_OEMID_ANY, add_quirk_mmc,
|
||||
MMC_QUIRK_TRIM_BROKEN),
|
||||
|
||||
/*
|
||||
* Some SD cards reports discard support while they don't
|
||||
*/
|
||||
MMC_FIXUP(CID_NAME_ANY, CID_MANFID_SANDISK_SD, 0x5344, add_quirk_sd,
|
||||
MMC_QUIRK_BROKEN_SD_DISCARD),
|
||||
|
||||
END_FIXUP
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host,
|
|||
struct clk *ref_clk = priv->clk;
|
||||
unsigned int freq, diff, best_freq = 0, diff_min = ~0;
|
||||
unsigned int new_clock, clkh_shift = 0;
|
||||
unsigned int new_upper_limit;
|
||||
int i;
|
||||
|
||||
/*
|
||||
|
|
@ -153,13 +154,20 @@ static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host,
|
|||
* greater than, new_clock. As we can divide by 1 << i for
|
||||
* any i in [0, 9] we want the input clock to be as close as
|
||||
* possible, but no greater than, new_clock << i.
|
||||
*
|
||||
* Add an upper limit of 1/1024 rate higher to the clock rate to fix
|
||||
* clk rate jumping to lower rate due to rounding error (eg: RZ/G2L has
|
||||
* 3 clk sources 533.333333 MHz, 400 MHz and 266.666666 MHz. The request
|
||||
* for 533.333333 MHz will selects a slower 400 MHz due to rounding
|
||||
* error (533333333 Hz / 4 * 4 = 533333332 Hz < 533333333 Hz)).
|
||||
*/
|
||||
for (i = min(9, ilog2(UINT_MAX / new_clock)); i >= 0; i--) {
|
||||
freq = clk_round_rate(ref_clk, new_clock << i);
|
||||
if (freq > (new_clock << i)) {
|
||||
new_upper_limit = (new_clock << i) + ((new_clock << i) >> 10);
|
||||
if (freq > new_upper_limit) {
|
||||
/* Too fast; look for a slightly slower option */
|
||||
freq = clk_round_rate(ref_clk, (new_clock << i) / 4 * 3);
|
||||
if (freq > (new_clock << i))
|
||||
if (freq > new_upper_limit)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -181,6 +189,7 @@ static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host,
|
|||
static void renesas_sdhi_set_clock(struct tmio_mmc_host *host,
|
||||
unsigned int new_clock)
|
||||
{
|
||||
unsigned int clk_margin;
|
||||
u32 clk = 0, clock;
|
||||
|
||||
sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~CLK_CTL_SCLKEN &
|
||||
|
|
@ -194,7 +203,13 @@ static void renesas_sdhi_set_clock(struct tmio_mmc_host *host,
|
|||
host->mmc->actual_clock = renesas_sdhi_clk_update(host, new_clock);
|
||||
clock = host->mmc->actual_clock / 512;
|
||||
|
||||
for (clk = 0x80000080; new_clock >= (clock << 1); clk >>= 1)
|
||||
/*
|
||||
* Add a margin of 1/1024 rate higher to the clock rate in order
|
||||
* to avoid clk variable setting a value of 0 due to the margin
|
||||
* provided for actual_clock in renesas_sdhi_clk_update().
|
||||
*/
|
||||
clk_margin = new_clock >> 10;
|
||||
for (clk = 0x80000080; new_clock + clk_margin >= (clock << 1); clk >>= 1)
|
||||
clock <<= 1;
|
||||
|
||||
/* 1/1 clock is option */
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ static unsigned int sdhci_sprd_get_max_clock(struct sdhci_host *host)
|
|||
|
||||
static unsigned int sdhci_sprd_get_min_clock(struct sdhci_host *host)
|
||||
{
|
||||
return 400000;
|
||||
return 100000;
|
||||
}
|
||||
|
||||
static void sdhci_sprd_set_uhs_signaling(struct sdhci_host *host,
|
||||
|
|
|
|||
|
|
@ -773,7 +773,7 @@ static void tegra_sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
|
|||
dev_err(dev, "failed to set clk rate to %luHz: %d\n",
|
||||
host_clk, err);
|
||||
|
||||
tegra_host->curr_clk_rate = host_clk;
|
||||
tegra_host->curr_clk_rate = clk_get_rate(pltfm_host->clk);
|
||||
if (tegra_host->ddr_signaling)
|
||||
host->max_clk = host_clk;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -178,6 +178,8 @@ struct kvaser_usb_dev_cfg {
|
|||
extern const struct kvaser_usb_dev_ops kvaser_usb_hydra_dev_ops;
|
||||
extern const struct kvaser_usb_dev_ops kvaser_usb_leaf_dev_ops;
|
||||
|
||||
void kvaser_usb_unlink_tx_urbs(struct kvaser_usb_net_priv *priv);
|
||||
|
||||
int kvaser_usb_recv_cmd(const struct kvaser_usb *dev, void *cmd, int len,
|
||||
int *actual_len);
|
||||
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ static void kvaser_usb_reset_tx_urb_contexts(struct kvaser_usb_net_priv *priv)
|
|||
/* This method might sleep. Do not call it in the atomic context
|
||||
* of URB completions.
|
||||
*/
|
||||
static void kvaser_usb_unlink_tx_urbs(struct kvaser_usb_net_priv *priv)
|
||||
void kvaser_usb_unlink_tx_urbs(struct kvaser_usb_net_priv *priv)
|
||||
{
|
||||
usb_kill_anchored_urbs(&priv->tx_submitted);
|
||||
kvaser_usb_reset_tx_urb_contexts(priv);
|
||||
|
|
@ -729,6 +729,7 @@ static int kvaser_usb_init_one(struct kvaser_usb *dev, int channel)
|
|||
init_usb_anchor(&priv->tx_submitted);
|
||||
init_completion(&priv->start_comp);
|
||||
init_completion(&priv->stop_comp);
|
||||
init_completion(&priv->flush_comp);
|
||||
priv->can.ctrlmode_supported = 0;
|
||||
|
||||
priv->dev = dev;
|
||||
|
|
|
|||
|
|
@ -1916,7 +1916,7 @@ static int kvaser_usb_hydra_flush_queue(struct kvaser_usb_net_priv *priv)
|
|||
{
|
||||
int err;
|
||||
|
||||
init_completion(&priv->flush_comp);
|
||||
reinit_completion(&priv->flush_comp);
|
||||
|
||||
err = kvaser_usb_hydra_send_simple_cmd(priv->dev, CMD_FLUSH_QUEUE,
|
||||
priv->channel);
|
||||
|
|
|
|||
|
|
@ -310,6 +310,38 @@ struct kvaser_cmd {
|
|||
} u;
|
||||
} __packed;
|
||||
|
||||
#define CMD_SIZE_ANY 0xff
|
||||
#define kvaser_fsize(field) sizeof_field(struct kvaser_cmd, field)
|
||||
|
||||
static const u8 kvaser_usb_leaf_cmd_sizes_leaf[] = {
|
||||
[CMD_START_CHIP_REPLY] = kvaser_fsize(u.simple),
|
||||
[CMD_STOP_CHIP_REPLY] = kvaser_fsize(u.simple),
|
||||
[CMD_GET_CARD_INFO_REPLY] = kvaser_fsize(u.cardinfo),
|
||||
[CMD_TX_ACKNOWLEDGE] = kvaser_fsize(u.tx_acknowledge_header),
|
||||
[CMD_GET_SOFTWARE_INFO_REPLY] = kvaser_fsize(u.leaf.softinfo),
|
||||
[CMD_RX_STD_MESSAGE] = kvaser_fsize(u.leaf.rx_can),
|
||||
[CMD_RX_EXT_MESSAGE] = kvaser_fsize(u.leaf.rx_can),
|
||||
[CMD_LEAF_LOG_MESSAGE] = kvaser_fsize(u.leaf.log_message),
|
||||
[CMD_CHIP_STATE_EVENT] = kvaser_fsize(u.leaf.chip_state_event),
|
||||
[CMD_CAN_ERROR_EVENT] = kvaser_fsize(u.leaf.error_event),
|
||||
/* ignored events: */
|
||||
[CMD_FLUSH_QUEUE_REPLY] = CMD_SIZE_ANY,
|
||||
};
|
||||
|
||||
static const u8 kvaser_usb_leaf_cmd_sizes_usbcan[] = {
|
||||
[CMD_START_CHIP_REPLY] = kvaser_fsize(u.simple),
|
||||
[CMD_STOP_CHIP_REPLY] = kvaser_fsize(u.simple),
|
||||
[CMD_GET_CARD_INFO_REPLY] = kvaser_fsize(u.cardinfo),
|
||||
[CMD_TX_ACKNOWLEDGE] = kvaser_fsize(u.tx_acknowledge_header),
|
||||
[CMD_GET_SOFTWARE_INFO_REPLY] = kvaser_fsize(u.usbcan.softinfo),
|
||||
[CMD_RX_STD_MESSAGE] = kvaser_fsize(u.usbcan.rx_can),
|
||||
[CMD_RX_EXT_MESSAGE] = kvaser_fsize(u.usbcan.rx_can),
|
||||
[CMD_CHIP_STATE_EVENT] = kvaser_fsize(u.usbcan.chip_state_event),
|
||||
[CMD_CAN_ERROR_EVENT] = kvaser_fsize(u.usbcan.error_event),
|
||||
/* ignored events: */
|
||||
[CMD_USBCAN_CLOCK_OVERFLOW_EVENT] = CMD_SIZE_ANY,
|
||||
};
|
||||
|
||||
/* Summary of a kvaser error event, for a unified Leaf/Usbcan error
|
||||
* handling. Some discrepancies between the two families exist:
|
||||
*
|
||||
|
|
@ -397,6 +429,43 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_imx_dev_cfg_32mhz = {
|
|||
.bittiming_const = &kvaser_usb_flexc_bittiming_const,
|
||||
};
|
||||
|
||||
static int kvaser_usb_leaf_verify_size(const struct kvaser_usb *dev,
|
||||
const struct kvaser_cmd *cmd)
|
||||
{
|
||||
/* buffer size >= cmd->len ensured by caller */
|
||||
u8 min_size = 0;
|
||||
|
||||
switch (dev->driver_info->family) {
|
||||
case KVASER_LEAF:
|
||||
if (cmd->id < ARRAY_SIZE(kvaser_usb_leaf_cmd_sizes_leaf))
|
||||
min_size = kvaser_usb_leaf_cmd_sizes_leaf[cmd->id];
|
||||
break;
|
||||
case KVASER_USBCAN:
|
||||
if (cmd->id < ARRAY_SIZE(kvaser_usb_leaf_cmd_sizes_usbcan))
|
||||
min_size = kvaser_usb_leaf_cmd_sizes_usbcan[cmd->id];
|
||||
break;
|
||||
}
|
||||
|
||||
if (min_size == CMD_SIZE_ANY)
|
||||
return 0;
|
||||
|
||||
if (min_size) {
|
||||
min_size += CMD_HEADER_LEN;
|
||||
if (cmd->len >= min_size)
|
||||
return 0;
|
||||
|
||||
dev_err_ratelimited(&dev->intf->dev,
|
||||
"Received command %u too short (size %u, needed %u)",
|
||||
cmd->id, cmd->len, min_size);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
dev_warn_ratelimited(&dev->intf->dev,
|
||||
"Unhandled command (%d, size %d)\n",
|
||||
cmd->id, cmd->len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static void *
|
||||
kvaser_usb_leaf_frame_to_cmd(const struct kvaser_usb_net_priv *priv,
|
||||
const struct sk_buff *skb, int *cmd_len,
|
||||
|
|
@ -502,6 +571,9 @@ static int kvaser_usb_leaf_wait_cmd(const struct kvaser_usb *dev, u8 id,
|
|||
end:
|
||||
kfree(buf);
|
||||
|
||||
if (err == 0)
|
||||
err = kvaser_usb_leaf_verify_size(dev, cmd);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -1133,6 +1205,9 @@ static void kvaser_usb_leaf_stop_chip_reply(const struct kvaser_usb *dev,
|
|||
static void kvaser_usb_leaf_handle_command(const struct kvaser_usb *dev,
|
||||
const struct kvaser_cmd *cmd)
|
||||
{
|
||||
if (kvaser_usb_leaf_verify_size(dev, cmd) < 0)
|
||||
return;
|
||||
|
||||
switch (cmd->id) {
|
||||
case CMD_START_CHIP_REPLY:
|
||||
kvaser_usb_leaf_start_chip_reply(dev, cmd);
|
||||
|
|
@ -1351,9 +1426,13 @@ static int kvaser_usb_leaf_set_mode(struct net_device *netdev,
|
|||
|
||||
switch (mode) {
|
||||
case CAN_MODE_START:
|
||||
kvaser_usb_unlink_tx_urbs(priv);
|
||||
|
||||
err = kvaser_usb_leaf_simple_cmd_async(priv, CMD_START_CHIP);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
priv->can.state = CAN_STATE_ERROR_ACTIVE;
|
||||
break;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
|
|
|
|||
|
|
@ -1169,6 +1169,11 @@ static int adin1110_port_bridge_leave(struct adin1110_port_priv *port_priv,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static bool adin1110_port_dev_check(const struct net_device *dev)
|
||||
{
|
||||
return dev->netdev_ops == &adin1110_netdev_ops;
|
||||
}
|
||||
|
||||
static int adin1110_netdevice_event(struct notifier_block *unused,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
|
|
@ -1177,6 +1182,9 @@ static int adin1110_netdevice_event(struct notifier_block *unused,
|
|||
struct netdev_notifier_changeupper_info *info = ptr;
|
||||
int ret = 0;
|
||||
|
||||
if (!adin1110_port_dev_check(dev))
|
||||
return NOTIFY_DONE;
|
||||
|
||||
switch (event) {
|
||||
case NETDEV_CHANGEUPPER:
|
||||
if (netif_is_bridge_master(info->upper_dev)) {
|
||||
|
|
@ -1202,11 +1210,6 @@ static void adin1110_disconnect_phy(void *data)
|
|||
phy_disconnect(data);
|
||||
}
|
||||
|
||||
static bool adin1110_port_dev_check(const struct net_device *dev)
|
||||
{
|
||||
return dev->netdev_ops == &adin1110_netdev_ops;
|
||||
}
|
||||
|
||||
static int adin1110_port_set_forwarding_state(struct adin1110_port_priv *port_priv)
|
||||
{
|
||||
struct adin1110_priv *priv = port_priv->priv;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,3 @@ obj-$(CONFIG_BGMAC_BCMA) += bgmac-bcma.o bgmac-bcma-mdio.o
|
|||
obj-$(CONFIG_BGMAC_PLATFORM) += bgmac-platform.o
|
||||
obj-$(CONFIG_SYSTEMPORT) += bcmsysport.o
|
||||
obj-$(CONFIG_BNXT) += bnxt/
|
||||
|
||||
# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
|
||||
ifndef KBUILD_EXTRA_WARN
|
||||
CFLAGS_tg3.o += -Wno-array-bounds
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ struct bcm_rsb {
|
|||
|
||||
/* Number of Receive hardware descriptor words */
|
||||
#define SP_NUM_HW_RX_DESC_WORDS 1024
|
||||
#define SP_LT_NUM_HW_RX_DESC_WORDS 256
|
||||
#define SP_LT_NUM_HW_RX_DESC_WORDS 512
|
||||
|
||||
/* Internal linked-list RAM size */
|
||||
#define SP_NUM_TX_DESC 1536
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <linux/math64.h>
|
||||
#include <linux/refcount.h>
|
||||
#include <net/pkt_cls.h>
|
||||
#include <net/pkt_sched.h>
|
||||
#include <net/tc_act/tc_gate.h>
|
||||
|
||||
static u16 enetc_get_max_gcl_len(struct enetc_hw *hw)
|
||||
|
|
|
|||
|
|
@ -1182,8 +1182,10 @@ static int mcs_register_interrupts(struct mcs *mcs)
|
|||
mcs_reg_write(mcs, MCSX_PAB_TX_SLAVE_PAB_INT_ENB, 0xff);
|
||||
|
||||
mcs->tx_sa_active = alloc_mem(mcs, mcs->hw->sc_entries);
|
||||
if (!mcs->tx_sa_active)
|
||||
if (!mcs->tx_sa_active) {
|
||||
ret = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
return ret;
|
||||
exit:
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ static int cn10k_mcs_alloc_rsrc(struct otx2_nic *pfvf, enum mcs_direction dir,
|
|||
default:
|
||||
ret = -EINVAL;
|
||||
goto fail;
|
||||
};
|
||||
}
|
||||
|
||||
mutex_unlock(&mbox->lock);
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ static int cn10k_mcs_write_sc_cam(struct otx2_nic *pfvf,
|
|||
|
||||
sc_req = otx2_mbox_alloc_msg_mcs_rx_sc_cam_write(mbox);
|
||||
if (!sc_req) {
|
||||
return -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -594,7 +594,7 @@ static int cn10k_mcs_ena_dis_flowid(struct otx2_nic *pfvf, u16 hw_flow_id,
|
|||
|
||||
req = otx2_mbox_alloc_msg_mcs_flowid_ena_entry(mbox);
|
||||
if (!req) {
|
||||
return -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -1653,6 +1653,7 @@ int cn10k_mcs_init(struct otx2_nic *pfvf)
|
|||
return 0;
|
||||
fail:
|
||||
dev_err(pfvf->dev, "Cannot notify PN wrapped event\n");
|
||||
mutex_unlock(&mbox->lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2810,7 +2810,7 @@ static int otx2_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
err = register_netdev(netdev);
|
||||
if (err) {
|
||||
dev_err(dev, "Failed to register netdevice\n");
|
||||
goto err_del_mcam_entries;
|
||||
goto err_mcs_free;
|
||||
}
|
||||
|
||||
err = otx2_wq_init(pf);
|
||||
|
|
@ -2849,6 +2849,8 @@ err_mcam_flow_del:
|
|||
otx2_mcam_flow_del(pf);
|
||||
err_unreg_netdev:
|
||||
unregister_netdev(netdev);
|
||||
err_mcs_free:
|
||||
cn10k_mcs_free(pf);
|
||||
err_del_mcam_entries:
|
||||
otx2_mcam_flow_del(pf);
|
||||
err_ptp_destroy:
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ int prestera_mall_replace(struct prestera_flow_block *block,
|
|||
|
||||
list_for_each_entry(binding, &block->binding_list, list) {
|
||||
err = prestera_span_rule_add(binding, port, block->ingress);
|
||||
if (err == -EEXIST)
|
||||
return err;
|
||||
if (err)
|
||||
goto rollback;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -498,8 +498,8 @@ prestera_nexthop_group_get(struct prestera_switch *sw,
|
|||
refcount_inc(&nh_grp->refcount);
|
||||
} else {
|
||||
nh_grp = __prestera_nexthop_group_create(sw, key);
|
||||
if (IS_ERR(nh_grp))
|
||||
return ERR_CAST(nh_grp);
|
||||
if (!nh_grp)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
refcount_set(&nh_grp->refcount, 1);
|
||||
}
|
||||
|
|
@ -651,7 +651,7 @@ prestera_fib_node_create(struct prestera_switch *sw,
|
|||
case PRESTERA_FIB_TYPE_UC_NH:
|
||||
fib_node->info.nh_grp = prestera_nexthop_group_get(sw,
|
||||
nh_grp_key);
|
||||
if (!fib_node->info.nh_grp)
|
||||
if (IS_ERR(fib_node->info.nh_grp))
|
||||
goto err_nh_grp_get;
|
||||
|
||||
grp_id = fib_node->info.nh_grp->grp_id;
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ static int prestera_span_put(struct prestera_switch *sw, u8 span_id)
|
|||
|
||||
entry = prestera_span_entry_find_by_id(sw->span, span_id);
|
||||
if (!entry)
|
||||
return false;
|
||||
return -ENOENT;
|
||||
|
||||
if (!refcount_dec_and_test(&entry->ref_count))
|
||||
return 0;
|
||||
|
|
@ -151,6 +151,9 @@ int prestera_span_rule_del(struct prestera_flow_block_binding *binding,
|
|||
{
|
||||
int err;
|
||||
|
||||
if (binding->span_id == PRESTERA_SPAN_INVALID_ID)
|
||||
return -ENOENT;
|
||||
|
||||
err = prestera_hw_span_unbind(binding->port, ingress);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,3 @@ mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_debugfs.o
|
|||
endif
|
||||
obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o
|
||||
obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
|
||||
|
||||
# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
|
||||
ifndef KBUILD_EXTRA_WARN
|
||||
CFLAGS_mtk_ppe.o += -Wno-array-bounds
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ mlx5e_tc_meter_modify(struct mlx5_core_dev *mdev,
|
|||
struct mlx5e_flow_meters *flow_meters;
|
||||
u8 cir_man, cir_exp, cbs_man, cbs_exp;
|
||||
struct mlx5_aso_wqe *aso_wqe;
|
||||
unsigned long expires;
|
||||
struct mlx5_aso *aso;
|
||||
u64 rate, burst;
|
||||
u8 ds_cnt;
|
||||
|
|
@ -187,7 +188,12 @@ mlx5e_tc_meter_modify(struct mlx5_core_dev *mdev,
|
|||
mlx5_aso_post_wqe(aso, true, &aso_wqe->ctrl);
|
||||
|
||||
/* With newer FW, the wait for the first ASO WQE is more than 2us, put the wait 10ms. */
|
||||
err = mlx5_aso_poll_cq(aso, true, 10);
|
||||
expires = jiffies + msecs_to_jiffies(10);
|
||||
do {
|
||||
err = mlx5_aso_poll_cq(aso, true);
|
||||
if (err)
|
||||
usleep_range(2, 10);
|
||||
} while (err && time_is_after_jiffies(expires));
|
||||
mutex_unlock(&flow_meters->aso_lock);
|
||||
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -1405,7 +1405,7 @@ static int macsec_aso_set_arm_event(struct mlx5_core_dev *mdev, struct mlx5e_mac
|
|||
MLX5_ACCESS_ASO_OPC_MOD_MACSEC);
|
||||
macsec_aso_build_ctrl(aso, &aso_wqe->aso_ctrl, in);
|
||||
mlx5_aso_post_wqe(maso, false, &aso_wqe->ctrl);
|
||||
err = mlx5_aso_poll_cq(maso, false, 10);
|
||||
err = mlx5_aso_poll_cq(maso, false);
|
||||
mutex_unlock(&aso->aso_lock);
|
||||
|
||||
return err;
|
||||
|
|
@ -1430,7 +1430,7 @@ static int macsec_aso_query(struct mlx5_core_dev *mdev, struct mlx5e_macsec *mac
|
|||
macsec_aso_build_wqe_ctrl_seg(aso, &aso_wqe->aso_ctrl, NULL);
|
||||
|
||||
mlx5_aso_post_wqe(maso, false, &aso_wqe->ctrl);
|
||||
err = mlx5_aso_poll_cq(maso, false, 10);
|
||||
err = mlx5_aso_poll_cq(maso, false);
|
||||
if (err)
|
||||
goto err_out;
|
||||
|
||||
|
|
|
|||
|
|
@ -381,20 +381,12 @@ void mlx5_aso_post_wqe(struct mlx5_aso *aso, bool with_data,
|
|||
WRITE_ONCE(doorbell_cseg, NULL);
|
||||
}
|
||||
|
||||
int mlx5_aso_poll_cq(struct mlx5_aso *aso, bool with_data, u32 interval_ms)
|
||||
int mlx5_aso_poll_cq(struct mlx5_aso *aso, bool with_data)
|
||||
{
|
||||
struct mlx5_aso_cq *cq = &aso->cq;
|
||||
struct mlx5_cqe64 *cqe;
|
||||
unsigned long expires;
|
||||
|
||||
cqe = mlx5_cqwq_get_cqe(&cq->wq);
|
||||
|
||||
expires = jiffies + msecs_to_jiffies(interval_ms);
|
||||
while (!cqe && time_is_after_jiffies(expires)) {
|
||||
usleep_range(2, 10);
|
||||
cqe = mlx5_cqwq_get_cqe(&cq->wq);
|
||||
}
|
||||
|
||||
if (!cqe)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void mlx5_aso_build_wqe(struct mlx5_aso *aso, u8 ds_cnt,
|
|||
u32 obj_id, u32 opc_mode);
|
||||
void mlx5_aso_post_wqe(struct mlx5_aso *aso, bool with_data,
|
||||
struct mlx5_wqe_ctrl_seg *doorbell_cseg);
|
||||
int mlx5_aso_poll_cq(struct mlx5_aso *aso, bool with_data, u32 interval_ms);
|
||||
int mlx5_aso_poll_cq(struct mlx5_aso *aso, bool with_data);
|
||||
|
||||
struct mlx5_aso *mlx5_aso_create(struct mlx5_core_dev *mdev, u32 pdn);
|
||||
void mlx5_aso_destroy(struct mlx5_aso *aso);
|
||||
|
|
|
|||
|
|
@ -373,10 +373,10 @@ nfp_flower_calculate_key_layers(struct nfp_app *app,
|
|||
if (ipv6_tun) {
|
||||
key_layer_two |= NFP_FLOWER_LAYER2_TUN_IPV6;
|
||||
key_size +=
|
||||
sizeof(struct nfp_flower_ipv6_udp_tun);
|
||||
sizeof(struct nfp_flower_ipv6_gre_tun);
|
||||
} else {
|
||||
key_size +=
|
||||
sizeof(struct nfp_flower_ipv4_udp_tun);
|
||||
sizeof(struct nfp_flower_ipv4_gre_tun);
|
||||
}
|
||||
|
||||
if (enc_op.key) {
|
||||
|
|
|
|||
|
|
@ -2896,8 +2896,8 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
|
|||
|
||||
hpreg_res = devm_request_region(&pdev->dev, pci_resource_start(pdev, 0),
|
||||
pci_resource_len(pdev, 0), DRV_NAME);
|
||||
if (IS_ERR(hpreg_res)) {
|
||||
err = PTR_ERR(hpreg_res);
|
||||
if (!hpreg_res) {
|
||||
err = -EBUSY;
|
||||
dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n");
|
||||
goto err_out_clear_quattro;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2476,7 +2476,10 @@ static int am65_cpsw_nuss_register_devlink(struct am65_cpsw_common *common)
|
|||
port = am65_common_get_port(common, i);
|
||||
dl_port = &port->devlink_port;
|
||||
|
||||
attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
|
||||
if (port->ndev)
|
||||
attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
|
||||
else
|
||||
attrs.flavour = DEVLINK_PORT_FLAVOUR_UNUSED;
|
||||
attrs.phys.port_number = port->port_id;
|
||||
attrs.switch_id.id_len = sizeof(resource_size_t);
|
||||
memcpy(attrs.switch_id.id, common->switch_id, attrs.switch_id.id_len);
|
||||
|
|
|
|||
|
|
@ -1051,7 +1051,8 @@ struct net_device_context {
|
|||
u32 vf_alloc;
|
||||
/* Serial number of the VF to team with */
|
||||
u32 vf_serial;
|
||||
|
||||
/* completion variable to confirm vf association */
|
||||
struct completion vf_add;
|
||||
/* Is the current data path through the VF NIC? */
|
||||
bool data_path_is_vf;
|
||||
|
||||
|
|
|
|||
|
|
@ -1580,6 +1580,10 @@ static void netvsc_send_vf(struct net_device *ndev,
|
|||
|
||||
net_device_ctx->vf_alloc = nvmsg->msg.v4_msg.vf_assoc.allocated;
|
||||
net_device_ctx->vf_serial = nvmsg->msg.v4_msg.vf_assoc.serial;
|
||||
|
||||
if (net_device_ctx->vf_alloc)
|
||||
complete(&net_device_ctx->vf_add);
|
||||
|
||||
netdev_info(ndev, "VF slot %u %s\n",
|
||||
net_device_ctx->vf_serial,
|
||||
net_device_ctx->vf_alloc ? "added" : "removed");
|
||||
|
|
|
|||
|
|
@ -2313,6 +2313,18 @@ static struct net_device *get_netvsc_byslot(const struct net_device *vf_netdev)
|
|||
|
||||
}
|
||||
|
||||
/* Fallback path to check synthetic vf with
|
||||
* help of mac addr
|
||||
*/
|
||||
list_for_each_entry(ndev_ctx, &netvsc_dev_list, list) {
|
||||
ndev = hv_get_drvdata(ndev_ctx->device_ctx);
|
||||
if (ether_addr_equal(vf_netdev->perm_addr, ndev->perm_addr)) {
|
||||
netdev_notice(vf_netdev,
|
||||
"falling back to mac addr based matching\n");
|
||||
return ndev;
|
||||
}
|
||||
}
|
||||
|
||||
netdev_notice(vf_netdev,
|
||||
"no netdev found for vf serial:%u\n", serial);
|
||||
return NULL;
|
||||
|
|
@ -2409,6 +2421,11 @@ static int netvsc_vf_changed(struct net_device *vf_netdev, unsigned long event)
|
|||
if (net_device_ctx->data_path_is_vf == vf_is_up)
|
||||
return NOTIFY_OK;
|
||||
|
||||
if (vf_is_up && !net_device_ctx->vf_alloc) {
|
||||
netdev_info(ndev, "Waiting for the VF association from host\n");
|
||||
wait_for_completion(&net_device_ctx->vf_add);
|
||||
}
|
||||
|
||||
ret = netvsc_switch_datapath(ndev, vf_is_up);
|
||||
|
||||
if (ret) {
|
||||
|
|
@ -2440,6 +2457,7 @@ static int netvsc_unregister_vf(struct net_device *vf_netdev)
|
|||
|
||||
netvsc_vf_setxdp(vf_netdev, NULL);
|
||||
|
||||
reinit_completion(&net_device_ctx->vf_add);
|
||||
netdev_rx_handler_unregister(vf_netdev);
|
||||
netdev_upper_dev_unlink(vf_netdev, ndev);
|
||||
RCU_INIT_POINTER(net_device_ctx->vf_netdev, NULL);
|
||||
|
|
@ -2479,6 +2497,7 @@ static int netvsc_probe(struct hv_device *dev,
|
|||
|
||||
INIT_DELAYED_WORK(&net_device_ctx->dwork, netvsc_link_change);
|
||||
|
||||
init_completion(&net_device_ctx->vf_add);
|
||||
spin_lock_init(&net_device_ctx->lock);
|
||||
INIT_LIST_HEAD(&net_device_ctx->reconfig_events);
|
||||
INIT_DELAYED_WORK(&net_device_ctx->vf_takeover, netvsc_vf_setup);
|
||||
|
|
|
|||
|
|
@ -1192,7 +1192,7 @@ void macvlan_common_setup(struct net_device *dev)
|
|||
{
|
||||
ether_setup(dev);
|
||||
|
||||
dev->min_mtu = 0;
|
||||
/* ether_setup() has set dev->min_mtu to ETH_MIN_MTU. */
|
||||
dev->max_mtu = ETH_MAX_MTU;
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
netif_keep_dst(dev);
|
||||
|
|
|
|||
|
|
@ -1838,7 +1838,7 @@ static int ksz886x_cable_test_start(struct phy_device *phydev)
|
|||
return phy_clear_bits(phydev, MII_BMCR, BMCR_ANENABLE | BMCR_SPEED100);
|
||||
}
|
||||
|
||||
static int ksz886x_cable_test_result_trans(u16 status, u16 mask)
|
||||
static __always_inline int ksz886x_cable_test_result_trans(u16 status, u16 mask)
|
||||
{
|
||||
switch (FIELD_GET(mask, status)) {
|
||||
case KSZ8081_LMD_STAT_NORMAL:
|
||||
|
|
@ -1854,13 +1854,13 @@ static int ksz886x_cable_test_result_trans(u16 status, u16 mask)
|
|||
}
|
||||
}
|
||||
|
||||
static bool ksz886x_cable_test_failed(u16 status, u16 mask)
|
||||
static __always_inline bool ksz886x_cable_test_failed(u16 status, u16 mask)
|
||||
{
|
||||
return FIELD_GET(mask, status) ==
|
||||
KSZ8081_LMD_STAT_FAIL;
|
||||
}
|
||||
|
||||
static bool ksz886x_cable_test_fault_length_valid(u16 status, u16 mask)
|
||||
static __always_inline bool ksz886x_cable_test_fault_length_valid(u16 status, u16 mask)
|
||||
{
|
||||
switch (FIELD_GET(mask, status)) {
|
||||
case KSZ8081_LMD_STAT_OPEN:
|
||||
|
|
@ -1871,7 +1871,8 @@ static bool ksz886x_cable_test_fault_length_valid(u16 status, u16 mask)
|
|||
return false;
|
||||
}
|
||||
|
||||
static int ksz886x_cable_test_fault_length(struct phy_device *phydev, u16 status, u16 data_mask)
|
||||
static __always_inline int ksz886x_cable_test_fault_length(struct phy_device *phydev,
|
||||
u16 status, u16 data_mask)
|
||||
{
|
||||
int dt;
|
||||
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
|
|||
case SFF8024_ECC_100GBASE_SR4_25GBASE_SR:
|
||||
phylink_set(modes, 100000baseSR4_Full);
|
||||
phylink_set(modes, 25000baseSR_Full);
|
||||
__set_bit(PHY_INTERFACE_MODE_25GBASER, interfaces);
|
||||
break;
|
||||
case SFF8024_ECC_100GBASE_LR4_25GBASE_LR:
|
||||
case SFF8024_ECC_100GBASE_ER4_25GBASE_ER:
|
||||
|
|
@ -268,6 +269,7 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
|
|||
case SFF8024_ECC_25GBASE_CR_S:
|
||||
case SFF8024_ECC_25GBASE_CR_N:
|
||||
phylink_set(modes, 25000baseCR_Full);
|
||||
__set_bit(PHY_INTERFACE_MODE_25GBASER, interfaces);
|
||||
break;
|
||||
case SFF8024_ECC_10GBASE_T_SFI:
|
||||
case SFF8024_ECC_10GBASE_T_SR:
|
||||
|
|
@ -276,6 +278,7 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
|
|||
break;
|
||||
case SFF8024_ECC_5GBASE_T:
|
||||
phylink_set(modes, 5000baseT_Full);
|
||||
__set_bit(PHY_INTERFACE_MODE_5GBASER, interfaces);
|
||||
break;
|
||||
case SFF8024_ECC_2_5GBASE_T:
|
||||
phylink_set(modes, 2500baseT_Full);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ if PSE_CONTROLLER
|
|||
|
||||
config PSE_REGULATOR
|
||||
tristate "Regulator based PSE controller"
|
||||
depends on REGULATOR || COMPILE_TEST
|
||||
help
|
||||
This module provides support for simple regulator based Ethernet Power
|
||||
Sourcing Equipment without automatic classification support. For
|
||||
|
|
|
|||
|
|
@ -2081,7 +2081,7 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
|
|||
struct cfg80211_chan_def def;
|
||||
const struct ieee80211_sta_he_cap *he_cap = &sta->deflink.he_cap;
|
||||
enum nl80211_band band;
|
||||
u16 *he_mcs_mask;
|
||||
u16 he_mcs_mask[NL80211_HE_NSS_MAX];
|
||||
u8 max_nss, he_mcs;
|
||||
u16 he_tx_mcs = 0, v = 0;
|
||||
int i, he_nss, nss_idx;
|
||||
|
|
@ -2098,7 +2098,8 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
|
|||
return;
|
||||
|
||||
band = def.chan->band;
|
||||
he_mcs_mask = arvif->bitrate_mask.control[band].he_mcs;
|
||||
memcpy(he_mcs_mask, arvif->bitrate_mask.control[band].he_mcs,
|
||||
sizeof(he_mcs_mask));
|
||||
|
||||
if (ath11k_peer_assoc_h_he_masked(he_mcs_mask))
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -384,6 +384,7 @@ static int iwl_mvm_disable_txq(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|||
iwl_mvm_txq_from_tid(sta, tid);
|
||||
|
||||
mvmtxq->txq_id = IWL_MVM_INVALID_QUEUE;
|
||||
list_del_init(&mvmtxq->list);
|
||||
}
|
||||
|
||||
/* Regardless if this is a reserved TXQ for a STA - mark it as false */
|
||||
|
|
@ -478,6 +479,7 @@ static int iwl_mvm_remove_sta_queue_marking(struct iwl_mvm *mvm, int queue)
|
|||
mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE;
|
||||
|
||||
mvmtxq->txq_id = IWL_MVM_INVALID_QUEUE;
|
||||
list_del_init(&mvmtxq->list);
|
||||
}
|
||||
|
||||
mvmsta->tfd_queue_msk &= ~BIT(queue); /* Don't use this queue anymore */
|
||||
|
|
|
|||
|
|
@ -4973,6 +4973,8 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2,
|
|||
}
|
||||
|
||||
rx_status.rate_idx = nla_get_u32(info->attrs[HWSIM_ATTR_RX_RATE]);
|
||||
if (rx_status.rate_idx >= data2->hw->wiphy->bands[rx_status.band]->n_bitrates)
|
||||
goto out;
|
||||
rx_status.signal = nla_get_u32(info->attrs[HWSIM_ATTR_SIGNAL]);
|
||||
|
||||
hdr = (void *)skb->data;
|
||||
|
|
|
|||
|
|
@ -696,10 +696,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
|
|||
|
||||
skb_reserve(skb, q->buf_offset);
|
||||
|
||||
if (q == &dev->q_rx[MT_RXQ_MCU]) {
|
||||
u32 *rxfce = (u32 *)skb->cb;
|
||||
*rxfce = info;
|
||||
}
|
||||
*(u32 *)skb->cb = info;
|
||||
|
||||
__skb_put(skb, len);
|
||||
done++;
|
||||
|
|
|
|||
|
|
@ -345,6 +345,7 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
|
|||
u32 rxd1 = le32_to_cpu(rxd[1]);
|
||||
u32 rxd2 = le32_to_cpu(rxd[2]);
|
||||
u32 csum_mask = MT_RXD0_NORMAL_IP_SUM | MT_RXD0_NORMAL_UDP_TCP_SUM;
|
||||
u32 csum_status = *(u32 *)skb->cb;
|
||||
bool unicast, hdr_trans, remove_pad, insert_ccmp_hdr = false;
|
||||
u16 hdr_gap;
|
||||
int phy_idx;
|
||||
|
|
@ -394,7 +395,8 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
|
|||
spin_unlock_bh(&dev->sta_poll_lock);
|
||||
}
|
||||
|
||||
if ((rxd0 & csum_mask) == csum_mask)
|
||||
if (mt76_is_mmio(&dev->mt76) && (rxd0 & csum_mask) == csum_mask &&
|
||||
!(csum_status & (BIT(0) | BIT(2) | BIT(3))))
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
if (rxd2 & MT_RXD2_NORMAL_FCS_ERR)
|
||||
|
|
@ -610,14 +612,14 @@ static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
|
|||
* When header translation failure is indicated,
|
||||
* the hardware will insert an extra 2-byte field
|
||||
* containing the data length after the protocol
|
||||
* type field.
|
||||
* type field. This happens either when the LLC-SNAP
|
||||
* pattern did not match, or if a VLAN header was
|
||||
* detected.
|
||||
*/
|
||||
pad_start = 12;
|
||||
if (get_unaligned_be16(skb->data + pad_start) == ETH_P_8021Q)
|
||||
pad_start += 4;
|
||||
|
||||
if (get_unaligned_be16(skb->data + pad_start) !=
|
||||
skb->len - pad_start - 2)
|
||||
else
|
||||
pad_start = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
|
|||
u8 remove_pad, amsdu_info;
|
||||
u8 mode = 0, qos_ctl = 0;
|
||||
struct mt7915_sta *msta = NULL;
|
||||
u32 csum_status = *(u32 *)skb->cb;
|
||||
bool hdr_trans;
|
||||
u16 hdr_gap;
|
||||
u16 seq_ctrl = 0;
|
||||
|
|
@ -288,7 +289,8 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
|
|||
if (!sband->channels)
|
||||
return -EINVAL;
|
||||
|
||||
if ((rxd0 & csum_mask) == csum_mask)
|
||||
if ((rxd0 & csum_mask) == csum_mask &&
|
||||
!(csum_status & (BIT(0) | BIT(2) | BIT(3))))
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
if (rxd1 & MT_RXD1_NORMAL_FCS_ERR)
|
||||
|
|
@ -446,14 +448,14 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
|
|||
* When header translation failure is indicated,
|
||||
* the hardware will insert an extra 2-byte field
|
||||
* containing the data length after the protocol
|
||||
* type field.
|
||||
* type field. This happens either when the LLC-SNAP
|
||||
* pattern did not match, or if a VLAN header was
|
||||
* detected.
|
||||
*/
|
||||
pad_start = 12;
|
||||
if (get_unaligned_be16(skb->data + pad_start) == ETH_P_8021Q)
|
||||
pad_start += 4;
|
||||
|
||||
if (get_unaligned_be16(skb->data + pad_start) !=
|
||||
skb->len - pad_start - 2)
|
||||
else
|
||||
pad_start = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ mt7921_mac_fill_rx(struct mt7921_dev *dev, struct sk_buff *skb)
|
|||
struct mt76_phy *mphy = &dev->mt76.phy;
|
||||
struct mt7921_phy *phy = &dev->phy;
|
||||
struct ieee80211_supported_band *sband;
|
||||
u32 csum_status = *(u32 *)skb->cb;
|
||||
u32 rxd0 = le32_to_cpu(rxd[0]);
|
||||
u32 rxd1 = le32_to_cpu(rxd[1]);
|
||||
u32 rxd2 = le32_to_cpu(rxd[2]);
|
||||
|
|
@ -290,7 +291,8 @@ mt7921_mac_fill_rx(struct mt7921_dev *dev, struct sk_buff *skb)
|
|||
if (!sband->channels)
|
||||
return -EINVAL;
|
||||
|
||||
if ((rxd0 & csum_mask) == csum_mask)
|
||||
if (mt76_is_mmio(&dev->mt76) && (rxd0 & csum_mask) == csum_mask &&
|
||||
!(csum_status & (BIT(0) | BIT(2) | BIT(3))))
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
if (rxd1 & MT_RXD1_NORMAL_FCS_ERR)
|
||||
|
|
|
|||
|
|
@ -60,14 +60,20 @@ mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list)
|
|||
.skb = skb,
|
||||
.info = IEEE80211_SKB_CB(skb),
|
||||
};
|
||||
struct ieee80211_rate_status rs = {};
|
||||
struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb);
|
||||
struct mt76_wcid *wcid;
|
||||
|
||||
wcid = rcu_dereference(dev->wcid[cb->wcid]);
|
||||
if (wcid) {
|
||||
status.sta = wcid_to_sta(wcid);
|
||||
status.rates = NULL;
|
||||
status.n_rates = 0;
|
||||
if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) {
|
||||
rs.rate_idx = wcid->rate;
|
||||
status.rates = &rs;
|
||||
status.n_rates = 1;
|
||||
} else {
|
||||
status.n_rates = 0;
|
||||
}
|
||||
}
|
||||
|
||||
hw = mt76_tx_status_get_hw(dev, skb);
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ void nvme_mpath_revalidate_paths(struct nvme_ns *ns)
|
|||
|
||||
for_each_node(node)
|
||||
rcu_assign_pointer(head->current_path[node], NULL);
|
||||
kblockd_schedule_work(&head->requeue_work);
|
||||
}
|
||||
|
||||
static bool nvme_path_is_disabled(struct nvme_ns *ns)
|
||||
|
|
|
|||
|
|
@ -3521,12 +3521,16 @@ static const struct pci_device_id nvme_id_table[] = {
|
|||
.driver_data = NVME_QUIRK_BOGUS_NID, },
|
||||
{ PCI_DEVICE(0x1dbe, 0x5236), /* ADATA XPG GAMMIX S70 */
|
||||
.driver_data = NVME_QUIRK_BOGUS_NID, },
|
||||
{ PCI_DEVICE(0x1e49, 0x0021), /* ZHITAI TiPro5000 NVMe SSD */
|
||||
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
|
||||
{ PCI_DEVICE(0x1e49, 0x0041), /* ZHITAI TiPro7000 NVMe SSD */
|
||||
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
|
||||
{ PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */
|
||||
.driver_data = NVME_QUIRK_BOGUS_NID, },
|
||||
{ PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
|
||||
.driver_data = NVME_QUIRK_BOGUS_NID, },
|
||||
{ PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */
|
||||
.driver_data = NVME_QUIRK_BOGUS_NID, },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
|
||||
.driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
|
||||
|
|
|
|||
|
|
@ -996,7 +996,7 @@ static void nvme_rdma_stop_ctrl(struct nvme_ctrl *nctrl)
|
|||
{
|
||||
struct nvme_rdma_ctrl *ctrl = to_rdma_ctrl(nctrl);
|
||||
|
||||
cancel_work_sync(&ctrl->err_work);
|
||||
flush_work(&ctrl->err_work);
|
||||
cancel_delayed_work_sync(&ctrl->reconnect_work);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2181,7 +2181,7 @@ out_fail:
|
|||
|
||||
static void nvme_tcp_stop_ctrl(struct nvme_ctrl *ctrl)
|
||||
{
|
||||
cancel_work_sync(&to_tcp_ctrl(ctrl)->err_work);
|
||||
flush_work(&to_tcp_ctrl(ctrl)->err_work);
|
||||
cancel_delayed_work_sync(&to_tcp_ctrl(ctrl)->connect_work);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3657,6 +3657,7 @@ ptp_ocp_detach_sysfs(struct ptp_ocp *bp)
|
|||
struct device *dev = &bp->dev;
|
||||
|
||||
sysfs_remove_link(&dev->kobj, "ttyGNSS");
|
||||
sysfs_remove_link(&dev->kobj, "ttyGNSS2");
|
||||
sysfs_remove_link(&dev->kobj, "ttyMAC");
|
||||
sysfs_remove_link(&dev->kobj, "ptp");
|
||||
sysfs_remove_link(&dev->kobj, "pps");
|
||||
|
|
|
|||
|
|
@ -409,8 +409,8 @@ int vp_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
|
|||
err = vp_find_vqs_msix(vdev, nvqs, vqs, callbacks, names, false, ctx, desc);
|
||||
if (!err)
|
||||
return 0;
|
||||
/* Is there an interrupt pin? If not give up. */
|
||||
if (!(to_vp_device(vdev)->pci_dev->pin))
|
||||
/* Is there an interrupt? If not give up. */
|
||||
if (!(to_vp_device(vdev)->pci_dev->irq))
|
||||
return err;
|
||||
/* Finally fall back to regular interrupts. */
|
||||
return vp_find_vqs_intx(vdev, nvqs, vqs, callbacks, names, ctx);
|
||||
|
|
|
|||
|
|
@ -580,9 +580,9 @@ struct request_queue {
|
|||
#define QUEUE_FLAG_NOWAIT 29 /* device supports NOWAIT */
|
||||
#define QUEUE_FLAG_SQ_SCHED 30 /* single queue style io dispatch */
|
||||
|
||||
#define QUEUE_FLAG_MQ_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
|
||||
(1 << QUEUE_FLAG_SAME_COMP) | \
|
||||
(1 << QUEUE_FLAG_NOWAIT))
|
||||
#define QUEUE_FLAG_MQ_DEFAULT ((1UL << QUEUE_FLAG_IO_STAT) | \
|
||||
(1UL << QUEUE_FLAG_SAME_COMP) | \
|
||||
(1UL << QUEUE_FLAG_NOWAIT))
|
||||
|
||||
void blk_queue_flag_set(unsigned int flag, struct request_queue *q);
|
||||
void blk_queue_flag_clear(unsigned int flag, struct request_queue *q);
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@ struct io_file_table {
|
|||
unsigned int alloc_hint;
|
||||
};
|
||||
|
||||
struct io_notif;
|
||||
struct io_notif_slot;
|
||||
|
||||
struct io_hash_bucket {
|
||||
spinlock_t lock;
|
||||
struct hlist_head list;
|
||||
|
|
@ -242,8 +239,6 @@ struct io_ring_ctx {
|
|||
unsigned nr_user_files;
|
||||
unsigned nr_user_bufs;
|
||||
struct io_mapped_ubuf **user_bufs;
|
||||
struct io_notif_slot *notif_slots;
|
||||
unsigned nr_notif_slots;
|
||||
|
||||
struct io_submit_state submit_state;
|
||||
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ struct mmc_card {
|
|||
#define MMC_QUIRK_BROKEN_IRQ_POLLING (1<<11) /* Polling SDIO_CCCR_INTx could create a fake interrupt */
|
||||
#define MMC_QUIRK_TRIM_BROKEN (1<<12) /* Skip trim */
|
||||
#define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */
|
||||
#define MMC_QUIRK_BROKEN_SD_DISCARD (1<<14) /* Disable broken SD discard support */
|
||||
|
||||
bool reenable_cmdq; /* Re-enable Command Queue */
|
||||
|
||||
|
|
|
|||
|
|
@ -803,6 +803,7 @@ typedef unsigned char *sk_buff_data_t;
|
|||
* @csum_level: indicates the number of consecutive checksums found in
|
||||
* the packet minus one that have been verified as
|
||||
* CHECKSUM_UNNECESSARY (max 3)
|
||||
* @scm_io_uring: SKB holds io_uring registered files
|
||||
* @dst_pending_confirm: need to confirm neighbour
|
||||
* @decrypted: Decrypted SKB
|
||||
* @slow_gro: state present at GRO time, slower prepare step required
|
||||
|
|
@ -982,6 +983,7 @@ struct sk_buff {
|
|||
#endif
|
||||
__u8 slow_gro:1;
|
||||
__u8 csum_not_inet:1;
|
||||
__u8 scm_io_uring:1;
|
||||
|
||||
#ifdef CONFIG_NET_SCHED
|
||||
__u16 tc_index; /* traffic control index */
|
||||
|
|
|
|||
|
|
@ -26,7 +26,15 @@ struct compat_iw_point {
|
|||
struct __compat_iw_event {
|
||||
__u16 len; /* Real length of this stuff */
|
||||
__u16 cmd; /* Wireless IOCTL */
|
||||
compat_caddr_t pointer;
|
||||
|
||||
union {
|
||||
compat_caddr_t pointer;
|
||||
|
||||
/* we need ptr_bytes to make memcpy() run-time destination
|
||||
* buffer bounds checking happy, nothing special
|
||||
*/
|
||||
DECLARE_FLEX_ARRAY(__u8, ptr_bytes);
|
||||
};
|
||||
};
|
||||
#define IW_EV_COMPAT_LCP_LEN offsetof(struct __compat_iw_event, pointer)
|
||||
#define IW_EV_COMPAT_POINT_OFF offsetof(struct compat_iw_point, length)
|
||||
|
|
|
|||
|
|
@ -185,21 +185,27 @@ static inline int
|
|||
ieee802154_sockaddr_check_size(struct sockaddr_ieee802154 *daddr, int len)
|
||||
{
|
||||
struct ieee802154_addr_sa *sa;
|
||||
int ret = 0;
|
||||
|
||||
sa = &daddr->addr;
|
||||
if (len < IEEE802154_MIN_NAMELEN)
|
||||
return -EINVAL;
|
||||
switch (sa->addr_type) {
|
||||
case IEEE802154_ADDR_NONE:
|
||||
break;
|
||||
case IEEE802154_ADDR_SHORT:
|
||||
if (len < IEEE802154_NAMELEN_SHORT)
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
case IEEE802154_ADDR_LONG:
|
||||
if (len < IEEE802154_NAMELEN_LONG)
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void ieee802154_addr_from_sa(struct ieee802154_addr *a,
|
||||
|
|
|
|||
|
|
@ -1182,6 +1182,8 @@ void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port,
|
|||
void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info);
|
||||
void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu);
|
||||
|
||||
void inet6_cleanup_sock(struct sock *sk);
|
||||
void inet6_sock_destruct(struct sock *sk);
|
||||
int inet6_release(struct socket *sock);
|
||||
int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len);
|
||||
int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ static inline bool udp_sk_bound_dev_eq(struct net *net, int bound_dev_if,
|
|||
}
|
||||
|
||||
/* net/ipv4/udp.c */
|
||||
void udp_destruct_sock(struct sock *sk);
|
||||
void udp_destruct_common(struct sock *sk);
|
||||
void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len);
|
||||
int __udp_enqueue_schedule_skb(struct sock *sk, struct sk_buff *skb);
|
||||
void udp_skb_destructor(struct sock *sk, struct sk_buff *skb);
|
||||
|
|
|
|||
|
|
@ -25,14 +25,6 @@ static __inline__ int udplite_getfrag(void *from, char *to, int offset,
|
|||
return copy_from_iter_full(to, len, &msg->msg_iter) ? 0 : -EFAULT;
|
||||
}
|
||||
|
||||
/* Designate sk as UDP-Lite socket */
|
||||
static inline int udplite_sk_init(struct sock *sk)
|
||||
{
|
||||
udp_init_sock(sk);
|
||||
udp_sk(sk)->pcflag = UDPLITE_BIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checksumming routines
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static __cold void __io_uring_show_fdinfo(struct io_ring_ctx *ctx,
|
|||
sq_idx = READ_ONCE(ctx->sq_array[entry & sq_mask]);
|
||||
if (sq_idx > sq_mask)
|
||||
continue;
|
||||
sqe = &ctx->sq_sqes[sq_idx << 1];
|
||||
sqe = &ctx->sq_sqes[sq_idx << sq_shift];
|
||||
seq_printf(m, "%5u: opcode:%s, fd:%d, flags:%x, off:%llu, "
|
||||
"addr:0x%llx, rw_flags:0x%x, buf_index:%d "
|
||||
"user_data:%llu",
|
||||
|
|
|
|||
|
|
@ -1106,6 +1106,8 @@ static void io_req_local_work_add(struct io_kiocb *req)
|
|||
|
||||
if (!llist_add(&req->io_task_work.node, &ctx->work_llist))
|
||||
return;
|
||||
/* need it for the following io_cqring_wake() */
|
||||
smp_mb__after_atomic();
|
||||
|
||||
if (unlikely(atomic_read(&req->task->io_uring->in_idle))) {
|
||||
io_move_task_work_from_local(ctx);
|
||||
|
|
@ -1117,8 +1119,7 @@ static void io_req_local_work_add(struct io_kiocb *req)
|
|||
|
||||
if (ctx->has_evfd)
|
||||
io_eventfd_signal(ctx);
|
||||
io_cqring_wake(ctx);
|
||||
|
||||
__io_cqring_wake(ctx);
|
||||
}
|
||||
|
||||
static inline void __io_req_task_work_add(struct io_kiocb *req, bool allow_local)
|
||||
|
|
@ -2585,12 +2586,6 @@ static void io_req_caches_free(struct io_ring_ctx *ctx)
|
|||
static __cold void io_ring_ctx_free(struct io_ring_ctx *ctx)
|
||||
{
|
||||
io_sq_thread_finish(ctx);
|
||||
|
||||
if (ctx->mm_account) {
|
||||
mmdrop(ctx->mm_account);
|
||||
ctx->mm_account = NULL;
|
||||
}
|
||||
|
||||
io_rsrc_refs_drop(ctx);
|
||||
/* __io_rsrc_put_work() may need uring_lock to progress, wait w/o it */
|
||||
io_wait_rsrc_data(ctx->buf_data);
|
||||
|
|
@ -2631,8 +2626,11 @@ static __cold void io_ring_ctx_free(struct io_ring_ctx *ctx)
|
|||
}
|
||||
#endif
|
||||
WARN_ON_ONCE(!list_empty(&ctx->ltimeout_list));
|
||||
WARN_ON_ONCE(ctx->notif_slots || ctx->nr_notif_slots);
|
||||
|
||||
if (ctx->mm_account) {
|
||||
mmdrop(ctx->mm_account);
|
||||
ctx->mm_account = NULL;
|
||||
}
|
||||
io_mem_free(ctx->rings);
|
||||
io_mem_free(ctx->sq_sqes);
|
||||
|
||||
|
|
@ -3229,8 +3227,16 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
|
|||
mutex_unlock(&ctx->uring_lock);
|
||||
goto out;
|
||||
}
|
||||
if ((flags & IORING_ENTER_GETEVENTS) && ctx->syscall_iopoll)
|
||||
goto iopoll_locked;
|
||||
if (flags & IORING_ENTER_GETEVENTS) {
|
||||
if (ctx->syscall_iopoll)
|
||||
goto iopoll_locked;
|
||||
/*
|
||||
* Ignore errors, we'll soon call io_cqring_wait() and
|
||||
* it should handle ownership problems if any.
|
||||
*/
|
||||
if (ctx->flags & IORING_SETUP_DEFER_TASKRUN)
|
||||
(void)io_run_local_work_locked(ctx);
|
||||
}
|
||||
mutex_unlock(&ctx->uring_lock);
|
||||
}
|
||||
|
||||
|
|
@ -3355,7 +3361,7 @@ static int io_uring_install_fd(struct io_ring_ctx *ctx, struct file *file)
|
|||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
ret = __io_uring_add_tctx_node(ctx, false);
|
||||
ret = __io_uring_add_tctx_node(ctx);
|
||||
if (ret) {
|
||||
put_unused_fd(fd);
|
||||
return ret;
|
||||
|
|
@ -3890,6 +3896,9 @@ static int __io_uring_register(struct io_ring_ctx *ctx, unsigned opcode,
|
|||
if (WARN_ON_ONCE(percpu_ref_is_dying(&ctx->refs)))
|
||||
return -ENXIO;
|
||||
|
||||
if (ctx->submitter_task && ctx->submitter_task != current)
|
||||
return -EEXIST;
|
||||
|
||||
if (ctx->restricted) {
|
||||
if (opcode >= IORING_REGISTER_LAST)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -203,17 +203,24 @@ static inline void io_commit_cqring(struct io_ring_ctx *ctx)
|
|||
smp_store_release(&ctx->rings->cq.tail, ctx->cached_cq_tail);
|
||||
}
|
||||
|
||||
static inline void io_cqring_wake(struct io_ring_ctx *ctx)
|
||||
/* requires smb_mb() prior, see wq_has_sleeper() */
|
||||
static inline void __io_cqring_wake(struct io_ring_ctx *ctx)
|
||||
{
|
||||
/*
|
||||
* wake_up_all() may seem excessive, but io_wake_function() and
|
||||
* io_should_wake() handle the termination of the loop and only
|
||||
* wake as many waiters as we need to.
|
||||
*/
|
||||
if (wq_has_sleeper(&ctx->cq_wait))
|
||||
if (waitqueue_active(&ctx->cq_wait))
|
||||
wake_up_all(&ctx->cq_wait);
|
||||
}
|
||||
|
||||
static inline void io_cqring_wake(struct io_ring_ctx *ctx)
|
||||
{
|
||||
smp_mb();
|
||||
__io_cqring_wake(ctx);
|
||||
}
|
||||
|
||||
static inline bool io_sqring_full(struct io_ring_ctx *ctx)
|
||||
{
|
||||
struct io_rings *r = ctx->rings;
|
||||
|
|
@ -268,6 +275,13 @@ static inline int io_run_task_work_ctx(struct io_ring_ctx *ctx)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline int io_run_local_work_locked(struct io_ring_ctx *ctx)
|
||||
{
|
||||
if (llist_empty(&ctx->work_llist))
|
||||
return 0;
|
||||
return __io_run_local_work(ctx, true);
|
||||
}
|
||||
|
||||
static inline void io_tw_lock(struct io_ring_ctx *ctx, bool *locked)
|
||||
{
|
||||
if (!*locked) {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ struct io_connect {
|
|||
struct file *file;
|
||||
struct sockaddr __user *addr;
|
||||
int addr_len;
|
||||
bool in_progress;
|
||||
};
|
||||
|
||||
struct io_sr_msg {
|
||||
|
|
@ -1386,6 +1387,7 @@ int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
|
|||
|
||||
conn->addr = u64_to_user_ptr(READ_ONCE(sqe->addr));
|
||||
conn->addr_len = READ_ONCE(sqe->addr2);
|
||||
conn->in_progress = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1397,6 +1399,16 @@ int io_connect(struct io_kiocb *req, unsigned int issue_flags)
|
|||
int ret;
|
||||
bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK;
|
||||
|
||||
if (connect->in_progress) {
|
||||
struct socket *socket;
|
||||
|
||||
ret = -ENOTSOCK;
|
||||
socket = sock_from_file(req->file);
|
||||
if (socket)
|
||||
ret = sock_error(socket->sk);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (req_has_async_data(req)) {
|
||||
io = req->async_data;
|
||||
} else {
|
||||
|
|
@ -1413,13 +1425,17 @@ int io_connect(struct io_kiocb *req, unsigned int issue_flags)
|
|||
ret = __sys_connect_file(req->file, &io->address,
|
||||
connect->addr_len, file_flags);
|
||||
if ((ret == -EAGAIN || ret == -EINPROGRESS) && force_nonblock) {
|
||||
if (req_has_async_data(req))
|
||||
return -EAGAIN;
|
||||
if (io_alloc_async_data(req)) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
if (ret == -EINPROGRESS) {
|
||||
connect->in_progress = true;
|
||||
} else {
|
||||
if (req_has_async_data(req))
|
||||
return -EAGAIN;
|
||||
if (io_alloc_async_data(req)) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
memcpy(req->async_data, &__io, sizeof(__io));
|
||||
}
|
||||
memcpy(req->async_data, &__io, sizeof(__io));
|
||||
return -EAGAIN;
|
||||
}
|
||||
if (ret == -ERESTARTSYS)
|
||||
|
|
|
|||
|
|
@ -510,7 +510,6 @@ const struct io_op_def io_op_defs[] = {
|
|||
.needs_file = 1,
|
||||
.unbound_nonreg_file = 1,
|
||||
.pollout = 1,
|
||||
.audit_skip = 1,
|
||||
.ioprio = 1,
|
||||
.manual_alloc = 1,
|
||||
#if defined(CONFIG_NET)
|
||||
|
|
|
|||
|
|
@ -855,6 +855,7 @@ int __io_scm_file_account(struct io_ring_ctx *ctx, struct file *file)
|
|||
|
||||
UNIXCB(skb).fp = fpl;
|
||||
skb->sk = sk;
|
||||
skb->scm_io_uring = 1;
|
||||
skb->destructor = unix_destruct_scm;
|
||||
refcount_add(skb->truesize, &sk->sk_wmem_alloc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,11 +234,34 @@ static void kiocb_end_write(struct io_kiocb *req)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Trigger the notifications after having done some IO, and finish the write
|
||||
* accounting, if any.
|
||||
*/
|
||||
static void io_req_io_end(struct io_kiocb *req)
|
||||
{
|
||||
struct io_rw *rw = io_kiocb_to_cmd(req, struct io_rw);
|
||||
|
||||
WARN_ON(!in_task());
|
||||
|
||||
if (rw->kiocb.ki_flags & IOCB_WRITE) {
|
||||
kiocb_end_write(req);
|
||||
fsnotify_modify(req->file);
|
||||
} else {
|
||||
fsnotify_access(req->file);
|
||||
}
|
||||
}
|
||||
|
||||
static bool __io_complete_rw_common(struct io_kiocb *req, long res)
|
||||
{
|
||||
if (unlikely(res != req->cqe.res)) {
|
||||
if ((res == -EAGAIN || res == -EOPNOTSUPP) &&
|
||||
io_rw_should_reissue(req)) {
|
||||
/*
|
||||
* Reissue will start accounting again, finish the
|
||||
* current cycle.
|
||||
*/
|
||||
io_req_io_end(req);
|
||||
req->flags |= REQ_F_REISSUE | REQ_F_PARTIAL_IO;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -264,15 +287,7 @@ static inline int io_fixup_rw_res(struct io_kiocb *req, long res)
|
|||
|
||||
static void io_req_rw_complete(struct io_kiocb *req, bool *locked)
|
||||
{
|
||||
struct io_rw *rw = io_kiocb_to_cmd(req, struct io_rw);
|
||||
|
||||
if (rw->kiocb.ki_flags & IOCB_WRITE) {
|
||||
kiocb_end_write(req);
|
||||
fsnotify_modify(req->file);
|
||||
} else {
|
||||
fsnotify_access(req->file);
|
||||
}
|
||||
|
||||
io_req_io_end(req);
|
||||
io_req_task_complete(req, locked);
|
||||
}
|
||||
|
||||
|
|
@ -317,6 +332,11 @@ static int kiocb_done(struct io_kiocb *req, ssize_t ret,
|
|||
req->file->f_pos = rw->kiocb.ki_pos;
|
||||
if (ret >= 0 && (rw->kiocb.ki_complete == io_complete_rw)) {
|
||||
if (!__io_complete_rw_common(req, ret)) {
|
||||
/*
|
||||
* Safe to call io_end from here as we're inline
|
||||
* from the submission path.
|
||||
*/
|
||||
io_req_io_end(req);
|
||||
io_req_set_res(req, final_ret,
|
||||
io_put_kbuf(req, issue_flags));
|
||||
return IOU_OK;
|
||||
|
|
@ -916,7 +936,7 @@ int io_write(struct io_kiocb *req, unsigned int issue_flags)
|
|||
goto copy_iov;
|
||||
|
||||
if (ret2 != req->cqe.res && ret2 >= 0 && need_complete_io(req)) {
|
||||
struct io_async_rw *rw;
|
||||
struct io_async_rw *io;
|
||||
|
||||
trace_io_uring_short_write(req->ctx, kiocb->ki_pos - ret2,
|
||||
req->cqe.res, ret2);
|
||||
|
|
@ -929,9 +949,9 @@ int io_write(struct io_kiocb *req, unsigned int issue_flags)
|
|||
iov_iter_save_state(&s->iter, &s->iter_state);
|
||||
ret = io_setup_async_rw(req, iovec, s, true);
|
||||
|
||||
rw = req->async_data;
|
||||
if (rw)
|
||||
rw->bytes_done += ret2;
|
||||
io = req->async_data;
|
||||
if (io)
|
||||
io->bytes_done += ret2;
|
||||
|
||||
if (kiocb->ki_flags & IOCB_WRITE)
|
||||
kiocb_end_write(req);
|
||||
|
|
|
|||
|
|
@ -91,32 +91,12 @@ __cold int io_uring_alloc_task_context(struct task_struct *task,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int io_register_submitter(struct io_ring_ctx *ctx)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&ctx->uring_lock);
|
||||
if (!ctx->submitter_task)
|
||||
ctx->submitter_task = get_task_struct(current);
|
||||
else if (ctx->submitter_task != current)
|
||||
ret = -EEXIST;
|
||||
mutex_unlock(&ctx->uring_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int __io_uring_add_tctx_node(struct io_ring_ctx *ctx, bool submitter)
|
||||
int __io_uring_add_tctx_node(struct io_ring_ctx *ctx)
|
||||
{
|
||||
struct io_uring_task *tctx = current->io_uring;
|
||||
struct io_tctx_node *node;
|
||||
int ret;
|
||||
|
||||
if ((ctx->flags & IORING_SETUP_SINGLE_ISSUER) && submitter) {
|
||||
ret = io_register_submitter(ctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (unlikely(!tctx)) {
|
||||
ret = io_uring_alloc_task_context(current, ctx);
|
||||
if (unlikely(ret))
|
||||
|
|
@ -150,8 +130,22 @@ int __io_uring_add_tctx_node(struct io_ring_ctx *ctx, bool submitter)
|
|||
list_add(&node->ctx_node, &ctx->tctx_list);
|
||||
mutex_unlock(&ctx->uring_lock);
|
||||
}
|
||||
if (submitter)
|
||||
tctx->last = ctx;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __io_uring_add_tctx_node_from_submit(struct io_ring_ctx *ctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (ctx->flags & IORING_SETUP_SINGLE_ISSUER
|
||||
&& ctx->submitter_task != current)
|
||||
return -EEXIST;
|
||||
|
||||
ret = __io_uring_add_tctx_node(ctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
current->io_uring->last = ctx;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -259,7 +253,7 @@ int io_ringfd_register(struct io_ring_ctx *ctx, void __user *__arg,
|
|||
return -EINVAL;
|
||||
|
||||
mutex_unlock(&ctx->uring_lock);
|
||||
ret = __io_uring_add_tctx_node(ctx, false);
|
||||
ret = __io_uring_add_tctx_node(ctx);
|
||||
mutex_lock(&ctx->uring_lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ struct io_tctx_node {
|
|||
int io_uring_alloc_task_context(struct task_struct *task,
|
||||
struct io_ring_ctx *ctx);
|
||||
void io_uring_del_tctx_node(unsigned long index);
|
||||
int __io_uring_add_tctx_node(struct io_ring_ctx *ctx, bool submitter);
|
||||
int __io_uring_add_tctx_node(struct io_ring_ctx *ctx);
|
||||
int __io_uring_add_tctx_node_from_submit(struct io_ring_ctx *ctx);
|
||||
void io_uring_clean_tctx(struct io_uring_task *tctx);
|
||||
|
||||
void io_uring_unreg_ringfd(void);
|
||||
|
|
@ -27,5 +28,6 @@ static inline int io_uring_add_tctx_node(struct io_ring_ctx *ctx)
|
|||
|
||||
if (likely(tctx && tctx->last == ctx))
|
||||
return 0;
|
||||
return __io_uring_add_tctx_node(ctx, true);
|
||||
|
||||
return __io_uring_add_tctx_node_from_submit(ctx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3610,7 +3610,8 @@ int sock_common_getsockopt(struct socket *sock, int level, int optname,
|
|||
{
|
||||
struct sock *sk = sock->sk;
|
||||
|
||||
return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
|
||||
/* IPV6_ADDRFORM can change sk->sk_prot under us. */
|
||||
return READ_ONCE(sk->sk_prot)->getsockopt(sk, level, optname, optval, optlen);
|
||||
}
|
||||
EXPORT_SYMBOL(sock_common_getsockopt);
|
||||
|
||||
|
|
@ -3636,7 +3637,8 @@ int sock_common_setsockopt(struct socket *sock, int level, int optname,
|
|||
{
|
||||
struct sock *sk = sock->sk;
|
||||
|
||||
return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen);
|
||||
/* IPV6_ADDRFORM can change sk->sk_prot under us. */
|
||||
return READ_ONCE(sk->sk_prot)->setsockopt(sk, level, optname, optval, optlen);
|
||||
}
|
||||
EXPORT_SYMBOL(sock_common_setsockopt);
|
||||
|
||||
|
|
|
|||
|
|
@ -1681,7 +1681,7 @@ int dsa_port_phylink_create(struct dsa_port *dp)
|
|||
pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn),
|
||||
mode, &dsa_port_phylink_mac_ops);
|
||||
if (IS_ERR(pl)) {
|
||||
pr_err("error creating PHYLINK: %ld\n", PTR_ERR(dp->pl));
|
||||
pr_err("error creating PHYLINK: %ld\n", PTR_ERR(pl));
|
||||
return PTR_ERR(pl);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -251,9 +251,6 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
|
|||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (!size)
|
||||
return -EINVAL;
|
||||
|
||||
lock_sock(sk);
|
||||
if (!sk->sk_bound_dev_if)
|
||||
dev = dev_getfirstbyhwtype(sock_net(sk), ARPHRD_IEEE802154);
|
||||
|
|
@ -275,6 +272,10 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
|
|||
err = -EMSGSIZE;
|
||||
goto out_dev;
|
||||
}
|
||||
if (!size) {
|
||||
err = 0;
|
||||
goto out_dev;
|
||||
}
|
||||
|
||||
hlen = LL_RESERVED_SPACE(dev);
|
||||
tlen = dev->needed_tailroom;
|
||||
|
|
|
|||
|
|
@ -558,22 +558,27 @@ int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr,
|
|||
int addr_len, int flags)
|
||||
{
|
||||
struct sock *sk = sock->sk;
|
||||
const struct proto *prot;
|
||||
int err;
|
||||
|
||||
if (addr_len < sizeof(uaddr->sa_family))
|
||||
return -EINVAL;
|
||||
|
||||
/* IPV6_ADDRFORM can change sk->sk_prot under us. */
|
||||
prot = READ_ONCE(sk->sk_prot);
|
||||
|
||||
if (uaddr->sa_family == AF_UNSPEC)
|
||||
return sk->sk_prot->disconnect(sk, flags);
|
||||
return prot->disconnect(sk, flags);
|
||||
|
||||
if (BPF_CGROUP_PRE_CONNECT_ENABLED(sk)) {
|
||||
err = sk->sk_prot->pre_connect(sk, uaddr, addr_len);
|
||||
err = prot->pre_connect(sk, uaddr, addr_len);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (data_race(!inet_sk(sk)->inet_num) && inet_autobind(sk))
|
||||
return -EAGAIN;
|
||||
return sk->sk_prot->connect(sk, uaddr, addr_len);
|
||||
return prot->connect(sk, uaddr, addr_len);
|
||||
}
|
||||
EXPORT_SYMBOL(inet_dgram_connect);
|
||||
|
||||
|
|
@ -734,10 +739,11 @@ EXPORT_SYMBOL(inet_stream_connect);
|
|||
int inet_accept(struct socket *sock, struct socket *newsock, int flags,
|
||||
bool kern)
|
||||
{
|
||||
struct sock *sk1 = sock->sk;
|
||||
struct sock *sk1 = sock->sk, *sk2;
|
||||
int err = -EINVAL;
|
||||
struct sock *sk2 = sk1->sk_prot->accept(sk1, flags, &err, kern);
|
||||
|
||||
/* IPV6_ADDRFORM can change sk->sk_prot under us. */
|
||||
sk2 = READ_ONCE(sk1->sk_prot)->accept(sk1, flags, &err, kern);
|
||||
if (!sk2)
|
||||
goto do_err;
|
||||
|
||||
|
|
@ -825,12 +831,15 @@ ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset,
|
|||
size_t size, int flags)
|
||||
{
|
||||
struct sock *sk = sock->sk;
|
||||
const struct proto *prot;
|
||||
|
||||
if (unlikely(inet_send_prepare(sk)))
|
||||
return -EAGAIN;
|
||||
|
||||
if (sk->sk_prot->sendpage)
|
||||
return sk->sk_prot->sendpage(sk, page, offset, size, flags);
|
||||
/* IPV6_ADDRFORM can change sk->sk_prot under us. */
|
||||
prot = READ_ONCE(sk->sk_prot);
|
||||
if (prot->sendpage)
|
||||
return prot->sendpage(sk, page, offset, size, flags);
|
||||
return sock_no_sendpage(sock, page, offset, size, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(inet_sendpage);
|
||||
|
|
|
|||
|
|
@ -888,13 +888,13 @@ int fib_nh_match(struct net *net, struct fib_config *cfg, struct fib_info *fi,
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* cannot match on nexthop object attributes */
|
||||
if (fi->nh)
|
||||
return 1;
|
||||
|
||||
if (cfg->fc_oif || cfg->fc_gw_family) {
|
||||
struct fib_nh *nh;
|
||||
|
||||
/* cannot match on nexthop object attributes */
|
||||
if (fi->nh)
|
||||
return 1;
|
||||
|
||||
nh = fib_info_nh(fi, 0);
|
||||
if (cfg->fc_encap) {
|
||||
if (fib_encap_match(net, cfg->fc_encap_type,
|
||||
|
|
|
|||
|
|
@ -268,8 +268,21 @@ restart_rcu:
|
|||
rcu_read_lock();
|
||||
restart:
|
||||
sk_nulls_for_each_rcu(sk, node, &head->chain) {
|
||||
if (sk->sk_state != TCP_TIME_WAIT)
|
||||
if (sk->sk_state != TCP_TIME_WAIT) {
|
||||
/* A kernel listener socket might not hold refcnt for net,
|
||||
* so reqsk_timer_handler() could be fired after net is
|
||||
* freed. Userspace listener and reqsk never exist here.
|
||||
*/
|
||||
if (unlikely(sk->sk_state == TCP_NEW_SYN_RECV &&
|
||||
hashinfo->pernet)) {
|
||||
struct request_sock *req = inet_reqsk(sk);
|
||||
|
||||
inet_csk_reqsk_queue_drop_and_put(req->rsk_listener, req);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
tw = inet_twsk(sk);
|
||||
if ((tw->tw_family != family) ||
|
||||
refcount_read(&twsk_net(tw)->ns.count))
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue