pandora-kernel.git
11 years agoi2c-nomadik: Fixup clock handling
Philippe Begnic [Wed, 10 Oct 2012 11:02:26 +0000 (13:02 +0200)]
i2c-nomadik: Fixup clock handling

Make sure to clk_prepare as well as clk_enable.

Signed-off-by: Philippe Begnic <philippe.begnic@stericsson.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
11 years agoi2c: mxs: remove broken PIOQUEUE support
Wolfram Sang [Fri, 12 Oct 2012 10:55:16 +0000 (11:55 +0100)]
i2c: mxs: remove broken PIOQUEUE support

This I2C master can do DMA and PIOQUEUE (PIO with FIFO). Originally,
only PIOQUEUE was supported and it had issues, then DMA support was added
this cycle. The original intention was to keep PIOQUEUE since it has
less overhead what is nice for small transfers. However, runtime
switching between PIOQEUE and DMA depending on the transfer size never
worked despite a lot of trying. Since PIOQUEUE mode itself was flaky
(polling at places where interrupts failed to work) and the
implementation also imposed a size limit for transfers, it is best to
remove the support, so users don't fall over its limitations. It also
makes the driver a lot cleaner and more robust. If somebody really wants
less overhead, plain PIO mode could still be implemented with the
addidtional advantage that this mode is also available on MX23, too.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Reviewed-by: Marek Vasut <marex@denx.de>
11 years agoMerge tag 'xtensa-next-20121101' of git://github.com/czankel/xtensa-linux
Linus Torvalds [Fri, 2 Nov 2012 00:48:19 +0000 (17:48 -0700)]
Merge tag 'xtensa-next-20121101' of git://github.com/czankel/xtensa-linux

Pull Xtensa fixes from Chris Zankel:
 "Some important bug fixes.

  With the change to uapi, there was a bug introduced that results in an
  empty syscall table (mult-inclusion bug).  Switching to the generic
  thread/execve allowed us to fix a bug we had in vfork()."

* tag 'xtensa-next-20121101' of git://github.com/czankel/xtensa-linux:
  xtensa: switch to generic sys_execve()
  xtensa: switch to generic kernel_execve()
  xtensa: switch to generic kernel_thread()
  xtensa: reset windowbase/windowstart when cloning the VM
  xtensa: use physical addresses for bus addresses
  xtensa: allow multi-inclusion for uapi/unistd.h

11 years agodrm/udl: fix stride issues scanning out stride != width*bpp
Dave Airlie [Thu, 1 Nov 2012 03:47:09 +0000 (13:47 +1000)]
drm/udl: fix stride issues scanning out stride != width*bpp

When buffer sharing with the i915 and using a 1680x1050 monitor,
the i915 gives is a 6912 buffer for the 6720 width, the code doesn't
render this properly as it uses one value to set the base address for
reading from the vmap and for where to start on the device.

This fixes it by calculating the values correctly for the device and
for the pixmap. No idea how I haven't seen this before now.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agohwmon: Only include of_match_table with CONFIG_OF_GPIO
Jamie Lentin [Thu, 1 Nov 2012 23:55:43 +0000 (23:55 +0000)]
hwmon: Only include of_match_table with CONFIG_OF_GPIO

The following fixes build errors on sparc. Without any DT support,
of_match_ptr is NULL and the below is a no-op. However, if just
CONFIG_OF is defined then so is of_match_ptr.

All useful parts of the gpio-fan DT support rely on CONFIG_OF_GPIO
anyway, so of_match_table should too.

Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
11 years agoMerge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Dave Airlie [Fri, 2 Nov 2012 00:30:37 +0000 (10:30 +1000)]
Merge branch 'exynos-drm-fixes' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-fixes

Inki writes:
"As I posted before, we have added a new git repository for Exynos drm
to MAINTAINERS file so change it to new one like below,
   from git://git.infradead.org/users/kmpark/linux-samsung
   to git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos

And this pull request includes the following:
- fix display on issue when user requested dpms mode changing.
- add git repository for Exynos drm to MAINTAINERS file.
- add support for ARCH_MULTIPLATFORM.
- and code clean."

* 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm: exynos: removed warning due to missing typecast for mixer driver data
  drm/exynos: add support for ARCH_MULTIPLATFORM
  MAINTAINERS: Add git repository for Exynos DRM
  drm/exynos: fix display on issue

11 years agoMerge branch 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 2 Nov 2012 00:29:22 +0000 (10:29 +1000)]
Merge branch 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

Alex writes:
"This request is mostly load detection fixes from Egbert and me."

* 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: add load detection support for ext DAC on R200 (v2)
  DRM/radeon: For single CRTC GPUs move handling of CRTC_CRT_ON to crtc_dpms().
  DRM/Radeon: Fix TV DAC Load Detection for single CRTC chips.
  DRM/Radeon: Clean up code in TV DAC load detection.
  drm/radeon: fix ATPX function documentation
  drivers/gpu/drm/radeon/evergreen_cs.c: Remove unnecessary semicolon
  DRM/Radeon: On DVI-I use Load Detection when EDID is bogus.
  DRM/Radeon: Fix primary DAC Load Detection for RV100 chips.
  DRM/Radeon: Fix Load Detection on legacy primary DAC.

11 years agoMerge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel...
Dave Airlie [Fri, 2 Nov 2012 00:26:03 +0000 (10:26 +1000)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes

Daniel Vetter writes"
Nothing big at all for -fixes, just small stuff:
- Two patches to fix bugs on i830M
- ums regression fixer due to kicking firmeware fbs (Chris)
- tune down a too loud warning (Jani)
- be more careful with sdvo infoframes, which fixes a long-standing
  sdvo-hdmi regression"

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: Only kick out vesafb if we takeover the fbcon with KMS
  drm/i915: be less verbose about inability to provide vendor backlight
  drm/i915: clear the entire sdvo infoframe buffer
  drm/i915: VGA needs to be on pipe A on i830M
  drm/i915: fix overlay on i830M

11 years agoNFSv4: Initialise the NFSv4.1 slot table highest_used_slotid correctly
Trond Myklebust [Mon, 29 Oct 2012 20:48:40 +0000 (16:48 -0400)]
NFSv4: Initialise the NFSv4.1 slot table highest_used_slotid correctly

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agotcp: Fix double sizeof in new tcp_metrics code
Julian Anastasov [Tue, 30 Oct 2012 12:03:09 +0000 (12:03 +0000)]
tcp: Fix double sizeof in new tcp_metrics code

Fix double sizeof when parsing IPv6 address from
user space because it breaks get/del by specific IPv6 address.

Problem noticed by David Binderman:

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

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fix divide by zero in tcp algorithm illinois
Jesper Dangaard Brouer [Wed, 31 Oct 2012 02:45:32 +0000 (02:45 +0000)]
net: fix divide by zero in tcp algorithm illinois

Reading TCP stats when using TCP Illinois congestion control algorithm
can cause a divide by zero kernel oops.

The division by zero occur in tcp_illinois_info() at:
 do_div(t, ca->cnt_rtt);
where ca->cnt_rtt can become zero (when rtt_reset is called)

Steps to Reproduce:
 1. Register tcp_illinois:
     # sysctl -w net.ipv4.tcp_congestion_control=illinois
 2. Monitor internal TCP information via command "ss -i"
     # watch -d ss -i
 3. Establish new TCP conn to machine

Either it fails at the initial conn, or else it needs to wait
for a loss or a reset.

This is only related to reading stats.  The function avg_delay() also
performs the same divide, but is guarded with a (ca->cnt_rtt > 0) at its
calling point in update_params().  Thus, simply fix tcp_illinois_info().

Function tcp_illinois_info() / get_info() is called without
socket lock.  Thus, eliminate any race condition on ca->cnt_rtt
by using a local stack variable.  Simply reuse info.tcpv_rttcnt,
as its already set to ca->cnt_rtt.
Function avg_delay() is not affected by this race condition, as
its called with the socket lock.

Cc: Petr Matousek <pmatouse@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: sctp: Fix typo in net/sctp
Masanari Iida [Wed, 31 Oct 2012 05:48:19 +0000 (05:48 +0000)]
net: sctp: Fix typo in net/sctp

Correct spelling typo in net/sctp/socket.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: fix second off-by-one error
nikolay@redhat.com [Wed, 31 Oct 2012 06:03:52 +0000 (06:03 +0000)]
bonding: fix second off-by-one error

Fix off-by-one error because IFNAMSIZ == 16 and when this
code gets executed we stick a NULL byte where we should not.

How to reproduce:
 with CONFIG_CC_STACKPROTECTOR=y (otherwise it may pass by silently)
 modprobe bonding; echo 1 > /sys/class/net/bond0/bonding/mode;
 echo "AAAAAAAAAAAAAAAA" > /sys/class/net/bond0/bonding/active_slave;

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Note: Sorry for the second patch but I missed this one while checking
      the file. You can squash them into one patch.
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: fix off-by-one error
nikolay@redhat.com [Wed, 31 Oct 2012 04:42:51 +0000 (04:42 +0000)]
bonding: fix off-by-one error

Fix off-by-one error because IFNAMSIZ == 16 and when this
code gets executed we stick a NULL byte where we should not.

How to reproduce:
 with CONFIG_CC_STACKPROTECTOR=y (otherwise it may pass by silently)
 modprobe bonding; echo 1 > /sys/class/net/bond0/bonding/mode;
 echo "AAAAAAAAAAAAAAAA" > /sys/class/net/bond0/bonding/primary;

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoSUNRPC: return proper errno from backchannel_rqst
Weston Andros Adamson [Thu, 1 Nov 2012 15:21:53 +0000 (11:21 -0400)]
SUNRPC: return proper errno from backchannel_rqst

The one and only caller (in fs/nfs/nfs4client.c) uses the result
as an errno and would have interpreted an error as EPERM.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agobnx2x: Disable FCoE for 57840 since not yet supported by FW
Dmitry Kravkov [Wed, 31 Oct 2012 05:46:58 +0000 (05:46 +0000)]
bnx2x: Disable FCoE for 57840 since not yet supported by FW

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Fix no link on 577xx 10G-baseT
Yaniv Rosner [Wed, 31 Oct 2012 05:46:57 +0000 (05:46 +0000)]
bnx2x: Fix no link on 577xx 10G-baseT

Since the Warpcore supports various link types, need to set only the correct
supported modes for XFI which is the serdes interface for the 10G-baseT PHY.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Fix unrecognized SFP+ module after driver is loaded
Yaniv Rosner [Wed, 31 Oct 2012 05:46:56 +0000 (05:46 +0000)]
bnx2x: Fix unrecognized SFP+ module after driver is loaded

When SFP+ module is plugged in after driver is already loaded, it may not be
recognized, so set SFP module recognition time up to 300ms, without resetting
the module power in the middle.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Fix potential incorrect link speed provision
Yaniv Rosner [Wed, 31 Oct 2012 05:46:55 +0000 (05:46 +0000)]
bnx2x: Fix potential incorrect link speed provision

Fix possible incorrect link speed provision following rapid link speed change.
Clear link speed mask after each link change, and not only after link down.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Restore global registers back to default.
Yaniv Rosner [Wed, 31 Oct 2012 05:46:54 +0000 (05:46 +0000)]
bnx2x: Restore global registers back to default.

Several KR registers were not set correctly back to default after
loopback test, so set those global registers over the global WC lane (zero)
rather than the current lane.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Fix link down in 57712 following LFA
Yaniv Rosner [Wed, 31 Oct 2012 05:46:53 +0000 (05:46 +0000)]
bnx2x: Fix link down in 57712 following LFA

In case of link flap avoidance between PXE boot and bnx2x, set the appropriate
PHY DEVAD even if LFA kicks in.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: Fix 57810 1G-KR link against certain switches.
Yaniv Rosner [Wed, 31 Oct 2012 05:46:52 +0000 (05:46 +0000)]
bnx2x: Fix 57810 1G-KR link against certain switches.

Fix 1G KR link by restoring CL72 misc control register to default value rather
than 0.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Thu, 1 Nov 2012 15:27:02 +0000 (08:27 -0700)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fix from Marcelo Tosatti.

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: fix vcpu->mmio_fragments overflow

11 years agoixgbe: PTP get_ts_info missing software support
Jacob Keller [Wed, 31 Oct 2012 22:30:54 +0000 (22:30 +0000)]
ixgbe: PTP get_ts_info missing software support

This patch corrects the ethtool get_ts_info functon which did not state that
software timestamping was supported, even though it is.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
CC: Stable <stable@vger.kernel.org> [3.5]
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrm/radeon: add load detection support for ext DAC on R200 (v2)
Alex Deucher [Wed, 31 Oct 2012 15:51:03 +0000 (11:51 -0400)]
drm/radeon: add load detection support for ext DAC on R200 (v2)

The R200 asics use an external DAC for the secondary DAC.
The current KMS code tries to use code for the integrated
TV DAC for R200 which leads to unpredictable results since
R200 does not have an integrated TV DAC. This patch ports
the external DAC load detection support from the UMS
driver to KMS.

v2: fix typo in loop break logic

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Egbert Eich <eich@suse.de>
11 years agoDRM/radeon: For single CRTC GPUs move handling of CRTC_CRT_ON to crtc_dpms().
Egbert Eich [Mon, 29 Oct 2012 12:46:48 +0000 (13:46 +0100)]
DRM/radeon: For single CRTC GPUs move handling of CRTC_CRT_ON to crtc_dpms().

On all dual CRTC GPUs the CRTC_CRT_ON in the RADEON_CRTC_EXT_CNTL register
 controls the CRTC of the primary DAC. Therefore it is set in the DAC DMPS
function.
This is different for GPU's with a single CRTC but a primary and a
TV DAC: here it controls the single CRTC no matter where it is routed.
Therefore we set it here. This avoids an elaborate on/off state tracking
since both primary_dac_dpms() and tv_dac_dpms() functions would have
to touch this bit.
On single CRTC GPUs with just one DAC it's irrelevant where this bit
is handled.

agd5f: fix warning

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoDRM/Radeon: Fix TV DAC Load Detection for single CRTC chips.
Egbert Eich [Tue, 30 Oct 2012 16:42:27 +0000 (17:42 +0100)]
DRM/Radeon: Fix TV DAC Load Detection for single CRTC chips.

The RN50 has a TV DAC but only a single CRTC. For load detection this
DAC is controlled by the primary CRTC.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoDRM/Radeon: Clean up code in TV DAC load detection.
Egbert Eich [Tue, 30 Oct 2012 16:42:26 +0000 (17:42 +0100)]
DRM/Radeon: Clean up code in TV DAC load detection.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: fix ATPX function documentation
Igor Murzov [Thu, 25 Oct 2012 13:09:00 +0000 (17:09 +0400)]
drm/radeon: fix ATPX function documentation

Fix a copy&pasted documentation.

Signed-off-by: Igor Murzov <e-mail@date.by>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrivers/gpu/drm/radeon/evergreen_cs.c: Remove unnecessary semicolon
Peter Senna Tschudin [Wed, 24 Oct 2012 14:42:26 +0000 (16:42 +0200)]
drivers/gpu/drm/radeon/evergreen_cs.c: Remove unnecessary semicolon

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p

@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
        cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoDRM/Radeon: On DVI-I use Load Detection when EDID is bogus.
Egbert Eich [Wed, 24 Oct 2012 16:32:52 +0000 (18:32 +0200)]
DRM/Radeon: On DVI-I use Load Detection when EDID is bogus.

The Radeon driver uses the analog/digital flag to determine if the
DAC or the TMDS encoder should be enabled on a DVI-I connector.
If the EDID is bogus this flag is no longer reliable. This fix
adds a fallback to DAC load detection to determine if anything
is connected to the DAC. If not and a (bogus) EDID is found it
assumes a digital display is connected.
This works around problems with some crappy IPMI devices using
Radeon ES1000.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoDRM/Radeon: Fix primary DAC Load Detection for RV100 chips.
Egbert Eich [Wed, 24 Oct 2012 16:31:19 +0000 (18:31 +0200)]
DRM/Radeon: Fix primary DAC Load Detection for RV100 chips.

For Radeon 7500 ATI recommends a DAC_FORCE value of 0x1ac. This value
works better on ES1000 (RV100) chips, too, as it doesn't produce any false
positives on any cards I have tested. Therefore let's assume that this
value is good for all RV100 and RV200 chipset generations.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoDRM/Radeon: Fix Load Detection on legacy primary DAC.
Egbert Eich [Wed, 24 Oct 2012 16:29:49 +0000 (18:29 +0200)]
DRM/Radeon: Fix Load Detection on legacy primary DAC.

An uninitialized variable led to broken load detection.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
11 years agotarget: Fix incorrect usage of nested IRQ spinlocks in ABORT_TASK path
Steve Hodgson [Wed, 31 Oct 2012 17:24:02 +0000 (10:24 -0700)]
target: Fix incorrect usage of nested IRQ spinlocks in ABORT_TASK path

This patch changes core_tmr_abort_task() to use spin_lock -> spin_unlock
around se_cmd->t_state_lock while spin_lock_irqsave is held via
se_sess->sess_cmd_lock.

Signed-off-by: Steve Hodgson <steve@purestorage.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agoiscsi-target: Fix missed wakeup race in TX thread
Roland Dreier [Wed, 31 Oct 2012 16:16:46 +0000 (09:16 -0700)]
iscsi-target: Fix missed wakeup race in TX thread

The sleeping code in iscsi_target_tx_thread() is susceptible to the classic
missed wakeup race:

 - TX thread finishes handle_immediate_queue() and handle_response_queue(),
   thinks both queues are empty.
 - Another thread adds a queue entry and does wake_up_process(), which does
   nothing because the TX thread is still awake.
 - TX thread does schedule_timeout() and sleeps forever.

In practice this can kill an iSCSI connection if for example an initiator
does single-threaded writes and the target misses the wakeup window when
queueing an R2T; in this case the connection will be stuck until the
initiator loses patience and does some task management operation (or kills
the connection entirely).

Fix this by converting to wait_event_interruptible(), which does not
suffer from this sort of race.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: Andy Grover <agrover@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agotarget: Avoid integer overflow in se_dev_align_max_sectors()
Roland Dreier [Wed, 31 Oct 2012 16:16:45 +0000 (09:16 -0700)]
target: Avoid integer overflow in se_dev_align_max_sectors()

The expression (max_sectors * block_size) might overflow a u32
(indeed, since iblock sets max_hw_sectors to UINT_MAX, it is
guaranteed to overflow and end up with a much-too-small result in many
common cases).  Fix this by doing an equivalent calculation that
doesn't require multiplication.

While we're touching this code, avoid splitting a printk format across
two lines and use pr_info(...) instead of printk(KERN_INFO ...).

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agotarget: Don't return success from module_init() if setup fails
Roland Dreier [Wed, 31 Oct 2012 16:16:44 +0000 (09:16 -0700)]
target: Don't return success from module_init() if setup fails

If the call to core_dev_release_virtual_lun0() fails, then nothing
sets ret to anything other than 0, so even though everything is
torn down and freed, target_core_init_configfs() will seem to succeed
and the module will be loaded.  Fix this by passing the return value
on up the chain.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agotarget: Re-add explict zeroing of INQUIRY bounce buffer memory
Nicholas Bellinger [Thu, 1 Nov 2012 05:04:26 +0000 (22:04 -0700)]
target: Re-add explict zeroing of INQUIRY bounce buffer memory

This patch fixes a regression in spc_emulate_inquiry() code where the
local scope bounce buffer was no longer getting it's memory zeroed,
causing various problems with SCSI initiators that depend upon areas
of INQUIRY EVPD=0x83 payload having been zeroed.

This bug was introduced with the following v3.7-rc1 patch + CC'ed
stable commit:

commit ffe7b0e9326d9c68f5688bef691dd49f1e0d3651
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Fri Sep 7 17:30:38 2012 +0200

    target: support zero allocation length in INQUIRY

Go ahead and re-add the missing memset of bounce buffer memory to be
copied into the outgoing se_cmd descriptor kmapped SGL payload.

Reported-by: Kelsey Prantis <kelsey.prantis@intel.com>
Cc: Kelsey Prantis <kelsey.prantis@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Andy Grover <agrover@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Wed, 31 Oct 2012 22:42:08 +0000 (15:42 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull scsi target fixes from Nicholas Bellinger:
 "These are the current target pending fixes headed for v3.7-rc4 code.
  This includes the following highlights:

   - Fix long-standing qla2xxx target bug where certain fc_port_t state
     transitions could cause the internal session b-tree list to become
     out-of-sync.  (Roland)
   - Fix task management double free of se_cmd descriptor in exception
     path for users of target_submit_tmr().  (nab)
   - Re-introduce simple NOP emulation of REZERO_UNIT, SEEK_6, and
     SEEK_10 SCSI-2 commands in order to support legacy initiators that
     still require them.  (Bernhard)

  Note these three patches are also CC'ed to stable.

  Also, there a couple of outstanding (external) regressions that are
  still being tracked down for tcm_fc(FCoE) and tcm_vhost fabrics for
  v3.7.0 code, so please expect another PULL as these issues identified
  -> resolved."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: reintroduce some obsolete SCSI-2 commands
  target: Fix double-free of se_cmd in target_complete_tmr_failure
  qla2xxx: Update target lookup session tables when a target session changes
  tcm_qla2xxx: Format VPD page 83h SCSI name string according to SPC
  qla2xxx: Add missing ->vport_slock while calling qlt_update_vp_map

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 31 Oct 2012 22:40:21 +0000 (15:40 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull nouveau fixes from Dave Airlie:
 "Just a nouveau set, since we have a couple of reports on lkml and
  dri-devel of regressions that this should fix I sent it along on its
  own."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau: headless mode by default if pci class != vga display
  drm/nouveau: resurrect headless mode since rework
  drm/nv50/fb: prevent oops on chipsets without compression tags
  drm/nouveau: allow creation of zero-sized mm
  drm/nouveau/i2c: fix typo when checking nvio i2c port validity
  drm/nouveau: silence modesetting spam on pre-gf8 chipsets

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Wed, 31 Oct 2012 22:39:28 +0000 (15:39 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

Pull HID updates from Jiri Kosina:
 "This contains fixes for two devices by Jiri Slaby and Xianhan Yu, new
  device IDs for MacBook Pro 10,2 from Dirk Hohndel and generic
  multitouch code fix from Alan Cox."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Add support for the MacBook Pro 10,2 keyboard / touchpad
  HID: multitouch: fix maxcontacts problem on GeneralTouch
  HID: multitouch: put the case in the right switch statement
  HID: microsoft: fix invalid rdesc for 3k kbd

11 years agoMerge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Wed, 31 Oct 2012 22:38:32 +0000 (15:38 -0700)]
Merge tag 'sound-3.7' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This contains unexpectedly many changes in a wide range due to the
  fixes for races at disconnection of USB audio devices.  In the end, we
  end up covering fairly core parts of sound subsystem.

  Other than that, just a few usual small fixes."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: ice1724: Fix rate setup after resume
  ALSA: Avoid endless sleep after disconnect
  ALSA: Add a reference counter to card instance
  ALSA: usb-audio: Fix races at disconnection in mixer_quirks.c
  ALSA: usb-audio: Use rwsem for disconnect protection
  ALSA: usb-audio: Fix races at disconnection
  ALSA: PCM: Fix some races at disconnection
  ASoC: omap-dmic: Correct functional clock name
  ASoC: zoom2: Fix compile error by including correct header files
  ALSA: hda - Fix mute-LED setup for HP dv5 laptop

11 years agoKVM: x86: fix vcpu->mmio_fragments overflow
Xiao Guangrong [Wed, 24 Oct 2012 06:07:59 +0000 (14:07 +0800)]
KVM: x86: fix vcpu->mmio_fragments overflow

After commit b3356bf0dbb349 (KVM: emulator: optimize "rep ins" handling),
the pieces of io data can be collected and write them to the guest memory
or MMIO together

Unfortunately, kvm splits the mmio access into 8 bytes and store them to
vcpu->mmio_fragments. If the guest uses "rep ins" to move large data, it
will cause vcpu->mmio_fragments overflow

The bug can be exposed by isapc (-M isapc):

[23154.818733] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
[ ......]
[23154.858083] Call Trace:
[23154.859874]  [<ffffffffa04f0e17>] kvm_get_cr8+0x1d/0x28 [kvm]
[23154.861677]  [<ffffffffa04fa6d4>] kvm_arch_vcpu_ioctl_run+0xcda/0xe45 [kvm]
[23154.863604]  [<ffffffffa04f5a1a>] ? kvm_arch_vcpu_load+0x17b/0x180 [kvm]

Actually, we can use one mmio_fragment to store a large mmio access then
split it when we pass the mmio-exit-info to userspace. After that, we only
need two entries to store mmio info for the cross-mmio pages access

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
11 years agoNFS: add nfs_sb_deactive_async to avoid deadlock
Weston Andros Adamson [Tue, 30 Oct 2012 21:01:39 +0000 (17:01 -0400)]
NFS: add nfs_sb_deactive_async to avoid deadlock

Use nfs_sb_deactive_async instead of nfs_sb_deactive when in a workqueue
context.  This avoids a deadlock where rpc_shutdown_client loops forever
in a workqueue kworker context, trying to kill all RPC tasks associated with
the client, while one or more of these tasks have already been assigned to the
same kworker (and will never run rpc_exit_task).

This approach is needed because RPC tasks that have already been assigned
to a kworker by queue_work cannot be canceled, as explained in the comment
for workqueue.c:insert_wq_barrier.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
[Trond: add module_get/put.]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agonfs: Show original device name verbatim in /proc/*/mount{s,info}
Ben Hutchings [Sun, 21 Oct 2012 18:23:52 +0000 (19:23 +0100)]
nfs: Show original device name verbatim in /proc/*/mount{s,info}

Since commit c7f404b ('vfs: new superblock methods to override
/proc/*/mount{s,info}'), nfs_path() is used to generate the mounted
device name reported back to userland.

nfs_path() always generates a trailing slash when the given dentry is
the root of an NFS mount, but userland may expect the original device
name to be returned verbatim (as it used to be).  Make this
canonicalisation optional and change the callers accordingly.

[jrnieder@gmail.com: use flag instead of bool argument]
Reported-and-tested-by: Chris Hiestand <chiestand@salk.edu>
Reference: http://bugs.debian.org/669314
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: <stable@vger.kernel.org> # v2.6.39+
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agonfsv3: Make v3 mounts fail with ETIMEDOUTs instead EIO on mountd timeouts
Scott Mayhew [Tue, 16 Oct 2012 17:22:19 +0000 (13:22 -0400)]
nfsv3: Make v3 mounts fail with ETIMEDOUTs instead EIO on mountd timeouts

In very busy v3 environment, rpc.mountd can respond to the NULL
procedure but not the MNT procedure in a timely manner causing
the MNT procedure to time out. The problem is the mount system
call returns EIO which causes the mount to fail, instead of
ETIMEDOUT, which would cause the mount to be retried.

This patch sets the RPC_TASK_SOFT|RPC_TASK_TIMEOUT flags to
the rpc_call_sync() call in nfs_mount() which causes
ETIMEDOUT to be returned on timed out connections.

Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
11 years agonfs: Check whether a layout pointer is NULL before free it
Yanchuan Nian [Wed, 31 Oct 2012 08:05:48 +0000 (16:05 +0800)]
nfs: Check whether a layout pointer is NULL before free it

The new layout pointer in pnfs_find_alloc_layout() may be NULL because of
out of memory. we must do some check work, otherwise pnfs_free_layout_hdr()
will go wrong because it can not deal with a NULL pointer.

Signed-off-by: Yanchuan Nian <ycnian@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFS: fix bug in legacy DNS resolver.
NeilBrown [Wed, 31 Oct 2012 01:16:01 +0000 (12:16 +1100)]
NFS: fix bug in legacy DNS resolver.

The DNS resolver's use of the sunrpc cache involves a 'ttl' number
(relative) rather that a timeout (absolute).  This confused me when
I wrote
  commit c5b29f885afe890f953f7f23424045cdad31d3e4
     "sunrpc: use seconds since boot in expiry cache"

and I managed to break it.  The effect is that any TTL is interpreted
as 0, and nothing useful gets into the cache.

This patch removes the use of get_expiry() - which really expects an
expiry time - and uses get_uint() instead, treating the int correctly
as a ttl.

This fixes a regression that has been present since 2.6.37, causing
certain NFS accesses in certain environments to incorrectly fail.

Reported-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Chuck Lever <chuck.lever@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agocpufreq / powernow-k8: Change maintainer's email address
Andreas Herrmann [Tue, 30 Oct 2012 23:30:38 +0000 (00:30 +0100)]
cpufreq / powernow-k8: Change maintainer's email address

Change the Andreas' email address in drivers/cpufreq/powernow-k8.c.

Signed-off-by: Andreas Herrmann <herrmann.der.user@googlemail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoNFSv4: nfs4_locku_done must release the sequence id
Trond Myklebust [Mon, 29 Oct 2012 22:53:23 +0000 (18:53 -0400)]
NFSv4: nfs4_locku_done must release the sequence id

If the state recovery machinery is triggered by the call to
nfs4_async_handle_error() then we can deadlock.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
11 years agoNFSv4.1: We must release the sequence id when we fail to get a session slot
Trond Myklebust [Mon, 29 Oct 2012 22:37:40 +0000 (18:37 -0400)]
NFSv4.1: We must release the sequence id when we fail to get a session slot

If we do not release the sequence id in cases where we fail to get a
session slot, then we can deadlock if we hit a recovery scenario.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
11 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Wed, 31 Oct 2012 18:59:01 +0000 (14:59 -0400)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless

John W. Linville says:

====================
This is a batch of fixes intended for 3.7...

The biggest portion of this is a pull request from Johannes Berg:

"Please pull my mac80211.git tree per below to get a number of fixes. I
have included a patch from Antonio to fix a memcpy overrun, Felix's
patches for the antenna gain/tx power issues, a few mesh-related fixes
from Javier for mac80211 and my own patches to not access data that
might not be present in an skb at all as well as a patch (the duplicate
IE check one) to make mac80211 forward-compatible with potential future
spec extensions that use the same IE multiple times.

It's a bit bigger than I'd like maybe, but I think all of these are
worthwhile fixes at this point."

In addition...

Felix Fietkau fixes an ath9k use-after-free issue.

Stanislaw Gruszka adds a valid value check to rt2800.

Sven Eckelmann adds a check to only check a TID value in a BlockAck, for
frames that could be either a BlockAck or a normal Ack.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'master' of git://1984.lsi.us.es/nf
David S. Miller [Wed, 31 Oct 2012 18:54:15 +0000 (14:54 -0400)]
Merge branch 'master' of git://1984.lsi.us.es/nf

Pablo Neira Ayuso says:

====================
The following patchset contains fixes for your net tree, two of them
are due to relatively recent changes, one has been a longstanding bug,
they are:

* Fix incorrect usage of rt_gateway in the H.323 helper, from
  Julian Anastasov.

* Skip re-route in nf_nat code for ICMP traffic. If CONFIG_XFRM is
  enabled, we waste cycles to look up for the route again. This problem
  seems to be there since really long time. From Ulrich Weber.

* Fix mismatching section in nf_conntrack_reasm, from Hein Tibosch.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: don't expire permanent entries
stephen hemminger [Fri, 26 Oct 2012 06:24:34 +0000 (06:24 +0000)]
vxlan: don't expire permanent entries

VXLAN confused flag versus bitmap on state.
Based on part of a earlier patch by David Stevens.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoNFS: Wait for session recovery to finish before returning
Bryan Schumaker [Tue, 30 Oct 2012 20:06:35 +0000 (16:06 -0400)]
NFS: Wait for session recovery to finish before returning

Currently, we will schedule session recovery and then return to the
caller of nfs4_handle_exception.  This works for most cases, but causes
a hang on the following test case:

Client Server
------ ------
Open file over NFS v4.1
Write to file
Expire client
Try to lock file

The server will return NFS4ERR_BADSESSION, prompting the client to
schedule recovery.  However, the client will continue placing lock
attempts and the open recovery never seems to be scheduled.  The
simplest solution is to wait for session recovery to run before retrying
the lock.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Wed, 31 Oct 2012 17:10:01 +0000 (13:10 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem

11 years agoxen/mmu: Use Xen specific TLB flush instead of the generic one.
Konrad Rzeszutek Wilk [Wed, 31 Oct 2012 16:38:31 +0000 (12:38 -0400)]
xen/mmu: Use Xen specific TLB flush instead of the generic one.

As Mukesh explained it, the MMUEXT_TLB_FLUSH_ALL allows the
hypervisor to do a TLB flush on all active vCPUs. If instead
we were using the generic one (which ends up being xen_flush_tlb)
we end up making the MMUEXT_TLB_FLUSH_LOCAL hypercall. But
before we make that hypercall the kernel will IPI all of the
vCPUs (even those that were asleep from the hypervisor
perspective). The end result is that we needlessly wake them
up and do a TLB flush when we can just let the hypervisor
do it correctly.

This patch gives around 50% speed improvement when migrating
idle guest's from one host to another.

Oracle-bug: 14630170

CC: stable@vger.kernel.org
Tested-by: Jingjie Jiang <jingjie.jiang@oracle.com>
Suggested-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agodrm: exynos: removed warning due to missing typecast for mixer driver data
Rahul Sharma [Wed, 31 Oct 2012 04:06:26 +0000 (09:36 +0530)]
drm: exynos: removed warning due to missing typecast for mixer driver data

Removing the warning by adding proper type casting where local pointer
variable of type mixer driver data is assigned with void pointer.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agodrm/exynos: add support for ARCH_MULTIPLATFORM
Rob Clark [Mon, 29 Oct 2012 08:31:13 +0000 (09:31 +0100)]
drm/exynos: add support for ARCH_MULTIPLATFORM

Exynos does not seem to have any dependency on anything from
platform headers so just needs Kconfig updated to build in
ARCH_MULTIPLATFORM builds.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agoMAINTAINERS: Add git repository for Exynos DRM
Inki Dae [Tue, 30 Oct 2012 07:08:05 +0000 (16:08 +0900)]
MAINTAINERS: Add git repository for Exynos DRM

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agodrm/exynos: fix display on issue
Inki Dae [Thu, 18 Oct 2012 09:59:55 +0000 (18:59 +0900)]
drm/exynos: fix display on issue

When crtc_funcs->dpms callback is called, exynos_crtc->dpms
and exynos_encoder->dpms are changed to new mode. But if user
requests dpms mode operation, OFF -> ON, when crtc's dpms callback
is called, exynos_encoder->dpms is also changed to ON. This
makes encoder's dpms callback call be ignored so display power
couldn't become on again.

This patch removes exynos_encoder->dpms changing and adds 'updated'
variable to exynos_drm_encoder structure to avoid duplicated overlay
updating.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agoHID: Add support for the MacBook Pro 10,2 keyboard / touchpad
Dirk Hohndel [Tue, 30 Oct 2012 18:11:48 +0000 (11:11 -0700)]
HID: Add support for the MacBook Pro 10,2 keyboard / touchpad

This enables the existing drivers for keyboard and touchpad with the new
USB IDs found on the MBP 13" Reasonable Resolution (also known as the
Retina Display).

Added entries to both keyboard and mouse ignore lists.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoHID: multitouch: fix maxcontacts problem on GeneralTouch
Xianhan Yu [Mon, 29 Oct 2012 15:04:37 +0000 (23:04 +0800)]
HID: multitouch: fix maxcontacts problem on GeneralTouch

Fix maxcontacts problem for PWT GeneralTouch multi-touchscreen.

Our device didn't contain HID_DG_CONTACTMAX usage. This usage use to describe
touchscreen's maxcontacts for hid-multitouch.c to get maxcontacts automatic. We
fix the device that driver can get maxcontact from our device, hence it doesn't
need .maxcontact=10. Now there is just one device class can fix all our PWT
touchscreen.

Signed-off-by: Xianhan Yu <aroundight77@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoHID: multitouch: put the case in the right switch statement
Alan Cox [Thu, 25 Oct 2012 14:35:25 +0000 (15:35 +0100)]
HID: multitouch: put the case in the right switch statement

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoHID: microsoft: fix invalid rdesc for 3k kbd
Jiri Slaby [Fri, 19 Oct 2012 11:28:46 +0000 (13:28 +0200)]
HID: microsoft: fix invalid rdesc for 3k kbd

Microsoft Digital Media Keyboard 3000 has two interfaces, and the
second one has a report descriptor with a bug. The second collection
says:
05 01 -- global; usage page -- 01 -- Generic Desktop Controls
09 80 -- local; usage -- 80 -- System Control
a1 01 -- main; collection -- 01 -- application

85 03 -- global; report ID -- 03
19 00 -- local; Usage Minimum -- 00
29 ff -- local; Usage Maximum -- ff
15 00 -- global; Logical Minimum -- 0
26 ff 00 -- global; Logical Maximum -- ff
81 00 -- main; input

c0 -- main; End Collection

I.e. it makes us think that there are all kinds of usages of system
control. That the keyboard is a not only a keyboard, but also a
joystick, mouse, gamepad, keypad, etc. The same as for the Wireless
Desktop Receiver, this should be Physical Min/Max. So fix that
appropriately.

References: https://bugzilla.novell.com/show_bug.cgi?id=776834
Cc: <stable@vger.kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoALSA: ice1724: Fix rate setup after resume
Takashi Iwai [Wed, 31 Oct 2012 06:41:42 +0000 (07:41 +0100)]
ALSA: ice1724: Fix rate setup after resume

The rate isn't restored properly after resume since it's only set up
in hw_params, and not in prepare callback.  For fixing it, put the
corresponding call to resume callback as well.

Reported-and-tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoInput: tsc40 - remove wrong announcement of pressure support
Rolf Eike Beer [Wed, 31 Oct 2012 06:39:10 +0000 (23:39 -0700)]
Input: tsc40 - remove wrong announcement of pressure support

The tsc40 driver announces it supports the pressure event, but will never
send one. The announcement will cause tslib to wait for such events and
sending all touch events with a pressure of 0. Removing the announcement
will make tslib fall back to emulating the pressure on touch events so
everything works as expected.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoReturn the right error value when dup[23]() newfd argument is too large
Al Viro [Wed, 31 Oct 2012 03:37:48 +0000 (03:37 +0000)]
Return the right error value when dup[23]() newfd argument is too large

Jack Lin reports that the error return from dup3() for the RLIMIT_NOFILE
case changed incorrectly after 3.6.

The culprit is commit f33ff9927f42 ("take rlimit check to callers of
expand_files()") which when it moved the "return -EMFILE" out to the
caller, didn't notice that the dup3() had special code to turn the
EMFILE return into EBADF.

The replace_fd() helper that got added later then inherited the bug too.

Reported-by: Jack Lin <linliangjie@huawei.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[ Noted more bugs, wrote proper changelog, fixed up typos - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'drm-nouveau-fixes' of git://people.freedesktop.org/git/nouveau/linux...
Dave Airlie [Wed, 31 Oct 2012 03:46:04 +0000 (13:46 +1000)]
Merge branch 'drm-nouveau-fixes' of git://people.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes

This covers all known nouveau regressions at the moment, along with a fix
to not steal the console on headless GPUs.

* 'drm-nouveau-fixes' of git://people.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: headless mode by default if pci class != vga display
  drm/nouveau: resurrect headless mode since rework
  drm/nv50/fb: prevent oops on chipsets without compression tags
  drm/nouveau: allow creation of zero-sized mm
  drm/nouveau/i2c: fix typo when checking nvio i2c port validity
  drm/nouveau: silence modesetting spam on pre-gf8 chipsets

11 years agodrm/nouveau: headless mode by default if pci class != vga display
Ben Skeggs [Wed, 31 Oct 2012 02:16:06 +0000 (12:16 +1000)]
drm/nouveau: headless mode by default if pci class != vga display

This is to prevent nouveau from taking over the console on headless boards
such as Tesla.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agoMerge tag 'md-3.7-fixes' of git://neil.brown.name/md
Linus Torvalds [Wed, 31 Oct 2012 02:48:48 +0000 (19:48 -0700)]
Merge tag 'md-3.7-fixes' of git://neil.brown.name/md

Pull md fixes from NeilBrown:
 "Some fixes for md in 3.7
   - one recently introduced crash for dm-raid10 with discard
   - one bug in new functionality that has been around for a few
     releases.
   - minor bug in md's 'faulty' personality

  and UAPI disintegration for md."

* tag 'md-3.7-fixes' of git://neil.brown.name/md:
  MD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c
  md/raid1: Fix assembling of arrays containing Replacements.
  md faulty: use disk_stack_limits()
  UAPI: (Scripted) Disintegrate include/linux/raid

11 years agodrm/nouveau: resurrect headless mode since rework
Ben Skeggs [Wed, 31 Oct 2012 02:11:15 +0000 (12:11 +1000)]
drm/nouveau: resurrect headless mode since rework

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50/fb: prevent oops on chipsets without compression tags
Ben Skeggs [Wed, 31 Oct 2012 00:51:00 +0000 (10:51 +1000)]
drm/nv50/fb: prevent oops on chipsets without compression tags

Unconditionally create the tagram mm, even if there's zero tags.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: allow creation of zero-sized mm
Ben Skeggs [Wed, 31 Oct 2012 01:19:40 +0000 (11:19 +1000)]
drm/nouveau: allow creation of zero-sized mm

Useful for places where a given chipset may or may not have a given
resource, and we want to avoid having to spray checks for the mm's
existance around everywhere.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/i2c: fix typo when checking nvio i2c port validity
Ben Skeggs [Tue, 30 Oct 2012 05:07:58 +0000 (15:07 +1000)]
drm/nouveau/i2c: fix typo when checking nvio i2c port validity

Reported-by: Mathieu Chouquet-Stringer <mathieu@csetco.com>
Tested-by: Mathieu Chouquet-Stringer <mathieu@csetco.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: silence modesetting spam on pre-gf8 chipsets
Ben Skeggs [Sun, 28 Oct 2012 23:03:07 +0000 (09:03 +1000)]
drm/nouveau: silence modesetting spam on pre-gf8 chipsets

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agoMD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c
Jonathan Brassow [Wed, 31 Oct 2012 00:42:30 +0000 (11:42 +1100)]
MD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c

Commit 2863b9eb didn't take into account the changes to add TRIM support to
RAID10 (commit 532a2a3fb).  That is, when using dm-raid.c to create the
RAID10 arrays, there is no mddev->gendisk or mddev->queue.  The code added
to support TRIM simply assumes that mddev->queue is available without
checking.  The result is an oops any time dm-raid.c attempts to create a
RAID10 device.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
11 years agomd/raid1: Fix assembling of arrays containing Replacements.
NeilBrown [Wed, 31 Oct 2012 00:42:03 +0000 (11:42 +1100)]
md/raid1: Fix assembling of arrays containing Replacements.

setup_conf in raid1.c uses conf->raid_disks before assigning
a value.  It is used when including 'Replacement' devices.

The consequence is that assembling an array which contains a
replacement will misbehave and either not include the replacement, or
not include the device being replaced.

Though this doesn't lead directly to data corruption, it could lead to
reduced data safety.

So use mddev->raid_disks, which is initialised, instead.

Bug was introduced by commit c19d57980b38a5bb613a898937a1cf85f422fb9b
      md/raid1: recognise replacements when assembling arrays.

in 3.3, so fix is suitable for 3.3.y thru 3.6.y.

Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
11 years agoMerge tag 'gpio-fixes-v3.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 30 Oct 2012 22:56:22 +0000 (15:56 -0700)]
Merge tag 'gpio-fixes-v3.7-rc4' of git://git./linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 - Fix a potential bit wrap issue in the Timberdale driver
 - Fix up the buffer allocation size in the 74x164 driver
 - Set the value in direction_output() right in the mvebu driver
 - Return proper error codes for invalid GPIOs
 - Fix an off-mode bug for the OMAP
 - Don't initialize the mask_cach on the mvebu driver

* tag 'gpio-fixes-v3.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  GPIO: mvebu-gpio: Don't initialize the mask_cache
  gpio/omap: fix off-mode bug: clear debounce settings on free/reset
  gpiolib: Don't return -EPROBE_DEFER to sysfs, or for invalid gpios
  gpio: mvebu: correctly set the value in direction_output()
  gpio-74x164: Fix buffer allocation size
  gpio-timberdale: fix a potential wrapping issue

11 years agoMerge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 30 Oct 2012 22:35:16 +0000 (15:35 -0700)]
Merge tag 'ext4_for_linus_stable' of git://git./linux/kernel/git/tytso/ext4

Pull ext4 bugfix from Ted Ts'o:
 "This fixes the root cause of the ext4 data corruption bug which raised
  a ruckus on LWN, Phoronix, and Slashdot.

  This bug only showed up when non-standard mount options
  (journal_async_commit and/or journal_checksum) were enabled, and when
  the file system was not cleanly unmounted, but the root cause was the
  inode bitmap modifications was not being properly journaled.

  This could potentially lead to minor file system corruptions (pass 5
  complaints with the inode allocation bitmap) after an unclean shutdown
  under the wrong/unlucky workloads, but it turned into major failure if
  the journal_checksum and/or jouaral_async_commit was enabled."

* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix unjournaled inode bitmap modification

11 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Tue, 30 Oct 2012 22:34:09 +0000 (15:34 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block driver update from Jens Axboe:
 "Distilled down variant, the rest will pass over to 3.8.  I pulled it
  into the for-linus branch I had waiting for a pull request as well, in
  case you are wondering why there are new entries in here too.  This
  also got rid of two reverts and the ones of the mtip32xx patches that
  went in later in the 3.6 cycle, so the series looks a bit cleaner."

* 'for-linus' of git://git.kernel.dk/linux-block:
  loop: Make explicit loop device destruction lazy
  mtip32xx:Added appropriate timeout value for secure erase
  xen/blkback: Change xen_vbd's flush_support and discard_secure to have type unsigned int, rather than bool
  cciss: select CONFIG_CHECK_SIGNATURE
  cciss: remove unneeded memset()
  xen/blkback: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
  pktcdvd: update MAINTAINERS
  floppy: remove dr, reuse drive on do_floppy_init
  floppy: use common function to check if floppies can be registered
  floppy: properly handle failure on add_disk loop
  floppy: do put_disk on current dr if blk_init_queue fails
  floppy: don't call alloc_ordered_workqueue inside the alloc_disk loop
  xen/blkback: Fix compile warning
  block: Add blk_rq_pos(rq) to sort rq when plushing
  drivers/block: remove CONFIG_EXPERIMENTAL
  block: remove CONFIG_EXPERIMENTAL
  vfs: fix: don't increase bio_slab_max if krealloc() fails
  blkcg: stop iteration early if root_rl is the only request list
  blkcg: Fix use-after-free of q->root_blkg and q->root_rl.blkg

11 years agoGPIO: mvebu-gpio: Don't initialize the mask_cache
Andrew Lunn [Sat, 27 Oct 2012 13:28:58 +0000 (15:28 +0200)]
GPIO: mvebu-gpio: Don't initialize the mask_cache

Due to the SMP nature of some of the chips, which have per CPU
registers, the driver does not use the generic irq_gc_mask_set_bit() &
irq_gc_mask_clr_bit() functions, which only support a single register.
The driver has its own implementation of these functions, which can
pick the correct register depending on the CPU being used. The
functions do however use the gc->mask_cache value.

The call to irq_setup_generic_chip() was passing
IRQ_GC_INIT_MASK_CACHE, which caused the gc->mask_cache to be
initialized to the contents of some random register. This resulted in
unexpected interrupts been delivered from random GPIO lines.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoath9k: Test for TID only in BlockAcks while checking tx status
Sven Eckelmann [Mon, 29 Oct 2012 12:25:20 +0000 (13:25 +0100)]
ath9k: Test for TID only in BlockAcks while checking tx status

The ath9k xmit functions for AMPDUs can send frames as non-aggregate in case
only one frame is currently available. The client will then answer using a
normal Ack instead of a BlockAck. This acknowledgement has no TID stored and
therefore the hardware is not able to provide us the corresponding TID.

The TID set by the hardware in the tx status descriptor has to be seen as
undefined and not as a valid TID value for normal acknowledgements. Doing
otherwise results in a massive amount of retransmissions and stalls of
connections.

Users may experience low bandwidth and complete connection stalls in
environments with transfers using multiple TIDs.

This regression was introduced in b11b160defc48e4daa283f785192ea3a23a51f8e
("ath9k: validate the TID in the tx status information").

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Cc: stable@vger.kernel.org
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: validate step value for temperature compensation
Stanislaw Gruszka [Thu, 25 Oct 2012 07:51:39 +0000 (09:51 +0200)]
rt2800: validate step value for temperature compensation

Some hardware has correct (!= 0xff) value of tssi_bounds[4] in the
EEPROM, but step is equal to 0xff. This results on ridiculous delta
calculations and completely broke TX power settings.

Reported-and-tested-by: Pavel Lucik <pavel.lucik@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoxen/arm: use the __HVC macro
Stefano Stabellini [Wed, 24 Oct 2012 15:26:08 +0000 (16:26 +0100)]
xen/arm: use the __HVC macro

Use the new __HVC macro in hypercall.S.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/xenbus: fix overflow check in xenbus_file_write()
Jan Beulich [Wed, 17 Oct 2012 17:14:09 +0000 (13:14 -0400)]
xen/xenbus: fix overflow check in xenbus_file_write()

Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
[v1: Rebased on upstream]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen-kbdfront: handle backend CLOSED without CLOSING
David Vrabel [Thu, 18 Oct 2012 10:03:38 +0000 (11:03 +0100)]
xen-kbdfront: handle backend CLOSED without CLOSING

Backend drivers shouldn't transistion to CLOSED unless the frontend is
CLOSED.  If a backend does transition to CLOSED too soon then the
frontend may not see the CLOSING state and will not properly shutdown.

So, treat an unexpected backend CLOSED state the same as CLOSING.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen-fbfront: handle backend CLOSED without CLOSING
David Vrabel [Thu, 18 Oct 2012 10:03:37 +0000 (11:03 +0100)]
xen-fbfront: handle backend CLOSED without CLOSING

Backend drivers shouldn't transistion to CLOSED unless the frontend is
CLOSED.  If a backend does transition to CLOSED too soon then the
frontend may not see the CLOSING state and will not properly shutdown.

So, treat an unexpected backend CLOSED state the same as CLOSING.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoxen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF
David Vrabel [Wed, 24 Oct 2012 11:39:02 +0000 (12:39 +0100)]
xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF

map->kmap_ops allocated in gntdev_alloc_map() wasn't freed by
gntdev_put_map().

Add a gntdev_free_map() helper function to free everything allocated
by gntdev_alloc_map().

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Cc: stable@vger.kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agox86: remove obsolete comment from asm/xen/hypervisor.h
Olaf Hering [Thu, 25 Oct 2012 09:00:24 +0000 (11:00 +0200)]
x86: remove obsolete comment from asm/xen/hypervisor.h

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
11 years agoALSA: Avoid endless sleep after disconnect
Takashi Iwai [Tue, 16 Oct 2012 14:43:39 +0000 (16:43 +0200)]
ALSA: Avoid endless sleep after disconnect

When disconnect callback is called, each component should wake up
sleepers and check card->shutdown flag for avoiding the endless sleep
blocking the proper resource release.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: Add a reference counter to card instance
Takashi Iwai [Tue, 16 Oct 2012 11:05:59 +0000 (13:05 +0200)]
ALSA: Add a reference counter to card instance

For more strict protection for wild disconnections, a refcount is
introduced to the card instance, and let it up/down when an object is
referred via snd_lookup_*() in the open ops.

The free-after-last-close check is also changed to check this refcount
instead of the empty list, too.

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb-audio: Fix races at disconnection in mixer_quirks.c
Takashi Iwai [Mon, 15 Oct 2012 10:40:37 +0000 (12:40 +0200)]
ALSA: usb-audio: Fix races at disconnection in mixer_quirks.c

Similar like the previous commit, cover with chip->shutdown_rwsem
and chip->shutdown checks.

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb-audio: Use rwsem for disconnect protection
Takashi Iwai [Mon, 15 Oct 2012 10:16:02 +0000 (12:16 +0200)]
ALSA: usb-audio: Use rwsem for disconnect protection

Replace mutex with rwsem for codec->shutdown protection so that
concurrent accesses are allowed.

Also add the protection to snd_usb_autosuspend() and
snd_usb_autoresume(), too.

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb-audio: Fix races at disconnection
Takashi Iwai [Fri, 12 Oct 2012 13:12:55 +0000 (15:12 +0200)]
ALSA: usb-audio: Fix races at disconnection

Close some races at disconnection of a USB audio device by adding the
chip->shutdown_mutex and chip->shutdown check at appropriate places.

The spots to put bandaids are:
- PCM prepare, hw_params and hw_free
- where the usb device is accessed for communication or get speed, in
 mixer.c and others; the device speed is now cached in subs->speed
 instead of accessing to chip->dev

The accesses in PCM open and close don't need the mutex protection
because these are already handled in the core PCM disconnection code.

The autosuspend/autoresume codes are still uncovered by this patch
because of possible mutex deadlocks.  They'll be covered by the
upcoming change to rwsem.

Also the mixer codes are untouched, too.  These will be fixed in
another patch, too.

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: PCM: Fix some races at disconnection
Takashi Iwai [Fri, 12 Oct 2012 13:07:34 +0000 (15:07 +0200)]
ALSA: PCM: Fix some races at disconnection

Fix races at PCM disconnection:
- while a PCM device is being opened or closed
- while the PCM state is being changed without lock in prepare,
  hw_params, hw_free ops

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoloop: Make explicit loop device destruction lazy
Dave Chinner [Fri, 28 Sep 2012 08:42:23 +0000 (10:42 +0200)]
loop: Make explicit loop device destruction lazy

xfstests has always had random failures of tests due to loop devices
failing to be torn down and hence leaving filesytems that cannot be
unmounted. This causes test runs to immediately stop.

Over the past 6 or 7 years we've added hacks like explicit unmount
-d commands for loop mounts, losetup -d after unmount -d fails, etc,
but still the problems persist.  Recently, the frequency of loop
related failures increased again to the point that xfstests 259 will
reliably fail with a stray loop device that was not torn down.

That is despite the fact the test is above as simple as it gets -
loop 5 or 6 times running mkfs.xfs with different paramters:

        lofile=$(losetup -f)
        losetup $lofile "$testfile"
        "$MKFS_XFS_PROG" -b size=512 $lofile >/dev/null || echo "mkfs failed!"
        sync
        losetup -d $lofile

And losteup -d $lofile is failing with EBUSY on 1-3 of these loops
every time the test is run.

Turns out that blkid is running simultaneously with losetup -d, and
so it sees an elevated reference count and returns EBUSY.  But why
is blkid running? It's obvious, isn't it? udev has decided to try
and find out what is on the block device as a result of a creation
notification. And it is racing with mkfs, so might still be scanning
the device when mkfs finishes and we try to tear it down.

So, make losetup -d force autoremove behaviour. That is, when the
last reference goes away, tear down the device. xfstests wants it
*gone*, not causing random teardown failures when we know that all
the operations the tests have specifically run on the device have
completed and are no longer referencing the loop device.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
11 years agomtip32xx:Added appropriate timeout value for secure erase
Selvan Mani [Thu, 27 Sep 2012 12:36:43 +0000 (14:36 +0200)]
mtip32xx:Added appropriate timeout value for secure erase

Added appropriate timeout value for secure erase based on identify device data

Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Selvan Mani <smani@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
11 years agoxen/blkback: Change xen_vbd's flush_support and discard_secure to have type unsigned...
Oliver Chick [Fri, 21 Sep 2012 09:04:18 +0000 (10:04 +0100)]
xen/blkback: Change xen_vbd's flush_support and discard_secure to have type unsigned int, rather than bool

Changing the type of bdev parameters to be unsigned int :1, rather than bool.
This is more consistent with the types of other features in the block drivers.

Signed-off-by: Oliver Chick <oliver.chick@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
11 years agocciss: select CONFIG_CHECK_SIGNATURE
Akinobu Mita [Sun, 9 Sep 2012 10:47:47 +0000 (12:47 +0200)]
cciss: select CONFIG_CHECK_SIGNATURE

The patch cciss-use-check_signature.patch in -mm tree introduced
a build error:

drivers/built-in.o: In function `CISS_signature_present':
drivers/block/cciss.c:4270: undefined reference to `check_signature'

Add missing CONFIG_CHECK_SIGNATURE to fix this issue.

Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Fengguang Wu <wfg@linux.intel.com>
Cc: Mike Miller <mike.miller@hp.com>
Cc: Jens Axboe <axboe@kernel.dk>
Acked-by: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>