net: flow_dissector: fail on evil iph->ihl

We don't validate iph->ihl which may lead a dead loop if we meet a IPIP
skb whose iph->ihl is zero. Fix this by failing immediately when iph->ihl
is evil (less than 5).

This issue were introduced by commit ec5efe7946280d1e84603389a1030ccec0a767ae
(rps: support IPIP encapsulation).

Cc: Eric Dumazet <edumazet@google.com>
Cc: Petr Matousek <pmatouse@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Merge "net: flow_dissector: fail on evil iph->ihl"
msm: vidc: rewrite v4l2 cluster construction

V4L2 framework has limitation of not supporting
same control in multiple clusters. Overcome this
limitation by grouping all controls into one
super cluster.

Change-Id: I974199e1388a1b33ae5e56edd4b0af712eb9babf
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
msm: vidc: fix a race condition in cluster construction

At start of video session, when the super cluster is
constructed, it refers to a global static variable.
If we have multiple instances running simultaneously,
there exists a race condition, causing the instance
to register wrong cluster. Later on when a control
gets set in encoder, if the control is not found in
the cluster, we hit a BUG_ON, crashing the device.

Change-Id: Ib4ee64d684d903bb4f22310a1b34619728405649
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Merge "msm: vidc: rewrite v4l2 cluster construction"
Merge "msm: vidc: fix a race condition in cluster construction"
msm: camera: sensor: Update CCI WR comamnd buffer size to 11 bytes

I2C command length is of 11 bytes, it includes 10 bytes of data and
one byte of WR command. Use 11 bytes char array to create command.

Change-Id: Idf330fef6b8da79c6b7f5a2839d88a68e10a96f9
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
Merge "msm: camera: sensor: Update CCI WR comamnd buffer size to 11 bytes"
ARM: dts: msm: reduce CPR turbo floor voltage for msm8226

The device tree property qti,cpr-cond-min-voltage = <1140000> along with
an appropriate qti,cpr-cond-min-volt-fuse property value ensure that the
CPR turbo floor voltage is restricted to 1.14 V on devices that cannot
operate at lower voltages.

Therefore, reduce the default CPR turbo floor voltage to 1.1 V in order
to save power on devices that can operate at the lower voltage.

Change-Id: Ic939d4a7b1c4da0a28dd779fe6a900310ae9fab7
Signed-off-by: Ke Liu <keliu@codeaurora.org>
msm: cpr-regulator: modify the dts definition for cond-min-volt

Previously, cpr-cond-min-volt-fuse defined the fuse row number and the
value used to compare with the whole row efuse value. The cpr-regulator
driver would then conditionally apply a higher CPR floor voltage for all
voltage corners if the efuse value differed from the expected value.

However, only a subset of the bits in the efuse are used for the
cond-min-volt feature. If any of the other bits in the fuse are set, then
the cpr-regulator driver incorrectly applies the higher floor voltage even
if the cond-min-volt bits are set correctly.

Modify the cpr-regulator driver and the cpr-regulator device tree
properties so that only specific bits in the fuse are compared to the
expected value. If the value of the cond-min-volt bits in the fuse is
not equal to the value defined in device tree, then set the MIN_VOLTAGE
flag.

Change-Id: I7de04e17dfa93fcb638e29a1dcc5e9072de26cb8
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
Signed-off-by: Ke Liu <keliu@codeaurora.org>
msm: cpr-regulator: add pvs voltage uplift workaround

There are some parts which require higher than expected voltage. Add a
workaround to check the condition in fuse and uplift the voltage and
quotient accordingly.

Change-Id: I59f821320e5e97fc2334ae7617a0045edb5cc970
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
Signed-off-by: Ke Liu <keliu@codeaurora.org>
ARM: dts: msm: enable pvs voltage uplift workaround for msm8226

Some 8x26 parts have lower pvs voltage than expected. Enable uplift
workaround of 50 mV on those parts under the specified conditions.

Change-Id: I3d8689ca0c5d576b1dd9057e36f67ea3622b80a1
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
ARM: dts: msm: change turbo floor voltage for msm8x10

Set CPR turbo floor voltage as CPR turbo ceiling voltage for stability
issues.

CRs-Fixed: 587085
Change-Id: I755fcc6fcdc3757e73bb81335bccfeb0feeb5769
Signed-off-by: Ke Liu <keliu@codeaurora.org>
msm: cpr-regulator: add dummy read to bypass false register value

There is an issue in certain CPR HW, which requires ignoring the
first read of IRQ_STATUS register in ISR.

CRs-Fixed: 570495
Change-Id: Ib1a57a3da3c60ffb5af3669947a4eb09dbb8c255
Signed-off-by: Ke Liu <keliu@codeaurora.org>
msm: cpr-regulator: add debug message in cpr_scale

Add debug message in cpr_scale to show gcnt and quotient when ceiling or
floor is hit.

Change-Id: I6bb6f5160f9f0b3d9140384871b0258b0ecac388
Signed-off-by: Ke Liu <keliu@codeaurora.org>
ARM: dts: msm: configure APC supply regulator S2 to auto mode for msm8226

Configure PMIC PM8226 regulator SMPS 2 for auto mode.  When
operating in auto mode, the regulator automatically switches
between PWM (high power) and PFM (low power) modes based upon
real-time current consumption.  This results in lower aggregate
power consumption since PFM mode has lower ground current than
PWM mode.

Change-Id: I4868a965e033000a27d55db43f37140910eeba8b
CRs-Fixed: 522545
Signed-off-by: David Collins <collinsd@codeaurora.org>
Revert "msm: cpr-regulator: remove register save and restore for suspend and resume"

This reverts commit 3a510810b2e67d1acc9db5f14a31734e51a988a1.

Change-Id: Ifcdf018d43043f652d76fcc45281343f0b9bbb57
Signed-off-by: Ke Liu <keliu@codeaurora.org>
Revert "msm: cpr-regulator: change sequence for handling CPR voltage over ceiling"

This reverts commit 2a8c3f17235b3858423c591a24f83bfb78b5adc0.

Change-Id: I3f10b90ca76ed3c29544b7b6523796d8c5513fd6
Signed-off-by: Ke Liu <keliu@codeaurora.org>
Merge "Revert "msm: cpr-regulator: remove register save and restore for suspend and resume""
Merge "Revert "msm: cpr-regulator: change sequence for handling CPR voltage over ceiling""