pandora-kernel.git
15 years ago[patch 5/5] vfs: remove mode parameter from vfs_symlink()
Miklos Szeredi [Tue, 24 Jun 2008 14:50:16 +0000 (16:50 +0200)]
[patch 5/5] vfs: remove mode parameter from vfs_symlink()

Remove the unused mode parameter from vfs_symlink and callers.

Thanks to Tetsuo Handa for noticing.

CC: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
15 years ago[patch 4/5] vfs: reuse local variable in vfs_link()
Tetsuo Handa [Tue, 24 Jun 2008 14:50:15 +0000 (16:50 +0200)]
[patch 4/5] vfs: reuse local variable in vfs_link()

Why not reuse "inode" which is assigned as

  struct inode *inode = old_dentry->d_inode;

in the beginning of vfs_link() ?

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
15 years ago[patch 3/5] vfs: change remove_suid() to file_remove_suid()
Miklos Szeredi [Tue, 24 Jun 2008 14:50:14 +0000 (16:50 +0200)]
[patch 3/5] vfs: change remove_suid() to file_remove_suid()

All calls to remove_suid() are made with a file pointer, because
(similarly to file_update_time) it is called when the file is written.

Clean up callers by passing in a file instead of a dentry.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
15 years ago[patch 1/5] vfs: truncate: dont check immutable twice
Miklos Szeredi [Tue, 24 Jun 2008 14:50:12 +0000 (16:50 +0200)]
[patch 1/5] vfs: truncate: dont check immutable twice

vfs_permission(MAY_WRITE) already checked for the inode being
immutable, so no need to repeat it.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
15 years ago[PATCH] sanitize ->permission() prototype
Al Viro [Wed, 16 Jul 2008 01:03:57 +0000 (21:03 -0400)]
[PATCH] sanitize ->permission() prototype

* kill nameidata * argument; map the 3 bits in ->flags anybody cares
  about to new MAY_... ones and pass with the mask.
* kill redundant gfs2_iop_permission()
* sanitize ecryptfs_permission()
* fix remaining places where ->permission() instances might barf on new
  MAY_... found in mask.

The obvious next target in that direction is permission(9)

folded fix for nfs_permission() breakage from Miklos Szeredi <mszeredi@suse.cz>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[patch 05/14] hpfs: dont call permission()
Miklos Szeredi [Wed, 21 May 2008 17:15:03 +0000 (19:15 +0200)]
[patch 05/14] hpfs: dont call permission()

hpfs_unlink() calls permission() prior to truncating the file.  HPFS
doesn't define a .permission method, so replace with explicit call to
generic_permission().

This is equivalent, except that devcgroup_inode_permission() and
security_inode_permission() are not called.

The truncation is just an implementation detail of the unlink, so
these security checks are unnecessary.

I suspect that even calling generic_permission() is unnecessary, since
we shouldn't mind if the file isn't writable.  But I leave that to the
maintainer to decide.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
15 years ago[PATCH] sanitize proc_sysctl
Al Viro [Tue, 15 Jul 2008 12:54:06 +0000 (08:54 -0400)]
[PATCH] sanitize proc_sysctl

* keep references to ctl_table_head and ctl_table in /proc/sys inodes
* grab the former during operations, use the latter for access to
  entry if that succeeds
* have ->d_compare() check if table should be seen for one who does lookup;
  that allows us to avoid flipping inodes - if we have the same name resolve
  to different things, we'll just keep several dentries and ->d_compare()
  will reject the wrong ones.
* have ->lookup() and ->readdir() scan the table of our inode first, then
  walk all ctl_table_header and scan ->attached_by for those that are
  attached to our directory.
* implement ->getattr().
* get rid of insane amounts of tree-walking
* get rid of the need to know dentry in ->permission() and of the contortions
  induced by that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] sysctl: keep track of tree relationships
Al Viro [Tue, 15 Jul 2008 10:33:31 +0000 (06:33 -0400)]
[PATCH] sysctl: keep track of tree relationships

In a sense, that's the heart of the series.  It's based on the following
property of the trees we are actually asked to add: they can be split into
stem that is already covered by registered trees and crown that is entirely
new.  IOW, if a/b and a/c/d are introduced by our tree, then a/c is also
introduced by it.

That allows to associate tree and table entry with each node in the union;
while directory nodes might be covered by many trees, only one will cover
the node by its crown.  And that will allow much saner logics for /proc/sys
in the next patches.  This patch introduces the data structures needed to
keep track of that.

When adding a sysctl table, we find a "parent" one.  Which is to say,
find the deepest node on its stem that already is present in one of the
tables from our table set or its ancestor sets.  That table will be our
parent and that node in it - attachment point.  Add our table to list
anchored in parent, have it refer the parent and contents of attachment
point.  Also remember where its crown lives.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] sysctl: make sure that /proc/sys/net/ipv4 appears before per-ns ones
Al Viro [Tue, 15 Jul 2008 20:00:59 +0000 (16:00 -0400)]
[PATCH] sysctl: make sure that /proc/sys/net/ipv4 appears before per-ns ones

Massage ipv4 initialization - make sure that net.ipv4 appears as
non-per-net-namespace before it shows up in per-net-namespace sysctls.
That's the only change outside of sysctl.c needed to get sane ordering
rules and data structures for sysctls (esp. for procfs side of that
mess).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] allow delayed freeing of ctl_table_header
Al Viro [Tue, 15 Jul 2008 05:44:23 +0000 (01:44 -0400)]
[PATCH] allow delayed freeing of ctl_table_header

Refcount the sucker; instead of freeing it by the end of unregistration
just drop the refcount and free only when it hits zero.  Make sure that
we _always_ make ->unregistering non-NULL in start_unregistering().

That allows anybody to get a reference to such puppy, preventing its
freeing and reuse.  It does *not* block unregistration.  Anybody who
holds such a reference can
* try to grab a "use" reference (ctl_head_grab()); that will
succeeds if and only if it hadn't entered unregistration yet.  If it
succeeds, we can use it in all normal ways until we release the "use"
reference (with ctl_head_finish()).  Note that this relies on having
->unregistering become non-NULL in all cases when one starts to unregister
the sucker.
* keep pointers to ctl_table entries; they *can* be freed if
the entire thing is unregistered.  However, if ctl_head_grab() succeeds,
we know that unregistration had not happened (and will not happen until
ctl_head_finish()) and such pointers can be used safely.

IOW, now we can have inodes under /proc/sys keep references to ctl_table
entries, protecting them with references to ctl_table_header and
grabbing the latter for the duration of operations that require access
to ctl_table.  That won't cause deadlocks, since unregistration will not
be stopped by mere keeping a reference to ctl_table_header.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] beginning of sysctl cleanup - ctl_table_set
Al Viro [Tue, 15 Jul 2008 01:22:20 +0000 (21:22 -0400)]
[PATCH] beginning of sysctl cleanup - ctl_table_set

New object: set of sysctls [currently - root and per-net-ns].
Contains: pointer to parent set, list of tables and "should I see this set?"
method (->is_seen(set)).
Current lists of tables are subsumed by that; net-ns contains such a beast.
->lookup() for ctl_table_root returns pointer to ctl_table_set instead of
that to ->list of that ctl_table_set.

[folded compile fixes by rdd for configs without sysctl]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[patch] hppfs: remove hppfs_permission
Miklos Szeredi [Tue, 1 Jul 2008 21:07:54 +0000 (23:07 +0200)]
[patch] hppfs: remove hppfs_permission

hppfs_permission() is equivalent to the '.permission == NULL' case.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] reuse xxx_fifo_fops for xxx_pipe_fops
Denys Vlasenko [Tue, 1 Jul 2008 12:16:09 +0000 (14:16 +0200)]
[PATCH] reuse xxx_fifo_fops for xxx_pipe_fops

Merge fifo and pipe file_operations.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[patch] vfs: fix lookup on deleted directory
Miklos Szeredi [Wed, 2 Jul 2008 19:30:15 +0000 (21:30 +0200)]
[patch] vfs: fix lookup on deleted directory

Lookup can install a child dentry for a deleted directory.  This keeps
the directory dentry alive, and the inode pinned in the cache and on
disk, even after all external references have gone away.

This isn't a big problem normally, since memory pressure or umount
will clear out the directory dentry and its children, releasing the
inode.  But for UBIFS this causes problems because its orphan area can
overflow.

Fix this by returning ENOENT for all lookups on a S_DEAD directory
before creating a child dentry.

Thanks to Zoltan Sogor for noticing this while testing UBIFS, and
Artem for the excellent analysis of the problem and testing.

Reported-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agonetns: fix ip_rt_frag_needed rt_is_expired
Hugh Dickins [Sun, 27 Jul 2008 00:51:06 +0000 (17:51 -0700)]
netns: fix ip_rt_frag_needed rt_is_expired

Running recent kernels, and using a particular vpn gateway, I've been
having to edit my mails down to get them accepted by the smtp server.

Git bisect led to commit e84f84f276473dcc673f360e8ff3203148bdf0e2 -
netns: place rt_genid into struct net.  The conversion from a != test
to rt_is_expired() put one negative too many: and now my mail works.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: nf_conntrack_extend: avoid unnecessary "ct->ext" dereferences
Patrick McHardy [Sun, 27 Jul 2008 00:50:05 +0000 (17:50 -0700)]
netfilter: nf_conntrack_extend: avoid unnecessary "ct->ext" dereferences

As Linus points out, "ct->ext" and "new" are always equal, avoid unnecessary
dereferences and use "new" directly.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: fix double-free and use-after free
Pekka Enberg [Sun, 27 Jul 2008 00:49:33 +0000 (17:49 -0700)]
netfilter: fix double-free and use-after free

As suggested by Patrick McHardy, introduce a __krealloc() that doesn't
free the original buffer to fix a double-free and use-after-free bug
introduced by me in netfilter that uses RCU.

Reported-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Tested-by: Dieter Ries <clip2@gmx.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: arptables in netns for real
Alexey Dobriyan [Sun, 27 Jul 2008 00:48:59 +0000 (17:48 -0700)]
netfilter: arptables in netns for real

IN, FORWARD -- grab netns from in device, OUT -- from out device.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: ip{,6}tables_security: fix future section mismatch
Alexey Dobriyan [Sun, 27 Jul 2008 00:48:38 +0000 (17:48 -0700)]
netfilter: ip{,6}tables_security: fix future section mismatch

Currently not visible, because NET_NS is mutually exclusive with SYSFS
which is required by SECURITY.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoselinux: use nf_register_hooks()
Alexey Dobriyan [Sun, 27 Jul 2008 00:48:15 +0000 (17:48 -0700)]
selinux: use nf_register_hooks()

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: ebtables: use nf_register_hooks()
Alexey Dobriyan [Sun, 27 Jul 2008 00:47:53 +0000 (17:47 -0700)]
netfilter: ebtables: use nf_register_hooks()

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoAdd layer1 over IP support
Karsten Keil [Sun, 27 Jul 2008 00:02:10 +0000 (02:02 +0200)]
Add layer1 over IP support

Implement a ISDN over IP tunnel to use mISDN hardware on
remote locations.

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoAdd mISDN HFC multiport driver
Karsten Keil [Sun, 27 Jul 2008 00:00:43 +0000 (02:00 +0200)]
Add mISDN HFC multiport driver

Enable support for cards with Cologne Chip AG's HFC multiport
chip.

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoAdd mISDN HFC PCI driver
Karsten Keil [Sat, 26 Jul 2008 16:55:28 +0000 (18:55 +0200)]
Add mISDN HFC PCI driver

Enable support for card with Cologne Chip AG's
HFC PCIbased cards

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoAdd mISDN DSP
Karsten Keil [Sat, 26 Jul 2008 23:56:38 +0000 (01:56 +0200)]
Add mISDN DSP

Enable support for digital audio processing capability.
This module may be used for special applications that require
cross connecting of bchannels, conferencing, dtmf decoding
echo cancelation, tone generation, and Blowfish encryption and
decryption.
It may use hardware features if available.

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoAdd mISDN core files
Karsten Keil [Sat, 26 Jul 2008 23:54:58 +0000 (01:54 +0200)]
Add mISDN core files

Add mISDN core files

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoDefine AF_ISDN and PF_ISDN
Karsten Keil [Sat, 26 Jul 2008 16:52:34 +0000 (18:52 +0200)]
Define AF_ISDN and PF_ISDN

Define the address and protocol family value for mISDN.

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoAdd mISDN driver
Karsten Keil [Sat, 26 Jul 2008 16:52:11 +0000 (18:52 +0200)]
Add mISDN driver

mISDN is a new modular ISDN driver, in the long term it should replace
the old I4L driver architecture for passiv ISDN cards.

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoatmel-mci: debugfs support
Haavard Skinnemoen [Thu, 24 Jul 2008 12:18:59 +0000 (14:18 +0200)]
atmel-mci: debugfs support

Create additional files under the host's debugfs directory containing
additional host-specific debug information.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc: Add per-card debugfs support
Haavard Skinnemoen [Thu, 24 Jul 2008 12:18:58 +0000 (14:18 +0200)]
mmc: Add per-card debugfs support

For each card successfully added to the bus, create a subdirectory under
the host's debugfs root with information about the card.

At the moment, only a single file is added to the card directory for
all cards: "state". It reflects the "state" field in struct mmc_card,
indicating whether the card is present, readonly, etc.

For MMC and SD cards (not SDIO), another file is added: "status".
Reading this file will ask the card about its current status and
return it. This can be useful if the card just refuses to respond to
any commands, which might indicate that the card state is not what the
MMC core thinks it is (due to a missing stop command, for example.)

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc: Export internal host state through debugfs
Haavard Skinnemoen [Thu, 24 Jul 2008 12:18:57 +0000 (14:18 +0200)]
mmc: Export internal host state through debugfs

When CONFIG_DEBUG_FS is set, create a few files under /sys/kernel/debug
containing information about an mmc host's internal state. Currently,
just a single file is created, "ios", which contains information about
the current operating parameters for the bus (clock speed, bus width,
etc.)

Host drivers can add additional files and directories under the host's
root directory by passing the debugfs_root field in struct mmc_host as
the 'parent' parameter to debugfs_create_*.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agoimxmmc: fix crash when no platform data is provided
Paulius Zaleckas [Wed, 9 Jul 2008 13:03:20 +0000 (16:03 +0300)]
imxmmc: fix crash when no platform data is provided

Don't crash if no platform data is provided.
In this case assume that card is present.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agoimxmmc: fix platform resources
Paulius Zaleckas [Wed, 9 Jul 2008 13:03:17 +0000 (16:03 +0300)]
imxmmc: fix platform resources

Fixup platform resources handling.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agoimxmmc: remove DEBUG definition
Paulius Zaleckas [Wed, 9 Jul 2008 13:03:13 +0000 (16:03 +0300)]
imxmmc: remove DEBUG definition

Removed DEBUG #define #undef, because module is automaticaly
compiled with -DDEBUG when CONFIG_MMC_DEBUG is defined.
Currently it just generates compiler warning about redefinition.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agoMerge branch 'for_rmk_13' of git://git.mnementh.co.uk/linux-2.6-im
Russell King [Sat, 26 Jul 2008 22:04:59 +0000 (23:04 +0100)]
Merge branch 'for_rmk_13' of git://git.mnementh.co.uk/linux-2.6-im

15 years agotracehook: comment fixes
Roland McGrath [Sat, 26 Jul 2008 21:41:26 +0000 (14:41 -0700)]
tracehook: comment fixes

This fixes some typos and errors in <linux/tracehook.h> comments.
No code changes.

Signed-off-by: Roland McGrath <roland@redhat.com>
15 years ago[ARM] update defconfig for eseries.
Ian Molton [Sat, 26 Jul 2008 21:39:58 +0000 (22:39 +0100)]
[ARM] update defconfig for eseries.

Signed-off-by: Ian Molton <spyro@f2s.com>
15 years ago[ARM] PXA: squash warning in pxafb
Ian Molton [Mon, 21 Jul 2008 10:02:40 +0000 (11:02 +0100)]
[ARM] PXA: squash warning in pxafb

Fixes a warning about using the wrong type in pxafb.c

Signed-off-by: Ian Molton <spyro@f2s.com>
15 years ago[ARM] pxa: PXA25x UDC - Fix warning during build
Ian Molton [Sat, 12 Jul 2008 10:55:42 +0000 (11:55 +0100)]
[ARM] pxa: PXA25x UDC - Fix warning during build

Fixes an unterminated ' warning building PXA25X UDC.

Signed-off-by: Ian Molton <spyro@f2s.com>
15 years agoMerge branches 'bkl-removal', 'ipoib', 'mlx4' and 'nes' into for-linus
Roland Dreier [Sat, 26 Jul 2008 20:59:47 +0000 (13:59 -0700)]
Merge branches 'bkl-removal', 'ipoib', 'mlx4' and 'nes' into for-linus

15 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 26 Jul 2008 20:25:47 +0000 (13:25 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ftrace: fix modular build
  ftrace: disable tracing on acpi idle calls
  ftrace: remove latency-tracer leftover
  ftrace: only trace preempt off with preempt tracer
  ftrace: fix 4d3702b6 (post-v2.6.26): WARNING: at kernel/lockdep.c:2731 check_flags (ftrace)

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 26 Jul 2008 20:25:05 +0000 (13:25 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, AMD IOMMU: include amd_iommu_last_bdf in device initialization
  x86: fix IBM Summit based systems' phys_cpu_present_map on 32-bit kernels
  x86, RDC321x: remove gpio.h complications
  x86, RDC321x: add to mach-default
  crashdump: fix undefined reference to `elfcorehdr_addr'
  flag parameters: fix compile error of sys_epoll_create1

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Sat, 26 Jul 2008 20:23:17 +0000 (13:23 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (30 commits)
  Blackfin arch: If we double fault, rather than hang forever, reset
  Blackfin arch: When icache is off, make sure people know it
  Blackfin arch: Fix bug - skip single step in high priority interrupt handler instead of disabling all interrupts in single step debugging.
  Blackfin arch: cache the values of vco/sclk/cclk as the overhead of doing so (~24 bytes) is worth avoiding the software mult/div routines
  Blackfin arch: fix bug - IMDMA is not type struct dma_register
  Blackfin arch: check the EXTBANKS field of the DDRCTL1 register to see if we are using both memory banks
  Blackfin arch: Apply Bluetechnix CM-BF527 board support patch
  Blackfin arch: Add unwinding for stack info, and a little more detail on trace buffer
  Blackfin arch: Add ISP1760 board resources to BF548-EZKIT
  Blackfin arch: fix bug - detect 0.1 silicon revision BF527-EZKIT as 0.0 version
  Blackfin arch: add missing IORESOURCE_MEM flags to UART3
  Blackfin arch: Add return value check in bfin_sir_probe(), remove SSYNC().
  Blackfin arch:  Extend sram malloc to handle L2 SRAM.
  Blackfin arch: Remove useless config option.
  Blackfin arch:  change L1 malloc to base on slab cache and lists.
  Blackfin arch: use local labels and ENDPROC() markings
  Blackfin arch: Do not need this dualcore test module in kernel.
  Blackfin arch: Allow ptrace to peek and poke application data in L1 data SRAM.
  Blackfin arch: Add ANOMALY_05000368 workaround
  Blackfin arch: Functional power management support
  ...

15 years agodsp56k: Fix BKL pushdown
Geert Uytterhoeven [Sat, 26 Jul 2008 15:15:05 +0000 (17:15 +0200)]
dsp56k: Fix BKL pushdown

commit 236b8756a2b6f90498d45b2c36d43e5372f2d4b8 ("dsp56k: BKL pushdown")
removed the `struct inode *inode' parameter from dsp56k_ioctl(), but
forgot to update the use of `inode' in the first line of the function.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/video/fbmem.c: removed duplicated include
Huang Weiyi [Sat, 26 Jul 2008 11:37:57 +0000 (19:37 +0800)]
drivers/video/fbmem.c: removed duplicated include

Removed duplicated include <linux/major.h>
in drivers/video/fbmem.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sat, 26 Jul 2008 19:45:32 +0000 (12:45 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/sfrench/cifs-2.6

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  When verifying the decoded header before decoding the object identifier
  [CIFS] Fix warnings from checkpatch
  [CIFS] Fix improper endian conversion of ACL subauth field
  [CIFS] Fix possible double free if search immediately after search rewind fails
  [CIFS] remove checkpatch warning
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
  cifs: assorted endian annotations
  [CIFS] break ATTR_SIZE changes out into their own function
  lockdep: annotate cifs in-kernel sockets
  [CIFS] Fix compiler warning on 64-bit

15 years ago[SCSI] qla2xxx: Update version number to 8.02.01-k6.
Andrew Vasquez [Thu, 24 Jul 2008 15:31:50 +0000 (08:31 -0700)]
[SCSI] qla2xxx: Update version number to 8.02.01-k6.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Additional NPIV corrections.
Andrew Vasquez [Thu, 24 Jul 2008 15:31:49 +0000 (08:31 -0700)]
[SCSI] qla2xxx: Additional NPIV corrections.

Minor fixes addressing:
- rport managements during vport deletion.
- acquire proper physical-ha during qla24xx_abort_command() and
  qla24xx_queuecommand()
- do not needlessly acquire the pha for non-NPIV capable ISPs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: suppress uninitialized-var warning
Andrew Morton [Thu, 24 Jul 2008 15:31:48 +0000 (08:31 -0700)]
[SCSI] qla2xxx: suppress uninitialized-var warning

drivers/scsi/qla2xxx/qla_os.c: In function 'qla2x00_post_work':
drivers/scsi/qla2xxx/qla_os.c:2158: warning: 'flags' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: use memory_read_from_buffer()
Akinobu Mita [Thu, 24 Jul 2008 15:31:47 +0000 (08:31 -0700)]
[SCSI] qla2xxx: use memory_read_from_buffer()

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Issue proper ISP callbacks during stop-firmware.
Andrew Vasquez [Thu, 24 Jul 2008 15:31:46 +0000 (08:31 -0700)]
[SCSI] qla2xxx: Issue proper ISP callbacks during stop-firmware.

As the original code would incorrectly call the non-ISP24xx/25xx
callbacks during recovery, a stop-firmware failure could result
in improper bit-banging of the RISC and in some cases manifest in
a NMI-watchdog trigger due to the RISC not coming out of its
reset state.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ch: fix ch_remove oops
FUJITA Tomonori [Sat, 26 Jul 2008 14:25:43 +0000 (23:25 +0900)]
[SCSI] ch: fix ch_remove oops

The following commit causes ch_remove oops:

commit 24b42566c3fcbb5a9011d1446783d0f5844ccd45
Author: Greg Kroah-Hartman <gregkh@suse.de>
Date:   Fri May 16 17:55:12 2008 -0700

    SCSI: fix race in device_create

    There is a race from when a device is created with device_create() and
    then the drvdata is set with a call to dev_set_drvdata() in which a
    sysfs file could be open, yet the drvdata will be NULL, causing all
    sorts of bad things to happen.

    This patch fixes the problem by using the new function,
    device_create_drvdata().  It fixes the problem in all of the scsi
    drivers that need it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Doug Gilbert <dgilbert@interlog.com>
Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The problem is ch_probe stores ch's private data at a wrong place.

We need to store it at scsi_device->sdev_gendev but the above patch
stores it at device struct that device_create_drvdata returns. So we
hit an oops when ch_remove accesses
scsi_device->sdev_gendev->driver_data, which is NULL.

Actually, there wasn't a race because ch doesn't create sysfs files
with device struct that device_create returns. This patch puts back
dev_set_drvdata() to set ch's private data properly.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] 3w-9xxx: add MSI support and misc fixes
adam radford [Tue, 22 Jul 2008 23:47:40 +0000 (16:47 -0700)]
[SCSI] 3w-9xxx: add MSI support and misc fixes

This patch for the 3w-9xxx scsi driver applies on top of the
BKL-pushdown changes in -git9.

This patch does the following:

- Increase max AENs drained to 256.
- Add MSI support and "use_msi" module parameter.
- Fix bug in twa_get_param() on 4GB+.
- Use pci_resource_len() for ioremap().

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_lib: use blk_rq_tagged in scsi_request_fn
Mike Christie [Tue, 22 Jul 2008 20:34:38 +0000 (15:34 -0500)]
[SCSI] scsi_lib: use blk_rq_tagged in scsi_request_fn

I goofed and did not see the macro for checking if a request is tagged.
This patch has us use blk_rq_tagged instead of digging into the req->tag.

Patch was made over scsi-misc.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Update driver version to 1.0.1
Brian King [Tue, 22 Jul 2008 13:31:48 +0000 (08:31 -0500)]
[SCSI] ibmvfc: Update driver version to 1.0.1

Update driver version to 1.0.1.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Add ADISC support
Brian King [Tue, 22 Jul 2008 13:31:47 +0000 (08:31 -0500)]
[SCSI] ibmvfc: Add ADISC support

Add an ADISC to the target discovery job in order to sanity check whether or
not we need to re-login to the target.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Miscellaneous fixes
Brian King [Tue, 22 Jul 2008 13:31:46 +0000 (08:31 -0500)]
[SCSI] ibmvfc: Miscellaneous fixes

Properly setup the size of the async event queue. This fixes a bug where async events
were not getting processed by the driver.

Setup target_id field in the driver's target struct so that target sysfs attributes
work for multiple targets.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Fix hang on module removal
Brian King [Tue, 22 Jul 2008 13:31:42 +0000 (08:31 -0500)]
[SCSI] ibmvfc: Fix hang on module removal

If certain ELS events are received during module removal, after the kthread
is stopped, the rmmod can hang. This fixes the ibmvfc driver so that ELS
events during rmmod are ignored by stopping all device activity prior to
killing the kthread and also changes reinitialization to not attempt a reinit
if the adapter has been taken offline.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Target refcounting fixes
Brian King [Tue, 22 Jul 2008 13:31:41 +0000 (08:31 -0500)]
[SCSI] ibmvfc: Target refcounting fixes

Fix up some refcounting on the ibmvfc drivers internal target struct
when accessed through some sysfs attributes.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Reduce unnecessary log noise
Brian King [Tue, 22 Jul 2008 13:31:39 +0000 (08:31 -0500)]
[SCSI] ibmvfc: Reduce unnecessary log noise

Reduces some unnecessary log noise by removing a printk during
host port state query and increasing the log level required to
log received async events.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] sym53c8xx: free luntbl in sym_hcb_free
Mike Anderson [Mon, 21 Jul 2008 22:58:32 +0000 (15:58 -0700)]
[SCSI] sym53c8xx: free luntbl in sym_hcb_free

This patch frees the luntbl dma area in sym_hcb_free if allocated.
Since the luntbl is part of a larger dma coherent area not freeing the
luntbl kept a 64k dma coherent area previous allocated through
dma_alloc_coherent allocated. This prevented a DLPAR remove IO
operation from completing successfully.

Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_scan.c: Release mutex in error handling code
Julia Lawall [Mon, 21 Jul 2008 07:58:30 +0000 (09:58 +0200)]
[SCSI] scsi_scan.c: Release mutex in error handling code

The mutex is released on a successful return, so it would seem that it
should be released on an error return as well.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression l;
@@

mutex_lock(l);
... when != mutex_unlock(l)
    when any
    when strict
(
if (...) { ... when != mutex_unlock(l)
+   mutex_unlock(l);
    return ...;
}
|
mutex_unlock(l);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_eh_prep_cmnd should save scmd->underflow
Alan Stern [Mon, 21 Jul 2008 14:25:52 +0000 (10:25 -0400)]
[SCSI] scsi_eh_prep_cmnd should save scmd->underflow

This patch (as1116) fixes a bug in scsi_eh_prep_cmnd() and
scsi_eh_restore_cmnd().  These routines are supposed to save any
values they change and restore them later, but someone forgot to
save & restore scmd->underflow.

This fixes part of the problem reported in Bugzilla #9638.

[jejb: fix up rejections around DIF/DIX]
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] sd: Support for SCSI disk (SBC) Data Integrity Field
Martin K. Petersen [Thu, 17 Jul 2008 08:28:35 +0000 (04:28 -0400)]
[SCSI] sd: Support for SCSI disk (SBC) Data Integrity Field

Support for controllers and disks that implement DIF protection
information:

 - During command preparation the RDPROTECT/WRPROTECT must be set
   correctly if the target has DIF enabled.

 - READ(6) and WRITE(6) are not supported when DIF is on.

 - The controller must be told how to handle the I/O via the
   protection operation field in scsi_cmnd.

 - Refactor the I/O completion code that extracts failed LBA from the
   returned sense data and handle DIF failures correctly.

 - sd_dif.c implements the functions required to prepare and complete
   requests with protection information attached.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] sd: Identify DIF protection type and application tag ownership
Martin K. Petersen [Thu, 17 Jul 2008 08:28:34 +0000 (04:28 -0400)]
[SCSI] sd: Identify DIF protection type and application tag ownership

If a disk is formatted with protection information (Inquiry bit
PROTECT=1) it is required to support Read Capacity(16).  Force use of
the 16-bit command in this case and extract the P_TYPE field which
indicates whether the disk is formatted using DIF Type 1, 2 or 3.

The ATO (App Tag Own) bit in the Control Mode Page indicates whether
the storage device or the initiator own the contents of the
DIF application tag.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] Do not retry a request whose data integrity check failed
Martin K. Petersen [Thu, 17 Jul 2008 08:28:33 +0000 (04:28 -0400)]
[SCSI] Do not retry a request whose data integrity check failed

If initiator or target reject the I/O due to DIF errors there is no
point in retrying.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] Support devices with protection information
Martin K. Petersen [Thu, 17 Jul 2008 21:08:48 +0000 (17:08 -0400)]
[SCSI] Support devices with protection information

Implement support for DMA of protection information for devices that
are data integrity capable.

 - Add support for mapping an extra scatter-gather list containing
   the protection information.

 - Allocate protection scsi_data_buffer if host is DIX (integrity DMA)
   capable.

 - Accessor function for checking whether a device has protection
   enabled.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] Command protection operation
Martin K. Petersen [Thu, 17 Jul 2008 08:28:31 +0000 (04:28 -0400)]
[SCSI] Command protection operation

Controllers that support DMA of protection information must be told
explicitly how to handle the I/O.  The controller has no knowledge of
the protection capabilities of the target device so this information
must be passed in the scsi_cmnd.

 - The protection operation tells the HBA whether to generate, strip or
   verify protection information.

 - The protection type tells the HBA which layout the target is
   formatted with.  This is necessary because the controller must be
   able to correctly interpret the included protection information in
   order to verify it.

 - When a scsi_cmnd is reused for error handling the protection
   operation must be cleared and saved while error handling is in
   progress.

 - prot_op and prot_type are placed in an existing hole in scsi_cmnd
   and don't cause the structure to grow.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] Host protection capabilities
Martin K. Petersen [Thu, 17 Jul 2008 08:28:30 +0000 (04:28 -0400)]
[SCSI] Host protection capabilities

Controllers that support protection information must indicate this to
the SCSI midlayer so that the ULD can prepare scsi_cmnds accordingly.

This patch implements a host mask and various types of protection:

 - DIF Type 1-3 (between HBA and disk)
 - DIX Type 0-3 (between OS and HBA)

The patch also allows the HBA to set the guard type to something
different than the T10-mandated CRC.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: create lookup cache
Hannes Reinecke [Thu, 17 Jul 2008 23:53:33 +0000 (16:53 -0700)]
[SCSI] scsi_dh: create lookup cache

Create a cache of devices that are seen in a system. This will avoid
the unnecessary traversal of the device list in the scsi_dh when there
are multiple luns of a same type.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: attach to hardware handler from dm-mpath
Hannes Reinecke [Fri, 18 Jul 2008 00:49:02 +0000 (17:49 -0700)]
[SCSI] scsi_dh: attach to hardware handler from dm-mpath

multipath keeps a separate device table which may be
more current than the built-in one.
So we should make sure to always call ->attach whenever
a multipath map with hardware handler is instantiated.
And we should call ->detach on removal, too.

[sekharan: update as per comments from agk]
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: add generic SPC-3 alua handler
Hannes Reinecke [Thu, 17 Jul 2008 23:53:21 +0000 (16:53 -0700)]
[SCSI] scsi_dh: add generic SPC-3 alua handler

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: Update RDAC device handler
Hannes Reinecke [Thu, 17 Jul 2008 23:53:15 +0000 (16:53 -0700)]
[SCSI] scsi_dh: Update RDAC device handler

This patch updates the RDAC device handler to
refuse to attach to devices not supporting the
RDAC vpd pages.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: Update hp_sw hardware handler
Hannes Reinecke [Thu, 17 Jul 2008 23:53:09 +0000 (16:53 -0700)]
[SCSI] scsi_dh: Update hp_sw hardware handler

This patch updates the hp_sw device handler to properly
check the return codes etc.
And adds the 'correct' machine definitions.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: Update EMC handler
Hannes Reinecke [Thu, 17 Jul 2008 23:53:03 +0000 (16:53 -0700)]
[SCSI] scsi_dh: Update EMC handler

This patch converts the EMC device handler to use a proper
state machine. We now also parse the extended INQUIRY
information to determine if long trespass commands are
supported. And we're now using the long trespass command
correctly. And finally there's now an check at init time
to refuse to attach to devices not supporting EMC-specific
VPD pages.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: Add 'dh_state' sysfs attribute
Hannes Reinecke [Thu, 17 Jul 2008 23:52:57 +0000 (16:52 -0700)]
[SCSI] scsi_dh: Add 'dh_state' sysfs attribute

Implement a 'dh_state' sdev attribute for dynamic device handler
manipulation. A read on the attribute will return the name of
the currently attached device handler or 'detached' if no handler
is attached.
The attribute allows the following strings to be written:
- The name of the device handler to be attached if the state is
  'detached'.
- 'activate' to trigger path activation if a device handler
  is attached.
- 'detach' to detach the currently attached device handler.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: Implement common device table handling
Hannes Reinecke [Thu, 17 Jul 2008 23:52:51 +0000 (16:52 -0700)]
[SCSI] scsi_dh: Implement common device table handling

Instead of having each and every driver implement its own
device table scanning code we should rather implement a common
routine and scan the device tables there.
This allows us also to implement a general notifier chain
callback for all device handler instead for one per handler.

[sekharan: Fix rejections caused by conflicting bug fix]
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] Make host_no an unsigned int
Matthew Wilcox [Tue, 15 Jul 2008 20:54:16 +0000 (14:54 -0600)]
[SCSI] Make host_no an unsigned int

Daniel Debonzi reports that he has managed to wrap host_no.  Increasing
the number of host numbers available to 32-bit from 16-bit allows the
problem to be evaded for another hundred years.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] sd: update index allocation and use ida instead of idr
Tejun Heo [Mon, 14 Jul 2008 05:59:30 +0000 (14:59 +0900)]
[SCSI] sd: update index allocation and use ida instead of idr

Update index allocation as follows.

* sd_index_idr is used only for ID allocation and mapping
  functionality is not used.  Use more memory efficient ida instead.

* idr and ida have their own locks inside them and don't need them for
  operation.  Drop it.

* index wasn't freed if probing failed after index allocation.  fix
  it.

* ida allocation should be repeated if it fails with -EAGAIN.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] fix shared tag map tag allocation
Mike Christie [Sat, 12 Jul 2008 00:50:35 +0000 (19:50 -0500)]
[SCSI] fix shared tag map tag allocation

When drivers use a shared tag map we can end up with more requests
than tags, because the tag map is shost->can_queue tags and there
can be sdevs * sdev->queue_depth requests. In scsi_request_fn
if tag allocation fails we just drop down to just dequeueing the
tag without a tag. The problem is that drivers using the shared tag
map rely on a valid tag always being set, because it will use the
tag number to lookup commands later.

This patch has us check if we got a valid tag when the host lock
is held right before we check if the host queue is ready. We do the
check here because to allocate the tag we need the q lock, but
if the tag is bad we want to add the device/q onto the starved list
which requires the host lock.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] stex: fix queue depth setting
Mike Christie [Sat, 12 Jul 2008 00:50:34 +0000 (19:50 -0500)]
[SCSI] stex: fix queue depth setting

We want to set the queue depth to something reasonable - not
the can_queue.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla4xxx: fix queue depth setting
Mike Christie [Sat, 12 Jul 2008 00:50:33 +0000 (19:50 -0500)]
[SCSI] qla4xxx: fix queue depth setting

We want to set the queue depth to something reasonable - not
the can_queue.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] fix shared tag map setup
Mike Christie [Sat, 12 Jul 2008 00:50:32 +0000 (19:50 -0500)]
[SCSI] fix shared tag map setup

Currently qla4xxx and stex pass in their can_queue values into
scsi_activate_tcq because they wanted the tag map that large.
The problem with this is that it ends up also setting the queue
depth to that large value. All we want to do this in this case
is set the device queue depth and the other device settings.
We do not need to touch the tag map sizing because the drivers
had setup that map according to their can_queue limits when the
shared map was created.

The scsi mid layer in request_fn will then handle the case where we
have more requests than available tags when it checks the host
queue ready function.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: Remove bogus memset
Kai Makisara [Fri, 11 Jul 2008 12:06:40 +0000 (15:06 +0300)]
[SCSI] st: Remove bogus memset

Mike Christie noticed a bogus memset. It can be removed as dead code
since the number of bytes in the driver buffer in fixed block mode is
always a multiple of the tape block size.

Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: Move buffer pointer back when data could not be written.
Kai Makisara [Fri, 11 Jul 2008 12:05:25 +0000 (15:05 +0300)]
[SCSI] st: Move buffer pointer back when data could not be written.

Move buffer pointer back when data could not be written. Bug found by
Mike Christie.

Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Update version number to 8.02.01-k5.
Andrew Vasquez [Thu, 10 Jul 2008 23:56:03 +0000 (16:56 -0700)]
[SCSI] qla2xxx: Update version number to 8.02.01-k5.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Don't hardcode fw_transfer_size for ISP2[45]xx parts.
Andrew Vasquez [Thu, 10 Jul 2008 23:56:02 +0000 (16:56 -0700)]
[SCSI] qla2xxx: Don't hardcode fw_transfer_size for ISP2[45]xx parts.

Use the full buffer size available, as there's no reason to limit
the firwmare-image load-segment size for these parts.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Verify the RISC is not in ROM code if firmware-load is disabled.
Andrew Vasquez [Thu, 10 Jul 2008 23:56:01 +0000 (16:56 -0700)]
[SCSI] qla2xxx: Verify the RISC is not in ROM code if firmware-load is disabled.

Add an additional check to verify that the current executing
firmware is in fact non-ROM code.  The non-ROM Get-ID mailbox
command is used for verification.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Correct overflow during dump-processing on large-memory ISP23xx parts.
Andrew Vasquez [Thu, 10 Jul 2008 23:56:00 +0000 (16:56 -0700)]
[SCSI] qla2xxx: Correct overflow during dump-processing on large-memory ISP23xx parts.

Total ram words can exceed a 16bit value on large-memory boards.
Safely extend to a 32bit width.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Skip FDMI registration on ISP21xx/22xx parts.
Andrew Vasquez [Thu, 10 Jul 2008 23:55:59 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Skip FDMI registration on ISP21xx/22xx parts.

Firmware does not have the facilities to issue management server
IOCBs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Correct rport/fcport visibility-state handling during loop-resync.
Seokmann Ju [Thu, 10 Jul 2008 23:55:58 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Correct rport/fcport visibility-state handling during loop-resync.

There were several issues here, one, during RSCN handling if a
follow-on RSCN occurred (within interrupt context) the DPC thread
could inadvertantly leave the fcport in a stale lost state.
Secondly, scheduled rport removal is handled exclusively by the
'parent' DPC thread, so wake up the proper thread.  Finally,
process vport loop-resync's only when the vport has in an
"active" state (ID acquired).

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Correct vport management of MBA_PORT_UPDATE.
Seokmann Ju [Thu, 10 Jul 2008 23:55:57 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Correct vport management of MBA_PORT_UPDATE.

By allowing the qla2x00_alert_all_vps() to manage per-vport
recognition of the MBA.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Correct fcport state-management during loss.
Seokmann Ju [Thu, 10 Jul 2008 23:55:56 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Correct fcport state-management during loss.

All fcport->state management should be done within
qla2x00_mark_device_lost(), the assignment of state within
qla2x00_mark_vp_devices_dead() caused associated rports to not be
removed.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Always aquire the parent's hardware_lock.
Seokmann Ju [Thu, 10 Jul 2008 23:55:55 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Always aquire the parent's hardware_lock.

While issuing a marker, manipulating the request/response queues
and modifying the outstanding command array.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Swap enablement order of EFT and FCE.
Andrew Vasquez [Thu, 10 Jul 2008 23:55:54 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Swap enablement order of EFT and FCE.

The firmware group has suggested that FCE (Fibre Channel Event)
tracing be enabled prior to EFT (Extended Firmware Tracing) to
maximize the capturing of data on the wire.  This change has no
real semantic effect on driver operation, as it's mostly a
shuffling of code.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Retrieve board serial-number and description from VPD.
Joe Carnuccio [Thu, 10 Jul 2008 23:55:53 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Retrieve board serial-number and description from VPD.

Recent ISPs have this information written at manufacturing time,
so use the information.  This also reduces future churn of the
qla_devtbl.h file contents, as the driver can now depend on the
information to be present in VPD.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Allow the user the option of disabling iIDMA.
Andrew Vasquez [Thu, 10 Jul 2008 23:55:52 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Allow the user the option of disabling iIDMA.

iIDMA support requires the driver issue several additional
fabric-managegment (FM) commands per port discovered during SNS
scanning -- GFPN (Get Fabric Port Name) and GPSC (Get Port Speed
Capabilities).  It has been found during testing that some
switches do not respond as *well* as expected to these commands
(silence -- no ACC nor BS_RJT).  So, to handle such conditions,
allow the user the ability to indirectly disable the FM commands
by disabling iIDMA with the ql2xiidmaenable module-parameter.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Cleanup NPIV related functions
Seokmann Ju [Thu, 10 Jul 2008 23:55:51 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Cleanup NPIV related functions

Removed repeated or unnecessary operations during vport
creation/deletion.

Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com>
Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Add LIP count to FC-transport statistics.
Harish Zunjarrao [Thu, 10 Jul 2008 23:55:50 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Add LIP count to FC-transport statistics.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Track total number of ISP aborts.
Harish Zunjarrao [Thu, 10 Jul 2008 23:55:49 +0000 (16:55 -0700)]
[SCSI] qla2xxx: Track total number of ISP aborts.

This parameter counts the total number of ISP aborts during
driver execution.  The value is exported through a DEVICE_ATTR()
off the scsi_host.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>