- Apr 04, 2019
-
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Acked-by:
Vladimir Zapolskiy <vz@mleia.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Reviewed-by:
Baolin Wang <baolin.wang@linaro.org> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Enrico Weigelt, metux IT consult authored
Align the Kconfig formatting with the vast majority of the Kconfig files, to make it a bit easier / more pleasant to read ;-) Signed-off-by:
Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Geert Uytterhoeven authored
gpiochip_free_hogs() was always called from gpiochip_remove(), not of_gpiochip_remove(). It is now also called from the failure patch in gpiochip_add_data_with_key(). Fixes: f625d460 ("gpio: add GPIO hogging mechanism") Signed-off-by:
Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
It turns out that one specific hardware has two direction registers: one to set a GPIO line as input and another one to set a GPIO line as output. So in theory a line can be configured as input and output at the same time. Make the MMIO GPIO helper deal with this: store both registers in the state container, use both in the generic code if present. Synchronize the input register to the output register when we register a GPIO chip, with the output settings taking precedence. Keep the helper variable to detect inverted direction semantics (only direction in register) but augment the code to be more straight-forward for the generic case when setting the registers. Fix some flunky with unreadable direction registers at the same time as we're touching this code. Cc: David Woods <dwoods@mellanox.com> Cc: Shravan Kumar Ramani <sramani@mellanox.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- Mar 15, 2019
-
-
Aaron Ma authored
Add a non-NULL check to fix potential NULL pointer dereference Cleanup code to call function once. Signed-off-by:
Aaron Ma <aaron.ma@canonical.com> Fixes: 2bf9a0a1 ('iommu/amd: Add iommu support for ACPI HID devices') Signed-off-by:
Joerg Roedel <jroedel@suse.de>
-
David Hildenbrand authored
The XEN balloon driver - in contrast to other balloon drivers - allows to map some inflated pages to user space. Such pages are allocated via alloc_xenballooned_pages() and freed via free_xenballooned_pages(). The pfn space of these allocated pages is used to map other things by the hypervisor using hypercalls. Pages marked with PG_offline must never be mapped to user space (as this page type uses the mapcount field of struct pages). So what we can do is, clear/set PG_offline when allocating/freeing an inflated pages. This way, most inflated pages can be excluded by dumping tools and the "reused for other purpose" balloon pages are correctly not marked as PG_offline. Fixes: 77c4adf6 (xen/balloon: mark inflated pages PG_offline) Reported-by:
Julien Grall <julien.grall@arm.com> Tested-by:
Julien Grall <julien.grall@arm.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Juergen Gross <jgross@suse.com> Signed-off-by:
Juergen Gross <jgross@suse.com>
-
- Mar 14, 2019
-
-
Dave Rodgman authored
lzo-rle gives higher performance and similar compression ratios to lzo. Link: http://lkml.kernel.org/r/20190205155944.16007-4-dave.rodgman@arm.com Signed-off-by:
Dave Rodgman <dave.rodgman@arm.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Sagar Biradar authored
Fix performance issue where the queue depth for SmartIOC logical volumes is set to 1, and allow the usual logical volume code to be executed Fixes: a052865f (aacraid: Set correct Queue Depth for HBA1000 RAW disks) Cc: stable@vger.kernel.org Signed-off-by:
Sagar Biradar <Sagar.Biradar@microchip.com> Reviewed-by:
Dave Carroll <david.carroll@microsemi.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Dan Carpenter authored
It used to be that "error" was set to -ENODEV at the start of the function but we shifted some code around an now "error" is set to zero for most error paths. There is a mix of direct returns and "goto out" but I changed everything to direct returns for consistency. Fixes: 56de8357 ("scsi: lpfc: fix calls to dma_set_mask_and_coherent()") Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Acked-by:
James Smart <james.smart@broadcom.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- Mar 13, 2019
-
-
Xin Long authored
sk_setup_caps() is called to set sk->sk_dst_cache in pptp_connect, so we have to dst_release(sk->sk_dst_cache) in pptp_sock_destruct, otherwise, the dst refcnt will leak. It can be reproduced by this syz log: r1 = socket$pptp(0x18, 0x1, 0x2) bind$pptp(r1, &(0x7f0000000100)={0x18, 0x2, {0x0, @local}}, 0x1e) connect$pptp(r1, &(0x7f0000000000)={0x18, 0x2, {0x3, @remote}}, 0x1e) Consecutive dmesg warnings will occur: unregister_netdevice: waiting for lo to become free. Usage count = 1 v1->v2: - use rcu_dereference_protected() instead of rcu_dereference_check(), as suggested by Eric. Fixes: 00959ade ("PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol)") Reported-by:
Xiumei Mu <xmu@redhat.com> Signed-off-by:
Xin Long <lucien.xin@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Bryan Whitehead authored
It has been observed that tx queue may stall while downloading from certain web sites (example www.speedtest.net) The cause has been tracked down to a corner case where the tx interrupt vector was disabled automatically, but was not re enabled later. The lan743x has two mechanisms to enable/disable individual interrupts. Interrupts can be enabled/disabled by individual source, and they can also be enabled/disabled by individual vector which has been mapped to the source. Both must be enabled for interrupts to work properly. The TX code path, primarily uses the interrupt enable/disable of the TX source bit, while leaving the vector enabled all the time. However, while investigating this issue it was noticed that the driver requested the use of the vector auto clear feature. The test above revealed a case where the vector enable was cleared unintentionally. This patch fixes the issue by deleting the lines that request the vector auto clear feature to be used. Fixes: 23f0703c ("lan743x: Add main source files for new lan743x driver") Signed-off-by:
Bryan Whitehead <Bryan.Whitehead@microchip.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sagi Grimberg authored
A C2HData PDU with the SUCCESS flag set indicates that the I/O was completed by the controller successfully and means that a subsequent completion response capsule PDU will be ommitted. If we see this flag, fisrt we check that LAST_PDU flag is set as well, and then we complete the request when the data transfer (and data digest verification if its on) is done. While we're at it, reuse a bit of code with nvme_fail_request. Reported-by:
Steve Blightman <steve.blightman@oracle.com> Suggested-by:
Oliver Smith-Denny <osmithde@cisco.com> Signed-off-by:
Sagi Grimberg <sagi@grimberg.me> Reviewed-by:
Oliver Smith-Denny <osmithde@cisco.com> Tested-by:
Oliver Smith-Denny <osmithde@cisco.com> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Christoph Hellwig authored
NVMe DSM is a pure hint, so if the underlying device / file system does not support discard-like operations we should not fail the operation but rather return success. Fixes: 3b031d15 ("nvmet: add error log support for bdev backend") Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Tested-by:
Sagi Grimberg <sagi@grimberg.me> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Christoph Hellwig authored
Add a gendisk argument to nvme_config_write_zeroes so that the call to nvme_update_disk_info for the multipath device node updates the proper request_queue. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Keith Busch <keith.busch@intel.com> Reviewed-by:
Max Gurtovoy <maxg@mellanox.com> Tested-by:
Sagi Grimberg <sagi@grimberg.me> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Christoph Hellwig authored
Add a gendisk argument to nvme_config_discard so that the call to nvme_update_disk_info for the multipath device node updates the proper request_queue. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reported-by:
Sagi Grimberg <sagi@grimberg.me> Reviewed-by:
Keith Busch <keith.busch@intel.com> Reviewed-by:
Max Gurtovoy <maxg@mellanox.com> Tested-by:
Sagi Grimberg <sagi@grimberg.me> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Christoph Hellwig authored
Just opencode the two function calls in the caller. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Keith Busch <keith.busch@intel.com> Reviewed-by:
Max Gurtovoy <maxg@mellanox.com> Reviewed-by:
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Tested-by:
Sagi Grimberg <sagi@grimberg.me> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Christoph Hellwig authored
Qemu started out with a broken implementation of Write Zeroes written by yours truly. Disable Write Zeroes on qemu for now, eventually we need to go back and make all the qemu quirks version specific, but that is left for another time. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Keith Busch <keith.busch@intel.com> Tested-by:
Ming Lei <ming.lei@redhat.com> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
James Smart authored
The FC-NVME spec, when finally approved, modified the disconnect LS such that the only scope available is the association. Rework the Disconnect LS processing to be in accordance with the change. Signed-off-by:
Nigel Kirkland <nigel.kirkland@broadcom.com> Signed-off-by:
James Smart <jsmart2021@gmail.com> Reviewed-by:
Ewan D. Milne <emilne@redhat.com> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
James Smart authored
There are two changes: 1) The logic in the __nvmet_fc_free_assoc() routine is bad. It uses "safe" routines assuming pointers will come back valid. However, the intervening next structure being linked can be removed from the list and the resulting safe pointers are bad, resulting in NULL ptrs being hit. Correct by scheduling a work element to perform the association delete, which can be done while under lock. 2) Prior patch that added the work element scheduling left a possible reference on the object if the work element couldn't be scheduled. Correct by doing the put on a failing schedule_work() call. Signed-off-by:
Nigel Kirkland <nigel.kirkland@broadcom.com> Signed-off-by:
James Smart <jsmart2021@gmail.com> Reviewed-by:
Ewan D. Milne <emilne@redhat.com> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
James Smart authored
If: - A successful connect has occurred with an io queue count greater than zero and namespaces detected and running. - An error or something occurs which causes a termination of the prior association and then starts a reconnect, - The reconnect then creates a new controller, but for whatever reason, nvme_set_queue_count() results in io queue count set to zero. This will skip io queue and tag set changes. - But... the controller will transition to live, calling nvme_start_ctrl, which calls nvme_start_queues(), which then releases I/Os into the transport which then sends them to the driver. As there are no queues, things eventually hit the driver looking for a handle, which was cleared when the original controller was reset, and it can't proceed. Worst case, things progress, but everything fails. In the failing scenario, the nvme_set_features(NVME_FEAT_NUM_QUEUES) command actually failed with a NVME_SC_INTERNAL error. For some reason, although nvme_set_queue_count() saw the error and set io queue count to zero, it doesn't return a failure status to the transport, which allows the transport to continue using the controller. Fix the problem by simply rejecting the new association if at least 1 I/O queue can't be created. The association reject will fail the reconnect attempt and fall into the reconnect retry policy. Signed-off-by:
James Smart <jsmart2021@gmail.com> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
James Smart authored
A recent change added a numa_node field to the nvme controller and has the transport assign the node using dev_to_node(). However, fcloop registers with a NULL device struct, so the dev_to_node() call oops. Revise the assignment to assign no node when device struct is null. Fixes: 103e515e ("nvme: add a numa_node field to struct nvme_ctrl") Reported-by:
Mike Snitzer <snitzer@redhat.com> Signed-off-by:
James Smart <jsmart2021@gmail.com> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Mike Snitzer <snitzer@redhat.com> [hch: small coding style fixup] Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
James Smart authored
For some nvme command, when issued by the nvme core layer, there is an internal buffer which can cause blk_rq_payload_bytes() to return a non-zero value yet there is no actual/real command payload and sg list. An example is the WRITE ZEROES command. To address this, when making choices on whether to dma map an sgl, use blk_rq_nr_phys_segments() instead of blk_rq_payload_bytes(). When there is a sgl, blk_rq_payload_bytes() will return the amount of data to be transferred by the sgl. Signed-off-by:
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by:
James Smart <jsmart2021@gmail.com> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Yufen Yu authored
After commit 4d43d395 (workqueue: Try to catch flush_work() without INIT_WORK()), it can cause warning when delete nvme-loop device, trace like: [ 76.601272] Call Trace: [ 76.601646] ? del_timer+0x72/0xa0 [ 76.602156] __cancel_work_timer+0x1ae/0x270 [ 76.602791] cancel_work_sync+0x14/0x20 [ 76.603407] nvmet_ctrl_free+0x1b7/0x2f0 [nvmet] [ 76.604091] ? free_percpu+0x168/0x300 [ 76.604652] nvmet_sq_destroy+0x106/0x240 [nvmet] [ 76.605346] nvme_loop_destroy_admin_queue+0x30/0x60 [nvme_loop] [ 76.606220] nvme_loop_shutdown_ctrl+0xc3/0xf0 [nvme_loop] [ 76.607026] nvme_loop_delete_ctrl_host+0x19/0x30 [nvme_loop] [ 76.607871] nvme_do_delete_ctrl+0x75/0xb0 [ 76.608477] nvme_sysfs_delete+0x7d/0xc0 [ 76.609057] dev_attr_store+0x24/0x40 [ 76.609603] sysfs_kf_write+0x4c/0x60 [ 76.610144] kernfs_fop_write+0x19a/0x260 [ 76.610742] __vfs_write+0x1c/0x60 [ 76.611246] vfs_write+0xfa/0x280 [ 76.611739] ksys_write+0x6e/0x120 [ 76.612238] __x64_sys_write+0x1e/0x30 [ 76.612787] do_syscall_64+0xbf/0x3a0 [ 76.613329] entry_SYSCALL_64_after_hwframe+0x44/0xa9 We fix it by moving fatal_err_work init to nvmet_alloc_ctrl(), which may more reasonable. Signed-off-by:
Yufen Yu <yuyufen@huawei.com> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Yufen Yu authored
After commit a686ed75 ("nvme: introduce a helper function for controller deletion), nvme_delete_ctrl_sync no longer use flush_work. Update comment, accordingly. Signed-off-by:
Yufen Yu <yuyufen@huawei.com> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Sagi Grimberg authored
In case nvme_alloc_ns fails after we initialize ns_head but before we add the ns to the controller namespaces list we need to explicitly put the ns_head reference because when we teardown the controller we won't find it, causing us to leak a dangling subsystem eventually. Signed-off-by:
Sagi Grimberg <sagi@grimberg.me> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Keith Busch authored
The field is defined to be a 24 byte array, we don't need to multiply the sizeof() that field by the number of dwords it covers. Signed-off-by:
Keith Busch <keith.busch@intel.com> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-