platform/kernel/linux-exynos.git
16 years agoMerge branches 'pxa' and 'orion-fixes1'
Russell King [Tue, 29 Apr 2008 20:31:06 +0000 (21:31 +0100)]
Merge branches 'pxa' and 'orion-fixes1'

16 years ago[ARM] pxa: fix 1c104e0e4f6ab396960c058e95e18bdedcac945b
Russell King [Tue, 29 Apr 2008 20:28:03 +0000 (21:28 +0100)]
[ARM] pxa: fix 1c104e0e4f6ab396960c058e95e18bdedcac945b

The referenced commit changed the order such that the CPU code was
initialised before MFP, resulting in unregistered MFP sysfs objects
being referenced.  Reverse the link order of these so MFP is
initialised before the CPU code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] serial: s3c2410: platform_get_irq() may return signed unnoticed
Roel Kluin [Wed, 23 Apr 2008 21:59:36 +0000 (23:59 +0200)]
[ARM] serial: s3c2410: platform_get_irq() may return signed unnoticed

port->irq is unsigned, platform_get_irq() may return signed unnoticed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] am79c961a: platform_get_irq() may return signed unnoticed
Roel Kluin [Wed, 23 Apr 2008 21:44:03 +0000 (23:44 +0200)]
[ARM] am79c961a: platform_get_irq() may return signed unnoticed

dev->irq is unsigned, platform_get_irq() may return signed unnoticed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] Orion: catch a couple more alternative spellings of PCIe
Lennert Buytenhek [Fri, 25 Apr 2008 20:31:32 +0000 (16:31 -0400)]
[ARM] Orion: catch a couple more alternative spellings of PCIe

Unify a couple more spellings of "PCIe" ("PCI-E", "PCIE".)

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
16 years ago[ARM] Orion: fix orion-ehci platform resource end addresses
Lennert Buytenhek [Fri, 25 Apr 2008 20:30:21 +0000 (16:30 -0400)]
[ARM] Orion: fix orion-ehci platform resource end addresses

End addresses in 'struct resource' are inclusive -- fix the common
orion5x code to pass in the proper end addresses when instantiating
the two on-chip EHCI controllers.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
16 years ago[ARM] Orion: fix ->map_irq() PCIe bus number check
Lennert Buytenhek [Fri, 25 Apr 2008 20:28:33 +0000 (16:28 -0400)]
[ARM] Orion: fix ->map_irq() PCIe bus number check

The current orion5x board ->map_irq() routines check whether a
given bus number lives on the PCIe controller by comparing it with
the PCIe controller's primary bus number.  This doesn't work in
case there are multiple buses in the PCIe domain, i.e. if there
exists a PCIe bridge on the primary PCIe bus.

This patch adds a helper function (orion5x_pci_map_irq()) that
returns the IRQ number for the given PCI device if that device has
a hard-wired IRQ, or -1 otherwise, and makes each board's
->map_irq() function use this helper function.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
16 years ago[ARM] Orion: fix ioremap() optimization
Nicolas Pitre [Fri, 25 Apr 2008 18:28:55 +0000 (14:28 -0400)]
[ARM] Orion: fix ioremap() optimization

The ioremap() optimization used for internal register didn't cope
with the fact that paddr + size can wrap to zero if the area extends
to the end of the physical address space.

Issue isolated by Sylver Bruneau <sylver.bruneau@googlemail.com>.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
16 years ago[ARM] feroceon: remove CONFIG_CPU_CACHE_ROUND_ROBIN check
Lennert Buytenhek [Thu, 24 Apr 2008 05:31:46 +0000 (01:31 -0400)]
[ARM] feroceon: remove CONFIG_CPU_CACHE_ROUND_ROBIN check

Since the Feroceon cache replacement policy is always pseudorandom
(and the relevant control register bit is ignored), remove the
CONFIG_CPU_CACHE_ROUND_ROBIN check from proc-feroceon.S.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
16 years ago[ARM] feroceon: remove CONFIG_CPU_DCACHE_WRITETHROUGH check
Lennert Buytenhek [Thu, 24 Apr 2008 05:31:46 +0000 (01:31 -0400)]
[ARM] feroceon: remove CONFIG_CPU_DCACHE_WRITETHROUGH check

Since the Feroceon doesn't have a global WT override bit like
ARM926 does, remove all code relating to this mode of operation
from proc-feroceon.S.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
16 years agokprobes/arm: fix decoding of arithmetic immediate instructions
Lennert Buytenhek [Thu, 24 Apr 2008 05:31:45 +0000 (01:31 -0400)]
kprobes/arm: fix decoding of arithmetic immediate instructions

The ARM kprobes arithmetic immediate instruction decoder
(space_cccc_001x()) was accidentally zero'ing out not only the Rn and
Rd arguments, but the lower nibble of the immediate argument as well
-- this patch fixes this.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Nicolas Pitre <nico@marvell.com>
16 years agokprobes/arm: fix cache flush address for instruction stub
Nicolas Pitre [Wed, 23 Apr 2008 22:44:15 +0000 (18:44 -0400)]
kprobes/arm: fix cache flush address for instruction stub

It is more useful to flush the cache with the actual buffer address
rather than the address containing a pointer to the buffer.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Acked-by: Lennert Buytenhek <buytenh@marvell.com>
16 years ago[ARM] 5022/1: Race in ARM MMCI PL18x driver, V2
Linus Walleij [Sat, 26 Apr 2008 22:39:44 +0000 (23:39 +0100)]
[ARM] 5022/1: Race in ARM MMCI PL18x driver, V2

Updated version of 4446/1. This also drops the suggested comparison
of host_remain for == 0, since that doesn't make sense (still works
for us, too). We have verified that this patch solve race problems
on atleast 2 archs at high frequencies.

(Verbatim copy of old patch text below.)

The patch below fixes a race condition in the ARM MMCI PL18x driver.

If new data arrives in the FIFO while existing data is being read then
we get a second iteration of the loop in mmci_pio_read.

However host->size is not updated until after mmci_pio_read returns,
so we get count = number of new bytes PLUS number of bytes already
copied in the first iteration. This results in a FIFO underrun as
we try and read mode data than is available.

The fix is to compensating for data read on previous iterations
when calculating the amount of data in the FIFO.

Signed-off-by: Linus Walleij <triad@df.lth.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 5021/1: at91: buildfix for sam9263 + PM
David Brownell [Thu, 24 Apr 2008 19:58:33 +0000 (20:58 +0100)]
[ARM] 5021/1: at91: buildfix for sam9263 + PM

Build fix for power management on at91sam9263:  it has two memory
controllers instead of just one, so it might have two banks of
DRAM to put into selfrefresh mode.  For now we continue to assume
only the first bank is populated.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 5018/1: RealView: Fix the ARM11MPCore Oprofile compilation
Catalin Marinas [Thu, 24 Apr 2008 09:05:43 +0000 (10:05 +0100)]
[ARM] 5018/1: RealView: Fix the ARM11MPCore Oprofile compilation

This patch fixes the Oprofile for ARM11MPCore compilation introduced by
changes to the RealView code. Only RealView/EB is supported.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 5016/1: AT91: typo in mci configuration for at91cap at91sam9263
Nicolas Ferre [Tue, 22 Apr 2008 12:54:52 +0000 (13:54 +0100)]
[ARM] 5016/1: AT91: typo in mci configuration for at91cap at91sam9263

typo in mci configuration in devices files

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Sun, 27 Apr 2008 18:25:00 +0000 (11:25 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (40 commits)
  [SCSI] jazz_esp, sgiwd93, sni_53c710, sun3x_esp: fix platform driver hotplug/coldplug
  [SCSI] aic7xxx: add const
  [SCSI] aic7xxx: add static
  [SCSI] aic7xxx: Update _shipped files
  [SCSI] aic7xxx: teach aicasm to not emit unused debug code/data
  [SCSI] qla2xxx: Update version number to 8.02.01-k2.
  [SCSI] qla2xxx: Correct regression in relogin code.
  [SCSI] qla2xxx: Correct misc. endian and byte-ordering issues.
  [SCSI] qla2xxx: make qla2x00_issue_iocb_timeout() static
  [SCSI] qla2xxx: qla_os.c, make 2 functions static
  [SCSI] qla2xxx: Re-register FDMI information after a LIP.
  [SCSI] qla2xxx: Correct SRB usage-after-completion/free issues.
  [SCSI] qla2xxx: Correct ISP84XX verify-chip response handling.
  [SCSI] qla2xxx: Wakeup DPC thread to process any deferred-work requests.
  [SCSI] qla2xxx: Collapse RISC-RAM retrieval code during a firmware-dump.
  [SCSI] m68k: new mac_esp scsi driver
  [SCSI] zfcp: Add some statistics provided by the FCP adapter to the sysfs
  [SCSI] zfcp: Print some messages only during ERP
  [SCSI] zfcp: Wait for free SBAL during exchange config
  [SCSI] scsi_transport_fc: fc_user_scan correction
  ...

16 years ago[SCSI] jazz_esp, sgiwd93, sni_53c710, sun3x_esp: fix platform driver hotplug/coldplug
Kay Sievers [Fri, 18 Apr 2008 20:57:19 +0000 (13:57 -0700)]
[SCSI] jazz_esp, sgiwd93, sni_53c710, sun3x_esp: fix platform driver hotplug/coldplug

Since

commit 43cc71eed1250755986da4c0f9898f9a635cb3bf
Author: Kay Sievers <kay.sievers@vrfy.org>
Date:   Sat Aug 18 04:40:39 2007 +0200

    platform: prefix MODALIAS with "platform:"

the platform modalias is prefixed with "platform:". Add MODULE_ALIAS()
to the hotpluggable SCSI platform drivers, to re-enable auto loading.

[dbrownell@users.sourceforge.net: more drivers, registration fixes]
[akpm@linux-foundation.org: fix sgiwd93.c]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic7xxx: add const
Denys Vlasenko [Fri, 25 Apr 2008 02:36:01 +0000 (04:36 +0200)]
[SCSI] aic7xxx: add const

This patch adds more const keywords where appropriate.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic7xxx: add static
Denys Vlasenko [Fri, 25 Apr 2008 02:34:49 +0000 (04:34 +0200)]
[SCSI] aic7xxx: add static

This patch adds static (and sometimes const) keywords where appropriate.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic7xxx: Update _shipped files
Hannes Reinecke [Fri, 25 Apr 2008 13:03:05 +0000 (15:03 +0200)]
[SCSI] aic7xxx: Update _shipped files

Update the precompiled sequencer code to match the latest
aicasm changes.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic7xxx: teach aicasm to not emit unused debug code/data
Hannes Reinecke [Fri, 25 Apr 2008 13:01:41 +0000 (15:01 +0200)]
[SCSI] aic7xxx: teach aicasm to not emit unused debug code/data

Add a 'count' variable to each symbol which gets increased every time
the symbol is referenced.  And then modify the register definition to
include counts for symbols which are referenced from the source code
only and not from the sequencer code.

This will give us an automatic usage count for the symbols with only
minimal hand-crafting.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Update version number to 8.02.01-k2.
Andrew Vasquez [Thu, 24 Apr 2008 22:21:31 +0000 (15:21 -0700)]
[SCSI] qla2xxx: Update version number to 8.02.01-k2.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Correct regression in relogin code.
Andrew Vasquez [Thu, 24 Apr 2008 22:21:30 +0000 (15:21 -0700)]
[SCSI] qla2xxx: Correct regression in relogin code.

Commit 63a8651f2548c6bb5132c0b4e7dad4f57a9274db ([SCSI] qla2xxx:
Correct infinite-login-retry issue.) introduced a small
regression where a successful relogin would result in an fcport's
loop_id to be incorrectly reset to FC_NO_LOOP_ID.  Only clear-out
loopid, if retries have been 'truly' exhausted.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Correct misc. endian and byte-ordering issues.
Seokmann Ju [Thu, 24 Apr 2008 22:21:29 +0000 (15:21 -0700)]
[SCSI] qla2xxx: Correct misc. endian and byte-ordering issues.

There were several places in the driver which could cause byte
ordering problem as provided by Al Viro
<viro@ZenIV.linux.org.uk>.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: make qla2x00_issue_iocb_timeout() static
Adrian Bunk [Thu, 24 Apr 2008 22:21:28 +0000 (15:21 -0700)]
[SCSI] qla2xxx: make qla2x00_issue_iocb_timeout() static

This patch makes the needlessly global qla2x00_issue_iocb_timeout()
static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: qla_os.c, make 2 functions static
Adrian Bunk [Thu, 24 Apr 2008 22:21:27 +0000 (15:21 -0700)]
[SCSI] qla2xxx: qla_os.c, make 2 functions static

This patch makes the following needlessly global functions static:
- qla2x00_alloc_work()
- qla2x00_post_work()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Re-register FDMI information after a LIP.
Andrew Vasquez [Thu, 24 Apr 2008 22:21:26 +0000 (15:21 -0700)]
[SCSI] qla2xxx: Re-register FDMI information after a LIP.

Original code would (incorrectly) only re-register after a
loop-down condition.  Also, FDMI registration should be enabled
by default.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Correct SRB usage-after-completion/free issues.
Andrew Vasquez [Thu, 24 Apr 2008 22:21:25 +0000 (15:21 -0700)]
[SCSI] qla2xxx: Correct SRB usage-after-completion/free issues.

The driver is incorrectly assuming that the 'sp' reference held
in qla2[x00|4xx]_abort_command() is valid after the mailbox
command is issued to abort the exchange.  It is *not*, as the
command may be completed during interrupt context before control
is returned to the mailbox caller.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Correct ISP84XX verify-chip response handling.
Andrew Vasquez [Thu, 24 Apr 2008 22:21:24 +0000 (15:21 -0700)]
[SCSI] qla2xxx: Correct ISP84XX verify-chip response handling.

Earlier code could trigger an infinite-retry if 1st invocation
returned a non-CS_COMPLETE status.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Wakeup DPC thread to process any deferred-work requests.
Andrew Vasquez [Thu, 24 Apr 2008 22:21:23 +0000 (15:21 -0700)]
[SCSI] qla2xxx: Wakeup DPC thread to process any deferred-work requests.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Collapse RISC-RAM retrieval code during a firmware-dump.
Andrew Vasquez [Thu, 24 Apr 2008 22:21:22 +0000 (15:21 -0700)]
[SCSI] qla2xxx: Collapse RISC-RAM retrieval code during a firmware-dump.

Use the more efficient read-DMA'ble-buffer mailbox commands
rather than reading a single word/dword at a time.  We also
remove a bulk of the duplicate mailbox command-handling codes in
favor of more generic read-memory() routines (qla2xxx_dump_ram()
and qla24xx_dump_ram()).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] m68k: new mac_esp scsi driver
Finn Thain [Fri, 25 Apr 2008 15:06:05 +0000 (10:06 -0500)]
[SCSI] m68k: new mac_esp scsi driver

Replace the mac_esp driver with a new one based on the esp_scsi core.

For esp_scsi: add support for sync transfers for the PIO mode, add a new
esp_driver_ops method to get the maximum dma transfer size (like the old
NCR53C9x driver), and some cleanups.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Add some statistics provided by the FCP adapter to the sysfs
Swen Schillig [Thu, 24 Apr 2008 17:35:54 +0000 (19:35 +0200)]
[SCSI] zfcp: Add some statistics provided by the FCP adapter to the sysfs

The new FCP adapter statistics provide a variety of information about
the virtual adapter (subchannel). In order to collect this information
the zfcp driver is extended to query this information.

The information provided by the new FCP adapter statistics can be
fetched by reading from the following files in the sysfs filesystem

/sys/class/scsi_host/host<n>/seconds_active
/sys/class/scsi_host/host<n>/requests
/sys/class/scsi_host/host<n>/megabytes
/sys/class/scsi_host/host<n>/utilization

These are the statistics on a virtual adapter (subchannel) level.

The information provided is raw and not modified or interpreted by any
means.  No interpretation or modification of the values is done by the
zfcp driver.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Print some messages only during ERP
Swen Schillig [Thu, 24 Apr 2008 17:35:53 +0000 (19:35 +0200)]
[SCSI] zfcp: Print some messages only during ERP

When statistics are polled from sysfs, the statistics use the same
commands as the adapter initialization. Change the messages printed
here, so they are only printed during initialization and not for each
poll of adapter data.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] zfcp: Wait for free SBAL during exchange config
Swen Schillig [Thu, 24 Apr 2008 17:35:52 +0000 (19:35 +0200)]
[SCSI] zfcp: Wait for free SBAL during exchange config

When sending a exchange config data command, wait for a free SBAL.
This does not matter during adapter initialization, but this is
required for pulling adapter statistics during high I/O load.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_transport_fc: fc_user_scan correction
James Smart [Thu, 24 Apr 2008 16:12:46 +0000 (12:12 -0400)]
[SCSI] scsi_transport_fc: fc_user_scan correction

Way back when, when the fc_user_scan routine was created, it kept some
of its original logic that walked the rport list and kicked off a scan.
Unfortunately, it didn't keep any of the locking around the rport list,
nor did it consider the synchronous nature of the scan invoked. The result,
there are some scan requests where the rport list changes, thus a subsequent
scan is called on a bogus rport structure and the system NMI's.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aha1542: minor irq handler cleanups
Jeff Garzik [Thu, 24 Apr 2008 23:45:32 +0000 (19:45 -0400)]
[SCSI] aha1542: minor irq handler cleanups

- where the 'irq' function argument is known never to be used, rename
  it to 'dummy' to make this more obvious

- replace per-irq lookup functions and tables with a direct reference
  to data object obtained via 'dev_id' function argument, passed from
  request_irq()

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] scsi_transport_spi: include sysfs.h
Randy Dunlap [Wed, 23 Apr 2008 16:56:14 +0000 (09:56 -0700)]
[SCSI] scsi_transport_spi: include sysfs.h

scsi_transport_spi.c needs to #include <linux/sysfs.h>:

next-20080423/drivers/scsi/scsi_transport_spi.c:1467: error: implicit declaration of function 'sysfs_update_group'
make[3]: *** [drivers/scsi/scsi_transport_spi.o] Error 1

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] FlashPoint: fix off-by-one errors
Adrian Bunk [Wed, 23 Apr 2008 09:51:10 +0000 (12:51 +0300)]
[SCSI] FlashPoint: fix off-by-one errors

This patch fixes off-by-one errors in error checks (the variables are
used as array indexes for arrays with MAX_SCSI_TAR resp. MAX_LUN
elements) spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic7xxx: Update type check in aicasm grammar
Hannes Reinecke [Wed, 23 Apr 2008 09:39:49 +0000 (11:39 +0200)]
[SCSI] aic7xxx: Update type check in aicasm grammar

The function type_check() in aicasm grammar code was
never used properly due to a bug.
This patch fixes it up and ensures it's only called if appropriate.

In addition the unused 16bit instruction are disabled, but left in
the code for reference.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] fix SLUB WARN_ON
James Bottomley [Mon, 21 Apr 2008 15:57:20 +0000 (10:57 -0500)]
[SCSI] fix SLUB WARN_ON

We're getting a WARN_ON from SLUB indicating that we're trying to free
caches with in-use objects.  The root cause is a new dependency in the
command/sense free on unchecked_isa_dma.  The WARN_ON is caused by
drivers which change this in their setup after the command/sense cache
is allocated.

The fix is to move the allocation of this cache into scsi_add_host()
so things like gdth have an opportunity to modify it between alloc and
add (but *not* after).

The true fix would be to move unchecked_isa_dma into the template and
out of the host, so it because a truly read only variable.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoMerge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 27 Apr 2008 17:13:52 +0000 (10:13 -0700)]
Merge branch 'kvm-updates-2.6.26' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (147 commits)
  KVM: kill file->f_count abuse in kvm
  KVM: MMU: kvm_pv_mmu_op should not take mmap_sem
  KVM: SVM: remove selective CR0 comment
  KVM: SVM: remove now obsolete FIXME comment
  KVM: SVM: disable CR8 intercept when tpr is not masking interrupts
  KVM: SVM: sync V_TPR with LAPIC.TPR if CR8 write intercept is disabled
  KVM: export kvm_lapic_set_tpr() to modules
  KVM: SVM: sync TPR value to V_TPR field in the VMCB
  KVM: ppc: PowerPC 440 KVM implementation
  KVM: Add MAINTAINERS entry for PowerPC KVM
  KVM: ppc: Add DCR access information to struct kvm_run
  ppc: Export tlb_44x_hwater for KVM
  KVM: Rename debugfs_dir to kvm_debugfs_dir
  KVM: x86 emulator: fix lea to really get the effective address
  KVM: x86 emulator: fix smsw and lmsw with a memory operand
  KVM: x86 emulator: initialize src.val and dst.val for register operands
  KVM: SVM: force a new asid when initializing the vmcb
  KVM: fix kvm_vcpu_kick vs __vcpu_run race
  KVM: add ioctls to save/store mpstate
  KVM: Rename VCPU_MP_STATE_* to KVM_MP_STATE_*
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sun, 27 Apr 2008 17:13:06 +0000 (10:13 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (49 commits)
  ide-tape: remove tape->merge_stage
  ide-tape: mv tape->merge_stage_size tape->merge_bh_size
  ide-tape: mv idetape_empty_write_pipeline ide_tape_flush_merge_buffer
  ide-tape: mv idetape_discard_read_pipeline ide_tape_discard_merge_buffer
  ide-tape: make __idetape_discard_read_pipeline() of type void
  ide: remove now unused ide_pci_create_host_proc()
  ide: remove /proc/ide/ali
  ide-tape: improve buffer pages freeing strategy
  ide-tape: mv tape->pages_per_stage tape->pages_per_buffer
  ide-tape: mv tape->stage_size tape->buffer_size
  ide-tape: improve buffer allocation strategy
  ide: add struct ide_io_ports (take 3)
  ide: make ide_unregister() take 'ide_hwif_t *' as an argument (take 2)
  ide: sanitize ide_unregister() usage
  mpc8xx-ide: use ide_find_port()
  ide: add "noacpi" / "acpigtf" / "acpionboot" parameters
  gayle: add "doubler" parameter
  ide: add "cdrom=" and "chs=" parameters
  ide: add "nodma|noflush|noprobe|nowerr=" parameters
  ide: remove obsoleted "hdx=autotune" kernel parameter
  ...

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
Linus Torvalds [Sun, 27 Apr 2008 17:10:54 +0000 (10:10 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/x86/linux-2.6-idle-fix

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-idle-fix:
  fix idle (arch, acpi and apm) and lockdep

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sun, 27 Apr 2008 17:10:37 +0000 (10:10 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: xpad - fix build failure

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Sun, 27 Apr 2008 17:10:14 +0000 (10:10 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  mlx4_core: Add helper to move QP to ready-to-send
  mlx4_core: Add HW queues allocation helpers
  RDMA/nes: Remove volatile qualifier from struct nes_hw_cq.cq_vbase
  mlx4_core: CQ resizing should pass a 0 opcode modifier to MODIFY_CQ
  mlx4_core: Move kernel doorbell management into core
  IB/ehca: Bump version number to 0026
  IB/ehca: Make some module parameters bool, update descriptions
  IB/ehca: Remove mr_largepage parameter
  IB/ehca: Move high-volume debug output to higher debug levels
  IB/ehca: Prevent posting of SQ WQEs if QP not in RTS
  IPoIB: Handle 4K IB MTU for UD (datagram) mode
  RDMA/nes: Fix adapter reset after PXE boot
  RDMA/nes: Print IPv4 addresses in a readable format
  RDMA/nes: Use print_mac() to format ethernet addresses for printing

16 years agoasm/unaligned.h doesn't work well as the very first include
Al Viro [Sun, 27 Apr 2008 05:19:18 +0000 (06:19 +0100)]
asm/unaligned.h doesn't work well as the very first include

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoe1000e triggers sparc32 gcc bug
Al Viro [Sun, 27 Apr 2008 05:15:42 +0000 (06:15 +0100)]
e1000e triggers sparc32 gcc bug

... and isn't possible on sparc32 boxen anyway, unless somebody
had done JavaStation with PCIE lately.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoKVM: kill file->f_count abuse in kvm
Al Viro [Sat, 19 Apr 2008 19:33:56 +0000 (20:33 +0100)]
KVM: kill file->f_count abuse in kvm

Use kvm own refcounting instead of playing with ->filp->f_count.
That will allow to get rid of a lot of crap in anon_inode_getfd() and
kill a race in kvm_dev_ioctl_create_vm() (file might have been closed
immediately by another thread, so ->filp might point to already freed
struct file when we get around to setting it).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: kvm_pv_mmu_op should not take mmap_sem
Marcelo Tosatti [Wed, 16 Apr 2008 20:19:06 +0000 (17:19 -0300)]
KVM: MMU: kvm_pv_mmu_op should not take mmap_sem

kvm_pv_mmu_op should not take mmap_sem. All gfn_to_page() callers down
in the MMU processing will take it if necessary, so as it is it can
deadlock.

Apparently a leftover from the days before slots_lock.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: SVM: remove selective CR0 comment
Joerg Roedel [Wed, 16 Apr 2008 15:01:05 +0000 (17:01 +0200)]
KVM: SVM: remove selective CR0 comment

There is not selective cr0 intercept bug. The code in the comment sets the
CR0.PG bit. But KVM sets the CR4.PG bit for SVM always to implement the paged
real mode. So the 'mov %eax,%cr0' instruction does not change the CR0.PG bit.
Selective CR0 intercepts only occur when a bit is actually changed. So its the
right behavior that there is no intercept on this instruction.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: SVM: remove now obsolete FIXME comment
Joerg Roedel [Wed, 16 Apr 2008 14:51:19 +0000 (16:51 +0200)]
KVM: SVM: remove now obsolete FIXME comment

With the usage of the V_TPR field this comment is now obsolete.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: SVM: disable CR8 intercept when tpr is not masking interrupts
Joerg Roedel [Wed, 16 Apr 2008 14:51:18 +0000 (16:51 +0200)]
KVM: SVM: disable CR8 intercept when tpr is not masking interrupts

This patch disables the intercept of CR8 writes if the TPR is not masking
interrupts. This reduces the total number CR8 intercepts to below 1 percent of
what we have without this patch using Windows 64 bit guests.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: SVM: sync V_TPR with LAPIC.TPR if CR8 write intercept is disabled
Joerg Roedel [Wed, 16 Apr 2008 14:51:17 +0000 (16:51 +0200)]
KVM: SVM: sync V_TPR with LAPIC.TPR if CR8 write intercept is disabled

If the CR8 write intercept is disabled the V_TPR field of the VMCB needs to be
synced with the TPR field in the local apic.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: export kvm_lapic_set_tpr() to modules
Joerg Roedel [Wed, 16 Apr 2008 14:51:16 +0000 (16:51 +0200)]
KVM: export kvm_lapic_set_tpr() to modules

This patch exports the kvm_lapic_set_tpr() function from the lapic code to
modules. It is required in the kvm-amd module to optimize CR8 intercepts.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: SVM: sync TPR value to V_TPR field in the VMCB
Joerg Roedel [Wed, 16 Apr 2008 14:51:15 +0000 (16:51 +0200)]
KVM: SVM: sync TPR value to V_TPR field in the VMCB

This patch adds syncing of the lapic.tpr field to the V_TPR field of the VMCB.
With this change we can safely remove the CR8 read intercept.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ppc: PowerPC 440 KVM implementation
Hollis Blanchard [Thu, 17 Apr 2008 04:28:09 +0000 (23:28 -0500)]
KVM: ppc: PowerPC 440 KVM implementation

This functionality is definitely experimental, but is capable of running
unmodified PowerPC 440 Linux kernels as guests on a PowerPC 440 host. (Only
tested with 440EP "Bamboo" guests so far, but with appropriate userspace
support other SoC/board combinations should work.)

See Documentation/powerpc/kvm_440.txt for technical details.

[stephen: build fix]

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: Add MAINTAINERS entry for PowerPC KVM
Hollis Blanchard [Thu, 17 Apr 2008 04:28:08 +0000 (23:28 -0500)]
KVM: Add MAINTAINERS entry for PowerPC KVM

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ppc: Add DCR access information to struct kvm_run
Hollis Blanchard [Thu, 17 Apr 2008 04:28:07 +0000 (23:28 -0500)]
KVM: ppc: Add DCR access information to struct kvm_run

Device Control Registers are essentially another address space found on PowerPC
4xx processors, analogous to PIO on x86. DCRs are always 32 bits, and can be
identified by a 32-bit number. We forward most DCR accesses to userspace for
emulation (with the exception of CPR0 registers, which can be read directly
for simplicity in timebase frequency determination).

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoppc: Export tlb_44x_hwater for KVM
Hollis Blanchard [Thu, 17 Apr 2008 04:28:06 +0000 (23:28 -0500)]
ppc: Export tlb_44x_hwater for KVM

PowerPC 440 KVM needs to know how many TLB entries are used for the host kernel
linear mapping (it does not modify these mappings when switching between guest
and host execution).

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: Rename debugfs_dir to kvm_debugfs_dir
Hollis Blanchard [Tue, 15 Apr 2008 21:05:42 +0000 (16:05 -0500)]
KVM: Rename debugfs_dir to kvm_debugfs_dir

It's a globally exported symbol now.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: x86 emulator: fix lea to really get the effective address
Avi Kivity [Mon, 14 Apr 2008 20:46:37 +0000 (23:46 +0300)]
KVM: x86 emulator: fix lea to really get the effective address

We never hit this, since there is currently no reason to emulate lea.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: x86 emulator: fix smsw and lmsw with a memory operand
Avi Kivity [Mon, 14 Apr 2008 11:40:50 +0000 (14:40 +0300)]
KVM: x86 emulator: fix smsw and lmsw with a memory operand

lmsw and smsw were implemented only with a register operand.  Extend them
to support a memory operand as well.  Fixes Windows running some display
compatibility test on AMD hosts.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: x86 emulator: initialize src.val and dst.val for register operands
Avi Kivity [Mon, 14 Apr 2008 20:27:07 +0000 (23:27 +0300)]
KVM: x86 emulator: initialize src.val and dst.val for register operands

This lets us treat the case where mod == 3 in the same manner as other cases.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: SVM: force a new asid when initializing the vmcb
Avi Kivity [Mon, 14 Apr 2008 10:10:21 +0000 (13:10 +0300)]
KVM: SVM: force a new asid when initializing the vmcb

Shutdown interception clears the vmcb, leaving the asid at zero (which is
illegal.  so force a new asid on vmcb initialization.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: fix kvm_vcpu_kick vs __vcpu_run race
Marcelo Tosatti [Fri, 11 Apr 2008 18:01:22 +0000 (15:01 -0300)]
KVM: fix kvm_vcpu_kick vs __vcpu_run race

There is a window open between testing of pending IRQ's
and assignment of guest_mode in __vcpu_run.

Injection of IRQ's can race with __vcpu_run as follows:

CPU0                                CPU1
kvm_x86_ops->run()
vcpu->guest_mode = 0                SET_IRQ_LINE ioctl
..
kvm_x86_ops->inject_pending_irq
kvm_cpu_has_interrupt()

                                    apic_test_and_set_irr()
                                    kvm_vcpu_kick
                                    if (vcpu->guest_mode)
                                        send_ipi()

vcpu->guest_mode = 1

So move guest_mode=1 assignment before ->inject_pending_irq, and make
sure that it won't reorder after it.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: add ioctls to save/store mpstate
Marcelo Tosatti [Fri, 11 Apr 2008 16:24:45 +0000 (13:24 -0300)]
KVM: add ioctls to save/store mpstate

So userspace can save/restore the mpstate during migration.

[avi: export the #define constants describing the value]
[christian: add s390 stubs]
[avi: ditto for ia64]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years ago[SCSI] esp_scsi: Make cur_residue and tot_residue signed.
David S. Miller [Sat, 19 Apr 2008 14:16:38 +0000 (09:16 -0500)]
[SCSI] esp_scsi: Make cur_residue and tot_residue signed.

Many of the overflow checks test whether the value has
gone negative, and we want to retain such checks.

Reported by Julia Lawall.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoide-tape: remove tape->merge_stage
Borislav Petkov [Sun, 27 Apr 2008 13:38:34 +0000 (15:38 +0200)]
ide-tape: remove tape->merge_stage

Get rid of the pipeline merge stage but retain the chrdev req caching
functionality by using a merge buffer tape->merge_bh which is flushed in chunks
of several blocks at a time. Also, remove last references to pipelining, e.g.
typedef idetape_stage_s.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: mv tape->merge_stage_size tape->merge_bh_size
Borislav Petkov [Sun, 27 Apr 2008 13:38:34 +0000 (15:38 +0200)]
ide-tape: mv tape->merge_stage_size tape->merge_bh_size

This is the size of the merge buffer.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: mv idetape_empty_write_pipeline ide_tape_flush_merge_buffer
Borislav Petkov [Sun, 27 Apr 2008 13:38:34 +0000 (15:38 +0200)]
ide-tape: mv idetape_empty_write_pipeline ide_tape_flush_merge_buffer

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: mv idetape_discard_read_pipeline ide_tape_discard_merge_buffer
Borislav Petkov [Sun, 27 Apr 2008 13:38:34 +0000 (15:38 +0200)]
ide-tape: mv idetape_discard_read_pipeline ide_tape_discard_merge_buffer

Also, rename its __-low level helper too.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: make __idetape_discard_read_pipeline() of type void
Borislav Petkov [Sun, 27 Apr 2008 13:38:34 +0000 (15:38 +0200)]
ide-tape: make __idetape_discard_read_pipeline() of type void

It always returns 0 which has no effect on tape positioning calculation so
simplify it by converting its type to void, bringing no functional change to the
driver.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove now unused ide_pci_create_host_proc()
Alexey Dobriyan [Sun, 27 Apr 2008 13:38:34 +0000 (15:38 +0200)]
ide: remove now unused ide_pci_create_host_proc()

It creates files in proc with obsoleted ->get_info interface.

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove /proc/ide/ali
Alexey Dobriyan [Sun, 27 Apr 2008 13:38:33 +0000 (15:38 +0200)]
ide: remove /proc/ide/ali

Bart says: "can be done from user-space and is not especially interesting
even when debugging problems (raw PCI config space dump is far more useful)."

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: improve buffer pages freeing strategy
Borislav Petkov [Sun, 27 Apr 2008 13:38:33 +0000 (15:38 +0200)]
ide-tape: improve buffer pages freeing strategy

Instead of freeing pages one by one, free them 2^order-wise. Also, mv
__idetape_kfree_stage() to ide_tape_kfree_buffer().

[bart: add updating bh->b_data]

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: mv tape->pages_per_stage tape->pages_per_buffer
Borislav Petkov [Sun, 27 Apr 2008 13:38:33 +0000 (15:38 +0200)]
ide-tape: mv tape->pages_per_stage tape->pages_per_buffer

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: mv tape->stage_size tape->buffer_size
Borislav Petkov [Sun, 27 Apr 2008 13:38:33 +0000 (15:38 +0200)]
ide-tape: mv tape->stage_size tape->buffer_size

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: improve buffer allocation strategy
Borislav Petkov [Sun, 27 Apr 2008 13:38:32 +0000 (15:38 +0200)]
ide-tape: improve buffer allocation strategy

Instead of allocating pages for the buffer one by one, take advantage of the
buddy alloc system and request them 2^order at a time. This increases the chance
for bigger buffer parts to be contigious and reduces loop iteration count. While
at it, rename function __idetape_kmalloc_stage() to ide_tape_kmalloc_buffer().

[bart: fold with "ide-tape: fix mem leak" patch to preserve bisectability]

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add struct ide_io_ports (take 3)
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:32 +0000 (15:38 +0200)]
ide: add struct ide_io_ports (take 3)

* Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
  in ide_hwif_t.

* Rename io_ports[] in hw_regs_t to io_ports_array[].

* Use un-named union for 'unsigned long io_ports_array[]' and 'struct
  ide_io_ports io_ports' in hw_regs_t.

* Remove IDE_*_OFFSET defines.

v2:
* scc_pata.c build fix from Stephen Rothwell.

v3:
* Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
  (Noticed by Andrew Morton)

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make ide_unregister() take 'ide_hwif_t *' as an argument (take 2)
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:31 +0000 (15:38 +0200)]
ide: make ide_unregister() take 'ide_hwif_t *' as an argument (take 2)

* Make ide_unregister() take 'ide_hwif_t *hwif' instead of 'unsigned int
  index' (hwif->index) as an argument and update all users accordingly.

While at it:

* Remove unnecessary checks for hwif != NULL from ide-pnp.c::idepnp_remove()
  and delkin_cb.c::delkin_cb_remove().

* Remove needless hwif->chipset assignment from scc_pata.c::scc_remove().

v2:
* Fixup ide_unregister() documentation.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: sanitize ide_unregister() usage
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:31 +0000 (15:38 +0200)]
ide: sanitize ide_unregister() usage

* Remove ide_unregister() call from ide_exit()
  (host drivers take care of unregistering hwif-s themselves).

* Remove ide_unregister() call from probe methods of
  bast-ide, palm_bk3710, ide-cs and delkin_cb host drivers
  (ide_find_port() returns only free ide_hwifs[] entries).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agompc8xx-ide: use ide_find_port()
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:30 +0000 (15:38 +0200)]
mpc8xx-ide: use ide_find_port()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add "noacpi" / "acpigtf" / "acpionboot" parameters
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:30 +0000 (15:38 +0200)]
ide: add "noacpi" / "acpigtf" / "acpionboot" parameters

* Rename ide_noacpi{tfs,onboot} to ide_acpi{gtf,onboot} (+ reverse logic).

* Move ide_*acpi* variables to ide-acpi.c and remove unnecessary initializers.

* Add "noacpi" / "acpigtf" / "acpionboot" parameters.

* Obsolete "ide=noacpi" / "ide=acpigtf" / "ide=acpionboot" kernel parameters.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agogayle: add "doubler" parameter
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:30 +0000 (15:38 +0200)]
gayle: add "doubler" parameter

* Add "doubler" parameter to enable support for IDE doublers.

* Obsolete "ide=doubler" kernel parameter.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add "cdrom=" and "chs=" parameters
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:30 +0000 (15:38 +0200)]
ide: add "cdrom=" and "chs=" parameters

* Add "cdrom=" and "chs=" parameters.

* Obsolete "hdx=cdrom" and "hdx=cyls,heads,sects" kernel parameters.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add "nodma|noflush|noprobe|nowerr=" parameters
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:30 +0000 (15:38 +0200)]
ide: add "nodma|noflush|noprobe|nowerr=" parameters

* Add "nodma|noflush|noprobe|nowerr=" parameters.

* Obsolete "hdx=noprobe|none|nowerr|nodma|noflush" kernel parameters.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove obsoleted "hdx=autotune" kernel parameter
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:29 +0000 (15:38 +0200)]
ide: remove obsoleted "hdx=autotune" kernel parameter

* Remove obsoleted "hdx=autotune" kernel parameter
  (we always auto-tune PIO if possible nowadays).

* Remove no longer needed ide_drive_t.autotune flag.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove IDE_HFLAG_NO_AUTOTUNE host flag
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:29 +0000 (15:38 +0200)]
ide: remove IDE_HFLAG_NO_AUTOTUNE host flag

* Don't set IDE_HFLAG_NO_AUTOTUNE host flag in sgiioc4 and icside
  host drivers - there is no need for it as they don't implement
  ->set_pio_mode method.

* Remove no longer needed IDE_HFLAG_NO_AUTOTUNE host flag.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agocmd640: always auto-tune PIO
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:29 +0000 (15:38 +0200)]
cmd640: always auto-tune PIO

* Default to tuning PIO0 and disabling prefetch prior to probing
  devices for CONFIG_BLK_DEV_CMD640_ENHANCED=y case.

* Always auto-tune PIO.

* Remove no longer used retrieve_drive_counts().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: always auto-tune PIO in legacy VLB host drivers
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:29 +0000 (15:38 +0200)]
ide: always auto-tune PIO in legacy VLB host drivers

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: mark "idebus=" kernel parameter as obsoleted (take 2)
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:29 +0000 (15:38 +0200)]
ide: mark "idebus=" kernel parameter as obsoleted (take 2)

We have "vlb|pci_clock=" parameters now.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add "vlb|pci_clock=" parameter
Bartlomiej Zolnierkiewicz [Sun, 27 Apr 2008 13:38:29 +0000 (15:38 +0200)]
ide: add "vlb|pci_clock=" parameter

* Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz).

* Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).

While at it:

* qd65xx.c: rename {active,recovery}_cycle variables to {act,rec}_cyc.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove comments markup from Documentation/ide/ide-tape.txt
Borislav Petkov [Sun, 27 Apr 2008 13:38:28 +0000 (15:38 +0200)]
ide-tape: remove comments markup from Documentation/ide/ide-tape.txt

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove pipelined mode description from Documentation/ide/ide-tape.txt
Borislav Petkov [Sun, 27 Apr 2008 13:38:28 +0000 (15:38 +0200)]
ide-tape: remove pipelined mode description from Documentation/ide/ide-tape.txt

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove misc references to pipelined operation in the comments
Borislav Petkov [Sun, 27 Apr 2008 13:38:28 +0000 (15:38 +0200)]
ide-tape: remove misc references to pipelined operation in the comments

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove pipelined mode parameters
Borislav Petkov [Sun, 27 Apr 2008 13:38:28 +0000 (15:38 +0200)]
ide-tape: remove pipelined mode parameters

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove pipeline-specific members from struct ide_tape_obj
Borislav Petkov [Sun, 27 Apr 2008 13:38:27 +0000 (15:38 +0200)]
ide-tape: remove pipeline-specific members from struct ide_tape_obj

Bart:
- merge "ide-tape: remove pipeline-specific code from idetape_setup" patch
- cleanup __idetape_discard_read_pipeline()
- cleanup idetape_empty_write_pipeline()
- fix 't' assignment in idetape_setup()
- fix idetape_blkdev_ioctl() w.r.t. 'nr_stages'

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove pipelined mode tape control flags
Borislav Petkov [Sun, 27 Apr 2008 13:38:27 +0000 (15:38 +0200)]
ide-tape: remove pipelined mode tape control flags

[bart: sync patch with current code and fix idetape_init_read()]

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>