Re: [PATCH v3] scsi, block: fix duplicate bdi name registration crashes

2017-02-02 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v3] scsi, block: fix duplicate bdi name registration crashes

2017-02-02 Thread Jens Axboe
On 02/01/2017 03:43 PM, Jens Axboe wrote: > On 02/01/2017 02:40 PM, Dan Williams wrote: >> On Wed, Feb 1, 2017 at 2:35 PM, Jens Axboe wrote: >>> On 02/01/2017 02:05 PM, Dan Williams wrote: Warnings of the following form occur because scsi reuses a devt number while the block layer still

Re: [PATCH] PCI/MSI: don't apply affinity if there aren't enough vectors left

2017-02-02 Thread Bjorn Helgaas
On Mon, Jan 30, 2017 at 01:15:41PM +0100, Christoph Hellwig wrote: > Bart reported a problem wіth an out of bounds access in the low-level > IRQ affinity code, which we root caused to the qla2xxx driver assigning > all it's MSI-X vectors to the pre and post vectors, and not having any > left for th

Re: [PATCH] PCI/MSI: don't apply affinity if there aren't enough vectors left

2017-02-02 Thread Christoph Hellwig
On Thu, Feb 02, 2017 at 11:36:59AM -0600, Bjorn Helgaas wrote: > You didn't say exactly where the out of bounds access was, but I assume > it's probably in irq_create_affinity_masks() in this path: Yes. See the original report from Bart here: http://www.spinics.net/lists/linux-scsi/msg104082.htm

[PATCH 00/15] qla2xxx: Bug Fixes and updates for target.

2017-02-02 Thread Himanshu Madhani
Hi Bart, Please consider this series for inclusion in target-pending. This series contains following changes. o Fix for the deadlock because of inconsistent lock usage reported by you. o Added patch to submit non-critical MBX command via IOCB path. o Improved T10-DIF/PI handling with target sta

[PATCH 07/15] qla2xxx: Export DIF stats via debugfs

2017-02-02 Thread Himanshu Madhani
From: Anil Gurumurthy Signed-off-by: Anil Gurumurthy Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 12 drivers/scsi/qla2xxx/qla_dfs.c | 15 +++ 2 files changed, 27 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/

[PATCH 13/15] qla2xxx: Add async new target notification

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 6 +++--- drivers/scsi/qla2xxx/qla_target.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_tar

[PATCH 14/15] qla2xxx: Fix sess_lock & hardware_lock lock order problem.

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran The main lock that needs to be held for CMD or TMR submission to upper layer is the sess_lock. The sess_lock is used to serialize cmd submission and session deletion. The addition of hardware_lock being held is not necessary. This patch removes hardware_lock dependency from CMD/T

[PATCH 08/15] qla2xxx: Change scsi host lookup method

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran For target mode, when new scsi command arrive, driver first performs a look up of the SCSI Host. The current look up method is based on the ALPA portion of the NPort ID. For Cisco switch, the ALPA can not be used as the index. Instead, the new search method is based on the full v

[PATCH 11/15] qla2xxx: Fix inadequate lock protection for ABTS.

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran Normally, ABTS is sent to Target Core as Task MGMT command. In the case of error, qla2xxx needs to send response, hardware_lock is required to prevent request queue corruption. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 1

[PATCH 05/15] qla2xxx: Add DebugFS node to display Port Database

2017-02-02 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali --- drivers/scsi/qla2xxx/qla_def.h | 2 + drivers/scsi/qla2xxx/qla_dfs.c | 92 -- 2 files changed, 90 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scs

[PATCH 06/15] qla2xxx: Improve T10-DIF/PI handling in driver.

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran Add routines to support T10 DIF tag. Signed-off-by: Quinn Tran Signed-off-by: Anil Gurumurthy Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.h | 1 + drivers/scsi/qla2xxx/qla_def.h | 17 ++ drivers/scsi/qla2xxx/qla_target.c | 598 +++

[PATCH 10/15] qla2xxx: Fix request queue corruption.

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran When FW notify driver or driver detects low FW resource, driver tries to send out Busy SCSI Status to tell Initiator side to back off. During the send process, the lock was not held. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target

[PATCH 03/15] qla2xxx: Allow vref count to timeout on vport delete.

2017-02-02 Thread Himanshu Madhani
From: Joe Carnuccio Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_attr.c | 4 +--- drivers/scsi/qla2xxx/qla_mid.c | 12 +++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2x

[PATCH 09/15] qla2xxx: Fix memory leak for abts processing

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index d26a8cb..ab9f4e7 100644 --- a/drivers/scsi/qla2xxx

[PATCH 01/15] qla2xxx: Fix delayed response to command for loop mode/direct connect.

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran Current driver wait for FW to be in the ready state before processing in-coming commands. For Arbitrated Loop or Point-to- Point (not switch), FW Ready state can take a while. FW will transition to ready state after all Nports have been logged in. In the mean time, certain initia

[PATCH 15/15] qla2xxx: Update driver version to 9.00.00.00-k

2017-02-02 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani signed-off-by: Giridhar Malavali --- drivers/scsi/qla2xxx/qla_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 3cb1964..45bc84e 100644 --- a/drivers/s

[PATCH 02/15] qla2xxx: Allow relogin to proceed if remote login did not finish

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran If the remote port have started the login process, then the PLOGI and PRLI should be back to back. Driver will allow the remote port to complete the process. For the case where the remote port decide to back off from sending PRLI, this local port sets an expiration timer for the

[PATCH 12/15] qla2xxx: Fix warnings about inconsistent indenting

2017-02-02 Thread Himanshu Madhani
Fix following warning reported by smatch tool. drivers/scsi/qla2xxx/qla_mbx.c:128 qla2x00_mailbox_command() warn: inconsistent indenting Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali --- drivers/scsi/qla2xxx/qla_mbx.c | 9 - 1 file changed, 4 insertions(+), 5 deletio

[PATCH 04/15] qla2xxx: Use IOCB interface to submit non-critical MBX.

2017-02-02 Thread Himanshu Madhani
From: Quinn Tran The Mailbox interface is currently over subscribed. We like to reserve the Mailbox interface for the chip managment and link initialization. Any non essential Mailbox command will be routed through the IOCB interface. The IOCB interface is able to absorb more commands. Following

Re: [PATCH] PCI/MSI: don't apply affinity if there aren't enough vectors left

2017-02-02 Thread Bjorn Helgaas
On Thu, Feb 02, 2017 at 07:32:16PM +0100, Christoph Hellwig wrote: > On Thu, Feb 02, 2017 at 11:36:59AM -0600, Bjorn Helgaas wrote: > > You didn't say exactly where the out of bounds access was, but I assume > > it's probably in irq_create_affinity_masks() in this path: > > Yes. See the original

[PATCH V4 02/24] aacraid: Added aacraid.h include guard

2017-02-02 Thread Raghava Aditya Renukunta
Added aacraid.h include guard Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: None drivers/scsi/aacraid/aacraid.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers

[PATCH V4 00/24] aacraid: Patchset for Smart Family Support

2017-02-02 Thread Raghava Aditya Renukunta
This patchset adds support to the HBA1000 and SMARTIOC2000 family of cards. The driver version is now updated to 50740 Changes in V2: Fixed kbuild test robot warnings Changes in V3: Removed Camel case definitions Misc fixes Changes in V4: Removed Camel case defintions Misc fixes Reworked functio

[PATCH V4 01/24] aacraid: Remove duplicate irq management code

2017-02-02 Thread Raghava Aditya Renukunta
Removed duplicate code that for acquiring and releasing irqs Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: None drivers/scsi/aacraid/linit.c | 58 +++---

[PATCH V4 24/24] aacraid: update version

2017-02-02 Thread Raghava Aditya Renukunta
Update the driver version to 50740 Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: None drivers/scsi/aacraid/aacraid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH V4 19/24] aacraid: Added new IWBR reset

2017-02-02 Thread Raghava Aditya Renukunta
Added a new IWBR soft reset type, reworked the IOP reset interface for a bit. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Changes in V2: None Changes in V3: None Changes in V4: Made the reset_adapter arguments understandable. drivers/scsi/aacraid/aachba.c |

[PATCH V4 22/24] aacraid: Update copyrights

2017-02-02 Thread Raghava Aditya Renukunta
Added new copyright messages Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: None drivers/scsi/aacraid/aachba.c | 8 +++- drivers/scsi/aacraid/aacraid.h | 32 ++

[PATCH V4 20/24] aacraid: Added ioctl to trigger IOP/IWBR reset

2017-02-02 Thread Raghava Aditya Renukunta
Added a new ioctl interface to trigger an IOP or IWBR reset from ioctl. Primary used by management utility to trigger resets. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: None

[PATCH V4 21/24] aacraid: Retrieve HBA host information ioctl

2017-02-02 Thread Raghava Aditya Renukunta
Added a new ioctl interface to retrieve the host device information. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: Removed camelcase drivers/scsi/aacraid/aacraid.h | 52

[PATCH V4 11/24] aacraid: Added support for periodic wellness sync

2017-02-02 Thread Raghava Aditya Renukunta
This patch adds a new functions that periodically sync the time of host to the adapter. In addition also informs the adapter that the driver is alive and kicking. Only applicable to the HBA1000 and SMARTIOC2000. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Changes in

[PATCH V4 05/24] aacraid: Retrieve and update the device types

2017-02-02 Thread Raghava Aditya Renukunta
This patch adds support to retrieve the type of each adapter connected device. Applicable to HBA1000 and SmartIOC2000 products Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: Fixed uninitialized return value Changes in V

[PATCH V4 14/24] aacraid: Added support for hotplug

2017-02-02 Thread Raghava Aditya Renukunta
Added support for drive hotplug add and removal Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Changes in V2: None Changes in V3: None Changes in V4: None drivers/scsi/aacraid/aachba.c | 13 ++-- drivers/scsi/aacraid/aacraid.h | 17 - drivers/scsi/aacraid/

[PATCH V4 18/24] aacraid: VPD 83 type3 support

2017-02-02 Thread Raghava Aditya Renukunta
This patch adds support to retrieve the unique identifier data (VPD page 83 type3) for Logical drives created on SmartIOC 2000 products. In addition added a sysfs device structure to expose the id information. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Changes in

[PATCH V4 17/24] aacraid: Added support to abort cmd and reset lun

2017-02-02 Thread Raghava Aditya Renukunta
Added task management command support to abort any timed out commands in case of a eh_abort call and to reset lun's in case of eh_reset call. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: Fixed freeing of initialized ad

[PATCH V4 06/24] aacraid: Reworked scsi command submission path

2017-02-02 Thread Raghava Aditya Renukunta
Moved the READ and WRITE switch cases to the top. Added a default case to the switch case and replaced duplicate scsi result value with a macro. The idea is that since most of scsi commands we care about performance wise are read or write, we need to process them first. Internally the compiler (

[PATCH V4 12/24] aacraid: Retrieve Queue Depth from Adapter FW

2017-02-02 Thread Raghava Aditya Renukunta
Retrieved queue depth from fw and saved it for future use. Only applicable for HBA1000 drives. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Changes in V2: None Changes in V3: None Changes in V4: Removed unnecessary indent Replaced pragma drivers/scsi/aacraid/aac

[PATCH V4 04/24] aacraid: Added sa firmware support

2017-02-02 Thread Raghava Aditya Renukunta
sa_firmware adds the capability to differentiate the new SmartIOC family of adapters from the series 8 and below. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: Removed unnecessary brackets Changes i

[PATCH V4 13/24] aacraid: Added support to set QD of attached drives

2017-02-02 Thread Raghava Aditya Renukunta
Added support to set qd of drives in slave_configure.This only works for HBA1000 attached drives. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Changes in V2: None Changes in V3: None Changes in V4: Reworked slave configure function drivers/scsi/aacraid/linit.c

[PATCH V4 03/24] aacraid: added support for init_struct_8

2017-02-02 Thread Raghava Aditya Renukunta
This patch lays the groundwork for supporting the new HBA-1000 controller family.A new INIT structure INIT_STRUCT_8 has been added which allows for a variable size for MSI-x vectors among other things, and is used for both Series-8, HBA-1000 and SmartIOC-2000. Signed-off-by: Raghava Aditya Renuk

[PATCH V4 09/24] aacraid: Added support for read medium error

2017-02-02 Thread Raghava Aditya Renukunta
This patch processes Raw IO read medium errors. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: None drivers/scsi/aacraid/aachba.c | 10 ++ drivers/scsi/aacraid/aacrai

[PATCH V4 07/24] aacraid: Process Error for response I/O

2017-02-02 Thread Raghava Aditya Renukunta
Make sure that the driver processes error conditions even in the fast response path for response from the adapter. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: None drivers/

[PATCH V4 08/24] aacraid: Added support for response path

2017-02-02 Thread Raghava Aditya Renukunta
This patch enables the driver to actually process the I/O, or srb replies from adapter. In addition to any HBA1000 or SmartIOC2000 adapter events. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Changes in V2: None Changes in V3: None Changes in V4: Removed extra br

[PATCH V4 15/24] aacraid: Include HBA direct interface

2017-02-02 Thread Raghava Aditya Renukunta
Added support to send direct pasthru srb commands from management utilty to the controller. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: None drivers/scsi/aacraid/aacraid.h

[PATCH V4 16/24] aacraid: Add task management functionality

2017-02-02 Thread Raghava Aditya Renukunta
Added support to send out task management commands. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Changes in V2: Fixed overflow warning Changes in V3: None Changes in V4: Made aac_hba_callback understandable Zapped C++ comment Removed unnecessary identation driv

[PATCH V4 23/24] aacraid: Change Driver Version Prefix

2017-02-02 Thread Raghava Aditya Renukunta
Change the aacraid driver prefix from 1.2-1 to 1.2.1 Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll Reviewed-by: Johannes Thumshirn --- Changes in V2: None Changes in V3: None Changes in V4: None drivers/scsi/aacraid/linit.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH V4 10/24] aacraid: Reworked aac_command_thread

2017-02-02 Thread Raghava Aditya Renukunta
Reworked aac_command_thread into aac_process_events Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Changes in V2: None Changes in V3: None Changes in V4: Reworked aac_process_events and broke it into logical block functions drivers/scsi/aacraid/commsup.c | 468 +++

[REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME

2017-02-02 Thread Junichi Nomura
I found following ext4 error occurs on a certain storage since v4.10-rc1: EXT4-fs (sdc1): Delayed block allocation failed for inode 12 at logical offset 100 with max blocks 2 with error 121 EXT4-fs (sdc1): This should not happen!! Data will be lost Error 121 (EREMOTEIO) was returned from blkd