Re: Looking for some help understanding error handling

2019-05-12 Thread chenxiang (M)
在 2018/10/5 23:51, chris.mo...@microchip.com 写道: Thanks Hannes, After some pointers from Shane Seymour I found that the FC and SRP transport layers have a devloss timer, so that when a device disappears they hold on to the target information for a time waiting to see if it comes back. The

Re: [PATCH 1/6] scsi: hisi_sas: Add support for DIX feature for v3 hw

2019-02-11 Thread chenxiang (M)
Hi Martin, 在 2019/2/9 7:13, Martin K. Petersen 写道: John, Just noticed this while inspecting the resulting complete diff: static u32 get_prot_chk_msk_v3_hw(struct scsi_cmnd *scsi_cmnd) { unsigned char prot_flags = scsi_cmnd->prot_flags; - if (prot_flags & SCSI_PROT_TRANSFER_PI)

Re: [PATCH] block: set rq->cmd_flags with bio->opf instead of data->cmd_flags when bio is not Null

2019-01-28 Thread chenxiang (M)
在 2019/1/28 23:57, Christoph Hellwig 写道: On Mon, Jan 28, 2019 at 03:36:58PM +, John Garry wrote: As I understood, the problem is the scenario of calling blk_mq_make_request()->bio_integrity_prep() where we then allocate a bio integrity payload in calling bio_integrity_alloc(). In this ca

Re: [PATCH] block: set rq->cmd_flags with bio->opf instead of data->cmd_flags when bio is not Null

2019-01-24 Thread chenxiang (M)
+cc Jens + linux-block 在 2019/1/24 21:43, chenxiang 写道: In function blk_mq_make_request(), though data->cmd_flags will be initialized with bio->opf, later bio->opf may be set as REQ_INTEGRITY if enabled DIX. So need to use bio->opf instead of data->cmd_flags in function blk_mq_rq_ctx_init(), or

Re: [PATCH] scsi: t10-pi: Return correct ref tag when queue has no integrity profile

2018-12-06 Thread chenxiang (M)
Hi, 在 2018/12/6 20:04, John Garry 写道: On 06/12/2018 04:17, Martin K. Petersen wrote: + Bart, Had you considered to use lower_32_bits() instead of "0x"? That would to avoid that reviewers have to count the 'f'-s to verify correctness of t10_pi_ref_tag(). I hadn't. I guess I tend

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-11-27 Thread chenxiang (M)
Hi Lei Ming, 在 2018/11/27 21:08, Ming Lei 写道: On Tue, Nov 27, 2018 at 05:55:45PM +0800, chenxiang (M) wrote: Hi all, There is a issue which may be related to CONFIG_SCSI_MQ_DEFAULT: before we developed DIF/DIX feature on kernel 4.18 (disable CONFIG_SCSI_MQ_DEFAULT default), and it works well

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-11-27 Thread chenxiang (M)
Hi, 在 2018/11/28 4:22, Ewan D. Milne 写道: On Tue, 2018-11-27 at 17:55 +0800, chenxiang (M) wrote: [ 629.210506] Unable to handle kernel paging request at virtual address 8027e048 [ 629.210506] Unable to handle kernel paging request at virtual address 8027e048 ... [ 629.380218

DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-11-27 Thread chenxiang (M)
Hi all, There is a issue which may be related to CONFIG_SCSI_MQ_DEFAULT: before we developed DIF/DIX feature on kernel 4.18 (disable CONFIG_SCSI_MQ_DEFAULT default), and it works well. But when we switch to kernel 4.19-rc1 and 4.20-rc1, Call trace as follow occurs when running fio and if disab

Re: [PATCH v2] scsi: hisi_sas: Fix NULL pointer dereference

2018-10-18 Thread chenxiang (M)
在 2018/10/19 0:59, Gustavo A. R. Silva 写道: There is a NULL pointer dereference in case *slot* happens to be NULL at lines 1053 and 1878: struct hisi_sas_cq *cq = &hisi_hba->cq[slot->dlvry_queue]; Notice that *slot* is being NULL checked at lines 1057 and 1881: if (slot), which implies i

Re: [PATCH] scsi: ata: don't reset three times if device is offline for SAS host

2018-02-27 Thread chenxiang (M)
Hi Tejun, 在 2018/2/28 2:19, Tejun Heo 写道: Hello, On Mon, Feb 26, 2018 at 07:45:37PM +0800, chenxiang (M) wrote: So, if there are real consequences, we can definitely add a way to short-circuit the recovery logic but let's do that by adding proper signaling rathr than testing for driver

Re: [bug report] Don't enter SCSI error handler on kernel 4.16-rc1

2018-02-27 Thread chenxiang (M)
在 2018/2/27 22:57, Bart Van Assche 写道: On Tue, 2018-02-27 at 15:09 +0800, chenxiang (M) wrote: 在 2018/2/26 23:25, Bart Van Assche 写道: On Mon, 2018-02-26 at 17:37 +0800, chenxiang (M) wrote: When i have a test on kernel 4.16-rc1, find a issue: running IO on SATA disk, then disable the disk

Re: [bug report] Don't enter SCSI error handler on kernel 4.16-rc1

2018-02-26 Thread chenxiang (M)
在 2018/2/26 23:25, Bart Van Assche 写道: On Mon, 2018-02-26 at 17:37 +0800, chenxiang (M) wrote: When i have a test on kernel 4.16-rc1, find a issue: running IO on SATA disk, then disable the disk through sysfs interface(echo 0 > /sys/class/sas_phy/phy-1:0:0/enable), IO will hang and ne

Re: [PATCH] scsi: ata: don't reset three times if device is offline for SAS host

2018-02-26 Thread chenxiang (M)
Hi Tejun, Sorry for my late reply as i have a vacation last week. 在 2018/2/13 22:27, Tejun Heo 写道: Hello, On Tue, Feb 13, 2018 at 09:44:53AM +0800, chenxiang (M) wrote: For those drivers using libsas, i think they have the same issue. It takes about 1 minute to recover but actually device is

Re: [PATCH] scsi: ata: don't reset three times if device is offline for SAS host

2018-02-12 Thread chenxiang (M)
Hi Tejun, 在 2018/2/13 0:51, Tejun Heo 写道: Hello, On Wed, Jan 24, 2018 at 09:20:25PM +0800, chenxiang wrote: In ata_eh_reset, it will reset three times at most for sata disk. For some drivers through libsas, it calls sas_ata_hard_reset at last. When device is gone, function sas_ata_hard_reset w

Re: [PATCH V2 8/8] scsi: hpsa: use blk_mq to solve irq affinity issue

2018-02-05 Thread chenxiang (M)
在 2018/2/5 23:20, Ming Lei 写道: This patch uses .force_blk_mq to drive HPSA via SCSI_MQ, meantime maps each reply queue to blk_mq's hw queue, then .queuecommand can always choose the hw queue as the reply queue. And if no any online CPU is mapped to one hw queue, request can't be submitted to this

Re: [LSF/MM TOPIC] Improving Asynchronous SCSI Disk Probing

2018-01-25 Thread chenxiang (M)
在 2018/1/18 7:24, Bart Van Assche 写道: When the SCSI scanning code discovers a SCSI device it calls the driver core function device_add() to associate a SCSI ULD with the device. The driver core invokes the probing function for the matching SCSI ULP, e.g. sd_probe(). In order to minimize the tim

Re: [PATCH v2 0/4] fix dma_unmap_sg() parameter in some scsi drivers

2018-01-21 Thread chenxiang (M)
Hi, does anyone notice and review this issue? 在 2018/1/4 10:36, chenxiang 写道: According to Documentation/DMA-API.txt, all the parameters of dma_unmap_sg() must be the same as those and passed in to the scatter/gather mapping API. But in scsi drivers such as ibmscsi_tgt/iscsi/mvsas/pm8001, the p

Re: [PATCH v2 4/4] scsi: pm8001: fix dma_unmap_sg() parameter

2018-01-08 Thread chenxiang (M)
+cc Jack Wang 在 2018/1/4 10:36, chenxiang 写道: For function dma_unmap_sg(), the parameter should be number of elements in the scatterlist prior to the mapping, not after the mapping. Fix this usage. Cc: Jack Wang Cc: lindar_...@usish.com Fixes: dbf9bfe6("[SCSI]pm8001: add SAS/SATA/HBA driver"

Re: [PATCH v1] libsas: remove private hex2bin() implementation

2018-01-02 Thread chenxiang (M)
在 2017/12/20 1:37, Andy Shevchenko 写道: The function sas_parse_addr() could be easily substituted by hex2bin() which is in kernel library code. Cc: Christoph Hellwig Signed-off-by: Andy Shevchenko Tested-by: Xiang Chen --- drivers/scsi/libsas/sas_scsi_host.c | 20 1

Re: [PATCH] scsi: fix dma_unmap_sg() parameter in some drivers

2018-01-02 Thread chenxiang (M)
在 2018/1/2 18:51, John Garry 写道: On 21/12/2017 08:15, chenxiang wrote: For function dma_unmap_sg(), the parameter should be number of elements in the scatterlist prior to the mapping, not after the mapping. So fix this usage in ibmvscsi_tgt/isci/mvsas/pm8001. Hi chenxiang, I think that it m

Re: [bug report] A race between device_resume and removing disk

2017-12-12 Thread chenxiang (M)
Ping...Does anyone has some idea about this issue? 在 2017/11/16 11:54, chenxiang (M) 写道: Hi all, When debugging suspend and resume of hisi_sas, I find a issue: use commands (echo freeze > /sys/power/state) to suspend, after 5s system will be resumed as i enable TEST_DEVICES. But i

[bug report] A race between device_resume and removing disk

2017-11-15 Thread chenxiang (M)
Hi all, When debugging suspend and resume of hisi_sas, I find a issue: use commands (echo freeze > /sys/power/state) to suspend, after 5s system will be resumed as i enable TEST_DEVICES. But if I plug one disks during suspend, system will be blocked all the time and it seems that there is a de