[PATCH V2 17/19] aacraid : Add reset debugging statements

2017-05-09 Thread Raghava Aditya Renukunta
Added info and error messages in controller reset function to log information about the status of the IOP/SOFT reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/src.c | 15 +++ 1 file changed, 11 insertions(+), 4

[PATCH V2 11/19] aacraid: Add periodic checks to see IOP reset status

2017-05-09 Thread Raghava Aditya Renukunta
Added function that waits with a timeout for the ctrl to be up and running after triggering an IOP reset. Also removed 30 sec sleep as it is not needed. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/aacraid.h | 1 + drivers/sc

[PATCH V2 09/19] aacraid: Using single reset mask for IOP reset

2017-05-09 Thread Raghava Aditya Renukunta
The driver can now trigger IOP reset with a single reset mask. Removed code that retrieves a reset_mask from the firmware. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/aacraid.h | 5 - drivers/scsi/aacraid/src.c | 16

[PATCH V2 18/19] aacraid: Remove reference to Series-9

2017-05-09 Thread Raghava Aditya Renukunta
Remove reference to Series-9 HBA and created arc ctrl check function. Signed-off-by: Prasad B Munirathnam Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/aacraid.h | 13 - drivers/scsi/aacraid/comminit.c | 18 --

[PATCH V2 12/19] aacraid: Rework SOFT reset code

2017-05-09 Thread Raghava Aditya Renukunta
Now the driver issues a soft reset and waits for the controller to be up and running by periodically checking on the status of the controller health registers. Also prevents ARC adapters from issuing soft reset if IOP resets failed. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carro

[PATCH V2 16/19] aacraid: Enable ctrl reset for both hba and arc

2017-05-09 Thread Raghava Aditya Renukunta
Make sure that IOP and SOFT reset are enabled for both for both arc and hba1000 controllers. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/linit.c | 77 +++- 1 file changed, 40 insertions

[PATCH V2 15/19] aacraid: Make sure ioctl returns on controller reset

2017-05-09 Thread Raghava Aditya Renukunta
Made sure that ioctl commands return in case of a controller reset. Signed-off-by: Raghava Aditya Renukunta --- Changes in V2: Removed incorrect up Cleared wait flag once event is received not before drivers/scsi/aacraid/commsup.c | 25 ++--- 1 file changed, 18 insertions(+

[PATCH V2 07/19] aacraid: Log count info of scsi cmds before reset

2017-05-09 Thread Raghava Aditya Renukunta
Log the location of the scsi cmds before triggering a reset. This information is useful for debugging. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/linit.c | 90 ++-- 1 file changed, 53

[PATCH V2 13/19] aacraid: Rework aac_src_restart

2017-05-09 Thread Raghava Aditya Renukunta
Removed switch case and replaced with if mask checks. Moved KERNEL_PANIC check to when bled is less than 0. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/src.c | 34 -- 1 file changed, 12 inserti

[PATCH V2 10/19] aacraid: Rework IOP reset

2017-05-09 Thread Raghava Aditya Renukunta
Reworked IOP reset to remove unneeded variable and created a helper function to notify fw of an imminent IOP reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/src.c | 16 +--- 1 file changed, 9 insertions(+), 7 d

[PATCH V2 14/19] aacraid: Use correct function to get ctrl health

2017-05-09 Thread Raghava Aditya Renukunta
The command thread checks the ctrl health periodically before sending updates to the controller. The function that it uses is aac_check_health which does more than get the health status. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aa

[PATCH V2 19/19] aacraid: Update driver version to 50834

2017-05-09 Thread Raghava Aditya Renukunta
Update the driver version to 50834 Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/aacraid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h inde

[PATCH V2 08/19] aacraid: Print ctrl status before eh reset

2017-05-09 Thread Raghava Aditya Renukunta
Log the status of the controller before issuing a reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/linit.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/lin

[PATCH V2 04/19] aacraid: Set correct Queue Depth for HBA1000 RAW disks

2017-05-09 Thread Raghava Aditya Renukunta
The default queue depth for non NATIVE RAW disks is calculated from the number of fibs and number of disks or a max of 256. This causes poor disk IO performance. The fix is to set default qd based on the type of disks (SATA -32 and SAS -64) Signed-off-by: Raghava Aditya Renukunta Reviewed-by: Da

[PATCH V2 05/19] aacraid: Remove reset support from check_health

2017-05-09 Thread Raghava Aditya Renukunta
Check health does not need to reset the ctrl but just return the controller health status. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/commsup.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/scsi

[PATCH V2 02/19] aacraid: Fix DMAR issues with iommu=pt

2017-05-09 Thread Raghava Aditya Renukunta
The driver changed the DMA consistent map after consistent memory was allocated, this invalidated the IOMMU identity mapping. The fix was to make sure that we set the DMA consistent mask setting once depending on the controller card. Signed-off-by: Raghava Aditya Renukunta --- Changes in V2: Non

[PATCH V2 03/19] aacraid: Added 32 and 64 queue depth for arc natives

2017-05-09 Thread Raghava Aditya Renukunta
The qd for ARC Native disks is calculated by dividing the max IO 1024 by the number of disks or 256 which ever is lower. This causes poor disk IO performance. The fix is set the qd based on the type of disk (SAS - 64 and SATA - 32). Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carr

[PATCH V2 06/19] aacraid: Change wait time for fib completion

2017-05-09 Thread Raghava Aditya Renukunta
Change the completion wait time for the fibs in the reset and abort callback from 2 minutes to 15 seconds. 2 minutes is too long for waiting for completion. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/linit.c | 8 1

[PATCH V2 00/19] aacraid: Patchset with reset rework and misc fixes

2017-05-09 Thread Raghava Aditya Renukunta
This patchset primarily focuses on tweaking and hardening the controller reset support for both ARC and HBA1000 devices. Now the driver can only reset the controller thru eh reset. Included a srb memory fix and pci dma allocation fix. Changes in V2: - Corrected heading and description for srb mem

[PATCH V2 01/19] aacraid: Remove __GFP_DMA for raw srb memory

2017-05-09 Thread Raghava Aditya Renukunta
The raw srb commands do not requires memory that in the ZONE_DMA memory space. For 32bit srb commands use GFP_DMA32 to limit the memory to 32bit memory range (4GB). Signed-off-by: Raghava Aditya Renukunta --- Changes in V2: Corrected flag name to GFP_DMA32 in patch description and corrected GFP_

Re: [PATCH v1] ibmvscsis: Fix cleaning up pointers

2017-05-09 Thread Nicholas A. Bellinger
On Tue, 2017-05-09 at 11:50 -0500, Bryant G. Ly wrote: > This patch is dependent on: > 'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")' > This patch cleans up some pointers after usage. > > Signed-off-by: Bryant G. Ly > Reviewed-by: Michael Cyr > Cc: # v4.8+ > --- > drive

[PATCH] csiostor: Avoid content leaks and casts

2017-05-09 Thread Kees Cook
When copying attributes, the len argument was padded out and the resulting memcpy() would copy beyond the end of the source buffer. Avoid this, and use size_t for val_len to avoid all the casts. Similarly, avoid source buffer casts and use void *. Additionally enforces val_len can be represented

[PATCH] target: remove dead code

2017-05-09 Thread Gustavo A. R. Silva
Local variable _ret_ is assigned to a constant value and it is never updated again. Remove this variable and the dead code it guards. Addresses-Coverity-ID: 140761 Signed-off-by: Gustavo A. R. Silva --- drivers/target/target_core_rd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

Re: [REEEEPOST] bnx2i + bnx2fc: convert to generic workqueue (#3)

2017-05-09 Thread Martin K. Petersen
Chad, > To be honest, I'm reluctant to merge these patches on bnx2fc as the > I/O path on this driver has been stable for quite some time and given > that it's an older driver I'm not looking to make changes there. I understand that the driver is in maintenance mode. However, the Linux kernel an

Re: [PATCH v3] sd: Ignore sync cache failures when not supported

2017-05-09 Thread Ewan D. Milne
On Tue, 2017-05-09 at 17:43 +0200, Thierry Escande wrote: > From: Derek Basehore > > Some external hard drives don't support the sync command even though the > hard drive has write cache enabled. In this case, upon suspend request, > sync cache failures are ignored if the error code in the sense

[PATCH] scsi: qla2xxx: remove dead code

2017-05-09 Thread Gustavo A. R. Silva
Local variable page_mode is assigned to a constant value and it is never updated again. Remove this variable and the dead code it guards. Addresses-Coverity-ID: 200420 Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/qla2xxx/qla_nx.c | 48 --- 1 file ch

[PATCH v1] ibmvscsis: Fix cleaning up pointers

2017-05-09 Thread Bryant G. Ly
This patch is dependent on: 'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")' This patch cleans up some pointers after usage. Signed-off-by: Bryant G. Ly Reviewed-by: Michael Cyr Cc: # v4.8+ --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +++ 1 file changed, 3 insertions

[PATCH v3] sd: Ignore sync cache failures when not supported

2017-05-09 Thread Thierry Escande
From: Derek Basehore Some external hard drives don't support the sync command even though the hard drive has write cache enabled. In this case, upon suspend request, sync cache failures are ignored if the error code in the sense header is ILLEGAL_REQUEST. There's not much we can do for these driv

Re: [REEEEPOST] bnx2i + bnx2fc: convert to generic workqueue (#3)

2017-05-09 Thread James Bottomley
On Tue, 2017-05-09 at 10:17 -0400, Chad Dupuis wrote: > On Mon, 8 May 2017, 10:04pm, Martin K. Petersen wrote: > > > > > Sebastian, > > > > > Martin, do you see any chance to get this merged? Chad replied to > the > > > list that he is going to test it on 2017-04-10, didn't respond to > the > >

Re: [REEEEPOST] bnx2i + bnx2fc: convert to generic workqueue (#3)

2017-05-09 Thread Chad Dupuis
On Mon, 8 May 2017, 10:04pm, Martin K. Petersen wrote: > > Sebastian, > > > Martin, do you see any chance to get this merged? Chad replied to the > > list that he is going to test it on 2017-04-10, didn't respond to the > > ping 10 days later. The series stalled last time in the same way. > >

Re: [PATCH 1/5] scsi: bnx2i: convert to workqueue

2017-05-09 Thread Rangankar, Manish
On 10/04/17 10:42 PM, "Sebastian Andrzej Siewior" wrote: >The driver creates its own per-CPU threads which are updated based on CPU >hotplug events. It is also possible to use kworkers and remove some of the >infrastructure get the same job done while saving a few lines of code. > >The DECLARE_P

A bug in scsi_alloc_target of drivers/scsi/scsi_scan.c

2017-05-09 Thread Dashi DS1 Cao
When debugging a race condition in scsi_remove_target of 3.12, I ran into this possible bug within scsi_alloc_target. When an existing "struct scsi_target" is found and used, the starget just got through kzmalloc should be freed, rather than dong a "put_device(dev)". diff --git a/drivers/scsi/sc