Archived
14
0
Fork 0
Commit graph

223004 commits

Author SHA1 Message Date
Clemens Ladisch
5aaffc65a2 firewire: core: rename some variables
In manage_channel(), rename the variables "c" and "i" to the more
expressive "bit" and "channel".

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-02-26 15:11:03 +01:00
Stefan Richter
8fd2af11d2 firewire: nosy: should work on Power Mac G4 PCI too
The first board generation of Power Mac G4 ("Yikes!", those with PCI
graphics) still had a PCILynx controller like their G3 predecessors,
but not the later AGP models.  (Jonathan Woithe recalls to have heard
of it, and some web sources reinforce it.)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-02-26 15:11:03 +01:00
Clemens Ladisch
e71084af58 firewire: core: fix card->reset_jiffies overflow
On a 32-bit machine with, e.g., HZ=1000, jiffies will overflow after
about 50 days, so if there are between 25 and 50 days between bus
resets, the card->reset_jiffies comparisons can get wrong results.

To fix this, ensure that this timestamp always uses 64 bits.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
2011-01-23 12:31:01 +01:00
Clemens Ladisch
dbc9880fa7 firewire: cdev: remove unneeded reference
For outbound transactions, the IDR's and the callback's references now
have exactly the same lifetime, so we do not need both of them.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
2011-01-23 12:31:01 +01:00
Clemens Ladisch
5a5e62da9b firewire: cdev: always wait for outbound transactions to complete
We must not use fw_cancel_transaction() because it cannot correctly
abort still-active transactions.  The only place in core-cdev where this
matters is when the file is released.  Instead of trying to abort the
transactions, we wait for them to complete normally, i.e., until all
outbound transaction resources have been removed from the IDR tree.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
2011-01-23 12:31:00 +01:00
Clemens Ladisch
3e204dfcaf firewire: cdev: remove unneeded idr_find() from complete_transaction()
Outbound transactions are never aborted with release_client_resource(),
so it is not necessary for complete_transaction() to check whether the
resource is still registered.  Only shutdown_resource() can abort such
an transaction, and this is already handled with the in_shutdown check.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
2011-01-23 12:31:00 +01:00
Clemens Ladisch
f117a3e300 firewire: ohci: log dead DMA contexts
When a DMA context goes into the dead state (and the controller thus
stops working correctly), logging this error and the controller's error
code might be helpful for debugging.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-01-23 12:31:00 +01:00
Stefan Richter
6044565af4 firewire: core: fix unstable I/O with Canon camcorder
Regression since commit 1038953674, "firewire: core: check for 1394a
compliant IRM, fix inaccessibility of Sony camcorder":

The camcorder Canon MV5i generates lots of bus resets when asynchronous
requests are sent to it (e.g. Config ROM read requests or FCP Command
write requests) if the camcorder is not root node.  This causes drop-
outs in videos or makes the camcorder entirely inaccessible.
https://bugzilla.redhat.com/show_bug.cgi?id=633260

Fix this by allowing any Canon device, even if it is a pre-1394a IRM
like MV5i are, to remain root node (if it is at least Cycle Master
capable).  With the FireWire controller cards that I tested, MV5i always
becomes root node when plugged in and left to its own devices.

Reported-by: Ralf Lange
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: <stable@kernel.org> # 2.6.32.y and newer
2011-01-21 00:27:46 +01:00
Clemens Ladisch
1427130425 firewire: ohci: fix compilation on arches without PAGE_KERNEL_RO
PAGE_KERNEL_RO is not available on all architectures, so its use
in the new AR code broke compilation on sparc64.

Because the read-only mapping was just a debugging aid, just use
PAGE_KERNEL instead.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>

James Bottomley wrote:
> On Thu, 2011-01-13 at 08:27 +0100, Clemens Ladisch wrote:
>> firewire: ohci: fix compilation on arches without PAGE_KERNEL_RO, e.g. sparc
>>
>> PAGE_KERNEL_RO is not available on all architectures, so its use in the
>> new AR code broke compilation on sparc64.
>>
>> Because the R/O mapping is only used to catch drivers that try to write
>> to the reception buffer and not actually required for correct operation,
>> we can just use a normal PAGE_KERNEL mapping where _RO is not available.
[...]
>> +/*
>> + * For archs where PAGE_KERNEL_RO is not supported;
>> + * mapping the AR buffers readonly for the CPU is just a debugging aid.
>> + */
>> +#ifndef PAGE_KERNEL_RO
>> +#define PAGE_KERNEL_RO PAGE_KERNEL
>> +#endif
>
> This might cause interesting issues on sparc64 if it ever acquired a
> PAGE_KERNEL_RO.  Sparc64 has extern pgprot_t for it's PAGE_KERNEL types
> rather than #defines, so the #ifdef check wouldn't see this.
>
> I think either PAGE_PROT_RO becomes part of our arch API (so all
> architectures are forced to add it), or, if it's not part of the API,
> ohci isn't entitled to use it.  The latter seems simplest since you have
> no real use for write protection anyway.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-01-13 15:48:29 +01:00
Clemens Ladisch
410cf2bd3d firewire: use split transaction timeout only for split transactions
Instead of starting the split transaction timeout timer when any request
is submitted, start it only when the destination's ACK_PENDING has been
received.  This prevents us from using a timeout that is too short, and,
if the controller's AT queue is emptying very slowly, from cancelling
a packet that has not yet been sent.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-01-04 08:48:34 +01:00
Stefan Richter
693a50b511 firewire: ohci: consolidate context status flags
"firewire: ohci: restart iso DMA contexts on resume from low power mode"
added the flag struct context.active and "firewire: ohci: cache the
context run bit" added struct context.running.

These flags contain the same information; combine them.
Also, normalize whitespace in pci_resume().

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-01-04 08:48:33 +01:00
Clemens Ladisch
386a4153a2 firewire: ohci: cache the context run bit
The DMA context run control bit is entirely controlled by software, so
it is safe to cache it.  This allows the driver to avoid doing an
additional MMIO read when queueing an AT packet.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-01-04 08:48:33 +01:00
Stefan Richter
78dec56d6a firewire: ohci: flush AT contexts after bus reset - addendum
Add comments
  - on why bus_reset_tasklet flushes AT queues,
  - that commit 76f73ca1b2 can possibly be reverted now.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Jarod Wilson <jarod@redhat.com>
2011-01-04 08:48:33 +01:00
Clemens Ladisch
82b662dc41 firewire: ohci: flush AT contexts after bus reset for OHCI 1.2
The OHCI 1.2 (draft) specification, clause 7.2.3.3, allows and
recommends that, after a bus reset, the controller does not flush all
the packets in the AT queues.  Therefore, the driver has to do this
itself.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-01-03 22:34:48 +01:00
Stefan Richter
c16714704b firewire: net: set carrier state at ifup
At ifup, carrier status would be shown on even if it actually was off.
Also add an include for ethtool_ops rather than to rely on the one from
netdevice.h.

Note, we can alas not use fwnet_device_mutex to serialize access to
dev->peer_count (as I originally wanted).  This would cause a lock
inversion:
  - fwnet_probe | takes fwnet_device_mutex
      + register_netdev | takes rtnl_mutex
  - devinet_ioctl | takes rtnl_mutex
      + fwnet_open | ...must not take fwnet_device_mutex

Hence use the dev->lock spinlock for serialization.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-19 15:27:02 +01:00
Maxim Levitsky
18bb36f9fa firewire: net: add carrier detection
To make userland, e.g. NetworkManager work with firewire, we need to
detect whether cable is plugged or not.  Simple and correct way of doing
that is just counting number of peers.  No peers - no link and vice
versa.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-19 15:27:01 +01:00
Maxim Levitsky
c4d6fd40df firewire: net: ratelimit error messages
Unfortunately its easy to trigger such error messages by removing the
cable while sending streams of data over the link.

Such errors are normal, and therefore this patch stops firewire-net from
flooding the kernel log with these errors, by combining series of same
errors together.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>

(Stefan R:)  Eventually we should remove this logging when firewire-net
and related firewire-ohci facilities have been stabilized.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:15 +01:00
Maxim Levitsky
dd23736e09 firewire: ohci: restart iso DMA contexts on resume from low power mode
Restore iso channels DMA so that iso channels could continue to work
after resume from RAM/disk.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:15 +01:00
Maxim Levitsky
8662b6b029 firewire: ohci: restore GUID on resume.
Some lousy BIOSes, e.g. my Aspire 5720 BIOS forget to restore the GUID
register on resume from RAM.

Fix that by setting it to the last value that was read from it.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:15 +01:00
Clemens Ladisch
ec766a7970 firewire: ohci: use common buffer for self IDs and AR descriptors
The buffers used for the selfIDs packets and the AR request and response
descriptors end up using three pages because dma_alloc_coherent()
allocates at least one page per call.  However, these data structures
would all fit into 4 KB, so we can save space by using a common buffer
for them.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:15 +01:00
Clemens Ladisch
2dd5bed593 firewire: ohci: optimize iso context checks in the interrupt handler
When the isochRx/isochTx bit is clear, we do not need to read the
corresponding iso interrupt event register.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:14 +01:00
Clemens Ladisch
5b06db166c firewire: make PHY packet header format consistent
Change the header of PHY packets to be sent to include a pseudo
transaction code.  This makes the header consistent with that of
received PHY packets, and allows at_context_queue_packet() and
log_ar_at_event() to see the packet type directly instead of having
to deduce it from the header length or even from the header contents.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:14 +01:00
Clemens Ladisch
8327b37b18 firewire: ohci: properly clear posted write errors
To remove the error information from the controller's queue and to allow
more posted writes, the driver has to read the failed posted write
address before clearing the postedWriteErr interrupt bit.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>

(Stefan R:) The spec is somewhat fuzzy about the actual requirements.
To err on the safe side, let's do these two read accesses.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:14 +01:00
Clemens Ladisch
e597e9898a firewire: ohci: flush MMIO writes in the interrupt handler
Make sure that interrupt event clear bit writes are executed before the
interrupt handler returns.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:14 +01:00
Clemens Ladisch
c088ab30eb firewire: ohci: fix AT context initialization error handling
Add proper error handling for the context_init() calls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:13 +01:00
Clemens Ladisch
7a39d8b821 firewire: ohci: Asynchronous Reception rewrite
Move the AR DMA descriptors out of the buffer pages, and map the buffer
pages linearly into the kernel's address space.  This allows the driver
to ignore any page boundaries in the DMA data and thus to avoid any
copying around of packet payloads.

This fixes the bug where S800 packets that are so big (> 4080 bytes)
that they can be split over three pages were not handled correctly.

Due to the changed algorithm, we can now use arbitrarily many buffer
pages, which improves performance because the controller can more easily
unload its DMA FIFO.

Furthermore, using streaming DMA mappings should improve perfomance on
architectures where coherent DMA mappings are not cacheable.  Even on
other architectures, the caching behaviour should be improved slightly
because the CPU no longer writes to the buffer pages.

v2: Detect the last filled buffer page by searching the descriptor's
    residual count value fields in order (like in the old code), instead
    of going backwards through the transfer status fields; it looks as
    if some controllers do not set the latter correctly.

v3: Fix an old resume bug that would now make the handler run into
    a BUG_ON, and replace that check with more useful error handling.
    Increase the buffer size for better performance with non-TI chips.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>

Maxim Levitsky writes:
    Works almost perfectly.  I can still see RCODE_BUSY errors
    sometimes, not very often though.  64K here eliminates these errors
    completely.  This is most likely due to nouveau drivers and lowest
    perf level I use to lower card temperature.  That increases
    latencies too much I think.  Besides that the IO is just perfect.

Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-13 20:39:13 +01:00
Joe Perches
5878730be4 firewire: core: Update WARN uses
Add missing newlines.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-12 15:47:03 +01:00
Stefan Richter
60a74a6ff8 firewire: nosy: char device is not seekable
Amend .open handler accordingly and remove the .llseek handler.
.llseek = NULL means no_llseek (return error) since commit 776c163b1b.

The only client that uses this interface is nosy-dump in linux/tools/firewire
and it knows not to seek in this char dev.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-12-12 15:47:02 +01:00
Stefan Richter
9993e0fe0f firewire: ohci: fix regression with Agere FW643 rev 06, disable MSI
Agere FW643 rev 06, listed as "11c1:5901 (rev 06) (prog-if 10 [OHCI])",
produced SBP-2 I/O errors since kernel 2.6.36.  Disabling MSI fixes it.

Since MSI work on Agere FW643-E (same vendor and device ID, but rev 07),
introduce a device revision field into firewire-ohci's quirks list so
that different quirks can be defined for older and newer revisions.

Reported-by: Jonathan Isom <jeisom@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: <stable@kernel.org> # 2.6.36.y
2010-12-12 15:47:02 +01:00
Stefan Richter
af0cdf4947 firewire: ohci: fix regression with VIA VT6315, disable MSI
"VIA Technologies, Inc. VT6315 Series Firewire Controller [1106:3403]"
does not generate any interrupts if Message Signaled Interrupts were
enabled.  This is a regression since kernel 2.6.36 in which MSI support
was added to firewire-ohci.  Hence blacklist MSI on all VIA controllers.

Reported-by: Robin Cook <rcook@wyrms.net>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: <stable@kernel.org> # 2.6.36.y
2010-12-12 15:47:02 +01:00
Linus Torvalds
cf7d7e5a19 Linux 2.6.37-rc5 2010-12-06 20:09:04 -08:00
Linus Torvalds
086b17046c 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:
  ocfs2_connection_find() returns pointer to bad structure
  ocfs2: char is not always signed
  Ocfs2: Stop tracking a negative dentry after dentry_iput().
  ocfs2: fix memory leak
  fs/ocfs2/dlm: Use GFP_ATOMIC under spin_lock
2010-12-06 20:08:25 -08:00
Olof Johansson
da8f2e2461 ARM: tegra: fix regression from addruart rewrite
Commit 0ea1293009 ("arm: return both physical and virtual addresses
from addruart") took out the test for MMU on/off but didn't switch the
ldr instructions to no longer be conditionals based on said test.

Fix that.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-06 20:07:57 -08:00
Linus Torvalds
7787d2c2f4 Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / Hibernate: Fix memory corruption related to swap
  PM / Hibernate: Use async I/O when reading compressed hibernation image
2010-12-06 15:51:14 -08:00
Rafael J. Wysocki
c9e664f1fd PM / Hibernate: Fix memory corruption related to swap
There is a problem that swap pages allocated before the creation of
a hibernation image can be released and used for storing the contents
of different memory pages while the image is being saved.  Since the
kernel stored in the image doesn't know of that, it causes memory
corruption to occur after resume from hibernation, especially on
systems with relatively small RAM that need to swap often.

This issue can be addressed by keeping the GFP_IOFS bits clear
in gfp_allowed_mask during the entire hibernation, including the
saving of the image, until the system is finally turned off or
the hibernation is aborted.  Unfortunately, for this purpose
it's necessary to rework the way in which the hibernate and
suspend code manipulates gfp_allowed_mask.

This change is based on an earlier patch from Hugh Dickins.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: stable@kernel.org
2010-12-06 23:52:08 +01:00
Linus Torvalds
60658f8a29 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6524/1: GIC irq desciptor bug fix
  ARM: 6523/1: iop: ensure sched_clock() is notrace
  ARM: 6456/1: Fix for building DEBUG with sa11xx_base.c as a module.
  ARM: 6519/1: kuser: Fix incorrect cmpxchg syscall in kuser helpers
  ARM: 6505/1: kprobes: Don't HAVE_KPROBES when CONFIG_THUMB2_KERNEL is selected
  ARM: 6508/1: vexpress: Correct data alignment in headsmp.S for CONFIG_THUMB2_KERNEL
  ARM: 6507/1: RealView: Correct data alignment in headsmp.S for CONFIG_THUMB2_KERNEL
  ARM: 6504/1: Thumb-2: Fix long-distance conditional branches in head.S for Thumb-2.
  ARM: 6503/1: Thumb-2: Restore sensible zImage header layout for CONFIG_THUMB2_KERNEL
  ARM: 6502/1: Thumb-2: Fix CONFIG_THUMB2_KERNEL breakage in compressed/head.S
  ARM: 6501/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in mm/proc-v7.S
  ARM: 6500/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in kernel/head.S
  ARM: 6499/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in bootp/init.S
  ARM: 6498/1: vfp: Correct data alignment for CONFIG_THUMB2_KERNEL
  ARM: 6497/1: kexec: Correct data alignment for CONFIG_THUMB2_KERNEL
  ARM: 6496/1: GIC: Do not try to register more then NR_IRQS interrupts
  ARM: cns3xxx: Fix build with CONFIG_PCI=y
2010-12-06 14:49:51 -08:00
Bojan Smojver
9f339caf84 PM / Hibernate: Use async I/O when reading compressed hibernation image
This is a fix for reading LZO compressed image using async I/O.
Essentially, instead of having just one page into which we keep
reading blocks from swap, we allocate enough of them to cover the
largest compressed size and then let block I/O pick them all up. Once
we have them all (and here we wait), we decompress them, as usual.
Obviously, the very first block we still pick up synchronously,
because we need to know the size of the lot before we pick up the
rest.

Also fixed the copyright line, which I've forgotten before.

Signed-off-by: Bojan Smojver <bojan@rexursive.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2010-12-06 23:38:29 +01:00
Russell King
f444a57ca1 Merge branch 'for-rmk-fixes' of git://git.infradead.org/users/cbou/linux-cns3xxx 2010-12-06 15:39:23 +00:00
Chao Xie
87507500b7 ARM: 6524/1: GIC irq desciptor bug fix
gic_set_cpu will directly use irq_desc[]. If CONFIG_SPARSE_IRQ is
enabled, there is no irq_desc[]. So we need use irq_to_desc(irq) to
get the descriptor for irq.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-06 11:03:31 +00:00
Linus Torvalds
771f8bc71c Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slub: Fix a crash during slabinfo -v
2010-12-05 16:45:02 -08:00
Linus Torvalds
31c67c7553 Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  initramfs: Really fix build break on symbol-prefixed archs
  [media] Fix Kconfig errors due to two visible menus
  i2c/algos: convert Kconfig to use the menu's `visible' keyword
  media/video: convert Kconfig to use the menu's `visible' keyword
  Revert "i2c: Fix Kconfig dependencies"
  kconfig: regen parser
  kconfig: add an option to determine a menu's visibility
2010-12-05 16:41:13 -08:00
Linus Torvalds
47ad504c56 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  parisc: Fix GSC PS/2 driver name for keyboard and mouse
  parisc: KittyHawk LCD fix
  parisc: convert the rest of the irq handlers to simple/percpu
  parisc: fix dino/gsc interrupts
  parisc: remove redundant initialization in sigsegv path of sys_rt_sigreturn
2010-12-05 16:40:31 -08:00
Eric W. Biederman
7b2a69ba70 Revert "vfs: show unreachable paths in getcwd and proc"
Because it caused a chroot ttyname regression in 2.6.36.

As of 2.6.36 ttyname does not work in a chroot.  It has already been
reported that screen breaks, and for me this breaks an automated
distribution testsuite, that I need to preserve the ability to run the
existing binaries on for several more years.  glibc 2.11.3 which has a
fix for this is not an option.

The root cause of this breakage is:

    commit 8df9d1a414
    Author: Miklos Szeredi <mszeredi@suse.cz>
    Date:   Tue Aug 10 11:41:41 2010 +0200

    vfs: show unreachable paths in getcwd and proc

    Prepend "(unreachable)" to path strings if the path is not reachable
    from the current root.

    Two places updated are
     - the return string from getcwd()
     - and symlinks under /proc/$PID.

    Other uses of d_path() are left unchanged (we know that some old
    software crashes if /proc/mounts is changed).

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

So remove the nice sounding, but ultimately ill advised change to how
/proc/fd symlinks work.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-05 16:39:45 -08:00
Guy Martin
7bfbeae9c7 parisc: Fix GSC PS/2 driver name for keyboard and mouse
Fix kernel warnings caused by the driver name of GSC PS/2 containing '/'.

The following warnings are observed on a K410 system :

[   10.700000] name 'GSC PS/2 keyboard'
[   10.732000] ------------[ cut here ]------------
[   10.772000] WARNING: at fs/proc/generic.c:323
[   10.828000] Modules linked in:
[   10.916000]
[   10.916000]      YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
[   10.936000] PSW: 00000000000001000000000000001111 Not tainted
[   10.992000] r00-03  0004000f 104fe3e0 10201ea0 00000000
[   11.060000] r04-07  4fc405c8 00000006 4fc405c8 4fc40694
[   11.124000] r08-11  4fc40708 10438aa0 00000001 1043bfc8
[   11.184000] r12-15  104ff2a0 104ff2a0 4fc38634 104ff2a0
[   11.248000] r16-19  f0001570 10479af0 f000006c 1044fe50
[   11.308000] r20-23  00000000 00000028 104cd858 00000000
[   11.372000] r24-27  ffffffff 0000000e 1044fe10 1043bbe0
[   11.436000] r28-31  0000002b 00000078 4fc40800 0000000d
[   11.496000] sr00-03  00000000 00000000 00000000 00000000
[   11.560000] sr04-07  00000000 00000000 00000000 00000000
[   11.624000]
[   11.688000] IASQ: 00000000 00000000 IAOQ: 10201ea0 10201ea4
[   11.704000]  IIR: 03ffe01f    ISR: 00000000  IOR: 0000000d
[   11.772000]  CPU:        0   CR30: 4fc40000 CR31: f01043b0
[   11.836000]  ORIG_R28: 4fc40940
[   11.904000]  IAOQ[0]: __xlate_proc_name+0x90/0xd0
[   11.940000]  IAOQ[1]: __xlate_proc_name+0x94/0xd0
[   11.996000]  RP(r2): __xlate_proc_name+0x90/0xd0
[   12.052000] Backtrace:
[   12.108000]  [<10257790>] vsnprintf+0x290/0x4f4
[   12.136000]
[   12.188000] ---[ end trace 91bf6ece17e322dd ]---
[   12.208000] serio: GSC PS/2 keyboard port at 0x0001c000 irq 19 @ 10:12:7
[   12.264000] name 'GSC PS/2 mouse'
[   12.344000] ------------[ cut here ]------------
[   12.384000] WARNING: at fs/proc/generic.c:323
[   12.436000] Modules linked in:
[   12.524000]
[   12.528000]      YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
[   12.544000] PSW: 00000000000001000000000000001111 Tainted: G        W
[   12.600000] r00-03  0004000f 104fe3e0 10201ea0 00000000
[   12.680000] r04-07  4fc405c8 00000006 4fc405c8 4fc40694
[   12.740000] r08-11  4fc40708 10438aa0 00000001 1043bfc8
[   12.804000] r12-15  104ff2a0 104ff2a0 4fc38634 104ff2a0
[   12.868000] r16-19  f0001570 10479af0 f000006c 1044fe50
[   12.928000] r20-23  00000000 00000025 104cd858 00000000
[   12.992000] r24-27  ffffffff 0000000e 1044fe10 1043bbe0
[   13.056000] r28-31  00000028 00000078 4fc40800 0000000d
[   13.116000] sr00-03  00000000 00000000 00000000 00000000
[   13.180000] sr04-07  00000000 00000000 00000000 00000000
[   13.244000]
[   13.308000] IASQ: 00000000 00000000 IAOQ: 10201ea0 10201ea4
[   13.324000]  IIR: 03ffe01f    ISR: 00000000  IOR: 0000000d
[   13.392000]  CPU:        0   CR30: 4fc40000 CR31: f01043b0
[   13.456000]  ORIG_R28: 4fc40940
[   13.524000]  IAOQ[0]: __xlate_proc_name+0x90/0xd0
[   13.560000]  IAOQ[1]: __xlate_proc_name+0x94/0xd0
[   13.616000]  RP(r2): __xlate_proc_name+0x90/0xd0
[   13.672000] Backtrace:
[   13.728000]  [<10257790>] vsnprintf+0x290/0x4f4
[   13.756000]
[   13.808000] ---[ end trace 91bf6ece17e322de ]---
[   13.828000] serio: GSC PS/2 mouse port at 0x00020100 irq 19 @ 10:12:8

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2010-12-04 11:19:59 -05:00
Guy Martin
79a0429623 parisc: KittyHawk LCD fix
K class aka KittyHawk don't have LED support on their LCD. Installing
HP-UX confirmed this. The current led_wq fills the LCD with black
characters each time it runs.

The patch prevents the led_wq workqueue and its proc entry to be
created for KittyHawk machines.

It also increase min_cmd_delay as currently, one character out of two
is lost when a string is sent to the LCD.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Signed-off-by: Kyle McMartin <kyle@mcmartin.c>
2010-12-04 11:18:25 -05:00
James Bottomley
51890613f2 parisc: convert the rest of the irq handlers to simple/percpu
The generic conversion eliminates the spurious no_ack and no_end
routines, converts all the cascaded handlers to handle_simple_irq() and
makes iosapic use a modified handle_percpu_irq() to become the same as
the CPU irq's.  This isn't an essential change, but it eliminates the
mask/unmask overhead of handle_level_irq().

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2010-12-04 11:15:19 -05:00
James Bottomley
d16cd297d2 parisc: fix dino/gsc interrupts
The essential problem we're currently having is that dino (and gsc) is a
cascaded CPU interrupt.  Under the old __do_IRQ() handler, our CPU
interrupts basically did an ack followed by an end.  In the new scheme,
we replaced them with level handlers which do a mask, an ack and then an
unmask (but no end).  Instead, with the renaming of end to eoi, we
actually want to call the percpu flow handlers, because they actually
have all the characteristics we want.

This patch does the conversion and gets my C360 booting again.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2010-12-04 11:14:32 -05:00
Rabin Vincent
a5542a0f9a ARM: 6523/1: iop: ensure sched_clock() is notrace
Include sched.h to ensure sched_clock() has the notrace
annotation, and mark any functions it calls as notrace
too.
Include sched.h to ensure sched_clock() has the notrace
annotation, and mark any functions it calls as notrace
too.

Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-04 13:36:29 +00:00
Marcelo Roberto Jimenez
b9f515e3e3 ARM: 6456/1: Fix for building DEBUG with sa11xx_base.c as a module.
This patch fixes a compilation issue when compiling PCMCIA SA1100
support as a module with PCMCIA_DEBUG enabled. The symbol
soc_pcmcia_debug was not beeing exported.
ARM: pcmcia: Fix for building DEBUG with sa11xx_base.c as a module.

This patch fixes a compilation issue when compiling PCMCIA SA1100
support as a module with PCMCIA_DEBUG enabled. The symbol
soc_pcmcia_debug was not beeing exported.

Cc: <stable@kernel.org>
Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-04 12:47:48 +00:00
Dave Martin
55afd264cd ARM: 6519/1: kuser: Fix incorrect cmpxchg syscall in kuser helpers
The existing code invokes the syscall with rubbish in r7,
due to what looks like an incorrect literal load idiom.

Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-04 11:01:12 +00:00