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

2016-03-08 Thread Hannes Reinecke
On 03/08/2016 08:58 PM, yga...@codeaurora.org wrote: >> On 03/08/2016 02:01 PM, Hannes Reinecke wrote: >>> On 03/08/2016 01:35 PM, Yaniv Gardi wrote: A race condition exists between request requeueing and scsi layer error handling: When UFS driver queuecommand returns a busy status

Re: [PATCH 1/1] sd: do not let LBPME bit stop the VPDs speak

2016-03-08 Thread Tom Yan
Example device, JMicron JMS567 UAS SATA bridge: [tom@localhost ~]$ sudo sg_readcap -16 /dev/sdc Read Capacity results: Protection: prot_en=0, p_type=0, p_i_exponent=0 Logical block provisioning: lbpme=0, lbprz=0 Last logical block address=468862127 (0x1bf244af), Number of logical

Re: [PATCH 1/1] sd: do not let LBPME bit stop the VPDs speak

2016-03-08 Thread Tom Yan
Btw, why SD_MAX_WS16_BLOCKS (which is used for both SD_LBP_WS16 and SD_LBP_UNMAP) is set to 0x7f (23-bit) instead of 0x (32-bit, 4-byte)? Tried to read the commit message but no explanation about that is available there:

[PATCH 1/1] sd: do not let LBPME bit stop the VPDs speak

2016-03-08 Thread tom . ty89
From: Tom Yan Some devices have details of their support on unmapping on the Block Limits and/or Logical Block Provisioning VPDs while they do not set the LBPME bit to 1. Though this is required by the SCSI standards, the VPDs are giving even more concrete details about the

Re: [PATCH 0/7] Miscellaneous patches to support cxlflash in PowerVM

2016-03-08 Thread Martin K. Petersen
> "Uma" == Uma Krishnan writes: Uma> The first 5 patches of this series contain fixes to support the Uma> cxlflash driver in a PowerVM guest. For the cxlflash driver to be Uma> functional in a PowerVM guest, a corresponding set of cxl patches Uma> (currently being

Re: [PATCH] scsi: storvsc: fix SRB_STATUS_ABORTED handling

2016-03-08 Thread Martin K. Petersen
> "Vitaly" == Vitaly Kuznetsov writes: Vitaly> Commit 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling Vitaly> of SRB status flags") filtered SRB_STATUS_AUTOSENSE_VALID out Vitaly> effectively making the (SRB_STATUS_ABORTED | Vitaly> SRB_STATUS_AUTOSENSE_VALID)

Re: [PATCH resend 2/2] mpt3sas: Remove unnecessary synchronize_irq() before free_irq()

2016-03-08 Thread Martin K. Petersen
> "Lars-Peter" == Lars-Peter Clausen writes: Lars-Peter> Calling synchronize_irq() right before free_irq() is quite Lars-Peter> useless. On one hand the IRQ can easily fire again before Lars-Peter> free_irq() is entered, on the other hand free_irq() itself Lars-Peter> calls

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

2016-03-08 Thread Martin K. Petersen
> "Maurizio" == Maurizio Lombardi writes: Maurizio> In beiscsi_setup_boot_info(), the boot_kset pointer should be Maurizio> set to NULL in case of failure otherwise an invalid pointer Maurizio> dereference may occur later. Applied to 4.5/scsi-fixes. Thanks! -- Martin

Re: [PATCH] sd: Fix discard granularity when LBPRZ=1

2016-03-08 Thread Martin K. Petersen
> "Bart" == Bart Van Assche writes: Bart> Please fix the spelling of "deterministic" in the patch Bart> description. With or without that change: Bart> Reviewed-by: Bart Van Assche Fixed, thanks! -- Martin K. Petersen Oracle

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

2016-03-08 Thread ygardi
> On 03/08/2016 02:01 PM, Hannes Reinecke wrote: >> On 03/08/2016 01:35 PM, Yaniv Gardi wrote: >>> 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

Re: [PATCH v2 0/3] scsi: reduce CONFIG_SCSI_CONSTANTS=y impact by 8k

2016-03-08 Thread Rasmus Villemoes
On Tue, Nov 24 2015, Rasmus Villemoes wrote: > This reduces the impact of choosing CONFIG_SCSI_CONSTANTS by about 8KB. > ping? does anyone feel like picking these up? Rasmus -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a

Re: [PATCH 7/7] cxlflash: Increase cmd_per_lun for better throughput

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Manoj N. Kumar" With the current value of cmd_per_lun at 16, the throughput over a single adapter is limited to around 150kIOPS. Increase the value of cmd_per_lun to 256 to improve throughput. With this change a single

Re: [PATCH 4/7] cxlflash: Simplify attach path error cleanup

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" The cxlflash_disk_attach() routine currently uses a cascading error gate strategy for its error cleanup path. While this strategy is commonly used to handle cleanup scenarios, it is too restrictive when

Re: [PATCH 6/7] cxlflash: Fix to avoid unnecessary scan with internal LUNs

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Manoj N. Kumar" When switching to the internal LUN defined on the IBM CXL flash adapter, there is an unnecessary scan occurring on the second port. This scan leads to the following extra lines in the log: Dec 17

Re: [PATCH 3/7] cxlflash: Split out context initialization

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" Presently, context information structures are allocated and initialized in the same routine, create_context(). This imposes an ordering restriction such that all pieces of information needed to

Re: [PATCH 1/7] cxlflash: Simplify PCI registration

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Manoj N. Kumar" The calls to pci_request_regions(), pci_resource_start(), pci_set_dma_mask(), pci_set_master() and pci_save_state() are all unnecessary for the IBM CXL flash adapter since data buffers are not required to

Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id

2016-03-08 Thread Chris Leech
On Fri, Feb 12, 2016 at 09:38:53AM -0800, Lee Duncan wrote: > The scsi_transport_iscsi module already uses the ida_simple > routines for managing the target ID, if requested to do > so. This change replaces an ever-increasing atomic integer > that tracks the session ID itself with the ida_simple >

Re: [PATCH] sd: Fix discard granularity when LBPRZ=1

2016-03-08 Thread Bart Van Assche
On 03/05/2016 03:10 PM, Martin K. Petersen wrote: Commit 397737223c59 ("sd: Make discard granularity match logical block size when LBPRZ=1") accidentally set the granularity to one byte instead of one logical block on devices that provide determistic zeroes after UNMAP. Signed-off-by: Martin K.

guter Tag

2016-03-08 Thread ludvig
guter Tag Sie benötigen eine zuverlässige und kostengünstige Darlehen zu einem Zinssatz von 3% Refinanzierung und Ihr Unternehmen / Investitionen verbessern? UniCredit bietet eine zuverlässige und vertrauenswürdige Darlehen Dienstleistungen. wenn Sie überhaupt interessant uns, kontaktieren Sie

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

2016-03-08 Thread ygardi
> On 03/08/2016 01:35 PM, Yaniv Gardi wrote: >> 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

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

2016-03-08 Thread Hannes Reinecke
On 03/08/2016 02:01 PM, Hannes Reinecke wrote: > On 03/08/2016 01:35 PM, Yaniv Gardi wrote: >> 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

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

2016-03-08 Thread Hannes Reinecke
On 03/08/2016 01:36 PM, Yaniv Gardi wrote: > This change enables the device ref clock before changing to HS mode > and disables it if entered to PWM mode. > > Reviewed-by: Gilad Broner > Signed-off-by: Yaniv Gardi > > --- >

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

2016-03-08 Thread Hannes Reinecke
On 03/08/2016 01:36 PM, Yaniv Gardi wrote: > This change adds printouts of testbus and debug registers. > > Reviewed-by: Gilad Broner > Signed-off-by: Yaniv Gardi > > --- > drivers/scsi/ufs/ufs-qcom.c | 77 >

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

2016-03-08 Thread Hannes Reinecke
On 03/08/2016 01:36 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. > >

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

2016-03-08 Thread Hannes Reinecke
On 03/08/2016 01:35 PM, Yaniv Gardi wrote: > 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

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

2016-03-08 Thread Yaniv Gardi
This change adds support to read device descriptor and string descriptor from a UFS device Reviewed-by: Gilad Broner Reviewed-by: Hannes Reinecke Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi ---

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

2016-03-08 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

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

2016-03-08 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. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi

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

2016-03-08 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. Reviewed-by: Hannes Reinecke Acked-by: Rob Herring Signed-off-by: Gilad Broner

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

2016-03-08 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 v7 02/17] scsi: ufs: avoid spurious UFS host controller interrupts

2016-03-08 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 v7 12/17] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2016-03-08 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 v7 13/17] scsi: ufs: fix leakage during link off state

2016-03-08 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. Reviewed-by: Hannes

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

2016-03-08 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 v7 11/17] scsi: ufs: handle non spec compliant bkops behaviour by device

2016-03-08 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. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash

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

2016-03-08 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 v7 16/17] scsi: ufs-qcom: enable/disable the device ref clock

2016-03-08 Thread Yaniv Gardi
This change enables the device ref clock before changing to HS mode and disables it if entered to PWM mode. Reviewed-by: Gilad Broner Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs-qcom.c | 12 drivers/scsi/ufs/ufshcd.h | 9

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

2016-03-08 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. Reviewed-by: Gilad Broner Signed-off-by:

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

2016-03-08 Thread Yaniv Gardi
This change adds printouts of testbus and debug registers. Reviewed-by: Gilad Broner Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufs-qcom.c | 77 + drivers/scsi/ufs/ufs-qcom.h | 9 ++ 2 files

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

2016-03-08 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 Reviewed-by: Hannes

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

2016-03-08 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. Reviewed-by: Hannes Reinecke Signed-off-by: Subhash Jadavani

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

2016-03-08 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 v7 00/17] add fixes, device quirks, error recovery,

2016-03-08 Thread Yaniv Gardi
V7: updated patches with "Reviewed-by" and "Acked-by" tags 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

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

2016-03-08 Thread Dolev Raviv
>> 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

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

2016-03-08 Thread ygardi
Hello, Hannes, Re-sending thanks, Yaniv >> 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

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

2016-03-08 Thread ygardi
Hello, Hannes, Re-sending thanks, Yaniv >> 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

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

2016-03-08 Thread Maurizio Lombardi
On 03/08/2016 03:03 AM, Martin K. Petersen wrote: >> "Maurizio" == Maurizio Lombardi writes: > > Maurizio, > > Maurizio> In beiscsi_setup_boot_info(), the boot_kset pointer should be > Maurizio> set to NULL in case of failure otherwise an invalid pointer > Maurizio>