Re: [PATCH -next] scsi: qla2xxx: Remove set but not used variable 'ptr_dma'

2018-09-12 Thread Madhani, Himanshu
> On Sep 12, 2018, at 7:40 PM, YueHaibing wrote: > > External Email > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/scsi/qla2xxx/qla_iocb.c: In function 'qla24xx_els_dcmd2_iocb': > drivers/scsi/qla2xxx/qla_iocb.c:2644:13: warning: > variable 'ptr_dma' set but not used [-Wunused

[PATCH] scsi: ufs: use PTR_ERR_OR_ZERO in ufs_hisi_get_resource()

2018-09-12 Thread Josh Abraham
Use PTR_ERR_OR_ZERO instead of IF_ERR() return PTR_ERR(). Signed-off-by: Joshua Abraham --- drivers/scsi/ufs/ufs-hisi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufs-hisi.c b/drivers/scsi/ufs/ufs-hisi.c index 46df707e6f2c..e79499469cb3 100644 --- a/d

[PATCH -next] scsi: qla2xxx: Remove set but not used variable 'ptr_dma'

2018-09-12 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/qla2xxx/qla_iocb.c: In function 'qla24xx_els_dcmd2_iocb': drivers/scsi/qla2xxx/qla_iocb.c:2644:13: warning: variable 'ptr_dma' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/scsi/qla2xxx/qla_iocb.c

[PATCH -next] scsi: lpfc: Remove set but not used variable 'sgl_size'

2018-09-12 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_new_nvme_buf': drivers/scsi/lpfc/lpfc_nvme.c:2238:24: warning: variable 'sgl_size' set but not used [-Wunused-but-set-variable] int bcnt, num_posted, sgl_size; ^ Signed-off-b

[PATCH -next] scsi: pm80xx: Remove set but not used variable 'device_id'

2018-09-12 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/pm8001/pm8001_sas.c: In function 'pm8001_I_T_nexus_event_handler': drivers/scsi/pm8001/pm8001_sas.c:1052:6: warning: variable 'device_id' set but not used [-Wunused-but-set-variable] drivers/scsi/pm8001/pm8001_sas.c: In function 'pm8001

[Announce] sg3_utils-1.44 available

2018-09-12 Thread Douglas Gilbert
Lack of synchronization between my subversion repository and the official git mirror led to this release tag: https://github.com/hreinecke/sg3_utils/releases/tag/v1.43 dated 20160218 (my svn revision 665). That led some distributions to believe that sg3_utils-1.43 was released over 2.5 years ag

Re: Subsystem responsible for /proc/diskstats timings?

2018-09-12 Thread Omar Sandoval
On Sun, Sep 09, 2018 at 10:03:35AM +0200, Klaus Kusche wrote: > > Hello, > > Which subsystem could be responsible for > > https://bugzilla.kernel.org/show_bug.cgi?id=200857 > > ("4.18 regression: /proc/diskstats: I/O busy time not updated correctly")? > > This is for AHCI SATA disks (/dev/sda,

[PATCH -next] scsi: qla2xxx: Use PTR_ERR_OR_ZERO in tcm_qla2xxx_check_initiator_node_acl()

2018-09-12 Thread YueHaibing
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 731a094..70356d2 10064

Re: [PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-12 Thread Andrew Donnellan
On 13/09/18 01:01, Arnd Bergmann wrote: A handful of drivers all have a trivial wrapper around their ioctl handler, but don't call the compat_ptr() conversion function at the moment. In practice this does not matter, since none of them are used on the s390 architecture and for all other architect

[PATCH] lpfc: Synchronize access to remoteport via rport

2018-09-12 Thread James Smart
The driver currently uses the ndlp to get the local rport which is then used to get the nvme transport remoteport pointer. There can be cases where a stale remoteport pointer is obtained as synchronization isn't done through the different dereferences. Correct by using locks to synchronize the der

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Greg Kroah-Hartman
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architect

Re: [PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-12 Thread Greg Kroah-Hartman
On Wed, Sep 12, 2018 at 05:01:04PM +0200, Arnd Bergmann wrote: > A handful of drivers all have a trivial wrapper around their ioctl > handler, but don't call the compat_ptr() conversion function at the > moment. In practice this does not matter, since none of them are used > on the s390 architectur

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Mauro Carvalho Chehab
Em Wed, 12 Sep 2018 17:08:52 +0200 Arnd Bergmann escreveu: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architectur

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Daniel Vetter
On Wed, Sep 12, 2018 at 5:08 PM, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architecture, wher

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Jason Gunthorpe
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architect

[PATCH v2 07/17] compat_ioctl: move tape handling into drivers

2018-09-12 Thread Arnd Bergmann
MTIOCPOS and MTIOCGET are incompatible between 32-bit and 64-bit user space, and traditionally have been translated in fs/compat_ioctl.c. To get rid of that translation handler, move a corresponding implementation into each of the four drivers implementing those commands. The interesting part of

[PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
The .ioctl and .compat_ioctl file operations have the same prototype so they can both point to the same function, which works great almost all the time when all the commands are compatible. One exception is the s390 architecture, where a compat pointer is only 31 bit wide, and converting it into a

[PATCH v2 03/17] compat_ioctl: use correct compat_ptr() translation in drivers

2018-09-12 Thread Arnd Bergmann
A handful of drivers all have a trivial wrapper around their ioctl handler, but don't call the compat_ptr() conversion function at the moment. In practice this does not matter, since none of them are used on the s390 architecture and for all other architectures, compat_ptr() does not do anything, b

Re: [PATCH V12 2/2] scsi: ufs: Add configfs support for UFS provisioning

2018-09-12 Thread Adrian Hunter
On 30/08/18 13:46, Sayali Lokhande wrote: > This patch adds configfs support to provision UFS device at > runtime. This feature can be primarily useful in factory or > assembly line as some devices may be required to be configured > multiple times during initial system development phase. > Configur

[GIT PULL] SCSI fixes for 4.19-rc3

2018-09-12 Thread James Bottomley
Three fixes, all in drivers (qedi and iscsi target) so no wider impact even if the code changes are a bit extensive. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Mike Christie (1):   scsi: iscsi: target: Fix conn

Re: [Patch v1 0/7] mpt3sas: Hot-Plug Surprise removal support on IOC.

2018-09-12 Thread Sreekanth Reddy
On Wed, Sep 5, 2018 at 1:08 PM, Lukas Wunner wrote: > On Wed, Sep 05, 2018 at 11:45:45AM +0530, Sreekanth Reddy wrote: >> On Tue, Sep 4, 2018 at 3:12 PM, Lukas Wunner wrote: >> > Many scsi drivers call pci_channel_offline() to detect inaccessibility >> > of the device due to a PCI error: >> > htt

[PATCH 0/5] scsi: libsas: some code cleanups and bug fixes

2018-09-12 Thread Jason Yan
I split some code cleanups and bug fixes patches from my earlier series: https://lkml.org/lkml/2018/5/28/2154 These patches are separate to the subject of the earlier series and are just small fixes. Hope it is much easier to review and test. Jason Yan (5): scsi: libsas: delete dead code in scs

[PATCH 4/5] scsi: libsas: check the ata device status by ata_dev_enabled()

2018-09-12 Thread Jason Yan
When ata device IDENTIFY failed, the ata device status is ATA_DEV_UNKNOWN. The libata reported like: [113518.620433] ata5.00: qc timeout (cmd 0xec) [113518.653646] ata5.00: failed to IDENTIFY (I/O error, err_mask=0x4) But libsas verifies the device status by ata_dev_disabled(), which skiped ATA_D

[PATCH 5/5] scsi: libsas: fix a race condition when smp task timeout

2018-09-12 Thread Jason Yan
When the lldd is processing the complete sas task in interrupt and set the task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be triggered at the same time. And smp_task_timedout() will complete the task wheter the SAS_TASK_STATE_DONE is set or not. Then the sas task may freed befor

[PATCH 3/5] scsi: libsas: always unregister the old device if going to discover new

2018-09-12 Thread Jason Yan
If we went into sas_rediscover_dev() the attached_sas_addr was already insured not to be zero. So it's unnecessary to check if the attached_sas_addr is zero. And although if the sas address is not changed, we always have to unregister the old device when we are going to register a new one. We cann

[PATCH 2/5] scsi: libsas: check the lldd callback correctly

2018-09-12 Thread Jason Yan
We are using lldd_port_deformed so we'd better check if lldd_port_deformed is NULL. After this, we can remove hisi_sas_port_deformed() because it is just a stub to avoid a NULL dereference caused by the wrong check. Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne

[PATCH 1/5] scsi: libsas: delete dead code in scsi_transport_sas.c

2018-09-12 Thread Jason Yan
This code is dead and no clue implies that it will be back again. Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke Reviewed-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_sas.c

[Announce] sg3_utils-1.43 available

2018-09-12 Thread Douglas Gilbert
sg3_utils is a package of command line utilities for sending SCSI commands to storage devices. It some contexts it can send some ATA and NVMe commands. The package targets the Linux 4, 3, 2.6 and 2.4 kernel series. It has ports to FreeBSD, Android, Solaris, and Windows (cygwin and MinGW). For an