Re: [PATCH][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-04-13 Thread James Bottomley
On Tue, 2021-04-13 at 00:45 -0500, Gustavo A. R. Silva wrote: > Hi Martin, > > On 4/12/21 23:52, Martin K. Petersen wrote: > > > Silencing analyzer warnings shouldn't be done at the expense of > > human > > readers. If it is imperative to switch to flex_array_size() to > > quiesce > > checker war

Re: [PATCH][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-04-12 Thread Gustavo A. R. Silva
Hi Martin, On 4/12/21 23:52, Martin K. Petersen wrote: > Silencing analyzer warnings shouldn't be done at the expense of human > readers. If it is imperative to switch to flex_array_size() to quiesce > checker warnings, please add a comment in the code explaining that the > size evaluates to nseg

[PATCH v2][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-04-12 Thread Gustavo A. R. Silva
]. Refactor the code according to the use of a flexible-array member in struct aac_raw_io2 instead of one-element array, and use the struct_size() and flex_array_size() helpers. Also, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warnings: drivers/scsi/aacraid

Re: [PATCH][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-04-12 Thread Martin K. Petersen
Hi Kees/Gustavo! >> @@ -4020,7 +4020,8 @@ static int aac_convert_sgraw2(struct aac_raw_io2 >> *rio2, int pages, int nseg, int >> } >> } >> sge[pos] = rio2->sge[nseg-1]; >> -memcpy(&rio2->sge[1], &sge[1], (nseg_new-1)*sizeof(struct >> sge_ieee1212)); >> +memcpy(&r

Re: [PATCH][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-04-07 Thread Kees Cook
helps with the ongoing efforts to enable -Warray-bounds by > fixing the following warnings: > > drivers/scsi/aacraid/aachba.c: In function ‘aac_build_sgraw2’: > drivers/scsi/aacraid/aachba.c:3970:18: warning: array subscript 1 is above > array bounds of ‘struct sge_ieee1212[1]’ [

[PATCH 2/6] scsi/aacraid: Delete obsolete TODO file

2021-03-30 Thread Wang Qing
The TODO file here has not been updated from 2.6.12 for more than 15 years. Its existence will mislead developers seeking to view outdated information. Signed-off-by: Wang Qing --- drivers/scsi/aacraid/TODO | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 drivers/scsi/aacraid/TODO

Re: [PATCH][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-03-25 Thread Gustavo A. R. Silva
I find it counter-intuitive to use the type of the destination array to > size the amount of source data to copy. "Are source and destination same The destination and source arrays are of the same type. :) drivers/scsi/aacraid/aachba.c: 3999 struct sge_ieee1212 *sge; > type? Doe

Re: [PATCH][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-03-25 Thread Martin K. Petersen
Gustavo, > Precisely this sort of confusion is one of the things we want to avoid > by using flexible-array members instead of one-element arrays. Ah, you're right! Now that I look at it again I also don't think that was the issue that originally caused concern. @@ -4020,7 +4020,8 @@ static i

Re: [PATCH][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-03-24 Thread Gustavo A. R. Silva
> sge_ieee1212)); >> +fibsize = struct_size(readcmd2, sge, >> + le32_to_cpu(readcmd2->sgeCnt)); > > The old code allocated sgeCnt-1 elements (whether that was a mistake or > not I do not know) whereas the new code would send a larger fib to th

Re: [PATCH][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-03-24 Thread Martin K. Petersen
pu(readcmd2->sgeCnt)); The old code allocated sgeCnt-1 elements (whether that was a mistake or not I do not know) whereas the new code would send a larger fib to the ASIC. I don't have any aacraid adapters and I am hesitant to merging changes that have not been validated on real hardwar

[PATCH][next] scsi: aacraid: Replace one-element array with flexible-array member

2021-03-04 Thread Gustavo A. R. Silva
]. Refactor the code according to the use of a flexible-array member in struct aac_raw_io2 instead of one-element array, and use the struct_size() and flex_array_size() helpers. Also, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warnings: drivers/scsi/aacraid

[gustavoars-linux:testing/scsi/aacraid] BUILD SUCCESS eae919a32e577ba5cdbe353ce1eabebd969c04df

2021-03-04 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/scsi/aacraid branch HEAD: eae919a32e577ba5cdbe353ce1eabebd969c04df scsi: aacraid: Replace one-element array with flexible-array member elapsed time: 720m configs tested: 97 configs skipped: 3 The

[PATCH 24/30] scsi: aacraid: rx: Fix misspelling of _aac_rx_init()

2021-03-03 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/rx.c:544: warning: expecting prototype for aac_rx_init(). Prototype was for _aac_rx_init() instead Cc: Adaptec OEM Raid Solutions Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "PMC-

[PATCH 16/30] scsi: aacraid: commsup: Repair formatting issue in aac_handle_sa_aif()'s header

2021-03-03 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commsup.c:334: warning: expecting prototype for fib_deallocate(). Prototype was for fib_dealloc() instead drivers/scsi/aacraid/commsup.c:1961: warning: expecting prototype for aac_handle_sa_aif Handle a message from

[PATCH 09/30] scsi: aacraid: commctrl: Fix incorrect spelling of aac_send_raw_srb()

2021-03-03 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commctrl.c:480: warning: expecting prototype for aac_send_raw_scb(). Prototype was for aac_send_raw_srb() instead Cc: Adaptec OEM Raid Solutions Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen"

[PATCH 07/30] scsi: aacraid: aachba: Fix a few incorrectly named functions

2021-03-03 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/aachba.c:796: warning: expecting prototype for aac_probe_container(). Prototype was for aac_probe_container_callback1() instead drivers/scsi/aacraid/aachba.c:850: warning: expecting prototype for InqStrCopy(). Prototype was

[gustavoars-linux:testing/scsi/aacraid] BUILD SUCCESS b3519d554ac927b6d1dd3a65831b5e464a5a1347

2021-02-10 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/scsi/aacraid branch HEAD: b3519d554ac927b6d1dd3a65831b5e464a5a1347 scsi: aacraid: Replace one-element array with flexible-array member elapsed time: 1286m configs tested: 92 configs skipped: 2 The

[PATCH 5.10 051/717] scsi: aacraid: Improve compat_ioctl handlers

2020-12-28 Thread Greg Kroah-Hartman
...@kernel.org Fixes: 572ee53a9bad ("scsi: aacraid: check adapter health") Reviewed-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/commctrl.c | 22 ++-- drivers/scsi/aacraid/linit

[PATCH 120/141] scsi: aacraid: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/aacraid/commsup.c | 1

[PATCH] scsi: aacraid: Correct goto target in aac_resume()

2020-11-11 Thread Jing Xiangfeng
In current code, it jumps to call pci_disable_device() when pci_enable_device() failes to initialize device. Add a label 'fail_enable' to fix it. Fixes: de665f28f788 ("aacraid: Add Power Management support") Signed-off-by: Jing Xiangfeng --- drivers/scsi/aacraid/linit

Re: [PATCH v3 1/3] scsi: aacraid: improve compat_ioctl handlers

2020-11-10 Thread Martin K. Petersen
ter argument. > > Calling aac_ioctl() instead of aac_compat_do_ioctl() means the > compat and native code paths behave the same way again, which > they stopped when the adapter health check was added only > in the native function. Applied to 5.11/scsi-queue, thanks! [1/3] scsi: aa

Re: [PATCH v3 1/3] scsi: aacraid: improve compat_ioctl handlers

2020-11-04 Thread Martin K. Petersen
Arnd, > The use of compat_alloc_user_space() can be easily replaced by > handling compat arguments in the regular handler, and this will make > it work for big-endian kernels as well, which at the moment get an > invalid indirect pointer argument. Applied to 5.11/scsi-staging, thanks! -- Mart

[PATCH v4 04/29] scsi: aacraid: Drop pci_enable_wake() from .resume

2020-11-02 Thread Vaibhav Gupta
pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from aac_resume(). Signed-off-by: Vaibhav Gupta --- drivers/scsi/aacraid/linit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 8f3772480582..8c4dcb5ab329 100644 --- a

[PATCH v4 05/29] scsi: aacraid: use generic power management

2020-11-02 Thread Vaibhav Gupta
upta Acked-by: Balsundar P --- drivers/scsi/aacraid/linit.c | 33 +++-- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 8c4dcb5ab329..5177d387854a 100644 --- a/drivers/scsi/aacraid/linit.c +++

[PATCH v3 1/3] scsi: aacraid: improve compat_ioctl handlers

2020-10-30 Thread Arnd Bergmann
aac_compat_do_ioctl() means the compat and native code paths behave the same way again, which they stopped when the adapter health check was added only in the native function. Fixes: 572ee53a9bad ("scsi: aacraid: check adapter health") Reviewed-by: Christoph Hellwig Signed-off-by: Arn

[PATCH v3 04/28] scsi: aacraid: Drop pci_enable_wake() from .resume

2020-10-01 Thread Vaibhav Gupta
pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from aac_resume(). Signed-off-by: Vaibhav Gupta --- drivers/scsi/aacraid/linit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index a308e86a97f1..289887d5cc79 100644 --- a

[PATCH v3 05/28] scsi: aacraid: use generic power management

2020-10-01 Thread Vaibhav Gupta
--- drivers/scsi/aacraid/linit.c | 33 +++-- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 289887d5cc79..4740b7afa612 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/a

[PATCH 4.19 007/245] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-29 Thread Greg Kroah-Hartman
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 6e356325d8d98..54717fb84a54c 100644 --- a

[PATCH 4.19 104/245] scsi: aacraid: Disabling TM path and only processing IOP reset

2020-09-29 Thread Greg Kroah-Hartman
. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/commsup.c | 2 +- drivers/scsi/aacraid/linit.c | 34 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index b7588de4484e5

[PATCH 4.19 151/245] scsi: aacraid: Fix error handling paths in aac_probe_one()

2020-09-29 Thread Greg Kroah-Hartman
assignments to 'error'. These values are overwridden a few lines later. Link: https://lore.kernel.org/r/20200412094039.8822-1-christophe.jail...@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/lini

[PATCH 5.4 014/388] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-29 Thread Greg Kroah-Hartman
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 0ed3f806ace54..2388143d59f5d 100644 --- a

[PATCH 5.4 161/388] scsi: aacraid: Disabling TM path and only processing IOP reset

2020-09-29 Thread Greg Kroah-Hartman
. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/commsup.c | 2 +- drivers/scsi/aacraid/linit.c | 34 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 2142a649e865b

[PATCH 5.4 239/388] scsi: aacraid: Fix error handling paths in aac_probe_one()

2020-09-29 Thread Greg Kroah-Hartman
assignments to 'error'. These values are overwridden a few lines later. Link: https://lore.kernel.org/r/20200412094039.8822-1-christophe.jail...@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/lini

[PATCH 4.14 079/166] scsi: aacraid: Disabling TM path and only processing IOP reset

2020-09-29 Thread Greg Kroah-Hartman
. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/commsup.c | 2 +- drivers/scsi/aacraid/linit.c | 34 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index a284527999c55

[PATCH 4.14 019/166] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-29 Thread Greg Kroah-Hartman
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 7173ae53c5260..ba11313568810 100644 --- a

[PATCH 4.9 014/121] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-29 Thread Greg Kroah-Hartman
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 065f11a1964d4..39deea8601d68 100644 --- a

[PATCH 4.4 12/85] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-29 Thread Greg Kroah-Hartman
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index de33801ca31ea..0614d05a990a6 100644 --- a

[PATCH v2 1/3] scsi: aacraid: improve compat_ioctl handlers

2020-09-18 Thread Arnd Bergmann
compat and native code paths behave the same way again, which they stopped when the adapter health check was added only in the native function. Fixes: 572ee53a9bad ("scsi: aacraid: check adapter health") Reviewed-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- drivers/sc

[PATCH AUTOSEL 5.4 015/330] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-17 Thread Sasha Levin
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 0ed3f806ace54..2388143d59f5d 100644 --- a

[PATCH AUTOSEL 4.19 007/206] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-17 Thread Sasha Levin
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 6e356325d8d98..54717fb84a54c 100644 --- a

[PATCH AUTOSEL 4.19 103/206] scsi: aacraid: Disabling TM path and only processing IOP reset

2020-09-17 Thread Sasha Levin
. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/commsup.c | 2 +- drivers/scsi/aacraid/linit.c | 34 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index b7588de4484e5

[PATCH AUTOSEL 4.19 150/206] scsi: aacraid: Fix error handling paths in aac_probe_one()

2020-09-17 Thread Sasha Levin
assignments to 'error'. These values are overwridden a few lines later. Link: https://lore.kernel.org/r/20200412094039.8822-1-christophe.jail...@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/lini

[PATCH AUTOSEL 4.14 062/127] scsi: aacraid: Disabling TM path and only processing IOP reset

2020-09-17 Thread Sasha Levin
. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/commsup.c | 2 +- drivers/scsi/aacraid/linit.c | 34 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index a284527999c55

[PATCH AUTOSEL 4.9 01/90] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-17 Thread Sasha Levin
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 065f11a1964d4..39deea8601d68 100644 --- a

[PATCH AUTOSEL 4.4 01/64] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-17 Thread Sasha Levin
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index de33801ca31ea..0614d05a990a6 100644 --- a

[PATCH AUTOSEL 4.14 002/127] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-17 Thread Sasha Levin
: Balsundar P Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aachba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 7173ae53c5260..ba11313568810 100644 --- a

[PATCH AUTOSEL 5.4 245/330] scsi: aacraid: Fix error handling paths in aac_probe_one()

2020-09-17 Thread Sasha Levin
assignments to 'error'. These values are overwridden a few lines later. Link: https://lore.kernel.org/r/20200412094039.8822-1-christophe.jail...@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/lini

[PATCH AUTOSEL 5.4 167/330] scsi: aacraid: Disabling TM path and only processing IOP reset

2020-09-17 Thread Sasha Levin
. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/commsup.c | 2 +- drivers/scsi/aacraid/linit.c | 34 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 2142a649e865b

Re: [PATCH 1/3] scsi: aacraid: improve compat_ioctl handlers

2020-09-17 Thread Arnd Bergmann
On Sat, Sep 12, 2020 at 9:09 AM Christoph Hellwig wrote: > > On Tue, Sep 08, 2020 at 11:36:21PM +0200, Arnd Bergmann wrote: > > @@ -243,8 +244,23 @@ static int next_getadapter_fib(struct aac_dev * dev, > > void __user *arg) > > struct list_head * entry; > > unsigned long flags; > > >

Re: [PATCH 1/3] scsi: aacraid: improve compat_ioctl handlers

2020-09-12 Thread Christoph Hellwig
On Tue, Sep 08, 2020 at 11:36:21PM +0200, Arnd Bergmann wrote: > @@ -243,8 +244,23 @@ static int next_getadapter_fib(struct aac_dev * dev, > void __user *arg) > struct list_head * entry; > unsigned long flags; > > - if(copy_from_user((void *)&f, arg, sizeof(struct fib_ioctl))) >

[PATCH 1/3] scsi: aacraid: improve compat_ioctl handlers

2020-09-08 Thread Arnd Bergmann
compat and native code paths behave the same way again, which they stopped when the adapter health check was added only in the native function. Fixes: 572ee53a9bad ("scsi: aacraid: check adapter health") Signed-off-by: Arnd Bergmann --- drivers/scsi/aacraid/commctrl.c | 20 +-

Re: [PATCH v2 02/15] scsi: aacraid: use generic power management

2020-09-08 Thread Vaibhav Gupta
pile-tested only. > > Signed-off-by: Vaibhav Gupta > --- > drivers/scsi/aacraid/linit.c | 34 -- > 1 file changed, 8 insertions(+), 26 deletions(-) > > diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c > index a30

[PATCH 1/7] scsi: aacraid: Remove pci-dma-compat wrapper APIs

2020-07-29 Thread Suraj Upadhyay
t;dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Signed-off-by: Suraj Upadhyay --- drivers/scsi/aacraid/aachba.c | 4 ++-- driver

RE: [PATCH v2 02/15] scsi: aacraid: use generic power management

2020-07-22 Thread Balsundar.P
l-ment...@lists.linuxfoundation.org; linux-s...@vger.kernel.org; esc.storage...@microsemi.com; megaraidlinux@broadcom.com; mpt-fusionlinux@broadcom.com Subject: [PATCH v2 02/15] scsi: aacraid: use generic power management EXTERNAL EMAIL: Do not click links or open attachments unless you kn

[PATCH 03/40] scsi: aacraid: sa: Add descriptions for missing parameters

2020-07-21 Thread Lee Jones
Also clean-up some white space issues while we're here. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p2' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:147: warning: Function par

[PATCH 04/40] scsi: aacraid: rkt: Add missing description for 'dev'

2020-07-21 Thread Lee Jones
And clean-up a couple of whitespace issues while we're here. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/rkt.c:64: warning: Function parameter or member 'dev' not described in 'aac_rkt_ioremap' Cc: Adaptec OEM Raid Solutions Cc: "PMC-Si

[PATCH 07/40] scsi: aacraid: src: Add descriptions for missing parameters

2020-07-21 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p2' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p3' not described in 'src_sy

[PATCH 05/40] scsi: aacraid: nark: Add missing description for 'dev'

2020-07-21 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/nark.c:31: warning: Function parameter or member 'dev' not described in 'aac_nark_ioremap' Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones --- drivers/scs

[PATCH v2 02/15] scsi: aacraid: use generic power management

2020-07-20 Thread Vaibhav Gupta
sing PCI helper functions like pci_save/restore_state(), pci_disable/enable_device(), pci_set_power_state() and pci_enable_wake(). They should not be invoked by the driver. Compile-tested only. Signed-off-by: Vaibhav Gupta --- drivers/scsi/aacraid/linit.c | 34 --

[PATCH] scsi: aacraid: Remove pci-dma-compat wrapper APIs.

2020-07-18 Thread Suraj Upadhyay
_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Signed-off-by: Suraj Upadhyay --- drivers/scsi/aacraid/aachba.c | 4 ++-- drivers/s

[PATCH v1 02/15] scsi: aacraid: use generic power management

2020-07-16 Thread Vaibhav Gupta
sing PCI helper functions like pci_save/restore_state(), pci_disable/enable_device(), pci_set_power_state() and pci_enable_wake(). They should not be invoked by the driver. Compile-tested only. Signed-off-by: Vaibhav Gupta --- drivers/scsi/aacraid/linit.c | 34 --

[PATCH v2 02/24] scsi: aacraid: commctrl: Fix a few kerneldoc issues

2020-07-13 Thread Lee Jones
Functions must follow imediately after the header documenting them and all parameters must be present. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commctrl.c:43: warning: Excess function parameter 'dev' description in 'AAC_DEBUG_PREAMBLE'

[PATCH v2 03/24] scsi: aacraid: dpcsup: Fix logical bug when !DBG

2020-07-13 Thread Lee Jones
When DBG is not enabled FIB_COUNTER_INCREMENT() results in an empty statement, leaving the contents of if() and else() empty. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c: In function ‘aac_response_normal’: drivers/scsi/aacraid/dpcsup.c:105:50: warning

[PATCH v2 04/24] scsi: aacraid: dpcsup: Remove unused variable 'status'

2020-07-13 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c: In function ‘aac_aif_callback’: drivers/scsi/aacraid/dpcsup.c:232:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 232 | int status; | ^~ Cc: Adaptec OEM Raid Solutions Cc: &quo

[PATCH v2 09/24] scsi: aacraid: rx: Fill in the very parameter descriptions for rx_sync_cmd()

2020-07-13 Thread Lee Jones
... and document aac_rx_ioremap() 'dev' param. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p2' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or

[PATCH v2 05/24] scsi: aacraid: dpcsup: Demote partially documented function header

2020-07-13 Thread Lee Jones
This should be populated by someone who knows the meaning of all the params. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c:272: warning: Function parameter or member 'isAif' not described in 'aac_intr_normal' drivers/scsi/aacraid/d

[PATCH v2 07/24] scsi: aacraid: commsup: Fix a bunch of function header issues

2020-07-13 Thread Lee Jones
Some parameters not documented. Others misspelled. Also, functions must follow directly after the header that documents them. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commsup.c:223: warning: Function parameter or member 'scmd' not described in 'aa

[PATCH v2 01/24] scsi: aacraid: aachba: Repair two kerneldoc headers

2020-07-13 Thread Lee Jones
The function headers for aac_get_config_status() and aac_get_containers() have suffered bitrot where the documentation hasn't kept up with the API. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'dev' n

[PATCH v2 23/29] scsi: aacraid: linit: Provide suggested curly braces around empty body of if()

2020-07-13 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’: drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 368 | param->heads, param->sectors, num)); | ^ Cc: Adaptec OE

[PATCH v2 24/29] scsi: aacraid: linit: Fix a couple of small kerneldoc issues

2020-07-13 Thread Lee Jones
Most likely caused by bitrot (docs not keeping in sync with API). Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’: drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body

[PATCH v2 28/29] scsi: aacraid: aachba: Fix a bunch of function doc formatting errors

2020-07-13 Thread Lee Jones
And a few missing/excessive parameter descriptions. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'dev' not described in 'aac_get_config_status' drivers/scsi/aacraid/aachba.c:358: warning: Function

[PATCH 09/24] scsi: aacraid: rx: Fill in the very parameter descriptions for rx_sync_cmd()

2020-07-09 Thread Lee Jones
... and document aac_rx_ioremap() 'dev' param. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p2' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or

[PATCH 03/24] scsi: aacraid: dpcsup: Fix logical bug when !DBG

2020-07-09 Thread Lee Jones
When DBG is not enabled FIB_COUNTER_INCREMENT() results in an empty statement, leaving the contents of if() and else() empty. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c: In function ‘aac_response_normal’: drivers/scsi/aacraid/dpcsup.c:105:50: warning

[PATCH 07/24] scsi: aacraid: commsup: Fix a bunch of function header issues

2020-07-09 Thread Lee Jones
Some parameters not documented. Others misspelled. Also, functions must follow directly after the header that documents them. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commsup.c:223: warning: Function parameter or member 'scmd' not described in 'aa

[PATCH 04/24] scsi: aacraid: dpcsup: Remove unused variable 'status'

2020-07-09 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c: In function ‘aac_aif_callback’: drivers/scsi/aacraid/dpcsup.c:232:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 232 | int status; | ^~ Cc: Adaptec OEM Raid Solutions Cc: &quo

[PATCH 02/24] scsi: aacraid: commctrl: Fix a few kerneldoc issues

2020-07-09 Thread Lee Jones
Functions must follow imediately after the header documenting them and all parameters must be present. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commctrl.c:43: warning: Excess function parameter 'dev' description in 'AAC_DEBUG_PREAMBLE'

[PATCH 01/24] scsi: aacraid: aachba: Repair two kerneldoc headers

2020-07-09 Thread Lee Jones
The function headers for aac_get_config_status() and aac_get_containers() have suffered bitrot where the documentation hasn't kept up with the API. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'dev' n

[PATCH 05/24] scsi: aacraid: dpcsup: Demote partially documented function header

2020-07-09 Thread Lee Jones
This should be populated by someone who knows the meaning of all the params. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c:272: warning: Function parameter or member 'isAif' not described in 'aac_intr_normal' drivers/scsi/aacraid/d

[PATCH 24/30] scsi: aacraid: linit: Provide suggested curly braces around empty body of if()

2020-07-08 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’: drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 368 | param->heads, param->sectors, num)); | ^ Cc: Adaptec OE

[PATCH 29/30] scsi: aacraid: aachba: Fix a bunch of function doc formatting errors

2020-07-08 Thread Lee Jones
And a few missing/excessive parameter descriptions. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'dev' not described in 'aac_get_config_status' drivers/scsi/aacraid/aachba.c:358: warning: Function

[PATCH 25/30] scsi: aacraid: linit: Fix a couple of small kerneldoc issues

2020-07-08 Thread Lee Jones
Most likely caused by bitrot (docs not keeping in sync with API). Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’: drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body

Re: [PATCH -next v2] scsi: aacraid: Use memdup_user() as a cleanup

2020-05-11 Thread Martin K. Petersen
On Sun, 26 Apr 2020 10:42:44 +0800, Zou Wei wrote: > Fix coccicheck warning which recommends to use memdup_user(). > > This patch fixes the following coccicheck warning: > > drivers/scsi/aacraid/commctrl.c:516:15-22: WARNING opportunity for memdup_user Applied to 5.8/scsi-queue

Re: [PATCH -next] scsi: aacraid: Make some symbols static

2020-05-07 Thread Martin K. Petersen
On Thu, 30 Apr 2020 18:02:12 +0800, Zou Wei wrote: > Fix the following sparse warnings: > > drivers/scsi/aacraid/linit.c:867:6: warning: > symbol 'aac_tmf_callback' was not declared. Should it be static? > drivers/scsi/aacraid/linit.c:1081:5: warning: > symbol

[PATCH -next] scsi: aacraid: Make some symbols static

2020-04-30 Thread Zou Wei
Fix the following sparse warnings: drivers/scsi/aacraid/linit.c:867:6: warning: symbol 'aac_tmf_callback' was not declared. Should it be static? drivers/scsi/aacraid/linit.c:1081:5: warning: symbol 'aac_eh_host_reset' was not declared. Should it be static? drivers/scsi/aacr

Re: [PATCH v3 0/1] aacraid: Host adapter Adaptec 6405 constantly resets under high io load

2019-08-29 Thread Martin K. Petersen
> Problem description: > > A node with Adaptec 6405 controller, latest BIOS V5.3-0[19204] A lot > of disks attached to the controller. Simple test: running mkfs.ext4 > on many disks on the same controller in parallel (mkfs is not > important here, any serious io load trigger

[PATCH v3 0/1] aacraid: Host adapter Adaptec 6405 constantly resets under high io load

2019-08-19 Thread Konstantin Khorenko
aborts) Results: * no problems (controller resets) with kernels prior to 395e5df79a95 ("scsi: aacraid: Remove reference to Series-9") * latest ms kernel v5.2-rc6-15-g249155c20f9b - mkfs processes are in D state, lot of complains in logs like: [ 654.894633] aacraid: Host ada

[PATCH v3 1/1] scsi: aacraid: resurrect correct arc ctrl checks for Series-6

2019-08-19 Thread Konstantin Khorenko
The patch introduces another wrapper similar to aac_is_src() which avoids checking for Series 6 devices. Use this new wrapper in order to revert original arc ctrl checks for Series-6 controllers which were occasionally changed by commit 395e5df79a95 ("scsi: aacraid: Remove reference to Ser

Re: [PATCH v2 2/2] scsi: aacraid: Remove references to Series-9 (only)

2019-07-11 Thread Martin K. Petersen
Hi Konstantin, > The patch removes references to Series 9 adapters following > 395e5df79a95 ("scsi: aacraid: Remove reference to Series-9"), > but doesn't touch Series 6 adapters logic. We'll need some guidance from the Microsemi folks on this issue. > https://

[PATCH v2 0/2] aacraid: Host adapter Adaptec 6405 constantly resets under high io load

2019-07-10 Thread Konstantin Khorenko
aborts) Results: * no problems (controller resets) with kernels prior to 395e5df79a95 ("scsi: aacraid: Remove reference to Series-9") * latest ms kernel v5.2-rc6-15-g249155c20f9b - mkfs processes are in D state, lot of complains in logs like: [ 654.894633] aacraid: Host ada

[PATCH v2 2/2] scsi: aacraid: Remove references to Series-9 (only)

2019-07-10 Thread Konstantin Khorenko
The patch removes references to Series 9 adapters following 395e5df79a95 ("scsi: aacraid: Remove reference to Series-9"), but doesn't touch Series 6 adapters logic. Leaving Series 6 adapters untouched avoids controller hungs/resets under high io load. https://bugs.launchpad.net

[PATCH v2 1/2] Revert "scsi: aacraid: Remove reference to Series-9"

2019-07-10 Thread Konstantin Khorenko
removed by next patch. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1777586 https://bugzilla.redhat.com/show_bug.cgi?id=1724077 https://jira.sw.ru/browse/PSBM-95736 Signed-off-by: Konstantin Khorenko --- drivers/scsi/aacraid/aacraid.h | 12 +--- drivers/scsi/aacraid/comminit.c | 18

Re: [PATCH 1/1] scsi: aacraid: resurrect correct arc ctrl checks for Series-6

2019-07-10 Thread Konstantin Khorenko
On 07/08/2019 02:49 AM, Finn Thain wrote: > Andrey, > > It is helpful to send your review to the patch author. I've added > Konstantin to the Cc list, as well as Raghava (who introduced the > regression addressed by Konstantin's patch). > > If I'm not mistaken, your review misunderstands the patch

Re: [PATCH 1/1] scsi: aacraid: resurrect correct arc ctrl checks for Series-6

2019-07-07 Thread Finn Thain
7;s patch might have been easier to follow if it was a simple 'git revert'. -- On Sun, 7 Jul 2019, Andrey Jr. Melnikov wrote: > In gmane.linux.scsi Konstantin Khorenko wrote: > > This partially reverts ms commit > > 395e5df79a95 ("scsi: aacraid: Remove reference t

Re: [PATCH 1/1] scsi: aacraid: resurrect correct arc ctrl checks for Series-6

2019-07-07 Thread Andrey Jr. Melnikov
In gmane.linux.scsi Konstantin Khorenko wrote: > This partially reverts ms commit > 395e5df79a95 ("scsi: aacraid: Remove reference to Series-9") > The patch above not only drops Series-9 cards checks but also > changes logic for Series-6 controllers which leads to controlle

[PATCH 70/87] scsi: aacraid: remove memset after dma_alloc_coherent in rx.c

2019-06-27 Thread Fuqian Huang
In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/scsi/aacraid/rx.c | 1 - 1 file changed, 1 delet

[PATCH 0/1] aacraid: Host adapter Adaptec 6405 constantly resets under high io load

2019-06-27 Thread Konstantin Khorenko
aborts) Results: * no problems (controller resets) with kernels prior to 395e5df79a95 ("scsi: aacraid: Remove reference to Series-9") * latest ms kernel v5.2-rc6-15-g249155c20f9b - mkfs processes are in D state, lot of complains in logs like: [ 654.894633] aacraid: Host ada

[PATCH 1/1] scsi: aacraid: resurrect correct arc ctrl checks for Series-6

2019-06-27 Thread Konstantin Khorenko
This partially reverts ms commit 395e5df79a95 ("scsi: aacraid: Remove reference to Series-9") The patch above not only drops Series-9 cards checks but also changes logic for Series-6 controllers which leads to controller hangs/resets under high io load. So revert to original arc ctrl

[PATCH 5.0 067/101] scsi: aacraid: Insure we dont access PCIe space during AER/EEH

2019-05-02 Thread Greg Kroah-Hartman
: Martin K. Petersen Signed-off-by: Sasha Levin (Microsoft) --- drivers/scsi/aacraid/aacraid.h | 7 ++- drivers/scsi/aacraid/commsup.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 3291d1c16864

[PATCH 4.19 55/72] scsi: aacraid: Insure we dont access PCIe space during AER/EEH

2019-05-02 Thread Greg Kroah-Hartman
: Martin K. Petersen Signed-off-by: Sasha Levin (Microsoft) --- drivers/scsi/aacraid/aacraid.h | 7 ++- drivers/scsi/aacraid/commsup.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 39eb415987fc

[PATCH AUTOSEL 5.0 63/98] scsi: aacraid: Insure we don't access PCIe space during AER/EEH

2019-04-22 Thread Sasha Levin
Biradar Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin (Microsoft) --- drivers/scsi/aacraid/aacraid.h | 7 ++- drivers/scsi/aacraid/commsup.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h

  1   2   3   4   5   >