]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/log
mirror_ubuntu-eoan-kernel.git
14 years agoocfs2: Avoid unnecessary block mapping when refreshing quota info
Jan Kara [Wed, 28 Apr 2010 17:04:29 +0000 (19:04 +0200)]
ocfs2: Avoid unnecessary block mapping when refreshing quota info

The position of global quota file info does not change. So we do not have
to do logical -> physical block translation every time we reread it from
disk. Thus we can also avoid taking ip_alloc_sem.

Acked-by: Joel Becker <Joel.Becker@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoocfs2: Do not map blocks from local quota file on each write
Jan Kara [Tue, 27 Apr 2010 22:22:30 +0000 (00:22 +0200)]
ocfs2: Do not map blocks from local quota file on each write

There is no need to map offset of local dquot structure to on disk block
in each quota write. It is enough to map it just once and store the physical
block number in quota structure in memory. Moreover this simplifies locking
as we do not have to take ip_alloc_sem from quota write path.

Acked-by: Joel Becker <Joel.Becker@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoquota: Refactor dquot_transfer code so that OCFS2 can pass in its references
Jan Kara [Thu, 13 May 2010 17:58:50 +0000 (19:58 +0200)]
quota: Refactor dquot_transfer code so that OCFS2 can pass in its references

Currently, __dquot_transfer() acquires its own references of dquot structures
that will be put into inode. But for OCFS2, this creates a lock inversion
between dq_lock (waited on in dqget) and transaction start (started in
ocfs2_setattr). Currently, deadlock is impossible because dq_lock is acquired
only during dquot_acquire and dquot_release and we already hold a reference to
dquot structures in ocfs2_setattr so neither of these functions can be called
while we call dquot_transfer. But this is rather subtle and it is hard to teach
lockdep about it. So provide __dquot_transfer function that can be passed dquot
references directly. OCFS2 can then pass acquired dquot references directly to
__dquot_transfer with proper locking.

Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoquota: unify quota init condition in setattr
Dmitry Monakhov [Thu, 8 Apr 2010 18:04:20 +0000 (22:04 +0400)]
quota: unify quota init condition in setattr

Quota must being initialized if size or uid/git changes requested.
But initialization performed in two different places:
in case of i_size file system is responsible for dquot init
, but in case of uid/gid init will be called internally in
dquot_transfer().
This ambiguity makes code harder to understand.
Let's move this logic to one common helper function.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoquota: remove sb_has_quota_active in get/set_info
Christoph Hellwig [Fri, 7 May 2010 16:35:40 +0000 (12:35 -0400)]
quota: remove sb_has_quota_active in get/set_info

The methods already do these checks, so remove them in the quotactl
implementation to allow non-VFS quota implementations to also support
these calls.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoquota: unify ->set_dqblk
Christoph Hellwig [Thu, 6 May 2010 21:05:17 +0000 (17:05 -0400)]
quota: unify ->set_dqblk

Pass the larger struct fs_disk_quota to the ->set_dqblk operation so
that the Q_SETQUOTA and Q_XSETQUOTA operations can be implemented
with a single filesystem operation and we can retire the ->set_xquota
operation.  The additional information (RT-subvolume accounting and
warn counts) are left zero for the VFS quota implementation.

Add new fieldmask values for setting the numer of blocks and inodes
values which is required for the VFS quota, but wasn't for XFS.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoquota: unify ->get_dqblk
Christoph Hellwig [Thu, 6 May 2010 21:04:58 +0000 (17:04 -0400)]
quota: unify ->get_dqblk

Pass the larger struct fs_disk_quota to the ->get_dqblk operation so
that the Q_GETQUOTA and Q_XGETQUOTA operations can be implemented
with a single filesystem operation and we can retire the ->get_xquota
operation.  The additional information (RT-subvolume accounting and
warn counts) are left zero for the VFS quota implementation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext3: make barrier options consistent with ext4
Eric Sandeen [Fri, 30 Apr 2010 16:09:34 +0000 (11:09 -0500)]
ext3: make barrier options consistent with ext4

ext4 was updated to accept barrier/nobarrier mount options
in addition to the older barrier=0/1.  The barrier story
is complex enough, we should help people by making the options
the same at least, even if the defaults are different.

This patch allows the barrier/nobarrier mount options for ext3,
while keeping nobarrier the default.

It also unconditionally displays barrier status in show_options,
and prints a message at mount time if barriers are not enabled,
just as ext4 does.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoquota: Make quota stat accounting lockless.
Dmitry Monakhov [Mon, 26 Apr 2010 16:03:33 +0000 (20:03 +0400)]
quota: Make quota stat accounting lockless.

Quota stats is mostly writable data structure. Let's alloc percpu
bucket for each value.

NOTE: dqstats_read() function is racy against dqstats_{inc,dec}
and may return inconsistent value. But this is ok since absolute
accuracy is not required.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agosuppress warning: "quotatypes" defined but not used
Sergey Senozhatsky [Mon, 26 Apr 2010 10:09:26 +0000 (12:09 +0200)]
suppress warning: "quotatypes" defined but not used

Suppress compilation warning: "quotatypes" defined but not used.
quotatypes is used only when CONFIG_QUOTA_DEBUG or CONFIG_PRINT_QUOTA_WARNING
is/are defined.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext3: Fix waiting on transaction during fsync
Jan Kara [Thu, 15 Apr 2010 20:24:26 +0000 (22:24 +0200)]
ext3: Fix waiting on transaction during fsync

log_start_commit() returns 1 only when it started a transaction
commit. Thus in case transaction commit is already running, we
fail to wait for the commit to finish. Fix the issue by always
waiting for the commit regardless of the log_start_commit return
value.

Signed-off-by: Jan Kara <jack@suse.cz>
14 years agojbd: Provide function to check whether transaction will issue data barrier
Jan Kara [Thu, 15 Apr 2010 20:16:24 +0000 (22:16 +0200)]
jbd: Provide function to check whether transaction will issue data barrier

Provide a function which returns whether a transaction with given tid
will send a barrier to the filesystem device. The function will be used
by ext3 to detect whether fsync needs to send a separate barrier or not.

Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoufs: add ufs speciffic ->setattr call
Dmitry Monakhov [Wed, 14 Apr 2010 22:56:58 +0000 (00:56 +0200)]
ufs: add ufs speciffic ->setattr call

generic setattr not longer responsible for quota transfer.
use ufs_setattr for all ufs's inodes.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoBKL: Remove BKL from ext2 filesystem
Jan Blunck [Wed, 14 Apr 2010 12:38:39 +0000 (14:38 +0200)]
BKL: Remove BKL from ext2 filesystem

The BKL is still used in ext2_put_super(), ext2_fill_super(), ext2_sync_fs()
ext2_remount() and ext2_write_inode(). From these calls ext2_put_super(),
ext2_fill_super() and ext2_remount() are protected against each other by
the struct super_block s_umount rw semaphore. The call in ext2_write_inode()
could only protect the modification of the ext2_sb_info through
ext2_update_dynamic_rev() against concurrent ext2_sync_fs() or ext2_remount().
ext2_fill_super() and ext2_put_super() can be left out because you need a
valid filesystem reference in all three cases, which you do not have when
you are one of these functions.

If the BKL is only protecting the modification of the ext2_sb_info it can
safely be removed since this is protected by the struct ext2_sb_info s_lock.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext2: Add ext2_sb_info s_lock spinlock
Jan Blunck [Wed, 14 Apr 2010 12:38:38 +0000 (14:38 +0200)]
ext2: Add ext2_sb_info s_lock spinlock

Add a spinlock that protects against concurrent modifications of
s_mount_state, s_blocks_last, s_overhead_last and the content of the
superblock's buffer pointed to by sbi->s_es. The spinlock is now used in
ext2_xattr_update_super_block() which was setting the
EXT2_FEATURE_COMPAT_EXT_ATTR flag on the superblock without protection
before. Likewise the spinlock is used in ext2_show_options() to have a
consistent view of the mount options.

This is a preparation patch for removing the BKL from ext2 in the next
patch.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jan Kara <jack@suse.cz>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext2: Move ext2_write_super() out of ext2_setup_super()
Jan Blunck [Wed, 14 Apr 2010 12:38:37 +0000 (14:38 +0200)]
ext2: Move ext2_write_super() out of ext2_setup_super()

Move ext2_write_super() out of ext2_setup_super() as a preparation for the
next patch that adds a new lock for superblock fields.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext2: Fold ext2_commit_super() into ext2_sync_super()
Jan Blunck [Wed, 14 Apr 2010 12:38:36 +0000 (14:38 +0200)]
ext2: Fold ext2_commit_super() into ext2_sync_super()

Both function originally did similar things except that ext2_sync_super()
is returning after the call to sync_dirty_buffer(sbh). Therefore this
patch adds a wait flag to tell ext2_sync_super() if it has to call
sync_dirty_buffer() to wait for in-progress I/O to finish.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext2: Remove duplicate code from ext2_sync_fs()
Jan Blunck [Wed, 14 Apr 2010 12:38:35 +0000 (14:38 +0200)]
ext2: Remove duplicate code from ext2_sync_fs()

Depending in the state (valid or unchecked) of the filesystem either
ext2_sync_super() or ext2_commit_super() is called. If the filesystem is
currently valid (it is checked), we first mark it unchecked and afterwards
duplicate the work that ext2_sync_super() is doing later. Therefore this
patch removes the duplicate code and calls ext2_sync_super() directly after
marking the filesystem unchecked.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext2: Set the write time in ext2_sync_fs()
Jan Blunck [Wed, 14 Apr 2010 12:38:34 +0000 (14:38 +0200)]
ext2: Set the write time in ext2_sync_fs()

This is probably a typo since the write time should actually be updated by
ext2_sync_fs() instead of the mount time.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext2: Use ext2_clear_super_error() in ext2_sync_fs()
Jan Blunck [Wed, 14 Apr 2010 12:38:33 +0000 (14:38 +0200)]
ext2: Use ext2_clear_super_error() in ext2_sync_fs()

ext2_sync_fs() used to duplicate the code from ext2_clear_super_error().

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext3: init statistics after journal recovery v2
Dmitry Monakhov [Mon, 12 Apr 2010 19:46:00 +0000 (23:46 +0400)]
ext3: init statistics after journal recovery v2

Currently block/inode/dir counters are initialized before journal was
recovered. In fact after journal recovery this info will probably
change which results in incorrect numbers returned from statfs(2).
BUG:#15768

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext2: remove useless call to brelse() in ext2_free_inode()
Francis Moreau [Thu, 8 Apr 2010 09:35:17 +0000 (11:35 +0200)]
ext2: remove useless call to brelse() in ext2_free_inode()

This patch removes a useless call to brelse(bitmap_bh) since at that
point bitmap_bh is NULL and slightly cleans up bitmap_bh handling.

Signed-off-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoquota: optimize mark_dirty logic
Dmitry Monakhov [Sat, 27 Mar 2010 12:15:38 +0000 (15:15 +0300)]
quota: optimize mark_dirty logic

- Skip locking if quota is dirty already.
- Return old quota state to help fs-specciffic implementation to optimize
  case where quota was dirty already.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext2: Avoid loading bitmaps for full groups during block allocation
Jan Kara [Mon, 29 Mar 2010 11:55:39 +0000 (13:55 +0200)]
ext2: Avoid loading bitmaps for full groups during block allocation

There is no point in loading bitmap for groups which are completely full.
This causes noticeable performance problems (and memory pressure) on small
systems with large full filesystem
(http://marc.info/?l=linux-ext4&m=126843108314310&w=2).

Port of the same ext3 patch.

Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext3: Avoid loading bitmaps for full groups during block allocation
Frans van de Wiel [Mon, 15 Mar 2010 18:29:34 +0000 (19:29 +0100)]
ext3: Avoid loading bitmaps for full groups during block allocation

There is no point in loading bitmap for groups which are completely full.
This causes noticeable performance problems (and memory pressure) on small
systems with large full filesystem
(http://marc.info/?l=linux-ext4&m=126843108314310&w=2).

Jan Kara: Added a comment and changed check to use cpu-endian value.

Signed-off-by: "Frans van de Wiel" <fvdw@fvdw.eu>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoFix networking tree iscsi_tcp.c mis-merge
Linus Torvalds [Fri, 21 May 2010 16:48:36 +0000 (09:48 -0700)]
Fix networking tree iscsi_tcp.c mis-merge

The removal of the 'waitqueue_active()' test in commit d7d05548a6
("[SCSI] iscsi_tcp: fix relogin/shutdown hang") got incorrectly resolved
by David when he back-merged the main git tree into the networking tree
in commit 278554bd65 ("Merge branch 'master' of master.kernel.org:...").

There was a content conflict due to 'sock->sk->sk_sleep' being changed
into 'sk_sleep(sock->sk)' in the networking tree, but David didn't pick
up the iscsi change from the main tree.

Reported-by: James Bottomley <James.Bottomley@suse.de>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Fri, 21 May 2010 14:47:00 +0000 (07:47 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: (23 commits)
  nilfs2: disallow remount of snapshot from/to a regular mount
  nilfs2: use huge_encode_dev/huge_decode_dev
  nilfs2: update comment on deactivate_super at nilfs_get_sb
  nilfs2: replace MS_VERBOSE with MS_SILENT
  nilfs2: add missing initialization of s_mode
  nilfs2: fix misuse of open_bdev_exclusive/close_bdev_exclusive
  nilfs2: enlarge s_volume_name member in nilfs_super_block
  nilfs2: use checkpoint number instead of timestamp to select super block
  nilfs2: add missing endian conversion on super block magic number
  nilfs2: make nilfs_sc_*_ops static
  nilfs2: add kernel doc comments to persistent object allocator functions
  nilfs2: change sc_timer from a pointer to an embedded one in struct nilfs_sc_info
  nilfs2: remove nilfs_segctor_init() in segment.c
  nilfs2: insert checkpoint number in segment summary header
  nilfs2: add a print message after loading nilfs2
  nilfs2: cleanup multi kmem_cache_{create,destroy} code
  nilfs2: move out checksum routines to segment buffer code
  nilfs2: move pointer to super root block into logs
  nilfs2: change default of 'errors' mount option to 'remount-ro' mode
  nilfs2: Combine nilfs_btree_release_path() and nilfs_btree_free_path()
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
Linus Torvalds [Fri, 21 May 2010 14:29:15 +0000 (07:29 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw:
  GFS2: Fix typo
  GFS2: stuck in inode wait, no glocks stuck
  GFS2: Eliminate useless err variable
  GFS2: Fix writing to non-page aligned gfs2_quota structures
  GFS2: Add some useful messages
  GFS2: fix quota state reporting
  GFS2: Various gfs2_logd improvements
  GFS2: glock livelock
  GFS2: Clean up stuffed file copying
  GFS2: docs update
  GFS2: Remove space from slab cache name

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Fri, 21 May 2010 14:28:02 +0000 (07:28 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: fix ast ordering for user locks
  dlm: cleanup remove unused code

14 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Fri, 21 May 2010 14:25:43 +0000 (07:25 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6: (154 commits)
  mtd: cfi_cmdset_0002: use AMD standard command-set with Winbond flash chips
  mtd: cfi_cmdset_0002: Fix MODULE_ALIAS and linkage for new 0701 commandset ID
  mtd: mxc_nand: Remove duplicate NAND_CMD_RESET case value
  mtd: update gfp/slab.h includes
  jffs2: Stop triggering block erases from jffs2_write_super()
  jffs2: Rename jffs2_erase_pending_trigger() to jffs2_dirty_trigger()
  jffs2: Use jffs2_garbage_collect_trigger() to trigger pending erases
  jffs2: Require jffs2_garbage_collect_trigger() to be called with lock held
  jffs2: Wake GC thread when there are blocks to be erased
  jffs2: Erase pending blocks in GC pass, avoid invalid -EIO return
  jffs2: Add 'work_done' return value from jffs2_erase_pending_blocks()
  mtd: mtdchar: Do not corrupt backing device of device node inode
  mtd/maps/pcmciamtd: Fix printk format for ssize_t in debug messages
  drivers/mtd: Use kmemdup
  mtd: cfi_cmdset_0002: Fix argument order in bootloc warning
  mtd: nand: add Toshiba TC58NVG0 device ID
  pcmciamtd: add another ID
  pcmciamtd: coding style cleanups
  pcmciamtd: fixing obvious errors
  mtd: chips: add SST39WF160x NOR-flashes
  ...

Trivial conflicts due to dev_node removal in drivers/mtd/maps/pcmciamtd.c

14 years agoMerge branch 'linux-next' of git://git.infradead.org/ubi-2.6
Linus Torvalds [Fri, 21 May 2010 14:23:12 +0000 (07:23 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6

* 'linux-next' of git://git.infradead.org/ubi-2.6:
  UBI: misc comment fixes
  UBI: fix s/then/than/ typos
  UBI: init even if MTD device cannot be attached, if built into kernel
  UBI: remove reboot notifier

14 years agoMerge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
Linus Torvalds [Fri, 21 May 2010 14:22:42 +0000 (07:22 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6

* 'linux-next' of git://git.infradead.org/ubifs-2.6:
  UBIFS: mark VFS SB RO too

14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 21 May 2010 14:22:11 +0000 (07:22 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs: (54 commits)
  xfs: mark xfs_iomap_write_ helpers static
  xfs: clean up end index calculation in xfs_page_state_convert
  xfs: clean up mapping size calculation in __xfs_get_blocks
  xfs: clean up xfs_iomap_valid
  xfs: move I/O type flags into xfs_aops.c
  xfs: kill struct xfs_iomap
  xfs: report iomap_bn in block base
  xfs: report iomap_offset and iomap_bsize in block base
  xfs: remove iomap_delta
  xfs: remove iomap_target
  xfs: limit xfs_imap_to_bmap to a single mapping
  xfs: simplify buffer to transaction matching
  xfs: Make fiemap work in query mode.
  xfs: kill off l_sectbb_mask
  xfs: record log sector size rather than log2(that)
  xfs: remove dead XFS_LOUD_RECOVERY code
  xfs: removed unused XFS_QMOPT_ flags
  xfs: remove a few macro indirections in the quota code
  xfs: access quotainfo structure directly
  xfs: wait for direct I/O to complete in fsync and write_inode
  ...

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
Linus Torvalds [Fri, 21 May 2010 14:20:17 +0000 (07:20 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (47 commits)
  ocfs2: Silence a gcc warning.
  ocfs2: Don't retry xattr set in case value extension fails.
  ocfs2:dlm: avoid dlm->ast_lock lockres->spinlock dependency break
  ocfs2: Reset xattr value size after xa_cleanup_value_truncate().
  fs/ocfs2/dlm: Use kstrdup
  fs/ocfs2/dlm: Drop memory allocation cast
  Ocfs2: Optimize punching-hole code.
  Ocfs2: Make ocfs2_find_cpos_for_left_leaf() public.
  Ocfs2: Fix hole punching to correctly do CoW during cluster zeroing.
  Ocfs2: Optimize ocfs2 truncate to use ocfs2_remove_btree_range() instead.
  ocfs2: Block signals for mkdir/link/symlink/O_CREAT.
  ocfs2: Wrap signal blocking in void functions.
  ocfs2/dlm: Increase o2dlm lockres hash size
  ocfs2: Make ocfs2_extend_trans() really extend.
  ocfs2/trivial: Code cleanup for allocation reservation.
  ocfs2: make ocfs2_adjust_resv_from_alloc simple.
  ocfs2: Make nointr a default mount option
  ocfs2/dlm: Make o2dlm domain join/leave messages KERN_NOTICE
  o2net: log socket state changes
  ocfs2: print node # when tcp fails
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Fri, 21 May 2010 14:19:18 +0000 (07:19 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (182 commits)
  [SCSI] aacraid: add an ifdef'd device delete case instead of taking the device offline
  [SCSI] aacraid: prohibit access to array container space
  [SCSI] aacraid: add support for handling ATA pass-through commands.
  [SCSI] aacraid: expose physical devices for models with newer firmware
  [SCSI] aacraid: respond automatically to volumes added by config tool
  [SCSI] fcoe: fix fcoe module ref counting
  [SCSI] libfcoe: FIP Keep-Alive messages for VPorts are sent with incorrect port_id and wwn
  [SCSI] libfcoe: Fix incorrect MAC address clearing
  [SCSI] fcoe: fix a circular locking issue with rtnl and sysfs mutex
  [SCSI] libfc: Move the port_id into lport
  [SCSI] fcoe: move link speed checking into its own routine
  [SCSI] libfc: Remove extra pointer check
  [SCSI] libfc: Remove unused fc_get_host_port_type
  [SCSI] fcoe: fixes wrong error exit in fcoe_create
  [SCSI] libfc: set seq_id for incoming sequence
  [SCSI] qla2xxx: Updates to ISP82xx support.
  [SCSI] qla2xxx: Optionally disable target reset.
  [SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusive
  [SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did.
  [SCSI] qla2xxx: T10 DIF support added.
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 21 May 2010 04:26:12 +0000 (21:26 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
  USB: remove unused usb_buffer_alloc and usb_buffer_free macros
  usb: musb: update gfp/slab.h includes
  USB: ftdi_sio: fix legacy SIO-device header
  USB: kl5usb105: reimplement using generic framework
  USB: kl5usb105: minor clean ups
  USB: kl5usb105: fix memory leak
  USB: io_ti: use kfifo to implement write buffering
  USB: io_ti: remove unsused private counter
  USB: ti_usb: use kfifo to implement write buffering
  USB: ir-usb: fix incorrect write-buffer length
  USB: aircable: fix incorrect write-buffer length
  USB: safe_serial: straighten out read processing
  USB: safe_serial: reimplement read using generic framework
  USB: safe_serial: reimplement write using generic framework
  usb-storage: always print quirks
  USB: usb-storage: trivial debug improvements
  USB: oti6858: use port write fifo
  USB: oti6858: use kfifo to implement write buffering
  USB: cypress_m8: use kfifo to implement write buffering
  USB: cypress_m8: remove unused drain define
  ...

Fix up conflicts (due to usb_buffer_alloc/free renaming) in
drivers/input/tablet/acecad.c
drivers/input/tablet/kbtab.c
drivers/input/tablet/wacom_sys.c
drivers/media/video/gspca/gspca.c
sound/usb/usbaudio.c

14 years agosound: fixup for usb_buffer_alloc/free rename
Stephen Rothwell [Fri, 30 Apr 2010 04:44:54 +0000 (14:44 +1000)]
sound: fixup for usb_buffer_alloc/free rename

This is needed before the USB merge.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
Linus Torvalds [Fri, 21 May 2010 04:04:44 +0000 (21:04 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits)
  qlcnic: adding co maintainer
  ixgbe: add support for active DA cables
  ixgbe: dcb, do not tag tc_prio_control frames
  ixgbe: fix ixgbe_tx_is_paused logic
  ixgbe: always enable vlan strip/insert when DCB is enabled
  ixgbe: remove some redundant code in setting FCoE FIP filter
  ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
  ixgbe: fix header len when unsplit packet overflows to data buffer
  ipv6: Never schedule DAD timer on dead address
  ipv6: Use POSTDAD state
  ipv6: Use state_lock to protect ifa state
  ipv6: Replace inet6_ifaddr->dead with state
  cxgb4: notify upper drivers if the device is already up when they load
  cxgb4: keep interrupts available when the ports are brought down
  cxgb4: fix initial addition of MAC address
  cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
  cnic: Convert cnic_local_flags to atomic ops.
  can: Fix SJA1000 command register writes on SMP systems
  bridge: fix build for CONFIG_SYSFS disabled
  ARCNET: Limit com20020 PCI ID matches for SOHARD cards
  ...

Fix up various conflicts with pcmcia tree drivers/net/
{pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and
wireless/orinoco/spectrum_cs.c} and feature removal
(Documentation/feature-removal-schedule.txt).

Also fix a non-content conflict due to pm_qos_requirement getting
renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c

14 years agoMerge branch 'docs-next' of git://git.lwn.net/linux-2.6
Linus Torvalds [Thu, 20 May 2010 20:35:18 +0000 (13:35 -0700)]
Merge branch 'docs-next' of git://git.lwn.net/linux-2.6

* 'docs-next' of git://git.lwn.net/linux-2.6:
  Add a document describing the padata interface

14 years agoMerge branch 'viafb-next' of git://git.lwn.net/linux-2.6
Linus Torvalds [Thu, 20 May 2010 20:34:17 +0000 (13:34 -0700)]
Merge branch 'viafb-next' of git://git.lwn.net/linux-2.6

* 'viafb-next' of git://git.lwn.net/linux-2.6: (35 commits)
  viafb: move some include files to include/linux
  viafb: Eliminate some global.h references
  viafb: get rid of i2c debug cruft
  viafb: fold via_io.h into via-core.h
  viafb: Fix initialization error paths
  viafb: Do not remove gpiochip under spinlock
  viafb: make procfs entries optional
  viafb: fix proc entry removal
  viafb: improve misc register handling
  viafb: replace inb/outb
  viafb: move some modesetting functions to a seperate file
  viafb: unify modesetting functions
  viafb: Reserve framebuffer memory for the upcoming camera driver
  viafb: Add a simple VX855 DMA engine driver
  viafb: Add a simple interrupt management infrastructure
  via: Rationalize vt1636 detection
  viafb: Introduce viafb_find_i2c_adapter()
  via: Do not attempt I/O on inactive I2C adapters
  viafb: Turn GPIO and i2c into proper platform devices
  viafb: Convert GPIO and i2c to the new indexed port ops
  ...

14 years agoUSB: remove unused usb_buffer_alloc and usb_buffer_free macros
Greg Kroah-Hartman [Thu, 29 Apr 2010 22:46:07 +0000 (15:46 -0700)]
USB: remove unused usb_buffer_alloc and usb_buffer_free macros

Now that all callers are converted over, remove the compatibility
functions and all is good.

Cc: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: musb: update gfp/slab.h includes
Tejun Heo [Wed, 19 May 2010 15:44:20 +0000 (01:44 +1000)]
usb: musb: update gfp/slab.h includes

Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
gfp.h or slab.h is included as necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: fix legacy SIO-device header
Johan Hovold [Tue, 18 May 2010 22:01:41 +0000 (00:01 +0200)]
USB: ftdi_sio: fix legacy SIO-device header

Length field of header was incorrectly set to available payload space
rather than the actual payload size.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: kl5usb105: reimplement using generic framework
Johan Hovold [Tue, 18 May 2010 22:01:40 +0000 (00:01 +0200)]
USB: kl5usb105: reimplement using generic framework

Kill custom read and write implementations (static per-port,
singleton(!) urb pool).

Also remove changelog header (can be retrieved through git).

Read processing and write-buffer handling tested using a cp210x device
in a loopback setup.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: kl5usb105: minor clean ups
Johan Hovold [Tue, 18 May 2010 22:01:39 +0000 (00:01 +0200)]
USB: kl5usb105: minor clean ups

Whitespace changes and some removed comments.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: kl5usb105: fix memory leak
Johan Hovold [Tue, 18 May 2010 22:01:38 +0000 (00:01 +0200)]
USB: kl5usb105: fix memory leak

Private data was not freed on error path in startup.

Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: io_ti: use kfifo to implement write buffering
Johan Hovold [Tue, 18 May 2010 22:01:37 +0000 (00:01 +0200)]
USB: io_ti: use kfifo to implement write buffering

Kill custom fifo implementation.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: io_ti: remove unsused private counter
Johan Hovold [Tue, 18 May 2010 22:01:36 +0000 (00:01 +0200)]
USB: io_ti: remove unsused private counter

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ti_usb: use kfifo to implement write buffering
Johan Hovold [Tue, 18 May 2010 22:01:35 +0000 (00:01 +0200)]
USB: ti_usb: use kfifo to implement write buffering

Kill custom fifo implementation.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ir-usb: fix incorrect write-buffer length
Johan Hovold [Tue, 18 May 2010 22:01:34 +0000 (00:01 +0200)]
USB: ir-usb: fix incorrect write-buffer length

Returned length should include header length.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: aircable: fix incorrect write-buffer length
Johan Hovold [Tue, 18 May 2010 22:01:33 +0000 (00:01 +0200)]
USB: aircable: fix incorrect write-buffer length

Returned length should include header length.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: safe_serial: straighten out read processing
Johan Hovold [Tue, 18 May 2010 22:01:32 +0000 (00:01 +0200)]
USB: safe_serial: straighten out read processing

Clean up read processing logic.

Tested using a cp210x device in a loopback setup.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: safe_serial: reimplement read using generic framework
Johan Hovold [Tue, 18 May 2010 22:01:31 +0000 (00:01 +0200)]
USB: safe_serial: reimplement read using generic framework

Use process_read_urb to implement read processing.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: safe_serial: reimplement write using generic framework
Johan Hovold [Tue, 18 May 2010 22:01:30 +0000 (00:01 +0200)]
USB: safe_serial: reimplement write using generic framework

Kill custom single-urb write implementation.

Note that this driver still depended on the write callback from the old
generic framework.

Tested against original read processing using a cp210x device in a
loopback setup.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb-storage: always print quirks
Felipe Contreras [Sun, 16 May 2010 20:31:07 +0000 (23:31 +0300)]
usb-storage: always print quirks

Right now quirks are printed only when the are manually overriden with
the module parameters. It's not so useful to remind the user that his
parameters are correctly applied; what is useful is to print out the
quirks the user is not aware are being applied.

So let's do the smart thing and print the quirks when they are present.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usb-storage: trivial debug improvements
Felipe Contreras [Sun, 16 May 2010 20:31:06 +0000 (23:31 +0300)]
USB: usb-storage: trivial debug improvements

Use pr_foo and dev_foo instead of printk. Maybe US_DEBUG* should be
replaced too.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: oti6858: use port write fifo
Johan Hovold [Sun, 16 May 2010 18:33:52 +0000 (20:33 +0200)]
USB: oti6858: use port write fifo

Kill private write fifo and use port fifo instead (protected under
port lock).

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: oti6858: use kfifo to implement write buffering
Johan Hovold [Sun, 16 May 2010 18:33:51 +0000 (20:33 +0200)]
USB: oti6858: use kfifo to implement write buffering

Kill custom fifo implementation.

Use private write fifo to minimise changes to lock handling.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cypress_m8: use kfifo to implement write buffering
Johan Hovold [Sun, 16 May 2010 18:33:50 +0000 (20:33 +0200)]
USB: cypress_m8: use kfifo to implement write buffering

Kill custom fifo implementation.

Note that cypress_m8 has no port write fifo as it has no bulk-out
endpoint.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cypress_m8: remove unused drain define
Johan Hovold [Sun, 16 May 2010 18:33:49 +0000 (20:33 +0200)]
USB: cypress_m8: remove unused drain define

Driver uses tty-port drain these days.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usb_debug: set bulk out size at probe
Johan Hovold [Sun, 16 May 2010 18:33:48 +0000 (20:33 +0200)]
USB: usb_debug: set bulk out size at probe

Use bulk_out_size in usb_serial_driver to set urb buffer size.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: Use kmemdup
Julia Lawall [Sat, 15 May 2010 21:15:44 +0000 (23:15 +0200)]
USB: gadget: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: CP210x New Device IDs 11 New device IDs
Craig Shelley [Sat, 15 May 2010 12:36:38 +0000 (13:36 +0100)]
USB: CP210x New Device IDs 11 New device IDs

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: visor: increase bulk-out buffer size
Johan Hovold [Sun, 16 May 2010 13:06:55 +0000 (15:06 +0200)]
USB: visor: increase bulk-out buffer size

Increase the bulk-out buffer size to avoid any regression in throughput
after replacing the old writing scheme which used dynamic buffers (e.g.
up to 2k).

256b has been determined to be a good choice for several drivers
including ftdi_sio which used to have a more or less identical write
implementation.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: belkin_sa: implement line status handling
Johan Hovold [Sat, 15 May 2010 15:53:53 +0000 (17:53 +0200)]
USB: belkin_sa: implement line status handling

Use process_read_urb to implement line status handling.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: belkin_sa: clean up open
Johan Hovold [Sat, 15 May 2010 15:53:52 +0000 (17:53 +0200)]
USB: belkin_sa: clean up open

Use generic open to submit read urb.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: belkin_sa: minor clean-ups
Johan Hovold [Sat, 15 May 2010 15:53:51 +0000 (17:53 +0200)]
USB: belkin_sa: minor clean-ups

Remove some whitepace and comments.
Clean up close.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cp210x: use generic open to start reading from device
Johan Hovold [Sat, 15 May 2010 15:53:50 +0000 (17:53 +0200)]
USB: cp210x: use generic open to start reading from device

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: visor: reimplement using generic framework
Johan Hovold [Sat, 15 May 2010 15:53:49 +0000 (17:53 +0200)]
USB: visor: reimplement using generic framework

Kill custom read and write implementations (dynamically allocated write
urbs).

Note that I chose to remove the stat module parameter which was supposed
to keep count of the amount of data sent and received, but which has
been broken for three years (since b308e74d9c708ee2a9af14fbe235e0a41216f4ed
"USB: visor driver adapted to new tty buffering" -- bytes_in was
incorrectly updated and was thus always reported as 0).

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: visor: fix memory leak
Johan Hovold [Sat, 15 May 2010 15:53:48 +0000 (17:53 +0200)]
USB: visor: fix memory leak

Fix memory leak for some devices (Sony Clie 3.5) due to port private
data not being freed on release.

Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: spcp8x5: reimplement using generic framework
Johan Hovold [Sat, 15 May 2010 15:53:47 +0000 (17:53 +0200)]
USB: spcp8x5: reimplement using generic framework

Kill custom fifo, read, and single-urb write implementations.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ipaq: reimplement using generic framework
Johan Hovold [Sat, 15 May 2010 15:53:46 +0000 (17:53 +0200)]
USB: ipaq: reimplement using generic framework

Kill custom fifo, read and write implementations (single-urb and fifo,
but still maintained list of 256*256b urb buffers per port).

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: empeg: reimplement using generic framework
Johan Hovold [Sat, 15 May 2010 15:53:45 +0000 (17:53 +0200)]
USB: empeg: reimplement using generic framework

Kill custom read and write implementations (static 16*4k write-urb pool
shared among all ports in system).

Also remove old changelog entries in header (code is now gone, and
these entries can still be retrieved through git).

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: add special case for processing of empty read urbs
Johan Hovold [Sat, 15 May 2010 15:53:44 +0000 (17:53 +0200)]
USB: serial: add special case for processing of empty read urbs

Return immediately from generic process_read_urb if urb is empty.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: kobil: fix memory leak
Johan Hovold [Sat, 15 May 2010 15:53:43 +0000 (17:53 +0200)]
USB: kobil: fix memory leak

An urb transfer buffer is allocated at every open but was never freed.

This driver is a bit of a mess...

Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option.c: OLIVETTI OLICARD100 support
Nils Radtke [Mon, 17 May 2010 12:14:11 +0000 (14:14 +0200)]
USB: option.c: OLIVETTI OLICARD100 support

This patch adds support for an olivetti olicard100 HЅDPA usb-stick.

This device is a zeroCD one with ID 0b3c:c700 that needs switching via
eject or usb-modeswitch with
MessageContent="5553424312345678000000000000061b000000030000000000000000000000".
After switching it has ID 0b3c:c000 and provides 5 serial ports ttyUSB[0-4].
Port 0 (modem) and 4 are interrupt ports.

Signed-off-by: Nils Radtke <lkml@Think-Future.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: fix compiler warning.
Greg Kroah-Hartman [Mon, 17 May 2010 18:00:29 +0000 (11:00 -0700)]
USB: xhci: fix compiler warning.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: remove match_device
Ming Lei [Mon, 17 May 2010 14:20:50 +0000 (22:20 +0800)]
USB: remove match_device

usb_find_device was the only one user of match_device, now
it is removed, so remove match_device to fix the compile warning
below reported by Stephen Rothwell:

drivers/usb/core/usb.c:596: warning: 'match_device'
defined but not used

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: include/usb/*.h checkpatch cleanup
Greg Kroah-Hartman [Mon, 17 May 2010 17:58:12 +0000 (10:58 -0700)]
USB: include/usb/*.h checkpatch cleanup

Lots of minor formatting cleanups in includes/usb/ to make checkpatch
happier.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usb.h: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:40:55 +0000 (10:40 -0700)]
USB: usb.h: checkpatch cleanups

Minor formatting changes to clean up the file.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: visor.h: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:33:41 +0000 (10:33 -0700)]
USB: visor.h: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: pl2303.h: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:33:41 +0000 (10:33 -0700)]
USB: pl2303.h: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: kobil_sct.h: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:33:41 +0000 (10:33 -0700)]
USB: kobil_sct.h: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: kl5kusb105.h: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:33:41 +0000 (10:33 -0700)]
USB: kl5kusb105.h: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: io_edgeport: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:33:41 +0000 (10:33 -0700)]
USB: io_edgeport: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:33:41 +0000 (10:33 -0700)]
USB: ftdi_sio: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cypress_m8.h: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:33:41 +0000 (10:33 -0700)]
USB: cypress_m8.h: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: belkin_sa.h: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:33:41 +0000 (10:33 -0700)]
USB: belkin_sa.h: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: mct_u232.h: checkpatch cleanups
Greg Kroah-Hartman [Mon, 17 May 2010 17:33:41 +0000 (10:33 -0700)]
USB: mct_u232.h: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: FHCI: cq_get() should check kfifo_out()'s return value
Anton Vorontsov [Fri, 14 May 2010 14:33:18 +0000 (18:33 +0400)]
USB: FHCI: cq_get() should check kfifo_out()'s return value

Since commit 7acd72eb85f1c7a15e8b5eb554994949241737f1 ("kfifo: rename
kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out..."),
kfifo_out() is marked __must_check, and that causes gcc to produce
lots of warnings like this:

  CC      drivers/usb/host/fhci-mem.o
In file included from drivers/usb/host/fhci-hcd.c:34:
drivers/usb/host/fhci.h: In function 'cq_get':
drivers/usb/host/fhci.h:520: warning: ignoring return value of 'kfifo_out', declared with attribute warn_unused_result
...

This patch fixes the issue by properly checking the return value.

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Cc: stable <stable@kernel.org> [.33 and .34]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cp210x: remove redundant disconnect()
Johan Hovold [Thu, 13 May 2010 20:25:09 +0000 (22:25 +0200)]
USB: cp210x: remove redundant disconnect()

Remove cp210x_disconnect which is used to kill traffic although this is
already handled by the generic framework.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: io_edgeport: Use kzalloc
Julia Lawall [Thu, 13 May 2010 20:00:40 +0000 (22:00 +0200)]
USB: io_edgeport: Use kzalloc

Use kzalloc rather than the combination of kmalloc and memset.

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

// <smpl>
@@
expression x,size,flags;
statement S;
@@

-x = kmalloc(size,flags);
+x = kzalloc(size,flags);
 if (x == NULL) S
-memset(x, 0, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ipw: reimplement using generic framework
Johan Hovold [Thu, 13 May 2010 19:33:10 +0000 (21:33 +0200)]
USB: ipw: reimplement using generic framework

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ipw: remove dummy port_probe and port_remove
Johan Hovold [Thu, 13 May 2010 19:33:09 +0000 (21:33 +0200)]
USB: ipw: remove dummy port_probe and port_remove

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ipw: clean up dtr-rts handling
Johan Hovold [Thu, 13 May 2010 19:33:08 +0000 (21:33 +0200)]
USB: ipw: clean up dtr-rts handling

No need to raise dtr/rts in open as this is taken care of by tty layer.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ir-usb: reimplement using generic framework
Johan Hovold [Thu, 13 May 2010 19:02:03 +0000 (21:02 +0200)]
USB: ir-usb: reimplement using generic framework

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ir-usb: fix set_termios race
Johan Hovold [Thu, 13 May 2010 19:02:02 +0000 (21:02 +0200)]
USB: ir-usb: fix set_termios race

Use dynamically allocated urb for baudrate changes rather than
unconditionally submitting the port write urb which may already be in
use.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ir-usb: allow custom bulk buffer size without reallocation
Johan Hovold [Thu, 13 May 2010 19:02:01 +0000 (21:02 +0200)]
USB: ir-usb: allow custom bulk buffer size without reallocation

Use usb_serial_driver bulk_in_size and bulk_out_size to make sure
buffers of appropriate sizes are allocated in the first place rather than
reallocating them at every open.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ir-usb: fix double free
Johan Hovold [Thu, 13 May 2010 19:02:00 +0000 (21:02 +0200)]
USB: ir-usb: fix double free

If the user specifies a custom bulk buffer size we get a double free at
port release.

Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: EHCI: fix controller wakeup flag settings during suspend
Alan Stern [Wed, 12 May 2010 22:21:35 +0000 (18:21 -0400)]
USB: EHCI: fix controller wakeup flag settings during suspend

This patch (as1380) fixes a bug in the wakeup settings for EHCI host
controllers.  When the controller is suspended, if it isn't enabled
for remote wakeup then we have to turn off all the port wakeup flags.
Disabling PCI PME# isn't good enough, because some systems (Intel)
evidently use alternate wakeup signalling paths.

In addition, the patch improves the handling of the Intel Moorestown
hardware by performing various power-up and power-down delays just
once instead of once for each port (i.e., the delays are moved outside
of the port loops).  This requires extra code, but the total delay
time is reduced.

There are also a few additional minor cleanups.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Ondrej Zary <linux@rainbow-software.org>
CC: Alek Du <alek.du@intel.com>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>