[PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-12 Thread ameynarkhede03
From: Amey Narkhede Add reset_methods_enabled bitmap to struct pci_dev to keep track of user preferred device reset mechanisms. Add reset_method sysfs attribute to query and set user preferred device reset mechanisms. Signed-off-by: Amey Narkhede --- Reviewed-by: Alex Williamson Reviewed-by: R

[PATCH 3/4] PCI: Remove reset_fn field from pci_dev

2021-03-12 Thread ameynarkhede03
From: Amey Narkhede reset_fn field is used to indicate whether the device supports any reset mechanism or not. Deprecate use of reset_fn in favor of new reset_methods bitmap which can be used to keep track of all supported reset mechanisms of a device. Signed-off-by: Amey Narkhede --- Reviewed-

[PATCH 2/4] PCI: Add new bitmap for keeping track of supported reset mechanisms

2021-03-12 Thread ameynarkhede03
From: Amey Narkhede Introduce a new bitmap reset_methods in struct pci_dev to keep track of reset mechanisms supported by the device. Also refactor probing and reset functions to take advantage of calling convention of reset functions. Signed-off-by: Amey Narkhede --- Reviewed-by: Alex Williams

[PATCH 1/4] PCI: Refactor pcie_flr to follow calling convention of other reset methods

2021-03-12 Thread ameynarkhede03
From: Amey Narkhede Currently there is separate function pcie_has_flr to probe whether pcie flr is supported or not by the device which does not match the calling convention followed by all other reset methods which use second function argument to decide whether to probe or not. Refactor pcie_flr

[PATCH 0/4] Expose and manage PCI device reset

2021-03-12 Thread ameynarkhede03
From: Amey Narkhede PCI and PCIe devices may support a number of possible reset mechanisms for example Function Level Reset (FLR) provided via Advanced Feature or PCIe capabilities, Power Management reset, bus reset, or device specific reset. Currently the PCI subsystem creates a policy prioritiz

[PATCH v2] staging: gdm724x: Fix DMA from stack

2021-02-09 Thread ameynarkhede03
From: Amey Narkhede Stack allocated buffers cannot be used for DMA on all architectures so allocate hci_packet buffer using kzalloc(). Signed-off-by: Amey Narkhede --- drivers/staging/gdm724x/gdm_usb.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH] staging: gdm724x: Fix DMA from stack

2021-02-09 Thread ameynarkhede03
From: Amey Narkhede Stack allocated buffers cannot be used for DMA on all architectures so allocate usbdev buffer using kmalloc(). Signed-off-by: Amey Narkhede --- drivers/staging/gdm724x/gdm_usb.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gdm724x