kconfig: Make zconf.y work with current bison

zconf.y includes zconf.hash.c from the initial code section.
zconf.hash.c references the token constants from zconf.y.  However,
current bison defines the token constants after the initial code
section, making zconf.hash.c fail to compile.  Move the include of
zconf.hash.c later in zconf.y, so bison puts it after the token
constants.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
ocfs2: Return -EINVAL when a device is not ocfs2.

In case of non-modular kernels the root filesystem is mounted by trying
several filesystems. If ocfs2 was tried before the actual filesystem
type, the mount would fail because ocfs2_sb_probe() returns -EAGAIN
instead of -EINVAL.  ocfs2 will now return -EINVAL properly.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Reported-by: Laszlo Attila Toth <panther@balabit.hu>
ocfs2: Move ocfs2_complete_reflink to the right place.

As its name ocfs2_complete_reflink indicates, it should
be called after all the work for reflink is done, so
it really should be called after we reflink xattr
successfully.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Tested-by: Tristan Ye <tristan.ye@oracle.com>
ocfs2: duplicate inline data properly during reflink.

The old reflink fails to handle inodes with inline data and will oops
if it encounters them.  This patch copies inline data to the new inode.
Extended attributes may still be refcounted.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Tested-by: Tristan Ye <tristan.ye@oracle.com>
ocfs2: return f_fsid info in ocfs2_statfs()

Currently the f_fsid of struct kstatfs returned from ocfs2_statfs() is
undefined (vfs layer fills in 0 as default). Since in some conditions,
f_fsid value might be used in a (f_fsid, ino) pair to uniquely identify
a file, ocfs2 should return a unique defined f_fsid value from
ocfs2_statfs().

Because uuid_str is the same on big or litlle endian machine, it's
endian consistent to use osb->uuid_str to generate f_fsid value.

Signed-off-by: Coly Li <coly.li@suse.de>
Cc: Sunil Mushran <sunil.mushran@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
[SCSI] bfa: fix test in bfad_os_fc_host_init()

BFA_PORT_ROLE_FCP_IPFC is 0x04 so this always evaluates to true

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jing Huang <huangj@Brocade.COM>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
crypto: padlock-aes - Use the correct mask when checking whether copying is required

Masking with PAGE_SIZE is just wrong...

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drm/i915: Avoid potential sleep whilst holding spinlock

Miles Lane reported the following error:
2 locks held by cat/4179:
  #0:  (&p->lock){+.+.+.}, at: [<c10a3884>] seq_read+0x25/0x315
  #1:  (&dev_priv->mm.active_list_lock){+.+...}, at: [<c119a854>]
i915_batchbuffer_info+0x2b/0x124
Pid: 4179, comm: cat Not tainted 2.6.32-rc5-git1 #2
Call Trace:
  [<c104874f>] ? __debug_show_held_locks+0x1e/0x20
  [<c1023fb0>] __might_sleep+0xf0/0xf7
  [<c101c393>] kmap+0x17/0x58
  [<c119a8d6>] i915_batchbuffer_info+0xad/0x124
  [<c10a39bf>] seq_read+0x160/0x315
  [<c108fb8c>] ? rw_verify_area+0x98/0xbb
  [<c10a385f>] ? seq_read+0x0/0x315
  [<c1090331>] vfs_read+0x75/0xa9
  [<c10903f9>] sys_read+0x3b/0x5d
  [<c1002a8f>] sysenter_do_call+0x12/0x36

The fix is relatively simple, use the atomic variants of kmap() that
avoid the potential sleep.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drm/i915: Fix and cleanup DPLL calculation for Ironlake

When the ideal error range can't be reached, this will safely use
a most closed one. Clean up some dumb codes in DPLL function too.

This fixes DPLL clock issue against one monitor at 1680x1050@60hz.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drm/i915: HDMI hardware workaround for Ironlake

This brings some hardware workaround for HDMI port on PCH (Ibex Peak),
which fixes unstable issues like during rotation.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
[SCSI] scsi_transport_fc: Fix WARN message for FC passthru failure paths

There are three error paths in the FC passthru code where
job->reply->reply_payload_rcv_len does not get initialized,
resulting in the WARN_ON in fc_bsg_jobdone going off. This patch
fixes this. An example of one of the WARN_ON messages seen:

Badness at drivers/scsi/scsi_transport_fc.c:3424
NIP: d000000000bf21ac LR: d000000000bf2684 CTR: c0000000003f753c
REGS: c00000004eb03430 TRAP: 0700   Not tainted  (2.6.32-rc4-git)
MSR: 8000000000029032 <EE,ME,CE,IR,DR>  CR: 24008444  XER: 00000012
TASK = c00000004c3fc9c0[3243] 'fcping' THREAD: c00000004eb00000 CPU: 0
GPR00: 0000000000000001 c00000004eb036b0 d000000000c01da0 000000004bf17fc0
GPR04: c00000004cd256a0 c00000007e011ce0 c00000007e011d00 c00000004e718000
GPR08: c00000004cd256a0 c00000004eb03ad0 c00000004cd25a90 0000000000000020
GPR12: d000000000bf7848 c000000000b62600 0000000000000060 fffffffffffffff4
GPR16: ffffffffffffffd6 c00000004c7a3060 ffffffff80000003 c00000004b0f0310
GPR20: c00000004e71b180 c00000004c7a3060 0000000000000004 0000000000000000
GPR24: c00000004e71b000 c00000004c7a3000 c00000004b0f0000 c00000004e718000
GPR28: c00000004cd256a0 c00000004cd25a90 d000000000c01db0 c00000004e01d680
NIP [d000000000bf21ac] .fc_bsg_jobdone+0x64/0x9c [scsi_transport_fc]
LR [d000000000bf2684] .fc_bsg_request_handler+0x4a0/0x564 [scsi_transport_fc]
Call Trace:
[c00000004eb036b0] [c0000000003f755c] .get_device+0x20/0x38 (unreliable)
[c00000004eb03720] [d000000000bf2684] .fc_bsg_request_handler+0x4a0/0x564 [scsi_transport_fc]
[c00000004eb03820] [c0000000002c9b5c] .__generic_unplug_device+0x58/0x70
[c00000004eb038a0] [c0000000002ce9fc] .blk_execute_rq_nowait+0x70/0xf4
[c00000004eb03930] [c0000000002ceb2c] .blk_execute_rq+0xac/0x100
[c00000004eb03a60] [c0000000002d51b4] .bsg_ioctl+0x1fc/0x264
[c00000004eb03c10] [c00000000018a89c] .vfs_ioctl+0x54/0xec
[c00000004eb03ca0] [c00000000018b01c] .do_vfs_ioctl+0x640/0x6a8
[c00000004eb03d80] [c00000000018b0fc] .SyS_ioctl+0x78/0xbc
[c00000004eb03e30] [c0000000000085b4] syscall_exit+0x0/0x40
Instruction dump:
8003004c 2fa80000 90090104 38000000 900a0108 419e0038 e9230040 81680108
80690004 7f835840 7c101026 5400f7fe <0b000000> 7d605b78 7f8b1840 409d0008

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-By: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
[SCSI] ipr: add workaround for MSI interrupts on P7

This patch adds some additional logic to the interrupt service routine to fix
a potential problem where an MSI interrupt does not get cleared the first time.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
[SCSI] pmcraid: Fix ppc64 driver build for using cpu_to_le32 on U8 data type

Fix a reported ppc64 driver build issue. Removed cpu_to_le32 conversion
usage for flags in struct pmcraid_ioadl_desc. This was breaking the driver build in ppc64.

drivers/scsi/pmcraid.c: In function 'pmcraid_request_sense':
drivers/scsi/pmcraid.c:2254: warning: large integer implicitly truncated
to unsigned type

Signed-off-by: Anil Ravindranath<anil_ravindranath@pmc-sierra.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
[SCSI] Fix incorrect reporting of host protection capabilities

The advent of DIF Type 2 devices exposed some missing break statements
in the protection mask switch constructs.  However, rewriting the code
to use an index into a small static array seemed like a more elegant
solution.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
[SCSI] libsas: do not set res = 0 in sas_ex_discover_dev()

We should not set res to 0 in function sas_ex_discover_dev  in order to let
it discover it further when wide port hotplug in .

Signed-off-by: Tom Peng <tom_peng@usish.com>
Signed-off-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
intel-iommu: Check for 'DMAR at zero' BIOS error earlier.

Chris Wright has some patches which let us fall back to swiotlb nicely
if IOMMU initialisation fails. But those are a bit much for 2.6.32.

Instead, let's shift the check for the biggest problem, the HP and Acer
BIOS bug which reports a DMAR at physical address zero. That one can
actually be checked much earlier -- before we even admit to having
detected an IOMMU in the first place. So the swiotlb init goes ahead as
we want.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
ssb-pcmcia: Fix 32bit register access in early bus scanning

The scan function was using 32 bit access which does not
work on 16bit CF cards.

This patch corrects this by doing two 16 bit reads like
ssb_pcmcia_read32 already does.

mb -- Removed locking. That early in init there's no need for locking.

Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b43: work around a locking issue in ->set_tim()

ops->set_tim() must be atomic, so b43 trying to acquire a mutex leads
to a kernel crash. This patch trades an easy to trigger crash in AP
mode for an unlikely race condition. According to Michael, the real
fix would be to allow set_tim() to sleep, since b43 is not the only
driver that needs to sleep in all callbacks.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00: update MAINTAINERS

Although I have always been the active maintainer of the rt2x00 drivers,
I was not mentioned explicitely in the MAINTAINERS file as such.

Update the rt2x00 entry in the MAINTAINERS file to add my name and
email address.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath5k: don't reset mcast filter when configuring the mode

We should not zero out the multicast hash when configuring
the operating mode, since a zero value means all multicast
frames will get dropped.  Also, ath5k_mode_setup() gets
called after any reset, so the hash already set up in
configure_filter() is lost.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>