safe/jmp/linux-2.6
15 years agopowerpc/fsl_pci: Fix sparse warnings
Anton Vorontsov [Mon, 29 Dec 2008 16:40:32 +0000 (19:40 +0300)]
powerpc/fsl_pci: Fix sparse warnings

This patch fixes following sparse warnings:

  CHECK   fsl_pci.c
fsl_pci.c:32:13: warning: symbol 'setup_pci_atmu' was not declared. Should it be static?
fsl_pci.c:89:13: warning: symbol 'setup_pci_cmd' was not declared. Should it be static?
fsl_pci.c:133:12: warning: symbol 'fsl_pcie_check_link' was not declared. Should it be static?

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc/83xx: Add USB Host support for MPC8360E-RDK boards
Anton Vorontsov [Thu, 18 Dec 2008 16:37:34 +0000 (19:37 +0300)]
powerpc/83xx: Add USB Host support for MPC8360E-RDK boards

Simply add the usb node to support USB host on the MPC8360E-RDK
boards.

Currently U-Boot doesn't fill the clock-frequency property for
timer nodes, so for now we have to fill it manually.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc/83xx: Add USB Host/Gadget support for MPC8360E-MDS boards
Anton Vorontsov [Thu, 18 Dec 2008 16:37:31 +0000 (19:37 +0300)]
powerpc/83xx: Add USB Host/Gadget support for MPC8360E-MDS boards

- Update the device tree per QE USB bindings;
- Add timer (FSL GTM) node;
- Add gpio-controller node for BCSR13 bank (GPIOs on that bank
  are used to control the USB transceiver);
- Set up other BCSR registers;
- Configure the QE Par IO.

The work is loosely based on Li Yang's patch[1], which was used
to support peripheral mode only.

[1] http://ozlabs.org/pipermail/linuxppc-dev/2008-August/061357.html

The s-o-b line of the original patch preserved here.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc: Implement GPIO driver for simple memory-mapped banks
Anton Vorontsov [Thu, 18 Dec 2008 16:37:26 +0000 (19:37 +0300)]
powerpc: Implement GPIO driver for simple memory-mapped banks

The driver supports very simple GPIO controllers, that is, when a
controller provides just a 'data' register. Such controllers may be
found in various BCSRs (Board's FPGAs used to control board's
switches, LEDs, chip-selects, Ethernet/USB PHY power, etc).

So far we support only 1-byte GPIO banks. Support for other widths may
be implemented when/if needed.

p.s.
To avoid "made up" compatible entries (like compatible = "simple-gpio"),
boards must call simple_gpiochip_init() to pass the compatible string.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc: Add device tree bindings for BCSR GPIO banks
Anton Vorontsov [Thu, 18 Dec 2008 16:37:23 +0000 (19:37 +0300)]
powerpc: Add device tree bindings for BCSR GPIO banks

The patch adds bindings for BCSR GPIO banks, the bindings are used to
describe particular BCSR registers that act as simple GPIO controllers.
These GPIO banks might control power switches, SPI chip-selects, LEDs,
etc.

While at it, also fix "length" spelling error in the PIXIS FPGA
bindings.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc/qe: Implement QE Pin Multiplexing API
Anton Vorontsov [Wed, 3 Dec 2008 19:27:38 +0000 (22:27 +0300)]
powerpc/qe: Implement QE Pin Multiplexing API

With this API we're able to set a QE pin to the GPIO mode or a dedicated
peripheral function.

The API relies on the fact that QE gpio controllers are registered. If
they aren't, the API won't work (gracefully though).

There is one caveat though: if anybody occupied the node->data before us,
or overwrote it, then bad things will happen. Luckily this is all in the
platform code that we fully control, so this should never happen.

I could implement more checks (for example we could create a list of
successfully registered QE controllers, and compare the node->data in the
qe_pin_request()), but this is unneeded if nobody is going to do silly
things behind our back.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc/83xx: Fix sparse warnings in mpc836x_mds.c
Anton Vorontsov [Wed, 3 Dec 2008 19:27:52 +0000 (22:27 +0300)]
powerpc/83xx: Fix sparse warnings in mpc836x_mds.c

This patch fixes following sparse warnings:

  CHECK   mpc836x_mds.c
mpc836x_mds.c:75:12: warning: Using plain integer as NULL pointer
mpc836x_mds.c:79:13: warning: incorrect type in assignment (different address spaces)
mpc836x_mds.c:79:13:    expected unsigned char [usertype] *static [toplevel] bcsr_regs
mpc836x_mds.c:79:13:    got void [noderef] <asn:2>*
mpc836x_mds.c:105:3: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:105:3:    expected unsigned char volatile [noderef] [usertype] <asn:2>*addr
mpc836x_mds.c:105:3:    got unsigned char [usertype] *
mpc836x_mds.c:105:3: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:105:3:    expected unsigned char const volatile [noderef] [usertype] <asn:2>*addr
mpc836x_mds.c:105:3:    got unsigned char [usertype] *
mpc836x_mds.c:107:3: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:107:3:    expected unsigned char volatile [noderef] [usertype] <asn:2>*addr
mpc836x_mds.c:107:3:    got unsigned char [usertype] *
mpc836x_mds.c:107:3: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:107:3:    expected unsigned char const volatile [noderef] [usertype] <asn:2>*addr
mpc836x_mds.c:107:3:    got unsigned char [usertype] *
mpc836x_mds.c:131:11: warning: incorrect type in argument 1 (different address spaces)
mpc836x_mds.c:131:11:    expected void volatile [noderef] <asn:2>*addr
mpc836x_mds.c:131:11:    got unsigned char [usertype] *static [toplevel] bcsr_regs

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc/83xx: Fix sparse warnings in board files
Anton Vorontsov [Fri, 5 Dec 2008 15:48:07 +0000 (18:48 +0300)]
powerpc/83xx: Fix sparse warnings in board files

This patch fixes following sparse warnings:

  CHECK   83xx/usb.c
83xx/usb.c:205:5: warning: symbol 'mpc837x_usb_cfg' was not declared. Should it be static?
  CHECK   83xx/mpc831x_rdb.c
83xx/mpc831x_rdb.c:45:13: warning: symbol 'mpc831x_rdb_init_IRQ' was not declared. Should it be static?
  CHECK   83xx/mpc832x_rdb.c
83xx/mpc832x_rdb.c:133:13: warning: symbol 'mpc832x_rdb_init_IRQ' was not declared. Should it be static?
  CHECK   83xx/mpc832x_mds.c
83xx/mpc832x_mds.c:68:12: warning: Using plain integer as NULL pointer
83xx/mpc832x_mds.c:72:13: warning: incorrect type in assignment (different address spaces)
83xx/mpc832x_mds.c:72:13:    expected unsigned char [usertype] *static [toplevel] bcsr_regs
83xx/mpc832x_mds.c:72:13:    got void [noderef] <asn:2>*
83xx/mpc832x_mds.c:99:11: warning: incorrect type in argument 1 (different address spaces)
83xx/mpc832x_mds.c:99:11:    expected void volatile [noderef] <asn:2>*addr
83xx/mpc832x_mds.c:99:11:    got unsigned char [usertype] *static [toplevel] bcsr_regs

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc: Implement get_brgfreq() and get_baudrate() stubs
Anton Vorontsov [Fri, 5 Dec 2008 20:10:26 +0000 (23:10 +0300)]
powerpc: Implement get_brgfreq() and get_baudrate() stubs

This is needed to not bother with ugly #ifdefs in the drivers.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc/44x: Support 16K/64K base page sizes on 44x
Ilya Yanok [Thu, 11 Dec 2008 01:55:41 +0000 (04:55 +0300)]
powerpc/44x: Support 16K/64K base page sizes on 44x

This adds support for 16k and 64k page sizes on PowerPC 44x processors.

The PGDIR table is much smaller than a page when using 16k or 64k
pages (512 and 32 bytes respectively) so we allocate the PGDIR with
kzalloc() instead of __get_free_pages().

One PTE table covers rather a large memory area when using 16k or 64k
pages (32MB or 512MB respectively), so we can easily put FIXMAP and
PKMAP in the area covered by one PTE table.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Vladimir Panfilov <pvr@emcraft.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Force memory size to be a multiple of PAGE_SIZE
Hollis Blanchard [Wed, 26 Nov 2008 16:19:26 +0000 (10:19 -0600)]
powerpc: Force memory size to be a multiple of PAGE_SIZE

Ensure that total memory size is page-aligned, because otherwise
mark_bootmem() gets upset.

This error case was triggered by using 64 KiB pages in the kernel
while arch/powerpc/boot/4xx.c arbitrarily reduced the amount of memory
by 4096 (to work around a chip bug that affects the last 256 bytes of
physical memory).

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/32: Wire up the trampoline code for kdump
Dale Farnsworth [Wed, 17 Dec 2008 10:09:26 +0000 (10:09 +0000)]
powerpc/32: Wire up the trampoline code for kdump

Wire up the trampoline code for ppc32 to relay exceptions from the
vectors at address 0 to vectors at address 32MB, and modify Kconfig
to enable Kdump support for all classic powerpcs.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/32: Add the ability for a classic ppc kernel to be loaded at 32M
Dale Farnsworth [Wed, 17 Dec 2008 10:09:13 +0000 (10:09 +0000)]
powerpc/32: Add the ability for a classic ppc kernel to be loaded at 32M

Add the ability for a classic ppc kernel to be loaded at an address
of 32MB.  This done by fixing a few places that assume we are loaded
at address 0, and by changing several uses of KERNELBASE to use
PAGE_OFFSET, instead.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/32: Allow __ioremap on RAM addresses for kdump kernel
Anton Vorontsov [Wed, 17 Dec 2008 10:09:10 +0000 (10:09 +0000)]
powerpc/32: Allow __ioremap on RAM addresses for kdump kernel

While for debugging it is good to catch bogus users of ioremap, though
for kdump support it is more convenient to use __ioremap for
copy_oldmem_page() (exactly as we do for PPC64 currently).

Note that copy_oldmem_page() calls __ioremap with flags set to '0',
so it should be safe with the regard to the caches.

The other option is to use kmap_atomic_pfn()[1], but it will not work
for kernels compiled without HIGHMEM.

That is, on a board with 256MB RAM and crashkernel=64M@32M case, the
!HIGHMEM capturing kernel maps 0-96M range, which does not include all
the memory needed to capture the dump. And, obviously, accessing
anything upper than 96M will cause faults.

[1] http://ozlabs.org/pipermail/linuxppc-dev/2007-November/046747.html

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/32: Setup OF properties for kdump
Dale Farnsworth [Wed, 17 Dec 2008 10:09:06 +0000 (10:09 +0000)]
powerpc/32: Setup OF properties for kdump

Refactor the setting of kdump OF properties, moving the common code
from machine_kexec_64.c to machine_kexec.c where it can be used on
both ppc64 and ppc32.  This will be needed for kdump to work on ppc32
platforms.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/32/kdump: Implement crash_setup_regs() using ppc_save_regs()
Anton Vorontsov [Wed, 17 Dec 2008 10:09:01 +0000 (10:09 +0000)]
powerpc/32/kdump: Implement crash_setup_regs() using ppc_save_regs()

This replaces the dummy crash_setup_regs function with full-fledged
crash_setup_regs implementation.  On PPC32 we simply use the new
ppc_save_regs function to dump the registers.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Prepare xmon_save_regs for use with kdump
Anton Vorontsov [Wed, 17 Dec 2008 10:08:55 +0000 (10:08 +0000)]
powerpc: Prepare xmon_save_regs for use with kdump

Today the arch/powerpc/xmon/setjmp.S file contains only the
xmon_save_regs function.  We want to use it for kdump purposes, so
let's move the file into arch/powerpc/kernel/ and give the function a
more generic name (ppc_save_regs).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Remove default kexec/crash_kernel ops assignments
Anton Vorontsov [Tue, 16 Dec 2008 06:23:08 +0000 (06:23 +0000)]
powerpc: Remove default kexec/crash_kernel ops assignments

Default ops are implicit now.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Make default kexec/crash_kernel ops implicit
Anton Vorontsov [Tue, 16 Dec 2008 06:23:05 +0000 (06:23 +0000)]
powerpc: Make default kexec/crash_kernel ops implicit

This removes the need for each platform to specify default kexec and
crash kernel ops, thus effectively adds a working kexec support for
most 6xx/7xx/7xxx-based boards.

Platforms that can't cope with default ops will explode in some weird
way (a hang or reboot is most likely), which means that the board's
kexec support should be fixed or blacklisted via dummy _prepare
callback returning -ENOSYS.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Setup OF properties for ppc32 kexec
Dale Farnsworth [Tue, 16 Dec 2008 06:22:59 +0000 (06:22 +0000)]
powerpc: Setup OF properties for ppc32 kexec

Refactor the setting of kexec OF properties, moving the common code
from machine_kexec_64.c to machine_kexec.c where it can be used on
both ppc64 and ppc32.  This is needed for kexec to work on ppc32
platforms.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/pseries: Fix cpu hotplug
Sebastien Dugue [Thu, 27 Nov 2008 00:59:52 +0000 (00:59 +0000)]
powerpc/pseries: Fix cpu hotplug

Currently, pseries_cpu_die() calls msleep() while polling RTAS for
the status of the dying cpu.

However, if the cpu that is going down also happens to be the one
doing the tick then we're hosed as the tick_do_timer_cpu 'baton' is
only passed later on in tick_shutdown() when _cpu_down() does the
CPU_DEAD notification.  Therefore jiffies won't be updated anymore.

This replaces that msleep() with a cpu_relax() to make sure we're not
going to schedule at that point.

With this patch my test box survives a 100k iterations hotplug stress
test on _all_ cpus, whereas without it, it quickly dies after ~50
iterations.

Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net>
Cc: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Fix KVM build on ppc440
Paul Mackerras [Tue, 23 Dec 2008 03:57:26 +0000 (14:57 +1100)]
powerpc: Fix KVM build on ppc440

Commit 2a4aca1144394653269720ffbb5a325a77abd5fa ("powerpc/mm: Split
low level tlb invalidate for nohash processors") changed a call to
_tlbia to _tlbil_all but didn't include the header that defines
_tlbil_all, leading to a build failure on 440 if KVM is enabled.
This fixes it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/cell: add QPACE as a separate Cell platform
Benjamin Krill [Thu, 27 Nov 2008 15:15:44 +0000 (16:15 +0100)]
powerpc/cell: add QPACE as a separate Cell platform

Since the QPACE (Chromodynamics Parallel Computing on the
Cell Broadband Engine) platform doesn't use a iommu, doesn't
have PCI devices and a MPIC much lesser setup and
configurations are needed. So far all devices are detected
as OF device. A notifier function is used to set the dma_ops
for the of_platform bus. Further this patch splits the
PPC_CELL_NATIVE into PPC_CELL_COMMON which are parts that are
shared with the QPACE platform and the rest.

Signed-off-by: Benjamin Krill <ben@codiert.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 years agopowerpc/cell: fix build breakage with CONFIG_SPUFS disabled
Arnd Bergmann [Mon, 22 Dec 2008 21:08:26 +0000 (22:08 +0100)]
powerpc/cell: fix build breakage with CONFIG_SPUFS disabled

CBE_THERM and OPROFILE_CELL both cannot be built without
SPU_FS disabled, so make the dependency explicit.

Reported-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
15 years agopowerpc/mpc5200: fix error paths in PSC UART probe function
Wolfram Sang [Sun, 21 Dec 2008 09:54:32 +0000 (02:54 -0700)]
powerpc/mpc5200: fix error paths in PSC UART probe function

- error cases for mapbase and irq were unbundled
- mapped irq now gets disposed on error

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/mpc5200: add rts/cts handling in PSC UART driver
Wolfram Sang [Sun, 21 Dec 2008 09:54:32 +0000 (02:54 -0700)]
powerpc/mpc5200: add rts/cts handling in PSC UART driver

Add RTS/CTS-support for the PSC of the MPC5200B. Tested with a Phytec
MPC5200B-IO.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/mpc5200: Make PSC UART driver update serial errors counters
René Bürgel [Sun, 21 Dec 2008 09:54:31 +0000 (02:54 -0700)]
powerpc/mpc5200: Make PSC UART driver update serial errors counters

This patch adds the capability to the mpc52xx-uart to report framing
errors, parity errors, breaks and overruns to userspace. These values
may be requested in userspace by using the ioctl TIOCGICOUNT.

Signed-off-by: René Bürgel <r.buergel@unicontrol.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/mpc5200: Remove obsolete code from mpc5200 MDIO driver
Wolfram Sang [Sun, 21 Dec 2008 09:54:30 +0000 (02:54 -0700)]
powerpc/mpc5200: Remove obsolete code from mpc5200 MDIO driver

As this driver polls for a complete MDIO transaction, there is no need
to enable interrupts for it.  Furthermore, make both checks for
freeing MDIO-bus irqs consistent.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/mpc5200: Add MDMA/UDMA support to MPC5200 ATA driver
Tim Yamin [Sun, 21 Dec 2008 09:54:29 +0000 (02:54 -0700)]
powerpc/mpc5200: Add MDMA/UDMA support to MPC5200 ATA driver

This patch adds MDMA/UDMA support using BestComm for DMA on the MPC5200
platform.  Based heavily on previous work by Freescale (Bernard Kuhn,
John Rigby) and Domen Puncer.

With this patch, a SanDisk Extreme IV CF card gets read speeds of
approximately 26.70 MB/sec.

Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/mpc5200: Disable bestcomm prefetching when ATA DMA enabled
Grant Likely [Sun, 21 Dec 2008 09:54:28 +0000 (02:54 -0700)]
powerpc/mpc5200: Disable bestcomm prefetching when ATA DMA enabled

When ATA DMA is enabled, bestcomm prefetching does not work.  This
patch adds a function to disable bestcomm prefetch when the ATA
Bestcomm task is initialized.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/mpc5200: Bestcomm fixes to ATA support
Tim Yamin [Sun, 21 Dec 2008 09:54:28 +0000 (02:54 -0700)]
powerpc/mpc5200: Bestcomm fixes to ATA support

1) ata.h has dst_pa in the wrong place (needs to match what the BestComm
   task microcode in bcom_ata_task.c expects); fix it.

2) The BestComm ATA task priority was changed to maximum in bestcomm_priv.h;
   this fixes a deadlock issue experienced with heavy DMA occurring on
   both the ATA and Ethernet BestComm tasks, e.g. when downloading a large
   file over a LAN to disk.

Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/mpc5200: Bugfix on handling variable sized buffer descriptors
Grant Likely [Sun, 21 Dec 2008 09:54:27 +0000 (02:54 -0700)]
powerpc/mpc5200: Bugfix on handling variable sized buffer descriptors

The buffer descriptors for the ATA BestComm task are larger than the
current definition for bcom_bd.  This causes problems because the
various bcom_... functions dereference the buffer descriptor pointer
by using the array operator which doesn't work when the buffer
descriptors are a different size.

This patch adds the bcom_get_bd() function which uses the value in
bcom_task.bd_size to calculate the offset into the BD table.  This
patch also changes the definition of bcom_bd to specify a data size
of 0 instead of 1 so that it will never work if anyone attempts to
dereference the bd list as an array (as opposed to something that
might work even though it is wrong).

Finally, this patch moves the definition of bcom_bd up in the file
to eliminate a forward declaration.

Based on patch originally written by Tim Yamin.

Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/mpc5200: Make internal 5200 PIC the default interrupt controller
Grant Likely [Sun, 21 Dec 2008 09:54:27 +0000 (02:54 -0700)]
powerpc/mpc5200: Make internal 5200 PIC the default interrupt controller

The MPC5200 internal interrupt controller setup function needs to set
the default interrupt controller when it is called.  Without this
irq_create_of_mapping() cannot be called without first determining
the pointer to the irq controller (ie. call with controller = NULL).

Reported-by: Steven Cavanagh <scavanagh@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/mpc5200: Document and tidy irq driver
Grant Likely [Sun, 21 Dec 2008 09:54:26 +0000 (02:54 -0700)]
powerpc/mpc5200: Document and tidy irq driver

This patch adds documentation to the mpc5200 interrupt controller
driver and cleans up some minor coding conventions.  It also moves the
contents of mpc52xx_pic.h into the driver proper (except for a small
common bit that is moved to the common mpc52xx.h) because the
information encoded there is not required by any other part of kernel
code.  Finally for code readability sake, the L2_OFFSET shift value
is removed because the code using it resolves to a noop.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc: Fix missing 'blr' in _tlbia()
Benjamin Herrenschmidt [Sun, 21 Dec 2008 09:54:25 +0000 (02:54 -0700)]
powerpc: Fix missing 'blr' in _tlbia()

Rework to MMU code dropped a much missed 'blr' instruction.

Brown-Paper-Bag-Worn-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/bootwrapper: Use the child-bus #address-cells to decide which range entry...
Scott Wood [Fri, 19 Dec 2008 10:13:09 +0000 (10:13 +0000)]
powerpc/bootwrapper: Use the child-bus #address-cells to decide which range entry to use

The correct #address-cells was still used for the actual translation,
so the impact is only a possibility of choosing the wrong range entry
or failing to find any match.  Most common cases were not affected.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Const-qualify Device Node Argument to DCR Resource Extent API
Grant Erickson [Fri, 19 Dec 2008 08:17:54 +0000 (08:17 +0000)]
powerpc: Const-qualify Device Node Argument to DCR Resource Extent API

Add const qualifier to device_node argument for
dcr_resource_{start,len} as of_get_property also const-qualifies this
argument.

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/44x: 44x TLB doesn't need "Guarded" set for all pages
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:54 +0000 (19:13 +0000)]
powerpc/44x: 44x TLB doesn't need "Guarded" set for all pages

After discussing with chip designers, it appears that it's not
necessary to set G everywhere on 440 cores. The various core
errata related to prefetch should be sorted out by firmware by
disabling icache prefetching in CCR0. We add the workaround to
the kernel however just in case oooold firmwares don't do it.

This is valid for -all- 4xx core variants. Later ones hard wire
the absence of prefetch but it doesn't harm to clear the bits
in CCR0 (they should already be cleared anyway).

We still leave G=1 on the linear mapping for now, we need to
stop over-mapping RAM to be able to remove it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:51 +0000 (19:13 +0000)]
powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED

Currently, we never set _PAGE_COHERENT in the PTEs, we just OR it in
in the hash code based on some CPU feature bit.  We also manipulate
_PAGE_NO_CACHE and _PAGE_GUARDED by hand in all sorts of places.

This changes the logic so that instead, the PTE now contains
_PAGE_COHERENT for all normal RAM pages thay have I = 0 on platforms
that need it.  The hash code clears it if the feature bit is not set.

It also adds some clean accessors to setup various valid combinations
of access flags and change various bits of code to use them instead.

This should help having the PTE actually containing the bit
combinations that we really want.

I also removed _PAGE_GUARDED from _PAGE_BASE on 44x and instead
set it explicitely from the TLB miss.  I will ultimately remove it
completely as it appears that it might not be needed after all
but in the meantime, having it in the TLB miss makes things a
lot easier.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/mm: Runtime allocation of mmu context maps for nohash CPUs
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:48 +0000 (19:13 +0000)]
powerpc/mm: Runtime allocation of mmu context maps for nohash CPUs

This makes the MMU context code used for CPUs with no hash table
(except 603) dynamically allocate the various maps used to track
the state of contexts.

Only the main free map and CPU 0 stale map are allocated at boot
time.  Other CPU maps are allocated when those CPUs are brought up
and freed if they are unplugged.

This also moves the initialization of the MMU context management
slightly later during the boot process, which should be fine as
it's really only needed when userland if first started anyways.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/44x: No need to mask MSR:CE, ME or DE in _tlbil_va on 440
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:46 +0000 (19:13 +0000)]
powerpc/44x: No need to mask MSR:CE, ME or DE in _tlbil_va on 440

The handlers for Critical, Machine Check or Debug interrupts
will save and restore MMUCR nowadays, thus we only need to
disable normal interrupts when invalidating TLB entries.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/mm: Split low level tlb invalidate for nohash processors
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:42 +0000 (19:13 +0000)]
powerpc/mm: Split low level tlb invalidate for nohash processors

Currently, the various forms of low level TLB invalidations are all
implemented in misc_32.S for 32-bit processors, in a fairly scary
mess of #ifdef's and with interesting duplication such as a whole
bunch of code for FSL _tlbie and _tlbia which are no longer used.

This moves things around such that _tlbie is now defined in
hash_low_32.S and is only used by the 32-bit hash code, and all
nohash CPUs use the various _tlbil_* forms that are now moved to
a new file, tlb_nohash_low.S.

I moved all the definitions for that stuff out of
include/asm/tlbflush.h as they are really internal mm stuff, into
mm/mmu_decl.h

The code should have no functional changes.  I kept some variants
inline for trivial forms on things like 40x and 8xx.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/mm: Add SMP support to no-hash TLB handling
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:38 +0000 (19:13 +0000)]
powerpc/mm: Add SMP support to no-hash TLB handling

This commit moves the whole no-hash TLB handling out of line into a
new tlb_nohash.c file, and implements some basic SMP support using
IPIs and/or broadcast tlbivax instructions.

Note that I'm using local invalidations for D->I cache coherency.

At worst, if another processor is trying to execute the same and
has the old entry in its TLB, it will just take a fault and re-do
the TLB flush locally (it won't re-do the cache flush in any case).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/mm: Introduce MMU features
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:32 +0000 (19:13 +0000)]
powerpc/mm: Introduce MMU features

We're soon running out of CPU features and I need to add some new
ones for various MMU related bits, so this patch separates the MMU
features from the CPU features.  I moved over the 32-bit MMU related
ones, added base features for MMU type families, but didn't move
over any 64-bit only feature yet.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/mm: Rework context management for CPUs with no hash table
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:29 +0000 (19:13 +0000)]
powerpc/mm: Rework context management for CPUs with no hash table

This reworks the context management code used by 4xx,8xx and
freescale BookE.  It adds support for SMP by implementing a
concept of stale context map to lazily flush the TLB on
processors where a context may have been invalidated.  This
also contains the ground work for generalizing such lazy TLB
flushing by just picking up a new PID and marking the old one
stale.  This will be implemented later.

This is a first implementation that uses a global spinlock.

Ideally, we should try to get at least the fast path (context ID
already assigned) lockless or limited to a per context lock,
but for now this will do.

I tried to keep the UP case reasonably simple to avoid adding
too much overhead to 8xx which does a lot of context stealing
since it effectively has only 16 PIDs available.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/mm: Split mmu_context handling
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:24 +0000 (19:13 +0000)]
powerpc/mm: Split mmu_context handling

This splits the mmu_context handling between 32-bit hash based
processors, 64-bit hash based processors and everybody else.  This is
preliminary work for adding SMP support for BookE processors.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/4xx: Extended DCR support v2
Benjamin Herrenschmidt [Thu, 18 Dec 2008 19:13:22 +0000 (19:13 +0000)]
powerpc/4xx: Extended DCR support v2

This adds supports to the "extended" DCR addressing via the indirect
mfdcrx/mtdcrx instructions supported by some 4xx cores (440H6 and
later).

I enabled the feature for now only on AMCC 460 chips.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Add reboot notifier to Collaborative Memory Manager
Brian King [Thu, 18 Dec 2008 11:13:49 +0000 (11:13 +0000)]
powerpc: Add reboot notifier to Collaborative Memory Manager

When running Active Memory Sharing, pages can get marked as
"loaned" with the hypervisor by the CMM driver. This state gets
cleared by the system firmware when rebooting the partition.
When using kexec to boot a new kernel, this state never gets
cleared and the hypervisor and CMM driver can get out of sync
with respect to the number of pages currently marked "loaned".
Fix this by adding a reboot notifier to the CMM driver to deflate
the balloon and mark all pages as active.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Disable Collaborative Memory Manager for kdump
Brian King [Thu, 18 Dec 2008 11:13:46 +0000 (11:13 +0000)]
powerpc: Disable Collaborative Memory Manager for kdump

When running Active Memory Sharing, the Collaborative Memory Manager
(CMM) may mark some pages as "loaned" with the hypervisor.
Periodically, the CMM will query the hypervisor for a loan request,
which is a single signed value.  When kexec'ing into a kdump kernel,
the CMM driver in the kdump kernel is not aware of the pages the
previous kernel had marked as "loaned", so the hypervisor and the CMM
driver are out of sync.  This results in the CMM driver getting a
negative loan request, which can then get treated as a large unsigned
value and can cause kdump to hang due to the CMM driver inflating too
large.  Since there really is no clean way for the CMM driver in the
kdump kernel to clean this up, simply disable CMM in the kdump kernel.
This fixes hangs we were seeing doing kdump with AMS.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc/iseries: viodasd needs to depend on CONFIG_BLOCK
Stephen Rothwell [Tue, 16 Dec 2008 20:16:49 +0000 (20:16 +0000)]
powerpc/iseries: viodasd needs to depend on CONFIG_BLOCK

Otherwise you get lot of errors like these:

drivers/block/viodasd.c:72: error: dereferencing pointer to incomplete type
drivers/block/viodasd.c: In function 'viodasd_open':
drivers/block/viodasd.c:135: error: dereferencing pointer to incomplete type
drivers/block/viodasd.c: In function 'viodasd_release':
drivers/block/viodasd.c:184: error: dereferencing pointer to incomplete type
drivers/block/viodasd.c: In function 'viodasd_getgeo':
drivers/block/viodasd.c:209: error: dereferencing pointer to incomplete type
drivers/block/viodasd.c:214: error: implicit declaration of function 'get_capacity'
drivers/block/viodasd.c: At top level:
drivers/block/viodasd.c:222: error: variable 'viodasd_fops' has initializer but incomplete type
drivers/block/viodasd.c:223: error: unknown field 'owner' specified in initializer

Discovered by a randconfig build.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agohvc_console: Escape magic sysrq key
Hendrik Brueckner [Tue, 16 Dec 2008 00:09:38 +0000 (00:09 +0000)]
hvc_console: Escape magic sysrq key

The ctrl-o (^O) is a common control key used by several applications,
such as vim, but hvc_console uses ^O as the magic-sysrq key.  This
commit allows users to send ^O to applications by pressing ^O twice
in succession.

To implement this, this commit introduces a check if ^O is pressed
again if the sysrq_pressed variable is already set.  In this case,
clear sysrq_pressed state and flip the ^O character to the tty.  (The
old behavior has always set "sysrq_pressed" if ^O has been entered,
and it has not flipped the ^O character to the tty.)

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Pass a valid token to rtas_call() in phyp-dump code
Tony Breeds [Mon, 15 Dec 2008 18:34:43 +0000 (18:34 +0000)]
powerpc: Pass a valid token to rtas_call() in phyp-dump code

ibm_configure_kernel_dump is passed as the token to rtas_call() is
never initialised.  This sets it to something sane.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Acked-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Manish Ahuja <mahujam@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Protect against NULL pointer deref in phyp-dump code
Tony Breeds [Mon, 15 Dec 2008 18:17:48 +0000 (18:17 +0000)]
powerpc: Protect against NULL pointer deref in phyp-dump code

print_dump_header() will be called at least once with a NULL pointer in
a normal boot sequence.  If DEBUG is defined then we will dereference
the pointer and crash.  Add a quick fix to exit early in the NULL pointer
case.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Acked-by: Manish Ahuja <mahujam@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Rename struct vm_region to avoid conflict with NOMMU
David Howells [Thu, 11 Dec 2008 02:53:54 +0000 (02:53 +0000)]
powerpc: Rename struct vm_region to avoid conflict with NOMMU

Rename PowerPC's struct vm_region so that I can introduce my own
global version for NOMMU.  It's feasible that the PowerPC version may
wish to use my global one instead.

The NOMMU vm_region struct defines areas of the physical memory map
that are under mmap.  This may include chunks of RAM or regions of
memory mapped devices, such as flash.  It is also used to retain
copies of file content so that shareable private memory mappings of
files can be made.  As such, it may be compatible with what is
described in the banner comment for PowerPC's vm_region struct.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Convert sysfs cache code to of_find_next_cache_node()
Nathan Lynch [Wed, 10 Dec 2008 14:46:06 +0000 (14:46 +0000)]
powerpc: Convert sysfs cache code to of_find_next_cache_node()

Using the common code means that more complete cache information will
provided in sysfs on platforms that don't use the l2-cache property
convention.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Convert cpu_to_l2cache() to of_find_next_cache_node()
Nathan Lynch [Wed, 10 Dec 2008 20:16:07 +0000 (20:16 +0000)]
powerpc: Convert cpu_to_l2cache() to of_find_next_cache_node()

The smp code uses cache information to populate cpu_core_map; change
it to use common code for cache lookup.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Add of_find_next_cache_node()
Nathan Lynch [Wed, 10 Dec 2008 14:46:04 +0000 (14:46 +0000)]
powerpc: Add of_find_next_cache_node()

We have more than one piece of code that looks up cache nodes manually
using the "l2-cache" property.  Add a common helper routine which does
this and handles ePAPR's "next-level-cache" property as well as
powermac.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoof/gpio: Implement of_gpio_count()
Anton Vorontsov [Fri, 5 Dec 2008 08:15:54 +0000 (08:15 +0000)]
of/gpio: Implement of_gpio_count()

This function is used to count how many GPIOs are specified for
a device node.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoof: of_parse_phandles_with_args() learns to differentiate 'hole' cells
Anton Vorontsov [Fri, 5 Dec 2008 08:15:46 +0000 (08:15 +0000)]
of: of_parse_phandles_with_args() learns to differentiate 'hole' cells

Given this list (contains three gpio specifiers, one of which is a hole):

gpios = <&phandle1 1 2 3
         0 /* a hole */
         &phandle2 4 5 6>;

of_parse_phandles_with_args() would report -ENOENT for the `hole'
specifier item, the same error value is used to report the end of the
list, for example.

Sometimes we want to differentiate holes from real errors -- for
example when we want to count all the [syntax correct] specifiers.

With this patch of_parse_phandles_with_args() will report -EEXITS when
somebody requested to parse a hole.

Also, make the out_{node,args} arguments optional, when counting we
don't really need the out values.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoof: Minor simplification for the of_parse_phandles_with_args()
Anton Vorontsov [Fri, 5 Dec 2008 08:15:39 +0000 (08:15 +0000)]
of: Minor simplification for the of_parse_phandles_with_args()

By using 'list++' in the beginning we can simplify the code a
little bit.

Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoMerge branch 'linux-2.6' into next
Paul Mackerras [Thu, 18 Dec 2008 00:06:12 +0000 (11:06 +1100)]
Merge branch 'linux-2.6' into next

15 years agoMerge branch 'i2c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux
Linus Torvalds [Wed, 17 Dec 2008 23:05:26 +0000 (15:05 -0800)]
Merge branch 'i2c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux

* 'i2c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux:
  i2c-s3c2410: fix check for being in suspend.
  i2c-cpm: Detect and report NAK right away instead of timing out

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Wed, 17 Dec 2008 23:01:23 +0000 (15:01 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: Add JBD2 compat feature bit.
  ocfs2: Always update xattr search when creating bucket.

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Wed, 17 Dec 2008 23:01:06 +0000 (15:01 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display
  USB: set correct configuration in probe of ti_usb_3410_5052
  USB: add 5372:2303 to pl2303
  USB: skip Set-Interface(0) if already in altsetting 0
  USB: fix comment about endianness of descriptors
  USB: Documentation/usb/gadget_serial.txt: update to match driver use_acm behaviour
  usbmon: drop bogus 0t from usbmon.txt
  USB: gadget: fix rndis working at high speed
  USB: ftdi_sio: Adding Ewert Energy System's CANdapter PID
  USB: tty: SprogII DCC controller identifiers
  usb-storage: update unusual_devs entry for Nokia 5310
  USB: Unusual devs patch for Nokia 3500c
  USB: storage: unusual_devs.h: Nokia 3109c addition
  USB: fix problem with usbtmc driver not loading properly

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Wed, 17 Dec 2008 23:00:54 +0000 (15:00 -0800)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  STAGING: Move staging drivers back to staging-specific menu
  driver core: add newlines to debugging enabled/disabled messages
  xilinx_hwicap: remove improper wording in license statement
  driver core: fix using 'ret' variable in unregister_dynamic_debug_module

15 years agocifs: fix buffer overrun in parse_DFS_referrals
Jeff Layton [Wed, 17 Dec 2008 11:31:53 +0000 (06:31 -0500)]
cifs: fix buffer overrun in parse_DFS_referrals

While testing a kernel with memory poisoning enabled, I saw some warnings
about the redzone getting clobbered when chasing DFS referrals. The
buffer allocation for the unicode converted version of the searchName is
too small and needs to take null termination into account.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
Linus Torvalds [Wed, 17 Dec 2008 22:58:56 +0000 (14:58 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/galak/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc:
  powerpc: Fix corruption error in rh_alloc_fixed()
  powerpc/fsl-booke: Fix the miss interrupt restore

15 years agoSTAGING: Move staging drivers back to staging-specific menu
Dmitry Baryshkov [Thu, 27 Nov 2008 21:01:28 +0000 (00:01 +0300)]
STAGING: Move staging drivers back to staging-specific menu

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver core: add newlines to debugging enabled/disabled messages
Marcel Holtmann [Sun, 30 Nov 2008 13:01:26 +0000 (14:01 +0100)]
driver core: add newlines to debugging enabled/disabled messages

Both messages are missing the newline and thus dmesg output gets
scrambled.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoxilinx_hwicap: remove improper wording in license statement
Greg Kroah-Hartman [Sun, 7 Dec 2008 05:10:51 +0000 (21:10 -0800)]
xilinx_hwicap: remove improper wording in license statement

GPLv2 doesn't allow additional restrictions to be imposed on any
code, so this wording needs to be removed from these files.

Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver core: fix using 'ret' variable in unregister_dynamic_debug_module
Johann Felix Soden [Thu, 30 Oct 2008 21:44:39 +0000 (22:44 +0100)]
driver core: fix using 'ret' variable in unregister_dynamic_debug_module

The 'ret' variable is assigned, but not used in the return statement. Fix this.

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display
Mike Provencher [Tue, 16 Dec 2008 20:30:14 +0000 (14:30 -0600)]
USB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display

Add id for the Hewlett-Packard LD220-HP POS pole display.

Bus 002 Device 002: ID 03f0:3524 Hewlett-Packard

Signed-off-by: Mike Provencher <mike.provencher@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: set correct configuration in probe of ti_usb_3410_5052
Oliver Neukum [Tue, 16 Dec 2008 11:25:55 +0000 (12:25 +0100)]
USB: set correct configuration in probe of ti_usb_3410_5052

This driver transfers firmware. It may just as well set the correct
configuration.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: add 5372:2303 to pl2303
Matthew Arnold [Sat, 13 Dec 2008 11:42:53 +0000 (22:42 +1100)]
USB: add 5372:2303 to pl2303

This patch adds the "Superial" USB-Serial converter to pl2303 so that it
is detected, by the correct driver.  Adds the relevant vendor:product
(5372:2303) to the device tables in pl2303.c & pl2303.h.  The patch has
been tested against 2.6.24-22-generic.

Signed-off-by: Matthew D Arnold <matthew.arnold-1@uts.edu.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: skip Set-Interface(0) if already in altsetting 0
Alan Stern [Mon, 1 Dec 2008 15:24:41 +0000 (10:24 -0500)]
USB: skip Set-Interface(0) if already in altsetting 0

When a driver unbinds from an interface, usbcore always sends a
Set-Interface request to reinstall altsetting 0.  Unforunately, quite
a few devices have buggy firmware that crashes when it receives this
request.

To avoid such problems, this patch (as1180) arranges to send the
Set-Interface request only when the interface is not already in
altsetting 0.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fix comment about endianness of descriptors
Phil Endecott [Mon, 1 Dec 2008 15:22:33 +0000 (10:22 -0500)]
USB: fix comment about endianness of descriptors

This patch fixes a comment and clarifies the documentation about the
endianness of descriptors. The current policy is that descriptors will
be little-endian at the API even on big-endian systems; however the
/proc/bus/usb API predates this policy and presents descriptors with
some multibyte fields byte-swapped.

Signed-off-by: Phil Endecott <usb_endian_patch@chezphil.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Documentation/usb/gadget_serial.txt: update to match driver use_acm behaviour
Peter Korsgaard [Thu, 4 Dec 2008 15:30:53 +0000 (16:30 +0100)]
USB: Documentation/usb/gadget_serial.txt: update to match driver use_acm behaviour

Commit 7bb5ea54 (usb gadget serial: use composite gadget framework)
changed the default for the use_acm parameter from 0 to 1.
Update the documentation to match.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousbmon: drop bogus 0t from usbmon.txt
Pete Zaitcev [Thu, 4 Dec 2008 23:17:00 +0000 (16:17 -0700)]
usbmon: drop bogus 0t from usbmon.txt

The example is incorrect: there is no 0t socket (the '1t' format has no
bus number in it). Also, correct the broken sentence for USB Tag.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: gadget: fix rndis working at high speed
David Brownell [Tue, 25 Nov 2008 07:11:03 +0000 (23:11 -0800)]
USB: gadget: fix rndis working at high speed

Fix a bug specific to highspeed mode in the recently updated RNDIS
support:  it wasn't setting up the high speed notification endpoint,
which prevented high speed RNDIS links from working.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Tested-by: Anand Gadiyar <gadiyar@ti.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ftdi_sio: Adding Ewert Energy System's CANdapter PID
Andrew Ewert [Thu, 4 Dec 2008 15:09:59 +0000 (09:09 -0600)]
USB: ftdi_sio: Adding Ewert Energy System's CANdapter PID

The following patch adds in the USB PID for Ewert Energy System's CANdapter
device (CANBUS to USB-Serial which uses the FTDI 245R chipset) to the ftdi_sio
device driver.

The patch was tested successfully on Linux kernel 2.6.27 under Ubuntu.

Relevant output from /proc/bus/usb/devices (With patch installed):

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=9f80 Rev= 6.00
S:  Manufacturer=Ewert Energy Systems
S:  Product=CANdapter
S:  SerialNumber=A6RGB3Z3
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Signed-off-by: Andrew Ewert <andrew@ewertenergy.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: tty: SprogII DCC controller identifiers
Alan Cox [Sun, 7 Dec 2008 07:46:04 +0000 (23:46 -0800)]
USB: tty: SprogII DCC controller identifiers

Someone on rmweb reminded me this had been overlooked from ages ago..

Add the identifiers for the Sprog II USB. This is a DCC control interface
using the FTDI-SIO hardware: http://www.sprog-dcc.co.uk/. People have been
using it with insmod options for ages, this just puts it into the driver
data.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb-storage: update unusual_devs entry for Nokia 5310
Alan Stern [Mon, 1 Dec 2008 15:23:43 +0000 (10:23 -0500)]
usb-storage: update unusual_devs entry for Nokia 5310

This patch (as1179) updates the unusual_devs entry for Nokia's 5310
phone to include a more recent firmware revision.

This fixes Bugzilla #12099.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Robson Roberto Souza Peixoto <robsonpeixoto@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Unusual devs patch for Nokia 3500c
Ozan Sener [Mon, 8 Dec 2008 17:15:45 +0000 (19:15 +0200)]
USB: Unusual devs patch for Nokia 3500c

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0421 ProdID=0060 Rev= 5.51
S:  Manufacturer=Nokia
S:  Product=Nokia 3500c
S:  SerialNumber=357687010280751
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

From: Ozan Sener <themgzzy@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: unusual_devs.h: Nokia 3109c addition
CSÉCSY László [Tue, 9 Dec 2008 22:39:14 +0000 (23:39 +0100)]
USB: storage: unusual_devs.h: Nokia 3109c addition

2.6.26(.x, cannot remember) could handle the microSD card in my Nokia
3109c attached via USB as mass storage, 2.6.27(.x, up to and included
2.6.27.8) cannot. Please find the attached patch which fixes this
regression, and a copy of /proc/bus/usb/devices with my phone plugged in
running with this patch on Frugalware.

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0421 ProdID=0063 Rev= 6.01
S:  Manufacturer=Nokia
S:  Product=Nokia 3109c
S:  SerialNumber=359561013742570
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

From: CSÉCSY László <boobaa@frugalware.org>
Cc: Phil Dibowitz <phil@ipom.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fix problem with usbtmc driver not loading properly
Greg Kroah-Hartman [Thu, 4 Dec 2008 00:33:09 +0000 (16:33 -0800)]
USB: fix problem with usbtmc driver not loading properly

The usbtmc driver forgot to export its device table to userspace.
Without this, it is never loaded properly when such a device is seen by
the system.

Cc: Marcel Janssen <marcel.janssen@admesy.nl>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agopowerpc: Fix corruption error in rh_alloc_fixed()
Guillaume Knispel [Tue, 9 Dec 2008 14:28:34 +0000 (15:28 +0100)]
powerpc: Fix corruption error in rh_alloc_fixed()

There is an error in rh_alloc_fixed() of the Remote Heap code:
If there is at least one free block blk won't be NULL at the end of the
search loop, so -ENOMEM won't be returned and the else branch of
"if (bs == s || be == e)" will be taken, corrupting the management
structures.

Signed-off-by: Guillaume Knispel <gknispel@proformatique.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc/fsl-booke: Fix the miss interrupt restore
Dave Liu [Wed, 17 Dec 2008 10:24:15 +0000 (18:24 +0800)]
powerpc/fsl-booke: Fix the miss interrupt restore

The commit e5e774d8833de1a0037be2384efccadf16935675
powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted
introduce one issue. that casue the problem like this:

Kernel BUG at c00b19fc [verbose debug info unavailable]
Oops: Exception in kernel mode, sig: 5 [#1]
MPC8572 DS
Modules linked in:
NIP: c00b19fc LR: c00b1c34 CTR: c0064e88
REGS: ef02b7b0 TRAP: 0700   Not tainted  (2.6.28-rc8-00057-g1bda712)
MSR: 00021000 <ME>  CR: 44048028  XER: 20000000
TASK = ef02c000[1] 'init' THREAD: ef02a000
GPR00: 00000001 ef02b860 ef02c000 eec201a0 c0dec2c0 00000000 000078a1 00000400
GPR08: c00b4e40 000078a1 c048ec00 a1780000 44048028 ecd26917 00000001 ef02b948
GPR16: ffffffea 0000020c 00000000 00000000 00000003 0000000a 00000000 000078a1
GPR24: eec201a0 00000000 ed849000 00000400 ef02b95c 00000001 ef02b978 ef02b984
NIP [c00b19fc] __find_get_block+0x24/0x238
LR [c00b1c34] __getblk+0x24/0x2a0
Call Trace:
[ef02b860] [c017b768] generic_make_request+0x290/0x328 (unreliable)
[ef02b8b0] [c00b1c34] __getblk+0x24/0x2a0
[ef02b910] [c00b4ae4] __bread+0x14/0xf8
[ef02b920] [c00fc228] ext2_get_branch+0xf0/0x138
[ef02b940] [c00fcc88] ext2_get_block+0xb8/0x828
[ef02ba00] [c00bbdc8] do_mpage_readpage+0x188/0x808
[ef02bac0] [c00bc5b4] mpage_readpages+0xec/0x144
[ef02bb50] [c00fba38] ext2_readpages+0x24/0x34
[ef02bb60] [c006ade0] __do_page_cache_readahead+0x150/0x230
[ef02bbb0] [c0064bdc] filemap_fault+0x31c/0x3e0
[ef02bbf0] [c00728b8] __do_fault+0x60/0x5b0
[ef02bc50] [c0011e0c] do_page_fault+0x2d8/0x4c4
[ef02bd10] [c000ed90] handle_page_fault+0xc/0x80
[ef02bdd0] [c00c7adc] set_brk+0x74/0x9c
[ef02bdf0] [c00c9274] load_elf_binary+0x70c/0x1180
[ef02be70] [c00945f0] search_binary_handler+0xa8/0x274
[ef02bea0] [c0095818] do_execve+0x19c/0x1d4
[ef02bed0] [c000766c] sys_execve+0x58/0x84
[ef02bef0] [c000e950] ret_from_syscall+0x0/0x3c
[ef02bfb0] [c009c6fc] sys_dup+0x24/0x6c
[ef02bfc0] [c0001e04] init_post+0xb0/0xf0
[ef02bfd0] [c046c1ac] kernel_init+0xcc/0xf4
[ef02bff0] [c000e6d0] kernel_thread+0x4c/0x68
Instruction dump:
4bffffa4 813f000c 4bffffac 9421ffb0 7c0802a6 7d800026 90010054 bf210034
91810030 7c0000a6 68008000 54008ffe <0f0000003d20c04e 3b29ffb8 38000008

The issue was the beqlr returns early but we haven't reenabled interrupts.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoocfs2: Add JBD2 compat feature bit.
Joel Becker [Wed, 17 Dec 2008 02:10:18 +0000 (18:10 -0800)]
ocfs2: Add JBD2 compat feature bit.

Define the OCFS2_FEATURE_COMPAT_JBD2 bit in the filesystem header.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoMerge branch 'next' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc...
Paul Mackerras [Wed, 17 Dec 2008 00:01:43 +0000 (11:01 +1100)]
Merge branch 'next' of /linux/kernel/git/jwboyer/powerpc-4xx into next

15 years agoocfs2: Always update xattr search when creating bucket.
Tao Ma [Fri, 5 Dec 2008 01:14:10 +0000 (09:14 +0800)]
ocfs2: Always update xattr search when creating bucket.

When we create xattr bucket during the process of xattr set, we always
need to update the ocfs2_xattr_search since even if the bucket size is
the same as block size, the offset will change because of the removal
of the ocfs2_xattr_block header.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoi2c-s3c2410: fix check for being in suspend.
Ben Dooks [Fri, 31 Oct 2008 16:10:22 +0000 (16:10 +0000)]
i2c-s3c2410: fix check for being in suspend.

As noted by Julia Lawall <julia@diku.dk>, we can never
trigger the check for being in suspend due to the result
of !readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN
always being 0.

Add suspend/resume hooks to stop i2c transactions happening
until the driver has been resumed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
15 years agoi2c-cpm: Detect and report NAK right away instead of timing out
Mike Ditto [Tue, 16 Dec 2008 20:17:09 +0000 (20:17 +0000)]
i2c-cpm: Detect and report NAK right away instead of timing out

Make the driver report an ENXIO error immediately upon NAK instead of
waiting for another interrupt and getting a timeout.

When reading from a device that is not present or declines to respond
to, e.g., a non-existent register address, CPM immediately reports a
NAK condition in the TxBD, but the driver kept waiting until a timeout,
which takes 1 second and causes an ugly console error message.

Signed-off-by: Mike Ditto <mditto@consentry.com>
Acked-by: Jochen Friedrich <jochen@scram.de>
[ben-linux@fluff.org: reordered description text]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Tue, 16 Dec 2008 17:49:10 +0000 (09:49 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: add quirk fix for Freecom HDD

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 16 Dec 2008 17:48:53 +0000 (09:48 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata_hpt366: no ATAPI DMA
  pata_hpt366: fix cable detection,
  libata: fix Seagate NCQ+FLUSH blacklist

15 years agoMerge branch 'sh/for-2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Tue, 16 Dec 2008 17:47:58 +0000 (09:47 -0800)]
Merge branch 'sh/for-2.6.28' of git://git./linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Disable GENERIC_HARDIRQS_NO__DO_IRQ for unconverted platforms.
  sh: maple: Do not pass SLAB_POISON to kmem_cache_create()

15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Tue, 16 Dec 2008 17:47:43 +0000 (09:47 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc/cell/axon-msi: Fix MSI after kexec
  powerpc: Fix bootmem reservation on uninitialized node
  powerpc: Check for valid hugepage size in hugetlb_get_unmapped_area

15 years agomm: Don't touch uninitialized variable in do_pages_stat_array()
KOSAKI Motohiro [Tue, 16 Dec 2008 07:06:43 +0000 (16:06 +0900)]
mm: Don't touch uninitialized variable in do_pages_stat_array()

Commit 80bba1290ab5122c60cdb73332b26d288dc8aedd removed one necessary
variable initialization.  As a result following warning happened:

    CC      mm/migrate.o
  mm/migrate.c: In function 'sys_move_pages':
  mm/migrate.c:1001: warning: 'err' may be used uninitialized in this function

More unfortunately, if find_vma() failed, kernel read uninitialized
memory.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: Brice Goglin <Brice.Goglin@inria.fr>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopata_hpt366: no ATAPI DMA
Tejun Heo [Tue, 9 Dec 2008 08:14:04 +0000 (17:14 +0900)]
pata_hpt366: no ATAPI DMA

IDE hpt366 driver doesn't allow DMA for ATAPI devices and MWDMA2 on
ATAPI device locks up pata_hpt366.  Follow the suit.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_hpt366: fix cable detection,
Tejun Heo [Tue, 9 Dec 2008 08:13:19 +0000 (17:13 +0900)]
pata_hpt366: fix cable detection,

pata_hpt366 is strange in that its two channels occupy two PCI
functions and both are primary channels and bit1 of PCI configuration
register 0x5A indicates cable for both channels.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: fix Seagate NCQ+FLUSH blacklist
Tejun Heo [Thu, 11 Dec 2008 04:42:42 +0000 (13:42 +0900)]
libata: fix Seagate NCQ+FLUSH blacklist

Due to miscommunication, P/N was mistaken as firmware revision
strings.  Update it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>