Re: [PATCH-v2 2/2] target/iblock: Use -EAGAIN/-ENOMEM to propigate SAM BUSY/TASK_SET_FULL

2016-03-06 Thread Christoph Hellwig
On Sun, Mar 06, 2016 at 01:55:15PM -0800, Nicholas A. Bellinger wrote: > The intended use is for any make_request_fn() based driver that invokes > bio_endio() completion directly, and sets bi_error != 0 to signal > non GOOD status to target/iblock. But -EAGAIN and -ENOMEM are not valid drivers

RE: [PATCH resend 1/2] be2iscsi: Remove unnecessary synchronize_irq() before free_irq()

2016-03-06 Thread Jitendra Bhivare
>-Original Message- >From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- >ow...@vger.kernel.org] On Behalf Of Lars-Peter Clausen >Sent: Friday, March 04, 2016 3:45 PM >To: James E.J. Bottomley; Martin K. Petersen >Cc: Sathya Prakash; Chaitra P B; Suganath Prabu Subramani; Jitendra

RE: [PATCH] be2iscsi: set the boot_kset pointer to NULL in case of failure

2016-03-06 Thread Jitendra Bhivare
>-Original Message- >From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- >ow...@vger.kernel.org] On Behalf Of Maurizio Lombardi >Sent: Friday, March 04, 2016 3:12 PM >To: jayamohan.kallic...@avagotech.com >Cc: ketan.muka...@avagotech.com; sony.j...@avagotech.com; linux-

Re: [PATCH-v2 2/2] target/iblock: Use -EAGAIN/-ENOMEM to propigate SAM BUSY/TASK_SET_FULL

2016-03-06 Thread Nicholas A. Bellinger
On Sat, 2016-03-05 at 22:19 -0800, Christoph Hellwig wrote: > On Sat, Mar 05, 2016 at 02:51:27PM -0800, Nicholas A. Bellinger wrote: > > > I think you;d be much better off killing ib_bio_err_cnt and having > > > an ib_error that gets set to the last / most server error. > > > > That's what I was

Re: [PATCH v6 00/17] add fixes, device quirks, error recovery,

2016-03-06 Thread Martin K. Petersen
> "Yaniv" == Yaniv Gardi writes: Yaniv, When you resubmit a patch series it is your responsibility to tag the (unchanged) patches based on the reviews you got. You just dropped all the Reviewed-by: tags you got from Hannes in v5. You can not expect people on the list

[PATCH v6 07/17] scsi: ufs: disable vccq if it's not needed by UFS device

2016-03-06 Thread Yaniv Gardi
Some UFS devices don't require VCCQ rail for device operations hence this change adds support to recognize such devices and remove vote for the unused VCCQ rail. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi ---

[PATCH v6 17/17] scsi: ufs-qcom: add printouts of testbus debug registers

2016-03-06 Thread Yaniv Gardi
This change adds printouts of testbus and debug registers. Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs-qcom.c | 77 + drivers/scsi/ufs/ufs-qcom.h | 9 ++ 2 files changed, 86 insertions(+) diff --git

[PATCH v6 06/17] scsi: ufs: separate device and host quirks

2016-03-06 Thread Yaniv Gardi
Currently we use the host quirks mechanism in order to handle both device and host controller quirks. In order to support various of UFS devices we should separate handling the device quirks from the host controller's. Reviewed-by: Gilad Broner Signed-off-by: Raviv Shvili

[PATCH v6 15/17] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2016-03-06 Thread Yaniv Gardi
Some UFS devices (and may be host) have issues if LCC is enabled. So we are setting PA_Local_TX_LCC_Enable to 0 before link startup which will make sure that both host and device TX LCC are disabled once link startup is completed. Signed-off-by: Yaniv Gardi ---

[PATCH v6 14/17] scsi: ufs: add device quirk delay before putting UFS rails in LPM

2016-03-06 Thread Yaniv Gardi
We put the UFS device in sleep state & UFS link in hibern8 state during runtime suspaned. After this we put all the UFS rails in low power modes immediately but it seems some devices may still draw more than sleep current from UFS rails (especially from VCCQ rail) atleast for 500us. To avoid this

[PATCH v6 09/17] scsi: ufs: add error recovery after DL NAC error

2016-03-06 Thread Yaniv Gardi
Some vendor's UFS device sends back to back NACs for the DL data frames causing the host controller to raise the DFES error status. Sometimes such UFS devices send back to back NAC without waiting for new retransmitted DL frame from the host and in such cases it might be possible the Host UniPro

[PATCH v6 02/17] scsi: ufs: avoid spurious UFS host controller interrupts

2016-03-06 Thread Yaniv Gardi
When control reaches to Linux UFS driver during UFS boot mode, UFS host controller interrupt status/enable registers may have left over settings. In order to avoid any spurious interrupts due to these left overs, it's important to clear these interrupt status/enable registers before enabling UFS

[PATCH v6 13/17] scsi: ufs: fix leakage during link off state

2016-03-06 Thread Yaniv Gardi
Currently when we try to put the link in off/disabled state during suspend, it seems link is not being kept in low power mode. This patch fixes the issue by putting the link in hibern8 first (so device also puts the link in low power mode) and then stop the host controller. Signed-off-by: Subhash

[PATCH v6 08/17] scsi: ufs: make error handling bit faster

2016-03-06 Thread Yaniv Gardi
UFS driver's error handler forcefully tries to clear all the pending requests. For each pending request in the queue, it waits 1 sec for it to get cleared. If we have multiple requests in the queue then it's possible that we might end up waiting for those many seconds before resetting the host.

[PATCH v6 05/17] scsi: ufs: add support to read device and string descriptors

2016-03-06 Thread Yaniv Gardi
This change adds support to read device descriptor and string descriptor from a UFS device Reviewed-by: Gilad Broner Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs.h| 1 +

[PATCH v6 04/17] scsi: ufs: verify hba controller hce reg value

2016-03-06 Thread Yaniv Gardi
Sometimes due to hw issues it takes some time to the host controller register to update. In order to verify the register has updated, a polling is done until its value is set. In addition the functions ufshcd_hba_stop() and ufshcd_wait_for_register() was updated with an additional input

[PATCH v6 10/17] scsi: ufs: add retry for query descriptors

2016-03-06 Thread Yaniv Gardi
Query commands have 100ms timeout and it may timeout if they are issued in parallel to ongoing read/write SCSI commands, this change adds the retry (max: 10) in case command timeouts. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi ---

[PATCH v6 11/17] scsi: ufs: handle non spec compliant bkops behaviour by device

2016-03-06 Thread Yaniv Gardi
We are seeing that some devices are raising the urgent bkops exception events even when BKOPS status doesn't indicate performace impacted or critical. Handle these device by determining their urgent bkops status at runtime. Signed-off-by: Subhash Jadavani Signed-off-by:

[PATCH v6 16/17] scsi: ufs-qcom: enable/disable the device ref clock

2016-03-06 Thread Yaniv Gardi
This change enables the device ref clock before changing to HS mode and disables it if entered to PWM mode. Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs-qcom.c | 12 drivers/scsi/ufs/ufshcd.h | 9 + 2 files changed, 21 insertions(+) diff

[PATCH v6 03/17] scsi: ufs: implement scsi host timeout handler

2016-03-06 Thread Yaniv Gardi
A race condition exists between request requeueing and scsi layer error handling: When UFS driver queuecommand returns a busy status for a request, it will be requeued and its tag will be freed and set to -1. At the same time it is possible that the request will timeout and scsi layer will start

Re: [PATCH v5 15/15] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2016-03-06 Thread ygardi
> On 02/28/2016 09:32 PM, Yaniv Gardi wrote: >> Some UFS devices (and may be host) have issues if LCC is >> enabled. So we are setting PA_Local_TX_LCC_Enable to 0 >> before link startup which will make sure that both host >> and device TX LCC are disabled once link startup is >> completed. >> >>

[PATCH v6 12/17] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2016-03-06 Thread Yaniv Gardi
Optimal values of local UniPro parameters like PA_Hibern8Time & PA_TActivate can help reduce the hibern8 exit latency. If both host and device supports UniPro ver1.6 or later, these parameters will be automatically tuned during link startup itself. But if either host or device doesn't support

[PATCH v6 00/17] add fixes, device quirks, error recovery,

2016-03-06 Thread Yaniv Gardi
V6: as per comment, patch 15/15 in V5 was divided into 3 patches in V6 V5: as per comment, patch 05/14 in V4, was divided into 2 patches in V5 V4: fixed DOS EOL symbols in 2 new files V3: Due to comments in V2 Removed change 02/17 of V2 Removed change 03/17 of V2 Removed change 17/17 of V2

[PATCH v6 01/17] scsi: ufs-qcom: add number of lanes per direction

2016-03-06 Thread Yaniv Gardi
Different platform may have different number of lanes for the UFS link. Add parameter to device tree specifying how many lanes should be configured for the UFS link. Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi ---

Re: [PATCH v5 03/15] scsi: ufs: implement scsi host timeout handler

2016-03-06 Thread ygardi
> On 03/03/2016 05:10 PM, yga...@codeaurora.org wrote: >>> On 03/01/2016 09:25 PM, yga...@codeaurora.org wrote: > On 02/28/2016 09:32 PM, Yaniv Gardi wrote: >> A race condition exists between request requeueing and scsi layer >> error handling: >> When UFS driver queuecommand