Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Add the kryo-l2-accessors driver to the build.
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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]
|
|
Until now, the decision if phy calibration is according to rate A or
rate B values, was done in the phy driver. It made the phy dependent on
the ufs unipro which is unnecessary binding.
This change moves the decision into the ufs driver, and pass it through
a function parameter to the calibration routine in the phy driver.
Change-Id: I7a51d84142c31da57ba5de6ec98526e5c7d1b544
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
|
|
Previous code enables runtime pm before ufshcd_init() is completed,
and before the hba struct is stored in the platform device private
data. This means that pm runtime calls will have null hba pointer
as well as partially initialized driver.
Instead, enable pm runtime only after ufshcd_init() is done and
after hba struct is stored in the platform device private data.
Change-Id: I8225736916a9eda3d9f58d2b0e2566065766b914
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
|
|
QUniPro controller requires additional configuration before and after
clock scaling, this change adds the support for it.
Change-Id: I0add27ff3ab54f72b8b79e1e554541c2e492a4c8
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
|
|
Some UFS host controller implementation may require vendor specific
configurations before and after changing the UFS controller
clock frequencies. This change adds the support for this.
Change-Id: Id4171ef8786fa6883d9af914dc2a675cb62c6a72
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[venkatg@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
|
|
Newer UFS controllers (revision 2) still need to be validated properly
hence disable the low power modes for it until they are validated
thoroughly.
Also run the UFS interface in PWM gear until High Speed Gear operation
is stabililized.
Change-Id: I310b49030d084557f487f3095fc7e1cfa68335e6
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
|