Commit graph

571240 commits

Author SHA1 Message Date
ChandanaKishori Chiluveru
8b910ce20e usb: gadget: f_mtp: Fix mtp enumeration failure issue
If cable is disconnected while send_file work is in progress,
Endpoints will be disabled and state will be marked as OFFLINE.
As a part of endpoint disable pending requests will be retire out
with -ECONNRESET error. Due to this we will modify the device state
as ERROR in completion callback. If the state is not offline then
we will mark the device state to ready in send_file_work. This results
in mtp driver to not returning any error for next mtp_write operation
and mtp release will not be called.

Hence fix this issue by adding a proper check in completions to not
moving device state to ERROR in case of disconnect.

Change-Id: Idb4e075c89bdf94790a321bc464d30eba546eeaa
Signed-off-by: ChandanaKishori Chiluveru <cchilu@codeaurora.org>
2016-06-10 15:15:10 -07:00
Hemant Kumar
0a9a9f3fe1 usb: gadget: f_mtp: Change the icon to camera for PTP composition
The existing code shows the phone icon in 'My Computer' of windows host,
for PTP composition.
Create a new Extended Configuration Descriptor for PTP composition and
update the compatibleID to display a camera icon for PTP composition.

Change-Id: If286c5b80874a95be0b5ecc533d0e5c7a14f39d3
Signed-off-by: Azhar Shaikh <azhars@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-06-10 15:14:33 -07:00
Hemant Kumar
79dc83a8cb usb: gadget: f_mtp: Add support to capture time taken with vfs_write/read
This change captures time taken by each vfs_read() and vfs_write() call
made from USB MTP gadget driver where data size is equal to USB request
buffer size. It provides debugfs entry to get this information for 100
such call and resetting the same.

How-To use:
To get stats:
cat /sys/kernel/debug/usb_mtp/status
To reset stats:
echo 0 > /sys/kernel/debug/usb_mtp/status

Change-Id: I252e830568704e9e557660c1ae0f7597823e4b17
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-06-10 15:14:24 -07:00
Hemant Kumar
9f9acf870f usb: gadget: f_mtp: Fix issue of NULL pointer access in mtp_read
MTP usb device node created as a part of mtp function init call.
Userspace can read/write to MTP device using this node. If MTP is
not enabled in the composition and trying to read mtp_usb dev node
from the userspace leading to null pointer access in mtp_read.

Do not access ep OUT maxpacket size in mtp_read. First block on mtp_read
until the state become online which doesn't wakeup from the thread and
expecting for the read completion or state change which occurs as
a part of set_alt.

Change-Id: Icbee5fe7ae2c02b2bca185a0dc7587eb4940058a
Signed-off-by: ChandanaKishori Chiluveru <cchilu@codeaurora.org>
Signed-off-by: Azhar Shaikh <azhars@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-06-10 15:14:12 -07:00
Hemant Kumar
ff1259b38e USB: gadget: Implement COMPAT_IOCTL for ioctls
32-bit userspace calling into 64-bit kernel
cause different ioctl codes to get generated.
The different ioctl code gets generated
because sizeof is used on mtp and accessory
structures which is different for 32/64
compilation. Because of this, 64-bit kernel
can never execute the right ioctl command.

Implement compat_ioctl to handle such
execution environment.

Change-Id: I26cc10986e28a28eab6f3c65f28f4d2b808112d9
Signed-off-by: Sujeet Kumar <ksujeet@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-06-10 15:14:01 -07:00
Hemant Kumar
78ece44dc6 USB: gadget: f_mtp: Fix bug in receive_file work
If cable is disconnected while receive_file work is in progress,
there is a case where mtp driver returns -ECANCELLED instead of
-EIO. This results in mtp server thread not getting disconnect
notification and mtp release will not be called. Due to this, mtp
server will not start mtp connection after next USB connection.

Change-Id: I909bebe0d22c19329cebb0a4a76424e08c82328c
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-06-10 15:13:49 -07:00
Hemant Kumar
fa1ac1406a USB: gadget: mtp: Fix bug in freeing memory on allocation failure
Current driver code doesn't handle the memory allocation failure
correctly and ends up leaking memory and trying to free
unallocated one.

Change-Id: I7e3527b7e08ccfe566d85e3009d8a015d8daa707
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-06-10 15:13:37 -07:00
Gaurav Singhal
917e41ac91 NFC: Error handling correction in probe
Error handling check added in probe function and
memory cleanup in remove function.

Change-Id: Ic8f02dcc89e716ec88b711496d1e43754b95968d
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
2016-06-10 15:13:25 -07:00
Shubhraprakash Das
87574457d0 msm: camera: isp: Enable write master for stats
In vfe 48 version the stats write masters have to be enabled
in addition to enabling the stats module. Add code to do this.
Also, the stop of write master was not programmed correctly, fix
this.

CRs-Fixed: 999619
Change-Id: Ic5b38b038508802b0b5779dc5d54ec6772f24b65
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2016-06-10 15:13:13 -07:00
Skylar Chang
27fe1d5a53 ARM: dts: msm: vote for PCNOC from IPA on msmcobalt
Add a new voting path to IPA bus scaling from master CPU
to slave IPA_CFG. This is needed in order to achieve peak
throughput on SW bridge path.

CRs-Fixed: 983795
Change-Id: I25a00441f91087a370764b451ecc73a49a75b0a6
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-06-10 15:13:01 -07:00
Subhash Jadavani
7ddb4e75b6 scsi: ufs: fix comments in ufshcd_quirk_tune_host_pa_tactivate
Comments for ufshcd_quirk_tune_host_pa_tactivate() function doesn't
match the purpose of it. This change fixes the comments to describe
what function is actually doing.

Change-Id: I462a750aa6ee69f588b4bbcf5cb030f9e7292951
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-06-10 15:11:35 -07:00
Sunil Paidimarri
238f9c0973 msm: ipa: Add napi support to rmnet ipa device
Add napi framework to use napi API's to poll
embedded data from IPA HW.

Change-Id: Icb6ec9d060ca4fb02e95c1e98bded89422bb1fff
CRs-Fixed: 1002026
Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2016-06-10 15:11:23 -07:00
Osvaldo Banuelos
e639e800ed input: qpnp-power-on: use restart reason bits based upon PON GEN
Support using 7 bits in the SOFT_RB_SPARE PON register if the
PON peripheral is GEN2, otherwise use only 6 bits. This allows
compatibility with bootloader code on targets with older PMICs
where 7 bits for restart reasons are not necessary.

Change-Id: Ibf7fc53d3ff7084b252a44c44e3ce29326659787
CRs-Fixed: 1023239
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-06-10 15:11:11 -07:00
Harry Yang
338cc814ce qcom-charger: qpnp-smb2: update usb type on PD_ACTIVE
There is a race condition between setting PD_ACTIVE = 0 and when losing CC.
If PD_ACTIVE is not set to 0 by the time the TYPE_C interrupt fires on
disconnect then the POWER_SUPPLY_TYPE will not be set to UNKNOWN.

Instead of relying on PD_ACTIVE being set to 0 before the TYPE_C interrupt
fires, just update the type upon PD_ACTIVE being set.

CRs-Fixed: 1017798
Change-Id: Icd62b9d98d5763d209c7de897653f19f8031e236
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-06-09 15:12:42 -07:00
Shubhraprakash Das
fd7c4dad24 msm: camera: isp: Vote bandwidth to 0 when shutting vfe
When vfe is shutdown vote the bandwidth to 0 otherwise the
higher bandwidth will leak power.

Change-Id: I69e1570fe2bdb2e0b5bc14eb2dc158fe504ce921
CRs-Fixed: 999619
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2016-06-09 15:12:26 -07:00
Andrey Markovytch
110aebe867 scsi: ufs: ICE 3.0 changes
ICE 3.0 crypto sequences were changed, CTRL_INFO register
no longer exists and doesn't need to be configured. The configuration
is done via utrd.

Change-Id: I5d69436ec59476fc5cd427458d79f8c99266f243
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-06-09 15:12:13 -07:00
Andrey Markovytch
a15fd37785 qseecom: added small sleep between busy-wait calls to TZ
In case of time penalty coming from TZ side when the wrong password
is entered too many times, there should be sleep between the scm calls
to give other HLOS tasks opportunity to run. Otherwise starvation may
occur.

Change-Id: I345a9b6c82fb5e591d8bdcf48afed48ccaafddc3
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-06-09 15:11:59 -07:00
Ajay Singh Parmar
a7425ea0ed msm: mdss: hdmi: add deep color support
Get deep color support information from sink's EDID (Extended Data
Identification Data). Enable deep color output in hdmi transmitter
if the sink supports RGB 30bpp output format.

CRs-Fixed: 1022772
Change-Id: If65ac051253b4e51f6af5cd60f98eaf908b3bcfd
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-06-09 15:11:46 -07:00
Tatenda Chipeperekwa
6883526d93 ARM: dts: msm: add MDSS HDMI device support for msmcobalt
Add the HDMI Core's device node and its regulators, GPIOs, pin
control and other related data to device tree.

Change-Id: I4373fc9be34d7f49059159256cfd6dca045ff39f
CRs-Fixed: 1022772
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-06-09 15:11:33 -07:00
Tatenda Chipeperekwa
2f48a33bfa ARM: dts: msm: setup external clock sources for HDMI clocks
The HDMI RCGs exported by the MMSS clock controller (MMSS-CC)
can be sourced out of the HDMI PLL which is outside the MMSS-CC.
Set up these external clock sources to point to the HDMI PLL clocks.

CRs-Fixed: 1022772
Change-Id: Ief169f5c456dbdb989788a0147342fe91f0a836f
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-06-09 15:11:20 -07:00
Tatenda Chipeperekwa
36e50acd73 ARM: dts: msm: add MDSS HDMI PLL device node for msmcobalt
List all the resources needed by the MDSS HDMI PLL device and add
the corresponding device node for msmcobalt. The HDMI PLL is the
source for all the branch clocks needed to drive pixel data over
the HDMI interface.

CRs-Fixed: 1022772
Change-Id: I4cf25e531fea39f7b68bd5ef6edd89243c1ded21
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-06-09 15:11:06 -07:00
Ajay Singh Parmar
a62fad3997 clk: msm: hdmi: add cobalt hdmi pll calculator and clocks
Add PLL and PHY programming for HDMI. Dynamically calculate
the register values to be programmed for a given pixel clock.

CRs-Fixed: 1022772
Change-Id: Ibf7877eb6edd29baefee57bc12188989d897d47e
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-06-09 15:10:52 -07:00
Subhash Jadavani
464c437792 defconfig: msm8996: enable SD card support for 8996 boards
This change enables the SD card driver support for 8996 boards.

Change-Id: I0e7df68587e1a212e6c2ed7171fcd683cf115604
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-06-09 15:10:37 -07:00
Kuirong Wang
6b60470da0 ASoC: msm: Add EC reference support for USB audio ADSP solution
Add EC reference support for USB audio ADSP solution so that
the USB audio rx can be used for echo cancellation.

Change-Id: If99081c1fd356e69710c94441affec92fac24075
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2016-06-09 15:10:23 -07:00
Alan Kwong
638f6bb9e2 Revert "ARM: dts: msm: Add v4l2 rotator node to msm8996"
This reverts commit 152fc477d3 ("ARM: dts: msm: Add v4l2
 rotator node to msm8996").

Smmu attachment failure is reported on v4l2 rotator in devsp.
Revert v4l2 rotator node back to mdss rotator node in devsp
until the smmu issue is resovled.

CRs-Fixed: 1025431
Change-Id: I25a9412c32ddb5d55379b9e96c91f246f6bd4aa9
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
2016-06-09 15:10:10 -07:00
Viswanadha Raju Thotakura
71a1b15ffd ARM: dts: msm: Add flash nodes to camera on msmcobalt
Add support for camera flash operation.
Add status property for csiphy, csid camera nodes.

CRs-Fixed: 1021009
Change-Id: Ifa62e4e4662d72904411ff4dda10a29a76962851
Signed-off-by: Viswanadha Raju Thotakura <viswanad@codeaurora.org>
2016-06-09 15:09:58 -07:00
Joonwoo Park
8c8a1a12e8 sched: avoid potential race between governor and thermal driver
It's possible thermal driver and governor notify that fmax is being
changed at the same time.  In such case we can potentially skip updating
of CPU's capacity.  Fix this by updating capacity always when limited
fmax is changed by same entity.

Meanwhile serialize sched_update_cpu_freq_min_max() with spinlock since
this function can be called by multiple drivers at the same time.

Change-Id: I3608cb09c30797bf858f434579fd07555546fb60
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-06-09 15:09:45 -07:00
Neeraj Upadhyay
b33996c5b4 defconfig: msm: Add MSMFALCON in defconfig
Add arch_msmfalcon and pinctrl in defconfig.

Change-Id: Ie622624676c648cb109e62d3dcf0601222b291c9
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2016-06-09 15:09:26 -07:00
Neeraj Upadhyay
84e1573bd0 ARM: dts: msm: Add initial device tree files for MSMFALCON
Add the device tree files necessary to support the MSMFALCON
SoC and the MSMFALCON Simulator platform.

Change-Id: Iabdb1c21757ad6dead50fdc4aa3b12077f8f840f
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2016-06-09 15:09:14 -07:00
Kiran Kelageri
52979505f2 Bluetooth: Add ioctl for pin connectivity test
Add ioctl to test slimbus HW interface to implement
pin connectivity factory test.

Change-Id: Ied4c818b0012c733e73ff894470594f9429d9882
Signed-off-by: Kiran Kelageri <kirankelageri@codeaurora.org>
2016-06-09 15:09:00 -07:00
Jeevan Shriram
2421d1ae04 Defconfig: arm64: Enable BTFM in performance defconfig
Enabled BTFM Features in performance defconfig by
default.

Change-Id: I9c007dededd88a7e8bc8c3226507a46046e96bc4
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-06-09 15:08:29 -07:00
Subbaraman Narayanamurthy
f83ca28c28 defconfig: msm-perf: enable QPNP_POWER_ON driver
Enable QPNP_POWER_ON driver for msm-perf_defconfig so that the
input keys can be functional.

CRs-Fixed: 1011669
Change-Id: I9ae7a806a5b659a2c15fa86b37cd1075913095d5
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-06-09 15:08:15 -07:00
Joonwoo Park
96818d6f1d sched: fix potential deflated frequency estimation during IRQ handling
Time between mark_start of idle task and IRQ handler entry time is CPU
cycle counter stall period.  Therefore it's inappropriate to include such
duration as part of sample period when we do frequency estimation.

Fix such suboptimality by replenishing idle task's CPU cycle counter
upon IRQ entry and using irqtime as time delta.

Change-Id: I274d5047a50565cfaaa2fb821ece21c8cf4c991d
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-06-09 15:08:01 -07:00
Joonwoo Park
6e8c9ac98d sched: fix CPU frequency estimation while idle
CPU cycle counter won't increase when CPU or cluster is idle depending
on hardware.  Thus using cycle counter in that period of time can
result in incorrect CPU frequency estimation.  Use previously calculated
CPU frequency when CPU was idle.

Change-Id: I732b50c974a73c08038995900e008b4e16e9437b
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-06-09 15:07:48 -07:00
Joonwoo Park
54c0b0001b sched: preserve CPU cycle counter in rq
Preserve cycle counter in rq in preparation for wait time accounting
while CPU idle fix.

Change-Id: I469263c90e12f39bb36bde5ed26298b7c1c77597
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-06-09 15:07:35 -07:00
Chris Lew
28e33ce739 diag: Update logs, events and messages codes
This change updates the macro definitions to
increase the range on the logs, events and messages.

Change-Id: I8410462b17c5741fb03239377fed18c5f6034b90
CRs-Fixed: 994733
Signed-off-by: Chris Lew <clew@codeaurora.org>
2016-06-08 15:20:45 -07:00
Jack Pham
b5e86ec97a usb: pd: Handle disconnection immediately if SDP
Due to a known PMIC HW bug, hard reset or PR swap may result in
the charger notifying a CC disconnect event in sink mode, in which
case the handler ignores it given these conditions. However, this
closely resembles the case of a non-PD capable source getting
physically disconnected as well. Consisdering the most probable
case of this happening is disconnecting from an SDP while hard
reset was just issued (and will fail), this workaround is currently
racy if repeated plugin/plugout is performed as the timeout to
detect failed hard reset takes a few seconds.

For now, until a HW fix is available, optimize this legacy case
by allowing the disconnect to go through if the detected charger
type is SDP. Also fix the SINK_WAIT_CAP_TIME timeout as it was
incorrectly multiplied by 3 during testing and was not removed.
This will significantly reduce the amount of time for max failed
hard reset attempts for non-PD && non-SDP cases and should decrease
the window for racing with an actual disconnect.

Change-Id: Ic57a369ed1e194ab512b4b86ce4d216df46b5f46
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-06-08 15:20:27 -07:00
Arun Kumar Neelakantam
84f558918f soc: qcom: msm_glink_pkt: Register and wait for link up notification
The user space clients sometimes open the device before the underlying
transport available which results in open error and cause multiple re-tries
from the clients. This leads to excessive logging of open error messages.

Register for link state notification and block the client open until link
available or user define timer expires.

CRs-Fixed: 1018542
Change-Id: I4e56982700f3444f96e1100c0ce272d36d3423a5
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-06-08 15:20:17 -07:00
Dhoat Harpal
05360211f8 soc: qcom: glink: Fix parallel migration issue
During parallel migration race conditions are seen in remote open
and local open ack function.

Edge based lock is introduced to avoid any race condition during
simultaneous migration. Edge lock is shared across multiple
transport of same edge and is stored in a global list.

CRs-Fixed: 1010920
Change-Id: I2b988d2a6112add06fa433c4b1deeec0b6e6bb58
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-06-08 15:20:06 -07:00
Maya Erez
a55a0d7fc7 wil6210: align wil log functions to wil_dbg_ratelimited implementation
Change the implementation of wil log functions for consistency
with __wil_dbg_ratelimited.

Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 8fe2a5f9f9b5a2f26d9d31d350b2323aee13067a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
[merez@coreaurora.org: fixed merge conflicts]
Change-Id: Ie7e073d672a561b768cb62f1e39af24c1d7c3322
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-06-08 15:19:52 -07:00
Mohan Pallaka
9137d71437 defconfig: msmcortex: enable gpio keys module
Enable gpio keys module to support keys

Change-Id: I85c0401c6c47d4988d39ef637c1517916e41e3cb
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2016-06-08 15:19:15 -07:00
Mohan Pallaka
236b83d1ea ARM: dts: msm: add gpio keys support for msmcobalt
Add support for gpio keys on msmcobalt CDP and MTP.
CDP and MTP use pmcobalt gpios 6, 7 and 8 for volume up,
camera snapshot and camera focus respectively. CDP
additionally supports home key through pmcobalt gpio 5.

Change-Id: I31f3ed15e8cf02046cfcc8d9c062522065bb022c
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2016-06-08 15:19:03 -07:00
Chinmay Sawarkar
b2b8dc615f ARM: dts: msm: Fix bus governor for Venus VMEM on msmcobalt
Use the correct bus governor for Venus VMEM.

Change-Id: I9abc6352732c189e90cefaa3eb4161ea6d103529
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2016-06-08 15:18:48 -07:00
Archana Sathyakumar
78b75df117 ARM: dts: msm: Update MPM interrupt mappings for cobalt
Update MPM interrupt mapping to bypass some of the interrupts as per the
HW specification.

Change-Id: Ib6f218989616b038adb7a001cbc6302924041aa1
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2016-06-08 15:18:33 -07:00
Maya Erez
8be22a3241 wil6210: add pm_notify handling
Adding pm_notify to allow the following:
1. Check if suspend is allowed in an earlier stage to prevent
starting the suspend procedure in case it is not allowed
2. Notify the platform driver on the suspend request

Change-Id: Iddacd9b54304b47263647942e1e6784eefb9a6d2
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: e34dc6475a7b25d1aec5de8652a321672904c686
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-06-08 15:18:28 -07:00
Maya Erez
215177e606 wil6210: fix dma mapping error cleanup in __wil_tx_vring_tso
In case we fail to map one of the TSO SKB fragments, we need to
clear all the mapped descriptors, from swhead to swhead+descs_used-1.

Change the desc index calculation to
i = (swhead + descs_used - 1) % vring->size;
to prevent unmpping of (swhead + descs_used) descriptor that wasn't
mapped.

Change-Id: I81b99522ada809fa375c6b6887f8ea0e6482fba3
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: a1526f7eafa434f756579e2bc784b7605f96bf3e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-06-08 15:18:09 -07:00
Maya Erez
b6b5f4b2a2 wil6210: protect wil_vring_fini_tx in parallel to tx completions
napi_synchronize is called before releasing the vring, with the
assumption that setting txdata->enabled to 0 will prevent handling
of this vring in the next scheduled napi.
To guarantee this assumption, a memory barrier is added after disabling
the txdata.
In addition, as the ctx is zeroed in wil_tx_complete after this
descriptor is handled (protected by wmb), ctx needs to be checked
before releasing this descriptor in wil_vring_free.

Change-Id: I7af20f1db39b7e4c5ac2956fc655f120eb61e002
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 34b8886e502a62d1355ccc0420044aa2749a24cd
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-06-08 15:17:51 -07:00
Maya Erez
c89efd08b6 wil6210: guarantee safe access to rx descriptors shared memory
add memory barrier after allocating new rx descriptors, before
updating the hwtail.
This will guarantee that all writes to descriptors (shared memory)
are done before committing them to HW.

Change-Id: If7c91c31b490b0762d23df21db7c30652b0817d4
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: ab6d7cc3eab4093caf91ba8b27590c4080d7d01c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-06-08 15:17:29 -07:00
Maya Erez
848faf10c4 wil6210: fix race conditions between TX send and completion
There are 2 possible race conditions, both are solved by addition of
memory barrier:
1. wil_tx_complete reads the swhead to determine if the vring is
empty. In case the swhead was updated before the descriptor update
was performed in __wil_tx_vring/__wil_tx_vring_tso, the completion
loop will not end and as the DU bit may still be set from a previous
run, this skb can be handled as completed before it was sent, which
will lead to double free of the same SKB.
2. __wil_tx_vring/__wil_tx_vring_tso calculate the number of available
descriptors according to the swtail. In case the swtail is updated
before memset of ctx to zero is completed, we can handle this
descriptor while later on ctx is zeroed.

Change-Id: Ia6584de897c366032251033aa8e03c54e9d899bb
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: eb26cff148f5449972121e46e403f549d71f6f49
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-06-08 15:17:05 -07:00
Hemant Kumar
d68052df98 USB: f_mtp: Set maximum burst value to two for superspeed mode
Currently burst value is set to zero for superspeed in mtp driver.
MTP throughput can be improved by setting max burst value to non
zero value in superspeed mode. Hence set max burst value to two
for both IN and OUT bulk endpoints in superspeed mode.

Change-Id: Ib78b8fec5d1ab934f4d4ec80b7e008149707ce0f
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-06-08 15:16:50 -07:00