RE: [PATCH 0/6] pm80xx updates

2017-08-25 Thread Viswas G
Thanks Martin, My system date was wrong. I will correct the date when I send V1 for this patch set. Regards, Viswas G -Original Message- From: Martin K. Petersen [mailto:martin.peter...@oracle.com] Sent: Saturday, August 26, 2017 3:18 AM To: Viswas G Cc:

Re: [PATCH v3 2/2] scsi: lpfc: avoid false-positive gcc-8 warning

2017-08-25 Thread Martin K. Petersen
Arnd, > This is an interesting regression with gcc-8, showing a harmless > warning for correct code: Applied to 4.14/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

[PATCH 3/3] cxlflash: Fix vlun resize failure in the shrink path

2017-08-25 Thread Uma Krishnan
The ioctl DK_CAPI_VLUN_RESIZE can fail if the allocated vlun size is reduced from almost maximum capacity and then increased again. The shrink_lxt() routine is currently using the SISL_ASTATUS_MASK to mask the higher 48 bits of the lxt entry. This is unnecessary and incorrect as it uses a mask

[PATCH 0/3] cxlflash: Miscellaneous fixes

2017-08-25 Thread Uma Krishnan
This patch series contains miscellaneous fixes. The first two address issues that were identified by smatch and the last patch fixes a regression introduced by Commit 565180723294 ("scsi: cxlflash: SISlite updates to support 4 ports"). This series is intended for 4.14 and is bisectable. Matthew

[Bug 196707] Adaptec ICP9087MA: aacraid prints "AAC: Host adapter is dead (or got a PCI error) -1" twice times around errors of aacraid and the kernel crashes after starting the "Kernel Device Manager

2017-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=196707 Andreas Gerlich (kernel@yaze-ag.de) changed: What|Removed |Added Kernel Version|4.12.8 |4.12.9 -- You

Re: [PATCH] scsi: Fix the kerneldoc for scsi_initialize_rq()

2017-08-25 Thread Martin K. Petersen
Jonathan, > The kerneldoc comment for scsi_initialize_rq() neglected to document > the "rq" parameter, leading to this docs build warning: Applied to 4.14/scsi-queue. Tweaked the wording based on Bart's comments. Thank you! -- Martin K. Petersen Oracle Linux Engineering

[Bug 196707] Adaptec ICP9087MA: aacraid prints "AAC: Host adapter is dead (or got a PCI error) -1" twice times around errors of aacraid and the kernel crashes after starting the "Kernel Device Manager

2017-08-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=196707 --- Comment #3 from Andreas Gerlich (kernel@yaze-ag.de) --- Created attachment 258111 --> https://bugzilla.kernel.org/attachment.cgi?id=258111=edit Kernel_crash_(4.12.9)_with_4_drives_at_the_ICP9087MA Hi, I tried the actual stable Kernel

Re: [PATCH 13/15] scsi: make device_type const

2017-08-25 Thread Martin K. Petersen
Bhumika, > Make these const as they are only stored in the type field of a device > structure, which is const. Applied to 4.14/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: sd: remove duplicated setting of gd->minors

2017-08-25 Thread Martin K. Petersen
weiping, > gd->minors has been set when call alloc_disk() in sd_probe. Applied to 4.14/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCHv2 00/26] SCSI EH argument reshuffle part I

2017-08-25 Thread Martin K. Petersen
Hannes, > Hi all, finally here's the patchset to revamp the SCSI EH callback > arguments which I promised to do (some years ago ...). Applied to 4.14/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2 00/17] A series of small SCSI patches for kernel v4.14

2017-08-25 Thread Martin K. Petersen
Bart, > The patches in this series fall into three categories: > - One patch renames a few functions to make it clear whether these > are used by the legacy SCSI code path or by the new scsi-mq code. > - Two patches are related to using blk_mq_rq_to_pdu() instead of > struct request.special.

[PATCH v2 12/17] libsas: Remove a set-but-not-used variable

2017-08-25 Thread Bart Van Assche
This was detected by building with W=1. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn --- drivers/scsi/libsas/sas_scsi_host.c | 3 --- 1 file changed, 3

[PATCH v2 14/17] scsi_transport_sas, sas_tlr_supported(): Check kzalloc() return value

2017-08-25 Thread Bart Van Assche
Check whether memory allocation succeeded before dereferencing the pointer to the allocated memory. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn ---

[PATCH v2 16/17] scsi_debug: Remove a set-but-not-used variable

2017-08-25 Thread Bart Van Assche
This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/scsi_debug.c:2264:15: warning: variable ?pcontrol? set but not used [-Wunused-but-set-variable] Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig

[PATCH v2 10/17] sg: Fix type of last blk_trace_setup() argument

2017-08-25 Thread Bart Van Assche
Avoid that sparse reports the following: drivers/scsi/sg.c:1114:41: warning: incorrect type in argument 5 (different address spaces) drivers/scsi/sg.c:1114:41:expected char [noderef] *arg drivers/scsi/sg.c:1114:41:got char * This patch does not change any functionality. Signed-off-by:

[PATCH v2 09/17] sd: Remove a useless comparison

2017-08-25 Thread Bart Van Assche
This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/sd.c:315:10: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if (val >= 0 && val <= T10_PI_TYPE3_PROTECTION) Signed-off-by: Bart Van Assche

[PATCH v2 17/17] iscsi_tcp: Remove a set-but-not-used variable

2017-08-25 Thread Bart Van Assche
This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/iscsi_tcp.c:166:24: warning: variable ?session? set but not used [-Wunused-but-set-variable] Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig

[PATCH v2 15/17] scsi_transport_srp: Suppress a W=1 compiler warning

2017-08-25 Thread Bart Van Assche
Avoid that the following compiler warning is reported when building with W=1: drivers/scsi/scsi_transport_srp.c:92:19: warning: comparison is always false due to limited range of data type [-Wtype-limits] Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig

[PATCH v2 07/17] sd, sr: Convert two assignments into warning statements

2017-08-25 Thread Bart Van Assche
Before scsi_prep_fn() calls the ULP .init_command() callback function it stores the SCSI command pointer in request.special. This means that the SCpnt = rq->special assignments in the sd and sr drivers assign a pointer to itself. Hence convert these two assignment statements into warning

[PATCH v2 04/17] Convert a strncmp() call into a strcmp() call

2017-08-25 Thread Bart Van Assche
This patch avoids that smatch reports the following warning: drivers/scsi/scsi_sysfs.c:117: check_set() error: strncmp() '"-"' too small (2 vs 20) Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc:

[PATCH v2 05/17] Document which queue type a function is intended for

2017-08-25 Thread Bart Van Assche
Rename several functions to make it easy to see which queue type a function is intended for. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn --- drivers/scsi/scsi_lib.c

[PATCH v2 11/17] libiscsi: Fix indentation

2017-08-25 Thread Bart Van Assche
This patch avoids that smatch reports the following: drivers/scsi/libiscsi.c:1081: iscsi_handle_reject() warn: inconsistent indenting Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes

[PATCH v2 06/17] Use blk_mq_rq_to_pdu() to convert a request to a SCSI command pointer

2017-08-25 Thread Bart Van Assche
Since commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") struct request and struct scsi_cmnd are adjacent. This means that there is now an alternative to reading req->special to convert a pointer to a prepared request into a SCSI command pointer, namely by using

[PATCH v2 02/17] Avoid sign extension of scsi_device.type

2017-08-25 Thread Bart Van Assche
This patch avoids that smatch reports the following: drivers/scsi/scsi_sysfs.c:506 scsi_bus_uevent() warn: argument 3 to %02x specifier has type 'char' drivers/scsi/scsi_sysfs.c:872 sdev_show_modalias() warn: argument 4 to %02x specifier has type 'char' Signed-off-by: Bart Van Assche

[PATCH v2 03/17] Suppress gcc 7 fall-through warnings reported with W=1

2017-08-25 Thread Bart Van Assche
The conclusion of a recent discussion about the new warnings reported by gcc 7 is that the new warnings reported when building with W=1 should be suppressed. However, gcc 7 still warns about fall-through in switch statements when building with W=1. Suppress these warnings by annotating the SCSI

[PATCH v2 08/17] sd: Fix indentation

2017-08-25 Thread Bart Van Assche
This patch avoids that smatch reports the following: drivers/scsi/sd.c:3540: sd_suspend_common() warn: inconsistent indenting Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Johannes Thumshirn

[PATCH v2 01/17] Remove an obsolete function declaration

2017-08-25 Thread Bart Van Assche
Commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") removed the scsi_get_command() function. Hence also remove the declaration of that function. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes

[PATCH v2 00/17] A series of small SCSI patches for kernel v4.14

2017-08-25 Thread Bart Van Assche
Hello Martin, The patches in this series fall into three categories: - One patch renames a few functions to make it clear whether these are used by the legacy SCSI code path or by the new scsi-mq code. - Two patches are related to using blk_mq_rq_to_pdu() instead of struct request.special. -

[PATCH 1/2] Introduce scsi_get_vpd_buf()

2017-08-25 Thread Bart Van Assche
This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Shane M Seymour --- drivers/scsi/scsi.c | 96

[PATCH 2/2] Rework handling of scsi_device.vpd_pg8[03]

2017-08-25 Thread Bart Van Assche
Introduce struct scsi_vpd for the VPD page length, data and the RCU head that will be used to free the VPD data. Use kfree_rcu() instead of kfree() to free VPD data. Only annotate pointers that are shared across threads with __rcu. Use rcu_dereference() when dereferencing an RCU pointer. This

[PATCH 3/3] SCSI-sg: Fix a typo in a comment line in sg_ioctl()

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 22:06:59 +0200 Fix a word in this description. Signed-off-by: Markus Elfring --- drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sg.c

[PATCH 2/3] SCSI-sg: Improve a size determination in sg_alloc()

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 21:55:14 +0200 Replace the specification of a data type by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

[PATCH 1/3] SCSI-sg: Delete an error message for a failed memory allocation in sg_alloc()

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 21:48:11 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 0/3] SCSI-sg: Adjustments for two function implementations

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 22:20:02 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Delete an error message for a failed memory allocation in sg_alloc() Improve a size determination

Re: [PATCH 07/19] Fix RCU handling of scsi_device.vpd_pg8[03]

2017-08-25 Thread Bart Van Assche
On Fri, 2017-08-25 at 05:58 +, Seymour, Shane M wrote: > > From: Bart Van Assche [mailto:bart.vanass...@wdc.com] > > [ ... ] > > My understanding of the SCSI VPD code is as follows: > > * rcu_read_lock() / rcu_read_unlock() is used to prevent that another thread > > updates a VPD buffer

[PATCH] SCSI-sd: Delete an error message for a failed memory allocation in sd_revalidate_disk()

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 21:34:44 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH] SCSI-scan: Delete an error message for a failed memory allocation in two functions

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 21:17:02 +0200 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH] SCSI-devinfo: Delete an error message for a failed memory allocation in scsi_dev_info_list_add_keyed()

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 20:54:16 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 6/6] pm80xx : corrected linkrate value.

2017-08-25 Thread Viswas G
Corrected the value defined for LINKRATE_60 (6 Gig). Signed-off-by: Raj Dinesh Signed-off-by: Viswas G --- drivers/scsi/pm8001/pm80xx_hwi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h

[PATCH 2/6] pm80xx: ILA and inactive firmware version through sysfs

2017-08-25 Thread Viswas G
Added support to read ILA version and inactive firmware version from MPI configuration table and export through sysfs. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G --- drivers/scsi/pm8001/pm8001_ctl.c | 55

[PATCH 5/6] pm80xx : panic on ncq error cleaning up the read log

2017-08-25 Thread Viswas G
when there's an error in 'ncq mode' the host has to read the ncq error log (10h) to clear the error state. however, the ccb that is setup for doing this doesn't setup the ccb so that the previous state is cleared. if the ccb was previously used for an IO n_elems is set and pm8001_ccb_task_free()

[PATCH 3/6] pm80xx : Different SAS addresses for phys.

2017-08-25 Thread Viswas G
Different SAS addresses are assigned for each set of phys. Signed-off-by: Viswas G --- drivers/scsi/pm8001/pm8001_init.c | 13 + drivers/scsi/pm8001/pm80xx_hwi.c | 3 +-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git

[PATCH 4/6] pm80xx : Corrected SATA abort handling.

2017-08-25 Thread Viswas G
Modified SATA abort handling with following steps: 1) Set device state as recovery. 2) Send phy reset. 3) Wait for reset completion. 4) After successful reset, abort all IO's to the device. 5) After aborting all IO's to device, set device state as operational. Signed-off-by: Deepak Ukey

[PATCH 0/6] pm80xx updates

2017-08-25 Thread Viswas G
This patch set include some big fixes and enhancement for pm80xx driver. Viswas G (6): pm80xx : redefine sas_identify_frame structure pm80xx: ILA and inactive firmware version through sysfs pm80xx : Different SAS addresses for phys. pm80xx : Corrected SATA abort handling. pm80xx :

[PATCH 1/6] pm80xx : redefine sas_identify_frame structure

2017-08-25 Thread Viswas G
sas_identify structure defined by pm80xx doesn't have CRC field. So added a new sas_identify structure without CRC. Signed-off-by: Raj Dinesh Signed-off-by: Viswas G --- drivers/scsi/pm8001/pm8001_hwi.h | 2 +- drivers/scsi/pm8001/pm8001_sas.h

Re: [PATCH 07/19] Fix RCU handling of scsi_device.vpd_pg8[03]

2017-08-25 Thread Bart Van Assche
On Fri, 2017-08-25 at 17:49 +0200, Hannes Reinecke wrote: > On 08/23/2017 11:39 PM, Bart Van Assche wrote: > > diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c > > index 3d38c6d463b8..5bb15e698969 100644 > > --- a/drivers/scsi/scsi.c > > +++ b/drivers/scsi/scsi.c > > @@ -426,7 +426,7 @@ void

Re: [PATCH] scsi_transport_sas: Fix error handling in sas_smp_request()

2017-08-25 Thread h...@lst.de
On Fri, Aug 25, 2017 at 03:38:48PM +, Bart Van Assche wrote: > On Fri, 2017-08-25 at 17:35 +0200, Christoph Hellwig wrote: > > I looked a bit more at the history of this, and it seems like the only > > issue with commit 17d5363b83f8 here is using the blk_status_t type for the > > ret variable.

Re: [PATCH 17/19] scsi_transport_srp: Suppress a W=1 compiler warning

2017-08-25 Thread h...@lst.de
This looks good to me: Reviewed-by: Christoph Hellwig

Re: [PATCH 18/19] scsi_debug: Remove a set-but-not-used variable

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:40 PM, Bart Van Assche wrote: > This patch avoids that gcc reports the following warning when > building with W=1: > > drivers/scsi/scsi_debug.c:2264:15: warning: variable ?pcontrol? set but not > used [-Wunused-but-set-variable] > > Signed-off-by: Bart Van Assche

Re: [PATCH 19/19] iscsi_tcp: Remove a set-but-not-used variable

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:40 PM, Bart Van Assche wrote: > This patch avoids that gcc reports the following warning when > building with W=1: > > drivers/scsi/iscsi_tcp.c:166:24: warning: variable ?session? set but not used > [-Wunused-but-set-variable] > > Signed-off-by: Bart Van Assche

Re: [PATCH 16/19] scsi_transport_sas, sas_tlr_supported(): Check kzalloc() return value

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:40 PM, Bart Van Assche wrote: > Check whether memory allocation succeeded before dereferencing > the pointer to the allocated memory. > > Signed-off-by: Bart Van Assche > Cc: Hannes Reinecke > Cc: Christoph Hellwig > Cc:

Re: [PATCH 15/19] libsas: Annotate fall-through in a switch statement

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:40 PM, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche > Cc: Hannes Reinecke > Cc: Christoph Hellwig > Cc: Johannes Thumshirn > --- > drivers/scsi/libsas/sas_ata.c | 1 + > 1 file changed, 1

Re: [PATCH 14/19] libsas: Remove a set-but-not-used variable

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:40 PM, Bart Van Assche wrote: > This was detected by building with W=1. > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig > Cc: Hannes Reinecke > Cc: Johannes Thumshirn > --- >

Re: [PATCH 13/19] libiscsi: Fix indentation

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:40 PM, Bart Van Assche wrote: > This patch avoids that smatch reports the following: > > drivers/scsi/libiscsi.c:1081: iscsi_handle_reject() warn: inconsistent > indenting > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig > Cc:

Re: [PATCH 12/19] sg: Fix type of last blk_trace_setup() argument

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:40 PM, Bart Van Assche wrote: > Avoid that sparse reports the following: > > drivers/scsi/sg.c:1114:41: warning: incorrect type in argument 5 (different > address spaces) > drivers/scsi/sg.c:1114:41:expected char [noderef] *arg > drivers/scsi/sg.c:1114:41:got char * > >

Re: [PATCH 11/19] sd: Remove a useless comparison

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:40 PM, Bart Van Assche wrote: > This patch avoids that gcc reports the following warning when > building with W=1: > > drivers/scsi/sd.c:315:10: warning: comparison of unsigned expression >= 0 is > always true [-Wtype-limits] > if (val >= 0 && val <= T10_PI_TYPE3_PROTECTION) >

Re: [PATCH 10/19] sd: Fix indentation

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:40 PM, Bart Van Assche wrote: > This patch avoids that smatch reports the following: > > drivers/scsi/sd.c:3540: sd_suspend_common() warn: inconsistent indenting > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig > Cc: Hannes

Re: [PATCH 07/19] Fix RCU handling of scsi_device.vpd_pg8[03]

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:39 PM, Bart Van Assche wrote: > Only annotate pointers that are shared across threads with __rcu. > Use rcu_dereference() when dereferencing an RCU pointer. Protect > also the RCU pointer dereferences when freeing RCU pointers. This > patch suppresses about twenty sparse

Re: [PATCH 06/19] Document which queue type a function is intended for

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:39 PM, Bart Van Assche wrote: > Document which queue type a function is intended for if this is not > easy to derive from the function name. > > Signed-off-by: Bart Van Assche > Cc: Hannes Reinecke > Cc: Christoph Hellwig

Re: [PATCH 04/19] Convert a strncmp() call into a strcmp() call

2017-08-25 Thread Hannes Reinecke
On 08/23/2017 11:39 PM, Bart Van Assche wrote: > This patch avoids that smatch reports the following warning: > > drivers/scsi/scsi_sysfs.c:117: check_set() error: strncmp() '"-"' too small > (2 vs 20) > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig

Re: [PATCH 17/19] scsi_transport_srp: Suppress a W=1 compiler warning

2017-08-25 Thread Bart Van Assche
On Fri, 2017-08-25 at 17:29 +0200, h...@lst.de wrote: > On Thu, Aug 24, 2017 at 04:27:07PM +, Bart Van Assche wrote: > > > > The purpose of that check is to avoid that dev_loss_tmo * HZ can overflow. > > That check is only needed on 32-bit systems since only on these systems > > sizeof(long)

Re: [PATCH] scsi_transport_sas: Fix error handling in sas_smp_request()

2017-08-25 Thread Bart Van Assche
On Fri, 2017-08-25 at 17:35 +0200, Christoph Hellwig wrote: > I looked a bit more at the history of this, and it seems like the only > issue with commit 17d5363b83f8 here is using the blk_status_t type for the > ret variable. Even before that the negative error code leaked out > to userspace. We

[PATCH 3/4] smartpqi: remove the smp_handler stub

2017-08-25 Thread Christoph Hellwig
The SAS transport class will do the right thing and not register the BSG node if now smp_handler method is present. Signed-off-by: Christoph Hellwig --- drivers/scsi/smartpqi/smartpqi_sas_transport.c | 9 - 1 file changed, 9 deletions(-) diff --git

[PATCH 4/4] scsi_transport_sas: switch to bsg-lib for SMP passthrough

2017-08-25 Thread Christoph Hellwig
Simplify the SMP passthrough code by switching it to the generic bsg-lib helpers that abstract away the details of the request code, and gets drivers out of seeing struct scsi_request. For the libsas host SMP code there is a small behavior difference in that we now always clear the residual len

[PATCH 1/4] bsg-lib: pass the release callback through bsg_setup_queue

2017-08-25 Thread Christoph Hellwig
The SAS code will need it. Also mark the name argument const to match bsg_register_queue. Signed-off-by: Christoph Hellwig --- block/bsg-lib.c | 7 --- drivers/scsi/scsi_transport_fc.c| 6 -- drivers/scsi/scsi_transport_iscsi.c | 2 +-

[RFC] switch the SAS transport class to bsg-lib

2017-08-25 Thread Christoph Hellwig
Hi Chaitra, given that you have a SAS SMP passthrough test case and the code seems currently broken can you please try the patches below that rewrite the code? Chances are it still doesn't work, but I could help you to debug it. The patches are against the latest block for-linus tree with a

[PATCH 2/4] hpsa: remove the smp_handler stub

2017-08-25 Thread Christoph Hellwig
The SAS transport class will do the right thing and not register the BSG node if now smp_handler method is present. Signed-off-by: Christoph Hellwig --- drivers/scsi/hpsa.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index

Re: [PATCH] scsi_transport_sas: Fix error handling in sas_smp_request()

2017-08-25 Thread Christoph Hellwig
Hi Bart, I looked a bit more at the history of this, and it seems like the only issue with commit 17d5363b83f8 here is using the blk_status_t type for the ret variable. Even before that the negative error code leaked out to userspace. We can try to just turn that back into an int, but I'll also

Re: [PATCH 17/19] scsi_transport_srp: Suppress a W=1 compiler warning

2017-08-25 Thread h...@lst.de
On Thu, Aug 24, 2017 at 04:27:07PM +, Bart Van Assche wrote: > > The purpose of that check is to avoid that dev_loss_tmo * HZ can overflow. > That check is only needed on 32-bit systems since only on these systems > sizeof(long) == sizeof(int). How about changing the type of the dev_loss_tmo

Re: [PATCH 02/15] drm: make device_type const

2017-08-25 Thread Daniel Vetter
On Sat, Aug 19, 2017 at 01:52:13PM +0530, Bhumika Goyal wrote: > Make these const as they are only stored in the type field of a device > structure, which is const. > Done using Coccinelle. I can't apply this, it's missing your s-o-b line. You can just replay with that. Thanks, Daniel > --- >

[PATCHv2 01/26] scsi: fix comment in scsi_device_set_state()

2017-08-25 Thread Hannes Reinecke
The function returns '0' if successful; with the original comment the function doesn't have a way to indicate success ... Signed-off-by: Hannes Reinecke Reviewed-by: Bart van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn

[PATCHv2 10/26] fdomain: move bus reset to host reset

2017-08-25 Thread Hannes Reinecke
The bus reset function really is a host reset, so move it to eh_host_reset_handler(). Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/scsi/fdomain.c | 6 +++---

[PATCHv2 00/26] SCSI EH argument reshuffle part I

2017-08-25 Thread Hannes Reinecke
Hi all, finally here's the patchset to revamp the SCSI EH callback arguments which I promised to do (some years ago ...). The overall idea is to match the scope of the eh_XXX callbacks with the appropriate argument, eg eh_device_reset_handler() should have a scsi device as argument etc. Relying

[PATCHv2 05/26] fnic: do not call host reset from command abort

2017-08-25 Thread Hannes Reinecke
command abort already returns FAILED, which will then be escalated to a host reset. So no need to call host_reset directly. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn ---

[PATCHv2 11/26] scsi: drop bus reset for wd33c93-compatible boards

2017-08-25 Thread Hannes Reinecke
The bus reset function is just a wrapper calling host reset under the host lock. So move taking of the host lock into the host reset function and drop bus reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn

[PATCHv2 13/26] qlogicpti: move bus reset to host reset

2017-08-25 Thread Hannes Reinecke
The bus reset function really is a host reset, so move it to eh_host_reset_handler(). Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/scsi/qlogicpti.c | 5 ++--- 1 file changed, 2

[PATCHv2 09/26] hptiop: Simplify reset handling

2017-08-25 Thread Hannes Reinecke
The Highpoint driver only has one reset function, and that is a host reset. So stop pretending we're doing anything else. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/scsi/hptiop.c |

[PATCHv2 07/26] libsas: move bus_reset_handler() to target_reset_handler()

2017-08-25 Thread Hannes Reinecke
The bus reset handler is calling I_T Nexus reset, which logically is a target reset as it need to specify both the initiator and the target. So move it to target reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn

[PATCHv2 06/26] uas: move eh_bus_reset_handler to eh_device_reset_handler

2017-08-25 Thread Hannes Reinecke
The bus_reset handler is really a device reset, so move it to eh_device_reset_handler(). Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/usb/storage/uas.c | 4 ++-- 1 file changed, 2

[PATCHv2 19/26] qedf: drop bus reset handler

2017-08-25 Thread Hannes Reinecke
qedf has a host reset handler, but as the bus reset handler is a stub always returning SUCCESS the host reset is never invoked. So drop the bus reset handler. Signed-off-by: Hannes Reinecke Tested-by: Chad Dupuis --- drivers/scsi/qedf/qedf_main.c | 11

[PATCHv2 20/26] nsp32: drop bus reset

2017-08-25 Thread Hannes Reinecke
From: Hannes Reinecke bus reset is a host reset without nsp32hw_init(), and will always return SUCCESS, thus disabling the use of host reset. So drop bus reset in favour of host reset. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn

[PATCHv2 18/26] ppa: drop duplicate bus_reset handler

2017-08-25 Thread Hannes Reinecke
bus_reset and host_reset are the same functions, so drop bus_reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/scsi/ppa.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCHv2 15/26] NCR5380: Move bus reset to host reset

2017-08-25 Thread Hannes Reinecke
The bus reset handler really is a host reset, so move it to eh_bus_reset_handler. Signed-off-by: Hannes Reinecke Acked-by: Finn Thain Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn ---

[PATCHv2 04/26] fc_fcp: do not call fc_block_scsi_eh() from host reset

2017-08-25 Thread Hannes Reinecke
When calling host reset we're resetting all ports anyway, so there is no point in waiting for the ports to become unblocked. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn ---

[PATCHv2 12/26] rtsx: drop bus reset function

2017-08-25 Thread Hannes Reinecke
Function is a stub, so can as well be dropped. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/staging/rts5208/rtsx.c | 11 --- 1 file changed, 11 deletions(-) diff --git

[PATCHv2 21/26] aha152x: drop host reset

2017-08-25 Thread Hannes Reinecke
From: Hannes Reinecke The driver has both a bus and a host reset, where the host reset does a bus reset followed by an attempt to reset the chip registes to a default state. However, as the bus reset always returned SUCCESS the host reset was never called, so the functionality of

[PATCHv2 24/26] megaraid_mbox: drop duplicate bus reset and device reset function

2017-08-25 Thread Hannes Reinecke
megaraid_mbox only has one reset function, and that is a host reset. So drop the duplicate bus reset and device reset functions. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn ---

[PATCHv2 25/26] visorhba: sanitze private device data allocation

2017-08-25 Thread Hannes Reinecke
There's no need to keep the private data for a device in a separate list; better to store it in ->hostdata and do away with the additional list. Signed-off-by: Hannes Reinecke Reviewed-by: David Kershner ---

[PATCHv2 26/26] eata: remove 'arg_done' from eata2x_eh_host_reset()

2017-08-25 Thread Hannes Reinecke
Just displaying some different information; drop it. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/scsi/eata.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

[PATCHv2 22/26] 53c700: move bus reset to host reset

2017-08-25 Thread Hannes Reinecke
bus reset always returns SUCCESS, meaning host reset was never tested. At the same time the only difference to the HBA is a missing call to NCR_700_chip_reset(). So add the missing call to bus reset, drop host reset, and move bus reset to host reset. Signed-off-by: Hannes Reinecke

[PATCHv2 03/26] ibmvfc: Do not call fc_block_scsi_eh() on host reset

2017-08-25 Thread Hannes Reinecke
When we're resetting the host any remote port states will be reset anyway, so it's pointless to wait for dev_loss_tmo during host reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn ---

[PATCHv2 16/26] qlogicfas: move bus_reset to host_reset

2017-08-25 Thread Hannes Reinecke
From: Hannes Reinecke The bus reset handler is really a host reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/scsi/pcmcia/qlogic_stub.c | 4 ++--

[PATCHv2 14/26] acornscsi: move bus reset to host reset

2017-08-25 Thread Hannes Reinecke
The bus reset function is really a host reset, so move it to eh_host_reset_handler. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/scsi/arm/acornscsi.c | 11 ++- 1 file changed,

[PATCHv2 17/26] imm: drop duplicate bus_reset handler

2017-08-25 Thread Hannes Reinecke
host_reset and bus_reset is the same function, so drop bus reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/scsi/imm.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCHv2 23/26] bnx2fc: remove obsolete bnx2fc_eh_host_reset() definition

2017-08-25 Thread Hannes Reinecke
Never used anywhere. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/scsi/bnx2fc/bnx2fc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc.h

[PATCHv2 08/26] bfa: move bus reset to target reset

2017-08-25 Thread Hannes Reinecke
The bus reset handler is just calling target reset on all targets, which is exactly what SCSI EH will be doing anyway. So move the bus reset function to target reset and drop the loop. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by:

[PATCHv2 02/26] mptfc: Do not call fc_block_scsi_eh() on host reset

2017-08-25 Thread Hannes Reinecke
When we're resetting the host any remote port states will be reset anyway, so it's pointless to wait for dev_loss_tmo during host reset. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn ---

[PATCH] scsi: qedi: off by one in qedi_get_cmd_from_tid()

2017-08-25 Thread Dan Carpenter
The > here should be >= or we end up reading one element beyond the end of the qedi->itt_map[] array. The qedi->itt_map[] array is allocated in qedi_alloc_itt(). Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Signed-off-by: Dan Carpenter

Re: qla2xxx: MSI-X: Unsupported ISP 2432 SSVID/SSDID (0x103C,0x7041)

2017-08-25 Thread Hannes Reinecke
On 08/19/2017 10:41 PM, Meelis Roos wrote: > Hello, I just tried Linux with the latest kernel (4.13-rc5+git) on a HP > DL360 G6 with HP branded ISP2432 HBA. The driver mentions unsupported > model of the card: > > [3.868589] scsi host1: qla2xxx > [3.871696] qla2xxx

Re: [PATCH] scsi_transport_sas: Fix error handling in sas_smp_request()

2017-08-25 Thread Hannes Reinecke
On 08/24/2017 06:06 PM, Bart Van Assche wrote: > On Thu, 2017-08-24 at 14:21 +0200, Hannes Reinecke wrote: >> On 08/23/2017 08:25 PM, Bart Van Assche wrote: >>> sas_function_template.smp_handler implementations either return >>> 0 or a Unix error code. Convert that error code into a SCSI >>>

  1   2   >