[PATCH] mmc: davinci: Drop pointer to mmc_host from mmc_davinci_host

2020-09-20 Thread Amey Narkhede
(which is cheaper than a dereference) and drop the unnecessary pointer. Signed-off-by: Amey Narkhede --- drivers/mmc/host/davinci_mmc.c | 96 ++ 1 file changed, 52 insertions(+), 44 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host

Re: [PATCH] block: aoe: Use seq_putc() if possible

2020-12-21 Thread Amey Narkhede
--- Begin Message --- On 20/12/21 04:04PM, Markus Elfring wrote: > > This is a single character that is printed out. Use seq_putc() for > > it to simplify the code. > > How do you think about to reconsider the integration of a previous update > suggestion once more? > > [PATCH 1/3] block-aoe: Use

[PATCH] block: aoe: Use seq_putc() if possible

2020-12-20 Thread Amey Narkhede
This is a single character that is printed out. Use seq_putc() for it to simplify the code. Signed-off-by: Amey Narkhede --- drivers/block/aoe/aoeblk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index

[PATCH] block: aoe: replace use of __constant_htons to htons

2020-12-20 Thread Amey Narkhede
-by: Amey Narkhede --- drivers/block/aoe/aoecmd.c | 2 +- drivers/block/aoe/aoenet.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 313f0b946fe2..7a5374a57b55 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block

Fwd: Re: [PATCH] block: aoe: replace use of __constant_htons to htons

2020-12-20 Thread 'Amey Narkhede'
--- Begin Message --- On 20/12/20 07:35PM, David Laight wrote: > From: Amey Narkhede > > Sent: 20 December 2020 16:46 > > > > The macro htons expands to __swab16 which has special > > case for constants in little endian case. In big > > endian case both __constant_

Re: [PATCH] block: aoe: replace use of __constant_htons to htons

2020-12-20 Thread 'Amey Narkhede'
--- Begin Message --- On 20/12/20 07:35PM, David Laight wrote: > From: Amey Narkhede > > Sent: 20 December 2020 16:46 > > > > The macro htons expands to __swab16 which has special > > case for constants in little endian case. In big > > endian case both __constant_

[PATCH] qtnfmac_pcie: Use module_pci_driver

2020-12-21 Thread Amey Narkhede
Use module_pci_driver for drivers whose init and exit functions only register and unregister, respectively. Signed-off-by: Amey Narkhede --- drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/wireless

Re: [PATCH] block: aoe: replace use of __constant_htons to htons

2020-12-21 Thread 'Amey Narkhede'
On 20/12/21 09:23AM, David Laight wrote: > From: 'Amey Narkhede' > > Sent: 20 December 2020 20:20 > > To: David Laight > > Subject: Re: [PATCH] block: aoe: replace use of __constant_htons to htons > > > > On 20/12/20 07:35PM, David Laight wrote: > >

Re: [PATCH] staging: qlge/qlge_main: Use min_t instead of min

2021-02-05 Thread Amey Narkhede
On 21/02/04 03:58PM, Nathan Chancellor wrote: > On Fri, Feb 05, 2021 at 03:24:51AM +0530, ameynarkhed...@gmail.com wrote: > > From: Amey Narkhede > > > > Use min_t instead of min function in qlge/qlge_main.c > > Fixes following checkpatch.pl warning: > > WARNIN

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

2021-02-09 Thread Amey Narkhede
On 21/02/09 06:40PM, Greg KH wrote: > On Tue, Feb 09, 2021 at 08:24:15PM +0530, ameynarkhed...@gmail.com wrote: > > From: Amey Narkhede > > > > Stack allocated buffers cannot be used for DMA > > on all architectures so allocate usbdev buffer > > using kmall

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

2021-02-10 Thread 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 --- Changes in v2: - Fixed build warning - Fixed memory leak using kfree drivers/staging/gdm724x/gdm_usb.c | 9 +++-- 1 file

Re: [PATCH v3] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Amey Narkhede
On 21/02/10 06:19PM, Dan Carpenter wrote: > On Wed, Feb 10, 2021 at 08:31:33PM +0530, Amey Narkhede wrote: > > On 21/02/10 03:55PM, Greg KH wrote: > > > On Wed, Feb 10, 2021 at 07:55:12PM +0530, Amey Narkhede wrote: > > > > Stack allocated buffers cannot

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

2021-02-10 Thread Amey Narkhede
On 21/02/10 09:06AM, Greg KH wrote: > On Wed, Feb 10, 2021 at 01:31:34PM +0530, Amey Narkhede wrote: > > Stack allocated buffers cannot be used for DMA > > on all architectures so allocate hci_packet buffer > > using kzalloc(). > > > > Signed-off-by: Amey Na

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

2021-02-10 Thread Amey Narkhede
On 21/02/10 12:04PM, Dan Carpenter wrote: > On Wed, Feb 10, 2021 at 02:28:11PM +0530, Amey Narkhede wrote: > > On 21/02/10 09:06AM, Greg KH wrote: > > > On Wed, Feb 10, 2021 at 01:31:34PM +0530, Amey Narkhede wrote: > > > > Stack allocated buffers cannot

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

2021-02-10 Thread Amey Narkhede
On 21/02/10 10:09AM, Greg KH wrote: > On Wed, Feb 10, 2021 at 02:28:11PM +0530, Amey Narkhede wrote: > > On 21/02/10 09:06AM, Greg KH wrote: > > > On Wed, Feb 10, 2021 at 01:31:34PM +0530, Amey Narkhede wrote: > > > > Stack allocated buffers cannot be used for DMA &

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

2021-02-10 Thread Amey Narkhede
Stack allocated buffers cannot be used for DMA on all architectures so allocate hci_packet buffer using kmalloc. Signed-off-by: Amey Narkhede --- Changes in v3: - Remove superfluous buf pointer - Reduce size of allocation of hci_packet to match number of bytes used

Re: [PATCH v3] staging: gdm724x: Fix DMA from stack

2021-02-10 Thread Amey Narkhede
On 21/02/10 03:55PM, Greg KH wrote: > On Wed, Feb 10, 2021 at 07:55:12PM +0530, Amey Narkhede wrote: > > Stack allocated buffers cannot be used for DMA > > on all architectures so allocate hci_packet buffer > > using kmalloc. > > > > Signed-off-by: Amey Na

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

2021-02-10 Thread Amey Narkhede
Stack allocated buffers cannot be used for DMA on all architectures so allocate hci_packet buffer using kmalloc. Signed-off-by: Amey Narkhede --- Changes in v4: - Use struct_size to allocate memory for hci_packet - Fix memory corruption drivers/staging/gdm724x/gdm_usb.c | 10

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

2021-03-23 Thread Amey Narkhede
On 21/03/23 08:44AM, Alex Williamson wrote: > On Tue, 23 Mar 2021 15:34:19 +0100 > Pali Rohár wrote: > > > On Thursday 18 March 2021 20:01:55 Amey Narkhede wrote: > > > On 21/03/17 09:13PM, Pali Rohár wrote: > > > > On Wednesday 17 March 2021 14:00:20 Alex Wi

Re: How long should be PCIe card in Warm Reset state?

2021-03-23 Thread Amey Narkhede
On 21/03/10 12:05PM, Pali Rohár wrote: > Hello! > > I would like to open a question about PCIe Warm Reset. Warm Reset of > PCIe card is triggered by asserting PERST# signal and in most cases > PERST# signal is controlled by GPIO. > > Basically every native Linux PCIe controller driver is doing

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

2021-03-25 Thread Amey Narkhede
On 21/03/25 10:37AM, Leon Romanovsky wrote: > On Wed, Mar 24, 2021 at 11:17:29AM -0600, Alex Williamson wrote: > > On Wed, 24 Mar 2021 17:13:56 +0200 > > Leon Romanovsky wrote: > > <...> > > > > Yes, and real testing/debugging almost always requires kernel rebuild. > > > Everything else is waste

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

2021-03-25 Thread Amey Narkhede
On 21/03/25 06:09PM, Leon Romanovsky wrote: > On Thu, Mar 25, 2021 at 08:55:04AM -0600, Alex Williamson wrote: > > On Thu, 25 Mar 2021 10:37:54 +0200 > > Leon Romanovsky wrote: > > > > > On Wed, Mar 24, 2021 at 11:17:29AM -0600, Alex Williamson wrote: > > > > On Wed, 24 Mar 2021 17:13:56 +0200 >

Re: How long should be PCIe card in Warm Reset state?

2021-03-23 Thread Amey Narkhede
On 21/03/23 05:27PM, Pali Rohár wrote: > On Tuesday 23 March 2021 21:49:41 Amey Narkhede wrote: > > On 21/03/10 12:05PM, Pali Rohár wrote: > > > Hello! > > > > > > I would like to open a question about PCIe Warm Reset. Warm Reset of > > > PCIe

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

2021-03-12 Thread Amey Narkhede
On 21/03/12 11:20AM, Alex Williamson wrote: > On Fri, 12 Mar 2021 23:04:48 +0530 > ameynarkhed...@gmail.com wrote: > > > From: Amey Narkhede > > > > PCI and PCIe devices may support a number of possible reset mechanisms > > for example Function Level Reset (F

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

2021-03-12 Thread Amey Narkhede
On 21/03/12 07:58PM, Krzysztof Wilczyński wrote: > Hi Amey, > > Thank you for sending the series over! > > [...] > > > Reviews/Acks/Sign-off-by from others (aside from Tested/Reported-by) > > > really need to be explicit, IMO. This is a common issue for new > > > developers, but it really needs

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

2021-03-15 Thread Amey Narkhede
On 21/03/15 12:55AM, Pali Rohár wrote: > On Friday 12 March 2021 23:04:52 ameynarkhed...@gmail.com wrote: > > From: Amey Narkhede > > > > Add reset_methods_enabled bitmap to struct pci_dev to > > keep track of user preferred device reset mechanisms. > > Add rese

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

2021-03-18 Thread Amey Narkhede
> > > > > > > > > > On Monday 15 March 2021 09:03:39 Alex Williamson wrote: > > > > > > > > On Mon, 15 Mar 2021 15:52:38 +0100 > > > > > > > > Pali Rohár wrote: > > > > > > > > > > > > > >

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

2021-03-18 Thread Amey Narkhede
On 21/03/18 11:09AM, Leon Romanovsky wrote: > On Wed, Mar 17, 2021 at 11:31:40AM -0600, Alex Williamson wrote: > > On Wed, 17 Mar 2021 15:58:40 +0200 > > Leon Romanovsky wrote: > > > > > On Wed, Mar 17, 2021 at 06:47:18PM +0530, Amey Narkhede wrote: > > >

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

2021-03-17 Thread Amey Narkhede
On 21/03/17 01:47PM, Leon Romanovsky wrote: > On Wed, Mar 17, 2021 at 04:53:09PM +0530, Amey Narkhede wrote: > > On 21/03/17 01:02PM, Leon Romanovsky wrote: > > > On Wed, Mar 17, 2021 at 03:54:47PM +0530, Amey Narkhede wrote: > > > > On 21/03/17 06:20AM, Leon Roma

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

2021-03-17 Thread Amey Narkhede
On 21/03/17 01:02PM, Leon Romanovsky wrote: > On Wed, Mar 17, 2021 at 03:54:47PM +0530, Amey Narkhede wrote: > > On 21/03/17 06:20AM, Leon Romanovsky wrote: > > > On Mon, Mar 15, 2021 at 06:32:32PM +, Raphael Norwitz wrote: > > > > On Mon, Mar 15, 2021 at 10:

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

2021-03-17 Thread Amey Narkhede
On 21/03/17 06:20AM, Leon Romanovsky wrote: > On Mon, Mar 15, 2021 at 06:32:32PM +, Raphael Norwitz wrote: > > On Mon, Mar 15, 2021 at 10:29:50AM -0600, Alex Williamson wrote: > > > On Mon, 15 Mar 2021 21:03:41 +0530 > > > Amey Narkhede wrote: > > &g

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

2021-03-18 Thread Amey Narkhede
On 21/03/18 07:35PM, Leon Romanovsky wrote: > On Thu, Mar 18, 2021 at 10:31:43PM +0530, Amey Narkhede wrote: > > On 21/03/18 04:57PM, Leon Romanovsky wrote: > > > On Thu, Mar 18, 2021 at 07:52:52PM +0530, Amey Narkhede wrote: > > > > On 21/03/18 11:09AM, Leon Roma

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

2021-03-18 Thread Amey Narkhede
On 21/03/18 07:22PM, Leon Romanovsky wrote: > On Thu, Mar 18, 2021 at 10:39:35AM -0600, Alex Williamson wrote: > > On Thu, 18 Mar 2021 11:09:34 +0200 > > Leon Romanovsky wrote: > > <...> > > > > I'm lost here, does vfio-pci use sysfs interface or internal to the > > > kernel API? > > > > > > If

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

2021-03-18 Thread Amey Narkhede
On 21/03/18 04:57PM, Leon Romanovsky wrote: > On Thu, Mar 18, 2021 at 07:52:52PM +0530, Amey Narkhede wrote: > > On 21/03/18 11:09AM, Leon Romanovsky wrote: > > > On Wed, Mar 17, 2021 at 11:31:40AM -0600, Alex Williamson wrote: > > > > On Wed, 17 Mar 2021 15:58:40

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

2021-03-19 Thread Amey Narkhede
On 21/03/19 03:05PM, Leon Romanovsky wrote: > On Thu, Mar 18, 2021 at 11:13:44PM +0530, Amey Narkhede wrote: > > On 21/03/18 07:35PM, Leon Romanovsky wrote: > > > On Thu, Mar 18, 2021 at 10:31:43PM +0530, Amey Narkhede wrote: > > > > On 21/03/18 04:57PM, Leon Roma

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

2021-03-19 Thread Amey Narkhede
On 21/03/19 05:37PM, Leon Romanovsky wrote: > On Fri, Mar 19, 2021 at 08:53:17PM +0530, Amey Narkhede wrote: > > On 21/03/19 03:05PM, Leon Romanovsky wrote: > > <...> > > > > > > It was exactly the reason why I think that VM usecase presented by > > &g

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

2021-03-21 Thread Amey Narkhede
On 21/03/21 10:40AM, Leon Romanovsky wrote: > On Sat, Mar 20, 2021 at 08:59:42AM -0600, Alex Williamson wrote: > > On Sat, 20 Mar 2021 11:10:08 +0200 > > Leon Romanovsky wrote: > > > On Fri, Mar 19, 2021 at 10:23:13AM -0600, Alex Williamson wrote: > > > > > > > > What if we taint the kernel or

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

2021-03-15 Thread Amey Narkhede
On 21/03/15 05:07PM, Leon Romanovsky wrote: > On Mon, Mar 15, 2021 at 08:34:09AM -0600, Alex Williamson wrote: > > On Mon, 15 Mar 2021 14:52:26 +0100 > > Pali Rohár wrote: > > > > > On Monday 15 March 2021 19:13:23 Amey Narkhede wrote: > > > &g

[PATCH v2 0/5] Expose and manage PCI device reset

2021-04-09 Thread Amey Narkhede
es ability of reset the device Sending Raphael's patch again as this series depends on it. Amey Narkhede (4): PCI: Add pcie_reset_flr to follow calling convention of other reset methods PCI: Add new array for keeping track of ordering of reset methods PCI: Remove reset_fn field from pci

[PATCH v2 1/5] PCI: merge slot and bus reset implementations

2021-04-09 Thread Amey Narkhede
SBR reset quirks and therefore is exposed in pci.h. Link: https://lkml.org/lkml/2021/3/23/911 Suggested-by: Alex Williamson Signed-off-by: Amey Narkhede Signed-off-by: Raphael Norwitz --- drivers/pci/pci.c | 19 +++ include/linux/pci.h | 1 + 2 files changed, 12 insertions

[PATCH v2 3/5] PCI: Add new array for keeping track of ordering of reset methods

2021-04-09 Thread Amey Narkhede
-developed-by: Alex Williamson Signed-off-by: Alex Williamson Signed-off-by: Amey Narkhede --- drivers/pci/pci.c | 107 ++-- drivers/pci/pci.h | 10 - drivers/pci/probe.c | 5 +-- include/linux/pci.h | 7 +++ 4 files changed, 82 insertions

[PATCH v2 2/5] PCI: Add pcie_reset_flr to follow calling convention of other reset methods

2021-04-09 Thread Amey Narkhede
convention of reset methods. Reviewed-by: Alex Williamson Reviewed-by: Raphael Norwitz Co-developed-by: Alex Williamson Signed-off-by: Alex Williamson Signed-off-by: Amey Narkhede --- drivers/crypto/cavium/nitrox/nitrox_main.c | 4 +- drivers/pci/pci.c | 62

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

2021-04-09 Thread Amey Narkhede
Add reset_method sysfs attribute to enable user to query and set user preferred device reset methods and their ordering. Reviewed-by: Alex Williamson Reviewed-by: Raphael Norwitz Co-developed-by: Alex Williamson Signed-off-by: Alex Williamson Signed-off-by: Amey Narkhede --- Documentation

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

2021-04-09 Thread Amey Narkhede
field to detect if the device supports FLR or not. Use pcie_reset_flr to probe whether it supports FLR or not. Reviewed-by: Alex Williamson Reviewed-by: Raphael Norwitz Co-developed-by: Alex Williamson Signed-off-by: Alex Williamson Signed-off-by: Amey Narkhede --- drivers/net/ethernet