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

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

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

2018-01-24 Thread chenxiang
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 will return -ENODEV. But it will still try to reset three times for offline device. This process lasts a long

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

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

2018-01-08 Thread chenxiang (M)
+cc Jack Wang <xjtu...@gmail.com> 在 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 <jack_w...@usish.com> Cc: lindar_...@usi

[PATCH v2 2/4] scsi: isci: fix dma_unmap_sg() parameter

2018-01-03 Thread 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: Artur Paszkiewicz Cc: Dan Williams Fixes: d9dcb4ba7("isci: unify isci_host and

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

2018-01-03 Thread chenxiang
be the same as those and passed in to the scatter/gather mapping API. Note: must be the number you passed in, *not* the number of DMA address entries returned. Chang Log: v1 -> v2: Split the patch into small patchset, and one patch per driver; chenxiang

[PATCH v2 3/4] scsi: mvsas: fix dma_unmap_sg() parameter

2018-01-03 Thread 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: Xiangliang Yu Cc: Jeff Garzik Fixes: 0b15fb1fd("[SCSI]mvsas: add support for Task collector mode

[PATCH v2 1/4] scsi: ibmvscsis: fix dma_unmap_sg() parameter

2018-01-03 Thread 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: Bryant G. Ly Cc: Michael Cyr Fixes: 88a678bb("ibmscsis: Initial commit of IBM

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

2018-01-03 Thread 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") Signed-off-by: Xiang Chen

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

[PATCH 2/2] scsi: hisi_sas: Change frame type for SET MAX commands

2017-12-28 Thread chenxiang
According to ATA protocol, SET MAX commands belong to different frame types. So judge features field of SET MAX commands to decide which frame type they belongs to. Signed-off-by: Xiang Chen Signed-off-by: John Garry ---

[PATCH 1/2] ata: enhance the definition of SET MAX feature field value

2017-12-28 Thread chenxiang
There are two other values for SET MAX feature field according to ata protocol. So definite them. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- include/linux/ata.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 0/2] Change frame type for SET MAX commands

2017-12-28 Thread chenxiang
According to ATA protocol, there are two other values for SET MAX commands' feature field. So definite them. Also those SET MAX commands belong to different frame types,and judge feature field of SET MAX commands to decide which frame type they belongs to. chenxiang (2): ata: enhance

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

2017-12-20 Thread chenxiang
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. Signed-off-by: Xiang Chen --- drivers/scsi/ibmvscsi_tgt/libsrp.c | 6 --

[PATCH] scsi: hisi_sas: fix a warning reported by sparse

2017-12-18 Thread chenxiang
The type of function pci_choose_state's return value is pci_power_t while we define it as a u32. A warning will be reported by sparse. So change u32 into pci_power_t. Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 +++-- 1 file changed, 3

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