Commit Graph

53 Commits

Author SHA1 Message Date
Kaixu Xia 6a5c938a8c virtio-blk: modernize sysfs attribute creation
Use new-style DEVICE_ATTR_RO/DEVICE_ATTR_RW to create the sysfs attributes
and register the disk with default sysfs attribute groups.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-06-13 10:42:13 +08:00
Kaixu Xia ad81a1a4f9 zram: register default groups with device_add_disk()
Register default sysfs groups during device_add_disk() to avoid a
race condition with udev during startup.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-06-13 10:42:04 +08:00
Hannes Reinecke 11c214a0ea aoe: register default groups with device_add_disk()
Register default sysfs groups during device_add_disk() to avoid a
race condition with udev during startup.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Ed L. Cachin <ed.cashin@acm.org>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-06-13 10:40:45 +08:00
Kaixu Xia 86174fab46 nvme: register ns_id attributes as default sysfs groups
We should be registering the ns_id attribute as default sysfs
attribute groups, otherwise we have a race condition between
the uevent and the attributes appearing in sysfs.

Suggested-by: Bart van Assche <bvanassche@acm.org>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-06-13 10:40:39 +08:00
Kaixu Xia 2eda7fb569 block: genhd: add 'groups' argument to device_add_disk
Update device_add_disk() to take an 'groups' argument so that
individual drivers can register a device with additional sysfs
attributes.
This avoids race condition the driver would otherwise have if these
groups were to be created with sysfs_add_groups().

Signed-off-by: Martin Wilck <martin.wilck@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-06-13 10:40:21 +08:00
markwhwu 7dd04507a4 iommu/amd: Add support for higher 64-bit IOMMU Control Register
upstream commit:e881dbd5d4a6950c9e2e7623c79d9578949365c9

Currently, the driver only supports lower 32-bit of IOMMU Control register.
However, newer AMD IOMMU specification has extended this register
to 64-bit. Therefore, replace the accessing API with the 64-bit version.

Signed-off-by: Mark Whwu <markwhwu@tencent.com>
2022-03-08 14:57:06 +08:00
Lei Chen 4a21bdff34 blk:virtio-blk: disable timeout mechanism for virtblk device
Signed-off-by: Lei Chen <lennychen@tencent.com>
2022-01-10 16:38:07 +08:00
Chunguang Xu f25df32da5 nvme-pci: do not disable if the queue is not initialized
Now nvme uses managed irq. In some scenarios, there may be
insufficient vector space to cause irq allocation to fail.
At this time, it will disable_dev, but the queue has not
been initialized at this time, so there is no need to
disable queue at this time.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
2021-09-29 10:32:43 +08:00
Fuhai Wang 0f77c3ff8f scsi: smartpqi: compat for tk3
Signed-off-by: Fuhai Wang <fuhaiwang@tencent.com>
2021-07-29 23:14:54 +08:00
Fuhai Wang f1355f197a scsi: smartpqi: update driver version to v2.1.8-040
url: https://download.adaptec.com/raid/aac/linux/smartpqi_src_v2.1.8-040.tgz

Signed-off-by: Fuhai Wang <fuhaiwang@tencent.com>
2021-07-29 23:13:50 +08:00
Honglin Li 21008e5ae6 driver: update bnxt_en driver to 1.10.1-216.1.192.4_Makefile
Signed-off-by: Honglin Li <honglinli@tencent.com>
2021-05-06 08:17:28 +00:00
Xiaoming Gao aedf71cbd7 mpt3sas: sort sas by slot before sas_attach
currently sas disk detected order is decided by the first interrupt
generated order, not by slot number, fix it by slot number.

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
2021-04-27 08:20:56 +00:00
Fuhai Wang 83cae9c63f driver: update mpt3sas from 32.00.00.00 to 37.00.00.00
Signed-off-by: Fuhai Wang <fuhaiwang@tencent.com>
2021-04-27 08:20:56 +00:00
Kaixu Xia 207a58f198 scsi: smartpqi: update driver version to 1.2.4-070 2021-03-16 14:13:34 +08:00
Lei Chen b5d85c9684 PCI: Probe bridge window attributes once at enumeration-time
upstream: 51c48b310183ab6ba5419edfc6a8de889cc04521

pci_bridge_check_ranges() determines whether a bridge supports the optional
I/O and prefetchable memory windows and sets the flag bits in the bridge
resources.  This *could* be done once during enumeration except that the
resource allocation code completely clears the flag bits, e.g., in the
pci_assign_unassigned_bridge_resources() path.

The problem with pci_bridge_check_ranges() in the resource allocation path
is that we may allocate resources after devices have been claimed by
drivers, and pci_bridge_check_ranges() *changes* the window registers to
determine whether they're writable.  This may break concurrent accesses to
devices behind the bridge.

Add a new pci_read_bridge_windows() to determine whether a bridge supports
the optional windows, call it once during enumeration, remember the
results, and change pci_bridge_check_ranges() so it doesn't touch the
bridge windows but sets the flag bits based on those remembered results.

Signed-off-by: Lei Chen <lennychen@tencent.com>
2020-12-25 15:38:45 +08:00
Lei Chen 8cc9daaef1 virtblk: print useful info for timeout scenario
Signed-off-by: Lei Chen <lennychen@tencent.com>
2020-12-25 15:38:30 +08:00
Hongbo Li 585426ae3f acpi: disable AMD ghes timer
This timer will cause big schedule latency and network delay
on AMD machine.

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-12-14 09:56:58 +08:00
Xiaoming Gao cf69d8f3c0 mpt3sas: sort sas by slot before sas_attach
currently sas disk detected order is decided by the first interrupt
generated order, not by slot number, fix it by slot number.

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
2020-07-08 15:58:51 +08:00
Kaixu Xia e160ea10b7 drivers: update megaraid drivers to 07.713.02.00
Update from 07.707.51.00-rc1 to 07.713.02.00.

Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
2020-07-08 15:55:26 +08:00
Zhiping du d244f95696 drivers: fix rpm build error for bnxt Makefile
Signed-off-by: Zhiping Du <zhipingdu@tencent.com>
2020-05-29 10:40:33 +08:00
Zhiping du 51fadb2a94 driver: simplified bnxt driver Makefile
Signed-off-by: Zhiping Du <zhipingdu@tencent.com>
2020-05-29 10:40:31 +08:00
Zhiping du 4a019c19d4 driver: update bnxt_en driver to 1.10.1-216.1.92.0
Signed-off-by: Zhiping Du <zhipingdu@tencent.com>
2020-05-29 10:40:27 +08:00
Lei Chen 123e02a165 driver: update mpt3sas from 26.00.00.00 to 32.00.00.00 2020-05-29 10:40:07 +08:00
kaixuxia 2dfe979089 nvme: add the hotplug info output about drive letter and BDF
Signed-off-by: kaixuxia <kaixuxia@tencent.com>
2020-05-29 10:39:32 +08:00
brookxu b81976658c nvme: add nvme io error/timeout log
Add io error and timeout log to nvme devices

Signed-off-by: brookxu <brookxu@tencent.com>
2020-05-29 10:39:30 +08:00
Lei Chen de2e1a582c driver: megaraid: update to 07.707.51.00-rc1
this driver originates from kernel v5.1

upstream commit :

e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd

Signed-off-by: lennychen <lennychen@tencent.com>
2020-05-29 10:39:27 +08:00
Qian Cai bd8f9050b6 iommu/amd: fix a crash in iova_magazine_free_pfns
The commit b3aa14f02254 ("iommu: remove the mapping_error dma_map_ops
method") incorrectly changed the checking from dma_ops_alloc_iova() in
map_sg() causes a crash under memory pressure as dma_ops_alloc_iova()
never return DMA_MAPPING_ERROR on failure but 0, so the error handling
is all wrong.

   kernel BUG at drivers/iommu/iova.c:801!
    Workqueue: kblockd blk_mq_run_work_fn
    RIP: 0010:iova_magazine_free_pfns+0x7d/0xc0
    Call Trace:
     free_cpu_cached_iovas+0xbd/0x150
     alloc_iova_fast+0x8c/0xba
     dma_ops_alloc_iova.isra.6+0x65/0xa0
     map_sg+0x8c/0x2a0
     scsi_dma_map+0xc6/0x160
     pqi_aio_submit_io+0x1f6/0x440 [smartpqi]
     pqi_scsi_queue_command+0x90c/0xdd0 [smartpqi]
     scsi_queue_rq+0x79c/0x1200
     blk_mq_dispatch_rq_list+0x4dc/0xb70
     blk_mq_sched_dispatch_requests+0x249/0x310
     __blk_mq_run_hw_queue+0x128/0x200
     blk_mq_run_work_fn+0x27/0x30
     process_one_work+0x522/0xa10
     worker_thread+0x63/0x5b0
     kthread+0x1d2/0x1f0
     ret_from_fork+0x22/0x40

Fixes: b3aa14f02254 ("iommu: remove the mapping_error dma_map_ops method")
Signed-off-by: Qian Cai <cai@lca.pw>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-05-29 10:39:16 +08:00
Joerg Roedel 60c068122a iommu/amd: Fix race in increase_address_space()
After the conversion to lock-less dma-api call the
increase_address_space() function can be called without any
locking. Multiple CPUs could potentially race for increasing
the address space, leading to invalid domain->mode settings
and invalid page-tables. This has been happening in the wild
under high IO load and memory pressure.

Fix the race by locking this operation. The function is
called infrequently so that this does not introduce
a performance regression in the dma-api path again.

Reported-by: Qian Cai <cai@lca.pw>
Fixes: 256e4621c21a ('iommu/amd: Make use of the generic IOVA allocator')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2020-05-29 10:39:15 +08:00
Hongbo Li a8520819fd net: update iavf driver
update iavf driver to 3.9.3

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-05-29 10:39:13 +08:00
Hongbo Li 8058b54029 net: update i40e pf driver
update i40e pf driver to 2.11.25

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-05-29 10:39:07 +08:00
Hongbo Li a78779cbb3 i40evf: correct makefile
correct i40evf makefile

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-05-29 10:38:56 +08:00
Hongbo Li a81f081c18 i40e: correct make
correct i40e driver makefile

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-05-29 10:38:54 +08:00
Hongbo Li bafcf72449 net: iavf drv
iavf driver is the new vf driver of i40e vf

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-05-29 10:38:52 +08:00
Hongbo Li b52124b36e net: remove i40evf drv
i40evf driver is replaced by iavf driver

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-05-29 10:38:48 +08:00
Hongbo Li 6a60bc66f7 net: update i40e drv
update i40e driver to 2.8.43

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-05-29 10:38:46 +08:00
Hongbo Li 0bf1c69203 net: update ixgbevf driver
update ixgbevf driver to 4.6.3

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-05-29 10:38:43 +08:00
Hongbo Li a5d2426293 net: update ixgbe driver
update ixgbe driver to 5.6.5

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-05-29 10:38:41 +08:00
Samuel Liao 660998b7a9 x86: add hygon family 18h 2020-03-13 19:37:23 +08:00
? jiang 2212bdbc80 virtio-net: lower min ring num_free for efficiency
This change lowers ring buffer reclaim threshold from 1/2*queue to budget
for better performance. According to our test with qemu + dpdk, packet
dropping happens when the guest is not able to provide free buffer in
avail ring timely with default 1/2*queue. The value in the patch has been
tested and does show better performance.

Test setup: iperf3 to generate packets to guest (total 30mins, pps 400k, UDP)
avg packets drop before: 2842
avg packets drop after: 360(-87.3%)

Further, current code suffers from a starvation problem: the amount of
work done by try_fill_recv is not bounded by the budget parameter, thus
(with large queues) once in a while userspace gets blocked for a long
time while queue is being refilled. Trigger refills earlier to make sure
the amount of work to do is limited.

Signed-off-by: jiangkidd <jiangkidd@hotmail.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-01-02 14:55:55 +08:00
Fan Bin 314bf3d4ba MMC: Use the device ID implied from device tree
Signed-off-by: Fan Bin <tombinfan@tencent.com>
2020-01-02 14:52:13 +08:00
Chunguang Xu 88885ab004 dm: add support for blkcg diskstats
add support for blkcg diskstats

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
2020-01-02 12:20:20 +08:00
Chunguang Xu 6a0b7a7959 md: add support for blkcg diskstats
add support for blkcg diskstats

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
2020-01-02 12:20:04 +08:00
Xiaoming Gao 1414675c46 iommu/amd: Add support for IOMMU XT mode
merge from AMD

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
2020-01-02 12:19:07 +08:00
Xiaoming Gao fd8d092e2e Revert "iommu/amd: Support AMD platform with more than 255 CPU"
This reverts commit 7d65c03648b08c4a48fe8ce22fc1aadddcdf8f6f.
2020-01-02 12:18:52 +08:00
Kaixu Xia de046697ad arm64: implement ftrace with regs by using patchable-function-entry
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
2020-01-02 12:14:57 +08:00
Jia Wang 572fa78fc1 NBD: remove invalid reread of partition info
this read can cause IO error when we disconnect nbd with qemu-nbd.
upstream: fe1f9e6659ca6124f500a0f829202c7c902fab0c

signed-off-by: Jia Wang <jasperwang@tencent.com>
2020-01-02 12:12:53 +08:00
Shengmiao Liao 74913e31a6 iommu/amd: Support AMD platform with more than 255 CPU
x86: irq_remapping: Move irq remapping mode enum
iommu/amd: Add support for higher 64-bit IOMMU Control Register
iommu/amd: Add support for IOMMU XT mode

Signed-off-by: Shengmiao Liao <samuelliao@tencent.com>
2020-01-02 12:12:33 +08:00
Hongbo Li 4240da1a05 net: update i40evf drv to 3.6.15
Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-01-02 12:11:55 +08:00
Hongbo Li b169baa825 net: update i40e drv to 2.7.29
Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-01-02 12:11:42 +08:00
Lei Chen 7d7add8cc1 driver: fix mpt3sas driver Makefile bug
Signed-off-by: Lei Chen <lennychen@tencent.com>
2020-01-02 12:07:49 +08:00