- 10 11月, 2015 4 次提交
-
-
由 Yaniv Gardi 提交于
In order to simplify the code a set of wrapper functions is created to test and call each of the variant operations. Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Reviewed-by: NGilad Broner <gbroner@codeaurora.org> Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Yaniv Gardi 提交于
This patch adds ufshcd_get_variant() and ufshcd_set_variant() routines in order to get/set the variant specific data. Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Reviewed-by: NGilad Broner <gbroner@codeaurora.org> Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Yaniv Gardi 提交于
This change is required in order to be able to build the component as a module. Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Reviewed-by: NGilad Broner <gbroner@codeaurora.org> Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Yaniv Gardi 提交于
This change fixes a compilation warning that happens if SCSI_UFS_QCOM is compiled as a module. Also this patch fixes an error happens when insmod the module: "ufs_qcom: module license 'unspecified' taints kernel." Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Reviewed-by: NGilad Broner <gbroner@codeaurora.org> Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 15 6月, 2015 1 次提交
-
-
由 Suthikulpanit, Suravee 提交于
Signed-off-by: NSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Cc: Vinayak Holikatti <vinholikatti@gmail.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 03 6月, 2015 10 次提交
-
-
由 Yaniv Gardi 提交于
Newer revisions of QUALCOMM Technologies UFS host controller may not advertise the correct version information in UFS HCI VER register. To handle this, enable UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION to let UFS standard host controller driver call into vendor specific operation to get right UFS HCI VER register value. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
Some host controller hardware controllers may not advertise correct version in UFS HCI VER register. To workaround this, add new quirk and call the host controller hardware vendor specific callback to get the correct UFS HCI version register value. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
Current version of host controller on QUALCOMM Technologies requires this quirk to be enabled, as DME commands to device must be sent only in AUTO mode (SLOW AUTO or FAST AUTO). Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
Some UFS host controllers may only allow accessing the peer DME attribute in AUTO mode (FAST AUTO or SLOW AUTO) hence we had added a quirk for switching to AUTO power mode before accessing the peer DME attribute. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
With the G3 UFS devices, changing gear into HS is failing in UFS host controllers of version 0x2. The quirk solves the problem of changing gear into HS by enabling the attribute that specifies whether or not the inbound Link supports unterminated line in HS mode. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
The attribute PA_RXHSUNTERMCAP specifies whether or not the inbound Link supports unterminated line in HS mode. enabling this attribute to 1 fixes moving to HS gear. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
LCC (Line Control Command) are being used for communication between UFS host and UFS device. But UFS host controller on QUALCOMM Technologies have an issue with issuing the LCC commands to UFS device and hence this quirk is enabled in order to to disable LCC from the host side. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
LCC (Line Control Command) are being used for communication between UFS host and UFS device. New commercial UFS devices don't have the issues with LCC processing but UFS host controller might still have the issue with LCC processing, hence, added a routine to disable TX LCC on the device. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
Current versions of UFS host controllers on QUALCOMM Technologies have interrupt aggregation logic broken. Interrupt aggregation may not work if both threshold count and timeout is enabled. Hence disable interrupt aggregation by enabling UFSHCD_QUIRK_BROKEN_INTR_AGGR quirk until its fixed in the newer UFS host controller revisions. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
UFS HCI (Host Controller Interface) allows the transfer requests interrupts to be aggregated to generate the single interrupt but this can impact the performance. Hence introduce the capability which gives choice to use the interrupt aggregation capability or not. By default interrupt aggregation capability is kept disabled. This change also introduces a quirk for broken interrupt aggregation feature, as in some UFS controllers, this feature may not work. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
- 25 5月, 2015 1 次提交
-
-
由 Stephen Boyd 提交于
This device only exists on platforms under ARCH_QCOM, not ARCH_MSM. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Reviewed-by: NYaniv Gardi <ygardi@codeaurora.org> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
- 10 4月, 2015 2 次提交
-
-
由 Yaniv Gardi 提交于
Some implementation of UFS host controller HW might have some non-standard behaviours (quirks) when compared to behaviour specified by UFSHCI specification. This patch add support to allow specifying all such quirks to standard UFS host controller driver so standard driver takes them into account. In this change a UFSHCD_QUIRK_DELAY_BEFORE_DME_CMDS is introduced, where a minimum delay of 1ms is required before DME commands for stability purposes. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NGilad Broner <gbroner@codeaurora.org> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
由 Yaniv Gardi 提交于
Sometimes, specific information about the UFS controller revision is required in order to determine certain operations or execute controller dependent quirks. In order to avoid reading the controller revision multiple times, we simply read it once and save this information in internal structure. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NGilad Broner <gbroner@codeaurora.org> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
- 10 3月, 2015 1 次提交
-
-
由 Bjorn Andersson 提交于
The function regulator_set_optimum_mode() is changing name to regulator_set_load(), so update the code accordingly. Also cleaned up ufshcd_config_vreg_load() while touching the code. Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 1月, 2015 1 次提交
-
-
由 Yaniv Gardi 提交于
This change adds support for Qualcomm Technologies Inc platforms that use UFS driver. for example, it adds : - PM specific operations during hibern8, suspend, resume, clock setup - qcom-ufs generic phy driver initialization, calibration, power-on/off sequence, etc. - UFS Controller specific configuration - Rate, Gear, Mode negotiation between device and controller Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Reviewed-by: NDov Levenglick <dovl@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 09 1月, 2015 1 次提交
-
-
由 Hannes Reinecke 提交于
Convert sense buffer logging to use the per-cpu buffer to avoid line breakup. Tested-by: NRobert Elliott <elliott@hp.com> Reviewed-by: NRobert Elliott <elliott@hp.com> Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 15 12月, 2014 1 次提交
-
-
由 Rafael J. Wysocki 提交于
After commit b2b49ccb (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under drivers/scsi/ and in include/scsi/scsi_device.h. Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: NAaron Lu <aaron.lu@intel.com> Acked-by: NChristoph Hellwig <hch@lst.de>
-
- 26 11月, 2014 2 次提交
-
-
由 Akinobu Mita 提交于
If no voltage supply regulators are defined for the UFS devices (assumed they are always-on), ufshcd_config_vreg_load() can be called on suspend/resume paths with vreg == NULL as hba->vreg_info.vcc* equal to NULL, and it causes NULL pointer dereference. This fixes it by making ufshcd_config_vreg_{h,l}pm noop when no regulators are defined. Signed-off-by: NAkinobu Mita <mita@fixstars.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Akinobu Mita 提交于
When dynamic clk gating feature is enabled, delayed workqueue machanism is used in order to detect certain period of inactivity. But there is no guarantee that scheduled gating work is completed before module unloading. So it can cause kernel crash by accessing memory after it was freed. Fix it by cancelling clk gating and ungating works and ensure that its execution is finished before module unloading. Signed-off-by: NAkinobu Mita <mita@fixstars.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 24 11月, 2014 2 次提交
-
-
由 Christoph Hellwig 提交于
Drop the now unused reason argument from the ->change_queue_depth method. Also add a return value to scsi_adjust_queue_depth, and rename it to scsi_change_queue_depth now that it can be used as the default ->change_queue_depth implementation. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
由 Christoph Hellwig 提交于
All drivers use the implementation for ramping the queue up and down, so instead of overloading the change_queue_depth method call the implementation diretly if the driver opts into it by setting the track_queue_depth flag in the host template. Note that a few drivers validated the new queue depth in their change_queue_depth method, but as we never go over the queue depth set during slave_configure or the sysfs file this isn't nessecary and can safely be removed. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Reviewed-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NVenkatesh Srinivas <venkateshs@google.com>
-
- 21 11月, 2014 6 次提交
-
-
由 Dolev Raviv 提交于
This patch fixes newly introduced static checker warning in ufshcd_parse_clock_info, introduced by UFS power management series. Warning: drivers/scsi/ufs/ufshcd-pltfrm.c:138 ufshcd_parse_clock_info() warn: passing devm_ allocated variable to kfree. 'clkfreq' To fix it we remove the kfree(clkfreq) statement. In addition we removed the redundant goto label. Signed-off-by: NDolev Raviv <draviv@codeaurora.org> Reviewed-by: NMaya Erez <merez@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Dolev Raviv 提交于
This patch fixes newly introduced static checker warning in __ufshcd_setup_clocks, introduced by UFS power management series. Warning: drivers/scsi/ufs/ufshcd.c:4474 __ufshcd_setup_clocks() warn: we tested 'ret' before and it was 'false' To fix it we remove the (!ret) from the condition. Signed-off-by: NDolev Raviv <draviv@codeaurora.org> Reviewed-by: NMaya Erez <merez@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Dolev Raviv 提交于
This patch fixes newly introduced static checker warning in ufshcd_populate_vreg, introduced by UFS power management series. Warning: drivers/scsi/ufs/ufshcd-pltfrm.c:167 ufshcd_populate_vreg() warn: missing error code here? 'devm_kzalloc()' failed. 'ret' = '0' To fix it we return -ENOMEM and skip the message print. Signed-off-by: NDolev Raviv <draviv@codeaurora.org> Reviewed-by: NMaya Erez <merez@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Dolev Raviv 提交于
This patch fixes newly introduced sparse warning in ufshcd_system_suspend, introduced by UFS power management series. Sparse warning: drivers/scsi/ufs/ufshcd.c:5118 ufshcd_system_suspend() error: we previously assumed 'hba' could be null (see line 5089) To fix it, we return 0 in case HBA is not initialized or is not powered. Signed-off-by: NDolev Raviv <draviv@codeaurora.org> Reviewed-by: NMaya Erez <merez@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Yaniv Gardi 提交于
After link start-up power mode will always be PWM G1. This is not reflected in the pwr_info struct which will keep the previous values. Since ufshcd_change_power_mode() tries to avoid unnecessary power mode change if the requested power mode and current power mode are same, power mode change won't execute again after driver initialization. This patch solves the problem by setting pwr_info to PWM G1 after link start-up. Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Signed-off-by: NDolev Raviv <draviv@codeaurora.org> Reviewed-by: NMaya Erez <merez@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Akinobu Mita 提交于
UFS driver adds three well known LUs in the initialization, but those reference counts are not decremented, so it makes ufshcd module impossible to unload. This fixes it by putting scsi_device_put() in the initalization, and in order to protect concurrent access to hba->sdev_ufs_device (UFS Device W-LU) from manual delete, increment the reference count while requesting device power mode setting. The rest of W-LUs (hba->sdev_boot and hba->sdev_rpmb) are not directly used from driver, so these references in struct ufs_hba are removed. Signed-off-by: NAkinobu Mita <mita@fixstars.com> Reviewed-by: NMaya Erez <merez@codeaurora.org> Reviewed-by: NDolev Raviv <draviv@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 12 11月, 2014 6 次提交
-
-
由 Christoph Hellwig 提交于
ufs never looks at the tag type, so there is no need to set it either. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
由 Christoph Hellwig 提交于
Now that we also get proper values in cmd->request->tag for untagged commands, there is no need to force tagged_supported to on in drivers that need host-wide tags. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
由 Christoph Hellwig 提交于
Remove the tagged argument from scsi_adjust_queue_depth, and just let it handle the queue depth. For most drivers those two are fairly separate, given that most modern drivers don't care about the SCSI "tagged" status of a command at all, and many old drivers allow queuing of multiple untagged commands in the driver. Instead we start out with the ->simple_tags flag set before calling ->slave_configure, which is how all drivers actually looking at ->simple_tags except for one worke anyway. The one other case looks broken, but I've kept the behavior as-is for now. Except for that we only change ->simple_tags from the ->change_queue_type, and when rejecting a tag message in a single driver, so keeping this churn out of scsi_adjust_queue_depth is a clear win. Now that the usage of scsi_adjust_queue_depth is more obvious we can also remove all the trivial instances in ->slave_alloc or ->slave_configure that just set it to the cmd_per_lun default. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Reviewed-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Christoph Hellwig 提交于
Allow a driver to ask for block layer tags by setting .use_blk_tags in the host template, in which case it will always see a valid value in request->tag, similar to the behavior when using blk-mq. This means even SCSI "untagged" commands will now have a tag, which is especially useful when using a host-wide tag map. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NHannes Reinecke <hare@suse.de>
-
由 Hannes Reinecke 提交于
Open-code scsi_print_result in sd.c, and cleanup logging to not print duplicate informations. Also remove the call to scsi_show_result() in ufshcd.c to be consistent with other callers of scsi_execute(). With that we can remove scsi_show_result in constants.c Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NRobert Elliott <elliott@hp.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Hannes Reinecke 提交于
We should be using the standard dev_printk() variants for sense code printing. [hch: remove __scsi_print_sense call in xen-scsiback, Acked by Juergen] [hch: folded bracing fix from Dan Carpenter] Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NRobert Elliott <elliott@hp.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 20 10月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 01 10月, 2014 1 次提交
-
-
由 Dolev Raviv 提交于
- Adding some of the definitions missing in unipro.h, including power enumeration. - Read Modify Write Line helper function - Indication for the type of suspend Signed-off-by: NDolev Raviv <draviv@codeaurora.org> Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-