[PATCH v2 9/9] mtip32xx: Cleanup queued requests after surprise removal

2016-02-24 Thread Asai Thambi SP
Fail all pending requests after surprise removal of a drive. Signed-off-by: Vignesh Gunasekaran Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 78 1 files changed, 60 insertions(+), 18 deletions(-) diff

[PATCH v2 8/9] mtip32xx: Implement timeout handler

2016-02-24 Thread Asai Thambi SP
Added timeout handler. Replaced blk_mq_end_request() with blk_mq_complete_request() to avoid double completion of a request. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 95 +++

[PATCH v2 7/9] mtip32xx: Handle FTL rebuild failure state during device initialization

2016-02-24 Thread Asai Thambi SP
Allow device initialization to finish gracefully when it is in FTL rebuild failure state. Also, recover device out of this state after successfully secure erasing it. Signed-off-by: Selvan Mani Signed-off-by: Vignesh Gunasekaran Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32

[PATCH v2 6/9] mtip32xx: Handle safe removal during IO

2016-02-24 Thread Asai Thambi SP
Flush inflight IOs using fsync_bdev() when the device is safely removed. Also, block further IOs in device open function. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 34 ++

[PATCH v2 4/9] mtip32xx: Avoid issuing standby immediate cmd during FTL rebuild

2016-02-24 Thread Asai Thambi SP
Prevent standby immediate command from being issued in remove, suspend and shutdown paths, while drive is in FTL rebuild process. Signed-off-by: Selvan Mani Signed-off-by: Vignesh Gunasekaran Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 20 1 f

[PATCH v2 5/9] mtip32xx: Fix for rmmod crash when drive is in FTL rebuild

2016-02-24 Thread Asai Thambi SP
When FTL rebuild is in progress, alloc_disk() initializes the disk but device node will be created by add_disk() only after successful completion of FTL rebuild. So, skip deletion of device node in removal path when FTL rebuild is in progress. Signed-off-by: Selvan Mani Signed-off-by: Asai Thamb

[PATCH v2 3/9] mtip32xx: Print exact time when an internal command is interrupted

2016-02-24 Thread Asai Thambi SP
Print exact time when an internal command is interrupted. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/block/mtip32x

[PATCH v2 2/9] mtip32xx: Remove unwanted code from taskfile error handler

2016-02-24 Thread Asai Thambi SP
Remove setting and clearing MTIP_PF_EH_ACTIVE_BIT flag in mtip_handle_tfe() as they are redundant. Also avoid waking up service thread from mtip_handle_tfe() because it is already woken up in case of taskfile error. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by:

[PATCH v2 0/9] various fixes

2016-02-24 Thread Asai Thambi SP
Hi Jens, This patchset includes various fixes for mtip32xx driver, tested on kernel 4.5-rc3. Selvan Mani (9): mtip32xx: Fix broken service thread handling mtip32xx: Remove unwanted code from taskfile error handler mtip32xx: Print exact time when an internal command is interrupted mtip32xx

[PATCH v2 1/9] mtip32xx: Fix broken service thread handling

2016-02-24 Thread Asai Thambi SP
Service thread does not detect the need for taskfile error hanlding. Fixed the flag condition to process taskfile error. Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c |6 +++--- drivers/block/mtip32xx/mtip32xx.h |5 + 2 files change

Re: [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted

2016-02-23 Thread Asai Thambi SP
On 2/23/2016 6:14 PM, Jens Axboe wrote: > On 02/23/2016 07:08 PM, Asai Thambi SP wrote: >> On 2/23/2016 8:11 AM, Jens Axboe wrote: >>> On Mon, Feb 22 2016, Asai Thambi SP wrote: >>>> >>>> To avoid erasing a device with a mounted filesystem, try to get

Re: [PATCH 00/10] mtip32xx: various fixes

2016-02-23 Thread Asai Thambi SP
On 2/23/2016 8:14 AM, Jens Axboe wrote: > On Mon, Feb 22 2016, Asai Thambi SP wrote: >> Hi Jens, >> >> This patchset includes various fixes for mtip32xx driver, tested >> on kernel 4.5-rc3 >> >> Selvan Mani (10): >> mtip32xx: Abort secure erase wh

Re: [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted

2016-02-23 Thread Asai Thambi SP
On 2/23/2016 8:11 AM, Jens Axboe wrote: > On Mon, Feb 22 2016, Asai Thambi SP wrote: >> >> To avoid erasing a device with a mounted filesystem, try to get exclusive >> access to the blkdev object corresponding to the device. > > I don't think this needs to be i

[PATCH 10/10] mtip32xx: Cleanup queued requests after surprise removal

2016-02-22 Thread Asai Thambi SP
Fail all pending requests after surprise removal of a drive. misc: Proper handling of resource free in probe failure path. Signed-off-by: Vignesh Gunasekaran Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 78 --

[PATCH 08/10] mtip32xx: Handle FTL rebuild failure state during device initialization

2016-02-22 Thread Asai Thambi SP
Allow device initialization to finish gracefully when it is in FTL rebuild failure state. Also, recover device out of this state after successfully secure erasing it. Signed-off-by: Selvan Mani Signed-off-by: Vignesh Gunasekaran Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip3

[PATCH 09/10] mtip32xx: Add timeout handler

2016-02-22 Thread Asai Thambi SP
Added timeout handler. Implementing timeout handler requires replacing blk_mq_end_request() with blk_mq_complete_request() to avoid double completion of a request. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip

[PATCH 06/10] mtip32xx: Fix for rmmod crash when drive is in FTL rebuild

2016-02-22 Thread Asai Thambi SP
When FTL rebuild is in progress, alloc_disk() initializes the disk but device node will be created by add_disk() only after successful completion of FTL rebuild. So, skip deletion of device node in removal path when FTL rebuild is in progress. Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi

[PATCH 07/10] mtip32xx: Handle safe removal during IO

2016-02-22 Thread Asai Thambi SP
Flush inflight IOs using fsync_bdev() when the device is safely removed. Also, block further IOs in device open function. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 34 ++

[PATCH 05/10] mtip32xx: Avoid issuing standby immediate cmd during FTL rebuild

2016-02-22 Thread Asai Thambi SP
Prevent standby immediate command from being issued in remove, suspend and shutdown paths, while drive is performing FTL rebuild process. Signed-off-by: Selvan Mani Signed-off-by: Vignesh Gunasekaran Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 20 -

[PATCH 04/10] mtip32xx: Print exact time when an internal command is interrupted

2016-02-22 Thread Asai Thambi SP
Print exact time when an internal command is interrupted. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/block/mtip32x

[PATCH 03/10] mtip32xx: Remove unwanted code from taskfile error handler

2016-02-22 Thread Asai Thambi SP
Remove setting and clearing MTIP_PF_EH_ACTIVE_BIT flag in mtip_handle_tfe() as they are redundant. Also avoid waking up service thread from mtip_handle_tfe() because it is already woken up in case of taskfile error. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by:

[PATCH 02/10] mtip32xx: Fix broken service thread handling

2016-02-22 Thread Asai Thambi SP
Service thread does not detect the need for taskfile error handling. Fixed the flag condition to process taskfile error. Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c |6 +++--- drivers/block/mtip32xx/mtip32xx.h |5 + 2 files change

[PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted

2016-02-22 Thread Asai Thambi SP
To avoid erasing a device with a mounted filesystem, try to get exclusive access to the blkdev object corresponding to the device. Signed-off-by: Selvan Mani Signed-off-by: Rajesh Kumar Sambandam Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 113 +

[PATCH 00/10] mtip32xx: various fixes

2016-02-22 Thread Asai Thambi SP
Hi Jens, This patchset includes various fixes for mtip32xx driver, tested on kernel 4.5-rc3 Selvan Mani (10): mtip32xx: Abort secure erase when drive is mounted mtip32xx: Fix broken service thread handling mtip32xx: Remove unwanted code from taskfile error handler mtip32xx: Print exact ti

[PATCH] mtip32xx: Fix accessing freed memory

2015-06-23 Thread Asai Thambi SP
>From 4e5d695dca047012bc537c991fba0f85d112c614 Mon Sep 17 00:00:00 2001 From: Selvan Mani Date: Mon, 22 Jun 2015 02:18:48 -0700 Subject: [PATCH] mtip32xx: Fix accessing freed memory In mtip_pci_remove(), driver data 'dd' is accessed after freeing it. This is a residue of SRSI code cleanup in the

Re: [PATCH 0/9] mtip32xx: various fixes

2015-06-16 Thread Asai Thambi SP
On 6/16/2015 7:23 AM, Jens Axboe wrote: > On 05/12/2015 06:35 PM, Asai Thambi SP wrote: >> On 5/12/2015 8:39 AM, Jens Axboe wrote: >>> On 05/11/2015 06:47 PM, Asai Thambi SP wrote: >>>> Hi Jens, >>>> >>>> This patchset includes few changes t

Re: [PATCH 8/9] mtip32xx: abort secure erase operation if the device is mounted

2015-05-12 Thread Asai Thambi SP
On 5/12/2015 8:46 AM, Jens Axboe wrote: > On 05/11/2015 06:56 PM, Asai Thambi SP wrote: >> Signed-off-by: Sam Bradshaw >> Signed-off-by: Asai Thambi S P >> --- >> drivers/block/mtip32xx/mtip32xx.c | 12 >> 1 files changed, 12 insertions(+),

Re: [PATCH 0/9] mtip32xx: various fixes

2015-05-12 Thread Asai Thambi SP
On 5/12/2015 8:39 AM, Jens Axboe wrote: > On 05/11/2015 06:47 PM, Asai Thambi SP wrote: >> Hi Jens, >> >> This patchset includes few changes to align with recent kernel changes, few >> fixes and cleanup >> >> Asai Thambi S P (9): >>mtip32xx:

[PATCH 9/9] mtip32xx: increase wait time for hba reset

2015-05-11 Thread Asai Thambi SP
In LUN failure conditions, device takes longer time to complete the hba reset. Increased wait time from 1 second to 10 seconds. Signed-off-by: Sam Bradshaw Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff

[PATCH 8/9] mtip32xx: abort secure erase operation if the device is mounted

2015-05-11 Thread Asai Thambi SP
Signed-off-by: Sam Bradshaw Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 0b223e3..f8c12e1 100644 --- a/drivers

[PATCH 7/9] mtip32xx: fix minor number

2015-05-11 Thread Asai Thambi SP
When a device is surprise removed and inserted, it is assigned a new minor number because driver use multiples of 'instance' number. Modified to use the multiples of 'index' for minor number. Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c |3 ++- 1 files changed, 2 inse

[PATCH 6/9] mtip32xx: remove unnecessary sleep in mtip_ftl_rebuild_poll()

2015-05-11 Thread Asai Thambi SP
Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 0c429b5..3781250 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/

[PATCH 5/9] mtip32xx: fix crash on surprise removal of the drive

2015-05-11 Thread Asai Thambi SP
pci and block layers have changed a lot compared to when SRSI support was added. Given the current state of pci and block layers, this driver do not have to do any specific handling. Signed-off-by: Asai Thambi S P Signed-off-by: Selvan Mani --- drivers/block/mtip32xx/mtip32xx.c | 143 +

[PATCH 4/9] mtip32xx: Abort I/O during secure erase operation

2015-05-11 Thread Asai Thambi SP
Currently I/Os are being queued when secure erase operation starts, and issue them after the operation completes. As all data will be gone when the operation completes, any queued I/O doesn't make sense. Hence, abort I/O (return -ENODATA) as soon as the driver receives. Signed-off-by: Selvan Mani

[PATCH 3/9] mtip32xx: fix incorrectly setting MTIP_DDF_SEC_LOCK_BIT

2015-05-11 Thread Asai Thambi SP
Fix incorrectly setting MTIP_DDF_SEC_LOCK_BIT Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index

[PATCH 2/9] mtip32xx: remove unused variable 'port->allocated'

2015-05-11 Thread Asai Thambi SP
Remove unused variable 'port->allocated' Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 15 +-- drivers/block/mtip32xx/mtip32xx.h |8 +--- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/block/mtip3

[PATCH 1/9] mtip32xx: fix rmmod issue

2015-05-11 Thread Asai Thambi SP
put_disk() need to be called after del_gendisk() to free the disk object structure. Signed-off-by: Selvan Mani Signed-off-by: Asai Thambi S P --- drivers/block/mtip32xx/mtip32xx.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32

[PATCH 0/9] mtip32xx: various fixes

2015-05-11 Thread Asai Thambi SP
Hi Jens, This patchset includes few changes to align with recent kernel changes, few fixes and cleanup Asai Thambi S P (9): mtip32xx: fix rmmod issue mtip32xx: remove unused variable 'port->allocated' mtip32xx: fix incorrectly setting MTIP_DDF_SEC_LOCK_BIT mtip32xx: Abort I/O during secur