[media] media: info leak in __media_device_enum_links()

These structs have holes and reserved struct members which aren't
cleared.  I've added a memset() so we don't leak stack information.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Change-Id: Ia22c66d36c0a7bcaee60e65a7db406a40f973006
Git-commit: c88e739b1fad662240e99ecbd0bdaac871717987
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
tspp: fix bam irq request preventing sleep

Registering and resetting BAM device upon initialization of tspp
driver requests bam irq resource, which prevents entering sleep.
Instead, BAM device is now initialized only when first needed which
is when the first channel is opened. BAM device is uninitialized
when channel is closed.

Change-Id: I056acea721fae164b91a2a5e3946028b4c2b6df2
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Merge "tspp: fix bam irq request preventing sleep"
USB: dwc3: otg: Fix stop endpoint command timeout issue

Currently HSPHY SUSP bit is set while starting host mode and
it is not cleared till stopping host mode. As part of urb dequeue,
xhci stack will queue stop endpoint command for flushing endpoint
which is getting timedout due to this HSPHY SUSP bit. Hence clear
this bit before queuing stop endpoint command and set it back after
stop endpoint command completion. Otherwise xhci stack treats this
timeout as fatal error and halts host controller.

Crs-Fixed: 580268
Change-Id: I784407386e6f87bcabd8569fcbae4e3af167144d
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Merge "USB: dwc3: otg: Fix stop endpoint command timeout issue"
Merge "[media] media: info leak in __media_device_enum_links()"
mmc: core: enhance card removal judgement for slow removal

Function _mmc_detect_card_removed will be called to know whether
the card is still present when host->bus_ops->detect is called.
In current code, the return value of this function generally only
depend on the result of sending cmd13 to card, which may not safe
for card with detection support like slot gpio detection.
Because the communication status between host and card may out of
sync with the detect status if remove the card slowly or hands shake
during the process. The direct reason is the async between card
detect switch and card/slot pad contaction in hardware, which is
defined by spec.

The spec define card insert/remove sequence as below (both standard size
SD card and MicroSD card have the same sequence):
"Part 1 Standard Size SD Card Mechanical Addendum Ver4.00 Final,
Appendix C: Card Detection Switch" (Take normally open type as example)
a)SD card insertion sequence:
  The card detection switch should be turned on after all SD card
  contact pads are connected to the host connector contact pads.
b)SD removal sequence:
  The card detection switch should be turned off when the SD card
  is just going to be removed and before any SD card contact pad is
  disconnected from the host connector contact pad.

Below is the sequence when this issue occur (Take slot gpio detection
as example and remove the card slowly during the process):
1. gpio level changed and card detect interrupt triggered.
2. mmc_rescan was launched.
3. the card pads were still contacted with the slot pads because of slow
   removal. So _mmc_detect_card_removed and mmc_rescan think card was
   still present (cmd13 succeed).
4. card pads were discontacted from the card slot pads.
So the card was actually removed finally but the card removal event
has been missed by system.
The interval length between step 1 and step 4 depends on the
card removal speed. If it's longer than the detect work schedule
delay which is 200ms, this issue will likely happen.

This patch add the card detect status check in function
_mmc_detect_card_removed if cmd13 check succeed and host->ops->get_cd
provided. If get_cd detect no card present then schedule another detect
work 200ms later.

CRs-fixed: 655754
Change-Id: I167309242c9937b023d14797177deb0e6be8838d
Signed-off-by: Kevin Liu <kliu5@marvell.com>
Git-commit: 1450734ec61cda7bbb77afc8cb412b9d64c62d9a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git
Tested-by: Johan Rudholm <johan.rudholm@stericsson.com>
Reviewed-by: Philip Rakity <prakity@nvidia.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
mmc: core: invoke low power mode if card is not present

If get_cd is defined and card is not present mmc_rescan
returns without invoking mmc_power_off. This would prevent
low-power modes.
Hence, invoke mmc_power_off if card is not present before
exiting mmc_rescan.

CRs-fixed: 655754
Change-Id: Id148fdf48e7f112da1251f8b60ac5d4c89a89e9f
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
slim_ngd: Support REPEAT_CHANGE_VALUE user message

REPEAT_CHANGE_VALUE user message is used to transfer high amount of
messaging data efficiently.

CRs-Fixed: 503461
Change-Id: I2762ad858b27ac84597f4eaf22fc6f3d14232d76
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Merge "mmc: core: enhance card removal judgement for slow removal"
Merge "mmc: core: invoke low power mode if card is not present"
Merge "slim_ngd: Support REPEAT_CHANGE_VALUE user message"
ngd_slim: Decouple clock pause from power down/up

NGD slimbus driver itself can never send out clock pause sequence
for slimbus protocol on the HW lines since it can only be sent by
a manager device (which is controlled by ADSP when NGD driver is
instantiated from apps side).
Previously, clock pause of slimbus framework was coupled with power
down/up. That is not correct, since manager device may or may not
decide to send clock-pause on the HW lines. (e.g. if apps is inactive,
but some client on ADSP is active, clock-pause sequence won't be sent
over the bus.
Decouple power-on/off from clock pause to avoid giving incorrect
impression to clients on apps side about clock-pause state. Mark
clock-pause as unsupported by setting wakup function pointer to NULL
instead since this controller on apps cannot send it on HW lines.

CRs-Fixed: 667165
Change-Id: I382bca153deb2fed1d0f0672adaebde1e122dc68
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Merge "ngd_slim: Decouple clock pause from power down/up"
Merge "qseecom: Add checks for user space buffer pointers"
Merge f32fb737a559a2241d9bb66a864a54dd3ea94979 on remote branch

Change-Id: Iddcc75f6e9436777c0d782c95c76e5c89bb88676
Merge "Merge f32fb737a559a2241d9bb66a864a54dd3ea94979 on remote branch"