Commit graph

563575 commits

Author SHA1 Message Date
Yaniv Gardi
877d77d0b9 scsi: ufs-qcom: remove unnecessary call to get controller revision
Since "major", "minor" and "step" are now being saved in
struct ufs_qcom_host, there is no need to call
ufs_qcom_get_controller_revision() here. In addition, those local
variables are not in use in this routine.

Change-Id: I2606f87fc5e54b45a86240c1bccdd8c47009e11a
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 10:59:29 -07:00
Krishna Konda
c7082b7844 scsi: ufs-qcom-ice: fix ice_status assignment error
Instead of assigning a value to the variable pointed to by
ice_status, the ice_status pointer is changed to NULL. This
is incorrect and this change fixes that error.

Change-Id: I10516635c73cd459341991a4c6f11c0ed6bda71f
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
2016-03-22 10:59:28 -07:00
Yaniv Gardi
cb194ae228 scsi: ufs: extend UFS fault injection capability
This change extends the UFS fault injection framework.
It defines multiple fault injection scenarios, and data structures
that hold optional error codes for each error scenario.
When error is being injected, an error code is being randomly chosen
from the enabled error codes.

Change-Id: Id844c765f9fd3590f86f9ae0efdb43d275bdb646
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 10:59:27 -07:00
Gilad Broner
7f59f4e70a scsi: ufs: use "sector_range" in "ufs_long" unit-tests
Use the user-defined sector_range instead of the previously hard-coded
TEST_MAX_SECTOR_RANGE. If the user does not supply a sector_range, this
variable will default to 512MiB.
For the long sequential tests, sector_range will define the size of the
sequential I/O to submit. For the long random tests, sector_range will
define the range in which to submit random I/O as well as the total size
of the random I/O which is defined by the combination of sector_range and
LONG_RAND_TEST_REQ_RATIO.

Change-Id: Ifc7332e6def75c49448aadbebd35b7b9b3903447
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 10:59:27 -07:00
Gilad Broner
ee581331ca block: test-iosched: fix bio allocation for test requests
Unit tests submit large requests of 512KB made of 128 bios.
Current allocation was done via kmalloc which may not be able
to allocate such a large buffer which is also physically contiguous.
Using kmalloc to allocate each bio separately is also problematic as
it might not be page aligned. Some bio may end up using more than a
single memory segment which will fail the mapping of the bios to
the request which supports up to 128 physical segments.
To avoid such failure, allocate a separate page for each bio
(bio size is single page size).

Change-Id: Id0da394d458942e093d924bc7aa23aa3231cdca7
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[venkatg@codeaurora.org: dropped block/test-iosched and mmc_test
related changes]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 10:59:26 -07:00
Gilad Broner
0a6dd896be block: test-iosched: enable running of simultaneous tests
Current test-iosched design enables running only a single test
for a single block device.
This change modifies the test-iosched framework to allow running
several tests on several block devices.

Change-Id: I051d842733873488b64e89053d9c4e30e1249870
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to removal of BKOPs UT]
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[venkatg@codeaurora.org: dropped block/test-iosched and mmc_test
related changes]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 10:59:25 -07:00
Gilad Broner
0010166a41 scsi: ufs-test: disable write descriptor query test
Multi-query test fails on write descriptor requests becuase it
tries to write to the unit descriptor which is read-only according
to the spec.
The only writeable descriptors are the configuration and OEM ID
string descriptors which will be non-trivial to use.
Avoid sending write descriptor query for the time being, and replace
it with a read descriptor operation.

Change-Id: Ic121d9ff20f144e724df5436f9dbd44cde72e97d
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 10:59:24 -07:00
Lee Susman
bd3323565f scsi: ufs: adapt UFS unit-tests for running also on external UFS card
It was found that the UFS unit tests fail when they are run on an external
UFS device. This happens when the external UFS device is suspended while
running the unit-tests, and the un-natural flow of test-iosched does
not resume the UFS driver and device in the correct manner.
We solve this by using the block layer power management API for running
the request queue, as well as explicitly resuming the device before
running the unit-tests.

Change-Id: I8273d4dd4f32e91bad28c019c159696cf8fabb42
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 10:59:23 -07:00
Lee Susman
30979eb263 scsi: ufs: add data integrity test to ufs unit tests
This testcase checks data integrity in a random I/O usecase.
The test writes QUEUE_MAX_REQUESTS (usually 118) requests of size 4KB
to randomly and uniquely chosen LBAs. A different pattern is written
to each LBA (pattern written is index of LBA). After successfully writing,
the test reads from the above LBAs and verifies the pattern.

Change-Id: I09c6dda12834f06ae393411501f443bfd058dea4
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 10:59:22 -07:00
Maya Erez
bf0f645acb scsi: ufs: expose APIs to allow compiling ufs_test as a module
The UFS tests are used for testing the functionality and performance
of the UFS driver. In some of the tests ufs_test uses several scsi
and UFS APIs for getting the disc information and sending UFS
specific commands.
The used APIs should be exposed in order to allow compilation
of ufs_test as a module.

Change-Id: I1263429bd3d5172af3b5552f0b8b503e32a04e51
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 10:59:21 -07:00
Dolev Raviv
279fdf9c3a test-iosched: ufs_test: fix gendisk usage in test
Adding a new access api for gendisk without using scsi private
headers.
This patch fixes multiple errors:
1. Relative include path in ufs_test.c to <../sd.h>
2. Allowing suspend after first test run.

Change-Id: I152d34667ab63790b643abb55111fc5b67c90ac9
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[merez@codeaurora.org: fix trivial conflicts in ufs_test.c]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts,
use scsi_disk_get instead of __scsi_disk_get]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 10:59:20 -07:00
Lee Susman
94df812520 scsi: ufs: add test case string for long random tests
Add missing test name strings to long random tests.
These test names are used to distinguish between test case when running
automatic tests.

Change-Id: I1d375eb3cfdd2ae645ba086b7e3121026f3652ae
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 10:59:19 -07:00
Lee Susman
6c27c43e7c scsi: ufs: fix sector increment in ufs_long_seq_test
Currently, request sector is incremented in the long sequential test
using a calculation which assumes the device logical block size is
512B (equal to sector size) but this is not the case.
This patch changes the calculation to be correct, using the test bio size,
and assuming sector size is 512B.

Change-Id: I807be243b65834edf9201488a849777e43bb658a
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 10:59:18 -07:00
Lee Susman
d4cf62968e scsi: ufs: add long random read/write unit tests
Generalize the long_sequential_test framework to execute long random read
and long random write tests as well.
The random tests submit a large number of 4KB requests to randomly chosen
LBAs. Currently the tests are defined to read/write 64MB.

Change-Id: I9d797c0d61d863b2a9fbcd593a1be9065202ef76
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: fix trivial conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 10:59:18 -07:00
Lee Susman
580910dcef scsi: ufs: add check_completion_fn to long_sequential unit test
This patch adds a completion condition to the long sequential unit test.
The condition is the completion of ALL the requests that where created.
Before this condition, the calculated test throughput was not accurate
since the transfered size was not constant.
This patch also increases the request size to the maximum - 128 bios.
In addition, the calculated throughput is always printed to the log.

Change-Id: Ibc16dc60486ff2b58cbc8ce02aee2ad87fea7ba1
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 10:59:17 -07:00
Lee Susman
0f26d7cf9a scsi: ufs: fix's to ufs_lun_depth unit test
This patch fixes the ufs unit test case "lun_depth" to work properly.
In cases where nutrs == lun_qdepth, 0 was an argument for the random
number generating function, which returned bogus numbers as a result.
In this patch we distinguish between equality and inequality cases, where
in the equality case we remove the irrelevant test cases.

Change-Id: Id7967e894e9d4d0fa1e250852895debcefcbf818
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 10:59:16 -07:00
Lee Susman
c5761a4b7a scsi: ufs: fix's to ufs_parallel test
This patch fixes the ufs unit test case "parallel_read_write_test"
to work properly. Changes are mainly in the logic deciding on the toggle
of request direction.

Change-Id: I3ba60421de1afb05dca780d82fcf10b9910a0bc1
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2016-03-22 10:59:15 -07:00
Dolev Raviv
d5098866ba scsi: ufs: Unit test fixes
Match new unit descriptor size definition.
Update logging with:
- prefix with module name
- add '\n' in the end
- test_pr_* removed

Change-Id: Ic086f9b62c5431ba85a667b771e930ea96d253e0
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 10:59:14 -07:00
Dolev Raviv
e39c9f9b7e scsi: ufs: ufs device queue depth test
This test is trying to stress the edge cases of the UFS device queue.
This queue has two such edges, the total queue depth and the command per
LU. To test those edges properly, two deviations from the edge in addition
to the edge are tested as well. One deviation will be fixed (1), and the
second will be picked randomly.
The test will fill a request queue with random read requests. The amount
of request will vary each iteration and will be either the one of the
edges or the sum of this edge with one deviations.
Only reads or only writes will be tested within each iteration.

Change-Id: Ib02a63b2c8d6898f01e418a617ccc79eba67dab5
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 10:59:13 -07:00
Dolev Raviv
f0e8866cef scsi: ufs: random parallel read and write test
Tests stability on scenarios of multiple threads running random reads
and random writes.
The test introduces the infrastructure for more complex multi-threaded
tests.

Change-Id: I3775f61c65d90d093e4a5b9a9a3e6724f68b5185
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 10:59:12 -07:00
Dolev Raviv
79d8df4453 scsi: ufs: multiple queries test
Sends parallel queries with a pseudo random command. The test sends 33
queries, to make sure at least the queue depth is reached.
It tests stability in case of multiple queries.

Change-Id: I00f5992b495d17696d2ae50b510253a96ce5c979
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[merez@codeaurora.org: fix conflicts due to exiting changes in 3.14]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 10:59:12 -07:00
Dolev Raviv
2ca1be32b2 scsi: ufs: mixed long sequential
The test will verify correctness of sequential data pattern
written to the device while new data (with same pattern) is
written simultaneously.
First this test will run a long sequential write scenario.
This first stage will write the pattern that will be read
later. Second, sequential read requests will read and
compare the same data. The second stage reads, will issue in
Parallel to write requests with the same LBA and size.
NOTE: The test requires a long timeout.

The purpose of this test is to mix read and write requests on the same
LBA while checking for the read data correctness.

Change-Id: I6a437ce689b66233af3055d07a7f62f1e7b40765
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[venkatg@codeaurora.org: dropped block/test-iosched changes]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 10:59:11 -07:00
Dolev Raviv
6bb2201614 scsi: ufs: add support for test specific completion check
Introduce a new callback 'check_test_completion_fn' to test-iosched
framework. This callback is necessary to determine if a test has
completed or not in situation where the request queue is empty, but the
test was not completed.

Change-Id: I60bd8cccffacab11a5a7cba78caccf53fea3e1d8
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
[venkatg@codeaurora.org: dropped block/test-iosched changes]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 10:59:10 -07:00
Dolev Raviv
e6628ef0a2 scsi: ufs: rework unit test infrastructure
Upgrade the APIs used.
Encapsulate test ops (read/write/open functions) and dentry creation
in macros.
Fix naming collisions with mmc tests.

Change-Id: I5c48b369beaf902f8187ced9d884a2149a8644f0
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
2016-03-22 10:59:09 -07:00
Lee Susman
29cfc516b3 scsi: ufs: long sequential read/write tests
This test adds the ability to test the UFS task management feature
in the driver. It loads the queue with requests in order to allow
the task management to operate in full capacity.

Modify test-iosched infrastructure to support the new tests:
- expose  check_test_completion()

Note: we submit 16-bio requests since the current HW is very slow
and we don't want to exceed the timeout duration.

Change-Id: I8ee752cba3c6838d8edc05747fa0288c4b347ef6
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: fix trivial conflicts in ufs_test.c]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: dropped test-iosched changes]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 10:59:08 -07:00
Subhash Jadavani
c004818cad scsi: ufs-qcom: disable clock scaling
There is possible race condition between clock scaling and clock gating
work, disabling clock scaling until proper fix for the race condition is
found.

Change-Id: Id5c65ac3454f51164d84c033c1e0a56dee951120
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:59:07 -07:00
Gilad Broner
80cb9e5fe7 scsi: ufs: fix static code analysis issues
Running static code analysis tools on the UFS driver code reported
a few issues: non-static functions, usage of pointer after is it freed
and non-initialized variable.
This change fixes these issues.

Change-Id: I0bcc11b057033866fff07a70754fa1751dbc729c
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts, skipped changes
to ufs_test.c]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:59:06 -07:00
Gilad Broner
57ef59d9b2 scsi: ufs: implement scsi host timeout handler
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 error handling for it. The scsi layer reuses
the request and its tag to send error related commands to the device,
however its tag is no longer valid.
As this request was never really sent to the device, there is no
point to start error handling with the device.
Implement the scsi error handling timeout callback and bypass SCSI
error handling for request that were not actually sent to the device.
For such requests simply reset the block layer timer. Otherwise, let
SCSI layer perform the usual error handling.

Change-Id: Iebed05c95a61f7dcf0a177e5c371b6575ead54d8
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 10:59:06 -07:00
Gilad Broner
c5c33e40b8 scsi: ufs: retry failed query flag requests
UFS flag query requests may fail sometimes due to timeouts etc.
Add a wrapper function to retry up to 10 times in case of such
failure, similar to retries being made for attribute queries.

Change-Id: Ie3ea4b3c516481e9ec176ab9db884a8a75cd33f9
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:59:05 -07:00
Krishna Konda
dc20c1b847 scsi: ufs-qcom: update the bio data stcuture
The 3.14 kernel has changed the members of the bio data structure. This
change updates those data structures referenced in the ufs qcom ice
driver.

Change-Id: I60e982bce8f59b87c30e0f63999914ee5c401f0a
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
2016-03-22 10:59:04 -07:00
Subhash Jadavani
295bcc19e7 scsi: ufs-qcom-ice: add support for register interface changes
This change adds support for following changes in register interface for
newer UFS controllers:
The register UFS_ICE_CTRL_INFO_n_1 contains 32-bit LSB of crypto data-unit
base number. The register UFS_ICE_CTRL_INFO_n_2 contains 32-bit MSB of the
crypto data-unit base number. The register UFS_ICE_CTRL_INFO_n_3 contains
bitfields BYPASS, CNFG_KEY_INDX, and CDU_SIZE.

Change-Id: I2a9b0b87e912a876e46746431c75e32a0e21a1c6
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
2016-03-22 10:59:03 -07:00
Gilad Broner
cd64baf8a1 scsi: ufs: convert statistics macros to functions
Kernel coding style requires to use actual functions for
function-like or lengthy macros.
The statistics macros are such, so replace them with functions.

Change-Id: I464768ccb7ba5bba4149dc45adacd777c08a2413
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 10:59:02 -07:00
Gilad Broner
1478bf7fa3 scsi: ufs: verify command tag validity
A race condition appear to exist between request completion when
scsi_done() is called to end the request and set the tag back to
-1 (at blk_queue_end_tag() scsi_end_request), and scsi layer error
handling which aborts the command and reuses it to request sense
data. Sending the request sense is done with tag which was set to -1
and so it is invalid.
Assert command tag passed from scsi layer is valid.

Change-Id: I71b82e1e6aca4bbf316a2a732a42c564ab0d2248
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:59:01 -07:00
Gilad Broner
2d109dcf97 scsi: ufs: remove debugfs entries on driver unloading
debugfs entries that were set up on driver initialization
were not removed in the driver unloading path.
Added removal of the debugfs entries.
Also, cleaned up the unnecessary macro wrapping those functions.

Change-Id: I656b1f76713684547d1f9ca3aa75430b47bd5eff
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 10:59:00 -07:00
Subhash Jadavani
43b632cb97 scsi: ufshcd: fix possible unclocked register access
vendor specific setup_clocks ops may depend on clocks managed by ufshcd
driver so if the vendor specific setup_clocks callback is called when
the required clocks are turned off, it results into unclocked register
access.

This change make sure that required clocks are enabled before vendor
specific setup_clocks callback is called.

Change-Id: I670c6b69aa361eb5023ef7d945ff45c3fa986fd7
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 10:58:59 -07:00
Gilad Broner
25245a746c scsi: ufs: add missing memory barriers
Performing several writes to UFS host controller registers has
no gurrantee of ordering, so we must make sure register writes
to setup request list base address etc. are performed before the
run/stop register is enabled.
In addition, when setting up a task request, we must make sure
the updating of descriptors takes places before ringing the
doorbell, similarly to setting up a transfer request.

Change-Id: I740331fe94da3cf8a8e7faee9020c88889aadea3
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 10:58:59 -07:00
Gilad Broner
d791fc7234 scsi: ufs: add host state prints in failure cases
Whenever some UFS failure occurs the driver prints the UFS
registers in order to help with analysis of the failure.
However this may not be sufficient in some cases, so having
the host controller state as it is represented and managed in
the driver will contribute to analysis efforts.
Added prints of various fields in the hba struct which may be
of interest.

Change-Id: I8385a6b40f6937f07d8f0f0c51f5cf36babf7515
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:58:58 -07:00
Subhash Jadavani
04825be019 scsi: ufs-qcom: disable lane symbol clocks if link is not active
UFS lane symbol clocks can be disabled if the UFS link is not active,
this change adds support to vote these clocks off when link is inactive.

Change-Id: Id441d34b0b8ad4f3a3f3e0dacb8c9797b1de64b6
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:58:57 -07:00
Subhash Jadavani
01955a9ec9 scsi: ufs-qcom: enable power management features
UFS power management features (clock gating & scaling, Hibern8 on Idle)
are kept disabled until they are verified on latest UFS host controller.
Now that they are verified on newer host controller, this change enables
them.

Change-Id: I9fb94ee58ab5fbbd5d22a0190624e1a8839060f0
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:58:56 -07:00
Subhash Jadavani
978703baab scsi: ufs-qcom: skip update secure configuration
On latest UFS PHY HW revisions, UFS host controller secure configuration
is retained even during UFS host controller power collapse so we can
skip restoring the secure configuration after coming out of power collapse.

Change-Id: I6cb882c99bd621622286c0f045cbefd9c1b1a0b7
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:58:55 -07:00
Gilad Broner
65b6feb781 scsi: ufs: add instance number to UFS debug-fs entry
UFS exposes a debug-fs directory with various information under
the name "ufs", which will not scale in case more than one UFS
controller is available in the system.
Add the instance number (inherited from the scsi host number) to
the debug-fs entry name.

Change-Id: I1a31be72b90c26cc840219d7ba2944ec4c0bc8f8
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:58:54 -07:00
Gilad Broner
2aa36bf1f9 scsi: ufs: add request completion time statistics
When running benchmarks on a system and inspecting the effect of
performance related changes it can be useful to know in a
simple way how long it takes for UFS requests to complete.
Add statistics for UFS requests completion times and measure
minimum, maximum and average completion times for all requests
and also according to request type: read, write and flush.

Change-Id: I85639d629939e3ae3bba6de065ceadae0da3dc99
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:58:53 -07:00
Gilad Broner
9eccb6a00d scsi: ufs: fix tag statistics for flush requests
rq_data_dir(rq) will always be either READ or WRITE so conditional
logic could never classify a request as a flush request causing
flush statistics to always be zero.
In addition it is neccesary to check the request type is FS in
order not to count other request type as read/write.

Change-Id: I678203ba47f8296caefa3f197566f2c65abdf059
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-22 10:58:52 -07:00
Yaniv Gardi
741bd793f5 scsi: ufs: minimize exposure of ufs header files
Until now, the phy-qcom-ufs-*.* files used ufs data structures and
macros and thus, we had to expose most of them in include/linux/scsi/ufs
path. But now, after removing support for phy 28nm in apq8084 under
kernel 3.14, we can minimize the exposure of code to essential minimum.
To do that, we relocate the ufs.h, unipro.h, ufshcd.h and ufs-qcom.h
files back to reside internally in the driver.

Also this patch contains some very minor changes suggested by the
upstream checkpatch script.

Change-Id: Id2a923a6a0b1c76565c25f2797a666f3a0d1315f
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: fixed header includes and other
trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 10:58:52 -07:00
Devesh Jhunjhunwala
832a53931e soc: qcom: Include the kryo-l2-accessors driver in build
Add the kryo-l2-accessors driver to the build.

Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-03-22 10:58:51 -07:00
Devesh Jhunjhunwala
f910a321bd clk: msm: Add documentation for gdsc regulator driver
This is a snapshot of gdsc-regulator documentation as of
msm-3.18 commit:

e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-03-22 10:58:50 -07:00
Maya Erez
de8b5072ec scsi; ufs: compile UFS unit tests as module
UFS Unit tests are used by test teams to test stability
and performance of the UFS driver.
They are inactive unless manually activated and do not impact the
functionality of the UFS driver.

Change-Id: I41ae523dce60b05bb57554f9f8f38c42dbdea4a7
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-22 10:58:49 -07:00
Subhash Jadavani
465485894a scsi: ufs-qcom: allow HS-G3 on newer host controllers.
HS-G3 mode is working as expected with newer host controller revisions
hence this change removes the restriction of only running in PWM gears.

Change-Id: I4df0b6875455730e990a20a2810784f1c32d949f
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-03-22 10:58:48 -07:00
Yaniv Gardi
0fe711f7ea scsi: ufs: renaming "debugfs" files with correct prefix
The old names doesn't include the driver name (as prefix or at all).
This change adds the "ufs" and the "ufs-qcom" prefix to file names
and by that creates uniform naming convention in the driver.

Change-Id: I221b489cc4237882d7e62a9d80bc1ee3f2bcf4a6
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
2016-03-22 10:58:47 -07:00
Gilad Broner
3a18ae55d2 scsi: ufs: don't use FTRACE_EVENT_ENABLED macro
Trace events have their own trace_<name>_enabled() function
that can be called in order to check if its enabled or not.
FTRACE_EVENT_ENABLED is redundant and will be dropped so
use the trace event function instead.

Change-Id: I4d2cc031ebbd5250bcff9526eaa916d6d691dbfc
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts]
2016-03-22 10:58:46 -07:00