Commit Graph

5956 Commits

Author SHA1 Message Date
Linux Build Service Account f1f5bd31fd Merge "msm: ADSPRPC: Free contexts for current channel" 2014-10-20 12:50:09 -07:00
Linux Build Service Account 7ee1699454 Merge "diag: Add kmemleak_not_leak check to mark certain objects" 2014-10-19 00:30:50 -07:00
Linux Build Service Account 79d60dae0c Merge "diag: dci: Check for valid peripheral before writing over to it" 2014-10-18 15:30:34 -07:00
Ravi Aravamudhan aa196693bb diag: dci: Remote DCI channel discovery support
Diag driver on Apps opens the remote DCI channels on remote ASICs
irrespective of the remote side support. Add a handshaking
mechanism that closes the DCI channel if handshaking fails.

Change-Id: I92bb0c6f2c8363bc3fd45d3c60bd9e79e7a216f0
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-10-17 12:31:38 -07:00
Mitchel Humpherys 28d98977aa msm: ADSPRPC: Free contexts for current channel
When multiple channels are opened from same process, free
contexts associated only with the current channel when the
device is released.

Change-Id: Iaa1f06ee00f3b9420ef5b00995bdf8186cb83283
Acked-by: Sathish Ambley <sambley@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-10-16 11:53:45 -07:00
Ravi Aravamudhan d304187393 diag: Add kmemleak_not_leak check to mark certain objects
Certain objects in the diag driver can be flagged falsely as
memory leaks. These objects will be freed when the driver exits.
This patch marks these objects as non-leaks.

Change-Id: Idcb3f97f5ec499ebb2da3ab6e1579128cad87c00
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-10-14 18:53:54 -07:00
Linux Build Service Account 091003d5d3 Merge "diag: Add kmemleak_not_leak check to mark certain objects" 2014-10-14 08:49:58 -07:00
Linux Build Service Account a38287c67c Merge "diag: Add support for Diag over MHI" 2014-10-12 05:41:20 -07:00
Linux Build Service Account e93cc54547 Merge "msm: ADSPRPC: Validate address range of buffer" 2014-10-11 11:11:53 -07:00
Linux Build Service Account 956c0e62e5 Merge "msm: ADSPRPC: Do not duplicate non-ion memory" 2014-10-11 11:11:52 -07:00
Ravi Aravamudhan d86c3b36a8 diag: Add kmemleak_not_leak check to mark certain objects
Certain objects in the diag driver can be flagged falsely as
memory leaks. These objects will be freed when the driver exits.
This patch marks these objects as non-leaks.

Change-Id: I7c3ac8ac1fb9b54d8f1da62eed518669b7c663b0
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-10-09 11:26:15 -07:00
Katish Paran 389fe01742 diag: dci: Check for valid peripheral before writing over to it
Currently while writing data to the peripherals over dci channel,
invalid channel access may happen. This patch add an error check
for such case.

Change-Id: I6a7bdb9c75c4863394dcab12b41387b081c2329f
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2014-10-09 13:00:12 +05:30
Mitchel Humpherys a13d39445b msm: ADSPRPC: Validate address range of buffer
Ensure that the buffer being passed to remote processor is
always from ADSP ION heap. Passing buffers from other ION
heaps would result in a copy operation into the ADSP ION
heap before the buffer is passed over.

Change-Id: I0cf53887d4ec18b81a1c35f8c7c9dc4f1ca4e97f
Acked-by: Sathish Ambley <sambley@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-10-08 13:52:12 -07:00
Mitchel Humpherys 27b6b8ade8 msm: ADSPRPC: Do not duplicate non-ion memory
Scan the non-ion buffers for overlapping memory and only copy each
segment once.

Change-Id: I5cacb0f821f217038cb0b2f7c407bb09ed6a362d
Acked-by: Anatoly Yakovenko <anatolyy@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-10-07 12:18:56 -07:00
Ravi Aravamudhan 831c082a68 diag: Add support for Diag over MHI
This patch adds support for Diag with MHI as the transport layer
in fused ASICs.

Change-Id: I3781cf632711e778b75a7a24db373226464f9201
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-10-06 20:12:02 -07:00
Linux Build Service Account 27b018b3b9 Merge "char: msm_smd_pkt: flush pending work on release" 2014-09-30 14:42:47 -07:00
Linux Build Service Account ed10876992 Merge "diag: Add kmemleak_not_leak check to avoid memleak" 2014-09-30 14:42:25 -07:00
Ravi Aravamudhan abae544172 diag: Make fixes to Memory Device mode
Currently the size of the buffer table in diag memory device mode
is set to a predefined value. This patch makes the size of the
buffer table consistent with the maximum number of buffers
possible.

Change-Id: I51313499f7bbe85b589605b7c3b27e27573d1684
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-09-30 13:54:30 -07:00
Eric Holmberg 1a77e412df char: msm_smd_pkt: flush pending work on release
If an SMD device is closed while the device is active and then
immediately re-opened, then a delayed work item may get processed while
data structures are in the process of being re-initialized.

Move initialization of data structures to device creation which happens
once during module initialization.

CRs-Fixed: 698603
Change-Id: Ida85d8452f32b62fd848c706ba046f1a9a08bc85
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2014-09-29 17:02:20 -06:00
Linux Build Service Account ba4cfc688b Merge "char: msm_smd_pkt: Remove hexdump of userspace read/write buffers" 2014-09-27 10:04:01 -07:00
Arun Kumar Neelakantam 5cc48edf89 char: msm_smd_pkt: Remove hexdump of userspace read/write buffers
Dumping userspace read/write buffers without first copying the data may
lead to a kernel panic if the buffer is unmapped after the buffer has
been validated but before the VFS call returns.

Remove the debug code to print the data using userspace buffers.

CRs-Fixed: 730626
Change-Id: I95c0d751121812fd5d5f30e2b4ee221b1fc36083
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2014-09-26 09:55:55 -06:00
Kishan Kumar 01033d20d5 ARM: dts: msm: Rename msmferrum to msm8909
Rename all device tree files and usages of msmferrum
to its official name msm8909.

Change-Id: Ie17e62046ed8b9626a59e393076a3ff00934c0fe
Signed-off-by: Kishan Kumar <kishank@codeaurora.org>
2014-09-24 20:49:38 +05:30
Katish Paran d5faef8fd8 diag: Add kmemleak_not_leak check to avoid memleak
Add kmemleak_not_leak check in diagchar initialization to
avoid memleaks since this is not a leak case.

Change-Id: I72e208ec88f75d549458508e9f83d6af07c49a78
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2014-09-24 17:35:56 +05:30
Linux Build Service Account c8726e5d61 Merge "diag: Set the usb connected flag correctly" 2014-09-20 13:38:07 -07:00
Dinesh K Garg 12c956f30f hw_random: msm_rng: fix a null pointer dereference
This change prevents a possible null pointer
dereference in msm_rng.c by moving the function
call under if block.

Change-Id: I481b39c91e495692e575a90b392095e95eb1f367
Acked-by: Saurabh Sabnis <ssabnis@qti.qualcomm.com>
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
2014-09-19 15:18:49 -07:00
Jason Gunthorpe d64269e301 tpm: Provide a generic means to override the chip returned timeouts
commit 8e54caf407b98efa05409e1fee0e5381abd2b088 upstream.

Some Atmel TPMs provide completely wrong timeouts from their
TPM_CAP_PROP_TIS_TIMEOUT query. This patch detects that and returns
new correct values via a DID/VID table in the TIS driver.

Tested on ARM using an AT97SC3204T FW version 37.16

[PHuewe: without this fix these 'broken' Atmel TPMs won't function on
older kernels]
Signed-off-by: "Berg, Christopher" <Christopher.Berg@atmel.com>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
[bwh: Backported to 3.10:
 - Adjust filename, context
 - s/chip->ops->/chip->vendor./]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-17 09:04:02 -07:00
Jarkko Sakkinen d4281c33c1 tpm: missing tpm_chip_put in tpm_get_random()
commit 3e14d83ef94a5806a865b85b513b4e891923c19b upstream.

Regression in 41ab999c. Call to tpm_chip_put is missing. This
will cause TPM device driver not to unload if tmp_get_random()
is called.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-17 09:03:57 -07:00
Ravi Aravamudhan 9dc5120458 diag: Set the usb connected flag correctly
Diag driver sets the flag for usb connection irrespective of the
different logging modes. This patch sets the usb connection flag
only when Diag is streaming in USB mode.

Change-Id: I23f66c09242ca74b38f06700f21398f748856b41
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-09-16 10:51:09 -07:00
Ravi Aravamudhan 7d0be49906 diag: Set the log mask item number correctly
Diag driver was setting the value of item number for a log equipment
id incorrectly. The item number should be set to the minimum of
the number of supported items and the requested items.

Change-Id: I558d4af14c2eefb0c53e432ed9056ca15406aa7d
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-09-12 15:38:03 -07:00
Linux Build Service Account fe6591a1d3 Merge "diag: Fix incorrect checks in callback mode" 2014-09-09 04:48:28 -07:00
Ravi Aravamudhan 8a5ca21452 diag: Fix incorrect checks in callback mode
Diag driver is currently checking the length of the received packet
incorrectly in callback mode. This patch fixes this issue.

Change-Id: I0544e1e0a665d9f764a88a19285abdccd7477714
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-09-05 12:45:08 -07:00
Atish Kumar Patra a7038bddbb char: msm_smd_pkt: Rate limit error logs in smd pkt functions
If any of userpsace component invokes smd_pkt functions in an undesired
manner, it may result in signification number of  error logs.
As a result system might be watchdogged leading to a crash.

To minimize the number of error logs, pr_err is replaced with
pr_err_ratelimited to print error logs in a controlled manner.
This is only updated in fops functions which are called by
user space functions. This fix only reduces the likelyhood
of an errant user space program causing a watchdog. It is always
advisable to invoke smd_pkt functions in appropriate manner.

CRs-Fixed: 716604
Change-Id: I753afd83c3cd626f90ec9bfba1e227d85adbab42
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2014-09-05 10:43:28 -07:00
Linux Build Service Account 233612d895 Merge "diag: dci: Mutex protect the list while traversal and node deletion" 2014-08-30 22:36:32 -07:00
Katish Paran ab1c2ff1ac diag: dci: Mutex protect the list while traversal and node deletion
On receiving the response from peripherals for the sent command
DCI traverses and deletes from the list. The list is not lock
protected while traversal or deletion. This patch resolves the
same.

Change-Id: Ie93f3e035b35c4d39f1e19f9c42a48f4147fe145
CRs-Fixed: 715663
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2014-08-28 12:21:55 +05:30
Linux Build Service Account ccd59794df Merge "Merge upstream tag 'v3.10.49' into msm-3.10" 2014-08-24 10:53:27 -07:00
Linux Build Service Account 94699cc842 Merge "msm: ADSPRPC: Add ioctl for remote process creation" 2014-08-22 19:32:33 -07:00
Liam Mark 97c24ffb08 msm: ADSPRPC: Add ioctl for remote process creation
The new ioctl exposes mechanism for user processes to create
a new process on the remote end when the device is opened.

Change-Id: Id27c7572d3bdd5ecfb899ac20dd237ab25f5a161
Acked-by: Sathish Ambley <sambley@qti.qualcomm.com>
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2014-08-21 10:47:15 -07:00
Ian Maund 6440f462f9 Merge upstream tag 'v3.10.49' into msm-3.10
* commit 'v3.10.49': (529 commits)
  Linux 3.10.49
  ACPI / battery: Retry to get battery information if failed during probing
  x86, ioremap: Speed up check for RAM pages
  Score: Modify the Makefile of Score, remove -mlong-calls for compiling
  Score: The commit is for compiling successfully.
  Score: Implement the function csum_ipv6_magic
  score: normalize global variables exported by vmlinux.lds
  rtmutex: Plug slow unlock race
  rtmutex: Handle deadlock detection smarter
  rtmutex: Detect changes in the pi lock chain
  rtmutex: Fix deadlock detector for real
  ring-buffer: Check if buffer exists before polling
  drm/radeon: stop poisoning the GART TLB
  drm/radeon: fix typo in golden register setup on evergreen
  ext4: disable synchronous transaction batching if max_batch_time==0
  ext4: clarify error count warning messages
  ext4: fix unjournalled bg descriptor while initializing inode bitmap
  dm io: fix a race condition in the wake up code for sync_io
  Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
  clk: spear3xx: Use proper control register offset
  ...

In addition to bringing in upstream commits, this merge also makes minor
changes to mainitain compatibility with upstream:

The definition of list_next_entry in qcrypto.c and ipa_dp.c has been
removed, as upstream has moved the definition to list.h. The implementation
of list_next_entry was identical between the two.

irq.c, for both arm and arm64 architecture, has had its calls to
__irq_set_affinity_locked updated to reflect changes to the API upstream.

Finally, as we have removed the sleep_length member variable of the
tick_sched struct, all changes made by upstream commit ec804bd do not
apply to our tree and have been removed from this merge. Only
kernel/time/tick-sched.c is impacted.

Change-Id: I63b7e0c1354812921c94804e1f3b33d1ad6ee3f1
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-08-20 13:23:09 -07:00
Ravi Aravamudhan 8d78493b20 diag: Ratelimit certain dmesg
This patch ratelimits printing of smd write failure dmesg for diag
commands that cannot be sent to the peripherals.

Change-Id: I68937ca6ccf9f1a5a49bbfac3779d3d530dbc78a
CRs-Fixed: 707938
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-08-18 23:05:55 -07:00
Linux Build Service Account 65aeb3e776 Merge "diag: Fix issue with accessing reallocated buffer" 2014-08-18 10:49:39 -07:00
Linux Build Service Account f491a06394 Merge "diag: Add support for peripheral buffering modes" 2014-08-18 10:49:12 -07:00
Uwe Kleine-König 2b4cc3cb58 Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAP
If the renamed symbol is defined lib/iomap.c implements ioport_map and
ioport_unmap and currently (nearly) all platforms define the port
accessor functions outb/inb and friend unconditionally.  So
HAS_IOPORT_MAP is the better name for this.

Consequently NO_IOPORT is renamed to NO_IOPORT_MAP.

The motivation for this change is to reintroduce a symbol HAS_IOPORT
that signals if outb/int et al are available.  I will address that at
least one merge window later though to keep surprises to a minimum and
catch new introductions of (HAS|NO)_IOPORT.

The changes in this commit were done using:

	$ git grep -l -E '(NO|HAS)_IOPORT' | xargs perl -p -i -e 's/\b((?:CONFIG_)?(?:NO|HAS)_IOPORT)\b/$1_MAP/'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: ce816fa88cca083c47ab9000b2138a83043a78be
[joonwoop@codeaurora.org: fixed trivial merge conflict.]
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2014-08-15 11:41:43 -07:00
Linux Build Service Account ea8fa11f8d Merge "diag: Fix incorrect length checks while reading data from peripherals" 2014-08-12 17:37:49 -07:00
Ravi Aravamudhan 18c177fceb diag: Add support for peripheral buffering modes
Diag on the peripherals has support to buffer diag data and drain
them as and when required. This patchset adds support on the apps
processor to enable different buffering modes on the peripherals.

Change-Id: I07b9ffe36dfc5c90ac0d8a8da91922e1127aed58
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-08-12 10:45:27 -07:00
Linux Build Service Account 648cfa62fe Merge "msm_rng: Change long to u32 type for buffers reading from RNG HW" 2014-08-12 00:03:51 -07:00
Ravi Aravamudhan e1afb316ac diag: Fix incorrect length checks while reading data from peripherals
Diag driver reads mask table control packets from peripherals and
does a length check against an incorrect value. This can result in
dropping the last entry in those control packets.

Change-Id: I5092c6a7322c96bf7f6db51613b13d0b66977ffd
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-08-11 22:06:37 -07:00
Ravi Aravamudhan 5d2dcc8f25 diag: Fix issue with accessing reallocated buffer
Diag driver reallocates its buffer when the data read from SMD is
greater than IN_BUF_SIZE. It uses the old pointer even after
reallocating the buffer resulting in dangling pointer access. This
patch fixes this issue.

Change-Id: I21322f161df51accd0464a47ab0cf469fbb2959f
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-08-11 19:50:17 -07:00
Dinesh K Garg 7bcafc734d msm_rng: Change long to u32 type for buffers reading from RNG HW
Changing the type from long to u32 of the buffer that is used to
read data from the RNG hardware to reflect the size of the HW
register

Change-Id: I54e8eeae40a66c8033637044e627023150d6c411
Acked-by: Baranidharan Muthukumaran <bmuthuku@qti.qualcomm.com>
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
2014-08-11 10:21:54 -07:00
Ravi Aravamudhan 38604baa7b diag: Modularize different logging modes
Diag driver has an ability to log diag data to USB or to the user
space clients. Make changes to modularize different modes of
logging schemes.

Change-Id: I91c95ce4ec8117f6926d8e6dfa164fd6cb07dc4b
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-08-04 15:50:12 -07:00
Ravi Aravamudhan 21ad45fc05 diag: Redesign diag bridge
Refactor diagfwd_bridge to make it scalable and to communicate
with the remote devices in a much cleaner fashion. Also make
changes to DCI to reflect the changes in the bridge.

Change-Id: Ica5a3552ec94c5543518698390c910518da04f3b
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-08-04 15:46:09 -07:00
Linux Build Service Account daf792e7dd Merge "hwrng: Pass entropy to add_hwgenerator_randomness() in bits, not bytes" 2014-08-02 14:08:59 -07:00
Linux Build Service Account d3b0203556 Merge "hwrng: create filler thread" 2014-08-02 14:08:58 -07:00
Linux Build Service Account 4cbb0991a7 Merge "random: add_hwgenerator_randomness() for feeding entropy from devices" 2014-08-02 14:08:57 -07:00
Linux Build Service Account b9589c701b Merge "msm_rng: Resolve race condition issues" 2014-08-02 14:08:57 -07:00
Linux Build Service Account 7f55d4a0a6 Merge "diag: Fix sending log on demand command to peripherals" 2014-08-02 09:36:37 -07:00
Linux Build Service Account 1342ab5f07 Merge "msm_rng: Enable/ Disable Bus bandwidth for every RNG read call" 2014-07-31 21:37:05 -07:00
Linux Build Service Account 3981d1343f Merge "diag: Do not reset SMD buffers if USB write fails" 2014-07-30 16:53:06 -07:00
Linux Build Service Account 431c226623 Merge "diag: Create separate module for Diag-USB interaction" 2014-07-30 16:52:37 -07:00
Stephen Boyd 9e43961585 hwrng: Pass entropy to add_hwgenerator_randomness() in bits, not bytes
The entropy argument to add_hwgenerator_randomness() is passed
directly to credit_entropy_bits() so we should be passing the
number of bits, not bytes.

Change-Id: I068c1073245944dddf0cbf7e69f1c0f1d96010e2
Fixes: 646d838eef81 "hwrng: create filler thread"
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2014-07-30 10:37:33 -07:00
Torsten Duwe 944699277b hwrng: create filler thread
This can be viewed as the in-kernel equivalent of hwrngd;
like FUSE it is a good thing to have a mechanism in user land,
but for some reasons (simplicity, secrecy, integrity, speed)
it may be better to have it in kernel space.

This patch creates a thread once a hwrng registers, and uses
the previously established add_hwgenerator_randomness() to feed
its data to the input pool as long as needed. A derating factor
is used to bias the entropy estimation and to disable this
mechanism entirely when set to zero.

Change-Id: I2bda706d8791e8e7016d89e3df4c5f0339ff321c
Signed-off-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Git-commit: be4000bc4644d027c519b6361f5ae3bbfc52c347
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2014-07-30 10:37:33 -07:00
Torsten Duwe ca66fce533 random: add_hwgenerator_randomness() for feeding entropy from devices
This patch adds an interface to the random pool for feeding entropy
in-kernel.

Change-Id: Id9031d6b615877ea957ee2d2aba1f8150ec699b9
Signed-off-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Git-commit: c84dbf61a7b322188d2a7fddc0cc6317ac6713e2
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
[sboyd@codeaurora.org: Bring in ENTROPY_BITS() define,
s/random_write_wakeup_bits/random_write_wakeup_thresh/, and pass
NULL to mix_pool_bytes last parameter]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2014-07-30 10:37:32 -07:00
Dinesh K Garg 0382d97866 msm_rng: Resolve race condition issues
Resolve race condition between initializing the mutex vs hwrng
register.
Remove the HWRNG FIFO, not required in Software.

Change-Id: I9fa3e5c7e2e9e14feb88a4656dcfab7dec3cbd67
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
2014-07-30 10:30:10 -07:00
Ravi Aravamudhan 039e82ee53 diag: Do not reset SMD buffers if USB write fails
Diag driver resets the SMD buffers when USB write fails which can
result in data from SMD being dropped on the Apps side. Do not
reset the SMD buffers if the write fails so that the peripherals
can restrict sending more data.

Change-Id: I81a87bf828102bd33342ba31836fee9808024352
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-28 13:56:07 -07:00
Linux Build Service Account 56707d2140 Merge "diag: Fix event mask status" 2014-07-26 12:41:45 -07:00
Dinesh K Garg bb004d0fe3 msm_rng: Enable/ Disable Bus bandwidth for every RNG read call
This patch adds calls to enable and disable bus bandwidth
for every RNG Read call.

Change-Id: Ia1ac31ffa79a8be2761c243eee9bf87f25422c24
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
2014-07-25 19:18:35 -07:00
Ravi Aravamudhan a18ea5a70c diag: Fix sending log on demand command to peripherals
Diag driver forms the response to log on demand request and sends
the response to the tools without forwarding to the peripherals.
Make changes to send the request to the peripherals first before
sending the response in both regular usb and dci channels.

Change-Id: I22cd826d82b03b23e41113f73c1099e8f36275ef
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-24 19:11:22 -07:00
Linux Build Service Account 85a9bf77c0 Merge "diag: Fix event mask size value" 2014-07-23 19:19:20 -07:00
Ravi Aravamudhan d3d930b1a7 diag: Create separate module for Diag-USB interaction
Diag USB structures are deeply coupled with diag drivers. Each
instance of USB channel is used explicitly. Make changes to
modularize USB channels designated for Diag.

Change-Id: Id408e227e7e92178afa847064afe18bb6c0dd019
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-23 15:44:11 -07:00
Ravi Aravamudhan 29881789fd diag: Fix event mask status
Diag driver was setting the status of the event mask responses
incorrectly. Make changes to set the status in the event mask
commands correctly.

Change-Id: I1cf325311f8a880004a07d4d486d72e42105eab7
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-22 16:10:14 -07:00
Ravi Aravamudhan 9b63cd0c80 diag: Initialize USB memory pools even if there are no diag clients
Diag driver was initializing memory pools only if there is at least
one diag client. Make changes to initialize memory pools related to
USB irrespective of diag userspace clients.

Change-Id: I052798a27b86c007bbe1fc49fbf2c2d87f0bf592
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-22 10:23:37 -07:00
sgownipa b911e9d0e9 diag: Enable Diag on Sensors Processor
Add diag support on the apps to communicate with diag on sensors
processor.

Change-Id: I14632cdf55d917316f72153324a445553839e531
Signed-off-by: sgownipa <sgownipa@codeaurora.org>
2014-07-17 13:13:10 -07:00
Ravi Aravamudhan 8f48637144 diag: Fix event mask size value
Diag event mask size should hold one byte more than the maximum
events allowed. This patch increases the default event mask size
by 1.

Change-Id: I4716c86d872e7f802b5bc7c71d76ec43c75b7b40
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-16 18:01:32 -07:00
Ravi Aravamudhan b3d0c5b7a4 diag: Separate SMUX structures from diag
Diag driver is deeply coupled with SMUX structures. Make changes
to remove references of SMUX from diag core files.

Change-Id: I2abc6b98659fea5b5b429467af9ccf5ed3d37eaf
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-15 18:17:50 -07:00
Ravi Aravamudhan 97a56ddaf2 diag: Remove references to USB structures in diag
Diag driver is currently using USB structures internally for
data transfers. Refactor the code by removing these structures.

Change-Id: I9e283af0f99cfb732fe74371dcbeae9c15e83b64
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-15 17:34:10 -07:00
Ravi Aravamudhan 6492bd8dca diag: Streamline diag memory pool
The current design of Diag memory pools makes it difficult to scale.
Diag HSIC structures maintain their own memory pools. Make changes
to bring all memory pools together.

Change-Id: I08acbd2ea35438637f875fdc5c2ab896d9db3dd9
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-15 13:45:39 -07:00
Linux Build Service Account 47eba24b8a Merge "diag: Add support for MSMFERRUM QPST string" 2014-07-10 18:10:05 -07:00
Mohit Aggarwal a51c3e76b3 diag: Add support for MSMFERRUM QPST string
MSMFERRUM is a new device. Add diag support for sending
appropriate model number for MSMFERRUM so that QPST
can display the appropriate string.

Change-Id: I1a75b705e606d6e4ef7480760a47871a1a9f2bce
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2014-07-10 12:51:59 +05:30
Katish Paran c7600af44a diag: dci: Copy the complete response coming from peripheral
Currently, if multiple responses comes over peripheral and the
user space client haven't read the last response or in middle
of reading the last response there is a possibility of
overwriting the last response. This patch ensures that the
offset is increased accordingly if multiple responses are
appended to same buffer.

Change-Id: I145756776b8902ab0819515b4192eb18d26949df
CRs-Fixed: 683417
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2014-07-09 17:27:29 -07:00
Linux Build Service Account 70f74c66dc Merge "diag: dci: Send mode reset command to the apps processor" 2014-07-03 21:10:31 -07:00
Ravi Aravamudhan a39838b5a5 diag: Build Mask Centralization
Diag driver on the apps processor should be responding to the
mask requests from tools. Make changes to the driver to centralize
diag log, event, msg build time and run time masks on the apps
processor.

Change-Id: I14b4119343d2b5def1ef203f26215511bc3cd465
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-07-03 13:03:23 -07:00
Linux Build Service Account 3c37a68196 Merge "diag: Change implementation of Diag masks" 2014-07-03 10:35:39 -07:00
Linux Build Service Account 72e6cca49d Merge "diag: dci: Return correct error status to client" 2014-07-03 00:08:59 -07:00
Linux Build Service Account 629d60b327 Merge "crypto: msm: Add support for FIPS complience" 2014-07-02 11:29:01 -07:00
Dan Carpenter fc7be70247 applicom: dereferencing NULL on error path
commit 8bab797c6e5724a43b7666ad70860712365cdb71 upstream.

This is a static checker fix.  The "dev" variable is always NULL after
the while statement so we would be dereferencing a NULL pointer here.

Fixes: 819a3eba42 ('[PATCH] applicom: fix error handling')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-30 20:09:41 -07:00
Dinesh K Garg 073bc4bbec crypto: msm: Add support for FIPS complience
FIPS140-2 certification asks to do a Power on Known Answer tests on each
algorithm which is getting certified. This patch implements the self tests
and hardcoded test vectors.  Also, we need to verify the integrity of
kernel as soon as it boots up. This patch also adds an ioctl for
integrity test along with ioctl to query FIPS status (pass / fail) from
user land.
also, The piece of code is added for FIPS compliance DRBG under
drivers/char/hw_random

Change-Id: Ib5f4872e7c88161b29ac526eef7e3fbc674456f7
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
2014-06-30 18:17:43 -07:00
Ravi Aravamudhan 5b5d088c2c diag: Reset rsp_buf_busy flag when switching to USB mode
When a client switches from callback mode to USB mode explicitly,
there is a possibility that the last response is not drained to the
user space. Reset the rsp_buf_busy flag in such scenarios so that
we don't hold on to the response buffer forever.

Change-Id: I0be80174e8193174eb53a768c5ed3a4e322d50ec
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-06-30 15:27:39 -07:00
Ravi Aravamudhan 24667e3521 diag: dci: Send mode reset command to the apps processor
Diag driver was sending all mode commands to the apps processor while
only mode reset command was handled on the apps processor. This patch
makes an exception for mode reset command.

Change-Id: I51e4971cbffcc8fedd68090cb5a15c4c67363c57
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-06-27 11:16:25 -07:00
Ravi Aravamudhan 0ed84440c1 diag: Change implementation of Diag masks
Diag message, log and event masks were formatted uniquely. Refactor
code to change the design of all diag masks.

Change-Id: Ic1516591088404204ad11187487b96690706f17a
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-06-27 10:24:40 -07:00
Mohit Aggarwal 863d5984aa diag: dci: Return correct error status to client
After writing packet to SMD, diag driver is returning
wrong error status even in case of success which
leads to failure of dci client. This patch returns
correct error status to dci clients.

Change-Id: I1a9967c68c1e0a642b44f1d0ee1cc49f33f7ac91
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2014-06-27 12:58:25 +05:30
Linux Build Service Account f97e41c8c7 Merge "msm: ADSPRPC: Register subsystem restart notification" 2014-06-20 00:09:39 -07:00
Linux Build Service Account 67a383249d Merge "Merge v3.10.40 and related reverts into msm-3.10" 2014-06-20 00:09:33 -07:00
Linux Build Service Account 4c25dac2bc Merge "diag: Fix issue while sending responses to user space clients" 2014-06-19 15:01:58 -07:00
Ian Maund 491fb5c232 Merge upstream tag 'v3.10.40' into msm-3.10
* commit 'v3.10.40': (203 commits)
  Linux 3.10.40
  ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe
  drm: cirrus: add power management support
  Input: synaptics - add min/max quirk for ThinkPad Edge E431
  Input: synaptics - add min/max quirk for ThinkPad T431s, L440, L540, S1 Yoga and X1
  lockd: ensure we tear down any live sockets when socket creation fails during lockd_up
  dm thin: fix dangling bio in process_deferred_bios error path
  dm transaction manager: fix corruption due to non-atomic transaction commit
  Skip intel_crt_init for Dell XPS 8700
  mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes()
  mtd: nuc900_nand: NULL dereference in nuc900_nand_enable()
  mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC
  tgafb: fix data copying
  gpio: mxs: Allow for recursive enable_irq_wake() call
  rtlwifi: rtl8188ee: initialize packet_beacon
  rtlwifi: rtl8192se: Fix regression due to commit 1bf4bbb
  rtlwifi: rtl8192se: Fix too long disable of IRQs
  rtlwifi: rtl8192cu: Fix too long disable of IRQs
  rtlwifi: rtl8188ee: Fix too long disable of IRQs
  rtlwifi: rtl8723ae: Fix too long disable of IRQs
  ...

Change-Id: If5388cf980cb123e35e1b29275ba288c89c5aa18
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-06-18 13:10:54 -07:00
Liam Mark 6d85083cc4 msm: ADSPRPC: Register subsystem restart notification
The subsystem restart handler aborts all pending transactions and
propagates the error back to the user for it to take appropriate
recovery actions. Once the subsystem restart notification is
received, iommu driver calls are skipped for all pending
transactions to avoid bus errors due to unclocked access.

Change-Id: I16465e5f82e01bab1ba32be2574be9734ed3e247
Acked-by: Sathish Ambley <sambley@qti.qualcomm.com>
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2014-06-18 09:32:17 -07:00
Ravi Aravamudhan 9f53274de4 diag: Fix issue while sending responses to user space clients
Diag driver can miss sending responses to clients in Memory Device
Mode due to a race condition. Check and correct the condition and
send responses in those cases.

Change-Id: Id4b4f51272e97ae741eb146845d6889a66205a8a
CRs-Fixed: 667453
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-06-16 17:08:20 -07:00
Ravi Aravamudhan e3dff7b54a diag: Make changes to diag control packets
Refactor handling of diag control packets and make them robust
by adding more error handling.

Change-Id: I90d0212a10269ac00cc1bd3731f38f20e3918b2e
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-06-12 16:12:44 -07:00
Ravi Aravamudhan 4d9cdfe436 diag: Modularize all writes to Diag SMD channels
Diag driver calls smd_write at different places. Make all writes
consistent and reduce code size.

Change-Id: Ie3b1cef2117c7a37e3341ed1a0ffd5be0884a1fe
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-06-12 13:10:48 -07:00
Ravi Aravamudhan 891ae44969 diag: Set real time value correctly
Diag user space clients sends an IOCTL to get the real time value
from the driver. The driver was setting this value incorrectly. This
patch fixes this issue.

Change-Id: Ia9ff16e5b1affc05bb0f99b32e97fa80ec25aa14
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-06-09 11:06:21 -07:00
Corey Minyard 7cbb2301ae ipmi: Reset the KCS timeout when starting error recovery
commit eb6d78ec213e6938559b801421d64714dafcf4b2 upstream.

The OBF timer in KCS was not reset in one situation when error recovery
was started, resulting in an immediate timeout.

Reported-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 13:25:30 -07:00
Bodo Stroesser 935c69acf0 ipmi: Fix a race restarting the timer
commit 48e8ac2979920ffa39117e2d725afa3a749bfe8d upstream.

With recent changes it is possible for the timer handler to detect an
idle interface and not start the timer, but the thread to start an
operation at the same time.  The thread will not start the timer in that
instance, resulting in the timer not running.

Instead, move all timer operations under the lock and start the timer in
the thread if it detect non-idle and the timer is not already running.
Moving under locks allows the last timeout to be set in both the thread
and the timer.  'Timer is not running' means that the timer is not
pending and smi_timeout() is not running.  So we need a flag to detect
this correctly.

Also fix a few other timeout bugs: setting the last timeout when the
interrupt has to be disabled and the timer started, and setting the last
timeout in check_start_timer_thread possibly racing with the timer

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 13:25:30 -07:00
Linux Build Service Account 683b63ae6d Merge "diag: Do not prevent HSIC suspend in special cases" 2014-06-06 18:54:54 -07:00
Linux Build Service Account fd521aa7a1 Merge "diag: Reduce diag drain timer to 200ms" 2014-06-06 06:06:07 -07:00
Ravi Aravamudhan 84d3076776 diag: Add support for APQ8026 QPST string
APQ8026 is a new device. Add diag support for sending
appropriate model number for APQ8026 so that QPST
can display the appropriate string.

Change-Id: I337693fba4222d2605aa4d489d7c24bebcbd07bf
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-06-03 11:55:35 -07:00
Ravi Aravamudhan 9460a1758a diag: Do not prevent HSIC suspend in special cases
Diag driver prevents HSIC from suspending if it is in Memory Device
Mode. Make changes to remove this condition and allow suspend in
all logging modes.

Change-Id: Ia1f43b881f1ea247ba17e067d6ac1a1da021ad9e
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-06-03 11:21:05 -07:00
Linux Build Service Account 3b0fd94938 Merge "msm: ipc_logging: add client version support" 2014-05-31 19:42:47 -07:00
Sreelakshmi Gownipalli 63a3ab8406 diag: Reduce diag drain timer to 200ms
Reduce the diag drain timer to 200ms to drain the diag traffic
soon. Some tools expect the diag traffic in 200ms.

Change-Id: Ieb6cfa57bd1e72a53f0d3eb16b0a1d3928230327
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2014-05-29 13:27:26 -07:00
Mitchel Humpherys 61b82c2113 ion: msm: remove superfluous function argument
msm_ion_client_create doesn't actually do anything with its heap_mask
parameter. Remove it. Also remove the extra argument from an audio
function that wraps msm_ion_client_create.

The following semantic patch was used to generate this patch:

    @@
    expression E1, E2;
    @@

    msm_ion_client_create(
    -       E1,
            E2)

    @@
    expression E1, E2;
    @@

    msm_audio_ion_client_create(
    -       E1,
            E2)

Change-Id: I403a125a1715b29a3db1f27c993abe0bc6d3fb11
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-05-27 15:28:48 -07:00
Eric Holmberg 9f4800553d msm: ipc_logging: add client version support
If clients use custom serialization functions, then they may need to
define a version for deserialization support for log extraction.

Add client version support.

Change-Id: Id135f06d4142de39275b5d0caab88708d5496b5e
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2014-05-27 13:56:54 -06:00
Linux Build Service Account bc25172140 Merge "diag: Prevent suspend while reading data from SMD and HSIC" 2014-05-25 05:44:41 -07:00
Sreelakshmi Gownipalli f426479850 diag: Add support for MSM8994 QPST string
MSM8994 is a new device. Add diag support for sending
appropriate model number for MSM8994 so that QPST
can display the appropriate string.

Change-Id: I91dd988ebea8c98d04dbcc5afd6a36f83b4283c6
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2014-05-22 17:19:20 -07:00
Ravi Aravamudhan 734dfd57e0 diag: Prevent suspend while reading data from SMD and HSIC
Diag driver can let apps processor go to suspend when receiving
data from remote processors and peripherals. This can result in
diag data being dropped on the apps processor. This patch ensures
that the apps processor is awake till the data is copied to the
user space.

Change-Id: Id3c46c66675d3b5632721dede5e59420b69c568e
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-05-21 13:35:40 -07:00
Sreelakshmi Gownipalli 1a26dacb89 diag: Add kmemleak_not_leak checks to avoid memleaks
Add kmemleak_not_leak call in diagmem_alloc to avoid
memleaks since these are not leak cases.

Change-Id: I003d7b4f5bd1492f649031056c550b3633ff3036
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2014-05-14 13:19:58 -07:00
Linux Build Service Account 448aae7016 Merge "msm: ADSPRPC: Changes to support 64 bit address space" 2014-05-13 20:28:25 -07:00
Mitchel Humpherys d776655a24 msm: ADSPRPC: Changes to support 64 bit address space
Update the data types to handle 64 bit address space and
communicate 64 bit addresses to remote processor. Provide
compat ioctl call to allow for 32 bit user space to call
into the driver.

Change-Id: I954f07382bbc9998aed574a7bf74fab9299f0b45
Acked-by: Sathish Ambley <sambley@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-05-05 15:21:03 -07:00
Linux Build Service Account 16296e0178 Merge "Merge upstream linux-stable v3.10.36 into msm-3.10" 2014-05-05 15:09:00 -07:00
Ravi Aravamudhan d8d4ab5dc3 diag: Update SSIDs, event ids and log codes
The SSIDs, event IDs and log codes have fallen out of date.
Bring the SSIDs, event IDs and log codes up to date.

Change-Id: I8e6a2af8baba359f32a489ddc06f619de826f97b
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-04-30 18:57:21 -07:00
Jiri Slaby 96a405de04 Char: ipmi_bt_sm, fix infinite loop
commit a94cdd1f4d30f12904ab528152731fb13a812a16 upstream.

In read_all_bytes, we do

  unsigned char i;
  ...
  bt->read_data[0] = BMC2HOST;
  bt->read_count = bt->read_data[0];
  ...
  for (i = 1; i <= bt->read_count; i++)
    bt->read_data[i] = BMC2HOST;

If bt->read_data[0] == bt->read_count == 255, we loop infinitely in the
'for' loop.  Make 'i' an 'int' instead of 'char' to get rid of the
overflow and finish the loop after 255 iterations every time.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-and-debugged-by: Rui Hui Dian <rhdian@novell.com>
Cc: Tomas Cech <tcech@suse.cz>
Cc: Corey Minyard <minyard@acm.org>
Cc: <openipmi-developer@lists.sourceforge.net>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 17:15:34 -07:00
Ian Maund 356fb13538 Merge upstream linux-stable v3.10.36 into msm-3.10
* commit 'v3.10.36': (494 commits)
  Linux 3.10.36
  netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages
  mm: close PageTail race
  net: mvneta: rename MVNETA_GMAC2_PSC_ENABLE to MVNETA_GMAC2_PCS_ENABLE
  x86: fix boot on uniprocessor systems
  Input: cypress_ps2 - don't report as a button pads
  Input: synaptics - add manual min/max quirk for ThinkPad X240
  Input: synaptics - add manual min/max quirk
  Input: mousedev - fix race when creating mixed device
  ext4: atomically set inode->i_flags in ext4_set_inode_flags()
  Linux 3.10.35
  sched/autogroup: Fix race with task_groups list
  e100: Fix "disabling already-disabled device" warning
  xhci: Fix resume issues on Renesas chips in Samsung laptops
  Input: wacom - make sure touch_max is set for touch devices
  KVM: VMX: fix use after free of vmx->loaded_vmcs
  KVM: x86: handle invalid root_hpa everywhere
  KVM: MMU: handle invalid root_hpa at __direct_map
  Input: elantech - improve clickpad detection
  ARM: highbank: avoid L2 cache smc calls when PL310 is not present
  ...

Change-Id: Ib68f565291702c53df09e914e637930c5d3e5310
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-04-23 16:23:49 -07:00
Mohit Aggarwal d29ac67377 diag: Rename MSM8936 to MSM8939
Socinfo has renamed MSM_CPU_8936 to MSM_CPU_8939.
This patch adds corresponding changes in diag.

Change-Id: I12164b2a6476425295a68c33f8cb400d8bf508c9
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2014-04-20 22:52:04 -07:00
Linux Build Service Account 27bba8951a Merge "msm: modify build dependency for remote debugger" 2014-04-18 13:42:17 -07:00
Linux Build Service Account e5b2a80e59 Merge "diag: Make DCI change not to access info from a dangling pointer" 2014-04-15 18:04:39 -07:00
Linux Build Service Account 9ae21283de Merge "diag: Send response for download mode command" 2014-04-03 19:26:19 -07:00
Linux Build Service Account e191323452 Merge "diag: Check for valid proc id while querying real time status" 2014-04-03 19:26:11 -07:00
Linux Build Service Account 029a389a18 Merge "diag: Add support for MSM8939 QPST string" 2014-04-02 10:22:08 -07:00
Katish Paran d8c26e52ff diag: Check for valid proc id while querying real time status
Currently in diag driver invalid proc id may lead to accessing
invalid array elements. This patch fixes the issue.

Change-Id: I4bcf3eb610537c589d0b66903df1e79a88127b93
CRs-fixed: 629864
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2014-04-02 16:26:00 +05:30
Aparna Das 5677be8d3d msm: modify build dependency for remote debugger
Correct kernel configuration dependency for remote debugger driver
to get rid of earlier listed dependency since driver compilation
succeeds even without it.

Change-Id: I668bb5181db2457e450c894b0f59e4e470813767
Acked-by: Vivek Iyer <viyer@qti.qualcomm.com>
Acked-by: Mahesh Rohera <mrohera@qti.qualcomm.com>
Acked-by: Jay Jayanna <jjayanna@qti.qualcomm.com>
Signed-off-by: Aparna Das <adas@codeaurora.org>
2014-03-31 15:17:04 -07:00
Dixon Peterson 92a75946d8 diag: Make DCI change not to access info from a dangling pointer
When handling a DCI packet response, the uid information is
being obtained from data that is already freed. Make changes
so that the information is not obtained using a dangling pointer.

Also, adding the header information to the DCI packet response is
very unreadable. Make changes to improve the readability of
adding the header information to the DCI packet response.

Change-Id: Ida3d3dac26d0961080fd39576183b6af7fb6551e
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2014-03-28 19:54:14 -07:00
Linux Build Service Account cf0b97587c Merge "diag: Prevent memory leak when switching from Memory Device Mode" 2014-03-28 06:31:27 -07:00
Linux Build Service Account b198cb9af1 Merge "Merge upstream linux-stable v3.10.28 into msm-3.10" 2014-03-26 23:36:07 -07:00
Ravi Aravamudhan b89a95759c diag: Prevent memory leak when switching from Memory Device Mode
When diag switches from Memory device mode to any other mode,
buffers are not freed for Local Diag data. This can lead to memory
pool exhaustion resulting in Diag packet drops.

Change-Id: Icfeb00dd6c11091a7b9106fbefcdcc9d028782c8
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-03-26 18:40:52 -07:00
Linux Build Service Account ea9550798c Merge "diag: Fix incorrect checks in diag driver" 2014-03-26 07:44:58 -07:00
Linux Build Service Account 64ffd8e594 Merge "diag: Copy limited data from and to the user space" 2014-03-26 07:44:42 -07:00
Katish Paran 45c1dc1a70 diag: Send response for download mode command
Currently diag doesn't send response for download command.
This patch resolves that issue.

Change-Id: I365612fdfb010597d4e75cd56cc78361ac09e7de
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2014-03-26 16:13:06 +05:30
Ian Maund f1b32d4e47 Merge upstream linux-stable v3.10.28 into msm-3.10
The following commits have been reverted from this merge, as they are
known to introduce new bugs and are currently incompatible with our
audio implementation. Investigation of these commits is ongoing, and
they are expected to be brought in at a later time:

86e6de7 ALSA: compress: fix drain calls blocking other compress functions (v6)
16442d4 ALSA: compress: fix drain calls blocking other compress functions

This merge commit also includes a change in block, necessary for
compilation. Upstream has modified elevator_init_fn to prevent race
conditions, requring updates to row_init_queue and test_init_queue.

* commit 'v3.10.28': (1964 commits)
  Linux 3.10.28
  ARM: 7938/1: OMAP4/highbank: Flush L2 cache before disabling
  drm/i915: Don't grab crtc mutexes in intel_modeset_gem_init()
  serial: amba-pl011: use port lock to guard control register access
  mm: Make {,set}page_address() static inline if WANT_PAGE_VIRTUAL
  md/raid5: Fix possible confusion when multiple write errors occur.
  md/raid10: fix two bugs in handling of known-bad-blocks.
  md/raid10: fix bug when raid10 recovery fails to recover a block.
  md: fix problem when adding device to read-only array with bitmap.
  drm/i915: fix DDI PLLs HW state readout code
  nilfs2: fix segctor bug that causes file system corruption
  thp: fix copy_page_rep GPF by testing is_huge_zero_pmd once only
  ftrace/x86: Load ftrace_ops in parameter not the variable holding it
  SELinux: Fix possible NULL pointer dereference in selinux_inode_permission()
  writeback: Fix data corruption on NFS
  hwmon: (coretemp) Fix truncated name of alarm attributes
  vfs: In d_path don't call d_dname on a mount point
  staging: comedi: adl_pci9111: fix incorrect irq passed to request_irq()
  staging: comedi: addi_apci_1032: fix subdevice type/flags bug
  mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfully
  GFS2: Increase i_writecount during gfs2_setattr_chown
  perf/x86/amd/ibs: Fix waking up from S3 for AMD family 10h
  perf scripting perl: Fix build error on Fedora 12
  ARM: 7815/1: kexec: offline non panic CPUs on Kdump panic
  Linux 3.10.27
  sched: Guarantee new group-entities always have weight
  sched: Fix hrtimer_cancel()/rq->lock deadlock
  sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining
  sched: Fix race on toggling cfs_bandwidth_used
  x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround
  netfilter: nf_nat: fix access to uninitialized buffer in IRC NAT helper
  SCSI: sd: Reduce buffer size for vpd request
  intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters.
  mac80211: move "bufferable MMPDU" check to fix AP mode scan
  ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS
  ACPI / TPM: fix memory leak when walking ACPI namespace
  mfd: rtsx_pcr: Disable interrupts before cancelling delayed works
  clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks
  clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock
  clk: samsung: exynos4: Correct SRC_MFC register
  clk: clk-divider: fix divisor > 255 bug
  ahci: add PCI ID for Marvell 88SE9170 SATA controller
  parisc: Ensure full cache coherency for kmap/kunmap
  drm/nouveau/bios: make jump conditional
  ARM: shmobile: mackerel: Fix coherent DMA mask
  ARM: shmobile: armadillo: Fix coherent DMA mask
  ARM: shmobile: kzm9g: Fix coherent DMA mask
  ARM: dts: exynos5250: Fix MDMA0 clock number
  ARM: fix "bad mode in ... handler" message for undefined instructions
  ARM: fix footbridge clockevent device
  net: Loosen constraints for recalculating checksum in skb_segment()
  bridge: use spin_lock_bh() in br_multicast_set_hash_max
  netpoll: Fix missing TXQ unlock and and OOPS.
  net: llc: fix use after free in llc_ui_recvmsg
  virtio-net: fix refill races during restore
  virtio_net: don't leak memory or block when too many frags
  virtio-net: make all RX paths handle errors consistently
  virtio_net: fix error handling for mergeable buffers
  vlan: Fix header ops passthru when doing TX VLAN offload.
  net: rose: restore old recvmsg behavior
  rds: prevent dereference of a NULL device
  ipv6: always set the new created dst's from in ip6_rt_copy
  net: fec: fix potential use after free
  hamradio/yam: fix info leak in ioctl
  drivers/net/hamradio: Integer overflow in hdlcdrv_ioctl()
  net: inet_diag: zero out uninitialized idiag_{src,dst} fields
  ip_gre: fix msg_name parsing for recvfrom/recvmsg
  net: unix: allow bind to fail on mutex lock
  ipv6: fix illegal mac_header comparison on 32bit
  netvsc: don't flush peers notifying work during setting mtu
  tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0
  net: unix: allow set_peek_off to fail
  net: drop_monitor: fix the value of maxattr
  ipv6: don't count addrconf generated routes against gc limit
  packet: fix send path when running with proto == 0
  virtio: delete napi structures from netdev before releasing memory
  macvtap: signal truncated packets
  tun: update file current position
  macvtap: update file current position
  macvtap: Do not double-count received packets
  rds: prevent BUG_ON triggered on congestion update to loopback
  net: do not pretend FRAGLIST support
  IPv6: Fixed support for blackhole and prohibit routes
  HID: Revert "Revert "HID: Fix logitech-dj: missing Unifying device issue""
  gpio-rcar: R-Car GPIO IRQ share interrupt
  clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast
  irqchip: renesas-irqc: Fix irqc_probe error handling
  Linux 3.10.26
  sh: add EXPORT_SYMBOL(min_low_pfn) and EXPORT_SYMBOL(max_low_pfn) to sh_ksyms_32.c
  ext4: fix bigalloc regression
  arm64: Use Normal NonCacheable memory for writecombine
  arm64: Do not flush the D-cache for anonymous pages
  arm64: Avoid cache flushing in flush_dcache_page()
  ARM: KVM: arch_timers: zero CNTVOFF upon return to host
  ARM: hyp: initialize CNTVOFF to zero
  clocksource: arch_timer: use virtual counters
  arm64: Remove unused cpu_name ascii in arch/arm64/mm/proc.S
  arm64: dts: Reserve the memory used for secondary CPU release address
  arm64: check for number of arguments in syscall_get/set_arguments()
  arm64: fix possible invalid FPSIMD initialization state
  ...

Change-Id: Ia0e5d71b536ab49ec3a1179d59238c05bdd03106
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-03-24 14:28:34 -07:00
Katish Paran 7f4272bf39 diag: Response for 0x7C command
If modem proc has registered for the polling command and is up,
in that case Apps diag should not respond for the 0x7C command.
The 0x7C response should come from modem.

Change-Id: If1f79d19647988d4d909d1a079c46699c7b3ddab
CRs-fixed: 605172
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2014-03-24 11:28:25 +05:30
Linux Build Service Account e5708ab26f Merge "diag: Fix for sending responses in all modes" 2014-03-17 18:22:59 -07:00
Linux Build Service Account 1fe7c4164d Merge "diag: Update Diag over STM to support new command protocol" 2014-03-17 15:27:23 -07:00
Ravi Aravamudhan 04b773be39 diag: Fix for sending responses in all modes
Diag was sending the responses only to USB with the change
9d92106b2b - 'diag: Create separate
buffer for command responses'. Make changes to send responses
to user space clients in non-USB modes and to USB in USB mode.

Change-Id: I6e36da23cb4ec99774fb5e4d72e4ab7cb1acb575
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-03-17 11:32:38 -07:00
Mohit Aggarwal 84c2650865 diag: Add support for MSM8939 QPST string
MSM8939 is a new device. Add diag support for sending
appropriate model number for MSM8939 so that QPST
can display the appropriate string.

Change-Id: If25f790e330bef89fc332b9595833be7df30c719
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2014-03-17 15:05:31 +05:30
Linux Build Service Account 7a2b539ced Merge "diag: Remove invalid check for payload" 2014-03-12 20:10:40 -07:00
Linux Build Service Account e78d0510cc Merge "diag: Mode reset command has to be handled on APPS proc" 2014-03-12 20:10:06 -07:00
Dixon Peterson 9f8fdf1443 diag: Update Diag over STM to support new command protocol
Diag over STM command protocol currently supported is version 1
protocol. The protocol has been changed and labeled as version
2. Make modifications to support version 2 Diag over STM command
protocol.

Change-Id: I6853d8d2a6ed35166a9be28a464aa7c0dfe844b0
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2014-03-11 20:20:10 -07:00
Linux Build Service Account 950f7be0de Merge "diag: Initialize SMD buffers only when needed" 2014-03-11 19:30:18 -07:00
Linux Build Service Account e9b7727683 Merge "diag: dci: Don't read from HSIC if previous read fails" 2014-03-11 19:28:48 -07:00
Ravi Aravamudhan fc9b6d6ea8 diag: Fix incorrect checks in diag driver
Diag driver checks for a particular error value when it tries
to read from the HSIC channel. However, there is a possibility
for HSIC driver to return any error code.

Change-Id: I9f9f2680fbb86cb7ea1eb58b472f2a9bfb150226
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-03-07 16:31:14 -08:00
Ravi Aravamudhan 90c7ecf3bc diag: Copy limited data from and to the user space
Diag clients can issue IOCTLs to get the next delayed response
id from the Diag driver. This patch removes unnecessary data
being copied from and to the user space.

Change-Id: I13cf17252d2a85b999fd4645714ee1d8143e5ccc
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-03-07 11:46:26 -08:00
Ravi Aravamudhan dfb6efa643 diag: dci: Don't read from HSIC if previous read fails
Diag driver queues a read to diag_bridge even if the read
complete for the previous read has an error status. This
leads to continuous reads resulting in waking up the
system.

Change-Id: I59bb1f59e715611f7397ae7a7d3fb6c5bed56ea5
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2014-03-06 17:07:24 -08:00
Linux Build Service Account 6f4627c5f1 Merge "diag: Add changes to support 64 bit" 2014-03-06 07:39:28 -08:00
Dixon Peterson 823f0ce6e6 diag: Add changes to support 64 bit
The diag driver is required to work in 32 bit as well as
64 bit mode. This includes running with a 64 bit kernel
and 32 bit userspace. Make changes to support both 32 and
64 bit operation.

Change-Id: Ib37269203ac2e38d887e8fd650fc407ff604f2ac
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2014-03-04 17:35:11 -08:00
Linux Build Service Account 3575752ee4 Merge "diag: Create separate buffer for command responses" 2014-03-04 09:01:11 -08:00