Re: [PATCH v1 5/8] scsi: ufs: qcom: Expose the reset controller for PHY

2019-01-16 Thread Kishon Vijay Abraham I
On 12/01/19 4:31 AM, Evan Green wrote: > Expose a reset controller that the phy can use to perform its > initialization in a single callback. > > Also, change the use of the phy functions from ufs-qcom such that > phy_poweron actually fires up the phy, and phy_poweroff actually > powers it down

Re: [PATCH v1] scsi: ufs: Use explicit access size in ufshcd_dump_regs

2019-01-16 Thread Marc Gonzalez
On 09/01/2019 16:38, Jeffrey Hugo wrote: >> On 11/12/2018 15:18, Marc Gonzalez wrote: >> >>> memcpy_fromio() doesn't provide any control over access size. >>> For example, on arm64, it is implemented using readb and readq. >>> This may trigger a synchronous external abort: >>> >>> [3.729943] I

RE: [PATCH v1] scsi: ufs: Use explicit access size in ufshcd_dump_regs

2019-01-16 Thread Winkler, Tomas
> > On 09/01/2019 16:38, Jeffrey Hugo wrote: > > >> On 11/12/2018 15:18, Marc Gonzalez wrote: > >> > >>> memcpy_fromio() doesn't provide any control over access size. > >>> For example, on arm64, it is implemented using readb and readq. > >>> This may trigger a synchronous external abort: > >>> >

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > If the device is _not_ removable we should not start the event > poller as the media will not go away. Having the event poller running > will block the open() call as it will try to flush outstanding > events, > which it can't if the devic

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Hannes Reinecke
On 1/16/19 11:26 AM, Martin Wilck wrote: On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: If the device is _not_ removable we should not start the event poller as the media will not go away. Having the event poller running will block the open() call as it will try to flush outstanding e

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 11:32 +0100, Hannes Reinecke wrote: > On 1/16/19 11:26 AM, Martin Wilck wrote: > > On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > > > If the device is _not_ removable we should not start the event > > > poller as the media will not go away. Having the event poller

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-16 Thread John Garry
On 16/01/2019 02:54, Martin K. Petersen wrote: Hi John, Hi Martin, So in this case I think that accessor functions are actually better because they allow us to print a big fat warning when you twiddle something you shouldn't post-initialization. So that's something I think we could--and sho

[PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-16 Thread Douglas Gilbert
The block layer assumes scsi_request:sense is always a valid pointer. This is set up once in scsi_mq_init_request() and the containing scsi_cmnd object is used often, being re-initialized by scsi_init_command(). That works unless some code re-purposes part of the scsi_cmnd object for something else

[PATCH for-5.0] scsi: communicate max segment size to the DMA mapping code

2019-01-16 Thread Christoph Hellwig
When a host driver sets a maximum segment size we should not only propagate that setting to the block layer, which can merge segments, but also to the DMA mapping layer which can merge segments as well. Fixes: 50c2e9107f ("scsi: introduce a max_segment_size host_template parameters") Signed-off-b

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Douglas Gilbert
On 2019-01-16 5:58 a.m., Martin Wilck wrote: On Wed, 2019-01-16 at 11:32 +0100, Hannes Reinecke wrote: On 1/16/19 11:26 AM, Martin Wilck wrote: On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: If the device is _not_ removable we should not start the event poller as the media will not

Re: lk 4.20.0 sd: 'Unaligned partial completion (resid=3584, sector_sz=4096)' forever

2019-01-16 Thread Douglas Gilbert
Ping If these types of disks (ones that can fast format between 512 and 4096 bytes) are not out in the field yet, they soon will be. This problem requires a hard reboot (i.e. hold you finger on the power button for 5-10 seconds). Sad Doug Gilbert On 2018-12-24 9:19 p.m., Douglas Gilb

Re: lk 4.20.0 sd: 'Unaligned partial completion (resid=3584, sector_sz=4096)' forever

2019-01-16 Thread Martin K. Petersen
Doug, > If these types of disks (ones that can fast format between 512 and > 4096 bytes) are not out in the field yet, they soon will be. This > problem requires a hard reboot (i.e. hold you finger on the power > button for 5-10 seconds). Sad Do we get a notification from the drive that in

Re: lk 4.20.0 sd: 'Unaligned partial completion (resid=3584, sector_sz=4096)' forever

2019-01-16 Thread Douglas Gilbert
On 2019-01-16 11:44 a.m., Martin K. Petersen wrote: Doug, If these types of disks (ones that can fast format between 512 and 4096 bytes) are not out in the field yet, they soon will be. This problem requires a hard reboot (i.e. hold you finger on the power button for 5-10 seconds). Sad

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Bart Van Assche
On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > If the device is _not_ removable we should not start the event > poller as the media will not go away. Having the event poller running > will block the open() call as it will try to flush outstanding events, > which it can't if the device

Re: lk 4.20.0 sd: 'Unaligned partial completion (resid=3584, sector_sz=4096)' forever

2019-01-16 Thread Douglas Gilbert
On 2019-01-16 11:55 a.m., Douglas Gilbert wrote: On 2019-01-16 11:44 a.m., Martin K. Petersen wrote: Doug, If these types of disks (ones that can fast format between 512 and 4096 bytes) are not out in the field yet, they soon will be. This problem requires a hard reboot (i.e. hold you finger

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 11:32 -0500, Douglas Gilbert wrote: > On 2019-01-16 5:58 a.m., Martin Wilck wrote: > > On Wed, 2019-01-16 at 11:32 +0100, Hannes Reinecke wrote: > > > On 1/16/19 11:26 AM, Martin Wilck wrote: > > > > On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > > > > > If the de

Re: ufshcd_queuecommand() triggering after ufshcd_suspend()?

2019-01-16 Thread John Stultz
On Sun, Jan 13, 2019 at 7:25 PM Zang Leigang wrote: > I think there are two different issues: > > 1. clk_gating's state(including state's trace event) and is_suspended is not > wrapped by ufshcd_is_clkgating_allowed which Hisilicon's kirin platoform > soc does not need but is set and

Re: [PATCH v1 0/8] phy: qcom-ufs: Enable regulators to be off in suspend

2019-01-16 Thread Stephen Boyd
Quoting Evan Green (2019-01-11 15:01:21) > > Because the UFS PHY reset bit is now toggled in the PHY, rather > than in ufs-qcom, this also percolated to all other PHYs using > ufs-qcom, which from what I can see is just 8996. > > There are a couple of tradeoffs in this series that I'd welcome fee

[PATCH v2] scsi: be2iscsi: fix potential NULL pointer dereference

2019-01-16 Thread Dmitry Voytik
Fix potential NULL pointer dereference wich might happen in beiscsi_alloc_mem(). If kmalloc_array() fails and mem_descr->mem_array is set to NULL, then its dereferencing happens when passing mem_descr->mem_array[] to dma_free_coherent(). Signed-off-by: Dmitry Voytik --- Changes since v1: - prev

Re: [PATCH] sd: skip non-removable devices in sd_check_events()

2019-01-16 Thread Martin Wilck
On Wed, 2019-01-16 at 08:35 +0100, Hannes Reinecke wrote: > If the device is _not_ removable we should not start the event > poller as the media will not go away. Having the event poller running > will block the open() call as it will try to flush outstanding > events, > which it can't if the devic

Re: [PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-16 Thread Bart Van Assche
On Wed, 2019-01-16 at 10:57 -0500, Douglas Gilbert wrote: > The block layer assumes scsi_request:sense is always a valid > pointer. This is set up once in scsi_mq_init_request() and the > containing scsi_cmnd object is used often, being re-initialized > by scsi_init_command(). That works unless som

Re: [PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-16 Thread Douglas Gilbert
On 2019-01-16 6:56 p.m., Bart Van Assche wrote: On Wed, 2019-01-16 at 10:57 -0500, Douglas Gilbert wrote: The block layer assumes scsi_request:sense is always a valid pointer. This is set up once in scsi_mq_init_request() and the containing scsi_cmnd object is used often, being re-initialized by

Re: [ANNOUNCE] v4 sg driver: ready for testing

2019-01-16 Thread Douglas Gilbert
There is an update to the SCSI Generic (sg) v4 driver adding synchronous and asynchronous bidi command support. Plus lots of fixes and some minor improvements. See: http://sg.danny.cz/sg/sg_v40.html The kernel code is split in two in the tarball below, one targeting lk 5.0 and the other targe

Re: [PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-16 Thread Bart Van Assche
On Wed, 2019-01-16 at 19:54 -0500, Douglas Gilbert wrote: > On 2019-01-16 6:56 p.m., Bart Van Assche wrote: > > On Wed, 2019-01-16 at 10:57 -0500, Douglas Gilbert wrote: > > > The block layer assumes scsi_request:sense is always a valid > > > pointer. This is set up once in scsi_mq_init_request() a

Re: lk 4.20.0 sd: 'Unaligned partial completion (resid=3584, sector_sz=4096)' forever

2019-01-16 Thread Martin K. Petersen
Doug, > except the I_T nexus on which the command causing the change was > received with the additional sense code set to CAPACITY DATA HAS > CHANGED." > > So seeing I'm using the I_T nexus that sent the FORMAT UNIT, then no > Unit Attention is expected, as per above. But that assumes that ther

Re: [PATCH v1 5/8] scsi: ufs: qcom: Expose the reset controller for PHY

2019-01-16 Thread Martin K. Petersen
Kishon, > On 12/01/19 4:31 AM, Evan Green wrote: >> Expose a reset controller that the phy can use to perform its >> initialization in a single callback. >> >> Also, change the use of the phy functions from ufs-qcom such that >> phy_poweron actually fires up the phy, and phy_poweroff actually >

Re: [PATCH v2 0/7] sd patches for kernel v5.1

2019-01-16 Thread Martin K. Petersen
Bart, > If any changes have been left out that is the result of an > oversight. Can you clarify which changes you think are missing? It appears you got everything. Things were just sliced and diced slightly differently. I'll run some tests and apply unless something breaks. Thanks again for d

Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2

2019-01-16 Thread Ching Huang
This patch series are against to mkp's 5.1/scsi-queue. 1. Due to dma_zalloc_coherent will be phase out, so use dma_alloc_coherent to replace it. 2. Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2. 3. Update driver version to v1.40.00.10-20190116 ---

[PATCH 1/3] scsi: arcmsr: Use dma_alloc_coherent to replace dma_zalloc_coherent

2019-01-16 Thread Ching Huang
>From Ching Huang Due to dma_zalloc_coherent will be phase out, so use dma_alloc_coherent to replace it. Signed-off-by: Ching Huang --- diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 9f85d5a..5736434 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/

[PATCH 2/3] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2

2019-01-16 Thread Ching Huang
>From Ching Huang Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2. Signed-off-by: Ching Huang --- diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index a94c513..b98c632 100755 --- a/drivers/scsi/arcmsr/arcmsr.h +++ b/drivers/scsi/arcmsr/arcmsr.h @@ -508,9 +508,9 @@ str

[PATCH 3/3] scsi: arcmsr: Update driver version to v1.40.00.10-20190116

2019-01-16 Thread Ching Huang
>From Ching Huang Update driver version to v1.40.00.10-20190116. Signed-off-by: Ching Huang --- diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index b98c632..6033bcc 100755 --- a/drivers/scsi/arcmsr/arcmsr.h +++ b/drivers/scsi/arcmsr/arcmsr.h @@ -49,7 +49,7 @@ str

[PATCH 0/3] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2

2019-01-16 Thread Ching Huang
This patch series are against to mkp's 5.1/scsi-queue. 1. Due to dma_zalloc_coherent will be phase out, so use dma_alloc_coherent to replace it. 2. Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2. 3. Update driver version to v1.40.00.10-20190116 ---

RE: [PATCH] scsi: ufs: revamp string descriptor reading

2019-01-16 Thread Winkler, Tomas
> > Hello Tomas, > > > > > > > > Define new a type: uc_string_id for easier string handling and less > > > casting. Reduce number or string copies in price of a dynamic > > > allocation. > > > > > > Signed-off-by: Tomas Winkler > > Tested-by: Avri Altman > > > > Just one nit - doesn't really matt