]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Mon, 30 Apr 2012 02:39:06 +0000 (12:39 +1000)]
Merge branch 'quilt/rr'

Conflicts:
arch/arm/kernel/kprobes.c
arch/arm/kernel/smp.c
drivers/virtio/virtio_balloon.c
init/main.c

12 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 02:07:02 +0000 (12:07 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'

12 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 02:05:10 +0000 (12:05 +1000)]
Merge remote-tracking branch 'sound/for-next'

12 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Mon, 30 Apr 2012 02:03:43 +0000 (12:03 +1000)]
Merge remote-tracking branch 'crypto/master'

12 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Mon, 30 Apr 2012 02:02:13 +0000 (12:02 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

12 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Mon, 30 Apr 2012 02:00:46 +0000 (12:00 +1000)]
Merge remote-tracking branch 'bluetooth/master'

12 years agoMerge remote-tracking branch 'wireless-next/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:59:17 +0000 (11:59 +1000)]
Merge remote-tracking branch 'wireless-next/master'

Conflicts:
net/bluetooth/hci_core.c
net/bluetooth/mgmt.c

12 years agoMerge remote-tracking branch 'net-next/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:49:39 +0000 (11:49 +1000)]
Merge remote-tracking branch 'net-next/master'

Conflicts:
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/intel/e1000e/param.c

12 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Mon, 30 Apr 2012 01:48:11 +0000 (11:48 +1000)]
Merge remote-tracking branch 'slave-dma/next'

12 years agoMerge remote-tracking branch 'isci/all'
Stephen Rothwell [Mon, 30 Apr 2012 01:46:31 +0000 (11:46 +1000)]
Merge remote-tracking branch 'isci/all'

Conflicts:
drivers/scsi/libsas/sas_discover.c
include/scsi/libsas.h

12 years agoMerge remote-tracking branch 'target-merge/for-next-merge'
Stephen Rothwell [Mon, 30 Apr 2012 01:44:58 +0000 (11:44 +1000)]
Merge remote-tracking branch 'target-merge/for-next-merge'

12 years agoMerge remote-tracking branch 'target-updates/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:43:31 +0000 (11:43 +1000)]
Merge remote-tracking branch 'target-updates/for-next'

12 years agoMerge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:41:55 +0000 (11:41 +1000)]
Merge remote-tracking branch 'scsi/for-next'

12 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:40:22 +0000 (11:40 +1000)]
Merge remote-tracking branch 'ieee1394/for-next'

12 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:38:36 +0000 (11:38 +1000)]
Merge remote-tracking branch 'infiniband/for-next'

12 years agoMerge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:38:29 +0000 (11:38 +1000)]
Merge remote-tracking branch 'kconfig/for-next'

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:38:26 +0000 (11:38 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

12 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:36:43 +0000 (11:36 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'

Conflicts:
drivers/usb/gadget/uvc_queue.c

12 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:35:18 +0000 (11:35 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

12 years agoMerge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Mon, 30 Apr 2012 01:35:16 +0000 (11:35 +1000)]
Merge branch 'quilt/jdelvare-hwmon'

12 years agoMerge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:33:03 +0000 (11:33 +1000)]
Merge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'

12 years agoMerge remote-tracking branch 'bjdooks-i2c/next-i2c'
Stephen Rothwell [Mon, 30 Apr 2012 01:33:01 +0000 (11:33 +1000)]
Merge remote-tracking branch 'bjdooks-i2c/next-i2c'

Conflicts:
drivers/i2c/busses/i2c-omap.c

12 years agoMerge branch 'quilt/i2c'
Stephen Rothwell [Mon, 30 Apr 2012 01:31:35 +0000 (11:31 +1000)]
Merge branch 'quilt/i2c'

12 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:30:08 +0000 (11:30 +1000)]
Merge remote-tracking branch 'hid/for-next'

12 years agoMerge remote-tracking branch 'pci/next'
Stephen Rothwell [Mon, 30 Apr 2012 01:28:46 +0000 (11:28 +1000)]
Merge remote-tracking branch 'pci/next'

12 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:27:09 +0000 (11:27 +1000)]
Merge remote-tracking branch 'vfs/for-next'

12 years agoMerge remote-tracking branch 'xfs/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:25:47 +0000 (11:25 +1000)]
Merge remote-tracking branch 'xfs/for-next'

12 years agoMerge remote-tracking branch 'ubifs/linux-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:24:24 +0000 (11:24 +1000)]
Merge remote-tracking branch 'ubifs/linux-next'

12 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:22:57 +0000 (11:22 +1000)]
Merge remote-tracking branch 'nfsd/nfsd-next'

12 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:21:33 +0000 (11:21 +1000)]
Merge remote-tracking branch 'nfs/linux-next'

12 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:20:11 +0000 (11:20 +1000)]
Merge remote-tracking branch 'logfs/master'

12 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:18:48 +0000 (11:18 +1000)]
Merge remote-tracking branch 'gfs2/master'

12 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:17:24 +0000 (11:17 +1000)]
Merge remote-tracking branch 'fuse/for-next'

12 years agoMerge remote-tracking branch 'ext4/dev'
Stephen Rothwell [Mon, 30 Apr 2012 01:15:54 +0000 (11:15 +1000)]
Merge remote-tracking branch 'ext4/dev'

12 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Mon, 30 Apr 2012 01:14:31 +0000 (11:14 +1000)]
Merge remote-tracking branch 'ext3/for_next'

12 years agoMerge remote-tracking branch 'ecryptfs/next'
Stephen Rothwell [Mon, 30 Apr 2012 01:13:08 +0000 (11:13 +1000)]
Merge remote-tracking branch 'ecryptfs/next'

Conflicts:
fs/ecryptfs/ecryptfs_kernel.h

12 years agoMerge remote-tracking branch 'ceph/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:11:42 +0000 (11:11 +1000)]
Merge remote-tracking branch 'ceph/master'

12 years agoMerge remote-tracking branch 'tile/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:05:51 +0000 (11:05 +1000)]
Merge remote-tracking branch 'tile/master'

12 years agoMerge remote-tracking branch 'sparc-next/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:04:28 +0000 (11:04 +1000)]
Merge remote-tracking branch 'sparc-next/master'

12 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Mon, 30 Apr 2012 01:03:07 +0000 (11:03 +1000)]
Merge remote-tracking branch 'sh/sh-latest'

12 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Mon, 30 Apr 2012 01:01:47 +0000 (11:01 +1000)]
Merge remote-tracking branch 's390/features'

12 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Mon, 30 Apr 2012 01:00:26 +0000 (11:00 +1000)]
Merge remote-tracking branch 'mpc5xxx/next'

12 years agoMerge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:00:25 +0000 (11:00 +1000)]
Merge remote-tracking branch 'parisc/for-next'

12 years agoMerge remote-tracking branch 'openrisc/for-upstream'
Stephen Rothwell [Mon, 30 Apr 2012 01:00:24 +0000 (11:00 +1000)]
Merge remote-tracking branch 'openrisc/for-upstream'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Mon, 30 Apr 2012 00:59:01 +0000 (10:59 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

12 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 00:57:40 +0000 (10:57 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

12 years agoMerge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 00:56:17 +0000 (10:56 +1000)]
Merge remote-tracking branch 'm68k/for-next'

12 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Mon, 30 Apr 2012 00:54:56 +0000 (10:54 +1000)]
Merge remote-tracking branch 'ia64/next'

12 years agoMerge remote-tracking branch 'hexagon/linux-next'
Stephen Rothwell [Mon, 30 Apr 2012 00:53:34 +0000 (10:53 +1000)]
Merge remote-tracking branch 'hexagon/linux-next'

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 00:52:13 +0000 (10:52 +1000)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Mon, 30 Apr 2012 00:50:51 +0000 (10:50 +1000)]
Merge remote-tracking branch 'blackfin/for-linus'

12 years agoMerge remote-tracking branch 's5p/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 00:49:29 +0000 (10:49 +1000)]
Merge remote-tracking branch 's5p/for-next'

12 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 00:48:06 +0000 (10:48 +1000)]
Merge remote-tracking branch 'arm/for-next'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Mon, 30 Apr 2012 00:45:19 +0000 (10:45 +1000)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Mon, 30 Apr 2012 00:45:10 +0000 (10:45 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

12 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Mon, 30 Apr 2012 00:45:07 +0000 (10:45 +1000)]
Merge remote-tracking branch 'wireless/master'

12 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Mon, 30 Apr 2012 00:45:06 +0000 (10:45 +1000)]
Merge remote-tracking branch 'net/master'

12 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Mon, 30 Apr 2012 00:45:05 +0000 (10:45 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

12 years agoext4: add metadata checksumming to the list of supported features
Theodore Ts'o [Sun, 29 Apr 2012 22:49:10 +0000 (18:49 -0400)]
ext4: add metadata checksumming to the list of supported features

Activate the metadata checksumming feature by adding it to ext4 and jbd2's
lists of supported features.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: add checksums to the MMP block
Darrick J. Wong [Sun, 29 Apr 2012 22:47:10 +0000 (18:47 -0400)]
ext4: add checksums to the MMP block

Compute and verify a checksum for the MMP block.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: make block group checksums use metadata_csum algorithm
Darrick J. Wong [Sun, 29 Apr 2012 22:45:10 +0000 (18:45 -0400)]
ext4: make block group checksums use metadata_csum algorithm

metadata_csum supersedes uninit_bg.  Convert the ROCOMPAT uninit_bg
flag check to a helper function that covers both, and make the
checksum calculation algorithm use either crc16 or the metadata_csum
chosen algorithm depending on which flag is set.  Print a warning if
we try to mount a filesystem with both feature flags set.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: Calculate and verify checksums of extended attribute blocks
Darrick J. Wong [Sun, 29 Apr 2012 22:43:10 +0000 (18:43 -0400)]
ext4: Calculate and verify checksums of extended attribute blocks

Calculate and verify the checksums of extended attribute blocks.  This
only applies to separate EA blocks that are pointed to by
inode->i_file_acl (i.e.  external EA blocks); the checksum lives in
the EA header.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: calculate and verify checksums of directory leaf blocks
Darrick J. Wong [Sun, 29 Apr 2012 22:41:10 +0000 (18:41 -0400)]
ext4: calculate and verify checksums of directory leaf blocks

Calculate and verify the checksums for directory leaf blocks
(i.e. blocks that only contain actual directory entries).  The
checksum lives in what looks to be an unused directory entry with a 0
name_len at the end of the block.  This scheme is not used for
internal htree nodes because the mechanism in place there only costs
one dx_entry, whereas the "empty" directory entry would cost two
dx_entries.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: Calculate and verify checksums for htree nodes
Darrick J. Wong [Sun, 29 Apr 2012 22:39:10 +0000 (18:39 -0400)]
ext4: Calculate and verify checksums for htree nodes

Calculate and verify the checksum for directory index tree (htree)
node blocks.  The checksum is stored in the last 4 bytes of the htree
block and requires the dx_entry array to stop 1 dx_entry short of the
end of the block.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: verify and calculate checksums for extent tree blocks
Darrick J. Wong [Sun, 29 Apr 2012 22:37:10 +0000 (18:37 -0400)]
ext4: verify and calculate checksums for extent tree  blocks

Calculate and verify the checksum for each extent tree block.  The
checksum is located in the space immediately after the last possible
ext4_extent in the block.  The space is is typically the last 4-8
bytes in the block.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: calculate and verify block bitmap checksum
Darrick J. Wong [Sun, 29 Apr 2012 22:35:10 +0000 (18:35 -0400)]
ext4: calculate and verify block bitmap checksum

Compute and verify the checksum of the block bitmap; this checksum is
stored in the block group descriptor.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: calculate and verify checksums for inode bitmaps
Darrick J. Wong [Sun, 29 Apr 2012 22:33:10 +0000 (18:33 -0400)]
ext4: calculate and verify checksums for inode bitmaps

Compute and verify the checksum of the inode bitmap; the checkum is
stored in the block group descriptor.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: calculate and verify inode checksums
Darrick J. Wong [Sun, 29 Apr 2012 22:31:10 +0000 (18:31 -0400)]
ext4: calculate and verify inode checksums

This patch introduces to ext4 the ability to calculate and verify
inode checksums.  This requires the use of a new ro compatibility flag
and some accompanying e2fsprogs patches to provide the relevant
features in tune2fs and e2fsck.  The inode generation changes have
been integrated into this patch.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: calculate and verify superblock checksum
Darrick J. Wong [Sun, 29 Apr 2012 22:29:10 +0000 (18:29 -0400)]
ext4: calculate and verify superblock checksum

Calculate and verify the superblock checksum.  Since the UUID and
block group number are embedded in each copy of the superblock, we
need only checksum the entire block.  Refactor some of the code to
eliminate open-coding of the checksum update call.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: load the crc32c driver if necessary
Darrick J. Wong [Sun, 29 Apr 2012 22:27:10 +0000 (18:27 -0400)]
ext4: load the crc32c driver if necessary

Obtain a reference to the cryptoapi and crc32c if we mount a
filesystem with metadata checksumming enabled.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: record the checksum algorithm in use in the superblock
Darrick J. Wong [Sun, 29 Apr 2012 22:25:10 +0000 (18:25 -0400)]
ext4: record the checksum algorithm in use in the superblock

Record the type of checksum algorithm we're using for metadata in the
superblock, in case we ever want/need to change the algorithm.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: change on-disk layout to support extended metadata checksumming
Darrick J. Wong [Sun, 29 Apr 2012 22:23:10 +0000 (18:23 -0400)]
ext4: change on-disk layout to support extended metadata checksumming

Define flags and change structure definitions to allow checksumming of
ext4 metadata.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: create a new BH_Verified flag to avoid unnecessary metadata validation
Darrick J. Wong [Sun, 29 Apr 2012 22:21:10 +0000 (18:21 -0400)]
ext4: create a new BH_Verified flag to avoid unnecessary metadata validation

Create a new BH_Verified flag to indicate that we've verified all the
data in a buffer_head for correctness.  This allows us to bypass
expensive verification steps when they are not necessary without
missing them when they are.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoLinux 3.4-rc5 v3.4-rc5
Linus Torvalds [Sun, 29 Apr 2012 22:19:10 +0000 (15:19 -0700)]
Linux 3.4-rc5

12 years agoMerge tag 'pm-for-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Sun, 29 Apr 2012 22:00:44 +0000 (15:00 -0700)]
Merge tag 'pm-for-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael J. Wysocki:
 "Fix for an issue causing hibernation to hang on systems with highmem
  (that practically means i386) due to broken memory management (bug
  introduced in 3.2, so -stable material) and PM documentation update
  making the freezer documentation follow the code again after some
  recent updates."

* tag 'pm-for-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / Freezer / Docs: Update documentation about freezing of tasks
  PM / Hibernate: fix the number of pages used for hibernate/thaw buffering

12 years agoautofs: make the autofsv5 packet file descriptor use a packetized pipe
Linus Torvalds [Sun, 29 Apr 2012 20:30:08 +0000 (13:30 -0700)]
autofs: make the autofsv5 packet file descriptor use a packetized pipe

The autofs packet size has had a very unfortunate size problem on x86:
because the alignment of 'u64' differs in 32-bit and 64-bit modes, and
because the packet data was not 8-byte aligned, the size of the autofsv5
packet structure differed between 32-bit and 64-bit modes despite
looking otherwise identical (300 vs 304 bytes respectively).

We first fixed that up by making the 64-bit compat mode know about this
problem in commit a32744d4abae ("autofs: work around unhappy compat
problem on x86-64"), and that made a 32-bit 'systemd' work happily on a
64-bit kernel because everything then worked the same way as on a 32-bit
kernel.

But it turned out that 'automount' had actually known and worked around
this problem in user space, so fixing the kernel to do the proper 32-bit
compatibility handling actually *broke* 32-bit automount on a 64-bit
kernel, because it knew that the packet sizes were wrong and expected
those incorrect sizes.

As a result, we ended up reverting that compatibility mode fix, and
thus breaking systemd again, in commit fcbf94b9dedd.

With both automount and systemd doing a single read() system call, and
verifying that they get *exactly* the size they expect but using
different sizes, it seemed that fixing one of them inevitably seemed to
break the other.  At one point, a patch I seriously considered applying
from Michael Tokarev did a "strcmp()" to see if it was automount that
was doing the operation.  Ugly, ugly.

However, a prettier solution exists now thanks to the packetized pipe
mode.  By marking the communication pipe as being packetized (by simply
setting the O_DIRECT flag), we can always just write the bigger packet
size, and if user-space does a smaller read, it will just get that
partial end result and the extra alignment padding will simply be thrown
away.

This makes both automount and systemd happy, since they now get the size
they asked for, and the kernel side of autofs simply no longer needs to
care - it could pad out the packet arbitrarily.

Of course, if there is some *other* user of autofs (please, please,
please tell me it ain't so - and we haven't heard of any) that tries to
read the packets with multiple writes, that other user will now be
broken - the whole point of the packetized mode is that one system call
gets exactly one packet, and you cannot read a packet in pieces.

Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David Miller <davem@davemloft.net>
Cc: Ian Kent <raven@themaw.net>
Cc: Thomas Meyer <thomas@m3y3r.de>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoPM / Freezer / Docs: Update documentation about freezing of tasks
Marcos Paulo de Souza [Sun, 29 Apr 2012 20:29:30 +0000 (22:29 +0200)]
PM / Freezer / Docs: Update documentation about freezing of tasks

The file Documentation/power/freezing-of-tasks.txt was still referencing
the TIF_FREEZE flag, that was removed by the commit
d88e4cb67197d007fb778d62fe17360e970d5bfa(freezer: remove now unused
TIF_FREEZE).

This patch removes all the references of TIF_FREEZE that were left
behind.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoBluetooth: Add Code Aurora Forum copyright
Mat Martineau [Fri, 27 Apr 2012 23:50:55 +0000 (16:50 -0700)]
Bluetooth: Add Code Aurora Forum copyright

Adding Code Aurora Forum copyright information due to significant
additions of code.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Restore locking semantics when looking up L2CAP channels
Mat Martineau [Fri, 27 Apr 2012 23:50:52 +0000 (16:50 -0700)]
Bluetooth: Restore locking semantics when looking up L2CAP channels

As the comment for l2cap_get_chan_by_scid indicated, the function used
to return a locked socket.  The lock for the socket was acquired while
the channel list was also locked.

When locking was moved over to the l2cap_chan structure, the channel
lock was no longer acquired with the channel list still locked.  This
made it possible for the l2cap_chan to be deleted after
conn->chan_lock was released but before l2cap_chan_lock was called.
Making the call to l2cap_chan_lock before releasing conn->chan_lock
makes it impossible for the l2cap_chan to be deleted at the wrong
time.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Make better use of l2cap_chan reference counting
Mat Martineau [Fri, 27 Apr 2012 23:50:50 +0000 (16:50 -0700)]
Bluetooth: Make better use of l2cap_chan reference counting

L2CAP sockets contain a pointer to l2cap_chan that needs to be
reference counted in order to prevent a possible dangling pointer when
the channel is freed.

There were a few other cases where an l2cap_chan pointer on the stack
was dereferenced after a call to l2cap_chan_del. Those pointers are
also now reference counted.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Remove unused function
Mat Martineau [Fri, 27 Apr 2012 23:50:49 +0000 (16:50 -0700)]
Bluetooth: Remove unused function

l2cap_get_chan_by_ident was not used, but didn't generate a compiler
warning because it was an inline function.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Initialize new l2cap_chan structure members
Mat Martineau [Fri, 27 Apr 2012 23:50:48 +0000 (16:50 -0700)]
Bluetooth: Initialize new l2cap_chan structure members

Structure members used by ERTM or streaming mode need to be
initialized when an ERTM or streaming mode link is configured.  Some
duplicate code is also eliminated by moving in to the ERTM init
function.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Move recently-added ERTM header unpacking functions
Mat Martineau [Wed, 25 Apr 2012 23:36:16 +0000 (16:36 -0700)]
Bluetooth: Move recently-added ERTM header unpacking functions

Moving these functions simplifies future patches by eliminating
forward declarations, makes future patches easier to review, and
better preserves 'git blame' information.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Move recently-added ERTM header packing functions
Mat Martineau [Wed, 25 Apr 2012 23:36:15 +0000 (16:36 -0700)]
Bluetooth: Move recently-added ERTM header packing functions

Moving these functions simplifies future patches by eliminating
forward declarations, makes future patches easier to review, and
better preserves 'git blame' information.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Remove duplicate structure members from bt_skb_cb
Mat Martineau [Wed, 25 Apr 2012 23:36:14 +0000 (16:36 -0700)]
Bluetooth: Remove duplicate structure members from bt_skb_cb

These values are now in the nested l2cap_ctrl struct.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Improve ERTM sequence number offset calculation
Mat Martineau [Wed, 25 Apr 2012 23:36:12 +0000 (16:36 -0700)]
Bluetooth: Improve ERTM sequence number offset calculation

Instead of using modular division, the offset can be calculated using
only addition and subtraction.  The previous calculation did not work
as intended and was more difficult to understand, involving unsigned
integer underflow and a check for a negative value where one was not
possible.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Fix EIR data generation for mgmt_device_found
Vishal Agarwal [Thu, 26 Apr 2012 13:49:56 +0000 (19:19 +0530)]
Bluetooth: Fix EIR data generation for mgmt_device_found

The mgmt_device_found function expects to receive only the significant
part of the EIR data so it needs to be removed before calling the
function. This patch adds a new eir_get_length() helper function to
calculate the length of the significant part.

Signed-off-by: Vishal Agarwal <vishal.agarwal@stericsson.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
12 years agoBluetooth: Fix Inquiry with RSSI event mask
Johan Hedberg [Thu, 26 Apr 2012 06:47:46 +0000 (09:47 +0300)]
Bluetooth: Fix Inquiry with RSSI event mask

The right bit for "Inquiry with RSSI" is 0x02 and not 0x04 (which means
"Read Remote Extended Features Complete").

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: btmrvl: configure default host sleep parameters
Amitkumar Karwar [Tue, 24 Apr 2012 23:31:40 +0000 (16:31 -0700)]
Bluetooth: btmrvl: configure default host sleep parameters

Currently debugfs commands "hscfgcmd" and "gpiogap" are provided
for host sleep configuration. But if user doesn't configure host
sleep parameters using these commands, host sleep activation is
failed during suspend (support for suspend and resume handlers is
added in next patch).

Default host sleep configuration is done during driver initialisation
in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Remove advertising cache
Andre Guedes [Wed, 25 Apr 2012 00:02:56 +0000 (21:02 -0300)]
Bluetooth: Remove advertising cache

User-space pass the remote device address type to kernel through
struct sockaddr_l2 what makes the advertising useless. This patch
removes all advertising cache code.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: Use address type info from user-space
Andre Guedes [Wed, 25 Apr 2012 00:02:55 +0000 (21:02 -0300)]
Bluetooth: Use address type info from user-space

In order to establish a LE connection we need the address type
information. User-space already pass this information to kernel
through struct sockaddr_l2.

This patch adds the dst_type parameter to l2cap_chan_connect so we
are able to pass the address type info from user-space down to
hci_conn layer.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: Add dst_type parameter to hci_connect
Andre Guedes [Wed, 25 Apr 2012 00:02:54 +0000 (21:02 -0300)]
Bluetooth: Add dst_type parameter to hci_connect

This patch adds the dst_type parameter to hci_connect function.
Instead of searching the address type in advertising cache, we
use the dst_type parameter to establish LE connections.

The dst_type is ignored for BR/EDR connection establishment.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: Move bdaddr_to_le to hci_core
Andre Guedes [Wed, 25 Apr 2012 00:02:53 +0000 (21:02 -0300)]
Bluetooth: Move bdaddr_to_le to hci_core

This patch moves the helper function bdaddr_to_le to hci_core, so it
can be used in mgmt.c and hci_conn.c.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: Add address type to struct sockaddr_l2
Andre Guedes [Wed, 25 Apr 2012 00:02:52 +0000 (21:02 -0300)]
Bluetooth: Add address type to struct sockaddr_l2

This patch adds the address type info to struct sockaddr_l2 so
user-space can inform the remote device address type required
to establish LE connections.

Soon, instead of looking the advertising cache up to discover the
address type, we'll use this address type info to establish LE
connections.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: Rename mgmt_to_le to bdaddr_to_le
Andre Guedes [Wed, 25 Apr 2012 00:02:51 +0000 (21:02 -0300)]
Bluetooth: Rename mgmt_to_le to bdaddr_to_le

Since address type macros are not only related to Management
Interface anymore, it makes sense to rename the helper function
mgmt_to_le to bdaddr_to_le.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: Rename link_to_mgmt to link_to_bdaddr
Andre Guedes [Wed, 25 Apr 2012 00:02:50 +0000 (21:02 -0300)]
Bluetooth: Rename link_to_mgmt to link_to_bdaddr

Since address type macros are not only related to Management
Interface anymore, it makes sense to rename the helper function
link_to_mgmt to link_to_bdaddr.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: Move address type macros to bluetooth.h
Andre Guedes [Wed, 25 Apr 2012 00:02:49 +0000 (21:02 -0300)]
Bluetooth: Move address type macros to bluetooth.h

This patch moves address type macros to bluetooth.h since they will be
used by management interface and Bluetooth socket interface. It also
replaces the macro prefix MGMT_ADDR_ by BDADDR_.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: Remove useless code in hci_connect
Andre Guedes [Tue, 24 Apr 2012 19:11:11 +0000 (16:11 -0300)]
Bluetooth: Remove useless code in hci_connect

This patch removes unneeded variable assignments in hci_connect.
'sec_level' is already assigned to BT_SECURITY_LOW in hci_le_connect
and 'pending_sec_level' and 'auth_type' are assigned right after
if statement.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agopipes: add a "packetized pipe" mode for writing
Linus Torvalds [Sun, 29 Apr 2012 20:12:42 +0000 (13:12 -0700)]
pipes: add a "packetized pipe" mode for writing

The actual internal pipe implementation is already really about
individual packets (called "pipe buffers"), and this simply exposes that
as a special packetized mode.

When we are in the packetized mode (marked by O_DIRECT as suggested by
Alan Cox), a write() on a pipe will not merge the new data with previous
writes, so each write will get a pipe buffer of its own.  The pipe
buffer is then marked with the PIPE_BUF_FLAG_PACKET flag, which in turn
will tell the reader side to break the read at that boundary (and throw
away any partial packet contents that do not fit in the read buffer).

End result: as long as you do writes less than PIPE_BUF in size (so that
the pipe doesn't have to split them up), you can now treat the pipe as a
packet interface, where each read() system call will read one packet at
a time.  You can just use a sufficiently big read buffer (PIPE_BUF is
sufficient, since bigger than that doesn't guarantee atomicity anyway),
and the return value of the read() will naturally give you the size of
the packet.

NOTE! We do not support zero-sized packets, and zero-sized reads and
writes to a pipe continue to be no-ops.  Also note that big packets will
currently be split at write time, but that the size at which that
happens is not really specified (except that it's bigger than PIPE_BUF).
Currently that limit is the system page size, but we might want to
explicitly support bigger packets some day.

The main user for this is going to be the autofs packet interface,
allowing us to stop having to care so deeply about exact packet sizes
(which have had bugs with 32/64-bit compatibility modes).  But user
space can create packetized pipes with "pipe2(fd, O_DIRECT)", which will
fail with an EINVAL on kernels that do not support this interface.

Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David Miller <davem@davemloft.net>
Cc: Ian Kent <raven@themaw.net>
Cc: Thomas Meyer <thomas@m3y3r.de>
Cc: stable@kernel.org # needed for systemd/autofs interaction fix
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN
Mike Dunn [Wed, 25 Apr 2012 19:06:11 +0000 (12:06 -0700)]
mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN

The drivers _read() method, absent an error, return a non-negative integer
indicating the maximum number of bit errors that were corrected in any one
region comprising an ecc step.  MTD returns -EUCLEAN if this is >=
bitflip_threshold, 0 otherwise.  If bitflip_threshold is zero, the comparison is
not made since these devices lack ECC and always return zero in the non-error
case (thanks Brian) [1].  Note that this is a subtle change to the driver
interface.

This and the preceeding patches in this set were tested with ubi on top of the
nandsim and docg4 devices, running the ubi test io_basic from mtd-utils.

[1] http://lists.infradead.org/pipermail/linux-mtd/2012-March/040468.html

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>