[PATCH v2] sd: Write lock zone for REQ_OP_WRITE_ZEROES

2017-05-07 Thread damien . lemoal
From: Damien Le Moal For a zoned block device, sd_zbc_complete() handles zone write unlock on completion of a REQ_OP_WRITE_ZEROES command but the zone write locking is missing from sd_setup_write_zeroes_cmnd(). This patch fixes this problem by locking the target zone of a REQ_OP_WRITE_ZEROES requ

[PATCH] sd: Write lock zone for REQ_OP_WRITE_ZEROES

2017-05-07 Thread damien . lemoal
From: Damien Le Moal For a zoned block device, sd_zbc_complete() handles zone write unlock on completion of a REQ_OP_WRITE_ZEROES command but the zone write locking is missing from sd_setup_write_zeroes_cmnd(). This patch fixes this problem by locking the target zone of a REQ_OP_WRITE_ZEROES requ

[PATCH] sd: Unlock zone in case of error in sd_setup_write_same_cmnd()

2017-05-07 Thread damien . lemoal
From: Damien Le Moal scsi_io_init() may fail, leaving a zone of a zoned block device locked. Fix this by properly unlocking the write same request target zone if scsi_io_init() fails. Signed-off-by: Damien Le Moal Cc: sta...@vger.kernel.org --- drivers/scsi/sd.c | 4 1 file changed, 4 ins

[PATCH] scsi: qla4xxx: check for null return from iscsi_lookup_endpoint

2017-05-07 Thread Colin King
From: Colin Ian King iscsi_lookup_endpoint can potentially return null and in 9 out of the 10 calls to this function a null return is checked, so I think it is pertinent to perform a null check here too and return -EINVAL as in the other null cases. Detected by CoverityScan, CID#147282 ("Derefer

Re: [PATCH 25/27] block: remove the discard_zeroes_data flag

2017-05-07 Thread h...@lst.de
On Tue, May 02, 2017 at 08:33:15PM -0700, Nicholas A. Bellinger wrote: > The larger target/iblock conversion patch looks like post v4.12 material > at this point, so to avoid breakage wrt to existing LBPRZ behavior, I'll > plan to push the following patch post -rc1. I don't think this is safe. If

[Bug 176951] boot fails unless acpi=off Acer Travelmate X-349

2017-05-07 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=176951 --- Comment #25 from Alberto Tiboni (a.tib...@gmail.com) --- (In reply to Alberto Tiboni from comment #24) > I can confirm issue is still here: update bios at 1.08, nothing changed! > > Tried Ubuntu and Lubuntu distro, 16.04, 16.10 and 17.04, bot

Re: Race to power off harming SATA SSDs

2017-05-07 Thread Pavel Machek
Hi! > > However, *IN PRACTICE*, SATA STANDBY IMMEDIATE command completion > > [often?] only indicates that the device is now switching to the target > > power management state, not that it has reached the target state. Any > > further device status inquires would return that it is in STANDBY mode

Re: [PATCH v3] ibmvscsis: Do not send aborted task response

2017-05-07 Thread Nicholas A. Bellinger
On Fri, 2017-05-05 at 14:17 -0500, Bryant G. Ly wrote: > The driver is sending a response to the actual scsi op that was > aborted by an abort task TM, while LIO is sending a response to > the abort task TM. > > ibmvscsis_tgt does not send the response to the client until > release_cmd time. The r

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

2017-05-07 Thread Raghava Aditya Renukunta
Made sure that ioctl commands return in case of a controller reset. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/commsup.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c

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

2017-05-07 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 --- drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/src.c | 45

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

2017-05-07 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 --- drivers/sc

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

2017-05-07 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 --- drivers/scsi/aacraid/linit.c | 77 +++- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/drivers/scsi/aa

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

2017-05-07 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. Raghava Aditya Renukunta (19): [SCSI] aacraid: Remove GFP_DMA

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

2017-05-07 Thread Raghava Aditya Renukunta
Removed reference to Series-9 HBA and created arc ctrl check function. Signed-off-by: Prasad B Munirathnam Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/aacraid.h | 13 - drivers/scsi/aacraid/comminit.c | 18 -- drivers/scsi/aacraid/commsup.c |

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

2017-05-07 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 --- drivers/scsi/aacraid/linit.c | 90 ++-- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/drive

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

2017-05-07 Thread Raghava Aditya Renukunta
Update the driver version to 50834 Signed-off-by: Raghava Aditya Renukunta --- 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 index 58ccd2a..0995265 100644 --- a/drivers/scsi/aacra

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

2017-05-07 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 --- drivers/scsi/aacraid/aacraid.h | 5 - drivers/scsi/aacraid/src.c | 16 ++-- 2 files changed, 6 insertions(+)

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

2017-05-07 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 --- drivers/scsi/aacraid/commsup.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.

[PATCH 10/19] aacraid: Rework IOP reset

2017-05-07 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 --- drivers/scsi/aacraid/src.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/aacraid/src

[PATCH 13/19] aacraid: Rework aac_src_restart

2017-05-07 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 --- drivers/scsi/aacraid/src.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/scsi

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

2017-05-07 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 --- drivers/scsi/aacraid/commsup.c | 4 ++-- 1 file changed, 2 insert

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

2017-05-07 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 --- drivers/scsi/aacraid/commctrl.c | 13 ++--- 1 file changed, 6 insertions(+),

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

2017-05-07 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 --- drivers/scsi/aacraid/linit.c | 77 +++- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/drivers/scsi/aa

[PATCH 13/19] aacraid: Rework aac_src_restart

2017-05-07 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 --- drivers/scsi/aacraid/src.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/scsi

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

2017-05-07 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 --- drivers/scsi/aacraid/linit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) di

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

2017-05-07 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 --- drivers/sc

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

2017-05-07 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 --- drivers/scsi/aacraid/src.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/s

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

2017-05-07 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 --- drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/src.c | 45

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

2017-05-07 Thread Raghava Aditya Renukunta
Log the status of the controller before issuing a reset. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/linit.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 0a8d303..3dea438 100644 --- a/drivers/s

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

2017-05-07 Thread Raghava Aditya Renukunta
Made sure that ioctl commands return in case of a controller reset. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/commsup.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c

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

2017-05-07 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 --- drivers/scsi/aacrai

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

2017-05-07 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 --- drivers/scsi/aacra

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

2017-05-07 Thread Raghava Aditya Renukunta
Removed reference to Series-9 HBA and created arc ctrl check function. Signed-off-by: Prasad B Munirathnam Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/aacraid.h | 13 - drivers/scsi/aacraid/comminit.c | 18 -- drivers/scsi/aacraid/commsup.c |

[PATCH 10/19] aacraid: Rework IOP reset

2017-05-07 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 --- drivers/scsi/aacraid/src.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/aacraid/src

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

2017-05-07 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 --- drivers/scsi/aacra

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

2017-05-07 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 --- drivers/scsi/aacraid/src.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aacraid/s

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

2017-05-07 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 --- drivers/scsi/aacraid/commsup.c | 4 ++-- 1 file changed, 2 insert

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

2017-05-07 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 --- drivers/scsi/aacrai

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

2017-05-07 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 --- drivers/scsi/aacraid/linit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) di

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

2017-05-07 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 --- drivers/scsi/aacraid/aacraid.h | 5 - drivers/scsi/aacraid/src.c | 16 ++-- 2 files changed, 6 insertions(+)

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

2017-05-07 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. Raghava Aditya Renukunta (19): [SCSI] aacraid: Remove GFP_DMA

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

2017-05-07 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 --- drivers/scsi/aacraid/linit.c | 90 ++-- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/drive

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

2017-05-07 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 --- drivers/scsi/aacra

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

2017-05-07 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 --- drivers/scsi/aacraid/commctrl.c | 13 ++--- 1 file changed, 6 insertions(+),

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

2017-05-07 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 --- drivers/scsi/aacra

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

2017-05-07 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 --- drivers/scsi/aacraid/commsup.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.

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

2017-05-07 Thread Raghava Aditya Renukunta
Log the status of the controller before issuing a reset. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/linit.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 0a8d303..3dea438 100644 --- a/drivers/s