[PATCH v2 06/10] scsi: ufs: use devres functions for ufshcd

2013-06-26 Thread Seungwon Jeon
This patch replaces normal calls for resource allocation with devm_*() derivative functions. It makes resource freeing simpler. Signed-off-by: Seungwon Jeon Signed-off-by: Santosh Y --- Change in v2: [NOTE: There are no conflicts with the following series(07~10)] - Remove

RE: [PATCH V3 1/2] scsi: ufs: Add support for sending NOP OUT UPIU

2013-07-10 Thread Seungwon Jeon
); > - > - /* > - * get the result based on SCSI status response > - * to notify the SCSI midlayer of the command status > - */ > - scsi_status = result & MASK_SCSI_STATUS; > - result = ufshcd_scsi_c

RE: [PATCH V3 2/2] scsi: ufs: Set fDeviceInit flag to initiate device initialization

2013-07-10 Thread Seungwon Jeon
function is for initialization completion. How about ufshcd_complete_dev_init for function name? > +{ > + int i, retries, err = 0; > + bool flag_res = 0; > + > + for (retries = QUERY_REQ_RETRIES; retries > 0; retries--) { > + /* Set the fDeviceIntit

RE: [PATCH V3 1/2] scsi: ufs: Add support for host assisted background operations

2013-07-10 Thread Seungwon Jeon
fshcd_query_attr(struct ufs_hba *hba, enum query_opcode opcode, > + enum attr_idn idn, u8 index, u8 selector, u32 *attr_val) > +{ > + struct ufs_query_req *query; > + struct ufs_query_res *response; > + int err = -ENOMEM; > + > + if (!attr

RE: [PATCH V3 2/2] scsi: ufs: Add runtime PM support for UFS host controller driver

2013-07-10 Thread Seungwon Jeon
runtime_put_sync(hba->dev); > } > > /** > @@ -2562,6 +2566,7 @@ static void ufshcd_async_scan(void *data, > async_cookie_t cookie) > hba->auto_bkops_enabled = false; In the end of 'ufshcd_init', pm_runtime_get_sync is called, hence auto_bkops_enabled may h

RE: [PATCH V3 1/2] scsi: ufs: Add support for host assisted background operations

2013-07-17 Thread Seungwon Jeon
On Thu, July 11, 2013, Sujit Reddy Thumma wrote: > On 7/10/2013 7:01 PM, Seungwon Jeon wrote: > > I'm not sure that BKOPS with runtime-pm associates. > > Do you think it's helpful for power management? > > How about hibernation scheme for runtime-pm? > >

RE: [PATCH V3 1/2] scsi: ufs: Add support for sending NOP OUT UPIU

2013-07-17 Thread Seungwon Jeon
On Thu, July 11, 2013, Sujit Reddy Thumma wrote: > On 7/10/2013 6:58 PM, Seungwon Jeon wrote: > > On Tue, July 09, 2013, Sujit Reddy Thumma wrote: > >> As part of device initialization sequence, sending NOP OUT UPIU and > >> waiting for NOP IN UPIU response is mandat

RE: [PATCH V3 2/2] scsi: ufs: Set fDeviceInit flag to initiate device initialization

2013-07-17 Thread Seungwon Jeon
> >> + /* Send query request */ > >> + err = ufshcd_send_query_request(hba, query, NULL, response); > >> + > >> + if (err) { > >> + dev_err(hba->dev, > >> + "%s: Sending flag query for idn %d failed, err = %d\

RE: [PATCH V3 1/2] scsi: ufs: Add support for sending NOP OUT UPIU

2013-07-19 Thread Seungwon Jeon
REG_UTP_TRANSFER_REQ_DOOR_BELL, > >>>> +mask, 0, 1000, 1000); > >>> 4th argument should be (~mask) instead of '0', right? > >> > >> True, but not really for this implementation. It breaks the check in > >>

RE: [PATCH V3 2/2] scsi: ufs: Set fDeviceInit flag to initiate device initialization

2013-07-19 Thread Seungwon Jeon
tine. > > Could you explain the reason dynamic allocation is needed? > I don't like the idea of allocating it on stack, I suggest to statically > allocate it on the query struct. What do you think? Yes. > > > >> >> + > >> >> + switch (opcode

RE: [PATCH V3 1/2] scsi: ufs: Add support for host assisted background operations

2013-07-19 Thread Seungwon Jeon
are raised only when the device is in critical need for > bkops. Also the spec. recommends, host should ensure that the device > doesn't go into such states. > > With your suggestion, when we disable bkops, the exception is raised and > we enable bkops after which there is

RE: [PATCH V3 1/4] scsi: ufs: Fix broken task management command implementation

2013-07-19 Thread Seungwon Jeon
__func__, tm_function); > + if (ufshcd_clear_tm_cmd(hba, free_slot)) > + dev_WARN(hba->dev, "%s: unable clear tm cmd (slot %d) > after timeout\n", > + __func__, free_slot); > + err = -ET

RE: [PATCH V3 3/4] scsi: ufs: Fix device and host reset methods

2013-07-19 Thread Seungwon Jeon
ED; > + hba->ufshcd_state = UFSHCD_STATE_ERROR; > + } > + spin_unlock_irqrestore(hba->host->host_lock, flags); > + > + return err; > +} > + > +/** > + * ufshcd_eh_host_reset_handler - host reset handler registered to scsi layer > + * @

RE: [PATCH V3 2/4] scsi: ufs: Fix hardware race conditions while aborting a command

2013-07-19 Thread Seungwon Jeon
On Tue, July 09, 2013, Sujit Reddy Thumma wrote: > There is a possible race condition in the hardware when the abort > command is issued to terminate the ongoing SCSI command as described > below: > > - A bit in the door-bell register is set in the controller for a > new SCSI command. > - In som

RE: [PATCH V3 4/4] scsi: ufs: Improve UFS fatal error handling

2013-07-19 Thread Seungwon Jeon
t fatal UIC error flags. > + * @hba: per-adapter instance > */ > -static void ufshcd_err_handler(struct ufs_hba *hba) > +static void ufshcd_update_uic_error(struct ufs_hba *hba) > { > u32 reg; > > + /* PA_INIT_ERROR is fatal and needs UIC reset */ &

RE: [PATCH V3 1/4] scsi: ufs: Fix broken task management command implementation

2013-07-23 Thread Seungwon Jeon
On Sat, July 20, 2013, Sujit Reddy Thumma wrote: > On 7/19/2013 7:26 PM, Seungwon Jeon wrote: > > On Tue, July 09, 2013 Sujit Reddy Thumma wrote: > >> Currently, sending Task Management (TM) command to the card might > >> be broken in some scenarios as listed below: >

RE: [PATCH V3 3/4] scsi: ufs: Fix device and host reset methods

2013-07-23 Thread Seungwon Jeon
On Sat, July 20, 2013, Sujit Reddy Thumma wrote: > On 7/19/2013 7:27 PM, Seungwon Jeon wrote: > > On Tue, July 09, 2013, Sujit Reddy Thumma wrote: > >> As of now SCSI initiated error handling is broken because, > >> the reset APIs don't try to bring back the devic

RE: [PATCH V3 4/4] scsi: ufs: Improve UFS fatal error handling

2013-07-23 Thread Seungwon Jeon
On Sat, July 20, 2013, Sujit Reddy Thumma wrote: > On 7/19/2013 7:28 PM, Seungwon Jeon wrote: > > On Tue, July 09, 2013, Sujit Reddy Thumma wrote: > >> Error handling in UFS driver is broken and resets the host controller > >> for fatal errors without re-initializati

RE: [PATCH V3 3/4] scsi: ufs: Fix device and host reset methods

2013-07-24 Thread Seungwon Jeon
On Wed, July 24, 2013, Sujit Reddy Thumma wrote: > On 7/23/2013 1:57 PM, Seungwon Jeon wrote: > > On Sat, July 20, 2013, Sujit Reddy Thumma wrote: > >> On 7/19/2013 7:27 PM, Seungwon Jeon wrote: > >>> On Tue, July 09, 2013, Sujit Reddy Thumma wrote: > >>>

RE: [PATCH V3 4/4] scsi: ufs: Improve UFS fatal error handling

2013-07-24 Thread Seungwon Jeon
On Wed, July 24, 2013, Sujit Reddy Thumma wrote: > On 7/23/2013 2:04 PM, Seungwon Jeon wrote: > > On Sat, July 20, 2013, Sujit Reddy Thumma wrote: > >> On 7/19/2013 7:28 PM, Seungwon Jeon wrote: > >>> On Tue, July 09, 2013, Sujit Reddy Thumma wrote: > >>&g

[PATCH 0/7] scsi: ufs: some fixes and updates

2013-07-26 Thread Seungwon Jeon
This path series contain driver's fixes and updates. Seungwon Jeon (7): scsi: ufs: amend the ocs handling with fatal error scsi: ufs: find out sense data over scsi status values scsi: ufs: fix the setting interrupt aggregation counter scsi: ufs: add dme configur

[PATCH 1/7] scsi: ufs: amend the ocs handling with fatal error

2013-07-26 Thread Seungwon Jeon
#x27;CHECK CONDITION' is stored in status field of UPIU where OCS is 'FATAL ERROR'. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index b743

[PATCH 2/7] scsi: ufs: find out sense data over scsi status values

2013-07-26 Thread Seungwon Jeon
Except for 'GOOD' and 'CHECK CONDITION', other status value in Response UPIU may or may contain sense data. If a non-zero value is in the Data Segment Length field, it means that UPIU has Sense Data in the Data Segment area. Signed-off-by: Seungwon Jeon --- drivers/scsi

[PATCH 3/7] scsi: ufs: fix the setting interrupt aggregation counter

2013-07-26 Thread Seungwon Jeon
value. For that, existing 'ufshcd_config_int_aggr' is split into two part [reset, configure]. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 53 +--- drivers/scsi/ufs/ufshci.h |4 +- 2 files changed, 27 insertions(+), 30 deleti

[PATCH 4/7] scsi: ufs: add dme configuration primitives

2013-07-26 Thread Seungwon Jeon
Implements to support GET and SET operations of the DME. These operations are used to configure the behavior of the UNIPRO. Along with basic operation, {Peer/AttrSetType} can be mixed. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 88

[PATCH 5/7] scsi: ufs: add unipro attribute IDs

2013-07-26 Thread Seungwon Jeon
'drivers/scsi/ufs/unipro.h' is added. Attributes in the layers of the UNIPRO stack can be read and written via the DME. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/unipro.h | 130 + 1 files changed, 130 insertions(+), 0 deletions(

[PATCH 6/7] scsi: ufs: add operation for the uic power mode change

2013-07-26 Thread Seungwon Jeon
Setting PA_PWRMode using DME_SET triggers the power mode change. And then the result will be given by the HCS.UPMCRS. This operation should be done atomically. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 80 ++-- drivers/scsi/ufs

[PATCH 7/7] scsi: ufs: configure the attribute for power mode

2013-07-26 Thread Seungwon Jeon
UIC attributes can be set with using DME_SET command for power mode change. For configuration the link capability attributes are used, which is updated after successful link startup. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 74

RE: [PATCH 1/7] scsi: ufs: amend the ocs handling with fatal error

2013-07-29 Thread Seungwon Jeon
On Mon, July 29, 2013, Subhash Jadavani wrote: > On 7/26/2013 7:15 PM, Seungwon Jeon wrote: > > Fatal error in OCS(overall command status) field indicates > > error conditions which is not covered by UFSHCI. > > It means that host cannot define the result of command status &

RE: [PATCH 3/7] scsi: ufs: fix the setting interrupt aggregation counter

2013-07-30 Thread Seungwon Jeon
On Mon, July 29, 2013, Subhash Jadavani wrote: > On 7/26/2013 7:16 PM, Seungwon Jeon wrote: > > LACTH(Interrupt aggregation counter threshold) value is allowed > > I guess you mean "IACTH" not "LACTH". Other than this, change looks good > to me. > Review

RE: [PATCH 2/7] scsi: ufs: find out sense data over scsi status values

2013-07-30 Thread Seungwon Jeon
On Mon, July 29, 2013, Subhash Jadavani wrote: > On 7/26/2013 7:16 PM, Seungwon Jeon wrote: > > Except for 'GOOD' and 'CHECK CONDITION', other status value > This is what UFS device spec says: "A GOOD status indicates successful > SCSI completion and there

RE: [PATCH 4/7] scsi: ufs: add dme configuration primitives

2013-07-30 Thread Seungwon Jeon
On Mon, July 29, 2013, Subhash Jadavani wrote: > On 7/26/2013 7:17 PM, Seungwon Jeon wrote: > > Implements to support GET and SET operations of the DME. > > These operations are used to configure the behavior of > > the UNIPRO. Along with basic operation, {Peer/AttrSetT

RE: [PATCH 2/7] scsi: ufs: find out sense data over scsi status values

2013-07-30 Thread Seungwon Jeon
On Mon, July 29, 2013, Sujit Reddy Thumma wrote: > On 7/26/2013 7:16 PM, Seungwon Jeon wrote: > > Except for 'GOOD' and 'CHECK CONDITION', other status value > > in Response UPIU may or may contain sense data. If a non-zero > > value is in the Data Segment

RE: [PATCH 6/7] scsi: ufs: add operation for the uic power mode change

2013-07-30 Thread Seungwon Jeon
On Mon, July 29, 2013, Subhash Jadavani wrote: > Change looks good except few minor comments. Thank you for comments. > > On 7/26/2013 7:18 PM, Seungwon Jeon wrote: > > Setting PA_PWRMode using DME_SET triggers the power mode > > change. And then the result will be gi

RE: [PATCH 1/7] scsi: ufs: amend the ocs handling with fatal error

2013-07-30 Thread Seungwon Jeon
On Mon, July 29, 2013, Sujit Reddy Thumma wrote: > On 7/29/2013 11:47 AM, Subhash Jadavani wrote: > > On 7/26/2013 7:15 PM, Seungwon Jeon wrote: > >> Fatal error in OCS(overall command status) field indicates > >> error conditions which is not covered by UFSHCI. >

RE: [PATCH 2/7] scsi: ufs: find out sense data over scsi status values

2013-07-30 Thread Seungwon Jeon
On Tue, July 30, 2013, Santosh Y wrote: > On Fri, Jul 26, 2013 at 7:16 PM, Seungwon Jeon wrote: > > Except for 'GOOD' and 'CHECK CONDITION', other status value > > in Response UPIU may or may contain sense data. If a non-zero > > value is in the Data

RE: [PATCH 2/7] scsi: ufs: find out sense data over scsi status values

2013-08-06 Thread Seungwon Jeon
Hi Elliott, Thank you for information. It might be considered, if UFS has the extension someday. Thanks, Seungwon Jeon On Wed, July 31, 2013, Elliott, Robert wrote: > I don't know how well UFS keeps up with SCSI architecture, but SCSI > has expanded from the old 18-byte fixed format

RE: [PATCH 7/7] scsi: ufs: configure the attribute for power mode

2013-08-06 Thread Seungwon Jeon
On Wednesday, July 31, 2013, Subhash Jadavani wrote: > Change looks good (except one minor question). > > Reviewed-by: Subhash Jadavani > > On 7/26/2013 7:19 PM, Seungwon Jeon wrote: > > UIC attributes can be set with using DME_SET command for > > power mode change.

RE: [PATCH 1/7] scsi: ufs: amend the ocs handling with fatal error

2013-08-13 Thread Seungwon Jeon
On Mon, August 12, 2013, Subhash Jadavani wrote: > On 7/30/2013 6:32 PM, Seungwon Jeon wrote: > > On Mon, July 29, 2013, Sujit Reddy Thumma wrote: > >> On 7/29/2013 11:47 AM, Subhash Jadavani wrote: > >>> On 7/26/2013 7:15 PM, Seungwon Jeon wrote: > >>>&

[PATCH v2 0/6] scsi: ufs: some fixes and updates

2013-08-23 Thread Seungwon Jeon
++ 5 files changed, 513 insertions(+), 51 deletions(-) Thanks, Seungwon Jeon -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v2 1/6] scsi: ufs: find out sense data over scsi status values

2013-08-23 Thread Seungwon Jeon
in the Data Segment area. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/ufs.h|1 + drivers/scsi/ufs/ufshcd.c | 37 ++--- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/ufs/ufs.h b/dri

[PATCH v2 2/6] scsi: ufs: fix the setting interrupt aggregation counter

2013-08-23 Thread Seungwon Jeon
value. For that, existing 'ufshcd_config_int_aggr' is split into two part [reset, configure]. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 53 +--- drivers/scsi/ufs/ufshci.h |4 +- 2 files changed,

[PATCH v2 4/6] scsi: ufs: add unipro attribute IDs

2013-08-23 Thread Seungwon Jeon
'drivers/scsi/ufs/unipro.h' is added. Attributes in the layers of the UNIPRO stack can be read and written via the DME. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/unipro.h | 130 + 1 files changed, 130

[PATCH v2 3/6] scsi: ufs: add dme configuration primitives

2013-08-23 Thread Seungwon Jeon
Implements to support GET and SET operations of the DME. These operations are used to configure the behavior of the UNIPRO. Along with basic operation, {Peer/AttrSetType} can be mixed. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 88

[PATCH v2 5/6] scsi: ufs: add operation for the uic power mode change

2013-08-23 Thread Seungwon Jeon
Setting PA_PWRMode using DME_SET triggers the power mode change. And then the result will be given by the HCS.UPMCRS. This operation should be done atomically. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 84 ++-- drivers/scsi/ufs

[PATCH v2 6/6] scsi: ufs: configure the attribute for power mode

2013-08-23 Thread Seungwon Jeon
UIC attributes can be set with using DME_SET command for power mode change. For configuration the link capability attributes are used, which is updated after successful link startup. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 74

[PATCH 1/2] scsi: fix warning with unused variable

2013-08-26 Thread Seungwon Jeon
drivers/scsi/scsi_error.c:246:16: warning: unused variable 'flags' [-Wunused-variable] Signed-off-by: Seungwon Jeon --- drivers/scsi/scsi_error.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c ind

[PATCH 2/2] scsi: replace the deprecated flush_work_sync

2013-08-26 Thread Seungwon Jeon
flush_work_sync is replaced by flush_work with commit 4382973(workqueue: deprecate flush[_delayed]_work_sync()). Signed-off-by: Seungwon Jeon --- drivers/scsi/arcmsr/arcmsr_hba.c |4 ++-- drivers/scsi/ufs/ufshcd.c|2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v3 4/6] scsi: ufs: add unipro attribute IDs

2013-08-26 Thread Seungwon Jeon
'drivers/scsi/ufs/unipro.h' is added. Attributes in the layers of the UNIPRO stack can be read and written via the DME. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/unipro.h | 130 + 1 files changed, 130

[PATCH v3 6/6] scsi: ufs: configure the attribute for power mode

2013-08-26 Thread Seungwon Jeon
UIC attributes can be set with using DME_SET command for power mode change. For configuration the link capability attributes are used, which is updated after successful link startup. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 66

[PATCH v3 0/6] scsi: ufs: some fixes and updates

2013-08-26 Thread Seungwon Jeon
ments from Subhash, Sujit and Santosh. Seungwon Jeon (6): scsi: ufs: find out sense data over scsi status values scsi: ufs: fix the setting interrupt aggregation counter scsi: ufs: add dme configuration primitives scsi: ufs: add unipro attribute IDs scsi: ufs: add oper

[PATCH v3 2/6] scsi: ufs: fix the setting interrupt aggregation counter

2013-08-26 Thread Seungwon Jeon
value. For that, existing 'ufshcd_config_int_aggr' is split into two part [reset, configure]. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 53 +--- drivers/scsi/ufs/ufshci.h |4 +- 2 files changed,

[PATCH v3 3/6] scsi: ufs: add dme configuration primitives

2013-08-26 Thread Seungwon Jeon
Implements to support GET and SET operations of the DME. These operations are used to configure the behavior of the UNIPRO. Along with basic operation, {Peer/AttrSetType} can be mixed. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/ufshcd.c | 88

[PATCH v3 1/6] scsi: ufs: find out sense data over scsi status values

2013-08-26 Thread Seungwon Jeon
in the Data Segment area. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/ufs.h|1 + drivers/scsi/ufs/ufshcd.c | 37 ++--- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/ufs/ufs.h b/dri

[PATCH v3 5/6] scsi: ufs: add operation for the uic power mode change

2013-08-26 Thread Seungwon Jeon
Setting PA_PWRMode using DME_SET triggers the power mode change. And then the result will be given by the HCS.UPMCRS. This operation should be done atomically. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 84 ++-- drivers/scsi/ufs

RE: [PATCH v3 5/6] scsi: ufs: add operation for the uic power mode change

2013-08-27 Thread Seungwon Jeon
On Tue, August 27, 2013, Subhash Jadavani wrote: > On 8/26/2013 8:10 PM, Seungwon Jeon wrote: > > Setting PA_PWRMode using DME_SET triggers the power mode > > change. And then the result will be given by the HCS.UPMCRS. > > This operation should be done atomically. > >

RE: [PATCH v3 5/6] scsi: ufs: add operation for the uic power mode change

2013-08-27 Thread Seungwon Jeon
On Tue, August 27, 2013, Subhash Jadavani wrote: > On 8/27/2013 4:58 PM, Seungwon Jeon wrote: > > On Tue, August 27, 2013, Subhash Jadavani wrote: > >> On 8/26/2013 8:10 PM, Seungwon Jeon wrote: > >>> Setting PA_PWRMode using DME_SET triggers the power mode > >

[PATCH] scsi: ufs: replace the deprecated flush_work_sync

2013-09-03 Thread Seungwon Jeon
flush_work_sync is replaced by flush_work with commit 4382973(workqueue: deprecate flush[_delayed]_work_sync()). Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs

RE: [PATCH V2 1/3] scsi: ufs: Allow vendor specific initialization

2013-09-09 Thread Seungwon Jeon
d before and after Link startup is carried out > + * to allow variant specific Uni-Pro initialization. > + */ > +struct ufs_hba_variant_ops { > + const char *name; > + int (*init)(struct ufs_hba *); > + void(*exit)(struct ufs_hba *); > +

[PATCH] scsi: ufs: export the helper functions for vender probe/remove

2013-09-09 Thread Seungwon Jeon
This change provides the common routines for driver's probe/remove. Especially host driver including specific operations can invoke the initial routine at the own probing phase and pass its operations to ufshcd's common part. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshc

[PATCH 1/5] scsi: ufs: move the ufshcd_hba_stop to ufshcd.c

2013-04-24 Thread Seungwon Jeon
Move the ufshcd_hba_stop from header file. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c |9 + drivers/scsi/ufs/ufshcd.h |9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 60fd40c

[PATCH 3/5] scsi: ufs: amend interrupt configuration

2013-04-24 Thread Seungwon Jeon
It makes interrupt setting more flexible especially for disabling. And wrong bit mask is fixed for ver 1.0. [17:16] is added for mask. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 86 - drivers/scsi/ufs/ufshcd.h |4 +- drivers

[PATCH 2/5] scsi: ufs: wrap the i/o access operations

2013-04-24 Thread Seungwon Jeon
Simplify operations with hiding mmio_base. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 106 +++-- drivers/scsi/ufs/ufshcd.h |5 ++ 2 files changed, 49 insertions(+), 62 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers

[PATCH 4/5] scsi: ufs: rework link start-up process

2013-04-24 Thread Seungwon Jeon
Link start-up requires long time with multiphase handshakes between UFS host and device. This affects driver's probe time. This patch let link start-up run asynchronously. And completion time of uic command is defined to avoid a permanent wait. Signed-off-by: Seungwon Jeon --- drivers/scs

[PATCH 5/5] scsi: ufs: add dme operations

2013-04-24 Thread Seungwon Jeon
Add uic command operations including DME_XXX series. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufs-attrs.h | 129 drivers/scsi/ufs/ufshcd.c| 220 +- drivers/scsi/ufs/ufshcd.h| 55 +++ drivers/scsi/ufs

RE: [PATCH 2/5] scsi: ufs: wrap the i/o access operations

2013-04-25 Thread Seungwon Jeon
Hi, On Thursday, April 25, 2013, Sujit Reddy Thumma wrote: > On 4/24/2013 9:36 PM, Seungwon Jeon wrote: > > Simplify operations with hiding mmio_base. > > > > Signed-off-by: Seungwon Jeon > > --- > >

RE: [PATCH 4/5] scsi: ufs: rework link start-up process

2013-04-25 Thread Seungwon Jeon
On Thursday, April 25, 2013 , Sujit Reddy Thumma wrote: > On 4/24/2013 9:36 PM, Seungwon Jeon wrote: > > Link start-up requires long time with multiphase handshakes > > between UFS host and device. This affects driver's probe time. > > This patch let link start-up r

RE: [PATCH 4/5] scsi: ufs: rework link start-up process

2013-04-29 Thread Seungwon Jeon
On Monday, April 29, 2013, Sujit Reddy Thumma wrote: > On 4/26/2013 10:44 AM, Seungwon Jeon wrote: > > On Thursday, April 25, 2013 , Sujit Reddy Thumma wrote: > >> On 4/24/2013 9:36 PM, Seungwon Jeon wrote: > >>> Link start-up requires long time with multiphase han

RE: [PATCH 4/5] scsi: ufs: rework link start-up process

2013-04-29 Thread Seungwon Jeon
On Monday, April 29, 2013, Sujit Reddy Thumma wrote: > On 4/29/2013 3:54 PM, Seungwon Jeon wrote: > > On Monday, April 29, 2013, Sujit Reddy Thumma wrote: > >> On 4/26/2013 10:44 AM, Seungwon Jeon wrote: > >>> On Thursday, April 25, 2013 , Sujit Reddy Thumma wrot

RE: [PATCH 4/5] scsi: ufs: rework link start-up process

2013-05-01 Thread Seungwon Jeon
On Tuesday, April 30, 2013, Sujit Reddy Thumma wrote: > On 4/30/2013 12:03 PM, Seungwon Jeon wrote: > > On Monday, April 29, 2013, Sujit Reddy Thumma wrote: > >> On 4/29/2013 3:54 PM, Seungwon Jeon wrote: > >>> On Monday, April 29, 2013, Sujit Reddy Thumma wrote

RE: [PATCH 3/5] scsi: ufs: amend interrupt configuration

2013-05-02 Thread Seungwon Jeon
On Tuesday, April 30, 2013, Subhash Jadavani wrote: > Patch looks good but one minor comment below. > > On 4/24/2013 9:36 PM, Seungwon Jeon wrote: > > It makes interrupt setting more flexible especially > > for disabling. And wrong bit mask is fixed for ver 1.0. > >

RE: [PATCH 2/5] scsi: ufs: wrap the i/o access operations

2013-05-02 Thread Seungwon Jeon
On Wednesday, May 01, 2013, merez wrote: > Tested-by: Maya Erez > > I also tend to agree with Sujit on the order of the wrappers parameters. Okay, I'll take the views of all(Sujit, Subhash and you) Thanks, Seungwon Jeon > > Thanks, > Maya > > > On 4/26/20

RE: [PATCH 1/5] scsi: ufs: move the ufshcd_hba_stop to ufshcd.c

2013-05-02 Thread Seungwon Jeon
On Thursday, May 02, 2013, Santosh Y wrote: > On Wed, Apr 24, 2013 at 9:36 PM, Seungwon Jeon wrote: > > Move the ufshcd_hba_stop from header file. > > > > Signed-off-by: Seungwon Jeon > > --- > > drivers/scsi/ufs/ufshcd.c |9 + > > drivers/sc

RE: [PATCH 4/5] scsi: ufs: rework link start-up process

2013-05-02 Thread Seungwon Jeon
On Thursday, May 02, 2013, Santosh Y wrote: > On Thu, May 2, 2013 at 10:45 AM, Seungwon Jeon wrote: > > On Tuesday, April 30, 2013, Sujit Reddy Thumma wrote: > >> On 4/30/2013 12:03 PM, Seungwon Jeon wrote: > >> > On Monday, April 29, 2013, Sujit Reddy Thumma wrote

RE: [PATCH 4/5] scsi: ufs: rework link start-up process

2013-05-02 Thread Seungwon Jeon
On Thursday, May 02, 2013, Subhash Jadavani wrote: > Few minor comments other than what Sujit/Santosh have already commented. I'll take your comments for next send. Thanks, Seungwon Jeon > > On 4/24/2013 9:36 PM, Seungwon Jeon wrote: > > Link start-up requires long

RE: [PATCH 5/5] scsi: ufs: add dme operations

2013-05-02 Thread Seungwon Jeon
Layer Attributes > >> + */ > >> +#define N_DEVICEID 0x3000 > >> +#define N_DEVICEID_VALID 0x3001 > >> +#define N_TC0TXMAXSDUSIZE 0x3020 > >> +#define N_TC1TXMAXSDUSIZE 0x3021 > >> + > >> +/* > >> +

RE: [PATCH 5/5] scsi: ufs: add dme operations

2013-05-02 Thread Seungwon Jeon
On Thursday, May 02, 2013, Subhash Jadavani wrote: > On 4/24/2013 9:36 PM, Seungwon Jeon wrote: > > Add uic command operations including DME_XXX series. > > > > Signed-off-by: Seungwon Jeon > > --- > > drivers/scsi/ufs/ufs-attrs.h | 129 +++

[PATCH v2 1/7] scsi: ufs: move the ufshcd_hba_stop to ufshcd.c

2013-05-04 Thread Seungwon Jeon
Move the ufshcd_hba_stop from header file. Signed-off-by: Seungwon Jeon Reviewed-by: Subhash Jadavani Tested-by: Maya Erez --- drivers/scsi/ufs/ufshcd.c |9 + drivers/scsi/ufs/ufshcd.h |9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/scsi

[PATCH v2 2/7] scsi: ufs: wrap the i/o access operations

2013-05-04 Thread Seungwon Jeon
Simplify operations with hiding mmio_base. Signed-off-by: Seungwon Jeon Tested-by: Maya Erez --- drivers/scsi/ufs/ufshcd.c | 107 +++-- drivers/scsi/ufs/ufshcd.h |5 ++ 2 files changed, 50 insertions(+), 62 deletions(-) diff --git a/drivers/scsi

[PATCH v2 3/7] scsi: ufs: amend interrupt configuration

2013-05-04 Thread Seungwon Jeon
It makes interrupt setting more flexible especially for disabling. And wrong bit mask is fixed for ver 1.0. [17:16] is added for mask. Signed-off-by: Seungwon Jeon Tested-by: Maya Erez --- drivers/scsi/ufs/ufshcd.c | 84 +++- drivers/scsi/ufs/ufshcd.h

[PATCH v2 4/7] scsi: ufs: fix interrupt status clears

2013-05-04 Thread Seungwon Jeon
There is no need to check the version to clear the interrupt status. And the order is changed prior to actual handling. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers

[PATCH v2 7/7] scsi: ufs: add dme control primitives

2013-05-04 Thread Seungwon Jeon
Implements to support the following operations. Currently, this patch doesn't introduce DME_ENABLE and DME_RESET because host controller's HCE enable contains these roles. DME_POWERON{OFF}, DME_HIBERNATE_ENTER{EXIT}, DME_ENDPOINTRESET. Signed-off-by: Seungwon Jeon --- drivers/scsi/uf

[PATCH v2 5/7] scsi: ufs: rework link start-up process

2013-05-04 Thread Seungwon Jeon
fined completion time of uic command to avoid a permanent wait. Added mutex to guarantee of uic command at a time. Adapted some sequence of controller initialization after link statup according to HCI standard. Signed-off-by: Seungwon Jeon Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufs

[PATCH v2 6/7] scsi: ufs: add dme configuration primitives

2013-05-04 Thread Seungwon Jeon
Implements to support Get and Set operation of the DME. And along with these operations, IDs of Attribute are added. It is used to configure the behavior of the UNIPRO. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 84 + drivers/scsi/ufs/ufshcd.h

RE: [PATCH v2 1/7] scsi: ufs: move the ufshcd_hba_stop to ufshcd.c

2013-05-05 Thread Seungwon Jeon
he next patch so I > didn't hit the compilation errors. Oh, I also missed this. Thank you for informing. I'll keep ufshcd_hba_stop function in place and just touch for the patch of "scsi: ufs: wrap the i/o access operations". Thanks, Seungwon Jeon > > Thanks, >

RE: [PATCH v2 7/7] scsi: ufs: add dme control primitives

2013-05-05 Thread Seungwon Jeon
On Sunday, May 05, 2013, Sujit Reddy Thumma wrote: > On 5/4/2013 2:15 PM, Seungwon Jeon wrote: > > Implements to support the following operations. > > Currently, this patch doesn't introduce DME_ENABLE and DME_RESET > > because host controller's HCE enable contains t

[PATCH v3 1/6] scsi: ufs: wrap the i/o access operations

2013-05-05 Thread Seungwon Jeon
Simplify operations with hiding mmio_base. Signed-off-by: Seungwon Jeon Tested-by: Maya Erez --- drivers/scsi/ufs/ufshcd.c | 105 +++-- drivers/scsi/ufs/ufshcd.h |7 +++- 2 files changed, 50 insertions(+), 62 deletions(-) diff --git a/drivers/scsi

[PATCH v3 2/6] scsi: ufs: amend interrupt configuration

2013-05-05 Thread Seungwon Jeon
It makes interrupt setting more flexible especially for disabling. And wrong bit mask is fixed for ver 1.0. [17:16] is added for mask. Signed-off-by: Seungwon Jeon Tested-by: Maya Erez --- drivers/scsi/ufs/ufshcd.c | 84 +++- drivers/scsi/ufs/ufshcd.h

[PATCH v3 3/6] scsi: ufs: fix interrupt status clears

2013-05-05 Thread Seungwon Jeon
There is no need to check the version to clear the interrupt status. And the order is changed prior to actual handling. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers

[PATCH v3 5/6] scsi: ufs: add dme configuration primitives

2013-05-05 Thread Seungwon Jeon
Implements to support Get and Set operation of the DME. And along with these operations, IDs of Attribute are added. It is used to configure the behavior of the UNIPRO. Signed-off-by: Seungwon Jeon --- drivers/scsi/ufs/ufshcd.c | 84 + drivers/scsi/ufs/ufshcd.h

[PATCH v3 4/6] scsi: ufs: rework link start-up process

2013-05-05 Thread Seungwon Jeon
fined completion time of uic command to avoid a permanent wait. Added mutex to guarantee of uic command at a time. Adapted some sequence of controller initialization after link statup according to HCI standard. Signed-off-by: Seungwon Jeon Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufs

[PATCH v3 6/6] scsi: ufs: add dme control primitives

2013-05-05 Thread Seungwon Jeon
Implements to support the following operations. Currently, this patch doesn't introduce DME_ENABLE and DME_RESET because host controller's HCE enable contains these roles. DME_POWERON{OFF}, DME_HIBERNATE_ENTER{EXIT}, DME_ENDPOINTRESET. Signed-off-by: Seungwon Jeon --- drivers/scsi/uf

RE: [PATCH v3 4/6] scsi: ufs: rework link start-up process

2013-05-06 Thread Seungwon Jeon
On Monday, May 06, 2013, Sujit Reddy Thumma wrote: > On 5/6/2013 11:07 AM, Seungwon Jeon wrote: > > Link start-up requires long time with multiphase handshakes > > between UFS host and device. This affects driver's probe time. > > This patch let link start-up run asy

RE: [PATCH v3 6/6] scsi: ufs: add dme control primitives

2013-05-06 Thread Seungwon Jeon
} else { > > + dev_err(hba->dev, "%s: timeout\n", hibern8); > > + ret = -ETIMEDOUT; > > + } > > +out: > > + mutex_unlock(&hba->uic_cmd_mutex); > > + return ret; > > +} > > +EXPORT_SYM

RE: [PATCH v3 1/6] scsi: ufs: wrap the i/o access operations

2013-05-06 Thread Seungwon Jeon
On Tuesday, May 07, 2013, Santosh Y wrote: > On Mon, May 6, 2013 at 11:07 AM, Seungwon Jeon wrote: > > Simplify operations with hiding mmio_base. > > > > Signed-off-by: Seungwon Jeon > > Tested-by: Maya Erez > > --- >

RE: [PATCH V3 1/1] scsi: ufs: Add support for sending NOP OUT UPIU

2013-05-07 Thread Seungwon Jeon
rr = ufshcd_wait_for_nop_cmd(hba, lrbp); > + > + if (err == -ETIMEDOUT) { > + u32 reg; > + > + /* clear outstanding transaction before retry */ > + spin_lock_irqsave(hba->host->host_lock, flags); > + ufshcd_utrl_clear(hba, INTERNAL_CMD_TAG);

[PATCH v4 1/6] scsi: ufs: wrap the i/o access operations

2013-05-08 Thread Seungwon Jeon
Simplify operations with hiding mmio_base. Signed-off-by: Seungwon Jeon Tested-by: Maya Erez --- drivers/scsi/ufs/ufshcd.c | 105 +++-- drivers/scsi/ufs/ufshcd.h |7 +++- 2 files changed, 50 insertions(+), 62 deletions(-) diff --git a/drivers/scsi

[PATCH v4 2/6] scsi: ufs: amend interrupt configuration

2013-05-08 Thread Seungwon Jeon
It makes interrupt setting more flexible especially for disabling. And wrong bit mask is fixed for ver 1.0. [17:16] is added for mask. Signed-off-by: Seungwon Jeon Tested-by: Maya Erez --- drivers/scsi/ufs/ufshcd.c | 84 +++- drivers/scsi/ufs/ufshcd.h

[PATCH v4 3/6] scsi: ufs: fix interrupt status clears

2013-05-08 Thread Seungwon Jeon
There is no need to check the version to clear the interrupt status. And the order is changed prior to actual handling. Signed-off-by: Seungwon Jeon Tested-by: Maya Erez --- drivers/scsi/ufs/ufshcd.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/ufs

[PATCH v4 4/6] scsi: ufs: rework link start-up process

2013-05-08 Thread Seungwon Jeon
fined completion time of uic command to avoid a permanent wait. Added mutex to guarantee of uic command at a time. Adapted some sequence of controller initialization after link statup according to HCI standard. Signed-off-by: Seungwon Jeon Signed-off-by: Sujit Reddy Thumma Tested-by: Maya Erez --- C

  1   2   >