[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

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

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:

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

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

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

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

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

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

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

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: [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 type

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