diff options
| author | Yaniv Gardi <ygardi@codeaurora.org> | 2013-11-04 11:01:41 +0200 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 10:56:00 -0700 |
| commit | 894fa0c22d369d4ee2cd50c826b1fca3aef200ac (patch) | |
| tree | 2401f4751e739af002d766afafd5ac3bf20f758a /drivers/scsi | |
| parent | cb6bbbdc025716138284000dab3501cd8b1887e5 (diff) | |
scsi: ufs-msm: add support for rx and tx to work in different num of lanes
Uni-pro lane management provides flexibility for tx/rx to work with
different number of lanes.
This change supports different number of lanes for TX and for RX.
The configured number of lanes for TX will be now the minimum between
the device capability and the vendor preferences.
Same logic applies when configuring RX number of lanes.
Change-Id: I9387a4489d910f89a0741c6349084051d7d94549
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Diffstat (limited to 'drivers/scsi')
| -rw-r--r-- | drivers/scsi/ufs/ufs-msm.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/scsi/ufs/ufs-msm.c b/drivers/scsi/ufs/ufs-msm.c index 3c94bae3ab0a..76e834081108 100644 --- a/drivers/scsi/ufs/ufs-msm.c +++ b/drivers/scsi/ufs/ufs-msm.c @@ -1501,8 +1501,6 @@ static int get_pwr_dev_param(struct ufs_msm_dev_params *msm_param, int arr[NUM_OF_SUPPORTED_MODES] = {0}; int i; int min_power; - int min_dev_lanes; - int min_msm_lanes; int min_msm_gear; int min_dev_gear; bool is_max_dev_hs; @@ -1541,15 +1539,12 @@ static int get_pwr_dev_param(struct ufs_msm_dev_params *msm_param, } /** - * we would like rx and tx to work in the same number of lanes - * the minimum number of lanes between rx and tx of the device - * capabilities and the vendor preferences determines to how many - * lanes we shall configure the device + * we would like tx to work in the minimum number of lanes + * between device capability and vendor preferences. + * the same decision will be made for rx. */ - min_dev_lanes = min_t(u32, dev_max->lane_rx, dev_max->lane_tx); - min_msm_lanes = min_t(u32, msm_param->rx_lanes, msm_param->tx_lanes); - dev_req->lane_rx = dev_req->lane_tx = - min_t(u32, min_dev_lanes, min_msm_lanes); + dev_req->lane_tx = min_t(u32, dev_max->lane_tx, msm_param->tx_lanes); + dev_req->lane_rx = min_t(u32, dev_max->lane_rx, msm_param->rx_lanes); if (dev_max->pwr_rx == SLOW_MODE || dev_max->pwr_rx == SLOWAUTO_MODE) |
