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 *); > +

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

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-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-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 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 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 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 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 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 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 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 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 > >> i

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 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-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: 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-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: 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 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 V1 0/8] ufs patch siries

2013-05-13 Thread Seungwon Jeon
'From: Author name ' is expected in the head of e-mail. I feel that maintainer has this role, though. And there is need to check the base of tree for ufshcd. ' scsi: ufs: add support for query requests' is not merged finally. I think we can talk with Santosh for those. Thanks, S

RE: [PATCH V1 3/8] scsi: ufs: wrap the i/o access operations

2013-05-12 Thread Seungwon Jeon
On Sunday, May 12, 2013, Dolev Raviv wrote: Author should be identified here. (From: author...) Except last patch of series(8/8), all of patches are not from you. > Simplify operations with hiding mmio_base. > > Signed-off-by: Seungwon Jeon > Signed-off-by: Dolev Raviv I'm n

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);

RE: [PATCH] mmc: core: disable the cache before suspend only after stopping BKOPS

2013-01-16 Thread Seungwon Jeon
c_suspend(struct mmc_host *host) > >> else if (!mmc_host_is_spi(host)) > >> err = mmc_deselect_cards(host); > >> host->card->state &= ~(MMC_STATE_HIGHSPEED | > > MMC_STATE_HIGHSPEED_200); > >> - mmc_release_host(host); >

RE: [RFC/PATCH 0/2] ROW scheduling Algorithm

2012-08-20 Thread Seungwon Jeon
. Depending on user scenario, write can be considered to be important. It needs to check the starvation of write. Thanks, Seungwon Jeon > Hi Chung > > > > The below is my environment: > > Kernel Version: linux-3.4 > > Card: eMMC4.5 (50MHz DDR mode, 8-bit buswidth) Ho

RE: [PATCH v2 1/1] mmc: block: Add write packing control

2012-06-11 Thread Seungwon Jeon
e > requests between read requests in parallel read and write operations > doesn't exceed 17 requests. Therefore, we can assume that fetching more > than 17 write requests without hitting a read request can indicate that > there is no read activity. We can apply this experiment reg

RE: [PATCH v2 1/1] mmc: block: Add write packing control

2012-06-08 Thread Seungwon Jeon
rite requests are over num_wr_reqs_to_start_packing? That means individual request(1...17) will be issued with non-packing. Could you explain your policy more? > + > +} > + > static u8 mmc_blk_prep_packed_list(struct mmc_queue *mq, struct request *req) > { > struct request_q