RE: [EXT] [PATCH v1] scsi: ufs: skip shutdown if hba is not powered

2019-09-19 Thread Bean Huo (beanhuo)
>To solve this issue, simply add checking to skip shutdown for above kind of >situation. > >Signed-off-by: Stanley Chu Acked-by: Bean Huo

RE: [EXT] [PATCH v3 2/3] scsi: ufs: override auto suspend tunables for ufs

2019-09-16 Thread Bean Huo (beanhuo)
> >Signed-off-by: Stanley Chu >Reviewed-by: Avri Altman Reviewed-by: Bean Huo

RE: [EXT] RE: [PATCH] Documentation: scsi: ufs: announce ufs-tool v1.0

2019-07-04 Thread Bean Huo (beanhuo)
I suffered a rebuff, was rejected. --Bean Huo >-Original Message- >From: linux-scsi-ow...@vger.kernel.org >On Behalf Of Pedro Sousa >Sent: Thursday, July 4, 2019 12:40 PM >To: Arthur Simchaev ; Bean Huo (beanhuo) >

RE: [EXT] [PATCH v2 3/3] scsi: ufs: Use re-factored Auto-Hibernate function

2019-05-15 Thread Bean Huo (beanhuo)
> >Use re-factored ufshcd_is_auto_hibern8_supported() function in ufshcd_init() >instead to make code more cleaner. > >Signed-off-by: Stanley Chu Reviewed-by: Bean Huo

RE: [EXT] [PATCH v2 2/3] scsi: ufs: Add error-handling of Auto-Hibernate

2019-05-15 Thread Bean Huo (beanhuo)
Hi, Stanley Thanks for update. >Signed-off-by: Stanley Chu Reviewed-by: Bean Huo >2.18.0

RE: [EXT] [PATCH v1 2/3] scsi: ufs: add error handling of auto-hibern8

2019-05-14 Thread Bean Huo (beanhuo)
Hi, Stanley Thanks for reply. > >On Mon, 2019-05-13 at 18:21 +, Bean Huo (beanhuo) wrote: >> Hi, Stanley >> >> >+ >> >+static inline bool ufshcd_is_auto_hibern8_error(struct ufs_hba *hba, >> >+

RE: [EXT] [PATCH v1 2/3] scsi: ufs: add error handling of auto-hibern8

2019-05-13 Thread Bean Huo (beanhuo)
Hi, Stanley >+ >+static inline bool ufshcd_is_auto_hibern8_error(struct ufs_hba *hba, >+ u32 intr_mask) >+{ >+ return (ufshcd_is_auto_hibern8_supported(hba) && >+ !hba->uic_async_done && Here check if uic_async_done is NULL, no big pr

RE: [EXT] Re: [PATCH] scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value

2019-04-18 Thread Bean Huo (beanhuo)
Hi, Avri > >Hi, >I tried to look it up in the unipro spec V1.6 (2013) - but it wasn't there. >Is this attribute introduced on a later version? >Thanks, >Avri It is in M-phy spec, RX_Termination_Force_Enable should be 0xA9, I think, here is typo. But currently no driver uses it. //Bean >__

RE: [EXT] [PATCH v6 3/7] scsi: ufs-hisi: Re-factor ufshcd_get_pwr_dev_param

2019-03-18 Thread Bean Huo (beanhuo)
>Signed-off-by: Stanley Chu >Reviewed-by: Avri Altman Acked-by: Bean Huo

RE: [EXT] [PATCH v6 2/7] scsi: ufs-qcom: Re-factor ufshcd_get_pwr_dev_param

2019-03-18 Thread Bean Huo (beanhuo)
> >Signed-off-by: Stanley Chu >Reviewed-by: Avri Altman Acked-by: Bean Huo

RE: [EXT] [PATCH v6 1/7] scsi: ufs: Introduce ufshcd_get_pwr_dev_param

2019-03-18 Thread Bean Huo (beanhuo)
This patch absolutely needed. >Subject: [EXT] [PATCH v6 1/7] scsi: ufs: Introduce ufshcd_get_pwr_dev_param > >ufshcd_get_pwr_dev_param is for vendors to decide finally agreed attributes >for power mode change if vendors define their host capability in struct >ufs_dev_params. > >This api is using b

RE: [EXT] [PATCH v4 3/3] scsi: ufs-bsg: Allow reading descriptors

2019-01-31 Thread Bean Huo (beanhuo)
>-Original Message- >From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- >ow...@vger.kernel.org] On Behalf Of Avri Altman >Sent: Sunday, January 27, 2019 8:08 AM >To: James E.J. Bottomley ; Martin K. Petersen >; linux-scsi@vger.kernel.org; linux- >ker...@vger.kernel.org; Evan Green

RE: [EXT] [PATCH v4 2/3] scsi: ufs: Allow reading descriptor via raw upiu

2019-01-31 Thread Bean Huo (beanhuo)
> >Signed-off-by: Avri Altman >Reviewed-by: Evan Green Reviewed-by: Bean Huo

RE: [PATCH v4 1/3] scsi: ufs-bsg: Change the calling convention for write descriptor

2019-01-30 Thread Bean Huo (beanhuo)
t;- uint8_t *desc_buff, int *desc_len, >- enum query_opcode desc_op) >+static int ufs_bsg_alloc_desc_buffer(struct ufs_hba *hba, struct bsg_job *job, >+ uint8_t **desc_buff, int *desc_len, Maybe here also we should use 'u8'. Reviewed-by: Bean Huo //Beanhuo

RE: [PATCH v1 1/1] scsi: ufs: Print uic error history in time order

2019-01-30 Thread Bean Huo (beanhuo)
Hi, Stanley I tested it on my own platform. This is very useful and thanks. > >Now uic errors are printed out of time order. > >Simply make it more readable by printing logs in time order, and printing "No >record" if history is empty. > >Signed-off-by: Stanley Chu >--- Reviewed-by: Bean Huo Te

RE: [EXT] RE: [PATCH v3 0/3] scsi: ufs-bsg: Add read descriptor

2019-01-25 Thread Bean Huo (beanhuo)
Hi, Avri >Subject: [EXT] RE: [PATCH v3 0/3] scsi: ufs-bsg: Add read descriptor > >> >> Avri, >> >> > V2->v3: >> > Add a prep patch with write descriptor calling convention changes. >> > Elaborate the commit log of ufs-bsg: Allow reading descriptors. >> > Add Reviewed-by tag. >> >> I don't see Chri

[PATCH V2] sg3_utils: sg_write_buffer: convert string to integer while reading from stdio

2018-11-12 Thread Bean Huo (beanhuo)
This patch is to convert inputted string to the integer when read data from stdin. While entering data flow, the data between bytes can be separated by either space, or ',' (or by '.'). V1-V2: 1. Rebased the patch on the latest sg_write_buffer.c 2. Added the wrong input checkup, an

Re: [PATCH v1] sg3_utils: sg_write_buffer: convert string to integer while reading from stdio

2018-11-10 Thread Bean Huo (beanhuo)
Hi, Doug Gilbert >>On 2018-11-09 7:18 p.m., Bean Huo (beanhuo) wrote: >> This patch is to convert inputted string to the integer when read data >> from stdin. While entering data, the data between bytes can be >> separated by space, or by ',' or by '.&#x

[PATCH v1] sg3_utils: sg_write_buffer: convert string to integer while reading from stdio

2018-11-09 Thread Bean Huo (beanhuo)
This patch is to convert inputted string to the integer when read data from stdin. While entering data, the data between bytes can be separated by space, or by ',' or by '.'. Signed-off-by: Bean Huo --- src/sg_write_buffer.c | 31 +++ 1 file changed, 31 insertions(+)

RE: [PATCH V15 2/2] scsi: ufs: Add configfs support for UFS provisioning

2018-10-17 Thread Bean Huo (beanhuo)
Hi, Sayali >Subject: [EXT] [PATCH V15 2/2] scsi: ufs: Add configfs support for UFS >provisioning > >This patch adds configfs support to provision UFS device at runtime. This >feature can be primarily useful in factory or assembly line as some devices >may be required to be configured multiple time

Re: [PATCH v8 0/8] scsi: Add ufs bsg endpoint

2018-10-05 Thread Bean Huo (beanhuo)
list on Sunday. > >Thanks, >Avri >____________ >From: Bean Huo (beanhuo) >Sent: Friday, October 5, 2018 12:28 AM >To: Avri Altman; Christoph Hellwig; Johannes Thumshirn; Hannes Reinecke; >Bart Van Assche; James E.J. Bottomley; Martin K. Petersen; linu

RE: [PATCH v8 0/8] scsi: Add ufs bsg endpoint

2018-10-04 Thread Bean Huo (beanhuo)
Hi, Avri >We tested it on a Hikey-960 platform with a V4.14 kernel, "modernized" by >recent bsg and ufs patches. Which kernel version is V8 based on? I patched to 4.14-rc7, it failed.

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-17 Thread Bean Huo (beanhuo)
>On Mon, 2018-04-16 at 20:27 +0000, Bean Huo (beanhuo) wrote: >> By the way, these patches are not to add new feature, they are just to >> add print tag along with the other exist printed request parameters. > >Are you aware that there are two tag fields in struct reque

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-17 Thread Bean Huo (beanhuo)
Hi, Steve Right, Please see below portion log from ftrace and blktrace, There is no any impact on blktrace. > >Looking at the code from >git://git.kernel.org/pub/scm/linux/kernel/git/axboe/blktrace.git > >It appears that it does not rely on the ftrace ring buffers. > >So I'm guessing blktrace is

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
Hi, Bart >mi...@redhad.com; linux-bl...@vger.kernel.org; raja...@google.com >Subject: [EXT] Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI >trace events > >On Mon, 2018-04-16 at 14:31 +0000, Bean Huo (beanhuo) wrote: >> TP_printk("host_no=%u channe

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
>>> This patch is not acceptable because it adds support for tag tracing >>> to the legacy block layer only. Any patch that adds a new feature to >>> the legacy block layer must also add it to blk-mq. >>> >> To be honest, I don't understand your point, can you give me more >explanation? > >The lega

Re: [RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
Hi, Bart >On Mon, 2018-04-16 at 09:41 -0700, Rajat Jain wrote: >> On Mon, Apr 16, 2018 at 8:28 AM, Steven Rostedt >wrote: >> > On Mon, 16 Apr 2018 14:31:49 + >> > "Bean Huo (beanhuo)" wrote: >> > >> > > Print the request ta

[RESEND PATCH v1 1/2] trace: events: scsi: Add tag in SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
Print the request tag along with other information while tracing a command. Signed-off-by: Bean Huo --- include/trace/events/scsi.h | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/include/trace/events/scsi.h b/include/trace/events/scsi.h index f624969..a

[RESEND PATCH v1 0/2] Print the request tag in Block/SCSI trace events

2018-04-16 Thread Bean Huo (beanhuo)
These patches are to add the printout of the request tag in Block/SCSI trace events when tracing one request or command, this is very useful for tracing the task running status in the storage device which supports multiple command queue. As for the first patch " Add tag in SCSI trace events", copi

[RESEND PATCH v1 2/2] trace: events: block: Add tag in block trace events

2018-04-16 Thread Bean Huo (beanhuo)
Print the request tag along with other information in block trace events when tracing request , and unplug type (Sync / Async). Signed-off-by: Bean Huo --- include/trace/events/block.h | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/incl

Re: UFS writing request failure handling

2018-02-13 Thread Bean Huo (beanhuo)
Hi Bart Thanks for your answer. I looked at SCSI core source codes these days, UFS also follows SCSI core error handling. There is already re-issue behavior, and assign 5 retries for each UFS request if there is error. > >On 02/12/18 04:21, Bean Huo (beanhuo) wrote >> I am looking

UFS writing request failure handling

2018-02-12 Thread Bean Huo (beanhuo)
Hi, I am looking at UFS error handling, but I didn't notice re-issues requests with UTP error to the host controller. According UFS host spec, "host software either completes the request that had the error and requests still outstanding with error to higher level software, or re-issues these re

RE: [PATCH for sg3_utils 0/4] Simplify the sg3_utils configure script

2018-01-03 Thread Bean Huo (beanhuo)
Hi, Bart and Dong Do you think we need to submit all changed diff including some generated files by automake? Such as config.h.in, Makefile.in..., in fact, we only manually did a few modificaiton on Some files such as configura.ac,makefile.am. > >Hello Doug, > >The four patches in this series i

RE: [PATCH for sg3_utils 1/4] configure.ac: Suppress an autoconf warning

2018-01-03 Thread Bean Huo (beanhuo)
>a/configure.ac b/configure.ac index 1cce0b25f583..129c2f9d4d4d 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -7,13 +7,13 @@ AM_CONFIG_HEADER(config.h) AC_PROG_CC # >AC_PROG_CXX AC_PROG_INSTALL >- >-# Adding libtools to the build seems to bring in C++ environment - >AC_PROG_LIBTOOL > > # AM

Re: [RFC] sg3_utils: sgp_dd: work around on pthread_cancel for android

2017-12-26 Thread Bean Huo (beanhuo)
Hi, Bart > >On Sat, 2017-12-23 at 10:19 +, Bean Huo (beanhuo) wrote: >> Doug wrote: >> > This seems to work in Linux but may not work in Android: >> > AC_SEARCH_LIBS([pthread_cancel], [pthread], >> > [AC_DEFINE(HAVE_PTHREAD_CANCEL, 1, [Found pthread_c

Re: [RFC] sg3_utils: sgp_dd: work around on pthread_cancel for android

2017-12-23 Thread Bean Huo (beanhuo)
Hi, Doug and Bart Thanks so much for your prompt response. See below my action: >On 2017-12-22 01:24 PM, Bart Van Assche wrote: >> On Fri, 2017-12-22 at 17:00 +0000, Bean Huo (beanhuo) wrote: >>> case "${host}" in >>> +*-*-android*) >>> +

[RFC] sg3_utils: sgp_dd: work around on pthread_cancel for android

2017-12-22 Thread Bean Huo (beanhuo)
pthread_cancel is not supported by Android Bionic C library pthread. Based on my searched information online, pthread_cancel sometimes is likely to lead to memory leaks and dead locks. If we use android NDK or standalone toolchain to cross complile sg3_utils, below failure appeared. "aarch

Re: UFS utilities

2017-12-05 Thread Bean Huo (beanhuo)
Hi, greg k-h > >So what UFS commands are you missing that you need to see implemented? > >And again, have you checked the different forks of the driver? > Seems there is something misunderstood, I want to use UPIU, rather than CDB. Maybe it is not possible based on current UFS stacks. Of course,

RE: [EXT] Re: UFS utilities

2017-12-04 Thread Bean Huo (beanhuo)
Hi, Bart Sorry for later! > >Hello Bean, > >Please be more specific. What is inconvenient about sg3_utils on embedded >ARM systems? > Exactly, I don't know how to compile sg3_utils with static library, instead of sharing library. I used following configuration Parameter: ./configure --enable-stati

Re: UFS utilities

2017-11-29 Thread Bean Huo (beanhuo)
Hi, Greg >On Mon, Nov 27, 2017 at 11:25:47AM +0000, Bean Huo (beanhuo) wrote: >> Hi, all >> Is there someone knows if exists one utilis dedicated to UFS device, rather >than SCSI utils? >> I have tried sg3-utils, but it is not convenient for the embedded ARM-based >sys

UFS utilities

2017-11-27 Thread Bean Huo (beanhuo)
Hi, all Is there someone knows if exists one utilis dedicated to UFS device, rather than SCSI utils? I have tried sg3-utils, but it is not convenient for the embedded ARM-based system. And also it doesn't support several UFS special command. If we don't have this kind of tool for UFS, is it nec

UFS maximum access unit is 8KB

2017-08-09 Thread Bean Huo (beanhuo)
Hi, I am now using one hikey960, and Linux kernel version is 4.4.77. And found that for UFS driver version, the maximum transformation is 8KB. Means that if I using 128KB chuck size to program in the user space, but, from ftrace/blktrace, It shows that it always programs by 8KB in kernel. please