]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMIPS: Provide arch_syscall_addr.
Ralf Baechle [Fri, 13 Jul 2012 21:38:17 +0000 (23:38 +0200)]
MIPS: Provide arch_syscall_addr.

The generic version is wrong for MIPS.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: N32: Delete unused re-definition of SIGILL.
Ralf Baechle [Fri, 13 Jul 2012 19:16:37 +0000 (21:16 +0200)]
MIPS: N32: Delete unused re-definition of SIGILL.

Originally and unnecessarilly added in
dd8c35f40cda31dc8c027a62b73301a310b8b529 (lmo) [N32 ...]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: N32: Kill definition PT_TRACESYS for good.
Ralf Baechle [Fri, 13 Jul 2012 19:01:12 +0000 (21:01 +0200)]
MIPS: N32: Kill definition PT_TRACESYS for good.

Originally killed in 75ddbae069832b2ef15fb9678347ce7f5fbbbf95 (lmo) [Merge
with Linux 2.5.3.] then unnecessarily added back in
dd8c35f40cda31dc8c027a62b73301a310b8b529 (lmo) [N32 ...]  This predates
Linus' git history ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: 32-bit: Remove unused gas macros fifty and mille.
Ralf Baechle [Fri, 13 Jul 2012 11:36:40 +0000 (13:36 +0200)]
MIPS: 32-bit: Remove unused gas macros fifty and mille.

These are a leftover of the IRIX compat code which was removed in
2957c9e61ee9c37e7ebf2c8acab03e073fe942fd (kernel.org) rsp.
b934da913f236bca00c41d9e386e980586000461 (lmo) [[MIPS] IRIX: Goodbye
and thanks for all the fish].

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Enable entries for SIGSYS in struct siginfo.
Ralf Baechle [Thu, 12 Jul 2012 15:13:15 +0000 (17:13 +0200)]
MIPS: Enable entries for SIGSYS in struct siginfo.

This is necessary because MIPS doesn't use HAVE_ARCH_SIGINFO_T for
historical reasons.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: 64-bit: Mark native syscall table as data object.
Ralf Baechle [Thu, 12 Jul 2012 12:06:46 +0000 (14:06 +0200)]
MIPS: 64-bit: Mark native syscall table as data object.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: compat: Mark N32 syscall table as data object.
Ralf Baechle [Thu, 12 Jul 2012 12:02:41 +0000 (14:02 +0200)]
MIPS: compat: Mark N32 syscall table as data object.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: compat: Export O32 syscall table and rename to avoid duplicate symbol.
Ralf Baechle [Thu, 12 Jul 2012 12:01:31 +0000 (14:01 +0200)]
MIPS: compat: Export O32 syscall table and rename to avoid duplicate symbol.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoipv6: replace write lock with read lock when get route info
Li RongQing [Tue, 11 Sep 2012 21:59:01 +0000 (21:59 +0000)]
ipv6: replace write lock with read lock when get route info

geting route info does not write rt->rt6i_table, so replace
write lock with read lock

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: route templates can be const
Eric Dumazet [Tue, 11 Sep 2012 21:47:51 +0000 (21:47 +0000)]
ipv6: route templates can be const

We kmemdup() templates, so they can be const.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'ralf-3.7' of git://git.linux-mips.org/pub/scm/sjhill/linux-sjhill into...
Ralf Baechle [Thu, 13 Sep 2012 20:46:47 +0000 (22:46 +0200)]
Merge branch 'ralf-3.7' of git://git.linux-mips.org/pub/scm/sjhill/linux-sjhill into mips-for-linux-next

12 years agoMIPS: Optimise TLB handlers for MIPS32/64 R2 cores.
Steven J. Hill [Wed, 29 Aug 2012 04:20:39 +0000 (23:20 -0500)]
MIPS: Optimise TLB handlers for MIPS32/64 R2 cores.

The EXT and INS instructions can be used to decrease code size and
thus speed up TLB handlers on MIPS32R2 and MIPS64R2 cores.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agoMIPS: uasm: Add INS and EXT instructions.
Steven J. Hill [Thu, 12 Jul 2012 17:21:31 +0000 (17:21 +0000)]
MIPS: uasm: Add INS and EXT instructions.

These are MIPS32R2 instructions for merging and extracting bit fields
from one GPR into another.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agoMIPS: Avoid pipeline stalls on some MIPS32R2 cores.
Steven J. Hill [Wed, 29 Aug 2012 04:20:08 +0000 (23:20 -0500)]
MIPS: Avoid pipeline stalls on some MIPS32R2 cores.

The architecture specification says that an EHB instruction is
needed to avoid a hazard when writing TLB entries. However, some
cores do not have this hazard, and thus the EHB instruction causes
a costly pipeline stall. Detect these cores and do not use the EHB
instruction.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agoMIPS: Make VPE count to be one-based.
Steven J. Hill [Fri, 31 Aug 2012 21:23:49 +0000 (16:23 -0500)]
MIPS: Make VPE count to be one-based.

When dealing with multiple VPEs, the count needs to be one-based
for correct initialization of the GIC.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agoMIPS: Add new end of interrupt functionality for GIC.
Steven J. Hill [Fri, 31 Aug 2012 21:20:08 +0000 (16:20 -0500)]
MIPS: Add new end of interrupt functionality for GIC.

Each platform should define its own 'gic_finish_irq' function.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agoMIPS: Add EIC support for GIC.
Steven J. Hill [Fri, 31 Aug 2012 21:18:49 +0000 (16:18 -0500)]
MIPS: Add EIC support for GIC.

Add support to use an external interrupt controller with the GIC.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agoMIPS: Code clean-ups for the GIC.
Steven J. Hill [Fri, 31 Aug 2012 21:13:07 +0000 (16:13 -0500)]
MIPS: Code clean-ups for the GIC.

Fix whitespace, beautify the code and remove debug statements.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agoMIPS: Make GIC code platform independent.
Steven J. Hill [Fri, 31 Aug 2012 21:05:37 +0000 (16:05 -0500)]
MIPS: Make GIC code platform independent.

The GIC interrupt code is used by multiple platforms and the
current code was half Malta dependent code. These changes
abstract away the platform specific differences.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agoMIPS: Changes to configuration files for SEAD-3 platform.
Steven J. Hill [Fri, 11 May 2012 02:46:20 +0000 (02:46 +0000)]
MIPS: Changes to configuration files for SEAD-3 platform.

Change MIPS configuration files to add the SEAD-3. Also add
new default configuration file for a SEAD-3 kernel.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agoMIPS: Add core files for MIPS SEAD-3 development platform.
Steven J. Hill [Wed, 30 May 2012 21:02:49 +0000 (21:02 +0000)]
MIPS: Add core files for MIPS SEAD-3 development platform.

More information about the SEAD-3 platform can be found at
<http://www.mips.com/products/development-kits/mips-sead-3/>
on MTI's site. Currently, the M14K family of cores is what
the SEAD-3 is utilised with.

Signed-off-by: Douglas Leung <douglas@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agobnx2x: Add missing afex code
Yuval Mintz [Tue, 11 Sep 2012 04:34:14 +0000 (04:34 +0000)]
bnx2x: Add missing afex code

Commit a334872224a67b614dc888460377862621f3dac7 added afex support but lacked
several logical changes. This lack can cause afex to crash, and also
have a slight effect on other flows (i.e., driver always assumes the Tx ring
has less available buffers than what it actually has).

This patch adds the missing segments, fixing said issues.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: fix registers dumped
Dmitry Kravkov [Tue, 11 Sep 2012 04:34:13 +0000 (04:34 +0000)]
bnx2x: fix registers dumped

Under traffic, there are several registers that when read (e.g., via
'ethtool -d') may cause the chip to stall.
This patch corrects the registers read in such flows.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: correct advertisement of pause capabilities
Yaniv Rosner [Tue, 11 Sep 2012 04:34:12 +0000 (04:34 +0000)]
bnx2x: correct advertisement of pause capabilities

This patch propagates users' requested flow-control into the link layer,
which will later be used to advertise this flow-control for auto-negotiation
(until now these values were ignored).

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: display the correct duplex value
Yaniv Rosner [Tue, 11 Sep 2012 04:34:11 +0000 (04:34 +0000)]
bnx2x: display the correct duplex value

Prior to this fix, the driver reported the chip's active duplex state
is always 'full', even if using half-duplex mode.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: prevent timeouts when using PFC
Yaniv Rosner [Tue, 11 Sep 2012 04:34:10 +0000 (04:34 +0000)]
bnx2x: prevent timeouts when using PFC

Prevent updating the xmac PFC configuration when using a link speed
slower than 10G -the umac block is responsible for 1G or slower connections,
therefore it is possible the xmac block is reset when connection is slower.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: fix stats copying logic
Yuval Mintz [Tue, 11 Sep 2012 04:34:09 +0000 (04:34 +0000)]
bnx2x: fix stats copying logic

FW needs the driver statistics for management. Current logic is broken
in that the function that gathers the port statistics does not copy
its own statistics to a place where the FW can use it.
This patch causes every function that can pass statistics to the FW to
do so.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Avoid sending multiple statistics queries
Dmitry Kravkov [Tue, 11 Sep 2012 04:34:08 +0000 (04:34 +0000)]
bnx2x: Avoid sending multiple statistics queries

During traffic when DCB is enabled, it is possible for multiple instances
of statistics queries to be sent to the chip - this may cause the FW to assert.

This patch prevents the sending of an additional instance of statistics query
while the previous query hasn't completed.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Compare addresses only bits up to the prefix length (RFC6724).
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 10 Sep 2012 18:41:07 +0000 (18:41 +0000)]
ipv6: Compare addresses only bits up to the prefix length (RFC6724).

Compare bits up to the source address's prefix length only to
allows DNS load balancing to continue to be used as a tie breaker.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Add labels for site-local and 6bone testing addresses (RFC6724)
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 10 Sep 2012 18:16:49 +0000 (18:16 +0000)]
ipv6: Add labels for site-local and 6bone testing addresses (RFC6724)

Added labels for site-local addresses (fec0::/10) and 6bone testing
addresses (3ffe::/16) in order to depreference them.

Note that the RFC introduced new rows for Teredo, ULA and 6to4 addresses
in the default policy table.  Some of them have different labels from ours.
For backward compatibility, we do not change the "default" labels.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoscsi_netlink: Remove dead and buggy code
Eric W. Biederman [Fri, 7 Sep 2012 12:39:21 +0000 (12:39 +0000)]
scsi_netlink: Remove dead and buggy code

The scsi netlink code confuses the netlink port id with a process id,
going so far as to read NETLINK_CREDS(skb)->pid instead of the correct
NETLINK_CB(skb).pid.  Fortunately it does not matter because nothing
registers to respond to scsi netlink requests.

The only interesting use of the scsi_netlink interface is
fc_host_post_vendor_event which sends a netlink multicast message.

Since nothing registers to handle scsi netlink messages kill all of the
registration logic, while retaining the same error handling behavior
preserving the userspace visible behavior and removing all of the
confused code that thought a netlink port id was a process id.

This was tested with a kernel allyesconfig build which had no problems.

Cc: James Bottomley <James.Bottomley@parallels.com>
Cc: James Smart <James.Smart@Emulex.Com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMIPS: Add support for the 1074K core.
Steven J. Hill [Tue, 26 Jun 2012 04:11:03 +0000 (04:11 +0000)]
MIPS: Add support for the 1074K core.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
12 years agonetprio_cgroup: Use memcpy instead of the for-loop to copy priomap
Srivatsa S. Bhat [Wed, 12 Sep 2012 20:32:34 +0000 (20:32 +0000)]
netprio_cgroup: Use memcpy instead of the for-loop to copy priomap

Replace the current (inefficient) for-loop with memcpy, to copy priomap.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetprio_cgroup: Remove update_netdev_tables() since it is unnecessary
Srivatsa S. Bhat [Wed, 12 Sep 2012 20:32:25 +0000 (20:32 +0000)]
netprio_cgroup: Remove update_netdev_tables() since it is unnecessary

The update_netdev_tables() function appears to be unnecessary, since the
write_update_netdev_table() function will adjust the priomaps as and when
required anyway. So drop the usage of update_netdev_tables() entirely.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: qmi_wwan: call subdriver with control intf only
Bjørn Mork [Wed, 12 Sep 2012 20:44:35 +0000 (20:44 +0000)]
net: qmi_wwan: call subdriver with control intf only

This fixes a hang on suspend due to calling wdm_suspend on
the unregistered data interface. The hang should have been
a NULL pointer reference had it not been for a logic error
in the cdc_wdm code.

  commit 230718bd net: qmi_wwan: bind to both control and data interface

changed qmi_wwan to use cdc_wdm as a subdriver for devices with
a two-interface QMI/wwan function.  The commit failed to update
qmi_wwan_suspend and qmi_wwan_resume, which were written to handle
either a single combined interface function, or no subdriver at all.

The result was that we called into the subdriver both when the
control interface was suspended and when the data interface was
suspended.  Calling the subdriver suspend function with an
unregistered interface is not supported and will make the
subdriver bug out.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet_sched: gred: actually perform idling in WRED mode
David Ward [Thu, 13 Sep 2012 05:22:35 +0000 (05:22 +0000)]
net_sched: gred: actually perform idling in WRED mode

gred_dequeue() and gred_drop() do not seem to get called when the
queue is empty, meaning that we never start idling while in WRED
mode. And since qidlestart is not stored by gred_store_wred_set(),
we would never stop idling while in WRED mode if we ever started.
This messes up the average queue size calculation that influences
packet marking/dropping behavior.

Now, we start WRED mode idling as we are removing the last packet
from the queue. Also we now actually stop WRED mode idling when we
are enqueuing a packet.

Cc: Bruce Osler <brosler@cisco.com>
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet_sched: gred: fix qave reporting via netlink
David Ward [Thu, 13 Sep 2012 05:22:34 +0000 (05:22 +0000)]
net_sched: gred: fix qave reporting via netlink

q->vars.qavg is a Wlog scaled value, but q->backlog is not. In order
to pass q->vars.qavg as the backlog value, we need to un-scale it.
Additionally, the qave value returned via netlink should not be Wlog
scaled, so we need to un-scale the result of red_calc_qavg().

This caused artificially high values for "Average Queue" to be shown
by 'tc -s -d qdisc', but did not affect the actual operation of GRED.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet_sched: gred: eliminate redundant DP prio comparisons
David Ward [Thu, 13 Sep 2012 05:22:33 +0000 (05:22 +0000)]
net_sched: gred: eliminate redundant DP prio comparisons

Each pair of DPs only needs to be compared once when searching for
a non-unique prio value.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet_sched: gred: correct comment about qavg calculation in RIO mode
David Ward [Thu, 13 Sep 2012 05:22:32 +0000 (05:22 +0000)]
net_sched: gred: correct comment about qavg calculation in RIO mode

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'cn6xxx-mgmt' of git://git.linux-mips.org/pub/scm/daney/upstream-daney...
Ralf Baechle [Thu, 13 Sep 2012 19:55:17 +0000 (21:55 +0200)]
Merge branch 'cn6xxx-mgmt' of git://git.linux-mips.org/pub/scm/daney/upstream-daney into mips-for-linux-next

12 years agoMerge branch 'cn68xx-ciu2' of git://git.linux-mips.org/pub/scm/daney/upstream-daney...
Ralf Baechle [Thu, 13 Sep 2012 19:55:03 +0000 (21:55 +0200)]
Merge branch 'cn68xx-ciu2' of git://git.linux-mips.org/pub/scm/daney/upstream-daney into mips-for-linux-next

12 years agoMerge branch 'broadcom' of git://dev.phrozen.org/mips-next into mips-for-linux-next
Ralf Baechle [Thu, 13 Sep 2012 19:54:41 +0000 (21:54 +0200)]
Merge branch 'broadcom' of git://dev.phrozen.org/mips-next into mips-for-linux-next

12 years agoMerge branch 'ath79' of git://dev.phrozen.org/mips-next into mips-for-linux-next
Ralf Baechle [Thu, 13 Sep 2012 19:54:19 +0000 (21:54 +0200)]
Merge branch 'ath79' of git://dev.phrozen.org/mips-next into mips-for-linux-next

12 years agoMerge branch 'lantiq' of git://dev.phrozen.org/mips-next into mips-for-linux-next
Ralf Baechle [Thu, 13 Sep 2012 19:52:30 +0000 (21:52 +0200)]
Merge branch 'lantiq' of git://dev.phrozen.org/mips-next into mips-for-linux-next

12 years agobnx2x: Utilize Link Flap Avoidance
Yuval Mintz [Thu, 13 Sep 2012 02:56:21 +0000 (02:56 +0000)]
bnx2x: Utilize Link Flap Avoidance

Change various flows in the bnx2x driver which up until now flapped
the link - these flows now benefit from the link flap avoidance mechanism.

This includes the removal of the link reset made upon nic init, as it is
possible the link is already active at that time.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Link Flap Avoidance
Yaniv Rosner [Thu, 13 Sep 2012 02:56:20 +0000 (02:56 +0000)]
bnx2x: Link Flap Avoidance

Various flows in the bnx2x driver cause a link-flap - if the link
is up, it would be toggled down (after a mac/phy reset) and then
taken back up.

In many of these cases, there is no need to do cause such a flap,
as the associated flows should not actually affect the link.

This patch adds the 'Link Flap Avoidance' mechanism, which allows
the driver to better determine if a given flow requires a link change,
and thus minimize the number of link flaps caused by the driver.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: link code refactoring
Yaniv Rosner [Thu, 13 Sep 2012 02:56:19 +0000 (02:56 +0000)]
bnx2x: link code refactoring

Separate the interrupt setting part of each external PHY to a specific
function.
This allows calling the interrupt setting in case of link-flap avoidance,
since some link owners may not enable the interrupt on their own.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: Fix wrong usage of flush_work_sync while holding locks
Karsten Keil [Thu, 13 Sep 2012 04:36:20 +0000 (04:36 +0000)]
mISDN: Fix wrong usage of flush_work_sync while holding locks

It is a bad idea to hold a spinlock and call flush_work_sync.
Move the workqueue cleanup outside the spinlock and use cancel_work_sync,
on closing the channel this seems to be the more correct function.
Remove the never used and constant return value of mISDN_freebchannel.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
Cc: <stable@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://1984.lsi.us.es/nf-next
David S. Miller [Thu, 13 Sep 2012 18:24:31 +0000 (14:24 -0400)]
Merge branch 'master' of git://1984.lsi.us.es/nf-next

Pablo Neira Ayuso says:

====================
The following patchset contains four Netfilter updates, mostly targeting
to fix issues added with IPv6 NAT, and one little IPVS update for net-next:

* Remove unneeded conditional free of skb in nfnetlink_queue, from
  Wei Yongjun.

* One semantic path from coccinelle detected the use of list_del +
  INIT_LIST_HEAD, instead of list_del_init, again from Wei Yongjun.

* Fix out-of-bound memory access in the NAT address selection, from
  Florian Westphal. This was introduced with the IPv6 NAT patches.

* Two fixes for crashes that were introduced in the recently merged
  IPv6 NAT support, from myself.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://1984.lsi.us.es/nf
David S. Miller [Thu, 13 Sep 2012 17:53:06 +0000 (13:53 -0400)]
Merge branch 'master' of git://1984.lsi.us.es/nf

Pablo Neira Ayuso say:

====================
The following patchset contains four updates for your net tree, they are:

* Fix crash on timewait sockets, since the TCP early demux was added,
  in nfnetlink_log, from Eric Dumazet.

* Fix broken syslog log-level for xt_LOG and ebt_log since printk format was
  converted from <.> to a 2 bytes pattern using ASCII SOH, from Joe Perches.

* Two security fixes for the TCP connection tracking targeting off-path attacks,
  from Jozsef Kadlecsik. The problem was discovered by Jan Wrobel and it is
  documented in: http://mixedbit.org/reflection_scan/reflection_scan.pdf.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'pci/trivial' into next
Bjorn Helgaas [Thu, 13 Sep 2012 15:08:02 +0000 (09:08 -0600)]
Merge branch 'pci/trivial' into next

* pci/trivial:
  PCI: Drop duplicate const in DECLARE_PCI_FIXUP_SECTION
  PCI: Drop bogus default from ARCH_SUPPORTS_MSI
  PCI: cpqphp: Remove unreachable path
  PCI: Remove bus number resource debug messages
  PCI/AER: Print completion message at KERN_INFO to match starting message
  PCI: Fix drivers/pci/pci.c kernel-doc warnings

12 years agoALSA: hda - Yet another position_fix quirk for ASUS machines
Takashi Iwai [Thu, 13 Sep 2012 13:28:56 +0000 (15:28 +0200)]
ALSA: hda - Yet another position_fix quirk for ASUS machines

ASUS X53S also suffers from the same issue as in commit c302d6133.
Use POS_FIX_POSBUF for this hardware, too.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47461

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge commit 'v3.6-rc5' into next
Bjorn Helgaas [Thu, 13 Sep 2012 14:41:01 +0000 (08:41 -0600)]
Merge commit 'v3.6-rc5' into next

* commit 'v3.6-rc5': (1098 commits)
  Linux 3.6-rc5
  HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured
  Remove user-triggerable BUG from mpol_to_str
  xen/pciback: Fix proper FLR steps.
  uml: fix compile error in deliver_alarm()
  dj: memory scribble in logi_dj
  Fix order of arguments to compat_put_time[spec|val]
  xen: Use correct masking in xen_swiotlb_alloc_coherent.
  xen: fix logical error in tlb flushing
  xen/p2m: Fix one-off error in checking the P2M tree directory.
  powerpc: Don't use __put_user() in patch_instruction
  powerpc: Make sure IPI handlers see data written by IPI senders
  powerpc: Restore correct DSCR in context switch
  powerpc: Fix DSCR inheritance in copy_thread()
  powerpc: Keep thread.dscr and thread.dscr_inherit in sync
  powerpc: Update DSCR on all CPUs when writing sysfs dscr_default
  powerpc/powernv: Always go into nap mode when CPU is offline
  powerpc: Give hypervisor decrementer interrupts their own handler
  powerpc/vphn: Fix arch_update_cpu_topology() return value
  ARM: gemini: fix the gemini build
  ...

Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/rapidio/devices/tsi721.c

12 years agohwmon: (it87) Fix Kconfig for IT87 driver
Guenter Roeck [Wed, 12 Sep 2012 16:48:14 +0000 (09:48 -0700)]
hwmon: (it87) Fix Kconfig for IT87 driver

Add missing reference to IT8782F and IT8783E/F to it87 driver description
in Kconfig. Replace wrong reference to Si960 with the correct Si950.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (sht15) move header to linux/platform_data/
Vivien Didelot [Wed, 12 Sep 2012 16:23:44 +0000 (12:23 -0400)]
hwmon: (sht15) move header to linux/platform_data/

This patch moves the sht15.h header from include/linux to
include/linux/platform_data, and update existing support (stargate2
platform) accordingly.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
12 years agohwmon: (asus_atk0110) Remove useless kfree
Peter Senna Tschudin [Wed, 12 Sep 2012 15:06:42 +0000 (17:06 +0200)]
hwmon: (asus_atk0110) Remove useless kfree

The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
position p1,p2;
expression x;
@@

if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }

@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@

if (x@p1 == NULL) { ... when != I(x,...) S
                        when != e = e1
                        when != e += e1
                        when != e -= e1
                        when != ++e
                        when != --e
                        when != e++
                        when != e--
                        when != &e
   kfree@p2(x); ... return ...; }

@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@

... when != true x@p1 == NULL
kfree@p2(x);

@depends on !ok && unchanged@
position r.p2;
expression x;
@@

*kfree@p2(x);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
12 years agoALSA: hda - Allow to pass position_fix=0 explicitly
Takashi Iwai [Thu, 13 Sep 2012 12:59:47 +0000 (14:59 +0200)]
ALSA: hda - Allow to pass position_fix=0 explicitly

Set the default value of position_fix -1, and allow user passing
position_fix=0 explicitly to set the "auto" position-fix mode.
Otherwise the auto mode may be switched to others like COMBO of
VIACOMBO when the controller prefers it, thus user can't set the auto
mode any longer.

Also updated the documentation appropriately, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Thu, 13 Sep 2012 11:51:41 +0000 (19:51 +0800)]
Merge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Just a few small / trivial regression fixes at this time."

* tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: ice1724: Use linear scale for AK4396 volume control.
  ALSA: hda_intel: add position_fix quirk for Asus K53E
  ALSA: compress_core: fix open flags test in snd_compr_open()
  ALSA: hda - Fix Oops at codec reset/reconfig
  ALSA: usb-audio: Fix bogus error messages for delay accounting
  ALSA: hda - Fix missing Master volume for STAC9200/925x

12 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Thu, 13 Sep 2012 11:10:50 +0000 (19:10 +0800)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc bug fixes from Olof Johansson:

 - A set of OMAP fixes, about half of them PM/clock related, the rest
   scattered over the platform code but all small and targeted to real
   bugs.
 - Two small i.MX fixes for SSI device clock setup.

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: clk-imx35: Fix SSI clock registration
  ARM: clk-imx25: Fix SSI clock registration
  ARM: OMAP4: Fix array size for irq_target_cpu
  ARM: OMAP4: hwmod data: temporarily comment out data for the sl2if IP block
  ARM: OMAP: hwmod code: Disable module when hwmod enable fails
  ARM: OMAP3: hwmod data: fix iva2 reset info
  ARM: OMAP3xxx: clockdomain: fix software supervised wakeup/sleep
  ARM: OMAP2+: am33xx: Fix the timer fck clock naming convention
  ARM: OMAP: Config fix for omap3-touchbook board
  ARM: OMAP: sram: skip the first 16K on OMAP3 HS
  ARM: OMAP: sram: fix OMAP4 errata handling
  ARM: OMAP: timer: obey the !CONFIG_OMAP_32K_TIMER

12 years agoMerge tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Thu, 13 Sep 2012 11:07:15 +0000 (19:07 +0800)]
Merge tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

Pull additional AHCI PCI IDs from Jeff Garzik.

* tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: Add identifiers for ASM106x devices
  ahci: Add alternate identifier for the 88SE9172
  ahci: Add JMicron 362 device IDs

12 years agoMerge branch 'for-3.7' into asoc-next
Mark Brown [Thu, 13 Sep 2012 10:09:10 +0000 (18:09 +0800)]
Merge branch 'for-3.7' into asoc-next

12 years agoASoC: ad1836: Convert to direct regmap usage.
Lars-Peter Clausen [Thu, 13 Sep 2012 10:04:51 +0000 (12:04 +0200)]
ASoC: ad1836: Convert to direct regmap usage.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ad193x: Use managed regmap init
Lars-Peter Clausen [Thu, 13 Sep 2012 10:03:23 +0000 (12:03 +0200)]
ASoC: ad193x: Use managed regmap init

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoGPIO: MIPS: lantiq: fix overflow inside stp-xway driver
John Crispin [Wed, 11 Jul 2012 14:33:43 +0000 (16:33 +0200)]
GPIO: MIPS: lantiq: fix overflow inside stp-xway driver

The driver was using a 16 bit field for storing the shadow value of the shift
register cascade. This resulted in only the first 2 shift registeres receiving
the correct data. The third shift register would always receive 0x00.

Fix this by using a 32bit field for the shadow value.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-kernel@vger.kernel.org
12 years agoMIPS: lantiq: make use of __gpio_to_irq
John Crispin [Wed, 15 Aug 2012 13:41:50 +0000 (15:41 +0200)]
MIPS: lantiq: make use of __gpio_to_irq

The gpio_chip struct allows us to set a .to_irq callback. Once this is set
we can rely on the generic __gpio_to_irq() function to map gpio->irq allowing
more than one gpio_chip to register an interrupt

Signed-off-by: John Crispin <blogic@openwrt.org>
12 years agoDocument: devicetree: add OF documents for lantiq falcon pinctrl
John Crispin [Sun, 22 Jul 2012 07:23:50 +0000 (09:23 +0200)]
Document: devicetree: add OF documents for lantiq falcon pinctrl

Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
12 years agoDocument: devicetree: add OF documents for lantiq xway pinctrl
John Crispin [Fri, 20 Jul 2012 17:01:00 +0000 (19:01 +0200)]
Document: devicetree: add OF documents for lantiq xway pinctrl

Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
12 years agoOF: pinctrl: MIPS: lantiq: adds support for FALCON SoC
John Crispin [Sat, 19 May 2012 22:33:56 +0000 (00:33 +0200)]
OF: pinctrl: MIPS: lantiq: adds support for FALCON SoC

Implement support for pinctrl on lantiq/falcon socs. The FALCON has 5 banks
of up to 32 pins.

Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
12 years agoOF: pinctrl: MIPS: lantiq: implement lantiq/xway pinctrl support
John Crispin [Tue, 28 Aug 2012 10:44:59 +0000 (12:44 +0200)]
OF: pinctrl: MIPS: lantiq: implement lantiq/xway pinctrl support

Implement support for pinctrl on lantiq/xway socs. The IO core found on these
socs has the registers for pinctrl, pinconf and gpio mixed up in the same
register range. As the gpio_chip handling is only a few lines, the driver also
implements the gpio functionality. This obseletes the old gpio driver that was
located in the arch/ folder.

Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
12 years agoMerge branch 'misc' into for-next
James Bottomley [Thu, 13 Sep 2012 08:26:27 +0000 (09:26 +0100)]
Merge branch 'misc' into for-next

12 years agoMerge tag 'isci-for-3.6' into for-next
James Bottomley [Thu, 13 Sep 2012 08:26:10 +0000 (09:26 +0100)]
Merge tag 'isci-for-3.6' into for-next

isci update for 3.6

1/ Fix the workaround for drives that have a slow response to COMSAS.
   Drives with this problem intermittently take a long time to be
   identified, or fail to be identified altogether.

2/ A minor fix for the efi variable code failure path

3/ A handful of smatch fixups from Dan Carpenter

12 years agoALSA: hda - Fix disordered enum definitions in patch_cirrus.c
Takashi Iwai [Thu, 13 Sep 2012 07:56:57 +0000 (09:56 +0200)]
ALSA: hda - Fix disordered enum definitions in patch_cirrus.c

Due to the definitions of CS420X_IMAC27_122 and CS420X_APPLE as
aliases, the rest enums are set to duplicated values unexpectedly.
Move the alias definitions at the end so that the enum values are
defined in the proper order.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoInput: Fix oops caused by missing null test
Henrik Rydberg [Thu, 13 Sep 2012 06:59:40 +0000 (08:59 +0200)]
Input: Fix oops caused by missing null test

Found in linux-next on September 12, thanks Sedat.

Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
12 years ago[libata] export ata_dev_set_feature()
Jeff Garzik [Thu, 13 Sep 2012 05:12:29 +0000 (01:12 -0400)]
[libata] export ata_dev_set_feature()

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agolibata-core: use ATA_LBA in ata_build_rw_tf()
Sergei Shtylyov [Tue, 21 Aug 2012 18:18:50 +0000 (22:18 +0400)]
libata-core: use ATA_LBA in ata_build_rw_tf()

Since READ/WRITE FPDMA QUEUED commands are 48-bit, bit 6 of the device register
means LBA, the same as for READ/WRITE DMA EXT commands. So use ATA_LBA instead
of the bare number in ata_build_rw_tf()'s branch dedicated to the NCQ commands.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoata/ahci_platform: Add clock framework support
Viresh Kumar [Mon, 27 Aug 2012 05:07:19 +0000 (10:37 +0530)]
ata/ahci_platform: Add clock framework support

On many architectures, drivers are supposed to prepare/unprepare &
enable/disable functional clock of device. This patch adds clock support for
ahci_platform.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agopata_arasan: add Device Tree probing capability
Viresh Kumar [Mon, 27 Aug 2012 05:07:18 +0000 (10:37 +0530)]
pata_arasan: add Device Tree probing capability

SPEAr platforms now support DT and so must convert all drivers to support DT.
This patch adds DT probing support for Arasan Compact Flash controller and
updates its documentation too.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agopata_arasan: Add clk_{un}prepare() support
Viresh Kumar [Mon, 27 Aug 2012 05:07:17 +0000 (10:37 +0530)]
pata_arasan: Add clk_{un}prepare() support

clk_{un}prepare is mandatory for platforms using common clock framework. Since
this driver is used by SPEAr platform, which supports common clock framework,
add clk_{un}prepare() support for it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoata: add platform driver for Calxeda AHCI controller
Mark Langsdorf [Thu, 6 Sep 2012 21:03:30 +0000 (16:03 -0500)]
ata: add platform driver for Calxeda AHCI controller

Calxeda highbank SATA phy has intermittent problems bringing up a link
with Gen3 drives. Retrying the phy hard reset can work-around this issue,
but each reset also disables spread spectrum support. The reset function
also needs to reprogram the phy to enable spread spectrum support.

Create a new driver based on ahci_platform to support the Calxeda Highbank
SATA controller.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agosata_fsl: add workaround for data length mismatch on freescale V2 controller
Shaohui Xie [Tue, 11 Sep 2012 02:48:53 +0000 (10:48 +0800)]
sata_fsl: add workaround for data length mismatch on freescale V2 controller

The freescale V2 SATA controller checks if the received data length matches
the programmed length 'ttl', if not, it assumes that this is an error.
In ATAPI, the 'ttl' is based on max allocation length and not the actual
data transfer length, controller will raise 'DLM' (Data length Mismatch)
error bit in Hstatus register. Along with 'DLM', DE (Device error) and
FE (fatal Error) bits are also set in Hstatus register, 'E' (Internal Error)
bit is set in Serror register and CE (Command Error) and DE (Device error)
registers have the corresponding bit set. In this condition, we need to
clear errors in following way: in the service routine, based on 'DLM' flag,
HCONTROL[27] operation clears Hstatus, CE and DE registers, clear Serror
register.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Anju Bhartiya <Anju.Bhartiya@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoahci: implement aggressive SATA device sleep support
Shane Huang [Fri, 7 Sep 2012 14:40:01 +0000 (22:40 +0800)]
ahci: implement aggressive SATA device sleep support

Device Sleep is a feature as described in AHCI 1.3.1 Technical Proposal.
This feature enables an HBA and SATA storage device to enter the DevSleep
interface state, enabling lower power SATA-based systems.

Aggressive Device Sleep enables the HBA to assert the DEVSLP signal as
soon as there are no commands outstanding to the device and the port
specific Device Sleep idle timer has expired. This enables autonomous
entry into the DevSleep interface state without waiting for software
in power sensitive systems.

This patch enables Aggressive Device Sleep only if both host controller
and device support it.

Tested on AMD reference board together with Device Sleep supported device
sample.

Signed-off-by: Shane Huang <shane.huang@amd.com>
Reviewed-by: Aaron Lu <aaron.lwe@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoata: define enum constants for IDENTIFY DEVICE
Shane Huang [Fri, 7 Sep 2012 14:38:20 +0000 (22:38 +0800)]
ata: define enum constants for IDENTIFY DEVICE

Define enumeration constants for IDENTIFY DEVICE words.

Signed-off-by: Shane Huang <shane.huang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoMerge tag 'imx-fixes' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes
Olof Johansson [Thu, 13 Sep 2012 05:00:07 +0000 (22:00 -0700)]
Merge tag 'imx-fixes' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes

ARM: i.MX: Fix SSI clock associations for i.MX25/i.MX35

* tag 'imx-fixes' of git://git.pengutronix.de/git/imx/linux-2.6:
  ARM: clk-imx35: Fix SSI clock registration
  ARM: clk-imx25: Fix SSI clock registration
  + Linux 3.6-rc5

12 years agoMerge branch 'for-3.7' into asoc-next
Mark Brown [Thu, 13 Sep 2012 04:31:54 +0000 (12:31 +0800)]
Merge branch 'for-3.7' into asoc-next

12 years agoASoC: core: Remove useless kfree
Peter Senna Tschudin [Wed, 12 Sep 2012 15:06:46 +0000 (17:06 +0200)]
ASoC: core: Remove useless kfree

Remove useless kfree() and clean up code related to the removal.

The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
position p1,p2;
expression x;
@@

if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }

@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@

if (x@p1 == NULL) { ... when != I(x,...) S
                        when != e = e1
                        when != e += e1
                        when != e -= e1
                        when != ++e
                        when != --e
                        when != e++
                        when != e--
                        when != &e
   kfree@p2(x); ... return ...; }

@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@

... when != true x@p1 == NULL
kfree@p2(x);

@depends on !ok && unchanged@
position r.p2;
expression x;
@@

*kfree@p2(x);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoahci: Add identifiers for ASM106x devices
Alan Cox [Tue, 4 Sep 2012 15:25:25 +0000 (16:25 +0100)]
ahci: Add identifiers for ASM106x devices

They don't always appear as AHCI class devices but instead as IDE class.

Based on an initial patch by Hiroaki Nito

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42804
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoahci: Add alternate identifier for the 88SE9172
Alan Cox [Tue, 4 Sep 2012 15:07:18 +0000 (16:07 +0100)]
ahci: Add alternate identifier for the 88SE9172

This can also appear as 0x9192. Reported in bugzilla and confirmed with the
board documentation for these boards.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42970
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: The Stables <stable@vger.kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoahci: Add JMicron 362 device IDs
Ben Hutchings [Mon, 10 Sep 2012 00:09:04 +0000 (01:09 +0100)]
ahci: Add JMicron 362 device IDs

The JMicron JMB362 controller supports AHCI only, but some revisions
use the IDE class code.  These need to be matched by device ID.

These additions have apparently been included by QNAP in their NAS
devices using these controllers.

References: http://bugs.debian.org/634180
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoRevert "libata: enable SATA disk fua detection on default"
Jeff Garzik [Thu, 13 Sep 2012 04:14:21 +0000 (00:14 -0400)]
Revert "libata: enable SATA disk fua detection on default"

It caused several reported regressions.

This reverts commit 91895b786e631ab47b618c901231f22b5a44115b.

12 years agoASoC: core: Mark regmap CODEC register maps as dirty when suspending
Mark Brown [Wed, 12 Sep 2012 04:21:52 +0000 (12:21 +0800)]
ASoC: core: Mark regmap CODEC register maps as dirty when suspending

The core has for a long time had support for marking the register maps of
devices dirty when suspending so that they are resynced on resume. Also
implement this feature for CODECs using regmap.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoSUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT
Trond Myklebust [Wed, 12 Sep 2012 20:49:15 +0000 (16:49 -0400)]
SUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT

Instead of doing a shutdown() call, we need to do an actual close().
Ditto if/when the server is sending us junk RPC headers.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoMerge branch 'for-3.7' into asoc-next
Mark Brown [Thu, 13 Sep 2012 01:47:52 +0000 (09:47 +0800)]
Merge branch 'for-3.7' into asoc-next

12 years agoASoC: core: Mark regmap CODEC register maps as dirty when suspending
Mark Brown [Wed, 12 Sep 2012 04:21:52 +0000 (12:21 +0800)]
ASoC: core: Mark regmap CODEC register maps as dirty when suspending

The core has for a long time had support for marking the register maps of
devices dirty when suspending so that they are resynced on resume. Also
implement this feature for CODECs using regmap.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agogma500: Remove unused variable
Emil Goode [Wed, 5 Sep 2012 21:51:47 +0000 (23:51 +0200)]
gma500: Remove unused variable

This patch removes a unused struct psb_intel_connector

Sparse gives a warning:
drivers/gpu/drm/gma500/cdv_intel_hdmi.c:142:30: warning:
unused variable ‘psb_intel_connector’ [-Wunused-variable]

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovmwgfx: remove useless set memory to zero use memset()
Wei Yongjun [Mon, 27 Aug 2012 07:07:43 +0000 (07:07 +0000)]
vmwgfx: remove useless set memory to zero use memset()

The memory return by kzalloc() or kmem_cache_zalloc() has already
be set to zero, so remove useless memset(0).

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: edid: add support for E-DDC
Shirish S [Thu, 30 Aug 2012 07:04:06 +0000 (07:04 +0000)]
drm: edid: add support for E-DDC

The current logic for probing ddc is limited to
2 blocks (256 bytes), this patch adds support
for the 4 block (512) data.

To do this, a single 8-bit segment index is
passed to the display via the I2C address 30h.
Data from the selected segment is then immediately
read via the regular DDC2 address using a repeated
I2C 'START' signal.

Signed-off-by: Shirish S <s.shirish@samsung.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Remove unnecessary test for ARM.
Robert P. J. Day [Thu, 30 Aug 2012 11:23:46 +0000 (11:23 +0000)]
drm: Remove unnecessary test for ARM.

Since arch/arm/include/asm/pgtable.h contains:

#define io_remap_pfn_range(vma,from,pfn,size,prot) \
                remap_pfn_range(vma, from, pfn, size, prot)

there is no point treating ARM as a special case in distinguishing
between remap_pfn_range() and io_remap_pfn_range().

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: use %*ph to dump small buffers
Andy Shevchenko [Wed, 5 Sep 2012 12:04:19 +0000 (12:04 +0000)]
drm: use %*ph to dump small buffers

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: edid: Refactor HDMI VSDB detection
Ville Syrjälä [Thu, 16 Aug 2012 14:55:06 +0000 (14:55 +0000)]
drm: edid: Refactor HDMI VSDB detection

There are two slightly different pieces of code for HDMI VSDB
detection. Unify the code into a single helper function.

Also fix a bug where drm_detect_hdmi_monitor() would stop looking
for the HDMI VSDB after the first vendor specific block is found,
whether or not that block happened to be the HDMI VSDB. The
standard allows for any number of vendor specific blocks to be
present.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: edid: Add bounds checking to HDMI VSDB parsing
Ville Syrjälä [Thu, 16 Aug 2012 14:55:05 +0000 (14:55 +0000)]
drm: edid: Add bounds checking to HDMI VSDB parsing

The length of HDMI VSDB must be at least 5 bytes. Other than the minimum,
nothing else about the length is specified. Check the length before
accessing any additional field beyond the minimum length.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>