msm: smd: fix SMD probe initialization race condition

As an optimization, do_smd_probe() checks the free_offset and only
schedules the probe worker if the free_offset has changed (which
implies that new SMD channels may have been allocated).

If a remote subsystem allocates all of its SMD channels before SMSM
initialization has been completed, then when smsm_post_init() is
called, smsm_irq_handler() will call do_smd_probe() which will update
the free_offset and schedule the SMD probe worker. The probe worker
will bail because SMD has not been initialized yet (e.g. smd_initialized
isn't true). Once do_smd_probe() is called as part of smd_post_init(), it
compares the free_offset and doesn't see a change, so the SMD probe worker
is not scheduled.

Do not use do_smd_probe() until after SMD has been initialized.

CRs-Fixed: 538710
Change-Id: Ic4e97141202dfcb5f936a9cd38c6dcf9a61ccf8d
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
crypto: msm: ota: fix possible buffer overflow issue

This patch replaces snprintf with scnprintf to prevent
possible buffer overflow issues

CRs-Fixed: 562347

Change-Id: I56aebd24557dccc547ff86cb8853ace0602b6e50
Acked-by: Radhakrishna Popuri <c_rpopur@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
misc: qfpfuse: Fix overflow condition

Fix potential integer overflow for ioctl command to avoid incorrect
buffer allocation. Use the stack for data buffering to avoid the
small buffer allocation for improved performance. Increase the fuse
blow timeout in the driver to cover all QFPROM implementations.

CRs-Fixed: 550574,550575

Change-Id: Iee3cc1d38aa5dbf8ef693a43a0ca716fc8724c62
Acked-by: Radhakrishna Popuri <c_rpopur@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
Merge "misc: qfpfuse: Fix overflow condition" into msm-3.4
misc: qfpfuse: validate ioctl input parameters

validate input parameters for ioctl command request

CRs-Fixed: 550574,550575
Change-Id: I87c3818b3bacc43c679aa555d79cc6ed127c6ef8
Acked-by: John Nicholas <jnichola@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
misc: qfpfuse: Remove blow timer writes from driver

Remove redundant blow timer writes from the driver.

Change-Id: I50f864b6c5d544181bb7457d78af9e9237b6b578
Acked-by: John Nicholas <jnichola@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
mtd: msm_nand: enable nand r/w with vmalloc'd buffs > PAGE_SIZE

Fixed msm_nand_read & msm_nand_write APIs to enable transfers
to/from vmalloc'd buffs by using a kmalloc'd bounce buffer
whenever a vmalloc'd buffer spread across multiple pages is
to be accessed through DMA.
Replaced dma-mapping API for kmalloc'd buffs from dma_map_page to
dma_map_single to ensure cache coherence of buffs occupying more
than a page.
Modified msm_nand_read to ignore & accumulate -EBADMSG & -EUCLEAN
errors till end of multi-page read.

Change-Id: I108ffad34200e7b075405034e296613b490cbdbd
Acked-by: John Nicholas <jnichola@qti.qualcomm.com>
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
net: qfec: remove unwanted debug print

Remove unwanted debug print from the driver.

Change-Id: If10f589a3d62f0da5b18b375bc0b1e8839ae3bf4
Acked-by: John Nicholas <jnichola@qti.qualcomm.com>
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Merge "net: qfec: remove unwanted debug print" into msm-3.4
Merge tag 'F9200SAFCUPLX3730' of git://codeaurora.org/quic/femto/kernel/msm

"F9200SAFCUPLX3730"