aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-03 17:50:59 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-03 17:50:59 -0700
commit1f7abe86ce081437353b6f765e82f2eed1337427 (patch)
treed25109e97a571e97db814c8af42e07a789702e1f
parent10752217624970d25d2244bf9141c240be19ebd9 (diff)
parent31218ffa5c408e13a209fb6c131e417a8805e579 (diff)
downloadhistory-1f7abe86ce081437353b6f765e82f2eed1337427.tar.gz
Merge bk://kernel.bkbits.net/davem/sparc-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-rw-r--r--Documentation/feature-removal-schedule.txt24
-rw-r--r--Documentation/kbuild/kconfig-language.txt4
-rw-r--r--Documentation/nommu-mmap.txt81
-rw-r--r--MAINTAINERS2
-rw-r--r--arch/arm/common/Kconfig3
-rw-r--r--arch/arm/common/Makefile1
-rw-r--r--arch/arm/common/sa1111.c2
-rw-r--r--arch/arm/common/sharpsl_param.c60
-rw-r--r--arch/arm/kernel/time.c4
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c2
-rw-r--r--arch/arm/mach-integrator/time.c2
-rw-r--r--arch/arm/mach-pxa/Kconfig1
-rw-r--r--arch/arm/mach-pxa/corgi.c25
-rw-r--r--arch/arm/mach-pxa/corgi_ssp.c2
-rw-r--r--arch/arm/mach-pxa/poodle.c8
-rw-r--r--arch/arm/mach-s3c2410/dma.c2
-rw-r--r--arch/arm/mach-s3c2410/mach-rx3715.c16
-rw-r--r--arch/arm/mach-s3c2410/s3c2440.c2
-rw-r--r--arch/arm/mach-sa1100/Kconfig1
-rw-r--r--arch/arm/mach-sa1100/collie.c3
-rw-r--r--arch/arm/mach-sa1100/irq.c2
-rw-r--r--arch/arm/mach-sa1100/neponset.c2
-rw-r--r--arch/arm/oprofile/common.c2
-rw-r--r--arch/frv/mb93090-mb00/pci-frv.c6
-rw-r--r--arch/i386/kernel/cpu/intel_cacheinfo.c2
-rw-r--r--arch/i386/pci/i386.c8
-rw-r--r--arch/mips/pmc-sierra/yosemite/ht.c2
-rw-r--r--arch/ppc/Kconfig6
-rw-r--r--arch/ppc/Makefile2
-rw-r--r--arch/ppc/kernel/Makefile2
-rw-r--r--arch/ppc/kernel/head_fsl_booke.S (renamed from arch/ppc/kernel/head_e500.S)2
-rw-r--r--arch/ppc/kernel/pci.c4
-rw-r--r--arch/ppc/syslib/prom.c2
-rw-r--r--arch/ppc/syslib/prom_init.c127
-rw-r--r--arch/ppc/xmon/start.c4
-rw-r--r--arch/ppc/xmon/xmon.c8
-rw-r--r--arch/ppc64/kernel/pmc.c3
-rw-r--r--arch/ppc64/kernel/prom.c13
-rw-r--r--arch/sh/Kconfig11
-rw-r--r--arch/sh/drivers/pci/pci.c2
-rw-r--r--arch/sh64/kernel/pcibios.c2
-rw-r--r--arch/sparc64/Kconfig16
-rw-r--r--arch/sparc64/kernel/pci_psycho.c2
-rw-r--r--arch/sparc64/kernel/pci_sabre.c2
-rw-r--r--arch/sparc64/kernel/pci_schizo.c2
-rw-r--r--arch/x86_64/kernel/cpufreq/Kconfig28
-rw-r--r--arch/x86_64/kernel/pci-gart.c2
-rw-r--r--drivers/ide/Makefile3
-rw-r--r--drivers/ide/ide-cd.c71
-rw-r--r--drivers/ide/ide-cd.h2
-rw-r--r--drivers/ide/ide-default.c76
-rw-r--r--drivers/ide/ide-disk.c30
-rw-r--r--drivers/ide/ide-dma.c8
-rw-r--r--drivers/ide/ide-floppy.c48
-rw-r--r--drivers/ide/ide-io.c46
-rw-r--r--drivers/ide/ide-probe.c122
-rw-r--r--drivers/ide/ide-proc.c12
-rw-r--r--drivers/ide/ide-tape.c41
-rw-r--r--drivers/ide/ide-taskfile.c11
-rw-r--r--drivers/ide/ide.c86
-rw-r--r--drivers/ide/pci/serverworks.c8
-rw-r--r--drivers/ide/pci/via82cxxx.c7
-rw-r--r--drivers/mtd/maps/pci.c6
-rw-r--r--drivers/pci/Kconfig10
-rw-r--r--drivers/pci/Makefile4
-rw-r--r--drivers/pci/gen-devlist.c2
-rw-r--r--drivers/pci/hotplug.c19
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c4
-rw-r--r--drivers/pci/hotplug/ibmphp_pci.c48
-rw-r--r--drivers/pci/hotplug/pci_hotplug.h2
-rw-r--r--drivers/pci/hotplug/pci_hotplug_core.c5
-rw-r--r--drivers/pci/hotplug/rpaphp.h2
-rw-r--r--drivers/pci/hotplug/rpaphp_pci.c103
-rw-r--r--drivers/pci/hotplug/rpaphp_slot.c11
-rw-r--r--drivers/pci/msi.c4
-rw-r--r--drivers/pci/pci-driver.c11
-rw-r--r--drivers/pci/pci-sysfs.c4
-rw-r--r--drivers/pci/pci.c12
-rw-r--r--drivers/pci/pci.ids655
-rw-r--r--drivers/pci/probe.c28
-rw-r--r--drivers/pci/proc.c9
-rw-r--r--drivers/pci/quirks.c9
-rw-r--r--drivers/pci/remove.c8
-rw-r--r--drivers/pci/setup-bus.c25
-rw-r--r--drivers/pci/setup-irq.c12
-rw-r--r--drivers/pci/setup-res.c20
-rw-r--r--drivers/scsi/ide-scsi.c44
-rw-r--r--drivers/serial/8250.c8
-rw-r--r--drivers/serial/m32r_sio.c131
-rw-r--r--fs/ext3/acl.c6
-rw-r--r--fs/ext3/balloc.c76
-rw-r--r--fs/ext3/ialloc.c8
-rw-r--r--fs/ext3/inode.c63
-rw-r--r--fs/ext3/ioctl.c25
-rw-r--r--fs/ext3/super.c21
-rw-r--r--include/asm-arm/arch-integrator/lm.h2
-rw-r--r--include/asm-arm/arch-pxa/corgi.h34
-rw-r--r--include/asm-arm/arch-pxa/poodle.h41
-rw-r--r--include/asm-arm/arch-sa1100/collie.h28
-rw-r--r--include/asm-arm/hardware/amba.h2
-rw-r--r--include/asm-arm/hardware/locomo.h2
-rw-r--r--include/asm-arm/hardware/sa1111.h2
-rw-r--r--include/asm-arm/mach/sharpsl_param.h37
-rw-r--r--include/asm-i386/topology.h7
-rw-r--r--include/asm-m32r/serial.h41
-rw-r--r--include/asm-ppc/prom.h5
-rw-r--r--include/asm-ppc/unistd.h15
-rw-r--r--include/asm-ppc64/pgtable.h3
-rw-r--r--include/asm-x86_64/topology.h3
-rw-r--r--include/linux/ext3_fs.h1
-rw-r--r--include/linux/ext3_fs_i.h43
-rw-r--r--include/linux/ide.h6
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/pci.h2
-rw-r--r--include/linux/pci_ids.h4
-rw-r--r--include/net/gen_stats.h3
-rw-r--r--mm/nommu.c518
-rw-r--r--net/core/gen_stats.c48
-rw-r--r--net/core/sock.c2
-rw-r--r--net/sched/act_api.c2
120 files changed, 1848 insertions, 1479 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 2ea080c958bbd9..b6b1f5ab5354b0 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -17,21 +17,6 @@ Who: Greg Kroah-Hartman <greg@kroah.com>
---------------------------
-What: /proc/sys/cpu/*, sysctl and /proc/cpufreq interfaces to cpufreq (2.4.x interfaces)
-When: January 2005
-Files: drivers/cpufreq/: cpufreq_userspace.c, proc_intf.c
-Why: /proc/sys/cpu/* has been deprecated since inclusion of cpufreq into
- the main kernel tree. It bloats /proc/ unnecessarily and doesn't work
- well with the "governor"-based design of cpufreq.
- /proc/cpufreq/* has also been deprecated for a long time and was only
- meant for usage during 2.5. until the new sysfs-based interface became
- ready. It has an inconsistent interface which doesn't work well with
- userspace setting the frequency. The output from /proc/cpufreq/* can
- be emulated using "cpufreq-info --proc" (cpufrequtils).
- Both interfaces are superseded by the cpufreq interface in
- /sys/devices/system/cpu/cpu%n/cpufreq/.
-Who: Dominik Brodowski <linux@brodo.de>
-
What: ACPI S4bios support
When: May 2005
Why: Noone uses it, and it probably does not work, anyway. swsusp is
@@ -40,6 +25,15 @@ Who: Pavel Machek <pavel@suse.cz>
---------------------------
+What: PCI Name Database (CONFIG_PCI_NAMES)
+When: July 2005
+Why: It bloats the kernel unnecessarily, and is handled by userspace better
+ (pciutils supports it.) Will eliminate the need to try to keep the
+ pci.ids file in sync with the sf.net database all of the time.
+Who: Greg Kroah-Hartman <gregkh@suse.de>
+
+---------------------------
+
What: io_remap_page_range() (macro or function)
When: September 2005
Why: Replaced by io_remap_pfn_range() which allows more memory space
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt
index da51c0e7c19b9c..ca1967f3642398 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -48,7 +48,7 @@ Menu attributes
A menu entry can have a number of attributes. Not all of them are
applicable everywhere (see syntax).
-- type definition: "bool"/"tristate"/"string"/"hex"/"integer"
+- type definition: "bool"/"tristate"/"string"/"hex"/"int"
Every config option must have a type. There are only two basic types:
tristate and string, the other types are based on these two. The type
definition optionally accepts an input prompt, so these two examples
@@ -100,7 +100,7 @@ applicable everywhere (see syntax).
symbols.
- numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
- This allows to limit the range of possible input values for integer
+ This allows to limit the range of possible input values for int
and hex symbols. The user can only input a value which is larger than
or equal to the first symbol and smaller than or equal to the second
symbol.
diff --git a/Documentation/nommu-mmap.txt b/Documentation/nommu-mmap.txt
index fcf1c086f0ba43..b88ebe4d808c36 100644
--- a/Documentation/nommu-mmap.txt
+++ b/Documentation/nommu-mmap.txt
@@ -36,20 +36,35 @@ and it's also much more restricted in the latter case:
In the MMU case: VM regions backed by pages read from file; changes to
the underlying file are reflected in the mapping; copied across fork.
- In the no-MMU case: VM regions backed by arbitrary contiguous runs of
- pages into which the appropriate bit of the file is read; any remaining
- bit of the mapping is cleared; such mappings are shared if possible;
- writes to the file do not affect the mapping; writes to the mapping are
- visible in other processes (no MMU protection), but should not happen.
+ In the no-MMU case:
+
+ - If one exists, the kernel will re-use an existing mapping to the
+ same segment of the same file if that has compatible permissions,
+ even if this was created by another process.
+
+ - If possible, the file mapping will be directly on the backing device
+ if the backing device has the BDI_CAP_MAP_DIRECT capability and
+ appropriate mapping protection capabilities. Ramfs, romfs, cramfs
+ and mtd might all permit this.
+
+ - If the backing device device can't or won't permit direct sharing,
+ but does have the BDI_CAP_MAP_COPY capability, then a copy of the
+ appropriate bit of the file will be read into a contiguous bit of
+ memory and any extraneous space beyond the EOF will be cleared
+
+ - Writes to the file do not affect the mapping; writes to the mapping
+ are visible in other processes (no MMU protection), but should not
+ happen.
(*) File, MAP_PRIVATE, PROT_READ / PROT_EXEC, PROT_WRITE
In the MMU case: like the non-PROT_WRITE case, except that the pages in
question get copied before the write actually happens. From that point
- on writes to that page in the file no longer get reflected into the
- mapping's backing pages.
+ on writes to the file underneath that page no longer get reflected into
+ the mapping's backing pages. The page is then backed by swap instead.
- In the no-MMU case: works exactly as for the non-PROT_WRITE case.
+ In the no-MMU case: works much like the non-PROT_WRITE case, except
+ that a copy is always taken and never shared.
(*) Regular file / blockdev, MAP_SHARED, PROT_READ / PROT_EXEC / PROT_WRITE
@@ -70,6 +85,15 @@ and it's also much more restricted in the latter case:
as for the MMU case. If the filesystem does not provide any such
support, then the mapping request will be denied.
+ (*) Memory backed blockdev, MAP_SHARED, PROT_READ / PROT_EXEC / PROT_WRITE
+
+ In the MMU case: As for ordinary regular files.
+
+ In the no-MMU case: As for memory backed regular files, but the
+ blockdev must be able to provide a contiguous run of pages without
+ truncate being called. The ramdisk driver could do this if it allocated
+ all its memory as a contiguous array upfront.
+
(*) Memory backed chardev, MAP_SHARED, PROT_READ / PROT_EXEC / PROT_WRITE
In the MMU case: As for ordinary regular files.
@@ -95,12 +119,12 @@ FURTHER NOTES ON NO-MMU MMAP
(*) Supplying MAP_FIXED or a requesting a particular mapping address will
result in an error.
- (*) Files mapped privately must have a read method provided by the driver or
- filesystem so that the contents can be read into the memory allocated. An
+ (*) Files mapped privately usually have to have a read method provided by the
+ driver or filesystem so that the contents can be read into the memory
+ allocated if mmap() chooses not to map the backing device directly. An
error will result if they don't. This is most likely to be encountered
with character device files, pipes, fifos and sockets.
-
============================================
PROVIDING SHAREABLE CHARACTER DEVICE SUPPORT
============================================
@@ -111,6 +135,15 @@ to get a proposed address for the mapping. This may return an error if it
doesn't wish to honour the mapping because it's too long, at a weird offset,
under some unsupported combination of flags or whatever.
+The driver should also provide backing device information with capabilities set
+to indicate the permitted types of mapping on such devices. The default is
+assumed to be readable and writable, not executable, and only shareable
+directly (can't be copied).
+
+The file->f_op->mmap() operation will be called to actually inaugurate the
+mapping. It can be rejected at that point. Returning the ENOSYS error will
+cause the mapping to be copied instead if BDI_CAP_MAP_COPY is specified.
+
The vm_ops->close() routine will be invoked when the last mapping on a chardev
is removed. An existing mapping will be shared, partially or not, if possible
without notifying the driver.
@@ -120,7 +153,22 @@ return -ENOSYS. This will be taken to mean that this operation just doesn't
want to handle it, despite the fact it's got an operation. For instance, it
might try directing the call to a secondary driver which turns out not to
implement it. Such is the case for the framebuffer driver which attempts to
-direct the call to the device-specific driver.
+direct the call to the device-specific driver. Under such circumstances, the
+mapping request will be rejected if BDI_CAP_MAP_COPY is not specified, and a
+copy mapped otherwise.
+
+IMPORTANT NOTE:
+
+ Some types of device may present a different appearance to anyone
+ looking at them in certain modes. Flash chips can be like this; for
+ instance if they're in programming or erase mode, you might see the
+ status reflected in the mapping, instead of the data.
+
+ In such a case, care must be taken lest userspace see a shared or a
+ private mapping showing such information when the driver is busy
+ controlling the device. Remember especially: private executable
+ mappings may still be mapped directly off the device under some
+ circumstances!
==============================================
@@ -139,3 +187,12 @@ memory.
Memory backed devices are indicated by the mapping's backing device info having
the memory_backed flag set.
+
+
+========================================
+PROVIDING SHAREABLE BLOCK DEVICE SUPPORT
+========================================
+
+Provision of shared mappings on block device files is exactly the same as for
+character devices. If there isn't a real device underneath, then the driver
+should allocate sufficient contiguous memory to honour any supported mapping.
diff --git a/MAINTAINERS b/MAINTAINERS
index 2d0fd20388cef7..df8f605703103c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -605,7 +605,7 @@ P: Herbert Xu
M: herbert@gondor.apana.org.au
P: David S. Miller
M: davem@davemloft.net
-L: linux-kernel@vger.kernel.org
+L: linux-crypto@vger.kernel.org
S: Maintained
CYBERPRO FB DRIVER
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
index 7f5df795881dff..692af6b5e8ff25 100644
--- a/arch/arm/common/Kconfig
+++ b/arch/arm/common/Kconfig
@@ -17,5 +17,8 @@ config TIMER_ACORN
config SHARP_LOCOMO
bool
+config SHARP_PARAM
+ bool
+
config SHARP_SCOOP
bool
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
index ba4a9d3957ccee..11f20a43ee3aa8 100644
--- a/arch/arm/common/Makefile
+++ b/arch/arm/common/Makefile
@@ -11,4 +11,5 @@ obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o
obj-$(CONFIG_DMABOUNCE) += dmabounce.o
obj-$(CONFIG_TIMER_ACORN) += time-acorn.o
obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
+obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
obj-$(CONFIG_SHARP_SCOOP) += scoop.o
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 37a39f229236d8..21fce3414ed1e2 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -800,7 +800,7 @@ struct sa1111_save_data {
#ifdef CONFIG_PM
-static int sa1111_suspend(struct device *dev, u32 state, u32 level)
+static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level)
{
struct sa1111 *sachip = dev_get_drvdata(dev);
struct sa1111_save_data *save;
diff --git a/arch/arm/common/sharpsl_param.c b/arch/arm/common/sharpsl_param.c
new file mode 100644
index 00000000000000..c2c557a224c2af
--- /dev/null
+++ b/arch/arm/common/sharpsl_param.c
@@ -0,0 +1,60 @@
+/*
+ * Hardware parameter area specific to Sharp SL series devices
+ *
+ * Copyright (c) 2005 Richard Purdie
+ *
+ * Based on Sharp's 2.4 kernel patches
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <asm/mach/sharpsl_param.h>
+
+/*
+ * Certain hardware parameters determined at the time of device manufacture,
+ * typically including LCD parameters are loaded by the bootloader at the
+ * address PARAM_BASE. As the kernel will overwrite them, we need to store
+ * them early in the boot process, then pass them to the appropriate drivers.
+ * Not all devices use all paramaters but the format is common to all.
+ */
+#ifdef ARCH_SA1100
+#define PARAM_BASE 0xe8ffc000
+#else
+#define PARAM_BASE 0xa0000a00
+#endif
+#define MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a )
+
+#define COMADJ_MAGIC MAGIC_CHG('C','M','A','D')
+#define UUID_MAGIC MAGIC_CHG('U','U','I','D')
+#define TOUCH_MAGIC MAGIC_CHG('T','U','C','H')
+#define AD_MAGIC MAGIC_CHG('B','V','A','D')
+#define PHAD_MAGIC MAGIC_CHG('P','H','A','D')
+
+struct sharpsl_param_info sharpsl_param;
+
+void sharpsl_save_param(void)
+{
+ memcpy(&sharpsl_param, (void *)PARAM_BASE, sizeof(struct sharpsl_param_info));
+
+ if (sharpsl_param.comadj_keyword != COMADJ_MAGIC)
+ sharpsl_param.comadj=-1;
+
+ if (sharpsl_param.phad_keyword != PHAD_MAGIC)
+ sharpsl_param.phadadj=-1;
+
+ if (sharpsl_param.uuid_keyword != UUID_MAGIC)
+ sharpsl_param.uuid[0]=-1;
+
+ if (sharpsl_param.touch_keyword != TOUCH_MAGIC)
+ sharpsl_param.touch_xp=-1;
+
+ if (sharpsl_param.adadj_keyword != AD_MAGIC)
+ sharpsl_param.adadj=-1;
+}
+
+
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 3c62021fc838c3..c232f24f4a6004 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -178,7 +178,7 @@ static ssize_t leds_store(struct sys_device *dev, const char *buf, size_t size)
static SYSDEV_ATTR(event, 0200, NULL, leds_store);
-static int leds_suspend(struct sys_device *dev, u32 state)
+static int leds_suspend(struct sys_device *dev, pm_message_t state)
{
leds_event(led_stop);
return 0;
@@ -351,7 +351,7 @@ void timer_tick(struct pt_regs *regs)
}
#ifdef CONFIG_PM
-static int timer_suspend(struct sys_device *dev, u32 state)
+static int timer_suspend(struct sys_device *dev, pm_message_t state)
{
struct sys_timer *timer = container_of(dev, struct sys_timer, dev);
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 219ae5080a3079..91ba9fd79c87c7 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -137,7 +137,7 @@ static void __init ap_init_irq(void)
#ifdef CONFIG_PM
static unsigned long ic_irq_enable;
-static int irq_suspend(struct sys_device *dev, u32 state)
+static int irq_suspend(struct sys_device *dev, pm_message_t state)
{
ic_irq_enable = readl(VA_IC_BASE + IRQ_ENABLE);
return 0;
diff --git a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c
index 249581f88f5ecf..20729de2af285d 100644
--- a/arch/arm/mach-integrator/time.c
+++ b/arch/arm/mach-integrator/time.c
@@ -158,7 +158,7 @@ static int rtc_remove(struct amba_device *dev)
static struct timespec rtc_delta;
-static int rtc_suspend(struct amba_device *dev, u32 state)
+static int rtc_suspend(struct amba_device *dev, pm_message_t state)
{
struct timespec rtc;
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index c437660bf92f82..405a55f2287cc8 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -23,6 +23,7 @@ config PXA_SHARPSL
bool "SHARP SL-5600 and SL-C7xx Models"
select PXA25x
select SHARP_SCOOP
+ select SHARP_PARAM
help
Say Y here if you intend to run this kernel on a
Sharp SL-5600 (Poodle), Sharp SL-C700 (Corgi),
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 94841068a688e5..f691cf77d3908a 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -37,6 +37,7 @@
#include <asm/arch/udc.h>
#include <asm/arch/corgi.h>
+#include <asm/mach/sharpsl_param.h>
#include <asm/hardware/scoop.h>
#include <video/w100fb.h>
@@ -231,28 +232,10 @@ static struct platform_device *devices[] __initdata = {
&corgibl_device,
};
-static struct sharpsl_flash_param_info sharpsl_flash_param;
-
-static void corgi_get_param(void)
-{
- sharpsl_flash_param.comadj_keyword = readl(FLASH_MEM_BASE + FLASH_COMADJ_MAGIC_ADR);
- sharpsl_flash_param.comadj = readl(FLASH_MEM_BASE + FLASH_COMADJ_DATA_ADR);
-
- sharpsl_flash_param.phad_keyword = readl(FLASH_MEM_BASE + FLASH_PHAD_MAGIC_ADR);
- sharpsl_flash_param.phadadj = readl(FLASH_MEM_BASE + FLASH_PHAD_DATA_ADR);
-}
-
static void __init corgi_init(void)
{
- if (sharpsl_flash_param.comadj_keyword == FLASH_COMADJ_MAJIC)
- corgi_fb_info.comadj=sharpsl_flash_param.comadj;
- else
- corgi_fb_info.comadj=-1;
-
- if (sharpsl_flash_param.phad_keyword == FLASH_PHAD_MAJIC)
- corgi_fb_info.phadadj=sharpsl_flash_param.phadadj;
- else
- corgi_fb_info.phadadj=-1;
+ corgi_fb_info.comadj=sharpsl_param.comadj;
+ corgi_fb_info.phadadj=sharpsl_param.phadadj;
pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT);
pxa_set_udc_info(&udc_info);
@@ -264,7 +247,7 @@ static void __init corgi_init(void)
static void __init fixup_corgi(struct machine_desc *desc,
struct tag *tags, char **cmdline, struct meminfo *mi)
{
- corgi_get_param();
+ sharpsl_save_param();
mi->nr_banks=1;
mi->bank[0].start = 0xa0000000;
mi->bank[0].node = 0;
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
index 9e01883025d6aa..8ccffba0018fa5 100644
--- a/arch/arm/mach-pxa/corgi_ssp.c
+++ b/arch/arm/mach-pxa/corgi_ssp.c
@@ -210,7 +210,7 @@ static int corgi_ssp_remove(struct device *dev)
return 0;
}
-static int corgi_ssp_suspend(struct device *dev, u32 state, u32 level)
+static int corgi_ssp_suspend(struct device *dev, pm_message_t state, u32 level)
{
if (level == SUSPEND_POWER_DOWN) {
ssp_flush(&corgi_ssp_dev);
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 5ee67808224a9f..b6c746ea38305b 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -35,6 +35,7 @@
#include <asm/hardware/scoop.h>
#include <asm/hardware/locomo.h>
+#include <asm/mach/sharpsl_param.h>
#include "generic.h"
@@ -152,6 +153,12 @@ static void __init poodle_init(void)
}
}
+static void __init fixup_poodle(struct machine_desc *desc,
+ struct tag *tags, char **cmdline, struct meminfo *mi)
+{
+ sharpsl_save_param();
+}
+
static struct map_desc poodle_io_desc[] __initdata = {
/* virtual physical length */
{ 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */
@@ -174,6 +181,7 @@ static void __init poodle_map_io(void)
MACHINE_START(POODLE, "SHARP Poodle")
BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
+ FIXUP(fixup_poodle)
MAPIO(poodle_map_io)
INITIRQ(pxa_init_irq)
.timer = &pxa_timer,
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index 5ecfa583711601..bc229fab86d446 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -1092,7 +1092,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition);
#ifdef CONFIG_PM
-static int s3c2410_dma_suspend(struct sys_device *dev, u32 state)
+static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state)
{
s3c2410_dma_chan_t *cp = container_of(dev, s3c2410_dma_chan_t, dev);
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c
index 26e2d86cdd03c4..f8d3a9784e711b 100644
--- a/arch/arm/mach-s3c2410/mach-rx3715.c
+++ b/arch/arm/mach-s3c2410/mach-rx3715.c
@@ -54,6 +54,16 @@ static struct map_desc rx3715_iodesc[] __initdata = {
{ (u32)S3C24XX_VA_ISA_BYTE, S3C2410_CS3, SZ_16M, MT_DEVICE },
};
+
+static struct s3c24xx_uart_clksrc rx3715_serial_clocks[] = {
+ [0] = {
+ .name = "fclk",
+ .divisor = 0,
+ .min_baud = 0,
+ .max_baud = 0,
+ }
+};
+
static struct s3c2410_uartcfg rx3715_uartcfgs[] = {
[0] = {
.hwport = 0,
@@ -61,6 +71,8 @@ static struct s3c2410_uartcfg rx3715_uartcfgs[] = {
.ucon = 0x3c5,
.ulcon = 0x03,
.ufcon = 0x51,
+ .clocks = rx3715_serial_clocks,
+ .clocks_size = ARRAY_SIZE(rx3715_serial_clocks),
},
[1] = {
.hwport = 1,
@@ -68,6 +80,8 @@ static struct s3c2410_uartcfg rx3715_uartcfgs[] = {
.ucon = 0x3c5,
.ulcon = 0x03,
.ufcon = 0x00,
+ .clocks = rx3715_serial_clocks,
+ .clocks_size = ARRAY_SIZE(rx3715_serial_clocks),
},
/* IR port */
[2] = {
@@ -76,6 +90,8 @@ static struct s3c2410_uartcfg rx3715_uartcfgs[] = {
.ucon = 0x3c5,
.ulcon = 0x43,
.ufcon = 0x51,
+ .clocks = rx3715_serial_clocks,
+ .clocks_size = ARRAY_SIZE(rx3715_serial_clocks),
}
};
diff --git a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c
index 7799d81494615c..9a8cc5ae225566 100644
--- a/arch/arm/mach-s3c2410/s3c2440.c
+++ b/arch/arm/mach-s3c2410/s3c2440.c
@@ -159,7 +159,7 @@ struct sleep_save s3c2440_sleep[] = {
SAVE_ITEM(S3C2440_GPJUP)
};
-static int s3c2440_suspend(struct sys_device *dev, u32 state)
+static int s3c2440_suspend(struct sys_device *dev, pm_message_t state)
{
s3c2410_pm_do_save(s3c2440_sleep, ARRAY_SIZE(s3c2440_sleep));
return 0;
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
index 5178cde08ab969..50cde576dadfc9 100644
--- a/arch/arm/mach-sa1100/Kconfig
+++ b/arch/arm/mach-sa1100/Kconfig
@@ -47,6 +47,7 @@ config SA1100_COLLIE
bool "Sharp Zaurus SL5500"
select SHARP_LOCOMO
select SHARP_SCOOP
+ select SHARP_PARAM
help
Say Y here to support the Sharp Zaurus SL5500 PDAs.
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index da9412c5d385ee..99287890d3964e 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -38,6 +38,7 @@
#include <asm/mach/serial_sa1100.h>
#include <asm/hardware/scoop.h>
+#include <asm/mach/sharpsl_param.h>
#include <asm/hardware/locomo.h>
#include "generic.h"
@@ -166,6 +167,8 @@ static void __init collie_init(void)
sa11x0_set_flash_data(&collie_flash_data, collie_flash_resources,
ARRAY_SIZE(collie_flash_resources));
+
+ sharpsl_save_param();
}
static struct map_desc collie_io_desc[] __initdata = {
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index 64dd21cfba4311..66a929cb7bc5ba 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -218,7 +218,7 @@ static struct sa1100irq_state {
unsigned int iccr;
} sa1100irq_state;
-static int sa1100irq_suspend(struct sys_device *dev, u32 state)
+static int sa1100irq_suspend(struct sys_device *dev, pm_message_t state)
{
struct sa1100irq_state *st = &sa1100irq_state;
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 6ffa50151a8c31..1405383463ea75 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -178,7 +178,7 @@ static int neponset_probe(struct device *dev)
/*
* LDM power management.
*/
-static int neponset_suspend(struct device *dev, u32 state, u32 level)
+static int neponset_suspend(struct device *dev, pm_message_t state, u32 level)
{
/*
* Save state.
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index 615a3ccfea5cbe..e57dde88289813 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@ -26,7 +26,7 @@ static void pmu_stop(void);
static int pmu_create_files(struct super_block *, struct dentry *);
#ifdef CONFIG_PM
-static int pmu_suspend(struct sys_device *dev, u32 state)
+static int pmu_suspend(struct sys_device *dev, pm_message_t state)
{
if (pmu_enabled)
pmu_stop();
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
index c5a7f78bf5f980..83e5489cf039a3 100644
--- a/arch/frv/mb93090-mb00/pci-frv.c
+++ b/arch/frv/mb93090-mb00/pci-frv.c
@@ -31,7 +31,7 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
if (resource < 6) {
reg = PCI_BASE_ADDRESS_0 + 4*resource;
} else if (resource == PCI_ROM_RESOURCE) {
- res->flags |= PCI_ROM_ADDRESS_ENABLE;
+ res->flags |= IORESOURCE_ROM_ENABLE;
new |= PCI_ROM_ADDRESS_ENABLE;
reg = dev->rom_base_reg;
} else {
@@ -170,11 +170,11 @@ static void __init pcibios_allocate_resources(int pass)
}
if (!pass) {
r = &dev->resource[PCI_ROM_RESOURCE];
- if (r->flags & PCI_ROM_ADDRESS_ENABLE) {
+ if (r->flags & IORESOURCE_ROM_ENABLE) {
/* Turn the ROM off, leave the resource region, but keep it unregistered. */
u32 reg;
DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
- r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
+ r->flags &= ~IORESOURCE_ROM_ENABLE;
pci_read_config_dword(dev, dev->rom_base_reg, &reg);
pci_write_config_dword(dev, dev->rom_base_reg, reg & ~PCI_ROM_ADDRESS_ENABLE);
}
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c
index 7d1d350bf87e8c..aeb5b4ef8c8b52 100644
--- a/arch/i386/kernel/cpu/intel_cacheinfo.c
+++ b/arch/i386/kernel/cpu/intel_cacheinfo.c
@@ -311,8 +311,10 @@ static void __devinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
if (num_threads_sharing == 1)
cpu_set(cpu, this_leaf->shared_cpu_map);
+#ifdef CONFIG_X86_HT
else if (num_threads_sharing == smp_num_siblings)
this_leaf->shared_cpu_map = cpu_sibling_map[cpu];
+#endif
else
printk(KERN_INFO "Number of CPUs sharing cache didn't match "
"any known set of CPUs\n");
diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c
index 7a7b35a375d8d5..c205ea7e233bcd 100644
--- a/arch/i386/pci/i386.c
+++ b/arch/i386/pci/i386.c
@@ -124,7 +124,7 @@ static void __init pcibios_allocate_resources(int pass)
u16 command;
struct resource *r, *pr;
- while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ for_each_pci_dev(dev) {
pci_read_config_word(dev, PCI_COMMAND, &command);
for(idx = 0; idx < 6; idx++) {
r = &dev->resource[idx];
@@ -150,11 +150,11 @@ static void __init pcibios_allocate_resources(int pass)
}
if (!pass) {
r = &dev->resource[PCI_ROM_RESOURCE];
- if (r->flags & PCI_ROM_ADDRESS_ENABLE) {
+ if (r->flags & IORESOURCE_ROM_ENABLE) {
/* Turn the ROM off, leave the resource region, but keep it unregistered. */
u32 reg;
DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
- r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
+ r->flags &= ~IORESOURCE_ROM_ENABLE;
pci_read_config_dword(dev, dev->rom_base_reg, &reg);
pci_write_config_dword(dev, dev->rom_base_reg, reg & ~PCI_ROM_ADDRESS_ENABLE);
}
@@ -168,7 +168,7 @@ static int __init pcibios_assign_resources(void)
int idx;
struct resource *r;
- while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ for_each_pci_dev(dev) {
int class = dev->class >> 8;
/* Don't touch classless devices and host bridges */
diff --git a/arch/mips/pmc-sierra/yosemite/ht.c b/arch/mips/pmc-sierra/yosemite/ht.c
index ca811853e87f5a..dad228d3a220ed 100644
--- a/arch/mips/pmc-sierra/yosemite/ht.c
+++ b/arch/mips/pmc-sierra/yosemite/ht.c
@@ -361,7 +361,7 @@ void pcibios_update_resource(struct pci_dev *dev, struct resource *root,
if (resource < 6) {
reg = PCI_BASE_ADDRESS_0 + 4 * resource;
} else if (resource == PCI_ROM_RESOURCE) {
- res->flags |= PCI_ROM_ADDRESS_ENABLE;
+ res->flags |= IORESOURCE_ROM_ENABLE;
reg = dev->rom_base_reg;
} else {
/*
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 59995a4308683d..813c6c9a6d9921 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -203,16 +203,12 @@ source "drivers/cpufreq/Kconfig"
config CPU_FREQ_PMAC
bool "Support for Apple PowerBooks"
depends on CPU_FREQ && ADB_PMU
+ select CPU_FREQ_TABLE
help
This adds support for frequency switching on Apple PowerBooks,
this currently includes some models of iBook & Titanium
PowerBook.
-config CPU_FREQ_TABLE
- tristate
- depends on CPU_FREQ_PMAC
- default y
-
config PPC601_SYNC_FIX
bool "Workarounds for PPC601 bugs"
depends on 6xx && (PPC_PREP || PPC_PMAC)
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index 80497b9078336b..73cbdda5b5973c 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -49,7 +49,7 @@ head-y := arch/ppc/kernel/head.o
head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o
head-$(CONFIG_4xx) := arch/ppc/kernel/head_4xx.o
head-$(CONFIG_44x) := arch/ppc/kernel/head_44x.o
-head-$(CONFIG_E500) := arch/ppc/kernel/head_e500.o
+head-$(CONFIG_FSL_BOOKE) := arch/ppc/kernel/head_fsl_booke.o
head-$(CONFIG_6xx) += arch/ppc/kernel/idle_6xx.o
head-$(CONFIG_POWER4) += arch/ppc/kernel/idle_power4.o
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
index 1f98f26e58aef7..86bc878cb3ee55 100644
--- a/arch/ppc/kernel/Makefile
+++ b/arch/ppc/kernel/Makefile
@@ -5,7 +5,7 @@
extra-$(CONFIG_PPC_STD_MMU) := head.o
extra-$(CONFIG_40x) := head_4xx.o
extra-$(CONFIG_44x) := head_44x.o
-extra-$(CONFIG_E500) := head_e500.o
+extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o
extra-$(CONFIG_8xx) := head_8xx.o
extra-$(CONFIG_6xx) += idle_6xx.o
extra-$(CONFIG_POWER4) += idle_power4.o
diff --git a/arch/ppc/kernel/head_e500.S b/arch/ppc/kernel/head_fsl_booke.S
index e478de5a92d32c..dea19c216fc3d7 100644
--- a/arch/ppc/kernel/head_e500.S
+++ b/arch/ppc/kernel/head_fsl_booke.S
@@ -1,5 +1,5 @@
/*
- * arch/ppc/kernel/head_e500.S
+ * arch/ppc/kernel/head_fsl_booke.S
*
* Kernel execution entry point code.
*
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
index b8f67396ec48de..98f94b60204cc6 100644
--- a/arch/ppc/kernel/pci.c
+++ b/arch/ppc/kernel/pci.c
@@ -521,11 +521,11 @@ pcibios_allocate_resources(int pass)
if (pass)
continue;
r = &dev->resource[PCI_ROM_RESOURCE];
- if (r->flags & PCI_ROM_ADDRESS_ENABLE) {
+ if (r->flags & IORESOURCE_ROM_ENABLE) {
/* Turn the ROM off, leave the resource region, but keep it unregistered. */
u32 reg;
DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
- r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
+ r->flags &= ~IORESOURCE_ROM_ENABLE;
pci_read_config_dword(dev, dev->rom_base_reg, &reg);
pci_write_config_dword(dev, dev->rom_base_reg,
reg & ~PCI_ROM_ADDRESS_ENABLE);
diff --git a/arch/ppc/syslib/prom.c b/arch/ppc/syslib/prom.c
index 7abcdb526ed5d5..2c64ed627475d0 100644
--- a/arch/ppc/syslib/prom.c
+++ b/arch/ppc/syslib/prom.c
@@ -308,7 +308,7 @@ map_interrupt(unsigned int **irq, struct device_node **ictrler,
struct device_node *p, *ipar;
unsigned int *imap, *imask, *ip;
int i, imaplen, match;
- int newintrc, newaddrc;
+ int newintrc = 1, newaddrc = 1;
unsigned int *reg;
int naddrc;
diff --git a/arch/ppc/syslib/prom_init.c b/arch/ppc/syslib/prom_init.c
index 83686bc4d79f9f..2cee87137f2efa 100644
--- a/arch/ppc/syslib/prom_init.c
+++ b/arch/ppc/syslib/prom_init.c
@@ -53,11 +53,13 @@ extern const struct linux_logo logo_linux_clut224;
#define ALIGNUL(x) (((x) + sizeof(unsigned long)-1) & -sizeof(unsigned long))
+typedef u32 prom_arg_t;
+
struct prom_args {
const char *service;
int nargs;
int nret;
- void *args[10];
+ prom_arg_t args[10];
};
struct pci_address {
@@ -93,9 +95,9 @@ struct pci_intr_map {
};
static void prom_exit(void);
-static void *call_prom(const char *service, int nargs, int nret, ...);
-static void *call_prom_ret(const char *service, int nargs, int nret,
- void **rets, ...);
+static int call_prom(const char *service, int nargs, int nret, ...);
+static int call_prom_ret(const char *service, int nargs, int nret,
+ prom_arg_t *rets, ...);
static void prom_print_hex(unsigned int v);
static int prom_set_color(ihandle ih, int i, int r, int g, int b);
static int prom_next_node(phandle *nodep);
@@ -146,7 +148,7 @@ prom_exit(void)
;
}
-static void * __init
+static int __init
call_prom(const char *service, int nargs, int nret, ...)
{
va_list list;
@@ -158,16 +160,16 @@ call_prom(const char *service, int nargs, int nret, ...)
prom_args.nret = nret;
va_start(list, nret);
for (i = 0; i < nargs; ++i)
- prom_args.args[i] = va_arg(list, void *);
+ prom_args.args[i] = va_arg(list, prom_arg_t);
va_end(list);
for (i = 0; i < nret; ++i)
- prom_args.args[i + nargs] = NULL;
+ prom_args.args[i + nargs] = 0;
prom(&prom_args);
return prom_args.args[nargs];
}
-static void * __init
-call_prom_ret(const char *service, int nargs, int nret, void **rets, ...)
+static int __init
+call_prom_ret(const char *service, int nargs, int nret, prom_arg_t *rets, ...)
{
va_list list;
int i;
@@ -178,10 +180,10 @@ call_prom_ret(const char *service, int nargs, int nret, void **rets, ...)
prom_args.nret = nret;
va_start(list, rets);
for (i = 0; i < nargs; ++i)
- prom_args.args[i] = va_arg(list, void *);
+ prom_args.args[i] = va_arg(list, int);
va_end(list);
for (i = 0; i < nret; ++i)
- prom_args.args[i + nargs] = NULL;
+ prom_args.args[i + nargs] = 0;
prom(&prom_args);
for (i = 1; i < nret; ++i)
rets[i-1] = prom_args.args[nargs + i];
@@ -227,19 +229,7 @@ prom_print_hex(unsigned int v)
static int __init
prom_set_color(ihandle ih, int i, int r, int g, int b)
{
- struct prom_args prom_args;
-
- prom_args.service = "call-method";
- prom_args.nargs = 6;
- prom_args.nret = 1;
- prom_args.args[0] = "color!";
- prom_args.args[1] = ih;
- prom_args.args[2] = (void *) i;
- prom_args.args[3] = (void *) b;
- prom_args.args[4] = (void *) g;
- prom_args.args[5] = (void *) r;
- prom(&prom_args);
- return (int) prom_args.args[6];
+ return call_prom("call-method", 6, 1, "color!", ih, i, b, g, r);
}
static int __init
@@ -363,9 +353,9 @@ check_display(unsigned long mem)
};
const unsigned char *clut;
- prom_disp_node = NULL;
+ prom_disp_node = 0;
- for (node = NULL; prom_next_node(&node); ) {
+ for (node = 0; prom_next_node(&node); ) {
type[0] = 0;
call_prom("getprop", 4, 1, node, "device_type",
type, sizeof(type));
@@ -374,8 +364,7 @@ check_display(unsigned long mem)
/* It seems OF doesn't null-terminate the path :-( */
path = (char *) mem;
memset(path, 0, 256);
- if ((int) call_prom("package-to-path", 3, 1,
- node, path, 255) < 0)
+ if (call_prom("package-to-path", 3, 1, node, path, 255) < 0)
continue;
/*
@@ -417,11 +406,11 @@ check_display(unsigned long mem)
prom_disp_node = prom_display_nodes[j];
j--;
} else
- prom_disp_node = NULL;
+ prom_disp_node = 0;
continue;
} else {
prom_print("... ok\n");
- call_prom("setprop", 4, 1, node, "linux,opened", 0, NULL);
+ call_prom("setprop", 4, 1, node, "linux,opened", 0, 0);
/*
* Setup a usable color table when the appropriate
@@ -448,13 +437,13 @@ check_display(unsigned long mem)
if (prom_stdout) {
phandle p;
p = call_prom("instance-to-package", 1, 1, prom_stdout);
- if (p && (int)p != -1) {
+ if (p && p != -1) {
type[0] = 0;
call_prom("getprop", 4, 1, p, "device_type",
type, sizeof(type));
if (strcmp(type, "display") == 0)
call_prom("setprop", 4, 1, p, "linux,boot-display",
- 0, NULL);
+ 0, 0);
}
}
@@ -495,9 +484,8 @@ setup_disp_fake_bi(ihandle dp)
&address, sizeof(address));
if (address == 0) {
/* look for an assigned address with a size of >= 1MB */
- naddrs = (int) call_prom(getprop, 4, 1, dp,
- "assigned-addresses",
- addrs, sizeof(addrs));
+ naddrs = call_prom(getprop, 4, 1, dp, "assigned-addresses",
+ addrs, sizeof(addrs));
naddrs /= sizeof(struct pci_reg_property);
for (i = 0; i < naddrs; ++i) {
if (addrs[i].size_lo >= (1 << 20)) {
@@ -602,16 +590,14 @@ inspect_node(phandle node, struct device_node *dad,
pp = (struct property *) mem_start;
namep = (char *) (pp + 1);
pp->name = PTRUNRELOC(namep);
- if ((int) call_prom("nextprop", 3, 1, node, prev_name,
- namep) <= 0)
+ if (call_prom("nextprop", 3, 1, node, prev_name, namep) <= 0)
break;
mem_start = ALIGNUL((unsigned long)namep + strlen(namep) + 1);
prev_name = namep;
valp = (unsigned char *) mem_start;
pp->value = PTRUNRELOC(valp);
- pp->length = (int)
- call_prom("getprop", 4, 1, node, namep,
- valp, mem_end - mem_start);
+ pp->length = call_prom("getprop", 4, 1, node, namep,
+ valp, mem_end - mem_start);
if (pp->length < 0)
continue;
#ifdef MAX_PROPERTY_LENGTH
@@ -622,7 +608,7 @@ inspect_node(phandle node, struct device_node *dad,
*prev_propp = PTRUNRELOC(pp);
prev_propp = &pp->next;
}
- if (np->node != NULL) {
+ if (np->node != 0) {
/* Add a "linux,phandle" property" */
pp = (struct property *) mem_start;
*prev_propp = PTRUNRELOC(pp);
@@ -637,8 +623,8 @@ inspect_node(phandle node, struct device_node *dad,
*prev_propp = NULL;
/* get the node's full name */
- l = (int) call_prom("package-to-path", 3, 1, node,
- (char *) mem_start, mem_end - mem_start);
+ l = call_prom("package-to-path", 3, 1, node,
+ mem_start, mem_end - mem_start);
if (l >= 0) {
np->full_name = PTRUNRELOC((char *) mem_start);
*(char *)(mem_start + l) = 0;
@@ -647,7 +633,7 @@ inspect_node(phandle node, struct device_node *dad,
/* do all our children */
child = call_prom("child", 1, 1, node);
- while (child != (void *)0) {
+ while (child != 0) {
mem_start = inspect_node(child, np, mem_start, mem_end,
allnextpp);
child = call_prom("peer", 1, 1, child);
@@ -698,8 +684,8 @@ prom_hold_cpus(unsigned long mem)
* chrp we have a device_type property -- Cort
*/
node = call_prom("finddevice", 1, 1, "/");
- if ((int)call_prom("getprop", 4, 1, node,
- "device_type",type, sizeof(type)) <= 0)
+ if (call_prom("getprop", 4, 1, node,
+ "device_type", type, sizeof(type)) <= 0)
return;
/* copy the holding pattern code to someplace safe (0) */
@@ -711,7 +697,7 @@ prom_hold_cpus(unsigned long mem)
/* look for cpus */
*(unsigned long *)(0x0) = 0;
asm volatile("dcbf 0,%0": : "r" (0) : "memory");
- for (node = NULL; prom_next_node(&node); ) {
+ for (node = 0; prom_next_node(&node); ) {
type[0] = 0;
call_prom("getprop", 4, 1, node, "device_type",
type, sizeof(type));
@@ -719,8 +705,7 @@ prom_hold_cpus(unsigned long mem)
continue;
path = (char *) mem;
memset(path, 0, 256);
- if ((int) call_prom("package-to-path", 3, 1,
- node, path, 255) < 0)
+ if (call_prom("package-to-path", 3, 1, node, path, 255) < 0)
continue;
reg = -1;
call_prom("getprop", 4, 1, node, "reg", &reg, sizeof(reg));
@@ -753,11 +738,10 @@ static void __init
prom_instantiate_rtas(void)
{
ihandle prom_rtas;
- unsigned int i;
- struct prom_args prom_args;
+ prom_arg_t result;
prom_rtas = call_prom("finddevice", 1, 1, "/rtas");
- if (prom_rtas == (void *) -1)
+ if (prom_rtas == -1)
return;
rtas_size = 0;
@@ -779,17 +763,10 @@ prom_instantiate_rtas(void)
prom_rtas = call_prom("open", 1, 1, "/rtas");
prom_print("...");
- prom_args.service = "call-method";
- prom_args.nargs = 3;
- prom_args.nret = 2;
- prom_args.args[0] = "instantiate-rtas";
- prom_args.args[1] = prom_rtas;
- prom_args.args[2] = (void *) rtas_data;
- prom(&prom_args);
- i = 0;
- if (prom_args.args[3] == 0)
- i = (unsigned int)prom_args.args[4];
- rtas_entry = i;
+ rtas_entry = 0;
+ if (call_prom_ret("call-method", 3, 2, &result,
+ "instantiate-rtas", prom_rtas, rtas_data) == 0)
+ rtas_entry = result;
if ((rtas_entry == -1) || (rtas_entry == 0))
prom_print(" failed\n");
else
@@ -809,7 +786,7 @@ prom_init(int r3, int r4, prom_entry pp)
int i, l;
char *p, *d;
unsigned long phys;
- void *result[3];
+ prom_arg_t result[3];
char model[32];
phandle node;
int rc;
@@ -820,11 +797,10 @@ prom_init(int r3, int r4, prom_entry pp)
/* First get a handle for the stdout device */
prom = pp;
prom_chosen = call_prom("finddevice", 1, 1, "/chosen");
- if (prom_chosen == (void *)-1)
+ if (prom_chosen == -1)
prom_exit();
- if ((int) call_prom("getprop", 4, 1, prom_chosen,
- "stdout", &prom_stdout,
- sizeof(prom_stdout)) <= 0)
+ if (call_prom("getprop", 4, 1, prom_chosen, "stdout",
+ &prom_stdout, sizeof(prom_stdout)) <= 0)
prom_exit();
/* Get the full OF pathname of the stdout device */
@@ -837,8 +813,7 @@ prom_init(int r3, int r4, prom_entry pp)
/* Get the boot device and translate it to a full OF pathname. */
p = (char *) mem;
- l = (int) call_prom("getprop", 4, 1, prom_chosen,
- "bootpath", p, 1<<20);
+ l = call_prom("getprop", 4, 1, prom_chosen, "bootpath", p, 1<<20);
if (l > 0) {
p[l] = 0; /* should already be null-terminated */
bootpath = PTRUNRELOC(p);
@@ -885,15 +860,15 @@ prom_init(int r3, int r4, prom_entry pp)
*/
prom_print("(already at 0xc0000000) phys=0\n");
phys = 0;
- } else if ((int) call_prom("getprop", 4, 1, prom_chosen, "mmu",
- &prom_mmu, sizeof(prom_mmu)) <= 0) {
+ } else if (call_prom("getprop", 4, 1, prom_chosen, "mmu",
+ &prom_mmu, sizeof(prom_mmu)) <= 0) {
prom_print(" no MMU found\n");
- } else if ((int)call_prom_ret("call-method", 4, 4, result, "translate",
- prom_mmu, &_stext, 1) != 0) {
+ } else if (call_prom_ret("call-method", 4, 4, result, "translate",
+ prom_mmu, &_stext, 1) != 0) {
prom_print(" (translate failed)\n");
} else {
/* We assume the phys. address size is 3 cells */
- phys = (unsigned long)result[2];
+ phys = result[2];
}
if (prom_disp_node != 0)
@@ -916,7 +891,7 @@ prom_init(int r3, int r4, prom_entry pp)
prom_print("returning 0x");
prom_print_hex(phys);
prom_print("from prom_init\n");
- prom_stdout = NULL;
+ prom_stdout = 0;
return phys;
}
diff --git a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c
index 8d3fde10bd70c8..507d4eeffe078b 100644
--- a/arch/ppc/xmon/start.c
+++ b/arch/ppc/xmon/start.c
@@ -215,9 +215,7 @@ xmon_map_scc(void)
DLAB = 0x80;
#endif /* platform */
-#ifdef CONFIG_MAGIC_SYSRQ
- __sysrq_put_key_op('x', &sysrq_xmon_op);
-#endif
+ register_sysrq_key('x', &sysrq_xmon_op);
}
static int scc_initialized = 0;
diff --git a/arch/ppc/xmon/xmon.c b/arch/ppc/xmon/xmon.c
index 9976e7cb5b0d28..8565f49b8b0b87 100644
--- a/arch/ppc/xmon/xmon.c
+++ b/arch/ppc/xmon/xmon.c
@@ -1033,9 +1033,9 @@ dump_hash_table_seg(unsigned seg, unsigned start, unsigned end)
extern unsigned long Hash_size;
unsigned *htab = Hash;
unsigned hsize = Hash_size;
- unsigned v, hmask, va, last_va;
+ unsigned v, hmask, va, last_va = 0;
int found, last_found, i;
- unsigned *hg, w1, last_w2, last_va0;
+ unsigned *hg, w1, last_w2 = 0, last_va0 = 0;
last_found = 0;
hmask = hsize / 64 - 1;
@@ -1492,7 +1492,7 @@ ppc_inst_dump(unsigned adr, int count)
{
int nr, dotted;
unsigned first_adr;
- unsigned long inst, last_inst;
+ unsigned long inst, last_inst = 0;
unsigned char val[4];
dotted = 0;
@@ -1959,7 +1959,7 @@ unsigned long
xmon_symbol_to_addr(char* symbol)
{
char *p, *cur;
- char *match;
+ char *match = NULL;
int goodness = 0;
int result = 0;
diff --git a/arch/ppc64/kernel/pmc.c b/arch/ppc64/kernel/pmc.c
index cd951cbd1e0d5f..67be773f9c00d2 100644
--- a/arch/ppc64/kernel/pmc.c
+++ b/arch/ppc64/kernel/pmc.c
@@ -12,6 +12,7 @@
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/spinlock.h>
+#include <linux/module.h>
#include <asm/processor.h>
#include <asm/pmc.h>
@@ -50,6 +51,7 @@ int reserve_pmc_hardware(perf_irq_t new_perf_irq)
spin_unlock(&pmc_owner_lock);
return err;
}
+EXPORT_SYMBOL_GPL(reserve_pmc_hardware);
void release_pmc_hardware(void)
{
@@ -62,3 +64,4 @@ void release_pmc_hardware(void)
spin_unlock(&pmc_owner_lock);
}
+EXPORT_SYMBOL_GPL(release_pmc_hardware);
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c
index 1a5f59b769b915..01739d5c47c7c0 100644
--- a/arch/ppc64/kernel/prom.c
+++ b/arch/ppc64/kernel/prom.c
@@ -601,8 +601,19 @@ void __init finish_device_tree(void)
/* Initialize virtual IRQ map */
virt_irq_init();
- /* Finish device-tree (pre-parsing some properties etc...) */
+ /*
+ * Finish device-tree (pre-parsing some properties etc...)
+ * We do this in 2 passes. One with "measure_only" set, which
+ * will only measure the amount of memory needed, then we can
+ * allocate that memory, and call finish_node again. However,
+ * we must be careful as most routines will fail nowadays when
+ * prom_alloc() returns 0, so we must make sure our first pass
+ * doesn't start at 0. We pre-initialize size to 16 for that
+ * reason and then remove those additional 16 bytes
+ */
+ size = 16;
finish_node(allnodes, &size, NULL, 0, 0, 1);
+ size -= 16;
end = start = (unsigned long)abs_to_virt(lmb_alloc(size, 128));
finish_node(allnodes, &end, NULL, 0, 0, 0);
BUG_ON(end != start + size);
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 5effcd4d1cc192..722ea1d63c9433 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -659,19 +659,10 @@ menu "CPU Frequency scaling"
source "drivers/cpufreq/Kconfig"
-config CPU_FREQ_TABLE
- tristate "CPU frequency table helpers"
- depends on CPU_FREQ
- default y
- help
- Many cpufreq drivers use these helpers, so only say N here if
- the cpufreq driver of your choice doesn't need these helpers.
-
- If unsure, say Y.
-
config SH_CPU_FREQ
tristate "SuperH CPU Frequency driver"
depends on CPU_FREQ
+ select CPU_FREQ_TABLE
help
This adds the cpufreq driver for SuperH. At present, only
the SH-4 is supported.
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 363bc839b28403..c1669905abe4d8 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -57,7 +57,7 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
if (resource < 6) {
reg = PCI_BASE_ADDRESS_0 + 4*resource;
} else if (resource == PCI_ROM_RESOURCE) {
- res->flags |= PCI_ROM_ADDRESS_ENABLE;
+ res->flags |= IORESOURCE_ROM_ENABLE;
new |= PCI_ROM_ADDRESS_ENABLE;
reg = dev->rom_base_reg;
} else {
diff --git a/arch/sh64/kernel/pcibios.c b/arch/sh64/kernel/pcibios.c
index 4f707dfd5dc180..50c61dcb9faee7 100644
--- a/arch/sh64/kernel/pcibios.c
+++ b/arch/sh64/kernel/pcibios.c
@@ -45,7 +45,7 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
if (resource < 6) {
reg = PCI_BASE_ADDRESS_0 + 4*resource;
} else if (resource == PCI_ROM_RESOURCE) {
- res->flags |= PCI_ROM_ADDRESS_ENABLE;
+ res->flags |= IORESOURCE_ROM_ENABLE;
new |= PCI_ROM_ADDRESS_ENABLE;
reg = dev->rom_base_reg;
} else {
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 46a2436c9600c2..fb1189641c74fe 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -163,19 +163,10 @@ config NR_CPUS
source "drivers/cpufreq/Kconfig"
-config CPU_FREQ_TABLE
- tristate "CPU frequency table helpers"
- depends on CPU_FREQ
- default y
- help
- Many CPUFreq drivers use these helpers, so only say N here if
- the CPUFreq driver of your choice doesn't need these helpers.
-
- If in doubt, say Y.
-
config US3_FREQ
tristate "UltraSPARC-III CPU Frequency driver"
- depends on CPU_FREQ_TABLE
+ depends on CPU_FREQ
+ select CPU_FREQ_TABLE
help
This adds the CPUFreq driver for UltraSPARC-III processors.
@@ -185,7 +176,8 @@ config US3_FREQ
config US2E_FREQ
tristate "UltraSPARC-IIe CPU Frequency driver"
- depends on CPU_FREQ_TABLE
+ depends on CPU_FREQ
+ select CPU_FREQ_TABLE
help
This adds the CPUFreq driver for UltraSPARC-IIe processors.
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index 41fe0991387935..3567fa879e1fe7 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -1133,7 +1133,7 @@ static void __init psycho_base_address_update(struct pci_dev *pdev, int resource
(((u32)(res->start - root->start)) & ~size));
if (resource == PCI_ROM_RESOURCE) {
reg |= PCI_ROM_ADDRESS_ENABLE;
- res->flags |= PCI_ROM_ADDRESS_ENABLE;
+ res->flags |= IORESOURCE_ROM_ENABLE;
}
pci_write_config_dword(pdev, where, reg);
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c
index 2bf247792fe5f1..5525d1ec4af883 100644
--- a/arch/sparc64/kernel/pci_sabre.c
+++ b/arch/sparc64/kernel/pci_sabre.c
@@ -1100,7 +1100,7 @@ static void __init sabre_base_address_update(struct pci_dev *pdev, int resource)
(((u32)(res->start - base)) & ~size));
if (resource == PCI_ROM_RESOURCE) {
reg |= PCI_ROM_ADDRESS_ENABLE;
- res->flags |= PCI_ROM_ADDRESS_ENABLE;
+ res->flags |= IORESOURCE_ROM_ENABLE;
}
pci_write_config_dword(pdev, where, reg);
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c
index b4956988584532..e93fcadc37229f 100644
--- a/arch/sparc64/kernel/pci_schizo.c
+++ b/arch/sparc64/kernel/pci_schizo.c
@@ -1572,7 +1572,7 @@ static void __init schizo_base_address_update(struct pci_dev *pdev, int resource
(((u32)(res->start - root->start)) & ~size));
if (resource == PCI_ROM_RESOURCE) {
reg |= PCI_ROM_ADDRESS_ENABLE;
- res->flags |= PCI_ROM_ADDRESS_ENABLE;
+ res->flags |= IORESOURCE_ROM_ENABLE;
}
pci_write_config_dword(pdev, where, reg);
diff --git a/arch/x86_64/kernel/cpufreq/Kconfig b/arch/x86_64/kernel/cpufreq/Kconfig
index acaf62aa5e15c8..81f1562e539386 100644
--- a/arch/x86_64/kernel/cpufreq/Kconfig
+++ b/arch/x86_64/kernel/cpufreq/Kconfig
@@ -6,22 +6,13 @@ menu "CPU Frequency scaling"
source "drivers/cpufreq/Kconfig"
-config CPU_FREQ_TABLE
- tristate "CPU frequency table helpers"
- depends on CPU_FREQ
- default y
- help
- Many CPUFreq drivers use these helpers, so only say N here if
- the CPUFreq driver of your choice doesn't need these helpers.
-
- If in doubt, say Y.
+if CPU_FREQ
comment "CPUFreq processor drivers"
- depends on CPU_FREQ
config X86_POWERNOW_K8
tristate "AMD Opteron/Athlon64 PowerNow!"
- depends on CPU_FREQ_TABLE
+ select CPU_FREQ_TABLE
help
This adds the CPUFreq driver for mobile AMD Opteron/Athlon64 processors.
@@ -31,12 +22,14 @@ config X86_POWERNOW_K8
config X86_POWERNOW_K8_ACPI
bool
- depends on ((X86_POWERNOW_K8 = "m" && ACPI_PROCESSOR) || (X86_POWERNOW_K8 = "y" && ACPI_PROCESSOR = "y"))
+ depends on X86_POWERNOW_K8 && ACPI_PROCESSOR
+ depends on !(X86_POWERNOW_K8 = y && ACPI_PROCESSOR = m)
default y
config X86_SPEEDSTEP_CENTRINO
tristate "Intel Enhanced SpeedStep"
- depends on CPU_FREQ_TABLE && ACPI_PROCESSOR
+ select CPU_FREQ_TABLE
+ depends on ACPI_PROCESSOR
help
This adds the CPUFreq driver for Enhanced SpeedStep enabled
mobile CPUs. This means Intel Pentium M (Centrino) CPUs
@@ -53,7 +46,7 @@ config X86_SPEEDSTEP_CENTRINO_ACPI
config X86_ACPI_CPUFREQ
tristate "ACPI Processor P-States driver"
- depends on CPU_FREQ_TABLE && ACPI_PROCESSOR
+ depends on ACPI_PROCESSOR
help
This driver adds a CPUFreq driver which utilizes the ACPI
Processor Performance States.
@@ -63,7 +56,6 @@ config X86_ACPI_CPUFREQ
If in doubt, say N.
comment "shared options"
- depends on CPU_FREQ
config X86_ACPI_CPUFREQ_PROC_INTF
bool "/proc/acpi/processor/../performance interface (deprecated)"
@@ -78,7 +70,7 @@ config X86_ACPI_CPUFREQ_PROC_INTF
config X86_P4_CLOCKMOD
tristate "Intel Pentium 4 clock modulation"
- depends on CPU_FREQ_TABLE && EMBEDDED
+ depends on EMBEDDED
help
This adds the clock modulation driver for Intel Pentium 4 / XEON
processors. When enabled it will lower CPU temperature by skipping
@@ -96,9 +88,9 @@ config X86_P4_CLOCKMOD
config X86_SPEEDSTEP_LIB
tristate
- depends on (X86_P4_CLOCKMOD)
- default (X86_P4_CLOCKMOD)
+ default X86_P4_CLOCKMOD
+endif
endmenu
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 49d5d5f137fa4c..57f35c68aa34d0 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -193,7 +193,7 @@ static void *dma_alloc_pages(struct device *dev, unsigned gfp, unsigned order)
int node;
if (dev->bus == &pci_bus_type) {
cpumask_t mask;
- mask = pcibus_to_cpumask(to_pci_dev(dev)->bus->number);
+ mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
node = cpu_to_node(first_cpu(mask));
} else
node = numa_node_id();
diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile
index eb3c8087764732..5be8ad6dc9edcf 100644
--- a/drivers/ide/Makefile
+++ b/drivers/ide/Makefile
@@ -13,8 +13,7 @@ EXTRA_CFLAGS += -Idrivers/ide
obj-$(CONFIG_BLK_DEV_IDE) += pci/
-ide-core-y += ide.o ide-default.o ide-io.o ide-iops.o ide-lib.o ide-probe.o \
- ide-taskfile.o
+ide-core-y += ide.o ide-io.o ide-iops.o ide-lib.o ide-probe.o ide-taskfile.o
ide-core-$(CONFIG_BLK_DEV_CMD640) += pci/cmd640.o
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 4b96aa193161fb..33a020faeabde2 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -328,7 +328,8 @@ static DECLARE_MUTEX(idecd_ref_sem);
#define to_ide_cd(obj) container_of(obj, struct cdrom_info, kref)
-#define ide_cd_g(disk) ((disk)->private_data)
+#define ide_cd_g(disk) \
+ container_of((disk)->private_data, struct cdrom_info, driver)
static struct cdrom_info *ide_cd_get(struct gendisk *disk)
{
@@ -556,10 +557,13 @@ void cdrom_analyze_sense_data(ide_drive_t *drive,
/*
* Initialize a ide-cd packet command request
*/
-static void cdrom_prepare_request(struct request *rq)
+static void cdrom_prepare_request(ide_drive_t *drive, struct request *rq)
{
+ struct cdrom_info *cd = drive->driver_data;
+
ide_init_drive_cmd(rq);
rq->flags = REQ_PC;
+ rq->rq_disk = cd->disk;
}
static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
@@ -572,7 +576,7 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
sense = &info->sense_data;
/* stuff the sense request in front of our current request */
- cdrom_prepare_request(rq);
+ cdrom_prepare_request(drive, rq);
rq->data = sense;
rq->cmd[0] = GPCMD_REQUEST_SENSE;
@@ -1856,7 +1860,7 @@ static ide_startstop_t cdrom_start_write_cont(ide_drive_t *drive)
static ide_startstop_t cdrom_start_write(ide_drive_t *drive, struct request *rq)
{
struct cdrom_info *info = drive->driver_data;
- struct gendisk *g = drive->disk;
+ struct gendisk *g = info->disk;
unsigned short sectors_per_frame = queue_hardsect_size(drive->queue) >> SECTOR_BITS;
/*
@@ -2048,7 +2052,7 @@ static int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense)
struct cdrom_info *info = drive->driver_data;
struct cdrom_device_info *cdi = &info->devinfo;
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
req.sense = sense;
req.cmd[0] = GPCMD_TEST_UNIT_READY;
@@ -2080,7 +2084,7 @@ cdrom_lockdoor(ide_drive_t *drive, int lockflag, struct request_sense *sense)
if (CDROM_CONFIG_FLAGS(drive)->no_doorlock) {
stat = 0;
} else {
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
req.sense = sense;
req.cmd[0] = GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL;
req.cmd[4] = lockflag ? 1 : 0;
@@ -2124,7 +2128,7 @@ static int cdrom_eject(ide_drive_t *drive, int ejectflag,
if (CDROM_STATE_FLAGS(drive)->door_locked && ejectflag)
return 0;
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
/* only tell drive to close tray if open, if it can do that */
if (ejectflag && !CDROM_CONFIG_FLAGS(drive)->close_tray)
@@ -2148,7 +2152,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
int stat;
struct request req;
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
req.sense = sense;
req.cmd[0] = GPCMD_READ_CDVD_CAPACITY;
@@ -2171,7 +2175,7 @@ static int cdrom_read_tocentry(ide_drive_t *drive, int trackno, int msf_flag,
{
struct request req;
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
req.sense = sense;
req.data = buf;
@@ -2228,7 +2232,7 @@ static int cdrom_read_toc(ide_drive_t *drive, struct request_sense *sense)
if (stat)
toc->capacity = 0x1fffff;
- set_capacity(drive->disk, toc->capacity * sectors_per_frame);
+ set_capacity(info->disk, toc->capacity * sectors_per_frame);
blk_queue_hardsect_size(drive->queue,
sectors_per_frame << SECTOR_BITS);
@@ -2348,7 +2352,7 @@ static int cdrom_read_toc(ide_drive_t *drive, struct request_sense *sense)
stat = cdrom_get_last_written(cdi, &last_written);
if (!stat && (last_written > toc->capacity)) {
toc->capacity = last_written;
- set_capacity(drive->disk, toc->capacity * sectors_per_frame);
+ set_capacity(info->disk, toc->capacity * sectors_per_frame);
}
/* Remember that we've read this stuff. */
@@ -2363,7 +2367,7 @@ static int cdrom_read_subchannel(ide_drive_t *drive, int format, char *buf,
{
struct request req;
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
req.sense = sense;
req.data = buf;
@@ -2383,7 +2387,7 @@ static int cdrom_select_speed(ide_drive_t *drive, int speed,
struct request_sense *sense)
{
struct request req;
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
req.sense = sense;
if (speed == 0)
@@ -2413,7 +2417,7 @@ static int cdrom_play_audio(ide_drive_t *drive, int lba_start, int lba_end)
struct request_sense sense;
struct request req;
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
req.sense = &sense;
req.cmd[0] = GPCMD_PLAY_AUDIO_MSF;
@@ -2463,7 +2467,7 @@ static int ide_cdrom_packet(struct cdrom_device_info *cdi,
/* here we queue the commands from the uniform CD-ROM
layer. the packet must be complete, as we do not
touch it at all. */
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
memcpy(req.cmd, cgc->cmd, CDROM_PACKET_SIZE);
if (cgc->sense)
memset(cgc->sense, 0, sizeof(struct request_sense));
@@ -2613,7 +2617,7 @@ int ide_cdrom_reset (struct cdrom_device_info *cdi)
struct request req;
int ret;
- cdrom_prepare_request(&req);
+ cdrom_prepare_request(drive, &req);
req.flags = REQ_SPECIAL | REQ_QUIET;
ret = ide_do_drive_cmd(drive, &req, ide_wait);
@@ -2857,7 +2861,7 @@ static int ide_cdrom_register (ide_drive_t *drive, int nslots)
if (!CDROM_CONFIG_FLAGS(drive)->mo_drive)
devinfo->mask |= CDC_MO_DRIVE;
- devinfo->disk = drive->disk;
+ devinfo->disk = info->disk;
return register_cdrom(devinfo);
}
@@ -3219,6 +3223,9 @@ int ide_cdrom_setup (ide_drive_t *drive)
*/
blk_queue_hardsect_size(drive->queue, CD_FRAMESIZE);
+ if (drive->autotune == IDE_TUNE_DEFAULT ||
+ drive->autotune == IDE_TUNE_AUTO)
+ drive->dsc_overlap = (drive->next != drive);
#if 0
drive->dsc_overlap = (HWIF(drive)->no_dsc) ? 0 : 1;
if (HWIF(drive)->no_dsc) {
@@ -3259,7 +3266,7 @@ int ide_cdrom_cleanup(ide_drive_t *drive)
return 1;
}
- del_gendisk(drive->disk);
+ del_gendisk(info->disk);
ide_cd_put(info);
@@ -3271,7 +3278,7 @@ static void ide_cd_release(struct kref *kref)
struct cdrom_info *info = to_ide_cd(kref);
struct cdrom_device_info *devinfo = &info->devinfo;
ide_drive_t *drive = info->drive;
- struct gendisk *g = drive->disk;
+ struct gendisk *g = info->disk;
if (info->buffer != NULL)
kfree(info->buffer);
@@ -3282,10 +3289,11 @@ static void ide_cd_release(struct kref *kref)
if (devinfo->handle == drive && unregister_cdrom(devinfo))
printk(KERN_ERR "%s: %s failed to unregister device from the cdrom "
"driver.\n", __FUNCTION__, drive->name);
+ drive->dsc_overlap = 0;
drive->driver_data = NULL;
blk_queue_prep_rq(drive->queue, NULL);
g->private_data = NULL;
- g->fops = ide_fops;
+ put_disk(g);
kfree(info);
}
@@ -3413,7 +3421,7 @@ MODULE_DESCRIPTION("ATAPI CD-ROM Driver");
static int ide_cdrom_attach (ide_drive_t *drive)
{
struct cdrom_info *info;
- struct gendisk *g = drive->disk;
+ struct gendisk *g;
struct request_sense sense;
if (!strstr("ide-cdrom", drive->driver_req))
@@ -3438,17 +3446,28 @@ static int ide_cdrom_attach (ide_drive_t *drive)
printk(KERN_ERR "%s: Can't allocate a cdrom structure\n", drive->name);
goto failed;
}
+
+ g = alloc_disk(1 << PARTN_BITS);
+ if (!g)
+ goto out_free_cd;
+
+ ide_init_disk(g, drive);
+
if (ide_register_subdriver(drive, &ide_cdrom_driver)) {
printk(KERN_ERR "%s: Failed to register the driver with ide.c\n",
drive->name);
- kfree(info);
- goto failed;
+ goto out_put_disk;
}
memset(info, 0, sizeof (struct cdrom_info));
kref_init(&info->kref);
info->drive = drive;
+ info->driver = &ide_cdrom_driver;
+ info->disk = g;
+
+ g->private_data = &info->driver;
+
drive->driver_data = info;
DRIVER(drive)->busy++;
@@ -3477,10 +3496,14 @@ static int ide_cdrom_attach (ide_drive_t *drive)
cdrom_read_toc(drive, &sense);
g->fops = &idecd_ops;
- g->private_data = info;
g->flags |= GENHD_FL_REMOVABLE;
add_disk(g);
return 0;
+
+out_put_disk:
+ put_disk(g);
+out_free_cd:
+ kfree(info);
failed:
return 1;
}
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h
index 171c65eb313852..7ca3e5afc66551 100644
--- a/drivers/ide/ide-cd.h
+++ b/drivers/ide/ide-cd.h
@@ -461,6 +461,8 @@ struct atapi_changer_info {
/* Extra per-device info for cdrom drives. */
struct cdrom_info {
ide_drive_t *drive;
+ ide_driver_t *driver;
+ struct gendisk *disk;
struct kref kref;
/* Buffer for table of contents. NULL if we haven't allocated
diff --git a/drivers/ide/ide-default.c b/drivers/ide/ide-default.c
deleted file mode 100644
index 8b0c8520f7ce66..00000000000000
--- a/drivers/ide/ide-default.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * ide-default - Driver for unbound ide devices
- *
- * This provides a clean way to bind a device to default operations
- * by having an actual driver class that rather than special casing
- * "no driver" all over the IDE code
- *
- * Copyright (C) 2003, Red Hat <alan@redhat.com>
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/string.h>
-#include <linux/kernel.h>
-#include <linux/delay.h>
-#include <linux/timer.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
-#include <linux/major.h>
-#include <linux/errno.h>
-#include <linux/genhd.h>
-#include <linux/slab.h>
-#include <linux/cdrom.h>
-#include <linux/ide.h>
-#include <linux/bitops.h>
-
-#include <asm/byteorder.h>
-#include <asm/irq.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
-#include <asm/unaligned.h>
-
-#define IDEDEFAULT_VERSION "0.9.newide"
-/*
- * Driver initialization.
- */
-
-static int idedefault_attach(ide_drive_t *drive);
-
-static ide_startstop_t idedefault_do_request(ide_drive_t *drive, struct request *rq, sector_t block)
-{
- ide_end_request(drive, 0, 0);
- return ide_stopped;
-}
-
-/*
- * IDE subdriver functions, registered with ide.c
- */
-
-ide_driver_t idedefault_driver = {
- .name = "ide-default",
- .version = IDEDEFAULT_VERSION,
- .attach = idedefault_attach,
- .cleanup = ide_unregister_subdriver,
- .do_request = idedefault_do_request,
- .end_request = ide_end_request,
- .error = __ide_error,
- .abort = __ide_abort,
- .drives = LIST_HEAD_INIT(idedefault_driver.drives)
-};
-
-static int idedefault_attach (ide_drive_t *drive)
-{
- if (ide_register_subdriver(drive, &idedefault_driver)) {
- printk(KERN_ERR "ide-default: %s: Failed to register the "
- "driver with ide.c\n", drive->name);
- return 1;
- }
-
- return 0;
-}
-
-MODULE_DESCRIPTION("IDE Default Driver");
-
-MODULE_LICENSE("GPL");
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 9636135ee07790..5d54f77561007f 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -73,6 +73,8 @@
struct ide_disk_obj {
ide_drive_t *drive;
+ ide_driver_t *driver;
+ struct gendisk *disk;
struct kref kref;
};
@@ -80,7 +82,8 @@ static DECLARE_MUTEX(idedisk_ref_sem);
#define to_ide_disk(obj) container_of(obj, struct ide_disk_obj, kref)
-#define ide_disk_g(disk) ((disk)->private_data)
+#define ide_disk_g(disk) \
+ container_of((disk)->private_data, struct ide_disk_obj, driver)
static struct ide_disk_obj *ide_disk_get(struct gendisk *disk)
{
@@ -1024,7 +1027,7 @@ static void ide_cacheflush_p(ide_drive_t *drive)
static int idedisk_cleanup (ide_drive_t *drive)
{
struct ide_disk_obj *idkp = drive->driver_data;
- struct gendisk *g = drive->disk;
+ struct gendisk *g = idkp->disk;
ide_cacheflush_p(drive);
if (ide_unregister_subdriver(drive))
@@ -1040,12 +1043,12 @@ static void ide_disk_release(struct kref *kref)
{
struct ide_disk_obj *idkp = to_ide_disk(kref);
ide_drive_t *drive = idkp->drive;
- struct gendisk *g = drive->disk;
+ struct gendisk *g = idkp->disk;
drive->driver_data = NULL;
drive->devfs_name[0] = '\0';
g->private_data = NULL;
- g->fops = ide_fops;
+ put_disk(g);
kfree(idkp);
}
@@ -1199,7 +1202,7 @@ MODULE_DESCRIPTION("ATA DISK Driver");
static int idedisk_attach(ide_drive_t *drive)
{
struct ide_disk_obj *idkp;
- struct gendisk *g = drive->disk;
+ struct gendisk *g;
/* strstr("foo", "") is non-NULL */
if (!strstr("ide-disk", drive->driver_req))
@@ -1213,9 +1216,15 @@ static int idedisk_attach(ide_drive_t *drive)
if (!idkp)
goto failed;
+ g = alloc_disk(1 << PARTN_BITS);
+ if (!g)
+ goto out_free_idkp;
+
+ ide_init_disk(g, drive);
+
if (ide_register_subdriver(drive, &idedisk_driver)) {
printk (KERN_ERR "ide-disk: %s: Failed to register the driver with ide.c\n", drive->name);
- goto out_free_idkp;
+ goto out_put_disk;
}
memset(idkp, 0, sizeof(*idkp));
@@ -1223,6 +1232,11 @@ static int idedisk_attach(ide_drive_t *drive)
kref_init(&idkp->kref);
idkp->drive = drive;
+ idkp->driver = &idedisk_driver;
+ idkp->disk = g;
+
+ g->private_data = &idkp->driver;
+
drive->driver_data = idkp;
DRIVER(drive)->busy++;
@@ -1240,9 +1254,11 @@ static int idedisk_attach(ide_drive_t *drive)
g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
set_capacity(g, idedisk_capacity(drive));
g->fops = &idedisk_ops;
- g->private_data = idkp;
add_disk(g);
return 0;
+
+out_put_disk:
+ put_disk(g);
out_free_idkp:
kfree(idkp);
failed:
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 1179a31f81405a..2d2eefb610dd80 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -176,7 +176,13 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive)
if (!dma_stat) {
struct request *rq = HWGROUP(drive)->rq;
- DRIVER(drive)->end_request(drive, 1, rq->nr_sectors);
+ if (rq->rq_disk) {
+ ide_driver_t *drv;
+
+ drv = *(ide_driver_t **)rq->rq_disk->private_data;;
+ drv->end_request(drive, 1, rq->nr_sectors);
+ } else
+ ide_end_request(drive, 1, rq->nr_sectors);
return ide_stopped;
}
printk(KERN_ERR "%s: dma_intr: bad DMA status (dma_stat=%x)\n",
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 0e9421b57cc5a7..36c0b74a4e45b6 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -276,6 +276,8 @@ typedef struct {
*/
typedef struct ide_floppy_obj {
ide_drive_t *drive;
+ ide_driver_t *driver;
+ struct gendisk *disk;
struct kref kref;
/* Current packet command */
@@ -519,7 +521,8 @@ static DECLARE_MUTEX(idefloppy_ref_sem);
#define to_ide_floppy(obj) container_of(obj, struct ide_floppy_obj, kref)
-#define ide_floppy_g(disk) ((disk)->private_data)
+#define ide_floppy_g(disk) \
+ container_of((disk)->private_data, struct ide_floppy_obj, driver)
static struct ide_floppy_obj *ide_floppy_get(struct gendisk *disk)
{
@@ -680,9 +683,12 @@ static void idefloppy_update_buffers (ide_drive_t *drive, idefloppy_pc_t *pc)
*/
static void idefloppy_queue_pc_head (ide_drive_t *drive,idefloppy_pc_t *pc,struct request *rq)
{
+ struct ide_floppy_obj *floppy = drive->driver_data;
+
ide_init_drive_cmd(rq);
rq->buffer = (char *) pc;
rq->flags = REQ_SPECIAL; //rq->cmd = IDEFLOPPY_PC_RQ;
+ rq->rq_disk = floppy->disk;
(void) ide_do_drive_cmd(drive, rq, ide_preempt);
}
@@ -1274,7 +1280,8 @@ static ide_startstop_t idefloppy_do_request (ide_drive_t *drive, struct request
unsigned long block = (unsigned long)block_s;
debug_log(KERN_INFO "rq_status: %d, dev: %s, flags: %lx, errors: %d\n",
- rq->rq_status, rq->rq_disk->disk_name,
+ rq->rq_status,
+ rq->rq_disk ? rq->rq_disk->disk_name ? "?",
rq->flags, rq->errors);
debug_log(KERN_INFO "sector: %ld, nr_sectors: %ld, "
"current_nr_sectors: %d\n", (long)rq->sector,
@@ -1329,11 +1336,13 @@ static ide_startstop_t idefloppy_do_request (ide_drive_t *drive, struct request
*/
static int idefloppy_queue_pc_tail (ide_drive_t *drive,idefloppy_pc_t *pc)
{
+ struct ide_floppy_obj *floppy = drive->driver_data;
struct request rq;
ide_init_drive_cmd (&rq);
rq.buffer = (char *) pc;
rq.flags = REQ_SPECIAL; // rq.cmd = IDEFLOPPY_PC_RQ;
+ rq.rq_disk = floppy->disk;
return ide_do_drive_cmd(drive, &rq, ide_wait);
}
@@ -1358,7 +1367,7 @@ static int idefloppy_get_flexible_disk_page (ide_drive_t *drive)
}
header = (idefloppy_mode_parameter_header_t *) pc.buffer;
floppy->wp = header->wp;
- set_disk_ro(drive->disk, floppy->wp);
+ set_disk_ro(floppy->disk, floppy->wp);
page = (idefloppy_flexible_disk_page_t *) (header + 1);
page->transfer_rate = ntohs(page->transfer_rate);
@@ -1424,7 +1433,7 @@ static int idefloppy_get_capacity (ide_drive_t *drive)
drive->bios_cyl = 0;
drive->bios_head = drive->bios_sect = 0;
floppy->blocks = floppy->bs_factor = 0;
- set_capacity(drive->disk, 0);
+ set_capacity(floppy->disk, 0);
idefloppy_create_read_capacity_cmd(&pc);
if (idefloppy_queue_pc_tail(drive, &pc)) {
@@ -1498,7 +1507,7 @@ static int idefloppy_get_capacity (ide_drive_t *drive)
(void) idefloppy_get_flexible_disk_page(drive);
}
- set_capacity(drive->disk, floppy->blocks * floppy->bs_factor);
+ set_capacity(floppy->disk, floppy->blocks * floppy->bs_factor);
return rc;
}
@@ -1859,7 +1868,7 @@ static void idefloppy_setup (ide_drive_t *drive, idefloppy_floppy_t *floppy)
static int idefloppy_cleanup (ide_drive_t *drive)
{
idefloppy_floppy_t *floppy = drive->driver_data;
- struct gendisk *g = drive->disk;
+ struct gendisk *g = floppy->disk;
if (ide_unregister_subdriver(drive))
return 1;
@@ -1875,11 +1884,11 @@ static void ide_floppy_release(struct kref *kref)
{
struct ide_floppy_obj *floppy = to_ide_floppy(kref);
ide_drive_t *drive = floppy->drive;
- struct gendisk *g = drive->disk;
+ struct gendisk *g = floppy->disk;
drive->driver_data = NULL;
g->private_data = NULL;
- g->fops = ide_fops;
+ put_disk(g);
kfree(floppy);
}
@@ -2116,7 +2125,8 @@ static struct block_device_operations idefloppy_ops = {
static int idefloppy_attach (ide_drive_t *drive)
{
idefloppy_floppy_t *floppy;
- struct gendisk *g = drive->disk;
+ struct gendisk *g;
+
if (!strstr("ide-floppy", drive->driver_req))
goto failed;
if (!drive->present)
@@ -2135,10 +2145,16 @@ static int idefloppy_attach (ide_drive_t *drive)
printk (KERN_ERR "ide-floppy: %s: Can't allocate a floppy structure\n", drive->name);
goto failed;
}
+
+ g = alloc_disk(1 << PARTN_BITS);
+ if (!g)
+ goto out_free_floppy;
+
+ ide_init_disk(g, drive);
+
if (ide_register_subdriver(drive, &idefloppy_driver)) {
printk (KERN_ERR "ide-floppy: %s: Failed to register the driver with ide.c\n", drive->name);
- kfree (floppy);
- goto failed;
+ goto out_put_disk;
}
memset(floppy, 0, sizeof(*floppy));
@@ -2146,6 +2162,10 @@ static int idefloppy_attach (ide_drive_t *drive)
kref_init(&floppy->kref);
floppy->drive = drive;
+ floppy->driver = &idefloppy_driver;
+ floppy->disk = g;
+
+ g->private_data = &floppy->driver;
drive->driver_data = floppy;
@@ -2157,10 +2177,14 @@ static int idefloppy_attach (ide_drive_t *drive)
strcpy(g->devfs_name, drive->devfs_name);
g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
g->fops = &idefloppy_ops;
- g->private_data = floppy;
drive->attach = 1;
add_disk(g);
return 0;
+
+out_put_disk:
+ put_disk(g);
+out_free_floppy:
+ kfree(floppy);
failed:
return 1;
}
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 65f5267992dc9c..248e3cc8b3527d 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -410,6 +410,17 @@ static void try_to_flush_leftover_data (ide_drive_t *drive)
}
}
+static void ide_kill_rq(ide_drive_t *drive, struct request *rq)
+{
+ if (rq->rq_disk) {
+ ide_driver_t *drv;
+
+ drv = *(ide_driver_t **)rq->rq_disk->private_data;
+ drv->end_request(drive, 0, 0);
+ } else
+ ide_end_request(drive, 0, 0);
+}
+
static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
{
ide_hwif_t *hwif = drive->hwif;
@@ -444,7 +455,7 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8
hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG);
if (rq->errors >= ERROR_MAX || blk_noretry_request(rq))
- drive->driver->end_request(drive, 0, 0);
+ ide_kill_rq(drive, rq);
else {
if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
++rq->errors;
@@ -473,7 +484,7 @@ static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq, u
hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG);
if (rq->errors >= ERROR_MAX) {
- drive->driver->end_request(drive, 0, 0);
+ ide_kill_rq(drive, rq);
} else {
if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
++rq->errors;
@@ -525,7 +536,13 @@ ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat)
return ide_stopped;
}
- return drive->driver->error(drive, rq, stat, err);
+ if (rq->rq_disk) {
+ ide_driver_t *drv;
+
+ drv = *(ide_driver_t **)rq->rq_disk->private_data;
+ return drv->error(drive, rq, stat, err);
+ } else
+ return __ide_error(drive, rq, stat, err);
}
EXPORT_SYMBOL_GPL(ide_error);
@@ -535,7 +552,8 @@ ide_startstop_t __ide_abort(ide_drive_t *drive, struct request *rq)
if (drive->media != ide_disk)
rq->errors |= ERROR_RESET;
- DRIVER(drive)->end_request(drive, 0, 0);
+ ide_kill_rq(drive, rq);
+
return ide_stopped;
}
@@ -569,7 +587,13 @@ ide_startstop_t ide_abort(ide_drive_t *drive, const char *msg)
return ide_stopped;
}
- return drive->driver->abort(drive, rq);
+ if (rq->rq_disk) {
+ ide_driver_t *drv;
+
+ drv = *(ide_driver_t **)rq->rq_disk->private_data;
+ return drv->abort(drive, rq);
+ } else
+ return __ide_abort(drive, rq);
}
/**
@@ -622,7 +646,7 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive)
udelay(100);
}
- if (!OK_STAT(stat, READY_STAT, BAD_STAT) && DRIVER(drive) != NULL)
+ if (!OK_STAT(stat, READY_STAT, BAD_STAT))
return ide_error(drive, "drive_cmd", stat);
/* calls ide_end_drive_cmd */
ide_end_drive_cmd(drive, stat, hwif->INB(IDE_ERROR_REG));
@@ -922,6 +946,8 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
return startstop;
}
if (!drive->special.all) {
+ ide_driver_t *drv;
+
if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK))
return execute_drive_cmd(drive, rq);
else if (rq->flags & REQ_DRIVE_TASKFILE)
@@ -937,11 +963,13 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
ide_complete_pm_request(drive, rq);
return startstop;
}
- return (DRIVER(drive)->do_request(drive, rq, block));
+
+ drv = *(ide_driver_t **)rq->rq_disk->private_data;
+ return drv->do_request(drive, rq, block);
}
return do_special(drive);
kill_rq:
- DRIVER(drive)->end_request(drive, 0, 0);
+ ide_kill_rq(drive, rq);
return ide_stopped;
}
@@ -1616,8 +1644,6 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio
rq->errors = 0;
rq->rq_status = RQ_ACTIVE;
- rq->rq_disk = drive->disk;
-
/*
* we need to hold an extra reference to request for safe inspection
* after completion
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index cb158558d20125..554473a95cf747 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -862,6 +862,13 @@ static void probe_hwif(ide_hwif_t *hwif)
drive->autotune == IDE_TUNE_AUTO)
/* auto-tune PIO mode */
hwif->tuneproc(drive, 255);
+
+ if (drive->autotune != IDE_TUNE_DEFAULT &&
+ drive->autotune != IDE_TUNE_AUTO)
+ continue;
+
+ drive->nice1 = 1;
+
/*
* MAJOR HACK BARF :-/
*
@@ -871,9 +878,7 @@ static void probe_hwif(ide_hwif_t *hwif)
* Move here to prevent module loading clashing.
*/
// drive->autodma = hwif->autodma;
- if ((hwif->ide_dma_check) &&
- ((drive->autotune == IDE_TUNE_DEFAULT) ||
- (drive->autotune == IDE_TUNE_AUTO))) {
+ if (hwif->ide_dma_check) {
/*
* Force DMAing for the beginning of the check.
* Some chipsets appear to do interesting
@@ -1006,10 +1011,8 @@ static int ide_init_queue(ide_drive_t *drive)
blk_queue_max_hw_segments(q, max_sg_entries);
blk_queue_max_phys_segments(q, max_sg_entries);
- /* assign drive and gendisk queue */
+ /* assign drive queue */
drive->queue = q;
- if (drive->disk)
- drive->disk->queue = drive->queue;
/* needs drive->queue to be set */
ide_toggle_bounce(drive, 1);
@@ -1209,8 +1212,6 @@ static int ata_lock(dev_t dev, void *data)
return 0;
}
-extern ide_driver_t idedefault_driver;
-
static struct kobject *ata_probe(dev_t dev, int *part, void *data)
{
ide_hwif_t *hwif = data;
@@ -1218,52 +1219,66 @@ static struct kobject *ata_probe(dev_t dev, int *part, void *data)
ide_drive_t *drive = &hwif->drives[unit];
if (!drive->present)
return NULL;
- if (drive->driver == &idedefault_driver) {
- if (drive->media == ide_disk)
- (void) request_module("ide-disk");
- if (drive->scsi)
- (void) request_module("ide-scsi");
- if (drive->media == ide_cdrom || drive->media == ide_optical)
- (void) request_module("ide-cd");
- if (drive->media == ide_tape)
- (void) request_module("ide-tape");
- if (drive->media == ide_floppy)
- (void) request_module("ide-floppy");
- }
- if (drive->driver == &idedefault_driver)
- return NULL;
+
+ if (drive->media == ide_disk)
+ request_module("ide-disk");
+ if (drive->scsi)
+ request_module("ide-scsi");
+ if (drive->media == ide_cdrom || drive->media == ide_optical)
+ request_module("ide-cd");
+ if (drive->media == ide_tape)
+ request_module("ide-tape");
+ if (drive->media == ide_floppy)
+ request_module("ide-floppy");
+
+ return NULL;
+}
+
+static struct kobject *exact_match(dev_t dev, int *part, void *data)
+{
+ struct gendisk *p = data;
*part &= (1 << PARTN_BITS) - 1;
- return get_disk(drive->disk);
+ return &p->kobj;
}
-static int alloc_disks(ide_hwif_t *hwif)
+static int exact_lock(dev_t dev, void *data)
{
- unsigned int unit;
- struct gendisk *disks[MAX_DRIVES];
+ struct gendisk *p = data;
- for (unit = 0; unit < MAX_DRIVES; unit++) {
- disks[unit] = alloc_disk(1 << PARTN_BITS);
- if (!disks[unit])
- goto Enomem;
- }
- for (unit = 0; unit < MAX_DRIVES; ++unit) {
- ide_drive_t *drive = &hwif->drives[unit];
- struct gendisk *disk = disks[unit];
- disk->major = hwif->major;
- disk->first_minor = unit << PARTN_BITS;
- sprintf(disk->disk_name,"hd%c",'a'+hwif->index*MAX_DRIVES+unit);
- disk->fops = ide_fops;
- disk->private_data = drive;
- drive->disk = disk;
- }
+ if (!get_disk(p))
+ return -1;
return 0;
-Enomem:
- printk(KERN_WARNING "(ide::init_gendisk) Out of memory\n");
- while (unit--)
- put_disk(disks[unit]);
- return -ENOMEM;
}
+void ide_register_region(struct gendisk *disk)
+{
+ blk_register_region(MKDEV(disk->major, disk->first_minor),
+ disk->minors, NULL, exact_match, exact_lock, disk);
+}
+
+EXPORT_SYMBOL_GPL(ide_register_region);
+
+void ide_unregister_region(struct gendisk *disk)
+{
+ blk_unregister_region(MKDEV(disk->major, disk->first_minor),
+ disk->minors);
+}
+
+EXPORT_SYMBOL_GPL(ide_unregister_region);
+
+void ide_init_disk(struct gendisk *disk, ide_drive_t *drive)
+{
+ ide_hwif_t *hwif = drive->hwif;
+ unsigned int unit = (drive->select.all >> 4) & 1;
+
+ disk->major = hwif->major;
+ disk->first_minor = unit << PARTN_BITS;
+ sprintf(disk->disk_name, "hd%c", 'a' + hwif->index * MAX_DRIVES + unit);
+ disk->queue = drive->queue;
+}
+
+EXPORT_SYMBOL_GPL(ide_init_disk);
+
static void drive_release_dev (struct device *dev)
{
ide_drive_t *drive = container_of(dev, ide_drive_t, gendev);
@@ -1304,7 +1319,7 @@ static void init_gendisk (ide_hwif_t *hwif)
static int hwif_init(ide_hwif_t *hwif)
{
- int old_irq, unit;
+ int old_irq;
/* Return success if no device is connected */
if (!hwif->present)
@@ -1340,9 +1355,6 @@ static int hwif_init(ide_hwif_t *hwif)
printk(KERN_ERR "%s: unable to allocate SG table.\n", hwif->name);
goto out;
}
-
- if (alloc_disks(hwif) < 0)
- goto out;
if (init_irq(hwif) == 0)
goto done;
@@ -1355,12 +1367,12 @@ static int hwif_init(ide_hwif_t *hwif)
if (!(hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET]))) {
printk("%s: Disabled unable to get IRQ %d.\n",
hwif->name, old_irq);
- goto out_disks;
+ goto out;
}
if (init_irq(hwif)) {
printk("%s: probed IRQ %d and default IRQ %d failed.\n",
hwif->name, old_irq, hwif->irq);
- goto out_disks;
+ goto out;
}
printk("%s: probed IRQ %d failed, using default.\n",
hwif->name, hwif->irq);
@@ -1370,12 +1382,6 @@ done:
hwif->present = 1; /* success */
return 1;
-out_disks:
- for (unit = 0; unit < MAX_DRIVES; unit++) {
- struct gendisk *disk = hwif->drives[unit].disk;
- hwif->drives[unit].disk = NULL;
- put_disk(disk);
- }
out:
unregister_blkdev(hwif->major, hwif->name);
return 0;
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 30e9611fc728de..bdff5ac580531c 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -107,8 +107,6 @@ static int proc_ide_read_identify
if (drive) {
unsigned short *val = (unsigned short *) page;
- BUG_ON(!drive->driver);
-
err = taskfile_lib_get_identify(drive, page);
if (!err) {
char *out = ((char *)page) + (SECTOR_WORDS * 4);
@@ -312,8 +310,11 @@ static int proc_ide_read_driver
ide_driver_t *driver = drive->driver;
int len;
- len = sprintf(page, "%s version %s\n",
- driver->name, driver->version);
+ if (driver) {
+ len = sprintf(page, "%s version %s\n",
+ driver->name, driver->version);
+ } else
+ len = sprintf(page, "ide-default version 0.9.newide\n");
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
@@ -421,10 +422,7 @@ static void create_proc_ide_drives(ide_hwif_t *hwif)
static void destroy_proc_ide_device(ide_hwif_t *hwif, ide_drive_t *drive)
{
- ide_driver_t *driver = drive->driver;
-
if (drive->proc) {
- ide_remove_proc_entries(drive->proc, driver->proc);
ide_remove_proc_entries(drive->proc, generic_drive_entries);
remove_proc_entry(drive->name, proc_ide_root);
remove_proc_entry(drive->name, hwif->proc);
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 913d762c5220d4..4825448549850d 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -783,6 +783,8 @@ typedef struct {
*/
typedef struct ide_tape_obj {
ide_drive_t *drive;
+ ide_driver_t *driver;
+ struct gendisk *disk;
struct kref kref;
/*
@@ -1013,7 +1015,8 @@ static DECLARE_MUTEX(idetape_ref_sem);
#define to_ide_tape(obj) container_of(obj, struct ide_tape_obj, kref)
-#define ide_tape_g(disk) ((disk)->private_data)
+#define ide_tape_g(disk) \
+ container_of((disk)->private_data, struct ide_tape_obj, driver)
static struct ide_tape_obj *ide_tape_get(struct gendisk *disk)
{
@@ -1543,6 +1546,7 @@ static void idetape_active_next_stage (ide_drive_t *drive)
}
#endif /* IDETAPE_DEBUG_BUGS */
+ rq->rq_disk = tape->disk;
rq->buffer = NULL;
rq->special = (void *)stage->bh;
tape->active_data_request = rq;
@@ -1795,8 +1799,11 @@ static void idetape_init_rq(struct request *rq, u8 cmd)
*/
static void idetape_queue_pc_head (ide_drive_t *drive, idetape_pc_t *pc,struct request *rq)
{
+ struct ide_tape_obj *tape = drive->driver_data;
+
idetape_init_rq(rq, REQ_IDETAPE_PC1);
rq->buffer = (char *) pc;
+ rq->rq_disk = tape->disk;
(void) ide_do_drive_cmd(drive, rq, ide_preempt);
}
@@ -2852,10 +2859,12 @@ static void idetape_create_test_unit_ready_cmd(idetape_pc_t *pc)
*/
static int __idetape_queue_pc_tail (ide_drive_t *drive, idetape_pc_t *pc)
{
+ struct ide_tape_obj *tape = drive->driver_data;
struct request rq;
idetape_init_rq(&rq, REQ_IDETAPE_PC1);
rq.buffer = (char *) pc;
+ rq.rq_disk = tape->disk;
return ide_do_drive_cmd(drive, &rq, ide_wait);
}
@@ -3079,6 +3088,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int blocks, struct
#endif /* IDETAPE_DEBUG_BUGS */
idetape_init_rq(&rq, cmd);
+ rq.rq_disk = tape->disk;
rq.special = (void *)bh;
rq.sector = tape->first_frame_position;
rq.nr_sectors = rq.current_nr_sectors = blocks;
@@ -4687,6 +4697,8 @@ static int idetape_cleanup (ide_drive_t *drive)
DRIVER(drive)->busy = 0;
(void) ide_unregister_subdriver(drive);
+ ide_unregister_region(tape->disk);
+
ide_tape_put(tape);
return 0;
@@ -4696,15 +4708,16 @@ static void ide_tape_release(struct kref *kref)
{
struct ide_tape_obj *tape = to_ide_tape(kref);
ide_drive_t *drive = tape->drive;
- struct gendisk *g = drive->disk;
+ struct gendisk *g = tape->disk;
+ drive->dsc_overlap = 0;
drive->driver_data = NULL;
devfs_remove("%s/mt", drive->devfs_name);
devfs_remove("%s/mtn", drive->devfs_name);
devfs_unregister_tape(g->number);
idetape_devs[tape->minor] = NULL;
g->private_data = NULL;
- g->fops = ide_fops;
+ put_disk(g);
kfree(tape);
}
@@ -4819,7 +4832,7 @@ static struct block_device_operations idetape_block_ops = {
static int idetape_attach (ide_drive_t *drive)
{
idetape_tape_t *tape;
- struct gendisk *g = drive->disk;
+ struct gendisk *g;
int minor;
if (!strstr("ide-tape", drive->driver_req))
@@ -4845,10 +4858,16 @@ static int idetape_attach (ide_drive_t *drive)
printk(KERN_ERR "ide-tape: %s: Can't allocate a tape structure\n", drive->name);
goto failed;
}
+
+ g = alloc_disk(1 << PARTN_BITS);
+ if (!g)
+ goto out_free_tape;
+
+ ide_init_disk(g, drive);
+
if (ide_register_subdriver(drive, &idetape_driver)) {
printk(KERN_ERR "ide-tape: %s: Failed to register the driver with ide.c\n", drive->name);
- kfree(tape);
- goto failed;
+ goto out_put_disk;
}
memset(tape, 0, sizeof(*tape));
@@ -4856,6 +4875,10 @@ static int idetape_attach (ide_drive_t *drive)
kref_init(&tape->kref);
tape->drive = drive;
+ tape->driver = &idetape_driver;
+ tape->disk = g;
+
+ g->private_data = &tape->driver;
drive->driver_data = tape;
@@ -4876,9 +4899,13 @@ static int idetape_attach (ide_drive_t *drive)
g->number = devfs_register_tape(drive->devfs_name);
g->fops = &idetape_block_ops;
- g->private_data = tape;
+ ide_register_region(g);
return 0;
+out_put_disk:
+ put_disk(g);
+out_free_tape:
+ kfree(tape);
failed:
return 1;
}
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 246a1a1bd46577..d04f62ab5de199 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -354,8 +354,12 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
break;
}
- if (sectors > 0)
- drive->driver->end_request(drive, 1, sectors);
+ if (sectors > 0) {
+ ide_driver_t *drv;
+
+ drv = *(ide_driver_t **)rq->rq_disk->private_data;
+ drv->end_request(drive, 1, sectors);
+ }
}
return ide_error(drive, s, stat);
}
@@ -371,7 +375,8 @@ static void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
return;
}
}
- drive->driver->end_request(drive, 1, rq->hard_nr_sectors);
+
+ ide_end_request(drive, 1, rq->hard_nr_sectors);
}
/*
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 20da2d61b200f9..973dec799b5c8b 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -196,7 +196,7 @@ ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */
EXPORT_SYMBOL(ide_hwifs);
-extern ide_driver_t idedefault_driver;
+static struct list_head ide_drives = LIST_HEAD_INIT(ide_drives);
/*
* Do not even *think* about calling this!
@@ -245,7 +245,6 @@ static void init_hwif_data(ide_hwif_t *hwif, unsigned int index)
drive->max_failures = IDE_DEFAULT_MAX_FAILURES;
drive->using_dma = 0;
drive->is_flash = 0;
- drive->driver = &idedefault_driver;
drive->vdma = 0;
INIT_LIST_HEAD(&drive->list);
sema_init(&drive->gendev_rel_sem, 0);
@@ -359,11 +358,6 @@ static int ide_system_bus_speed(void)
return system_bus_speed;
}
-static int ide_open (struct inode * inode, struct file * filp)
-{
- return -ENXIO;
-}
-
/*
* drives_lock protects the list of drives, drivers_lock the
* list of drivers. Currently nobody takes both at once.
@@ -763,11 +757,6 @@ void ide_unregister(unsigned int index)
* Remove us from the kernel's knowledge
*/
blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS);
- for (i = 0; i < MAX_DRIVES; i++) {
- struct gendisk *disk = hwif->drives[i].disk;
- hwif->drives[i].disk = NULL;
- put_disk(disk);
- }
kfree(hwif->sg_table);
unregister_blkdev(hwif->major, hwif->name);
spin_lock_irq(&ide_lock);
@@ -931,7 +920,7 @@ EXPORT_SYMBOL(ide_register_hw);
DECLARE_MUTEX(ide_setting_sem);
/**
- * ide_add_setting - add an ide setting option
+ * __ide_add_setting - add an ide setting option
* @drive: drive to use
* @name: setting name
* @rw: true if the function is read write
@@ -944,6 +933,7 @@ DECLARE_MUTEX(ide_setting_sem);
* @div_factor: divison scale
* @data: private data field
* @set: setting
+ * @auto_remove: setting auto removal flag
*
* Removes the setting named from the device if it is present.
* The function takes the settings_lock to protect against
@@ -955,8 +945,8 @@ DECLARE_MUTEX(ide_setting_sem);
* a driver is attached we assume the driver settings are auto
* remove.
*/
-
-int ide_add_setting (ide_drive_t *drive, const char *name, int rw, int read_ioctl, int write_ioctl, int data_type, int min, int max, int mul_factor, int div_factor, void *data, ide_procset_t *set)
+
+static int __ide_add_setting(ide_drive_t *drive, const char *name, int rw, int read_ioctl, int write_ioctl, int data_type, int min, int max, int mul_factor, int div_factor, void *data, ide_procset_t *set, int auto_remove)
{
ide_settings_t **p = (ide_settings_t **) &drive->settings, *setting = NULL;
@@ -981,7 +971,7 @@ int ide_add_setting (ide_drive_t *drive, const char *name, int rw, int read_ioct
setting->set = set;
setting->next = *p;
- if (drive->driver != &idedefault_driver)
+ if (auto_remove)
setting->auto_remove = 1;
*p = setting;
up(&ide_setting_sem);
@@ -993,6 +983,11 @@ abort:
return -1;
}
+int ide_add_setting(ide_drive_t *drive, const char *name, int rw, int read_ioctl, int write_ioctl, int data_type, int min, int max, int mul_factor, int div_factor, void *data, ide_procset_t *set)
+{
+ return __ide_add_setting(drive, name, rw, read_ioctl, write_ioctl, data_type, min, max, mul_factor, div_factor, data, set, 1);
+}
+
EXPORT_SYMBOL(ide_add_setting);
/**
@@ -1282,17 +1277,17 @@ static int set_xfer_rate (ide_drive_t *drive, int arg)
void ide_add_generic_settings (ide_drive_t *drive)
{
/*
- * drive setting name read/write access read ioctl write ioctl data type min max mul_factor div_factor data pointer set function
+ * drive setting name read/write access read ioctl write ioctl data type min max mul_factor div_factor data pointer set function
*/
- ide_add_setting(drive, "io_32bit", drive->no_io_32bit ? SETTING_READ : SETTING_RW, HDIO_GET_32BIT, HDIO_SET_32BIT, TYPE_BYTE, 0, 1 + (SUPPORT_VLB_SYNC << 1), 1, 1, &drive->io_32bit, set_io_32bit);
- ide_add_setting(drive, "keepsettings", SETTING_RW, HDIO_GET_KEEPSETTINGS, HDIO_SET_KEEPSETTINGS, TYPE_BYTE, 0, 1, 1, 1, &drive->keep_settings, NULL);
- ide_add_setting(drive, "nice1", SETTING_RW, -1, -1, TYPE_BYTE, 0, 1, 1, 1, &drive->nice1, NULL);
- ide_add_setting(drive, "pio_mode", SETTING_WRITE, -1, HDIO_SET_PIO_MODE, TYPE_BYTE, 0, 255, 1, 1, NULL, set_pio_mode);
- ide_add_setting(drive, "unmaskirq", drive->no_unmask ? SETTING_READ : SETTING_RW, HDIO_GET_UNMASKINTR, HDIO_SET_UNMASKINTR, TYPE_BYTE, 0, 1, 1, 1, &drive->unmask, NULL);
- ide_add_setting(drive, "using_dma", SETTING_RW, HDIO_GET_DMA, HDIO_SET_DMA, TYPE_BYTE, 0, 1, 1, 1, &drive->using_dma, set_using_dma);
- ide_add_setting(drive, "init_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->init_speed, NULL);
- ide_add_setting(drive, "current_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->current_speed, set_xfer_rate);
- ide_add_setting(drive, "number", SETTING_RW, -1, -1, TYPE_BYTE, 0, 3, 1, 1, &drive->dn, NULL);
+ __ide_add_setting(drive, "io_32bit", drive->no_io_32bit ? SETTING_READ : SETTING_RW, HDIO_GET_32BIT, HDIO_SET_32BIT, TYPE_BYTE, 0, 1 + (SUPPORT_VLB_SYNC << 1), 1, 1, &drive->io_32bit, set_io_32bit, 0);
+ __ide_add_setting(drive, "keepsettings", SETTING_RW, HDIO_GET_KEEPSETTINGS, HDIO_SET_KEEPSETTINGS, TYPE_BYTE, 0, 1, 1, 1, &drive->keep_settings, NULL, 0);
+ __ide_add_setting(drive, "nice1", SETTING_RW, -1, -1, TYPE_BYTE, 0, 1, 1, 1, &drive->nice1, NULL, 0);
+ __ide_add_setting(drive, "pio_mode", SETTING_WRITE, -1, HDIO_SET_PIO_MODE, TYPE_BYTE, 0, 255, 1, 1, NULL, set_pio_mode, 0);
+ __ide_add_setting(drive, "unmaskirq", drive->no_unmask ? SETTING_READ : SETTING_RW, HDIO_GET_UNMASKINTR, HDIO_SET_UNMASKINTR, TYPE_BYTE, 0, 1, 1, 1, &drive->unmask, NULL, 0);
+ __ide_add_setting(drive, "using_dma", SETTING_RW, HDIO_GET_DMA, HDIO_SET_DMA, TYPE_BYTE, 0, 1, 1, 1, &drive->using_dma, set_using_dma, 0);
+ __ide_add_setting(drive, "init_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->init_speed, NULL, 0);
+ __ide_add_setting(drive, "current_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->current_speed, set_xfer_rate, 0);
+ __ide_add_setting(drive, "number", SETTING_RW, -1, -1, TYPE_BYTE, 0, 3, 1, 1, &drive->dn, NULL, 0);
}
/**
@@ -1330,7 +1325,7 @@ int ide_replace_subdriver (ide_drive_t *drive, const char *driver)
} else {
drive->driver_req[0] = 0;
}
- if (DRIVER(drive)!= &idedefault_driver && !strcmp(DRIVER(drive)->name, driver))
+ if (drive->driver && !strcmp(drive->driver->name, driver))
return 0;
abort:
return 1;
@@ -1369,9 +1364,9 @@ int ata_attach(ide_drive_t *drive)
spin_lock(&drivers_lock);
module_put(driver->owner);
}
- drive->gendev.driver = &idedefault_driver.gen_driver;
+ drive->gendev.driver = NULL;
spin_unlock(&drivers_lock);
- if(idedefault_driver.attach(drive) != 0)
+ if (ide_register_subdriver(drive, NULL))
panic("ide: default attach failed");
return 1;
}
@@ -1418,6 +1413,7 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
unsigned int cmd, unsigned long arg)
{
ide_settings_t *setting;
+ ide_driver_t *drv;
int err = 0;
void __user *p = (void __user *)arg;
@@ -1517,7 +1513,8 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
if (arg != (arg & ((1 << IDE_NICE_DSC_OVERLAP) | (1 << IDE_NICE_1))))
return -EPERM;
drive->dsc_overlap = (arg >> IDE_NICE_DSC_OVERLAP) & 1;
- if (drive->dsc_overlap && !DRIVER(drive)->supports_dsc_overlap) {
+ drv = *(ide_driver_t **)bdev->bd_disk->private_data;
+ if (drive->dsc_overlap && !drv->supports_dsc_overlap) {
drive->dsc_overlap = 0;
return -EPERM;
}
@@ -2020,10 +2017,8 @@ int ide_register_subdriver(ide_drive_t *drive, ide_driver_t *driver)
{
unsigned long flags;
- BUG_ON(!drive->driver);
-
spin_lock_irqsave(&ide_lock, flags);
- if (!drive->present || drive->driver != &idedefault_driver ||
+ if (!drive->present || drive->driver != NULL ||
drive->usage || drive->dead) {
spin_unlock_irqrestore(&ide_lock, flags);
return 1;
@@ -2031,17 +2026,11 @@ int ide_register_subdriver(ide_drive_t *drive, ide_driver_t *driver)
drive->driver = driver;
spin_unlock_irqrestore(&ide_lock, flags);
spin_lock(&drives_lock);
- list_add_tail(&drive->list, &driver->drives);
+ list_add_tail(&drive->list, driver ? &driver->drives : &ide_drives);
spin_unlock(&drives_lock);
// printk(KERN_INFO "%s: attached %s driver.\n", drive->name, driver->name);
- if ((drive->autotune == IDE_TUNE_DEFAULT) ||
- (drive->autotune == IDE_TUNE_AUTO)) {
- /* DMA timings and setup moved to ide-probe.c */
- drive->dsc_overlap = (drive->next != drive && driver->supports_dsc_overlap);
- drive->nice1 = 1;
- }
#ifdef CONFIG_PROC_FS
- if (drive->driver != &idedefault_driver)
+ if (driver)
ide_add_proc_entries(drive->proc, driver->proc, drive);
#endif
return 0;
@@ -2069,7 +2058,7 @@ int ide_unregister_subdriver (ide_drive_t *drive)
down(&ide_setting_sem);
spin_lock_irqsave(&ide_lock, flags);
- if (drive->usage || drive->driver == &idedefault_driver || DRIVER(drive)->busy) {
+ if (drive->usage || drive->driver == NULL || DRIVER(drive)->busy) {
spin_unlock_irqrestore(&ide_lock, flags);
up(&ide_setting_sem);
return 1;
@@ -2078,13 +2067,13 @@ int ide_unregister_subdriver (ide_drive_t *drive)
ide_remove_proc_entries(drive->proc, DRIVER(drive)->proc);
#endif
auto_remove_settings(drive);
- drive->driver = &idedefault_driver;
+ drive->driver = NULL;
spin_unlock_irqrestore(&ide_lock, flags);
up(&ide_setting_sem);
spin_lock(&drives_lock);
list_del_init(&drive->list);
spin_unlock(&drives_lock);
- /* drive will be added to &idedefault_driver->drives in ata_attach() */
+ /* drive will be added to &ide_drives in ata_attach() */
return 0;
}
@@ -2120,7 +2109,7 @@ int ide_register_driver(ide_driver_t *driver)
INIT_LIST_HEAD(&list);
spin_lock(&drives_lock);
- list_splice_init(&idedefault_driver.drives, &list);
+ list_splice_init(&ide_drives, &list);
spin_unlock(&drives_lock);
list_for_each_safe(list_loop, tmp_storage, &list) {
@@ -2170,13 +2159,6 @@ void ide_unregister_driver(ide_driver_t *driver)
EXPORT_SYMBOL(ide_unregister_driver);
-struct block_device_operations ide_fops[] = {{
- .owner = THIS_MODULE,
- .open = ide_open,
-}};
-
-EXPORT_SYMBOL(ide_fops);
-
/*
* Probe module
*/
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index 440416026504ef..82a1103b24130f 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -341,7 +341,7 @@ static int svwks_ide_dma_end (ide_drive_t *drive)
return __ide_dma_end(drive);
}
-static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name)
{
unsigned int reg;
u8 btr;
@@ -508,7 +508,7 @@ static unsigned int __init ata66_svwks (ide_hwif_t *hwif)
}
#undef CAN_SW_DMA
-static void __init init_hwif_svwks (ide_hwif_t *hwif)
+static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
{
u8 dma_stat = 0;
@@ -556,7 +556,7 @@ static void __init init_hwif_svwks (ide_hwif_t *hwif)
/*
* We allow the BM-DMA driver to only work on enabled interfaces.
*/
-static void __init init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
+static void __devinit init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
{
struct pci_dev *dev = hwif->pci_dev;
@@ -568,7 +568,7 @@ static void __init init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
ide_setup_dma(hwif, dmabase, 8);
}
-static int __init init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
+static int __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
{
return ide_setup_pci_device(dev, d);
}
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index d90f4d2251ab0f..069dbffe211667 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -332,11 +332,8 @@ static int via_set_drive(ide_drive_t *drive, u8 speed)
struct ide_timing t, p;
unsigned int T, UT;
- if (speed != XFER_PIO_SLOW && speed != drive->current_speed)
- if (ide_config_drive_speed(drive, speed))
- printk(KERN_WARNING "ide%d: Drive %d didn't "
- "accept speed setting. Oh, well.\n",
- drive->dn >> 1, drive->dn & 1);
+ if (speed != XFER_PIO_SLOW)
+ ide_config_drive_speed(drive, speed);
T = 1000000000 / via_clock;
diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c
index 3dee11edede7b8..08b60bdc538129 100644
--- a/drivers/mtd/maps/pci.c
+++ b/drivers/mtd/maps/pci.c
@@ -205,9 +205,9 @@ intel_dc21285_init(struct pci_dev *dev, struct map_pci_info *map)
* or simply enabling it?
*/
if (!(pci_resource_flags(dev, PCI_ROM_RESOURCE) &
- PCI_ROM_ADDRESS_ENABLE)) {
+ IORESOURCE_ROM_ENABLE)) {
u32 val;
- pci_resource_flags(dev, PCI_ROM_RESOURCE) |= PCI_ROM_ADDRESS_ENABLE;
+ pci_resource_flags(dev, PCI_ROM_RESOURCE) |= IORESOURCE_ROM_ENABLE;
pci_read_config_dword(dev, PCI_ROM_ADDRESS, &val);
val |= PCI_ROM_ADDRESS_ENABLE;
pci_write_config_dword(dev, PCI_ROM_ADDRESS, val);
@@ -241,7 +241,7 @@ intel_dc21285_exit(struct pci_dev *dev, struct map_pci_info *map)
/*
* We need to undo the PCI BAR2/PCI ROM BAR address alteration.
*/
- pci_resource_flags(dev, PCI_ROM_RESOURCE) &= ~PCI_ROM_ADDRESS_ENABLE;
+ pci_resource_flags(dev, PCI_ROM_RESOURCE) &= ~IORESOURCE_ROM_ENABLE;
pci_read_config_dword(dev, PCI_ROM_ADDRESS, &val);
val &= ~PCI_ROM_ADDRESS_ENABLE;
pci_write_config_dword(dev, PCI_ROM_ADDRESS, val);
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 812c4274d7cdde..7f31991772ea4b 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -47,3 +47,13 @@ config PCI_NAMES
When in doubt, say Y.
+config PCI_DEBUG
+ bool "PCI Debugging"
+ depends on PCI && DEBUG_KERNEL
+ help
+ Say Y here if you want the PCI core to produce a bunch of debug
+ messages to the system log. Select this if you are having a
+ problem with PCI support and want to see more of what is going on.
+
+ When in doubt, say N.
+
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 92b11de780e389..7dea494c0d7bb8 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -41,6 +41,10 @@ ifndef CONFIG_X86
obj-y += syscall.o
endif
+ifeq ($(CONFIG_PCI_DEBUG),y)
+EXTRA_CFLAGS += -DDEBUG
+endif
+
hostprogs-y := gen-devlist
# Dependencies on generated files need to be listed explicitly
diff --git a/drivers/pci/gen-devlist.c b/drivers/pci/gen-devlist.c
index 372e2102581d87..8abfc499fdefcb 100644
--- a/drivers/pci/gen-devlist.c
+++ b/drivers/pci/gen-devlist.c
@@ -7,7 +7,7 @@
#include <stdio.h>
#include <string.h>
-#define MAX_NAME_SIZE 89
+#define MAX_NAME_SIZE 200
static void
pq(FILE *f, const char *c, int len)
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
index 42b23049a7fcde..d471b3ea5d12fb 100644
--- a/drivers/pci/hotplug.c
+++ b/drivers/pci/hotplug.c
@@ -1,15 +1,8 @@
+#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/module.h>
#include "pci.h"
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
int pci_hotplug (struct device *dev, char **envp, int num_envp,
char *buffer, int buffer_size)
{
@@ -71,7 +64,8 @@ static int pci_visit_bus (struct pci_visit * fn, struct pci_bus_wrapped *wrapped
struct pci_dev_wrapped wrapped_dev;
int result = 0;
- DBG("scanning bus %02x\n", wrapped_bus->bus->number);
+ pr_debug("PCI: Scanning bus %04x:%02x\n", pci_domain_nr(wrapped_bus->bus),
+ wrapped_bus->bus->number);
if (fn->pre_visit_pci_bus) {
result = fn->pre_visit_pci_bus(wrapped_bus, wrapped_parent);
@@ -106,8 +100,7 @@ static int pci_visit_bridge (struct pci_visit * fn,
struct pci_bus_wrapped wrapped_bus;
int result = 0;
- DBG("scanning bridge %02x, %02x\n", PCI_SLOT(wrapped_dev->dev->devfn),
- PCI_FUNC(wrapped_dev->dev->devfn));
+ pr_debug("PCI: Scanning bridge %s\n", pci_name(wrapped_dev->dev));
if (fn->visit_pci_dev) {
result = fn->visit_pci_dev(wrapped_dev, wrapped_parent);
@@ -153,8 +146,7 @@ int pci_visit_dev(struct pci_visit *fn, struct pci_dev_wrapped *wrapped_dev,
return result;
break;
default:
- DBG("scanning device %02x, %02x\n",
- PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
+ pr_debug("PCI: Scanning device %s\n", pci_name(dev));
if (fn->visit_pci_dev) {
result = fn->visit_pci_dev (wrapped_dev,
wrapped_parent);
@@ -169,4 +161,3 @@ int pci_visit_dev(struct pci_visit *fn, struct pci_dev_wrapped *wrapped_dev,
return result;
}
EXPORT_SYMBOL(pci_visit_dev);
-
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 24e0699ab0aadf..afbccfa5217d72 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -577,11 +577,11 @@ cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func,
{
u8 hp_slot;
- hp_slot = func->device - ctrl->slot_device_offset;
-
if (func == NULL)
return(1);
+ hp_slot = func->device - ctrl->slot_device_offset;
+
// Wait for exclusive access to hardware
down(&ctrl->crit_sect);
diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index 90ef5c086844f4..2335fac65fb4ee 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -1308,43 +1308,37 @@ static int unconfigure_boot_device (u8 busno, u8 device, u8 function)
/* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */
} else {
/* This is Memory */
+ start_address &= PCI_BASE_ADDRESS_MEM_MASK;
if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) {
/* pfmem */
- start_address &= PCI_BASE_ADDRESS_MEM_MASK;
debug ("start address of pfmem is %x\n", start_address);
if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) {
err ("cannot find corresponding PFMEM resource to remove\n");
return -EIO;
}
- if (pfmem)
+ if (pfmem) {
debug ("pfmem->start = %x\n", pfmem->start);
- ibmphp_remove_resource (pfmem);
-
- if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
- /* takes up another dword */
- count += 1;
+ ibmphp_remove_resource(pfmem);
}
-
} else {
/* regular memory */
- start_address &= PCI_BASE_ADDRESS_MEM_MASK;
debug ("start address of mem is %x\n", start_address);
if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) {
err ("cannot find corresponding MEM resource to remove\n");
return -EIO;
}
- if (mem)
+ if (mem) {
debug ("mem->start = %x\n", mem->start);
- ibmphp_remove_resource (mem);
-
- if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
- /* takes up another dword */
- count += 1;
+ ibmphp_remove_resource(mem);
}
}
+ if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+ /* takes up another dword */
+ count += 1;
+ }
} /* end of mem */
} /* end of for */
@@ -1428,40 +1422,34 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
/* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */
} else {
/* This is Memory */
+ start_address &= PCI_BASE_ADDRESS_MEM_MASK;
if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) {
/* pfmem */
- start_address &= PCI_BASE_ADDRESS_MEM_MASK;
if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) {
err ("cannot find corresponding PFMEM resource to remove\n");
return -EINVAL;
}
- if (pfmem)
+ if (pfmem) {
debug ("pfmem->start = %x\n", pfmem->start);
- ibmphp_remove_resource (pfmem);
-
- if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
- /* takes up another dword */
- count += 1;
+ ibmphp_remove_resource(pfmem);
}
-
} else {
/* regular memory */
- start_address &= PCI_BASE_ADDRESS_MEM_MASK;
if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) {
err ("cannot find corresponding MEM resource to remove\n");
return -EINVAL;
}
- if (mem)
+ if (mem) {
debug ("mem->start = %x\n", mem->start);
- ibmphp_remove_resource (mem);
-
- if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
- /* takes up another dword */
- count += 1;
+ ibmphp_remove_resource(mem);
}
}
+ if (tmp_address & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+ /* takes up another dword */
+ count += 1;
+ }
} /* end of mem */
} /* end of for */
debug ("%s - exiting, returning success\n", __FUNCTION__);
diff --git a/drivers/pci/hotplug/pci_hotplug.h b/drivers/pci/hotplug/pci_hotplug.h
index 2bae8aa587464a..57ace325168dfd 100644
--- a/drivers/pci/hotplug/pci_hotplug.h
+++ b/drivers/pci/hotplug/pci_hotplug.h
@@ -152,6 +152,8 @@ struct hotplug_slot_info {
* @ops: pointer to the &struct hotplug_slot_ops to be used for this slot
* @info: pointer to the &struct hotplug_slot_info for the inital values for
* this slot.
+ * @release: called during pci_hp_deregister to free memory allocated in a
+ * hotplug_slot structure.
* @private: used by the hotplug pci controller driver to store whatever it
* needs.
*/
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
index 906fd9b3fbd39e..c802f6270b8954 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -567,6 +567,11 @@ int pci_hp_register (struct hotplug_slot *slot)
return -ENODEV;
if ((slot->info == NULL) || (slot->ops == NULL))
return -EINVAL;
+ if (slot->release == NULL) {
+ dbg("Why are you trying to register a hotplug slot"
+ "without a proper release function?\n");
+ return -EINVAL;
+ }
kobject_set_name(&slot->kobj, "%s", slot->name);
kobj_set_kset_s(slot, pci_hotplug_slots_subsys);
diff --git a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h
index df9575ef5aa55b..81746e6e0e0fef 100644
--- a/drivers/pci/hotplug/rpaphp.h
+++ b/drivers/pci/hotplug/rpaphp.h
@@ -94,7 +94,7 @@ struct slot {
/* dn has phb info */
struct pci_dev *bridge; /* slot's pci_dev in pci_devices */
union {
- struct list_head pci_funcs; /* pci_devs in PCI slot */
+ struct list_head *pci_devs; /* pci_devs in PCI slot */
struct vio_dev *vio_dev; /* vio_dev in VIO slot */
} dev;
struct hotplug_slot *hotplug_slot;
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index a96b4af16f2455..d8305a935aab12 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -130,11 +130,11 @@ int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value)
*value = EMPTY;
}
else if (state == PRESENT) {
- if (!is_init)
+ if (!is_init) {
/* at run-time slot->state can be changed by */
/* config/unconfig adapter */
*value = slot->state;
- else {
+ } else {
child_dn = slot->dn->child;
if (child_dn)
child_dev = rpaphp_find_pci_dev(child_dn);
@@ -263,56 +263,17 @@ static void enable_eeh(struct device_node *dn)
}
-#ifdef DEBUG
static void print_slot_pci_funcs(struct slot *slot)
{
- struct list_head *l;
+ struct pci_dev *dev;
if (slot->dev_type == PCI_DEV) {
- printk("pci_funcs of slot[%s]\n", slot->name);
- if (list_empty(&slot->dev.pci_funcs))
- printk(" pci_funcs is EMPTY\n");
-
- list_for_each (l, &slot->dev.pci_funcs) {
- struct rpaphp_pci_func *func =
- list_entry(l, struct rpaphp_pci_func, sibling);
- printk(" FOUND dev=%s\n", pci_name(func->pci_dev));
- }
+ dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, slot->name);
+ list_for_each_entry (dev, slot->dev.pci_devs, bus_list)
+ dbg("\t%s\n", pci_name(dev));
}
return;
}
-#else
-static void print_slot_pci_funcs(struct slot *slot)
-{
- return;
-}
-#endif
-
-static int init_slot_pci_funcs(struct slot *slot)
-{
- struct device_node *child;
-
- for (child = slot->dn->child; child != NULL; child = child->sibling) {
- struct pci_dev *pdev = rpaphp_find_pci_dev(child);
-
- if (pdev) {
- struct rpaphp_pci_func *func;
- func = kmalloc(sizeof(struct rpaphp_pci_func), GFP_KERNEL);
- if (!func)
- return -ENOMEM;
- memset(func, 0, sizeof(struct rpaphp_pci_func));
- INIT_LIST_HEAD(&func->sibling);
- func->pci_dev = pdev;
- list_add_tail(&func->sibling, &slot->dev.pci_funcs);
- print_slot_pci_funcs(slot);
- } else {
- err("%s: dn=%s has no pci_dev\n",
- __FUNCTION__, child->full_name);
- return -EIO;
- }
- }
- return 0;
-}
static int rpaphp_config_pci_adapter(struct slot *slot)
{
@@ -335,13 +296,8 @@ static int rpaphp_config_pci_adapter(struct slot *slot)
err("%s: can't find any devices.\n", __FUNCTION__);
goto exit;
}
- /* associate corresponding pci_dev */
- rc = init_slot_pci_funcs(slot);
- if (rc)
- goto exit;
print_slot_pci_funcs(slot);
- if (!list_empty(&slot->dev.pci_funcs))
- rc = 0;
+ rc = 0;
} else {
/* slot is not enabled */
err("slot doesn't have pci_dev structure\n");
@@ -371,34 +327,16 @@ static void rpaphp_eeh_remove_bus_device(struct pci_dev *dev)
int rpaphp_unconfig_pci_adapter(struct slot *slot)
{
+ struct pci_dev *dev;
int retval = 0;
- struct list_head *ln, *tmp;
- dbg("Entry %s: slot[%s]\n", __FUNCTION__, slot->name);
- if (list_empty(&slot->dev.pci_funcs)) {
- err("%s: slot[%s] doesn't have any devices.\n", __FUNCTION__,
- slot->name);
+ list_for_each_entry(dev, slot->dev.pci_devs, bus_list)
+ rpaphp_eeh_remove_bus_device(dev);
- retval = -EINVAL;
- goto exit;
- }
- /* remove the devices from the pci core */
- list_for_each_safe (ln, tmp, &slot->dev.pci_funcs) {
- struct rpaphp_pci_func *func;
-
- func = list_entry(ln, struct rpaphp_pci_func, sibling);
- if (func->pci_dev) {
- pci_remove_bus_device(func->pci_dev);
- rpaphp_eeh_remove_bus_device(func->pci_dev);
- }
- kfree(func);
- }
- INIT_LIST_HEAD(&slot->dev.pci_funcs);
+ pci_remove_behind_bridge(slot->bridge);
slot->state = NOT_CONFIGURED;
info("%s: devices in slot[%s] unconfigured.\n", __FUNCTION__,
slot->name);
-exit:
- dbg("Exit %s, rc=0x%x\n", __FUNCTION__, retval);
return retval;
}
@@ -444,6 +382,7 @@ static int set_phb_slot_name(struct slot *slot)
static int setup_pci_slot(struct slot *slot)
{
+ struct pci_bus *bus;
int rc;
if (slot->type == PHB) {
@@ -460,6 +399,12 @@ static int setup_pci_slot(struct slot *slot)
__FUNCTION__, slot->name);
goto exit_rc;
}
+
+ bus = slot->bridge->subordinate;
+ if (!bus)
+ goto exit_rc;
+ slot->dev.pci_devs = &bus->devices;
+
dbg("%s set slot->name to %s\n", __FUNCTION__,
pci_name(slot->bridge));
strcpy(slot->name, pci_name(slot->bridge));
@@ -484,22 +429,15 @@ static int setup_pci_slot(struct slot *slot)
err("%s: CONFIG pci adapter failed\n", __FUNCTION__);
goto exit_rc;
}
- } else if (slot->hotplug_slot->info->adapter_status == CONFIGURED) {
- if (init_slot_pci_funcs(slot)) {
- err("%s: init_slot_pci_funcs failed\n", __FUNCTION__);
- goto exit_rc;
- }
- } else {
+ } else if (slot->hotplug_slot->info->adapter_status != CONFIGURED) {
err("%s: slot[%s]'s adapter_status is NOT_VALID.\n",
__FUNCTION__, slot->name);
goto exit_rc;
}
-
print_slot_pci_funcs(slot);
- if (!list_empty(&slot->dev.pci_funcs)) {
+ if (!list_empty(slot->dev.pci_devs)) {
slot->state = CONFIGURED;
-
} else {
/* DLPAR add as opposed to
* boot time */
@@ -521,7 +459,6 @@ int register_pci_slot(struct slot *slot)
slot->removable = 0;
else
slot->removable = 1;
- INIT_LIST_HEAD(&slot->dev.pci_funcs);
if (setup_pci_hotplug_slot_info(slot))
goto exit_rc;
if (setup_pci_slot(slot))
diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c
index 5c58fd099bcf0d..ff2cbf0652d838 100644
--- a/drivers/pci/hotplug/rpaphp_slot.c
+++ b/drivers/pci/hotplug/rpaphp_slot.c
@@ -98,17 +98,6 @@ static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot)
void dealloc_slot_struct(struct slot *slot)
{
- struct list_head *ln, *n;
-
- if (slot->dev_type == PCI_DEV) {
- list_for_each_safe (ln, n, &slot->dev.pci_funcs) {
- struct rpaphp_pci_func *func;
-
- func = list_entry(ln, struct rpaphp_pci_func, sibling);
- kfree(func);
- }
- }
-
kfree(slot->hotplug_slot->info);
kfree(slot->hotplug_slot->name);
kfree(slot->hotplug_slot);
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 5425e0f77d8608..22ecd3b058be17 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -703,12 +703,14 @@ static int msix_capability_init(struct pci_dev *dev,
**/
int pci_enable_msi(struct pci_dev* dev)
{
- int pos, temp = dev->irq, status = -EINVAL;
+ int pos, temp, status = -EINVAL;
u16 control;
if (!pci_msi_enable || !dev)
return status;
+ temp = dev->irq;
+
if ((status = msi_init()) < 0)
return status;
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 76fe2db404dff3..37b7961efc44a9 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -49,13 +49,6 @@ pci_device_probe_dynamic(struct pci_driver *drv, struct pci_dev *pci_dev)
return error;
}
-static inline void
-dynid_init(struct dynid *dynid)
-{
- memset(dynid, 0, sizeof(*dynid));
- INIT_LIST_HEAD(&dynid->node);
-}
-
/**
* store_new_id
*
@@ -82,8 +75,9 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count)
dynid = kmalloc(sizeof(*dynid), GFP_KERNEL);
if (!dynid)
return -ENOMEM;
- dynid_init(dynid);
+ memset(dynid, 0, sizeof(*dynid));
+ INIT_LIST_HEAD(&dynid->node);
dynid->id.vendor = vendor;
dynid->id.device = device;
dynid->id.subvendor = subvendor;
@@ -167,7 +161,6 @@ static inline int pci_device_probe_dynamic(struct pci_driver *drv, struct pci_de
{
return -ENODEV;
}
-static inline void dynid_init(struct dynid *dynid) {}
static inline void pci_init_dynids(struct pci_dynids *dynids) {}
static inline void pci_free_dynids(struct pci_driver *drv) {}
static inline int pci_create_newid_file(struct pci_driver *drv)
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index eb8cf2b12f3e69..d57ae71d32b1dd 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -46,7 +46,7 @@ pci_config_attr(irq, "%u\n");
static ssize_t local_cpus_show(struct device *dev, char *buf)
{
- cpumask_t mask = pcibus_to_cpumask(to_pci_dev(dev)->bus->number);
+ cpumask_t mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
int len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask);
strcat(buf,"\n");
return 1+len;
@@ -481,7 +481,7 @@ static int __init pci_sysfs_init(void)
struct pci_dev *pdev = NULL;
sysfs_initialized = 1;
- while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL)
+ for_each_pci_dev(pdev)
pci_create_sysfs_dev_files(pdev);
return 0;
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index fb2b64b1f827cd..bfbff83352688d 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -9,6 +9,7 @@
* Copyright 1997 -- 2000 Martin Mares <mj@ucw.cz>
*/
+#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/pci.h>
@@ -16,13 +17,6 @@
#include <linux/spinlock.h>
#include <asm/dma.h> /* isa_dma_bridge_buggy */
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
/**
* pci_bus_max_busnr - returns maximum PCI bus number of given bus' children
@@ -635,7 +629,7 @@ pci_set_master(struct pci_dev *dev)
pci_read_config_word(dev, PCI_COMMAND, &cmd);
if (! (cmd & PCI_COMMAND_MASTER)) {
- DBG("PCI: Enabling bus mastering for device %s\n", pci_name(dev));
+ pr_debug("PCI: Enabling bus mastering for device %s\n", pci_name(dev));
cmd |= PCI_COMMAND_MASTER;
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
@@ -713,7 +707,7 @@ pci_set_mwi(struct pci_dev *dev)
pci_read_config_word(dev, PCI_COMMAND, &cmd);
if (! (cmd & PCI_COMMAND_INVALIDATE)) {
- DBG("PCI: Enabling Mem-Wr-Inval for device %s\n", pci_name(dev));
+ pr_debug("PCI: Enabling Mem-Wr-Inval for device %s\n", pci_name(dev));
cmd |= PCI_COMMAND_INVALIDATE;
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
diff --git a/drivers/pci/pci.ids b/drivers/pci/pci.ids
index 6007a75900541b..93481b41b613e3 100644
--- a/drivers/pci/pci.ids
+++ b/drivers/pci/pci.ids
@@ -7,7 +7,7 @@
# so if you have anything to contribute, please visit the home page or
# send a diff -u against the most recent pci.ids to pci-ids@ucw.cz.
#
-# Partial sync-up to daily snapshot on Tue 2005-02-08 11:00:09
+# Daily snapshot on Tue 2005-03-08 10:11:48
#
# Vendors, devices and subsystems. Please keep sorted.
@@ -47,6 +47,7 @@
0357 TTTech AG
000a TTP-Monitoring Card V2.0
0432 SCM Microsystems, Inc.
+ 0001 Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet]
05e3 CyberDoor
0701 CBD516
0675 Dynalink
@@ -225,6 +226,7 @@
1028 0123 PowerEdge 2600
1028 014a PowerEdge 1750
1028 016c PowerEdge 1850 MPT Fusion SCSI/RAID (Perc 4)
+ 1028 0183 PowerEdge 1800
1028 1010 LSI U320 SCSI Controller
0031 53c1030ZC PCI-X Fusion-MPT Dual Ultra320 SCSI
0032 53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI
@@ -338,6 +340,8 @@
4152 RV350 AR [Radeon 9600]
1002 0002 Radeon 9600XT
1043 c002 Radeon 9600 XT TVD
+ 174b 7c29 Sapphire Radeon 9600XT
+ 1787 4002 Radeon 9600 XT
4153 RV350 AS [Radeon 9600 AS]
4154 RV350 AT [Fire GL T2]
4155 RV350 AU [Fire GL T2]
@@ -366,6 +370,8 @@
4172 RV350 AR [Radeon 9600] (Secondary)
1002 0003 Radeon 9600XT (Secondary)
1043 c003 A9600XT (Secondary)
+ 174b 7c28 Sapphire Radeon 9600XT (Secondary)
+ 1787 4003 Radeon 9600 XT (Secondary)
4173 RV350 ?? [Radeon 9550] (Secondary)
4237 Radeon 7000 IGP
4242 R200 BB [Radeon All in Wonder 8500DV]
@@ -380,11 +386,17 @@
4345 EHCI USB Controller
4347 OHCI USB Controller #1
4348 OHCI USB Controller #2
+ 4349 ATI Dual Channel Bus Master PCI IDE Controller
434d IXP AC'97 Modem
-# Radeon 9100 IGP integrated
4353 ATI SMBus
4354 215CT [Mach64 CT]
4358 210888CX [Mach64 CX]
+ 4363 ATI SMBus
+ 436e ATI 436E Serial ATA Controller
+ 4372 ATI SMBus
+ 4376 Standard Dual Channel PCI IDE Controller ATI
+ 4379 ATI 4379 Serial ATA Controller
+ 437a ATI 437A Serial ATA Controller
4437 Radeon Mobility 7000 IGP
4554 210888ET [Mach64 ET]
4654 Mach64 VT
@@ -505,6 +517,7 @@
1002 0084 Xpert 98 AGP 2X (Mobility)
1014 0154 ThinkPad A20m
1028 00aa Latitude CPt
+ 1028 00bb Latitude CPx
4c4e Rage Mobility L AGP 2x
4c50 3D Rage LT Pro
1002 4c50 Rage LT Pro
@@ -526,7 +539,7 @@
4c5a Radeon Mobility M6 LZ
4c64 Radeon R250 Ld [Radeon Mobility 9000 M9]
4c65 Radeon R250 Le [Radeon Mobility 9000 M9]
- 4c66 Radeon R250 Lf [Radeon Mobility 9000 M9]
+ 4c66 Radeon R250 Lf [FireGL 9000]
4c67 Radeon R250 Lg [Radeon Mobility 9000 M9]
# Secondary chip to the Lf
4c6e Radeon R250 Ln [Radeon Mobility 9000 M9] [Secondary]
@@ -548,7 +561,8 @@
# New PCI ID provided by ATI developer relations
4e50 RV350 [Mobility Radeon 9600 M10]
1025 005a TravelMate 290
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
1734 1055 Amilo M1420W
4e51 M10 NQ [Radeon Mobility 9600]
4e52 RV350 [Mobility Radeon 9600 M10]
@@ -567,6 +581,7 @@
# New PCI ID provided by ATI developer relations
4e69 Radeon R350 [Radeon 9800] (Secondary)
4e6a RV350 NJ [Radeon 9800 XT] (Secondary)
+ 1002 4e71 ATI Technologies Inc M10 NQ [Radeon Mobility 9600]
5041 Rage 128 PA/PRO
5042 Rage 128 PB/PRO AGP 2x
5043 Rage 128 PC/PRO AGP 4x
@@ -739,6 +754,7 @@
5835 RS300M AGP [Radeon Mobility 9100IGP]
5838 Radeon 9100 IGP AGP Bridge
5941 RV280 [Radeon 9200] (Secondary)
+ 1458 4019 Gigabyte Radeon 9200
174b 7c12 Sapphire Radeon 9200
# http://www.hightech.com.hk/html/9200.htm
17af 200d Excalibur Radeon 9200
@@ -747,6 +763,7 @@
5960 RV280 [Radeon 9200 PRO]
5961 RV280 [Radeon 9200]
1002 2f72 All-in-Wonder 9200 Series
+ 1019 4c30 Radeon 9200 VIVO
12ab 5961 YUAN SMARTVGA Radeon 9200
1458 4018 Gigabyte Radeon 9200
174b 7c13 Sapphire Radeon 9200
@@ -767,12 +784,13 @@
# 128MB DDR, DVI/VGA/TV out
18bc 0173 GC-R9200L(SE)-C3H [Radeon 9200 Game Buster]
5b60 RV370 5B60 [Radeon X300 (PCIE)]
- 1043 002a EAX300SE
+ 1043 002a Extreme AX300SE-X
+ 1043 032e Extreme AX300/TD
5b62 RV370 5B62 [Radeon X600 (PCIE)]
5b64 RV370 5B64 [FireGL V3100 (PCIE)]
5b65 RV370 5B65 [FireGL D1100 (PCIE)]
- 5c61 RV250 5c61 [Radeon Mobility 9200 M9+]
- 5c63 RV250 5c63 [Radeon Mobility 9200 M9+]
+ 5c61 M9+ 5C61 [Radeon Mobility 9200 (AGP)]
+ 5c63 M9+ 5C63 [Radeon Mobility 9200 (AGP)]
5d44 RV280 [Radeon 9200 SE] (Secondary)
1458 4019 Radeon 9200 SE (Secondary)
174b 7c12 Sapphire Radeon 9200 SE (Secondary)
@@ -780,6 +798,7 @@
17af 2013 Radeon 9200 SE Excalibur (Secondary)
18bc 0171 Radeon 9200 SE 128MB Game Buster (Secondary)
18bc 0172 GC-R9200L(SE)-C3H [Radeon 9200 Game Buster]
+ 5d4d R480 [Radeon X850XT Platinum]
5d57 R423 5F57 [Radeon X800XT (PCIE)]
700f PCI Bridge [IGP 320M]
7010 PCI Bridge [IGP 340M]
@@ -845,12 +864,13 @@
103c 0024 Pavilion ze4400 builtin Network
1385 f311 FA311 / FA312 (FA311 with WoL HW)
0022 DP83820 10/100/1000 Ethernet Controller
- 0028 CS5535 Host bridge
+ 0028 Geode GX2 Host Bridge
+ 002a CS5535 South Bridge
002b CS5535 ISA bridge
002d CS5535 IDE
002e CS5535 Audio
002f CS5535 USB
- 0030 CS5535 Video
+ 0030 Geode GX2 Graphics Processor
0035 DP83065 [Saturn] 10/100/1000 Ethernet Controller
0500 SCx200 Bridge
0501 SCx200 SMI
@@ -997,11 +1017,13 @@
1200 GD 7542 [Nordic]
1202 GD 7543 [Viking]
1204 GD 7541 [Nordic Light]
+ 4000 MD 5620 [CLM Data Fax Voice]
4400 CD 4400
6001 CS 4610/11 [CrystalClear SoundFusion Audio Accelerator]
1014 1010 CS4610 SoundFusion Audio Accelerator
6003 CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]
1013 4280 Crystal SoundFusion PCI Audio Accelerator
+ 153b 1136 SiXPack 5.1+
1681 0050 Game Theater XP
1681 a011 Fortissimo III 7.1
6004 CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]
@@ -1121,7 +1143,7 @@
0266 PCI-X Dual Channel SCSI
0268 Gigabit Ethernet-SX Adapter (PCI-X)
0269 10/100/1000 Base-TX Ethernet Adapter (PCI-X)
- 028C Citrine chipset SCSI controller
+ 028c Citrine chipset SCSI controller
1014 028D Dual Channel PCI-X DDR SAS RAID Adapter (572E)
1014 02BE Dual Channel PCI-X DDR U320 SCSI RAID Adapter (571B)
1014 02C0 Dual Channel PCI-X DDR U320 SCSI Adapter (571A)
@@ -1263,6 +1285,7 @@
2001 4DWave NX
122d 1400 Trident PCI288-Q3DII (NX)
2100 CyberBlade XP4m32
+ 2200 XGI Volari XP5
8400 CyberBlade/i7
1023 8400 CyberBlade i7 AGP
8420 CyberBlade/i7d
@@ -1625,6 +1648,7 @@
1010 00a0 PowerVR Neon 250 AGP 32Mb
1010 00a8 PowerVR Neon 250 32Mb
1010 0120 PowerVR Neon 250 AGP 32Mb
+ 0072 uPD72874 IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr
0074 56k Voice Modem
1033 8014 RCV56ACF 56k Voice Modem
009b Vrc5476
@@ -1719,7 +1743,6 @@
1039 5513 SiS5513 EIDE Controller (A,B step)
1043 8035 CUSI-FX motherboard
5517 5517
- 5518 5518 [IDE]
5571 5571
5581 5581 Pentium Chipset
5582 5582
@@ -1818,6 +1841,8 @@
108b Visualize FXe
10c1 NetServer Smart IRQ Router
10ed TopTools Remote Control
+ 10f0 rio System Bus Adapter
+ 10f1 rio I/O Controller
1200 82557B 10/100 NIC
1219 NetServer PCI Hot-Plug Controller
121a NetServer SMIC Controller
@@ -1828,6 +1853,7 @@
122e zx1 Local Bus Adapter
127c sx1000 I/O Controller
1290 Auxiliary Diva Serial Port
+ 12b4 zx1 QuickSilver AGP8x Local Bus Adapter
2910 E2910A PCIBus Exerciser
2925 E2925A 32 Bit, 33 MHzPCI Exerciser & Analyzer
103e Solliday Engineering
@@ -1848,6 +1874,8 @@
8043 v8240 PAL 128M [P4T] Motherboard
807b v9280/TD [Geforce4 TI4200 8X With TV-Out and DVI]
80bb v9180 Magic/T [GeForce4 MX440 AGP 8x 64MB TV-out]
+ 80c5 nForce3 chipset motherboard [SK8N]
+ 80df v9520 Magic/T
1044 Adaptec (formerly DPT)
1012 Domino RAID Engine
a400 SmartCache/Raid I-IV Controller
@@ -1886,7 +1914,7 @@
1044 c05a 2400A UDMA Four Channel
1044 c05b 2400A UDMA Four Channel DAC
1044 c064 3010S Ultra3 Dual Channel
- 1044 c065 3010S Ultra3 Four Channel
+ 1044 c065 3410S Ultra160 Four Channel
1044 c066 3010S Fibre Channel
a511 SmartRAID V Controller
1044 c032 ASR-2005S I2O Zero Channel
@@ -1983,11 +2011,13 @@
11bd 000e Studio DV
e4bf 1010 CF2-1-CYMBAL
8020 TSB12LV26 IEEE-1394 Controller (Link)
+ 11bd 000f Studio DV500-1394
8021 TSB43AA22 IEEE-1394 Controller (PHY/Link Integrated)
104d 80df Vaio PCG-FX403
104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
8022 TSB43AB22 IEEE-1394a-2000 Controller (PHY/Link)
8023 TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)
+ 103c 088c nc8000 laptop
8024 TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)
8025 TSB82AA2 IEEE-1394b Link Layer Controller
55aa 55aa FireWire 800 PCI Card
@@ -1997,8 +2027,17 @@
8029 PCI4510 IEEE-1394 Controller
1028 0163 Latitude D505
1071 8160 MIM2900
+ 802b PCI7410,7510,7610 OHCI-Lynx Controller
+ 1028 014e PCI7410,7510,7610 OHCI-Lynx Controller (Dell Latitude D800)
802e PCI7x20 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller
+ 8031 Texas Instruments PCIxx21/x515 Cardbus Controller
+ 8032 Texas Instruments OHCI Compliant IEEE 1394 Host Controller
+ 8033 Texas Instruments PCIxx21 Integrated FlashMedia Controller
+ 8034 Texas Instruments PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD) Controller
+ 8035 Texas Instruments PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Smart Card Controller (SMC)
8201 PCI1620 Firmware Loading Function
+ 8204 PCI7410,7510,7610 PCI Firmware Loading Function
+ 1028 014e Latitude D800
8400 ACX 100 22Mbps Wireless Interface
00fc 16ec U.S. Robotics 22 Mbps Wireless PC Card (model 2210)
00fd 16ec U.S. Robotics 22Mbps Wireless PCI Adapter (model 2216)
@@ -2047,6 +2086,10 @@
1028 0163 Latitude D505
1071 8160 MIM2000
ac46 PCI4520 PC card Cardbus Controller
+ ac47 PCI7510 PC card Cardbus Controller
+ 1028 014e Latitude D800
+ ac4a PCI7510,7610 PC card Cardbus Controller
+ 1028 014e Latitude D800
ac50 PCI1410 PC card Cardbus Controller
ac51 PCI1420
1014 023b ThinkPad T23 (2647-4MG)
@@ -2068,10 +2111,11 @@
175c 6200 ASI62xx Audio Adapter
ac8d PCI 7620
ac8e PCI7420 CardBus Controller
- ac8f PCI7420/PCI7620 Dual Socket CardBus and Smart Card Cont.
+ ac8f PCI7420/PCI7620 Dual Socket CardBus and Smart Card Cont. w/ 1394a-2000 OHCI Two-Port PHY/Link-Layer Cont. and SD/MS-Pro Sockets
fe00 FireWire Host Controller
fe03 12C01A FireWire Host Controller
104d Sony Corporation
+ 8004 DTL-H2500 [Playstation development board]
8009 CXD1947Q i.LINK Controller
8039 CXD3222 i.LINK Controller
8056 Rockwell HCF 56K modem
@@ -2132,9 +2176,32 @@
175c 4200 ASI4215 Audio Adapter
175c 4300 ASI43xx Audio Adapter
175c 4400 ASI4401 Audio Adapter
- ecc0 0030 Layla
+ ecc0 0010 Darla
+ ecc0 0020 Gina
+ ecc0 0030 Layla rev.0
+ ecc0 0031 Layla rev.1
+ ecc0 0040 Darla24 rev.0
+ ecc0 0041 Darla24 rev.1
+ ecc0 0050 Gina24 rev.0
+ ecc0 0051 Gina24 rev.1
+ ecc0 0070 Mona rev.0
+ ecc0 0071 Mona rev.1
+ ecc0 0072 Mona rev.2
18c0 MPC8265A/MPC8266
18c1 MPC8271/MPC8272
+ 3410 DSP56361 Digital Signal Processor
+ ecc0 0050 Gina24 rev.0
+ ecc0 0051 Gina24 rev.1
+ ecc0 0060 Layla24
+ ecc0 0070 Mona rev.0
+ ecc0 0071 Mona rev.1
+ ecc0 0072 Mona rev.2
+ ecc0 0080 Mia rev.0
+ ecc0 0081 Mia rev.1
+ ecc0 0090 Indigo
+ ecc0 00a0 Indigo IO
+ ecc0 00b0 Indigo DJ
+ ecc0 0100 3G
4801 Raven
4802 Falcon
4803 Hawk
@@ -2175,13 +2242,14 @@
8086 3427 S875WP1-E mainboard
3371 PDC20371 (FastTrak S150 TX2plus)
3373 PDC20378 (FastTrak 378/SATA 378)
- 1043 80f5 PC-DL Deluxe motherboard
+ 1043 80f5 K8V Deluxe/PC-DL Deluxe motherboard
1462 702e K8T NEO FIS2R motherboard
3375 PDC20375 (SATA150 TX2plus)
3376 PDC20376 (FastTrak 376)
1043 809e A7V8X motherboard
3574 PDC20579 SATAII 150 IDE Controller
- 3d18 PDC20518 SATAII 150 IDE Controller
+ 3d18 PDC20518/PDC40518 (SATAII 150 TX4)
+ 3d75 PDC20575 (SATAII150 TX2plus)
4d30 PDC20267 (FastTrak100/Ultra100)
105a 4d33 Ultra100
105a 4d39 FastTrak100
@@ -2302,8 +2370,8 @@
1014 0242 iSeries 2872 DASD IOA
1014 0266 Dual Channel PCI-X U320 SCSI Adapter
1014 0278 Dual Channel PCI-X U320 SCSI RAID Adapter
- 1014 02D3 Dual Channel PCI-X U320 SCSI Adapter
- 1014 02D4 Dual Channel PCI-X U320 SCSI RAID Adapter
+ 1014 02d3 Dual Channel PCI-X U320 SCSI Adapter
+ 1014 02d4 Dual Channel PCI-X U320 SCSI RAID Adapter
ba55 eXtremeRAID 1100 support Device
ba56 eXtremeRAID 2000/3000 support Device
106a Aten Research Inc
@@ -2313,6 +2381,7 @@
0003 Control Video
0004 PlanB Video-In
0007 O'Hare I/O
+ 000c DOS on Mac
000e Hydra Mac I/O
0010 Heathrow Mac I/O
0017 Paddington Mac I/O
@@ -2512,11 +2581,13 @@
1101 RIO GEM
1102 RIO 1394
1103 RIO USB
+ 1648 [bge] Gigabit Ethernet
2bad GEM
5000 Simba Advanced PCI Bridge
5043 SunPCI Co-processor
8000 Psycho PCI Bus Module
8001 Schizo PCI Bus Module
+ 8002 Schizo+ PCI Bus Module
a000 Ultra IIi
a001 Ultra IIe
a801 Tomatillo PCI Bus Module
@@ -2560,6 +2631,7 @@
1170 PCI-MIO-16XE-10
1180 PCI-MIO-16E-1
1190 PCI-MIO-16E-4
+ 1310 PCI-6602
1330 PCI-6031E
1350 PCI-6071E
14e0 PCI-6110
@@ -2575,6 +2647,7 @@
2a80 PCI-6025E
2c80 PCI-6035E
2ca0 PCI-6034E
+ 70b8 PCI-6251 [M Series - High Speed Multifunction DAQ]
b001 IMAQ-PCI-1408
b011 IMAQ-PXI-1408
b021 IMAQ-PCI-1424
@@ -2589,13 +2662,13 @@
c831 PCI-GPIB bridge
1094 First International Computers [FIC]
1095 Silicon Image, Inc. (formerly CMD Technology Inc)
- 0240 Adaptec AAR-1210SA SATA HostRAID Contr.
+ 0240 Adaptec AAR-1210SA SATA HostRAID Controller
0640 PCI0640
0643 PCI0643
0646 PCI0646
0647 PCI0647
0648 PCI0648
- 0649 SiI 0649 Ultra ATA-100 Host Controller
+ 0649 SiI 0649 Ultra ATA/100 PCI to ATA Host Controller
0e11 005d Integrated Ultra ATA-100 Dual Channel Controller
0e11 007e Integrated Ultra ATA-100 IDE RAID Controller
101e 0649 AMI MegaRAID IDE 100 Controller
@@ -2647,6 +2720,7 @@
127a 0048 Bt878/832 Mediastream Controller
144f 3000 MagicTView CPH060 - Video
1461 0002 TV98 Series (TV/No FM/Remote)
+ 1461 0003 AverMedia UltraTV PCI 350
1461 0004 AVerTV WDM Video Capture
1461 0761 AverTV DVB-T
14f1 0001 Bt878 Mediastream Controller NTSC
@@ -2822,10 +2896,14 @@
1146 VScom 010 1 port parallel adaptor
1147 VScom 020 2 port parallel adaptor
2724 Thales PCSM Security Card
+ 8516 PEX 8516 Versatile PCI Express Switch
+ 8532 PEX 8532 Versatile PCI Express Switch
9030 PCI <-> IOBus Bridge Hot Swap
10b5 2862 Alpermann+Velte PCL PCI LV (3V/5V): Timecode Reader Board
10b5 2906 Alpermann+Velte PCI TS (3V/5V): Time Synchronisation Board
10b5 2940 Alpermann+Velte PCL PCI D (3V/5V): Timecode Reader Board
+ 10b5 3025 Alpermann+Velte PCL PCI L (3V/5V): Timecode Reader Board
+ 10b5 3068 Alpermann+Velte PCL PCI HD (3V/5V): Timecode Reader Board
15ed 1002 MCCS 8-port Serial Hot Swap
15ed 1003 MCCS 16-port Serial Hot Swap
9036 9036
@@ -2934,7 +3012,7 @@
1201 3c982-TXM 10/100baseTX Dual Port A [Hydra]
1202 3c982-TXM 10/100baseTX Dual Port B [Hydra]
1700 3c940 10/100/1000Base-T [Marvell]
- 1043 80eb P4P800 Mainboard
+ 1043 80eb P4P800/K8V Deluxe motherboard
10b7 0010 3C940 Gigabit LOM Ethernet Adapter
10b7 0020 3C941 Gigabit LOM Ethernet Adapter
147b 1407 KV8-MAX3 motherboard
@@ -3125,6 +3203,7 @@
5217 M5217H
5219 M5219
5225 M5225
+ 5228 M5228 ALi ATA/RAID Controller
5229 M5229 IDE
1014 050f ThinkPad R30
1014 053d ThinkPad R40e (2684-HVG) builtin IDE
@@ -3144,6 +3223,8 @@
5261 M5261 Ethernet Controller
5263 M5263 Ethernet Controller
5281 ALi M5281 Serial ATA / RAID Host Controller
+ 5287 ULi 5287 SATA
+ 5289 ULi 5289 SATA
5450 Lucent Technologies Soft Modem AMR
5451 M5451 PCI AC-Link Controller Audio Device
1014 0506 ThinkPad R30
@@ -3210,7 +3291,7 @@
10f7 8312 MagicGraph 128XD
0005 NM2200 [MagicGraph 256AV]
1014 00dd ThinkPad 570
- 1028 0088 Latitude CPi A400XT
+ 1028 0088 Latitude CPi A
0006 NM2360 [MagicMedia 256ZX]
0016 NM2380 [MagicMedia 256XL+]
10c8 0016 MagicMedia 256XL+
@@ -3258,6 +3339,7 @@
10d7 BCM Advanced Research
10d8 Advanced Peripherals Labs
10d9 Macronix, Inc. [MXIC]
+ 0431 MX98715
0512 MX98713
0531 MX987x5
1186 1200 DFE-540TX ProFAST 10/100 Adapter
@@ -3346,6 +3428,7 @@
1102 102c CT6931 RIVA TNT2 Value [Jumper]
1462 8808 MSI-8808
1554 1041 Pixelview RIVA TNT2 M64
+ 1569 002d Palit Microsystems Daytona TNT2 M64
002e NV6 [Vanta]
002f NV6 [Vanta]
0034 MCP04 SMBus
@@ -3358,13 +3441,14 @@
003c MCP04 USB Controller
003d MCP04 PCI Bridge
003e MCP04 Serial ATA Controller
- 0040 NV40 [GeForce 6800 Ultra]
+ 0040 nv40 [GeForce 6800 Ultra]
0041 NV40 [GeForce 6800]
0042 NV40.2
0043 NV40.3
0045 NV40 [GeForce 6800 GT]
0049 NV40GL
004e NV40GL [Quadro FX 4000]
+ 0051 CK804 ISA Bridge
0052 CK804 SMBus
0053 CK804 IDE
0054 CK804 Serial ATA Controller
@@ -3388,7 +3472,7 @@
0068 nForce2 USB Controller
1043 0c11 A7N8X Mainboard
006a nForce2 AC97 Audio Controler (MCP)
- 006b nForce MultiMedia audio [Via VT82C686B]
+ 006b nForce Audio Processing Unit
10de 006b nForce2 MCP Audio Processing Unit
006c nForce2 External PCI Bridge
006d nForce2 PCI Bridge
@@ -3421,6 +3505,7 @@
00da nForce3 Audio
00dd nForce3 PCI Bridge
00df CK8S Ethernet Controller
+ 00e0 nForce3 250Gb LPC Bridge
00e1 nForce3 250Gb Host Bridge
00e2 nForce3 250Gb AGP Host to PCI Bridge
00e3 CK8S Serial ATA Controller (v2.5)
@@ -3428,7 +3513,7 @@
00e5 CK8S Parallel ATA Controller (v2.5)
00e6 CK8S Ethernet Controller
00e7 CK8S USB Controller
- 00e8 CK8S USB Controller
+ 00e8 nForce3 EHCI USB 2.0 Controller
00ea nForce3 250Gb AC'97 Audio Controller
00ed nForce3 250Gb PCI-to-PCI Bridge
00ee CK8S Serial ATA Controller (v2.5)
@@ -3436,7 +3521,8 @@
00f1 NV43 [GeForce 6600/GeForce 6600 GT]
00f2 NV43 [GeForce 6600 GT]
00f8 NV45GL [Quadro FX 3400]
- 00f9 NV40 [GeForce 6800 Ultra]
+ 00f9 NV40 [GeForce 6800 Ultra/GeForce 6800 GT]
+ 1682 2120 GEFORCE 6800 GT PCI-E
00fa NV36 [GeForce PCX 5750]
00fb NV35 [GeForce PCX 5900]
00fc NV37GL [Quadro FX 330/GeForce PCX 5300]
@@ -3468,6 +3554,8 @@
0111 NV11DDR [GeForce2 MX 100 DDR/200 DDR]
0112 NV11 [GeForce2 Go]
0113 NV11GL [Quadro2 MXR/EX]
+ 0140 NV43 [MSI NX6600GT-TD128E]
+ 014f NV43 [GeForce 6200]
0150 NV15 [GeForce2 GTS/Pro]
1043 4016 V7700 AGP Video Card
107d 2840 WinFast GeForce2 GTS with TV output
@@ -3545,6 +3633,22 @@
1043 405b V8200 T5
1545 002f Xtasy 6964
0203 NV20DCC [Quadro DCC]
+ 0240 C51 PCI Express Bridge
+ 0241 C51 PCI Express Bridge
+ 0242 C51 PCI Express Bridge
+ 0243 C51 PCI Express Bridge
+ 0244 C51 PCI Express Bridge
+ 0245 C51 PCI Express Bridge
+ 0246 C51 PCI Express Bridge
+ 0247 C51 PCI Express Bridge
+ 0248 C51 PCI Express Bridge
+ 0249 C51 PCI Express Bridge
+ 024a C51 PCI Express Bridge
+ 024b C51 PCI Express Bridge
+ 024c C51 PCI Express Bridge
+ 024d C51 PCI Express Bridge
+ 024e C51 PCI Express Bridge
+ 024f C51 PCI Express Bridge
0250 NV25 [GeForce4 Ti 4600]
0251 NV25 [GeForce4 Ti 4400]
1043 8023 v8440 GeForce 4 Ti4400
@@ -3555,6 +3659,27 @@
0258 NV25GL [Quadro4 900 XGL]
0259 NV25GL [Quadro4 750 XGL]
025b NV25GL [Quadro4 700 XGL]
+ 0260 MCP51 LPC Bridge
+ 0261 MCP51 LPC Bridge
+ 0262 MCP51 LPC Bridge
+ 0263 MCP51 LPC Bridge
+ 0264 MCP51 SMBus
+ 0265 MCP51 IDE
+ 0266 MCP51 Serial ATA Controller
+ 0267 MCP51 Serial ATA Controller
+ 0268 MCP51 Ethernet Controller
+ 0269 MCP51 Ethernet Controller
+ 026a MCP51 MCI
+ 026b MCP51 AC97 Audio Controller
+ 026c MCP51 High Definition Audio
+ 026d MCP51 USB Controller
+ 026e MCP51 USB Controller
+ 026f MCP51 PCI Bridge
+ 0270 MCP51 Host Bridge
+ 0271 MCP51 PMU
+ 0272 MCP51 Memory Controller 0
+ 027e C51 Memory Controller 2
+ 027f C51 Memory Controller 3
0280 NV28 [GeForce4 Ti 4800]
0281 NV28 [GeForce4 Ti 4200 AGP 8x]
0282 NV28 [GeForce4 Ti 4800 SE]
@@ -3562,6 +3687,22 @@
0288 NV28GL [Quadro4 980 XGL]
0289 NV28GL [Quadro4 780 XGL]
028c NV28GLM [Quadro4 700 GoGL]
+ 02f0 C51 Host Bridge
+ 02f1 C51 Host Bridge
+ 02f2 C51 Host Bridge
+ 02f3 C51 Host Bridge
+ 02f4 C51 Host Bridge
+ 02f5 C51 Host Bridge
+ 02f6 C51 Host Bridge
+ 02f7 C51 Host Bridge
+ 02f8 C51 Memory Controller 5
+ 02f9 C51 Memory Controller 4
+ 02fa C51 Memory Controller 0
+ 02fb C51 PCI Express Bridge
+ 02fc C51 PCI Express Bridge
+ 02fd C51 PCI Express Bridge
+ 02fe C51 Memory Controller 1
+ 02ff C51 Host Bridge
0300 NV30 [GeForce FX]
0301 NV30 [GeForce FX 5800 Ultra]
0302 NV30 [GeForce FX 5800]
@@ -3621,27 +3762,25 @@
1ae5 LP6000 Fibre Channel Host Adapter
1ae6 LP 8000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)
1ae7 LP 8000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:2-3)
- f015 LP1150e
- f085 LP850 Fibre Channel Adapter
- f095 LP952 Fibre Channel Adapter
- f098 LP982 Fibre Channel Adapter
- f0a1 LightPulse Fibre Channel Adapter
- f0a5 LP1050
- f0d5 LP1150
- f100 LP11000e
+ f005 LP1150e Fibre Channel Host Adapter
+ f085 LP850 Fibre Channel Host Adapter
+ f095 LP952 Fibre Channel Host Adapter
+ f098 LP982 Fibre Channel Host Adapter
+ f0a5 LP1050 Fibre Channel Host Adapter
+ f0d5 LP1150 Fibre Channel Host Adapter
+ f100 LP11000e Fibre Channel Host Adapter
f700 LP7000 Fibre Channel Host Adapter
f701 LP 7000EFibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)
f800 LP8000 Fibre Channel Host Adapter
f801 LP 8000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)
f900 LP9000 Fibre Channel Host Adapter
f901 LP 9000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)
- f980 LP9802 Fibre Channel Adapter
+ f980 LP9802 Fibre Channel Host Adapter
f981 LP 9802 Fibre Channel Host Adapter Alternate ID
f982 LP 9802 Fibre Channel Host Adapter Alternate ID
fa00 LP10000 Fibre Channel Host Adapter
- fa01 LP101
- fb00 LightPulse Fibre Channel Adapter
- fd00 LP11000
+ fa01 LP101 Fibre Channel Host Adapter
+ fd00 LP11000 Fibre Channel Host Adapter
10e0 Integrated Micro Solutions Inc.
5026 IMS5026/27/28
5027 IMS5027
@@ -3823,11 +3962,13 @@
1102 0051 SB0090 Audigy Player
1102 0053 SB0090 Audigy Player/OEM
1102 0058 SB0090 Audigy Player/OEM
+ 1102 1007 SB0240 Audigy 2 Platinum 6.1
1102 2002 SB Audigy 2 ZS (SB0350)
0006 [SB Live! Value] EMU10k1X
0007 SB Audigy LS
1102 1001 SB0310 Audigy LS
1102 1002 SB0312 Audigy LS
+ 1102 1006 SB0410 SBLive! 24-bit
0008 SB0400 Audigy2 Value
4001 SB Audigy FireWire Port
1102 0010 SB Audigy FireWire Port
@@ -3841,10 +3982,24 @@
1102 1002 SB0312 Audigy LS MIDI/Game port
8064 SB0100 [SBLive! 5.1 OEM]
8938 Ectiva EV1938
+ 1033 80e5 SlimTower-Jim (NEC)
+ 1071 7150 Mitac 7150
+ 110a 5938 Siemens Scenic Mobile 510PIII
+ 13bd 100c Ceres-C (Sharp, Intel BX)
+ 13bd 100d Sharp, Intel Banister
+ 13bd 100e TwinHead P09S/P09S3 (Sharp)
+ 13bd f6f1 Marlin (Sharp)
+ 14ff 0e70 P88TE (TWINHEAD INTERNATIONAL Corp)
+ 14ff c401 Notebook 9100/9200/2000 (TWINHEAD INTERNATIONAL Corp)
+ 156d b400 G400 - Geo (AlphaTop (Taiwan))
+ 156d b550 G560 (AlphaTop (Taiwan))
+ 156d b560 G560 (AlphaTop (Taiwan))
+ 156d b700 G700/U700 (AlphaTop (Taiwan))
+ 156d b795 G795 (AlphaTop (Taiwan))
+ 156d b797 G797 (AlphaTop (Taiwan))
1103 Triones Technologies, Inc.
0003 HPT343
-# Revisions: 01=HPT366, 03=HPT370, 04=HPT370A, 05=HPT372
- 0004 HPT366/368/370/370A/372
+ 0004 HPT366/368/370/370A/372/372N
1103 0001 HPT370A
1103 0003 HPT343 / HPT345 / HPT363 UDMA33
1103 0004 HPT366 UDMA66 (r1) / HPT368 UDMA66 (r2) / HPT370 UDMA100 (r3) / HPT370 UDMA100 RAID (r4)
@@ -3852,9 +4007,9 @@
1103 0006 HPT302
1103 0007 HPT371 UDMA133
1103 0008 HPT374 UDMA/ATA133 RAID Controller
- 0005 HPT372A
+ 0005 HPT372A/372N
0006 HPT302
- 0007 HPT371
+ 0007 HPT371/371N
0008 HPT374
0009 HPT372N
1104 RasterOps Corp.
@@ -3945,6 +4100,7 @@
1458 5004 GA-7VAX Mainboard
1462 7020 K8T NEO 2 motherboard
147b 1407 KV8-MAX3 motherboard
+ 182d 201d CN-029 USB2.0 4 port PCI Card
3040 VT82C586B ACPI
3043 VT86C100A [Rhine]
10bd 0000 VT86C100A Fast Ethernet Adapter
@@ -3978,7 +4134,7 @@
1019 0a81 L7VTA v1.0 Motherboard (KT400-8235)
1043 8095 A7V8X Motherboard (Realtek ALC650 codec)
1043 80a1 A7V8X-X Motherboard
- 1043 80b0 A7V600 motherboard (ADI AD1980 codec [SoundMAX])
+ 1043 80b0 A7V600/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX])
1106 3059 L7VMM2 Motherboard
1106 4161 K7VT2 motherboard
1297 c160 FX41 motherboard (Realtek ALC650 codec)
@@ -4014,6 +4170,7 @@
1458 5004 GA-7VAX Mainboard
1462 7020 K8T NEO 2 motherboard
147b 1407 KV8-MAX3 motherboard
+ 182d 201d CN-029 USB 2.0 4 port PCI Card
3106 VT6105 [Rhine-III]
1186 1403 DFE-530TX rev C
3108 S3 Unichrome Pro VGA Adapter
@@ -4032,9 +4189,10 @@
3147 VT8233A ISA Bridge
3148 P4M266 Host Bridge
3149 VIA VT6420 SATA RAID Controller
- 1043 80ed A7V600 motherboard
+ 1043 80ed A7V600/K8V Deluxe motherboard
1458 b003 GA-7VM400AM(F) Motherboard
- 1462 7020 MSI Neo K8T FIS2R mainboard
+ 1462 7020 K8T Neo 2 Motherboard
+ 147b 1407 KV8-MAX3 motherboard
3156 P/KN266 Host Bridge
# on ASUS P4P800
3164 VT6410 ATA133 RAID controller
@@ -4046,7 +4204,9 @@
1297 f641 FX41 motherboard
1458 5001 GA-7VAX Mainboard
1849 3177 K7VT2 motherboard
+ 3178 ProSavageDDR P4N333 Host Bridge
3188 VT8385 [K8T800 AGP] Host Bridge
+ 1043 80a3 K8V Deluxe motherboard
147b 1407 KV8-MAX3 motherboard
3189 VT8377 [KT400/KT600 AGP] Host Bridge
1043 807f A7V8X motherboard
@@ -4054,11 +4214,13 @@
3204 K8M800
3205 VT8378 [KM400/A] Chipset Host Bridge
1458 5000 GA-7VM400M Motherboard
+ 3218 K8T800M Host Bridge
3227 VT8237 ISA bridge [KT600/K8T800 South]
1043 80ed A7V600 motherboard
1106 3227 DFI KT600-AL Motherboard
1458 5001 GA-7VT600 Motherboard
147b 1407 KV8-MAX3 motherboard
+ 3249 VT6421 IDE RAID Controller
4149 VIA VT6420 (ATA133) Controller
5030 VT82C596 ACPI [Apollo PRO]
6100 VT85C100A [Rhine II]
@@ -4114,7 +4276,7 @@
007c FSC Remote Service Controller, shared memory device
007d FSC Remote Service Controller, SMIC device
# Superfastcom-PCI (Commtech, Inc.) or DSCC4 WAN Adapter
- 2102 DSCC4 PEB/PEF 20534 DMA Supported Serial Communication Contr.
+ 2102 DSCC4 PEB/PEF 20534 DMA Supported Serial Communication Controller with 4 Channels
2104 Eicon Diva 2.02 compatible passive ISDN card
3142 SIMATIC NET CP 5613A1 (Profibus Adapter)
4021 SIMATIC NET CP 5512 (Profibus and MPI Cardbus Adapter)
@@ -4301,13 +4463,16 @@
3400 SmartPCI56(UCB1500) 56K Modem
5400 TriMedia TM1000/1100
5402 TriMedia TM-1300
+ 1244 0f00 Fritz!Card DSL
7130 SAA7130 Video Broadcast Decoder
5168 0138 LiveView FlyVideo 2000
7133 SAA713X Audio+video broadcast decoder
5168 0138 LifeView FlyVideo 3000
5168 0212 LifeView FlyTV Platinum mini
+ 5168 0502 LifeView FlyDVB-T Duo CardBus
# PCI audio and video broadcast decoder (http://www.semiconductors.philips.com/pip/saa7134hl)
7134 SAA7134
+ 1043 4842 TV-FM Card 7134
7135 SAA7135 Audio+video broadcast decoder
7145 SAA7145
7146 SAA7146
@@ -4318,6 +4483,7 @@
114b 2003 DVRaptor Video Edit/Capture Card
11bd 0006 DV500 Overlay
11bd 000a DV500 Overlay
+ 11bd 000f DV500 Overlay
13c2 0000 Siemens/Technotrend/Hauppauge DVB card rev1.3 or rev1.5
13c2 0001 Technotrend/Hauppauge DVB card rev1.3 or rev1.6
13c2 0002 Technotrend/Hauppauge DVB card rev2.1
@@ -4368,37 +4534,45 @@
e011 Diva Server BRI S/T Rev 2
e012 Diva Server 4BRI-8M PCI
8001 0014 Diva Server 4BRI-8M PCI Cornet NQ
- e013 Diva Server 4BRI-8M Rev 2
- 8001 0014 Diva Server 4BRI-8M Cornet NQ 2
+ e013 Diva Server 4BRI Rev 2
+ 1133 1300 Diva Server V-4BRI-8
+ 1133 e013 Diva Server 4BRI-8M 2.0 PCI
+ 8001 0014 Diva Server 4BRI-8M 2.0 PCI Cornet NQ
e014 Diva Server PRI-30M PCI
0008 0100 Diva Server PRI-30M PCI
8001 0014 Diva Server PRI-30M PCI Cornet NQ
- e015 DIVA Server PRI-30M 2.0
- 8001 0014 Diva Server PRI Cornet NQ 2
+ e015 DIVA Server PRI Rev 2
+ 1133 e015 Diva Server PRI 2.0 PCI
+ 8001 0014 Diva Server PRI 2.0 PCI Cornet NQ
e016 Diva Server Voice 4BRI PCI
8001 0014 Diva Server PRI Cornet NQ
- e017 Diva Server Voice 4BRI PCI Rev 2
- 8001 0014 Diva Server Voice 4BRI PCI Cornet NQ 2
- e018 Diva Server BRI 2M Revision 2
- 8001 0014 Diva Server BRI 2M Cornet NQ 2
- e019 Diva Server Voice PRI PCI Rev 2
- 8001 0014 Diva Server Voice PRI PCI Cornet NQ 2
+ e017 Diva Server Voice 4BRI Rev 2
+ 1133 e017 Diva Server Voice 4BRI-8M 2.0 PCI
+ 8001 0014 Diva Server Voice 4BRI-8M 2.0 PCI Cornet NQ
+ e018 Diva Server BRI-2M 2.0 PCI
+ 1133 1800 Diva Server V-BRI-2
+ 1133 e018 Diva Server BRI-2M 2.0 PCI
+ 8001 0014 Diva Server BRI-2M 2.0 PCI Cornet NQ
+ e019 Diva Server Voice PRI Rev 2
+ 1133 e019 Diva Server Voice PRI 2.0 PCI
+ 8001 0014 Diva Server Voice PRI 2.0 PCI Cornet NQ
e01a Diva Server 2FX
- e01b Diva Server BRI-2M Voice Revision 2
- 8001 0014 Diva Server BRI-2M Voice Cornet NQ 2
- e01c Diva Server PRI Rev 3.0
- 1133 1c01 Diva Server PRI/E1/T1-8 Rev 3.0
- 1133 1c02 Diva Server PRI/T1-24 Rev 3.0
- 1133 1c03 Diva Server PRI/E1-30 Rev 3.0
- 1133 1c04 Diva Server V-PRI/E1/T1 Rev 3.0
- 1133 1c05 Diva Server V-PRI/T1-24 Rev 3.0
- 1133 1c06 Diva Server V-PRI/E1-30 Rev 3.0
- 1133 1c07 Diva Server PRI/E1/T1-8 Cornet NQ 3
- 1133 1c08 Diva Server PRI/T1-24 Cornet NQ 3
- 1133 1c09 Diva Server PRI/E1-30 Cornet NQ 3
- 1133 1c0a Diva Server V-PRI/E1/T1 Cornet NQ 3
- 1133 1c0b Diva Server V-PRI/T1-24 Cornet NQ 3
- 1133 1c0c Diva Server V-PRI/E1-30 Cornet NQ 3
+ e01b Diva Server Voice BRI-2M 2.0 PCI
+ 1133 e01b Diva Server Voice BRI-2M 2.0 PCI
+ 8001 0014 Diva Server Voice BRI-2M 2.0 PCI Cornet NQ
+ e01c Diva Server PRI Rev 3
+ 1133 1c01 Diva Server PRI/E1/T1-8
+ 1133 1c02 Diva Server PRI/T1-24
+ 1133 1c03 Diva Server PRI/E1-30
+ 1133 1c04 Diva Server PRI/E1/T1
+ 1133 1c05 Diva Server V-PRI/T1-24
+ 1133 1c06 Diva Server V-PRI/E1-30
+ 1133 1c07 Diva Server PRI/E1/T1-8 Cornet NQ
+ 1133 1c08 Diva Server PRI/T1-24 Cornet NQ
+ 1133 1c09 Diva Server PRI/E1-30 Cornet NQ
+ 1133 1c0a Diva Server PRI/E1/T1 Cornet NQ
+ 1133 1c0b Diva Server V-PRI/T1-24 Cornet NQ
+ 1133 1c0c Diva Server V-PRI/E1-30 Cornet NQ
e01e Diva Server 2PRI
1133 1e00 Diva Server V-2PRI/E1-60
1133 1e01 Diva Server V-2PRI/T1-48
@@ -4524,6 +4698,8 @@
1148 9521 SK-9521 10/100/1000Base-T Adapter
4400 SK-9Dxx Gigabit Ethernet Adapter
4500 SK-9Mxx Gigabit Ethernet Adapter
+ 9000 SK-9Sxx Gigabit Ethernet Server Adapter PCI-X
+ 9843 [Fujitsu] Gigabit Ethernet
9e00 SK-9Exx 10/100/1000Base-T Adapter
1148 2100 SK-9E21 Server Adapter
1148 21d0 SK-9E21D 10/100/1000Base-T Adapter
@@ -4696,6 +4872,8 @@
0230 CSB5 LPC bridge
4c53 1080 CT8 mainboard
0240 K2 SATA
+ 0241 K2 SATA
+ 0242 K2 SATA
1167 Mutoh Industries Inc
1168 Thine Electronics Inc
1169 Centre for Development of Advanced Computing
@@ -4724,7 +4902,7 @@
0404 DVD Decoder card
0406 Tecra Video Capture device
0407 DVD Decoder card (Version 2)
- 0601 601
+ 0601 CPU to PCI bridge
0603 ToPIC95 PCI to CardBus Bridge for Notebooks
060a ToPIC95
060f ToPIC97
@@ -4761,6 +4939,8 @@
144d c006 vpr Matrix 170B4
0552 R5C552 IEEE 1394 Controller
1014 0511 ThinkPad A/T/X Series
+ 0576 R5C576 SD Bus Host Adapter
+ 0592 R5C592 Memory Stick Bus Host Adapter
1181 Telmatics International
1183 Fujikura Ltd
1184 Forks Inc
@@ -4795,6 +4975,7 @@
3a63 AirXpert DWL-AG660 Wireless Cardbus Adapter
3b05 DWL-G650+ CardBus PC Card
4000 DL2000-based Gigabit Ethernet
+ 4300 DGE-528T Gigabit Ethernet Adapter
4c00 Gigabit Ethernet Adapter
1186 4c00 DGE-530T Gigabit Ethernet Adapter
8400 D-Link DWL-650+ CardBus PC Card
@@ -4842,6 +5023,10 @@
8030 AEC6712S SCSI
8040 AEC6712D SCSI
8050 AEC6712SUW SCSI
+ 8060 AEC6712 SCSI
+ 8080 AEC67160 SCSI
+ 8081 AEC67160S SCSI
+ 808a AEC67162 2-ch. LVD SCSI
1192 Densan Company Ltd
1193 Zeitnet Inc.
0001 1221
@@ -4879,7 +5064,7 @@
0146 GT-64010/64010A System Controller
138f W8300 802.11 Adapter (rev 07)
1fa6 Marvell W8300 802.11 Adapter
- 4146 GT-64011/GT-64111 System Controller
+ 1fa7 88W8310 and 88W8000G [Libertas] 802.11g client chipset
4320 Gigabit Ethernet Controller
1019 0f38 Marvell 88E8001 Gigabit Ethernet Controller (ECS)
1019 8001 Marvell 88E8001 Gigabit Ethernet Controller (ECS)
@@ -4992,6 +5177,7 @@
4611 GT-64115 System Controller
4620 GT-64120/64120A/64121A System Controller
4801 GT-48001
+ 5005 Belkin F5D5005 Gigabit Desktop Network PCI Card
5040 MV88SX5040 4-port SATA I PCI-X Controller
5041 MV88SX5041 4-port SATA I PCI-X Controller
5080 MV88SX5080 8-port SATA I PCI-X Controller
@@ -5332,25 +5518,29 @@
1217 O2 Micro, Inc.
6729 OZ6729
673a OZ6730
- 6832 OZ6832/6833 Cardbus Controller
- 6836 OZ6836/6860 Cardbus Controller
- 6872 OZ6812 Cardbus Controller
- 6925 OZ6922 Cardbus Controller
- 6933 OZ6933 Cardbus Controller
+ 6832 OZ6832/6833 CardBus Controller
+ 6836 OZ6836/6860 CardBus Controller
+ 6872 OZ6812 CardBus Controller
+ 6925 OZ6922 CardBus Controller
+ 6933 OZ6933/711E1 CardBus/SmartCardBus Controller
1025 1016 Travelmate 612 TX
- 6972 OZ6912 Cardbus Controller
+ 6972 OZ601/6912/711E0 CardBus/SmartCardBus Controller
1014 020c ThinkPad R30
1179 0001 Magnia Z310
- 7110 OZ711Mx MultiMediaBay Accelerator
- 103c 0890 NC6000 laptop
- 7112 OZ711EC1/M1 SmartCardBus MultiMediaBay Controller
+ 7110 OZ711Mx 4-in-1 MemoryCardBus Accelerator
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
+ 7112 OZ711EC1/M1 SmartCardBus/MemoryCardBus Controller
7113 OZ711EC1 SmartCardBus Controller
- 7114 OZ711M1 SmartCardBus MultiMediaBay Controller
+ 7114 OZ711M1/MC1 4-in-1 MemoryCardBus Controller
+ 7134 OZ711MP1/MS1 MemoryCardBus Controller
71e2 OZ711E2 SmartCardBus Controller
- 7212 OZ711M2 SmartCardBus MultiMediaBay Controller
+ 7212 OZ711M2 4-in-1 MemoryCardBus Controller
7213 OZ6933E CardBus Controller
- 7223 OZ711M3 SmartCardBus MultiMediaBay Controller
- 103c 0890 NC6000 laptop
+ 7223 OZ711M3/MC3 4-in-1 MemoryCardBus Controller
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
+ 7233 OZ711MP3/MS3 4-in-1 MemoryCardBus Controller
1218 Hybricon Corp.
1219 First Virtual Corporation
121a 3Dfx Interactive, Inc.
@@ -5459,6 +5649,7 @@
8120 E4?
11bd 0006 DV500 E4
11bd 000a DV500 E4
+ 11bd 000f DV500 E4
8888 Cinemaster C 3.0 DVD Decoder
1002 0001 Cinemaster C 3.0 DVD Decoder
1002 0002 Cinemaster C 3.0 DVD Decoder
@@ -5537,6 +5728,7 @@
1969 ES1969 Solo-1 Audiodrive
1014 0166 ES1969 SOLO-1 AudioDrive on IBM Aptiva Mainboard
125d 8888 Solo-1 Audio Adapter
+ 153b 111b Terratec 128i PCI
1978 ES1978 Maestro 2E
0e11 b112 Armada M700/E500
1033 803c ES1978 Maestro-2E Audiodrive
@@ -5586,6 +5778,7 @@
10b8 2835 SMC2835W Wireless Cardbus Adapter
10b8 a835 SMC2835W V2 Wireless Cardbus Adapter
1113 ee03 SMC2802W V2 Wireless PCI Adapter
+ 1113 ee08 SMC2835W V3 EU Wireless Cardbus Adapter
1186 3202 DWL-G650 A1 Wireless Adapter
1259 c104 CG-WLCB54GT Wireless Adapter
1385 4800 WG511 Wireless Adapter
@@ -5735,6 +5928,7 @@
1048 1500 MicroLink 56k Modem
10cf 1059 Fujitsu 229-DFRT
1005 HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem
+ 1005 127a AOpen FM56-P
1033 8029 229-DFSV
1033 8054 Modem
10cf 103c Fujitsu
@@ -5836,7 +6030,7 @@
9132 Ethernet 100/10 MBit
1283 Integrated Technology Express, Inc.
673a IT8330G
- 8212 IT/ITE8212 Dual channel ATA RAID controller
+ 8212 IT/ITE8212 Dual channel ATA RAID controller (PCI version seems to be IT8212, embedded seems to be ITE8212)
1283 0001 IT/ITE8212 Dual channel ATA RAID controller
8330 IT8330G
8872 IT8874F PCI Dual Serial Port Controller
@@ -5952,6 +6146,34 @@
0058 PCI NE2K Ethernet
5598 PCI NE2K Ethernet
12c4 Connect Tech Inc
+ 0001 Blue HEAT/PCI 8 (RS232/CL/RJ11)
+ 0002 Blue HEAT/PCI 4 (RS232)
+ 0003 Blue HEAT/PCI 2 (RS232)
+ 0004 Blue HEAT/PCI 8 (UNIV, RS485)
+ 0005 Blue HEAT/PCI 4+4/6+2 (UNIV, RS232/485)
+ 0006 Blue HEAT/PCI 4 (OPTO, RS485)
+ 0007 Blue HEAT/PCI 2+2 (RS232/485)
+ 0008 Blue HEAT/PCI 2 (OPTO, Tx, RS485)
+ 0009 Blue HEAT/PCI 2+6 (RS232/485)
+ 000a Blue HEAT/PCI 8 (Tx, RS485)
+ 000b Blue HEAT/PCI 4 (Tx, RS485)
+ 000c Blue HEAT/PCI 2 (20 MHz, RS485)
+ 000d Blue HEAT/PCI 2 PTM
+ 0100 NT960/PCI
+ 0201 cPCI Titan - 2 Port
+ 0202 cPCI Titan - 4 Port
+ 0300 CTI PCI UART 2 (RS232)
+ 0301 CTI PCI UART 4 (RS232)
+ 0302 CTI PCI UART 8 (RS232)
+ 0310 CTI PCI UART 1+1 (RS232/485)
+ 0311 CTI PCI UART 2+2 (RS232/485)
+ 0312 CTI PCI UART 4+4 (RS232/485)
+ 0320 CTI PCI UART 2
+ 0321 CTI PCI UART 4
+ 0322 CTI PCI UART 8
+ 0330 CTI PCI UART 2 (RS485)
+ 0331 CTI PCI UART 4 (RS485)
+ 0332 CTI PCI UART 8 (RS485)
12c5 Picture Elements Incorporated
007e Imaging/Scanning Subsystem Engine
007f Imaging/Scanning Subsystem Engine
@@ -6002,6 +6224,8 @@
12d4 Ulticom (Formerly DGM&S)
0200 T1 Card
12d5 Equator Technologies Inc
+ 0003 BSP16
+ 1000 BSP15
12d6 Analogic Corp
12d7 Biotronic SRL
12d8 Pericom Semiconductor
@@ -6353,12 +6577,20 @@
1381 Brains Co. Ltd
1382 Marian - Electronic & Software
0001 ARC88 audio recording card
- 2088 Marc-8 MIDI 8 channel audio card
+ 2008 Prodif 96 Pro sound system
+ 2088 Marc 8 Midi sound system
+ 20c8 Marc A sound system
+ 4008 Marc 2 sound system
+ 4010 Marc 2 Pro sound system
+ 4048 Marc 4 MIDI sound system
+ 4088 Marc 4 Digi sound system
+ 4248 Marc X sound system
1383 Controlnet Inc
1384 Reality Simulation Systems Inc
1385 Netgear
# Note: This lists as Atheros Communications, Inc. AR5212 802.11abg NIC because of Madwifi
0013 WG311T
+ 311a GA511 Gigabit Ethernet
4100 802.11b Wireless Adapter (MA301)
4105 MA311 802.11b wireless adapter
4400 WAG511 802.11a/b/g Dual Band Wireless PC Card
@@ -6424,6 +6656,8 @@
0016 8065 Security Processor
0017 8165 Security Processor
0018 8154 Security Processor
+ 001d 7956 Security Processor
+ 0020 7955 Security Processor
13a4 Rascom Inc
13a5 Audio Digital Imaging Inc
13a6 Videonics Inc
@@ -6551,7 +6785,7 @@
13fc Computer Peripherals International
13fd Micro Science Inc
13fe Advantech Co. Ltd
- 1240 PCI-1240 4-channel stepper motor controller card
+ 1240 PCI-1240 4-channel stepper motor controller card w. Nova Electronics MCX314
1600 PCI-1612 4-port RS-232/422/485 PCI Communication Card
1752 PCI-1752
1754 PCI-1754
@@ -6569,6 +6803,8 @@
0100 Lava Dual Serial
0101 Lava Quatro A
0102 Lava Quatro B
+ 0110 Lava DSerial-PCI Port A
+ 0111 Lava DSerial-PCI Port B
0120 Quattro-PCI A
0121 Quattro-PCI B
0180 Lava Octo A
@@ -6599,18 +6835,47 @@
# formerly IC Ensemble Inc.
1412 VIA Technologies Inc.
1712 ICE1712 [Envy24] PCI Multi-Channel I/O Controller
+ 1412 1712 Hoontech ST Audio DSP 24
+ 1412 d630 M-Audio Delta 1010
+ 1412 d631 M-Audio Delta DiO
+ 1412 d632 M-Audio Delta 66
+ 1412 d633 M-Audio Delta 44
+ 1412 d634 M-Audio Delta Audiophile
+ 1412 d635 M-Audio Delta TDIF
+ 1412 d637 M-Audio Delta RBUS
1412 d638 M-Audio Delta 410
+ 1412 d63b M-Audio Delta 1010LT
+ 1412 d63c Digigram VX442
+ 1416 1712 Hoontech ST Audio DSP 24 Media 7.1
+ 153b 1115 EWS88 MT
+ 153b 1125 EWS88 MT (Master)
+ 153b 112b EWS88 D
+ 153b 112c EWS88 D (Master)
+ 153b 1130 EWX 24/96
+ 153b 1138 DMX 6fire 24/96
+ 153b 1151 PHASE88
+ 16ce 1040 Edirol DA-2496
1724 VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller
+ 1412 1724 AMP Ltd AUDIO2000
+ 1412 3630 M-Audio Revolution 7.1
+ 153b 1145 Aureon 7.1 Space
+ 153b 1147 Aureon 5.1 Sky
+ 153b 1153 Aureon 7.1 Universe
+ 270f f641 ZNF3-150
+ 270f f645 ZNF3-250
1413 Addonics
1414 Microsoft Corporation
1415 Oxford Semiconductor Ltd
8403 VScom 011H-EP1 1 port parallel adaptor
9501 OX16PCI954 (Quad 16950 UART) function 0
131f 2050 CyberPro (4-port)
+# Model IO1085, Part No: JJ-P46012
+ 131f 2051 CyberSerial 4S Plus
15ed 2000 MCCR Serial p0-3 of 8
15ed 2001 MCCR Serial p0-3 of 16
950a EXSYS EX-41092 Dual 16950 Serial adapter
950b OXCB950 Cardbus 16950 UART
+ 9510 OX16PCI954 (Quad 16950 UART) function 1 (Disabled)
9511 OX16PCI954 (Quad 16950 UART) function 1
15ed 2000 MCCR Serial p4-7 of 8
15ed 2001 MCCR Serial p4-15 of 16
@@ -6694,6 +6959,7 @@
1456 Advanced Hardware Architectures
1457 Nuera Communications Inc
1458 Giga-byte Technology
+ 0c11 K8NS Pro Mainboard
1459 DOOIN Electronics
145a Escalate Networks Inc
145b PRAIM SRL
@@ -6705,11 +6971,15 @@
1460 DYNARC INC
1461 Avermedia Technologies Inc
1462 Micro-Star International Co., Ltd.
+# MSI CB54G Wireless PC Card that seems to use the Broadcom 4306 Chipset
+ 6819 Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller [MSI CB54G]
6825 PCI Card wireless 11g [PC54G]
8725 NVIDIA NV25 [GeForce4 Ti 4600] VGA Adapter
# MSI G4Ti4800, 128MB DDR SDRAM, TV-Out, DVI-I
9000 NVIDIA NV28 [GeForce4 Ti 4800] VGA Adapter
+ 9110 GeFORCE FX5200
9119 NVIDIA NV31 [GeForce FX 5600XT] VGA Adapter
+ 9591 nVidia Corporation NV36 [GeForce FX 5700LE]
1463 Fast Corporation
1464 Interactive Circuits & Systems Ltd
1465 GN NETTEST Telecom DIV.
@@ -6816,7 +7086,7 @@
0340 PC4800
0350 PC4800
4500 PC4500
- 4800 Cisco Aironet 340 802.11b WLAN Adapter/Aironet PC4800
+ 4800 Cisco Aironet 340 802.11b Wireless LAN Adapter/Aironet PC4800
a504 Cisco Aironet Wireless 802.11b
a505 Cisco Aironet CB20a 802.11a Wireless LAN Adapter
a506 Cisco Aironet Mini PCI b/g
@@ -6976,7 +7246,8 @@
1659 NetXtreme BCM5721 Gigabit Ethernet PCI Express
165d NetXtreme BCM5705M Gigabit Ethernet
165e NetXtreme BCM5705M_2 Gigabit Ethernet
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
166e 570x 10/100 Integrated Controller
1677 NetXtreme BCM5751 Gigabit Ethernet PCI Express
1028 0179 Optiplex GX280
@@ -7059,9 +7330,9 @@
4403 BCM4402 V.90 56k Modem
4410 BCM4413 iLine32 HomePNA 2.0
4411 BCM4413 V.90 56k modem
- 4412 BCM4413 10/100BaseT
+ 4412 BCM4412 10/100BaseT
4430 BCM44xx CardBus iLine32 HomePNA 2.0
- 4432 BCM44xx CardBus 10/100BaseT
+ 4432 BCM4432 CardBus 10/100BaseT
4610 BCM4610 Sentry5 PCI to SB Bridge
4611 BCM4610 Sentry5 iLine32 HomePNA 1.0
4612 BCM4610 Sentry5 V.90 56k Modem
@@ -7253,7 +7524,10 @@
2f02 HSF 56k HSFi Data/Fax
2f11 HSF 56k HSFi Modem
8234 RS8234 ATM SAR Controller [ServiceSAR Plus]
- 8800 Winfast TV2000 XP
+ 8800 CX22702 DVB-T 2k/8k
+ 17de 08a1 XPert DVB-T PCI BDA DVBT 23880 Video Capture
+ 8802 CX23883 Broadcast Decoder
+ 17de 08a1 Xpert DVB-T PCI 2388x Transport Stream Capture
14f2 MOBILITY Electronics
0120 EV1000 bridge
0121 EV1000 Parallel port
@@ -7326,6 +7600,8 @@
1008 PCI-1008
151b COMBOX Ltd
151c DIGITAL AUDIO LABS Inc
+ 0003 Prodif T 2496
+ 4000 Prodif 88
151d Fujitsu Computer Products Of America
151e MATRIX Corp
151f TOPIC SEMICONDUCTOR Corp
@@ -7466,6 +7742,7 @@
1575 Voltaire Advanced Data Security Ltd
1576 Viewcast COM
1578 HITT
+ 5615 VPMK3 [Video Processor Mk III]
1579 Dual Technology Corp
157a Japan Elecronics Ind Inc
157b Star Multimedia Corp
@@ -7655,7 +7932,7 @@
1637 Linksys
3874 Linksys 802.11b WMP11 PCI Wireless card
1638 Standard Microsystems Corp [SMC]
- 1100 SMC2602W EZConnect/Addtron AWA-100/Eumitcom PCI WL11000
+ 1100 SMC2602W EZConnect / Addtron AWA-100 / Eumitcom PCI WL11000
163c Smart Link Ltd.
3052 SmartLink SmartPCI562 56K Modem
5449 SmartPCI561 Modem
@@ -7676,9 +7953,12 @@
104e 5LS172.6 B&R Dual CAN Interface Card
12d7 5LS172.61 B&R Dual CAN Interface Card
167b ZyDAS Technology Corp.
+ 2102 ZyDAS ZD1202
+ 187e 3406 ZyAIR B-122 CardBus 11Mbs Wireless LAN Card
1681 Hercules
# More specs, more accurate desc.
0010 Hercules 3d Prophet II Ultra 64MB [ 350 MHz NV15BR core, 128-bit DDR @ 460 MHz, 1.5v AGP4x ]
+1682 XFX Pine Group Inc.
1688 CastleNet Technology Inc.
1170 WLAN 802.11b card
168c Atheros Communications, Inc.
@@ -7686,6 +7966,7 @@
0011 AR5210 802.11a NIC
0012 AR5211 802.11ab NIC
0013 AR5212 802.11abg NIC
+ 1113 d301 Philips CPWNA100 Wireless CardBus adapter
1186 3202 D-link DWL-G650 B3 Wireless cardbus adapter
1186 3203 DWL-G520 Wireless PCI Adapter
1186 3a13 DWL-G520 Wireless PCI Adapter rev. B
@@ -7694,13 +7975,19 @@
14b7 0a60 8482-WD ORiNOCO 11a/b/g Wireless PCI Adapter
168c 0013 WG511T Wireless CardBus Adapter
168c 1025 DWL-G650B2 Wireless CardBus Adapter
+ 168c 1027 Netgate NL-3054CB ARIES b/g CardBus Adapter
168c 2026 Netgate 5354MP ARIES a(108Mb turbo)/b/g MiniPCI Adapter
+ 168c 2041 Netgate 5354MP Plus ARIES2 b/g MiniPCI Adapter
+ 168c 2042 Netgate 5354MP Plus ARIES2 a/b/g MiniPCI Adapter
1014 AR5212 802.11abg NIC
+169c Netcell Corporation
+ 0044 SyncRAID SR3000/5000 Series SATA RAID Controllers
16a5 Tekram Technology Co.,Ltd.
16ab Global Sun Technology Inc
1100 GL24110P
1101 PLX9052 PCMCIA-to-PCI Wireless LAN
1102 PCMCIA-to-PCI Wireless Network Bridge
+ 8501 WL-8305 Wireless LAN PCI Adapter
16ae Safenet Inc
1141 SafeXcel-1141
16b4 Aspex Semiconductor Ltd
@@ -7715,6 +8002,7 @@
1e0f LEON2FT Processor
16ec U.S. Robotics
00ff USR997900 10/100 Mbps PCI Network Card
+ 0116 USR997902 10/100/1000 Mbps PCI Network Card
3685 Wireless Access PCI Adapter Model 022415
16ed Sycron N. V.
1001 UMIO communication card
@@ -7783,13 +8071,24 @@
17cc NetChip Technology, Inc
2280 USB 2.0
17d3 Areca Technology Corp.
+ 1110 ARC-1110 4-Port PCI-X to SATA RAID Controller
+ 1120 ARC-1120 8-Port PCI-X to SATA RAID Controller
+ 1130 ARC-1130 12-Port PCI-X to SATA RAID Controller
+ 1160 ARC-1160 16-Port PCI-X to SATA RAID Controller
+ 1210 ARC-1210 4-Port PCI-Express to SATA RAID Controller
+ 1220 ARC-1220 8-Port PCI-Express to SATA RAID Controller
+ 1230 ARC-1230 12-Port PCI-Express to SATA RAID Controller
+ 1260 ARC-1260 16-Port PCI-Express to SATA RAID Controller
# S2io ships 10Gb PCI-X Ethernet adapters www.s2io.com
17d5 S2io Inc.
+ 5831 Xframe 10 Gigabit Ethernet PCI-X
+ 103c 12d5 HP PCI-X 133MHz 10GbE SR Fiber [AB287A]
17de KWorld Computer Co. Ltd.
# http://www.connect3d.com
17ee Connect Components Ltd
17fe Linksys, A Division of Cisco Systems
- 2220 [AirConn] INPROCOMM IPN 2220 WLAN Adapter (rev 01)
+ 2120 WMP11v4 802.11b PCI card
+ 2220 [AirConn] INPROCOMM IPN 2220 Wireless LAN Adapter (rev 01)
1813 Ambient Technologies Inc
4000 HaM controllerless modem
16be 0001 V9x HAM Data Fax Modem
@@ -7797,15 +8096,18 @@
16be 0002 V9x HAM 1394
1814 RaLink
0101 Wireless PCI Adpator RT2400 / RT2460
+ 3306 1113 Quidway WL100M
0201 Ralink RT2500 802.11 Cardbus Reference Card
1371 001e CWC-854 Wireless-G CardBus Adapter
1371 001f CWM-854 Wireless-G Mini PCI Adapter
1371 0020 CWP-854 Wireless-G PCI Adapter
+ 1458 e381 GN-WMKG 802.11b/g Wireless CardBus Adapter
1820 InfiniCon Systems Inc.
1822 Twinhan Technology Co. Ltd
182d SiteCom Europe BV
# HFC-based ISDN card
3069 ISDN PCI DC-105V2
+ 9790 WL-121 Wireless Network Adapter 100g+ [Ver.3]
1830 Credence Systems Corporation
183b MikroM GmbH
08a7 MVC100 DVI
@@ -7834,6 +8136,7 @@
18ac DViCO Corporation
d810 FusionHDTV 3 Gold
18b8 Ammasso
+ b001 AMSO 1100 iWARP/RDMA Gigabit Ethernet Coprocessor
18bc Info-Tek Corp.
# assigned to Octigabay System, which has been acquired by Cray
18c8 Cray Inc
@@ -7851,8 +8154,10 @@
18fb Resilience Corporation
1924 Level 5 Networks Inc.
1966 Orad Hi-Tec Systems
-1975 Pudlis Co. Ltd.
+ 1975 DVG64 family
1993 Innominate Security Technologies AG
+# http://www.progeny.net
+19ae Progeny Systems Corporation
1a08 Sierra semiconductor
0000 SC15064
1b13 Jaton Corp
@@ -7964,15 +8269,19 @@
1360 RTL8139 Ethernet
4143 Digital Equipment Corp
4144 Alpha Data
+ 0044 ADM-XRCIIPro
416c Aladdin Knowledge Systems
0100 AladdinCARD
0200 CPC
4444 Internext Compression Inc
0016 iTVC16 (CX23416) MPEG-2 Encoder
0070 4009 WinTV PVR 250
+ 0070 8003 WinTV PVR 150
0803 iTVC15 MPEG-2 Encoder
0070 4000 WinTV PVR-350
0070 4001 WinTV PVR-250
+# video capture card
+ 1461 a3cf M179
4468 Bridgeport machines
4594 Cogetec Informatique Inc
45fb Baldor Electric Company
@@ -8136,6 +8445,7 @@
8c11 82C270-294 Savage/MX
8c12 86C270-294 Savage/IX-MV
1014 017f ThinkPad T20
+ 1179 0001 86C584 SuperSavage/IXC Toshiba
8c13 86C270-294 Savage/IX
1179 0001 Magnia Z310
8c22 SuperSavage MX/128
@@ -8343,6 +8653,7 @@
8086 1018 PRO/1000 MT Desktop Adapter
1019 82547EI Gigabit Ethernet Controller (LOM)
1458 1019 GA-8IPE1000 Pro2 motherboard (865PE)
+ 1458 e000 Intel Gigabit Ethernet (Kenai II)
8086 1019 PRO/1000 CT Desktop Connection
8086 301f D865PERL mainboard
8086 3427 S875WP1-E mainboard
@@ -8399,6 +8710,7 @@
1050 82562EZ 10/100 Ethernet Controller
1462 728c 865PE Neo2 (MS-6728)
1462 758c MS-6758 (875P Neo)
+ 8086 3020 D865PERL mainboard
8086 3427 S875WP1-E mainboard
1051 82801EB/ER (ICH5/ICH5R) integrated LAN Controller
1059 82551QM Ethernet Controller
@@ -8745,10 +9057,10 @@
1462 3370 STAC9721 AC
147b 0507 TH7II-RAID
8086 4557 D815EGEW Mainboard
- 2446 Intel 537 [82801BA/BAM AC'97 Modem]
+ 2446 82801BA/BAM AC'97 Modem
1025 1016 Travelmate 612 TX
104d 80df Vaio PCG-FX403
- 2448 82801 PCI Bridge
+ 2448 82801 Mobile PCI Bridge
2449 82801BA/BAM/CA/CAM Ethernet Controller
0e11 0012 EtherExpress PRO/100 VM
0e11 0091 EtherExpress PRO/100 VE
@@ -8857,7 +9169,8 @@
1025 005a TravelMate 290
1028 0126 Optiplex GX260
1028 0163 Latitude D505
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
1071 8160 MIM2000
1462 5800 845PE Max (MS-6580)
1509 2990 Averatec 5110H laptop
@@ -8866,7 +9179,8 @@
1014 0267 NetVista A30p
1025 005a TravelMate 290
1028 0126 Optiplex GX260
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
1071 8160 MIM2000
1458 24c2 GA-8PE667 Ultra
1462 5800 845PE Max (MS-6580)
@@ -8876,7 +9190,8 @@
1025 005a TravelMate 290
1028 0126 Optiplex GX260
1028 0163 Latitude D505
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
1071 8160 MIM2000
1462 5800 845PE Max (MS-6580)
1509 2990 Averatec 5110H
@@ -8886,57 +9201,63 @@
1014 0267 NetVista A30p
1025 005a TravelMate 290
1028 0163 Latitude D505
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
1071 8160 MIM2000
1458 a002 GA-8PE667 Ultra
1462 5800 845PE Max (MS-6580)
24c6 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller
1025 005a TravelMate 290
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
1071 8160 MIM2000
24c7 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3
1014 0267 NetVista A30p
1025 005a TravelMate 290
1028 0126 Optiplex GX260
1028 0163 Latitude D505
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
1071 8160 MIM2000
1462 5800 845PE Max (MS-6580)
1509 2990 Averatec 5110H
4c53 1090 Cx9 / Vx9 mainboard
- 24ca 82801DBM (ICH4) Ultra ATA Storage Controller
+ 24ca 82801DBM (ICH4-M) IDE Controller
1025 005a TravelMate 290
1028 0163 Latitude D505
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
1071 8160 MIM2000
- 24cb 82801DB/DBL (ICH4/ICH4-L) UltraATA-100 IDE Controller
+ 24cb 82801DB (ICH4) IDE Controller
1014 0267 NetVista A30p
1028 0126 Optiplex GX260
1458 24c2 GA-8PE667 Ultra
1462 5800 845PE Max (MS-6580)
4c53 1090 Cx9 / Vx9 mainboard
- 24cc 82801DBM LPC Interface Controller
- 24cd 82801DB/DBM (ICH4/ICH4-M) USB 2.0 EHCI Controller
+ 24cc 82801DBM (ICH4-M) LPC Interface Bridge
+ 24cd 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller
1014 0267 NetVista A30p
1025 005a TravelMate 290
1028 0126 Optiplex GX260
1028 0163 Latitude D505
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
1071 8160 MIM2000
1462 3981 845PE Max (MS-6580)
1509 1968 Averatec 5110H
4c53 1090 Cx9 / Vx9 mainboard
24d0 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge
- 24d1 82801EB (ICH5) Serial ATA 150 Storage Controller
+ 24d1 82801EB (ICH5) SATA Controller
103c 12bc d530 CMT (DG746A)
1458 24d1 GA-8IPE1000 Pro2 motherboard (865PE)
1462 7280 865PE Neo2 (MS-6728)
8086 3427 S875WP1-E mainboard
8086 524c D865PERL mainboard
24d2 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1
+ 1028 0183 PowerEdge 1800
103c 12bc d530 CMT (DG746A)
1043 80a6 P4P800 Mainboard
- 1458 24d2 GA-8KNXP motherboard (875P)
+ 1458 24d2 GA-8IPE1000/8KNXP motherboard
1462 7280 865PE Neo2 (MS-6728)
8086 3427 S875WP1-E mainboard
8086 524c D865PERL mainboard
@@ -8947,6 +9268,7 @@
8086 3427 S875WP1-E mainboard
8086 524c D865PERL mainboard
24d4 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2
+ 1028 0183 PowerEdge 1800
103c 12bc d530 CMT (DG746A)
1043 80a6 P4P800 Mainboard
1458 24d2 GA-8IPE1000 Pro2 motherboard (865PE)
@@ -8956,27 +9278,32 @@
24d5 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller
103c 12bc Analog Devices codec [SoundMAX Integrated Digital Audio]
1043 80f3 P4P800 Mainboard
- 1458 a002 GA-8KNXP motherboard (875P)
+# Again, I suppose they use the same in different subsystems
+ 1458 a002 GA-8IPE1000/8KNXP motherboard
1462 7280 865PE Neo2 (MS-6728)
8086 a000 D865PERL mainboard
+ 8086 e000 D865PERL mainboard
24d6 82801EB/ER (ICH5/ICH5R) AC'97 Modem Controller
24d7 82801EB/ER (ICH5/ICH5R) USB UHCI #3
+ 1028 0183 PowerEdge 1800
103c 12bc d530 CMT (DG746A)
1043 80a6 P4P800 Mainboard
1458 24d2 GA-8IPE1000 Pro2 motherboard (865PE)
1462 7280 865PE Neo2 (MS-6728)
8086 3427 S875WP1-E mainboard
8086 524c D865PERL mainboard
- 24db 82801EB/ER (ICH5/ICH5R) Ultra ATA 100 Storage Controller
+ 24db 82801EB/ER (ICH5/ICH5R) IDE Controller
103c 12bc d530 CMT (DG746A)
1043 80a6 P4P800 Mainboard
1458 24d2 GA-8IPE1000 Pro2 motherboard (865PE)
1462 7280 865PE Neo2 (MS-6728)
1462 7580 MSI 875P
+ 8086 24db P4C800 Mainboard
8086 3427 S875WP1-E mainboard
8086 524c D865PERL mainboard
24dc 82801EB (ICH5) LPC Interface Bridge
24dd 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller
+ 1028 0183 PowerEdge 1800
103c 12bc d530 CMT (DG746A)
1043 80a6 P4P800 Mainboard
1458 5006 GA-8IPE1000 Pro2 motherboard (865PE)
@@ -8989,7 +9316,7 @@
1462 7280 865PE Neo2 (MS-6728)
8086 3427 S875WP1-E mainboard
8086 524c D865PERL mainboard
- 24df 82801EB (ICH5R) SATA (cc=RAID)
+ 24df 82801ER (ICH5R) SATA Controller
2500 82820 820 (Camino) Chipset Host Bridge (MCH)
1028 0095 Precision Workstation 220 Chipset
1043 801c P3C-2000 system chipset
@@ -9049,8 +9376,8 @@
2579 82875P Processor to AGP Controller
257b 82875P/E7210 Processor to PCI to CSA Bridge
257e 82875P/E7210 Processor to I/O Memory Interface
- 2580 915G/P/GV Processor to I/O Controller
- 2581 915G/P/GV PCI Express Root Port
+ 2580 915G/P/GV/GL/PL/910GL Processor to I/O Controller
+ 2581 915G/P/GV/GL/PL/910GL PCI Express Root Port
2582 82915G/GV/910GL Express Chipset Family Graphics Controller
1028 1079 Optiplex GX280
2584 925X/XE Memory Controller Hub
@@ -9082,40 +9409,40 @@
25ad 6300ESB USB2 Enhanced Host Controller
25ae 6300ESB 64-bit PCI-X Bridge
25b0 6300ESB SATA RAID Controller
- 2600 Server Hub Interface
- 2601 Server Hub PCI Express x4 Port D
- 2602 Server Hub PCI Express x4 Port C0
- 2603 Server Hub PCI Express x4 Port C1
- 2604 Server Hub PCI Express x4 Port B0
- 2605 Server Hub PCI Express x4 Port B1
- 2606 Server Hub PCI Express x4 Port A0
- 2607 Server Hub PCI Express x4 Port A1
- 2608 Server Hub PCI Express x8 Port C
- 2609 Server Hub PCI Express x8 Port B
- 260a Server Hub PCI Express x8 Port A
- 260c Server Hub IMI Registers
- 2610 Server Hub System Bus, Boot, and Interrupt Registers
- 2611 Server Hub Address Mapping Registers
- 2612 Server Hub RAS Registers
- 2613 Server Hub Performance Monitoring Registers
- 2614 Server Hub Performance Monitoring Registers
- 2615 Server Hub Performance Monitoring Registers
- 2617 Server Hub Debug Registers
- 2618 Server Hub Debug Registers
- 2619 Server Hub Debug Registers
- 261a Server Hub Debug Registers
- 261b Server Hub Debug Registers
- 261c Server Hub Debug Registers
- 261d Server Hub Debug Registers
- 261e Server Hub Debug Registers
- 2620 External Memory Bridge
- 2621 External Memory Bridge Control Registers
- 2622 External Memory Bridge Memory Interleaving Registers
- 2623 External Memory Bridge DDR Initialization and Calibration
- 2624 External Memory Bridge Reserved Registers
- 2625 External Memory Bridge Reserved Registers
- 2626 External Memory Bridge Reserved Registers
- 2627 External Memory Bridge Reserved Registers
+ 2600 E8500 Hub Interface
+ 2601 E8500 PCI Express x4 Port D
+ 2602 E8500 PCI Express x4 Port C0
+ 2603 E8500 PCI Express x4 Port C1
+ 2604 E8500 PCI Express x4 Port B0
+ 2605 E8500 PCI Express x4 Port B1
+ 2606 E8500 PCI Express x4 Port A0
+ 2607 E8500 PCI Express x4 Port A1
+ 2608 E8500 PCI Express x8 Port C
+ 2609 E8500 PCI Express x8 Port B
+ 260a E8500 PCI Express x8 Port A
+ 260c E8500 IMI Registers
+ 2610 E8500 System Bus, Boot, and Interrupt Registers
+ 2611 E8500 Address Mapping Registers
+ 2612 E8500 RAS Registers
+ 2613 E8500 Reserved Registers
+ 2614 E8500 Reserved Registers
+ 2615 E8500 Miscellaneous Registers
+ 2617 E8500 Reserved Registers
+ 2618 E8500 Reserved Registers
+ 2619 E8500 Reserved Registers
+ 261a E8500 Reserved Registers
+ 261b E8500 Reserved Registers
+ 261c E8500 Reserved Registers
+ 261d E8500 Reserved Registers
+ 261e E8500 Reserved Registers
+ 2620 E8500 eXternal Memory Bridge
+ 2621 E8500 XMB Miscellaneous Registers
+ 2622 E8500 XMB Memory Interleaving Registers
+ 2623 E8500 XMB DDR Initialization and Calibration
+ 2624 E8500 XMB Reserved Registers
+ 2625 E8500 XMB Reserved Registers
+ 2626 E8500 XMB Reserved Registers
+ 2627 E8500 XMB Reserved Registers
2640 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge
2641 82801FBM (ICH6M) LPC Interface Bridge
2642 82801FW/FRW (ICH6W/ICH6RW) LPC Interface Bridge
@@ -9155,11 +9482,10 @@
2779 PCI Express Root Port
2782 82915G Express Chipset Family Graphics Controller
2792 Mobile 915GM/GMS/910GML Express Graphics Controller
- 27b1 Mobile I/O Controller Hub LPC
27b8 I/O Controller Hub LPC
+ 27b9 Mobile I/O Controller Hub LPC
27c0 I/O Controller Hub SATA cc=IDE
27c1 I/O Controller Hub SATA cc=AHCI
- 27c2 I/O Controller Hub SATA cc=RAID
27c3 I/O Controller Hub SATA cc=RAID
27c4 Mobile I/O Controller Hub SATA cc=IDE
27c5 Mobile I/O Controller Hub SATA cc=AHCI
@@ -9184,7 +9510,8 @@
3200 GD31244 PCI-X SATA HBA
3340 82855PM Processor to I/O Controller
1025 005a TravelMate 290
- 103c 0890 NC6000 laptop
+ 103c 088c nc8000 laptop
+ 103c 0890 nc6000 laptop
3341 82855PM Processor to AGP Controller
3575 82830 830 Chipset Host Bridge
1014 021d ThinkPad A/T/X Series
@@ -9308,7 +9635,9 @@
84e4 460GX - 84460GX Memory Data Controller (MDC)
84e6 460GX - 82466GX Wide and fast PCI eXpander Bridge (WXB)
84ea 460GX - 84460GX AGP Bridge (GXB function 1)
- 8500 IXP4XX Network Processor family. IXP420/IXP421/IXP422/IXP425/IXC1100
+ 8500 IXP4XX - Intel Network Processor family. IXP420, IXP421, IXP422, IXP425 and IXC1100
+ 1993 0dee mGuard-PCI AV#1
+ 1993 0def mGuard-PCI AV#0
9000 IXP2000 Family Network Processor
9001 IXP2400 Network Processor
9004 IXP2800 Network Processor
@@ -9325,7 +9654,6 @@
b154 21154 PCI-to-PCI Bridge
b555 21555 Non transparent PCI-to-PCI Bridge
12d9 000a PCI VoIP Gateway
- 1331 0030 ENP-2611
4c53 1050 CT7 mainboard
4c53 1051 CE7 mainboard
e4bf 1000 CC8-1-BLUES
@@ -9514,8 +9842,10 @@
9005 0284 Tomcat
0285 AAC-RAID
0e11 0295 SATA 6Ch (Bearcat)
+ 1014 02f2 ServeRAID 8i
1028 0287 PowerEdge Expandable RAID Controller 320/DC
1028 0291 CERC SATA RAID 2 PCI SATA 6ch (DellCorsair)
+ 103c 3227 AAR-2610SA
17aa 0286 Legend S220 (Legend Crusader)
17aa 0287 Legend S230 (Legend Vulcan)
9005 0285 2200S (Vulcan)
@@ -9627,6 +9957,10 @@ d4d4 Dy4 Systems Inc
d531 I+ME ACTIA GmbH
d84d Exsys
dead Indigita Corporation
+deaf Middle Digital Inc.
+ 9050 PC Weasel Virtual VGA
+ 9051 PC Weasel Serial Port
+ 9052 PC Weasel Watchdog Timer
e000 Winbond
e000 W89C940
# see also : http://www.schoenfeld.de/inside/Inside_CWMK3.txt maybe a misuse of TJN id or it use the TJN 3XX chip for other applic
@@ -9660,13 +9994,6 @@ eace Endace Measurement Systems, Ltd
ec80 Belkin Corporation
ec00 F5D6000
ecc0 Echo Digital Audio Corporation
- 0050 Gina24_301
- 0051 Gina24_361
- 0060 Layla24
- 0070 Mona_301_80
- 0071 Mona_301_66
- 0072 Mona_361
- 0080 Mia
edd8 ARK Logic Inc
a091 1000PV [Stingray]
a099 2000PV [Stingray]
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 379fb2a6f72acb..6f0edadd132cfe 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2,6 +2,7 @@
* probe.c - PCI detection and setup code
*/
+#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/pci.h>
@@ -9,14 +10,6 @@
#include <linux/module.h>
#include <linux/cpumask.h>
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
#define CARDBUS_RESERVE_BUSNR 3
#define PCI_CFG_SPACE_SIZE 256
@@ -80,7 +73,7 @@ void pci_remove_legacy_files(struct pci_bus *bus) { return; }
*/
static ssize_t pci_bus_show_cpuaffinity(struct class_device *class_dev, char *buf)
{
- cpumask_t cpumask = pcibus_to_cpumask((to_pci_bus(class_dev))->number);
+ cpumask_t cpumask = pcibus_to_cpumask(to_pci_bus(class_dev));
int ret;
ret = cpumask_scnprintf(buf, PAGE_SIZE, cpumask);
@@ -422,8 +415,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
pci_read_config_dword(dev, PCI_PRIMARY_BUS, &buses);
- DBG("Scanning behind PCI bridge %s, config %06x, pass %d\n",
- pci_name(dev), buses & 0xffffff, pass);
+ pr_debug("PCI: Scanning behind PCI bridge %s, config %06x, pass %d\n",
+ pci_name(dev), buses & 0xffffff, pass);
/* Disable MasterAbortMode during probing to avoid reporting
of bus errors (in some architectures) */
@@ -559,8 +552,8 @@ static int pci_setup_device(struct pci_dev * dev)
dev->class = class;
class >>= 8;
- DBG("Found %02x:%02x [%04x/%04x] %06x %02x\n", dev->bus->number,
- dev->devfn, dev->vendor, dev->device, class, dev->hdr_type);
+ pr_debug("PCI: Found %s [%04x/%04x] %06x %02x\n", pci_name(dev),
+ dev->vendor, dev->device, class, dev->hdr_type);
/* "Unknown power state" */
dev->current_state = 4;
@@ -815,7 +808,7 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
unsigned int devfn, pass, max = bus->secondary;
struct pci_dev *dev;
- DBG("Scanning bus %02x\n", bus->number);
+ pr_debug("PCI: Scanning bus %04x:%02x\n", pci_domain_nr(bus), bus->number);
/* Go find them, Rover! */
for (devfn = 0; devfn < 0x100; devfn += 8)
@@ -825,7 +818,7 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
* After performing arch-dependent fixup of the bus, look behind
* all PCI-to-PCI bridges on this bus.
*/
- DBG("Fixups for bus %02x\n", bus->number);
+ pr_debug("PCI: Fixups for bus %04x:%02x\n", pci_domain_nr(bus), bus->number);
pcibios_fixup_bus(bus);
for (pass=0; pass < 2; pass++)
list_for_each_entry(dev, &bus->devices, bus_list) {
@@ -841,7 +834,8 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
*
* Return how far we've got finding sub-buses.
*/
- DBG("Bus scan for %02x returning with max=%02x\n", bus->number, max);
+ pr_debug("PCI: Bus scan for %04x:%02x returning with max=%02x\n",
+ pci_domain_nr(bus), bus->number, max);
return max;
}
@@ -880,7 +874,7 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
if (pci_find_bus(pci_domain_nr(b), bus)) {
/* If we already got to this bus through a different bridge, ignore it */
- DBG("PCI: Bus %04x:%02x already known\n", pci_domain_nr(b), bus);
+ pr_debug("PCI: Bus %04x:%02x already known\n", pci_domain_nr(b), bus);
goto err_out;
}
list_add_tail(&b->node, &pci_root_buses);
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index b53bb859ce91c4..84cc4f620d8d48 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -313,13 +313,10 @@ static void *pci_seq_start(struct seq_file *m, loff_t *pos)
struct pci_dev *dev = NULL;
loff_t n = *pos;
- dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
- while (n--) {
- dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
- if (dev == NULL)
- goto exit;
+ for_each_pci_dev(dev) {
+ if (!n--)
+ break;
}
-exit:
return dev;
}
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index eef35c8a71e591..1cfe9538fd19f6 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -19,8 +19,6 @@
#include <linux/init.h>
#include <linux/delay.h>
-#undef DEBUG
-
/* Deal with broken BIOS'es that neglect to enable passive release,
which can cause problems in combination with the 82441FX/PPro MTRRs */
static void __devinit quirk_passive_release(struct pci_dev *dev)
@@ -541,7 +539,7 @@ static void __devinit quirk_cardbus_legacy(struct pci_dev *dev)
return;
pci_write_config_dword(dev, PCI_CB_LEGACY_MODE_BASE, 0);
}
-DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy );
+DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy);
/*
* Following the PCI ordering rules is optional on the AMD762. I'm not
@@ -659,7 +657,7 @@ static void __devinit quirk_ide_bases(struct pci_dev *dev)
printk(KERN_INFO "PCI: Ignoring BAR%d-%d of IDE controller %s\n",
first_bar, last_bar, pci_name(dev));
}
-DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_ide_bases );
+DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_ide_bases);
/*
* Ensure C0 rev restreaming is off. This is normally done by
@@ -700,7 +698,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quir
/*
* Serverworks CSB5 IDE does not fully support native mode
*/
-static void __init quirk_svwks_csb5ide(struct pci_dev *pdev)
+static void __devinit quirk_svwks_csb5ide(struct pci_dev *pdev)
{
u8 prog;
pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
@@ -787,6 +785,7 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB)
switch (dev->subsystem_device) {
case 0x1751: /* M2N notebook */
+ case 0x1821: /* M5N notebook */
asus_hides_smbus = 1;
}
if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB)
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index 3f70e2ffe92615..96f077f9a65940 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -2,14 +2,6 @@
#include <linux/module.h>
#include "pci.h"
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
static void pci_free_resources(struct pci_dev *dev)
{
int i;
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 82d877c4051f73..1ba84be0b4c0fa 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -29,9 +29,9 @@
#define DEBUG_CONFIG 1
#if DEBUG_CONFIG
-# define DBGC(args) printk args
+#define DBG(x...) printk(x)
#else
-# define DBGC(args)
+#define DBG(x...)
#endif
#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
@@ -151,8 +151,7 @@ pci_setup_bridge(struct pci_bus *bus)
struct pci_bus_region region;
u32 l, io_upper16;
- DBGC((KERN_INFO "PCI: Bus %d, bridge: %s\n",
- bus->number, pci_name(bridge)));
+ DBG(KERN_INFO "PCI: Bridge: %s\n", pci_name(bridge));
/* Set up the top and bottom of the PCI I/O segment for this bus. */
pcibios_resource_to_bus(bridge, &region, bus->resource[0]);
@@ -163,14 +162,14 @@ pci_setup_bridge(struct pci_bus *bus)
l |= region.end & 0xf000;
/* Set up upper 16 bits of I/O base/limit. */
io_upper16 = (region.end & 0xffff0000) | (region.start >> 16);
- DBGC((KERN_INFO " IO window: %04lx-%04lx\n",
- region.start, region.end));
+ DBG(KERN_INFO " IO window: %04lx-%04lx\n",
+ region.start, region.end);
}
else {
/* Clear upper 16 bits of I/O base/limit. */
io_upper16 = 0;
l = 0x00f0;
- DBGC((KERN_INFO " IO window: disabled.\n"));
+ DBG(KERN_INFO " IO window: disabled.\n");
}
/* Temporarily disable the I/O range before updating PCI_IO_BASE. */
pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, 0x0000ffff);
@@ -185,12 +184,12 @@ pci_setup_bridge(struct pci_bus *bus)
if (bus->resource[1]->flags & IORESOURCE_MEM) {
l = (region.start >> 16) & 0xfff0;
l |= region.end & 0xfff00000;
- DBGC((KERN_INFO " MEM window: %08lx-%08lx\n",
- region.start, region.end));
+ DBG(KERN_INFO " MEM window: %08lx-%08lx\n",
+ region.start, region.end);
}
else {
l = 0x0000fff0;
- DBGC((KERN_INFO " MEM window: disabled.\n"));
+ DBG(KERN_INFO " MEM window: disabled.\n");
}
pci_write_config_dword(bridge, PCI_MEMORY_BASE, l);
@@ -204,12 +203,12 @@ pci_setup_bridge(struct pci_bus *bus)
if (bus->resource[2]->flags & IORESOURCE_PREFETCH) {
l = (region.start >> 16) & 0xfff0;
l |= region.end & 0xfff00000;
- DBGC((KERN_INFO " PREFETCH window: %08lx-%08lx\n",
- region.start, region.end));
+ DBG(KERN_INFO " PREFETCH window: %08lx-%08lx\n",
+ region.start, region.end);
}
else {
l = 0x0000fff0;
- DBGC((KERN_INFO " PREFETCH window: disabled.\n"));
+ DBG(KERN_INFO " PREFETCH window: disabled.\n");
}
pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, l);
diff --git a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c
index d02bebfa25d432..a251289c9958e8 100644
--- a/drivers/pci/setup-irq.c
+++ b/drivers/pci/setup-irq.c
@@ -18,14 +18,6 @@
#include <linux/cache.h>
-#define DEBUG_CONFIG 0
-#if DEBUG_CONFIG
-# define DBGC(args) printk args
-#else
-# define DBGC(args)
-#endif
-
-
static void __init
pdev_fixup_irq(struct pci_dev *dev,
u8 (*swizzle)(struct pci_dev *, u8 *),
@@ -53,8 +45,8 @@ pdev_fixup_irq(struct pci_dev *dev,
irq = 0;
dev->irq = irq;
- DBGC((KERN_ERR "PCI fixup irq: (%s) got %d\n",
- dev->dev.kobj.name, dev->irq));
+ pr_debug("PCI: fixup irq: (%s) got %d\n",
+ dev->dev.kobj.name, dev->irq);
/* Always tell the device, so the driver knows what is
the real IRQ to use; the device does not use it. */
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 26a1d767c449c7..1ca21d2ba11c68 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -25,13 +25,6 @@
#include <linux/slab.h>
#include "pci.h"
-#define DEBUG_CONFIG 0
-#if DEBUG_CONFIG
-# define DBGC(args) printk args
-#else
-# define DBGC(args)
-#endif
-
static void
pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
@@ -42,10 +35,9 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
pcibios_resource_to_bus(dev, &region, res);
- DBGC((KERN_ERR " got res [%lx:%lx] bus [%lx:%lx] flags %lx for "
- "BAR %d of %s\n", res->start, res->end,
- region.start, region.end, res->flags,
- resno, pci_name(dev)));
+ pr_debug(" got res [%lx:%lx] bus [%lx:%lx] flags %lx for "
+ "BAR %d of %s\n", res->start, res->end,
+ region.start, region.end, res->flags, resno, pci_name(dev));
new = region.start | (res->flags & PCI_REGION_FLAG_MASK);
if (res->flags & IORESOURCE_IO)
@@ -60,7 +52,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
reg = dev->rom_base_reg;
} else {
/* Hmm, non-standard resource. */
- BUG();
+
return; /* kill uninitialised var warning */
}
@@ -85,9 +77,9 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
}
}
res->flags &= ~IORESOURCE_UNSET;
- DBGC((KERN_INFO "PCI: moved device %s resource %d (%lx) to %x\n",
+ pr_debug("PCI: moved device %s resource %d (%lx) to %x\n",
pci_name(dev), resno, res->flags,
- new & ~PCI_REGION_FLAG_MASK));
+ new & ~PCI_REGION_FLAG_MASK);
}
int __devinit
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 805cccd042b671..2e2486b035dd95 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -98,6 +98,8 @@ typedef struct idescsi_pc_s {
typedef struct ide_scsi_obj {
ide_drive_t *drive;
+ ide_driver_t *driver;
+ struct gendisk *disk;
struct Scsi_Host *host;
idescsi_pc_t *pc; /* Current packet command */
@@ -108,7 +110,8 @@ typedef struct ide_scsi_obj {
static DECLARE_MUTEX(idescsi_ref_sem);
-#define ide_scsi_g(disk) ((disk)->private_data)
+#define ide_scsi_g(disk) \
+ container_of((disk)->private_data, struct ide_scsi_obj, driver)
static struct ide_scsi_obj *ide_scsi_get(struct gendisk *disk)
{
@@ -323,9 +326,12 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co
printk ("ide-scsi: %s: queue cmd = ", drive->name);
hexdump(pc->c, 6);
}
+ rq->rq_disk = scsi->disk;
return ide_do_drive_cmd(drive, rq, ide_preempt);
}
+static int idescsi_end_request(ide_drive_t *, int, int);
+
static ide_startstop_t
idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
{
@@ -334,7 +340,9 @@ idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
rq->errors++;
- DRIVER(drive)->end_request(drive, 0, 0);
+
+ idescsi_end_request(drive, 0, 0);
+
return ide_stopped;
}
@@ -346,7 +354,9 @@ idescsi_atapi_abort(ide_drive_t *drive, struct request *rq)
((idescsi_pc_t *) rq->special)->scsi_cmd->serial_number);
#endif
rq->errors |= ERROR_MAX;
- DRIVER(drive)->end_request(drive, 0, 0);
+
+ idescsi_end_request(drive, 0, 0);
+
return ide_stopped;
}
@@ -718,17 +728,20 @@ static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi)
static int idescsi_cleanup (ide_drive_t *drive)
{
struct Scsi_Host *scsihost = drive->driver_data;
- struct gendisk *g = drive->disk;
+ struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost);
+ struct gendisk *g = scsi->disk;
if (ide_unregister_subdriver(drive))
return 1;
+ ide_unregister_region(g);
+
drive->driver_data = NULL;
g->private_data = NULL;
- g->fops = ide_fops;
+ put_disk(g);
scsi_remove_host(scsihost);
- ide_scsi_put(scsihost_to_idescsi(scsihost));
+ ide_scsi_put(scsi);
return 0;
}
@@ -910,6 +923,7 @@ static int idescsi_queue (struct scsi_cmnd *cmd,
rq->special = (char *) pc;
rq->flags = REQ_SPECIAL;
spin_unlock_irq(host->host_lock);
+ rq->rq_disk = scsi->disk;
(void) ide_do_drive_cmd (drive, rq, ide_end);
spin_lock_irq(host->host_lock);
return 0;
@@ -1085,9 +1099,9 @@ static int idescsi_attach(ide_drive_t *drive)
{
idescsi_scsi_t *idescsi;
struct Scsi_Host *host;
- struct gendisk *g = drive->disk;
+ struct gendisk *g;
static int warned;
- int err;
+ int err = -ENOMEM;
if (!warned && drive->media == ide_cdrom) {
printk(KERN_WARNING "ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device\n");
@@ -1100,6 +1114,12 @@ static int idescsi_attach(ide_drive_t *drive)
!(host = scsi_host_alloc(&idescsi_template,sizeof(idescsi_scsi_t))))
return 1;
+ g = alloc_disk(1 << PARTN_BITS);
+ if (!g)
+ goto out_host_put;
+
+ ide_init_disk(g, drive);
+
host->max_id = 1;
#if IDESCSI_DEBUG_LOG
@@ -1114,21 +1134,27 @@ static int idescsi_attach(ide_drive_t *drive)
drive->driver_data = host;
idescsi = scsihost_to_idescsi(host);
idescsi->drive = drive;
+ idescsi->driver = &idescsi_driver;
idescsi->host = host;
+ idescsi->disk = g;
+ g->private_data = &idescsi->driver;
err = ide_register_subdriver(drive, &idescsi_driver);
if (!err) {
idescsi_setup (drive, idescsi);
g->fops = &idescsi_ops;
- g->private_data = idescsi;
+ ide_register_region(g);
err = scsi_add_host(host, &drive->gendev);
if (!err) {
scsi_scan_host(host);
return 0;
}
/* fall through on error */
+ ide_unregister_region(g);
ide_unregister_subdriver(drive);
}
+ put_disk(g);
+out_host_put:
scsi_host_put(host);
return err;
}
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 49071f23945271..201c3b9924f4d4 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2194,14 +2194,6 @@ static int __init serial8250_console_init(void)
}
console_initcall(serial8250_console_init);
-static int __init serial8250_late_console_init(void)
-{
- if (!(serial8250_console.flags & CON_ENABLED))
- register_console(&serial8250_console);
- return 0;
-}
-late_initcall(serial8250_late_console_init);
-
static int __init find_port(struct uart_port *p)
{
int line;
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c
index bb6509f5fe8bb1..08d61f13edc615 100644
--- a/drivers/serial/m32r_sio.c
+++ b/drivers/serial/m32r_sio.c
@@ -54,13 +54,6 @@
#include "m32r_sio_reg.h"
/*
- * Configuration:
- * share_irqs - whether we pass SA_SHIRQ to request_irq(). This option
- * is unsafe when used on edge-triggered interrupts.
- */
-unsigned int share_irqs_sio = M32R_SIO_SHARE_IRQS;
-
-/*
* Debugging.
*/
#if 0
@@ -86,15 +79,36 @@ unsigned int share_irqs_sio = M32R_SIO_SHARE_IRQS;
#include <asm/serial.h>
+/* Standard COM flags */
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
+
/*
* SERIAL_PORT_DFNS tells us about built-in ports that have no
* standard enumeration mechanism. Platforms that can find all
* serial ports via mechanisms like ACPI or PCI need not supply it.
*/
-#ifndef SERIAL_PORT_DFNS
-#define SERIAL_PORT_DFNS
+#undef SERIAL_PORT_DFNS
+#if defined(CONFIG_PLAT_USRV)
+
+#define SERIAL_PORT_DFNS \
+ /* UART CLK PORT IRQ FLAGS */ \
+ { 0, BASE_BAUD, 0x3F8, PLD_IRQ_UART0, STD_COM_FLAGS }, /* ttyS0 */ \
+ { 0, BASE_BAUD, 0x2F8, PLD_IRQ_UART1, STD_COM_FLAGS }, /* ttyS1 */
+
+#else /* !CONFIG_PLAT_USRV */
+
+#if defined(CONFIG_SERIAL_M32R_PLDSIO)
+#define SERIAL_PORT_DFNS \
+ { 0, BASE_BAUD, ((unsigned long)PLD_ESIO0CR), PLD_IRQ_SIO0_RCV, \
+ STD_COM_FLAGS }, /* ttyS0 */
+#else
+#define SERIAL_PORT_DFNS \
+ { 0, BASE_BAUD, M32R_SIO_OFFSET, M32R_IRQ_SIO0_R, \
+ STD_COM_FLAGS }, /* ttyS0 */
#endif
+#endif /* !CONFIG_PLAT_USRV */
+
static struct old_serial_port old_serial_port[] = {
SERIAL_PORT_DFNS /* defined in asm/serial.h */
};
@@ -581,10 +595,7 @@ static void serial_unlink_irq_chain(struct uart_sio_port *up)
}
/*
- * This function is used to handle ports that do not have an
- * interrupt. This doesn't work very well for 16450's, but gives
- * barely passable results for a 16550A. (Although at the expense
- * of much CPU overhead).
+ * This function is used to handle ports that do not have an interrupt.
*/
static void m32r_sio_timeout(unsigned long data)
{
@@ -966,7 +977,7 @@ static struct uart_ops m32r_sio_pops = {
static struct uart_sio_port m32r_sio_ports[UART_NR];
-static void __init m32r_sio_isa_init_ports(void)
+static void __init m32r_sio_init_ports(void)
{
struct uart_sio_port *up;
static int first = 1;
@@ -986,8 +997,6 @@ static void __init m32r_sio_isa_init_ports(void)
up->port.iotype = old_serial_port[i].io_type;
up->port.regshift = old_serial_port[i].iomem_reg_shift;
up->port.ops = &m32r_sio_pops;
- if (share_irqs_sio)
- up->port.flags |= UPF_SHARE_IRQ;
}
}
@@ -995,7 +1004,7 @@ static void __init m32r_sio_register_ports(struct uart_driver *drv)
{
int i;
- m32r_sio_isa_init_ports();
+ m32r_sio_init_ports();
for (i = 0; i < UART_NR; i++) {
struct uart_sio_port *up = &m32r_sio_ports[i];
@@ -1129,7 +1138,7 @@ static int __init m32r_sio_console_init(void)
{
sio_reset();
sio_init();
- m32r_sio_isa_init_ports();
+ m32r_sio_init_ports();
register_console(&m32r_sio_console);
return 0;
}
@@ -1151,81 +1160,6 @@ static struct uart_driver m32r_sio_reg = {
.cons = M32R_SIO_CONSOLE,
};
-/*
- * register_serial and unregister_serial allows for 16x50 serial ports to be
- * configured at run-time, to support PCMCIA modems.
- */
-
-static int __register_m32r_sio(struct serial_struct *req, int line)
-{
- struct uart_port port;
-
- port.iobase = req->port;
- port.membase = req->iomem_base;
- port.irq = req->irq;
- port.uartclk = req->baud_base * 16;
- port.fifosize = req->xmit_fifo_size;
- port.regshift = req->iomem_reg_shift;
- port.iotype = req->io_type;
- port.flags = req->flags | UPF_BOOT_AUTOCONF;
- port.mapbase = req->iomap_base;
- port.line = line;
-
- if (share_irqs_sio)
- port.flags |= UPF_SHARE_IRQ;
-
- if (HIGH_BITS_OFFSET)
- port.iobase |= (long) req->port_high << HIGH_BITS_OFFSET;
-
- /*
- * If a clock rate wasn't specified by the low level
- * driver, then default to the standard clock rate.
- */
- if (port.uartclk == 0)
- port.uartclk = BASE_BAUD * 16;
-
- return uart_register_port(&m32r_sio_reg, &port);
-}
-
-/**
- * register_m32r_sio - configure a 16x50 serial port at runtime
- * @req: request structure
- *
- * Configure the serial port specified by the request. If the
- * port exists and is in use an error is returned. If the port
- * is not currently in the table it is added.
- *
- * The port is then probed and if necessary the IRQ is autodetected
- * If this fails an error is returned.
- *
- * On success the port is ready to use and the line number is returned.
- */
-int register_m32r_sio(struct serial_struct *req)
-{
- return __register_m32r_sio(req, -1);
-}
-
-int __init early_serial_setup(struct uart_port *port)
-{
- m32r_sio_isa_init_ports();
- m32r_sio_ports[port->line].port = *port;
- m32r_sio_ports[port->line].port.ops = &m32r_sio_pops;
-
- return 0;
-}
-
-/**
- * unregister_m32r_sio - remove a 16x50 serial port at runtime
- * @line: serial line number
- *
- * Remove one serial port. This may be called from interrupt
- * context.
- */
-void unregister_m32r_sio(int line)
-{
- uart_unregister_port(&m32r_sio_reg, line);
-}
-
/**
* m32r_sio_suspend_port - suspend one serial port
* @line: serial line number
@@ -1252,8 +1186,7 @@ static int __init m32r_sio_init(void)
{
int ret, i;
- printk(KERN_INFO "Serial: M32R SIO driver $Revision: 1.9 $ "
- "IRQ sharing %sabled\n", share_irqs_sio ? "en" : "dis");
+ printk(KERN_INFO "Serial: M32R SIO driver $Revision: 1.11 $ ");
for (i = 0; i < NR_IRQS; i++)
spin_lock_init(&irq_lists[i].lock);
@@ -1278,14 +1211,8 @@ static void __exit m32r_sio_exit(void)
module_init(m32r_sio_init);
module_exit(m32r_sio_exit);
-EXPORT_SYMBOL(register_m32r_sio);
-EXPORT_SYMBOL(unregister_m32r_sio);
EXPORT_SYMBOL(m32r_sio_suspend_port);
EXPORT_SYMBOL(m32r_sio_resume_port);
MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Generic M32R SIO serial driver $Revision: 1.9 $");
-
-module_param(share_irqs_sio, bool, 0400);
-MODULE_PARM_DESC(share_irqs_sio, "Share IRQs with other non-M32R SIO devices"
- " (unsafe)");
+MODULE_DESCRIPTION("Generic M32R SIO serial driver $Revision: 1.11 $");
diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c
index 926af622c53b9b..328592c3a956f9 100644
--- a/fs/ext3/acl.c
+++ b/fs/ext3/acl.c
@@ -197,8 +197,7 @@ ext3_get_acl(struct inode *inode, int type)
acl = NULL;
else
acl = ERR_PTR(retval);
- if (value)
- kfree(value);
+ kfree(value);
if (!IS_ERR(acl)) {
switch(type) {
@@ -267,8 +266,7 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type,
error = ext3_xattr_set_handle(handle, inode, name_index, "",
value, size, 0);
- if (value)
- kfree(value);
+ kfree(value);
if (!error) {
switch(type) {
case ACL_TYPE_ACCESS:
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 6a18447e9dd7fc..ccd632fcc6d87e 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -250,7 +250,7 @@ static void rsv_window_remove(struct super_block *sb,
{
rsv->rsv_start = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
rsv->rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
- atomic_set(&rsv->rsv_alloc_hit, 0);
+ rsv->rsv_alloc_hit = 0;
rb_erase(&rsv->rsv_node, &EXT3_SB(sb)->s_rsv_window_root);
}
@@ -259,13 +259,46 @@ static inline int rsv_is_empty(struct ext3_reserve_window *rsv)
/* a valid reservation end block could not be 0 */
return (rsv->_rsv_end == EXT3_RESERVE_WINDOW_NOT_ALLOCATED);
}
+void ext3_init_block_alloc_info(struct inode *inode)
+{
+ struct ext3_inode_info *ei = EXT3_I(inode);
+ struct ext3_block_alloc_info *block_i = ei->i_block_alloc_info;
+ struct super_block *sb = inode->i_sb;
+
+ block_i = kmalloc(sizeof(*block_i), GFP_NOFS);
+ if (block_i) {
+ struct ext3_reserve_window_node *rsv = &block_i->rsv_window_node;
+
+ rsv->rsv_start = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
+ rsv->rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
+
+ /*
+ * if filesystem is mounted with NORESERVATION, the goal
+ * reservation window size is set to zero to indicate
+ * block reservation is off
+ */
+ if (!test_opt(sb, RESERVATION))
+ rsv->rsv_goal_size = 0;
+ else
+ rsv->rsv_goal_size = EXT3_DEFAULT_RESERVE_BLOCKS;
+ rsv->rsv_alloc_hit = 0;
+ block_i->last_alloc_logical_block = 0;
+ block_i->last_alloc_physical_block = 0;
+ }
+ ei->i_block_alloc_info = block_i;
+}
void ext3_discard_reservation(struct inode *inode)
{
struct ext3_inode_info *ei = EXT3_I(inode);
- struct ext3_reserve_window_node *rsv = &ei->i_rsv_window;
+ struct ext3_block_alloc_info *block_i = ei->i_block_alloc_info;
+ struct ext3_reserve_window_node *rsv;
spinlock_t *rsv_lock = &EXT3_SB(inode->i_sb)->s_rsv_window_lock;
+ if (!block_i)
+ return;
+
+ rsv = &block_i->rsv_window_node;
if (!rsv_is_empty(&rsv->rsv_window)) {
spin_lock(rsv_lock);
if (!rsv_is_empty(&rsv->rsv_window))
@@ -841,7 +874,7 @@ static int alloc_new_reservation(struct ext3_reserve_window_node *my_rsv,
else
start_block = goal + group_first_block;
- size = atomic_read(&my_rsv->rsv_goal_size);
+ size = my_rsv->rsv_goal_size;
if (!rsv_is_empty(&my_rsv->rsv_window)) {
/*
* if the old reservation is cross group boundary
@@ -862,7 +895,7 @@ static int alloc_new_reservation(struct ext3_reserve_window_node *my_rsv,
(start_block >= my_rsv->rsv_start))
return -1;
- if ((atomic_read(&my_rsv->rsv_alloc_hit) >
+ if ((my_rsv->rsv_alloc_hit >
(my_rsv->rsv_end - my_rsv->rsv_start + 1) / 2)) {
/*
* if we previously allocation hit ration is greater than half
@@ -872,7 +905,7 @@ static int alloc_new_reservation(struct ext3_reserve_window_node *my_rsv,
size = size * 2;
if (size > EXT3_MAX_RESERVE_BLOCKS)
size = EXT3_MAX_RESERVE_BLOCKS;
- atomic_set(&my_rsv->rsv_goal_size, size);
+ my_rsv->rsv_goal_size= size;
}
}
/*
@@ -947,7 +980,7 @@ found_rsv_window:
}
my_rsv->rsv_start = reservable_space_start;
my_rsv->rsv_end = my_rsv->rsv_start + size - 1;
- atomic_set(&my_rsv->rsv_alloc_hit, 0);
+ my_rsv->rsv_alloc_hit = 0;
if (my_rsv != prev_rsv) {
ext3_rsv_window_add(sb, my_rsv);
}
@@ -1046,23 +1079,17 @@ ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle,
*/
while (1) {
struct ext3_reserve_window rsv_copy;
- unsigned int seq;
- do {
- seq = read_seqbegin(&my_rsv->rsv_seqlock);
- rsv_copy._rsv_start = my_rsv->rsv_start;
- rsv_copy._rsv_end = my_rsv->rsv_end;
- } while (read_seqretry(&my_rsv->rsv_seqlock, seq));
+ rsv_copy._rsv_start = my_rsv->rsv_start;
+ rsv_copy._rsv_end = my_rsv->rsv_end;
if (rsv_is_empty(&rsv_copy) || (ret < 0) ||
!goal_in_my_reservation(&rsv_copy, goal, group, sb)) {
spin_lock(rsv_lock);
- write_seqlock(&my_rsv->rsv_seqlock);
ret = alloc_new_reservation(my_rsv, goal, sb,
group, bitmap_bh);
rsv_copy._rsv_start = my_rsv->rsv_start;
rsv_copy._rsv_end = my_rsv->rsv_end;
- write_sequnlock(&my_rsv->rsv_seqlock);
spin_unlock(rsv_lock);
if (ret < 0)
break; /* failed */
@@ -1076,8 +1103,7 @@ ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle,
ret = ext3_try_to_allocate(sb, handle, group, bitmap_bh, goal,
&rsv_copy);
if (ret >= 0) {
- if (!read_seqretry(&my_rsv->rsv_seqlock, seq))
- atomic_inc(&my_rsv->rsv_alloc_hit);
+ my_rsv->rsv_alloc_hit++;
break; /* succeed */
}
}
@@ -1154,7 +1180,7 @@ int ext3_new_block(handle_t *handle, struct inode *inode,
struct ext3_super_block *es;
struct ext3_sb_info *sbi;
struct ext3_reserve_window_node *my_rsv = NULL;
- struct ext3_reserve_window_node *rsv = &EXT3_I(inode)->i_rsv_window;
+ struct ext3_block_alloc_info *block_i;
unsigned short windowsz = 0;
#ifdef EXT3FS_DEBUG
static int goal_hits, goal_attempts;
@@ -1187,10 +1213,10 @@ int ext3_new_block(handle_t *handle, struct inode *inode,
* command EXT3_IOC_SETRSVSZ to set the window size to 0 to turn off
* reservation on that particular file)
*/
- windowsz = atomic_read(&rsv->rsv_goal_size);
- if (test_opt(sb, RESERVATION) &&
- S_ISREG(inode->i_mode) && (windowsz > 0))
- my_rsv = rsv;
+ block_i = EXT3_I(inode)->i_block_alloc_info;
+ if (block_i && ((windowsz = block_i->rsv_window_node.rsv_goal_size) > 0))
+ my_rsv = &block_i->rsv_window_node;
+
if (!ext3_has_free_blocks(sbi)) {
*errp = -ENOSPC;
goto out;
@@ -1211,6 +1237,14 @@ int ext3_new_block(handle_t *handle, struct inode *inode,
goal_group = group_no;
retry:
free_blocks = le16_to_cpu(gdp->bg_free_blocks_count);
+ /*
+ * if there is not enough free blocks to make a new resevation
+ * turn off reservation for this allocation
+ */
+ if (my_rsv && (free_blocks < windowsz)
+ && (rsv_is_empty(&my_rsv->rsv_window)))
+ my_rsv = NULL;
+
if (free_blocks > 0) {
ret_block = ((goal - le32_to_cpu(es->s_first_data_block)) %
EXT3_BLOCKS_PER_GROUP(sb));
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index 121ecbe1039e85..1e6f3ea2871341 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -562,8 +562,6 @@ got:
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
memset(ei->i_data, 0, sizeof(ei->i_data));
- ei->i_next_alloc_block = 0;
- ei->i_next_alloc_goal = 0;
ei->i_dir_start_lookup = 0;
ei->i_disksize = 0;
@@ -581,11 +579,7 @@ got:
ei->i_file_acl = 0;
ei->i_dir_acl = 0;
ei->i_dtime = 0;
- ei->i_rsv_window.rsv_start = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
- ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
- atomic_set(&ei->i_rsv_window.rsv_goal_size, EXT3_DEFAULT_RESERVE_BLOCKS);
- atomic_set(&ei->i_rsv_window.rsv_alloc_hit, 0);
- seqlock_init(&ei->i_rsv_window.rsv_seqlock);
+ ei->i_block_alloc_info = NULL;
ei->i_block_group = group;
ext3_set_inode_flags(inode);
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 05be496c892f17..040eb288bb1cb7 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -462,26 +462,22 @@ static unsigned long ext3_find_near(struct inode *inode, Indirect *ind)
static int ext3_find_goal(struct inode *inode, long block, Indirect chain[4],
Indirect *partial, unsigned long *goal)
{
- struct ext3_inode_info *ei = EXT3_I(inode);
- /* Writer: ->i_next_alloc* */
- if ((block == ei->i_next_alloc_block + 1)&& ei->i_next_alloc_goal) {
- ei->i_next_alloc_block++;
- ei->i_next_alloc_goal++;
+ struct ext3_block_alloc_info *block_i = EXT3_I(inode)->i_block_alloc_info;
+
+ /*
+ * try the heuristic for sequential allocation,
+ * failing that at least try to get decent locality.
+ */
+ if (block_i && (block == block_i->last_alloc_logical_block + 1)
+ && (block_i->last_alloc_physical_block != 0)) {
+ *goal = block_i->last_alloc_physical_block + 1;
+ return 0;
}
- /* Writer: end */
- /* Reader: pointers, ->i_next_alloc* */
+
if (verify_chain(chain, partial)) {
- /*
- * try the heuristic for sequential allocation,
- * failing that at least try to get decent locality.
- */
- if (block == ei->i_next_alloc_block)
- *goal = ei->i_next_alloc_goal;
- if (!*goal)
- *goal = ext3_find_near(inode, partial);
+ *goal = ext3_find_near(inode, partial);
return 0;
}
- /* Reader: end */
return -EAGAIN;
}
@@ -599,7 +595,7 @@ static int ext3_splice_branch(handle_t *handle, struct inode *inode, long block,
{
int i;
int err = 0;
- struct ext3_inode_info *ei = EXT3_I(inode);
+ struct ext3_block_alloc_info *block_i = EXT3_I(inode)->i_block_alloc_info;
/*
* If we're splicing into a [td]indirect block (as opposed to the
@@ -614,7 +610,6 @@ static int ext3_splice_branch(handle_t *handle, struct inode *inode, long block,
}
/* Verify that place we are splicing to is still there and vacant */
- /* Writer: pointers, ->i_next_alloc* */
if (!verify_chain(chain, where-1) || *where->p)
/* Writer: end */
goto changed;
@@ -622,9 +617,16 @@ static int ext3_splice_branch(handle_t *handle, struct inode *inode, long block,
/* That's it */
*where->p = where->key;
- ei->i_next_alloc_block = block;
- ei->i_next_alloc_goal = le32_to_cpu(where[num-1].key);
- /* Writer: end */
+
+ /*
+ * update the most recently allocated logical & physical block
+ * in i_block_alloc_info, to assist find the proper goal block for next
+ * allocation
+ */
+ if (block_i) {
+ block_i->last_alloc_logical_block = block;
+ block_i->last_alloc_physical_block = le32_to_cpu(where[num-1].key);
+ }
/* We are done with atomic stuff, now do the rest of housekeeping */
@@ -752,6 +754,12 @@ out:
goal = 0;
down(&ei->truncate_sem);
+
+ /* lazy initialize the block allocation info here if necessary */
+ if (S_ISREG(inode->i_mode) && (!ei->i_block_alloc_info)) {
+ ext3_init_block_alloc_info(inode);
+ }
+
if (ext3_find_goal(inode, iblock, chain, partial, &goal) < 0) {
up(&ei->truncate_sem);
goto changed;
@@ -2149,8 +2157,6 @@ void ext3_truncate(struct inode * inode)
if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
return;
- ext3_discard_reservation(inode);
-
/*
* We have to lock the EOF page here, because lock_page() nests
* outside journal_start().
@@ -2275,6 +2281,9 @@ do_indirects:
case EXT3_TIND_BLOCK:
;
}
+
+ ext3_discard_reservation(inode);
+
up(&ei->truncate_sem);
inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
ext3_mark_inode_dirty(handle, inode);
@@ -2494,7 +2503,7 @@ void ext3_read_inode(struct inode * inode)
ei->i_acl = EXT3_ACL_NOT_CACHED;
ei->i_default_acl = EXT3_ACL_NOT_CACHED;
#endif
- ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
+ ei->i_block_alloc_info = NULL;
if (__ext3_get_inode_loc(inode, &iloc, 0))
goto bad_inode;
@@ -2515,8 +2524,6 @@ void ext3_read_inode(struct inode * inode)
inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0;
ei->i_state = 0;
- ei->i_next_alloc_block = 0;
- ei->i_next_alloc_goal = 0;
ei->i_dir_start_lookup = 0;
ei->i_dtime = le32_to_cpu(raw_inode->i_dtime);
/* We now have enough fields to check if the inode was active or not.
@@ -2556,10 +2563,6 @@ void ext3_read_inode(struct inode * inode)
ei->i_disksize = inode->i_size;
inode->i_generation = le32_to_cpu(raw_inode->i_generation);
ei->i_block_group = iloc.block_group;
- ei->i_rsv_window.rsv_start = 0;
- ei->i_rsv_window.rsv_end= 0;
- atomic_set(&ei->i_rsv_window.rsv_goal_size, EXT3_DEFAULT_RESERVE_BLOCKS);
- seqlock_init(&ei->i_rsv_window.rsv_seqlock);
/*
* NOTE! The in-memory inode i_data array is in little-endian order
* even on big-endian machines: we do NOT byteswap the block numbers!
diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c
index f594e54b953869..706d6860838143 100644
--- a/fs/ext3/ioctl.c
+++ b/fs/ext3/ioctl.c
@@ -153,12 +153,15 @@ flags_err:
}
#endif
case EXT3_IOC_GETRSVSZ:
- if (test_opt(inode->i_sb, RESERVATION) && S_ISREG(inode->i_mode)) {
- rsv_window_size = atomic_read(&ei->i_rsv_window.rsv_goal_size);
+ if (test_opt(inode->i_sb, RESERVATION)
+ && S_ISREG(inode->i_mode)
+ && ei->i_block_alloc_info) {
+ rsv_window_size = ei->i_block_alloc_info->rsv_window_node.rsv_goal_size;
return put_user(rsv_window_size, (int __user *)arg);
}
return -ENOTTY;
- case EXT3_IOC_SETRSVSZ:
+ case EXT3_IOC_SETRSVSZ: {
+
if (!test_opt(inode->i_sb, RESERVATION) ||!S_ISREG(inode->i_mode))
return -ENOTTY;
@@ -173,8 +176,22 @@ flags_err:
if (rsv_window_size > EXT3_MAX_RESERVE_BLOCKS)
rsv_window_size = EXT3_MAX_RESERVE_BLOCKS;
- atomic_set(&ei->i_rsv_window.rsv_goal_size, rsv_window_size);
+
+ /*
+ * need to allocate reservation structure for this inode
+ * before set the window size
+ */
+ down(&ei->truncate_sem);
+ if (!ei->i_block_alloc_info)
+ ext3_init_block_alloc_info(inode);
+
+ if (ei->i_block_alloc_info){
+ struct ext3_reserve_window_node *rsv = &ei->i_block_alloc_info->rsv_window_node;
+ rsv->rsv_goal_size = rsv_window_size;
+ }
+ up(&ei->truncate_sem);
return 0;
+ }
case EXT3_IOC_GROUP_EXTEND: {
unsigned long n_blocks_count;
struct super_block *sb = inode->i_sb;
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 34288e100d957f..545b440a2d2fac 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -395,10 +395,8 @@ static void ext3_put_super (struct super_block * sb)
percpu_counter_destroy(&sbi->s_dirs_counter);
brelse(sbi->s_sbh);
#ifdef CONFIG_QUOTA
- for (i = 0; i < MAXQUOTAS; i++) {
- if (sbi->s_qf_names[i])
- kfree(sbi->s_qf_names[i]);
- }
+ for (i = 0; i < MAXQUOTAS; i++)
+ kfree(sbi->s_qf_names[i]);
#endif
/* Debugging code just in case the in-memory inode orphan list
@@ -441,7 +439,7 @@ static struct inode *ext3_alloc_inode(struct super_block *sb)
ei->i_acl = EXT3_ACL_NOT_CACHED;
ei->i_default_acl = EXT3_ACL_NOT_CACHED;
#endif
- ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
+ ei->i_block_alloc_info = NULL;
ei->vfs_inode.i_version = 1;
return &ei->vfs_inode;
}
@@ -485,6 +483,7 @@ static void destroy_inodecache(void)
static void ext3_clear_inode(struct inode *inode)
{
+ struct ext3_block_alloc_info *rsv = EXT3_I(inode)->i_block_alloc_info;
#ifdef CONFIG_EXT3_FS_POSIX_ACL
if (EXT3_I(inode)->i_acl &&
EXT3_I(inode)->i_acl != EXT3_ACL_NOT_CACHED) {
@@ -498,6 +497,8 @@ static void ext3_clear_inode(struct inode *inode)
}
#endif
ext3_discard_reservation(inode);
+ EXT3_I(inode)->i_block_alloc_info = NULL;
+ kfree(rsv);
}
#ifdef CONFIG_QUOTA
@@ -880,10 +881,8 @@ clear_qf_name:
"quota turned on.\n");
return 0;
}
- if (sbi->s_qf_names[qtype]) {
- kfree(sbi->s_qf_names[qtype]);
- sbi->s_qf_names[qtype] = NULL;
- }
+ kfree(sbi->s_qf_names[qtype]);
+ sbi->s_qf_names[qtype] = NULL;
break;
case Opt_jqfmt_vfsold:
sbi->s_jquota_fmt = QFMT_VFS_OLD;
@@ -1506,8 +1505,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
* _much_ simpler. */
sbi->s_rsv_window_head.rsv_start = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
sbi->s_rsv_window_head.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
- atomic_set(&sbi->s_rsv_window_head.rsv_alloc_hit, 0);
- atomic_set(&sbi->s_rsv_window_head.rsv_goal_size, 0);
+ sbi->s_rsv_window_head.rsv_alloc_hit = 0;
+ sbi->s_rsv_window_head.rsv_goal_size = 0;
ext3_rsv_window_add(sb, &sbi->s_rsv_window_head);
/*
diff --git a/include/asm-arm/arch-integrator/lm.h b/include/asm-arm/arch-integrator/lm.h
index d792b112974cda..28186b6f2c0962 100644
--- a/include/asm-arm/arch-integrator/lm.h
+++ b/include/asm-arm/arch-integrator/lm.h
@@ -10,7 +10,7 @@ struct lm_driver {
struct device_driver drv;
int (*probe)(struct lm_device *);
void (*remove)(struct lm_device *);
- int (*suspend)(struct lm_device *, u32);
+ int (*suspend)(struct lm_device *, pm_message_t);
int (*resume)(struct lm_device *);
};
diff --git a/include/asm-arm/arch-pxa/corgi.h b/include/asm-arm/arch-pxa/corgi.h
index 4f69467327d1e2..324db06b5dd4b2 100644
--- a/include/asm-arm/arch-pxa/corgi.h
+++ b/include/asm-arm/arch-pxa/corgi.h
@@ -100,40 +100,6 @@
/*
- * Corgi Parameter Area Definitions
- */
-#define FLASH_MEM_BASE 0xa0000a00
-#define FLASH_MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a )
-
-#define FLASH_COMADJ_MAJIC FLASH_MAGIC_CHG('C','M','A','D')
-#define FLASH_COMADJ_MAGIC_ADR 0x00
-#define FLASH_COMADJ_DATA_ADR 0x04
-
-#define FLASH_PHAD_MAJIC FLASH_MAGIC_CHG('P','H','A','D')
-#define FLASH_PHAD_MAGIC_ADR 0x38
-#define FLASH_PHAD_DATA_ADR 0x3C
-
-struct sharpsl_flash_param_info {
- unsigned int comadj_keyword;
- unsigned int comadj;
-
- unsigned int uuid_keyword;
- unsigned char uuid[16];
-
- unsigned int touch_keyword;
- unsigned int touch1;
- unsigned int touch2;
- unsigned int touch3;
- unsigned int touch4;
-
- unsigned int adadj_keyword;
- unsigned int adadj;
-
- unsigned int phad_keyword;
- unsigned int phadadj;
-};
-
-/*
* Shared data structures
*/
extern struct platform_device corgiscoop_device;
diff --git a/include/asm-arm/arch-pxa/poodle.h b/include/asm-arm/arch-pxa/poodle.h
index 027573d38ee477..58bda9d571a5ae 100644
--- a/include/asm-arm/arch-pxa/poodle.h
+++ b/include/asm-arm/arch-pxa/poodle.h
@@ -67,45 +67,4 @@
#define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT )
#define POODLE_SCOOP_IO_OUT ( 0 )
-/*
- * Flash Memory mappings
- *
- * We have the following mapping:
- * phys virt
- * boot ROM 00000000 ef800000
- */
-#define FLASH_MEM_BASE 0xa0000a00
-#define FLASH_DATA(adr) (*(volatile unsigned int*)(FLASH_MEM_BASE+(adr)))
-#define FLASH_DATA_F(adr) (*(volatile float32 *)(FLASH_MEM_BASE+(adr)))
-#define FLASH_MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a )
-
-/* COMADJ */
-#define FLASH_COMADJ_MAJIC FLASH_MAGIC_CHG('C','M','A','D')
-#define FLASH_COMADJ_MAGIC_ADR 0x00
-#define FLASH_COMADJ_DATA_ADR 0x04
-
-/* UUID */
-#define FLASH_UUID_MAJIC FLASH_MAGIC_CHG('U','U','I','D')
-#define FLASH_UUID_MAGIC_ADR 0x08
-#define FLASH_UUID_DATA_ADR 0x0C
-
-/* TOUCH PANEL */
-#define FLASH_TOUCH_MAJIC FLASH_MAGIC_CHG('T','U','C','H')
-#define FLASH_TOUCH_MAGIC_ADR 0x1C
-#define FLASH_TOUCH_XP_DATA_ADR 0x20
-#define FLASH_TOUCH_YP_DATA_ADR 0x24
-#define FLASH_TOUCH_XD_DATA_ADR 0x28
-#define FLASH_TOUCH_YD_DATA_ADR 0x2C
-
-/* AD */
-#define FLASH_AD_MAJIC FLASH_MAGIC_CHG('B','V','A','D')
-#define FLASH_AD_MAGIC_ADR 0x30
-#define FLASH_AD_DATA_ADR 0x34
-
-/* PHAD */
-#define FLASH_PHAD_MAJIC FLASH_MAGIC_CHG('P','H','A','D')
-#define FLASH_PHAD_MAGIC_ADR 0x38
-#define FLASH_PHAD_DATA_ADR 0x3C
-
-
#endif /* __ASM_ARCH_POODLE_H */
diff --git a/include/asm-arm/arch-sa1100/collie.h b/include/asm-arm/arch-sa1100/collie.h
index 01e60d7c30f687..d49e5ff63ca433 100644
--- a/include/asm-arm/arch-sa1100/collie.h
+++ b/include/asm-arm/arch-sa1100/collie.h
@@ -66,34 +66,6 @@
#define COLLIE_LCM_IRQ_GPIO_nSD_DETECT IRQ_LOCOMO_GPIO13
#define COLLIE_LCM_IRQ_GPIO_nSD_WP IRQ_LOCOMO_GPIO14
-/*
- * Flash Memory mappings
- *
- */
-
-#define FLASH_MEM_BASE 0xe8ffc000
-#define FLASH_DATA(adr) (*(volatile unsigned int*)(FLASH_MEM_BASE+(adr)))
-#define FLASH_DATA_F(adr) (*(volatile float32 *)(FLASH_MEM_BASE+(adr)))
-#define FLASH_MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a )
-
-// COMADJ
-#define FLASH_COMADJ_MAJIC FLASH_MAGIC_CHG('C','M','A','D')
-#define FLASH_COMADJ_MAGIC_ADR 0x00
-#define FLASH_COMADJ_DATA_ADR 0x04
-
-// TOUCH PANEL
-#define FLASH_TOUCH_MAJIC FLASH_MAGIC_CHG('T','U','C','H')
-#define FLASH_TOUCH_MAGIC_ADR 0x1C
-#define FLASH_TOUCH_XP_DATA_ADR 0x20
-#define FLASH_TOUCH_YP_DATA_ADR 0x24
-#define FLASH_TOUCH_XD_DATA_ADR 0x28
-#define FLASH_TOUCH_YD_DATA_ADR 0x2C
-
-// AD
-#define FLASH_AD_MAJIC FLASH_MAGIC_CHG('B','V','A','D')
-#define FLASH_AD_MAGIC_ADR 0x30
-#define FLASH_AD_DATA_ADR 0x34
-
/* GPIO's on the TC35143AF (Toshiba Analog Frontend) */
#define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 /* GPIO0=Version */
#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 /* GPIO1=TBL_CHK */
diff --git a/include/asm-arm/hardware/amba.h b/include/asm-arm/hardware/amba.h
index 0cc74f7f7e0e0e..51e6e54b2aa15a 100644
--- a/include/asm-arm/hardware/amba.h
+++ b/include/asm-arm/hardware/amba.h
@@ -31,7 +31,7 @@ struct amba_driver {
int (*probe)(struct amba_device *, void *);
int (*remove)(struct amba_device *);
void (*shutdown)(struct amba_device *);
- int (*suspend)(struct amba_device *, u32);
+ int (*suspend)(struct amba_device *, pm_message_t);
int (*resume)(struct amba_device *);
struct amba_id *id_table;
};
diff --git a/include/asm-arm/hardware/locomo.h b/include/asm-arm/hardware/locomo.h
index 5f9218c1514296..5f10048ec54e7c 100644
--- a/include/asm-arm/hardware/locomo.h
+++ b/include/asm-arm/hardware/locomo.h
@@ -181,7 +181,7 @@ struct locomo_driver {
unsigned int devid;
int (*probe)(struct locomo_dev *);
int (*remove)(struct locomo_dev *);
- int (*suspend)(struct locomo_dev *, u32);
+ int (*suspend)(struct locomo_dev *, pm_message_t);
int (*resume)(struct locomo_dev *);
};
diff --git a/include/asm-arm/hardware/sa1111.h b/include/asm-arm/hardware/sa1111.h
index 8fd4f528c38df1..319aea064c367e 100644
--- a/include/asm-arm/hardware/sa1111.h
+++ b/include/asm-arm/hardware/sa1111.h
@@ -567,7 +567,7 @@ struct sa1111_driver {
unsigned int devid;
int (*probe)(struct sa1111_dev *);
int (*remove)(struct sa1111_dev *);
- int (*suspend)(struct sa1111_dev *, u32);
+ int (*suspend)(struct sa1111_dev *, pm_message_t);
int (*resume)(struct sa1111_dev *);
};
diff --git a/include/asm-arm/mach/sharpsl_param.h b/include/asm-arm/mach/sharpsl_param.h
new file mode 100644
index 00000000000000..7a24ecf0422000
--- /dev/null
+++ b/include/asm-arm/mach/sharpsl_param.h
@@ -0,0 +1,37 @@
+/*
+ * Hardware parameter area specific to Sharp SL series devices
+ *
+ * Copyright (c) 2005 Richard Purdie
+ *
+ * Based on Sharp's 2.4 kernel patches
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+struct sharpsl_param_info {
+ unsigned int comadj_keyword;
+ unsigned int comadj;
+
+ unsigned int uuid_keyword;
+ unsigned char uuid[16];
+
+ unsigned int touch_keyword;
+ unsigned int touch_xp;
+ unsigned int touch_yp;
+ unsigned int touch_xd;
+ unsigned int touch_yd;
+
+ unsigned int adadj_keyword;
+ unsigned int adadj;
+
+ unsigned int phad_keyword;
+ unsigned int phadadj;
+} __attribute__((packed));
+
+
+extern struct sharpsl_param_info sharpsl_param;
+extern void sharpsl_save_param(void);
+
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h
index 63e5cfc3ee6cbc..98f9e6850cbab4 100644
--- a/include/asm-i386/topology.h
+++ b/include/asm-i386/topology.h
@@ -60,11 +60,12 @@ static inline int node_to_first_cpu(int node)
return first_cpu(mask);
}
-/* Returns the number of the node containing PCI bus 'bus' */
-static inline cpumask_t pcibus_to_cpumask(int bus)
+/* Returns the number of the node containing PCI bus number 'busnr' */
+static inline cpumask_t __pcibus_to_cpumask(int busnr)
{
- return node_to_cpumask(mp_bus_id_to_node[bus]);
+ return node_to_cpumask(mp_bus_id_to_node[busnr]);
}
+#define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus->number)
/* sched_domains SD_NODE_INIT for NUMAQ machines */
#define SD_NODE_INIT (struct sched_domain) { \
diff --git a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h
index d0e56b1bf4511d..1bf480f58493e3 100644
--- a/include/asm-m32r/serial.h
+++ b/include/asm-m32r/serial.h
@@ -1,47 +1,10 @@
#ifndef _ASM_M32R_SERIAL_H
#define _ASM_M32R_SERIAL_H
-/*
- * include/asm-m32r/serial.h
- */
+/* include/asm-m32r/serial.h */
#include <linux/config.h>
-#include <asm/m32r.h>
-/*
- * This assumes you have a 1.8432 MHz clock for your UART.
- *
- * It'd be nice if someone built a serial card with a 24.576 MHz
- * clock, since the 16550A is capable of handling a top speed of 1.5
- * megabits/second; but this requires the faster clock.
- */
-#define BASE_BAUD ( 1843200 / 16 )
-
-/* Standard COM flags */
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
-
-/* Standard PORT definitions */
-#if defined(CONFIG_PLAT_USRV)
-
-#define STD_SERIAL_PORT_DEFNS \
- /* UART CLK PORT IRQ FLAGS */ \
- { 0, BASE_BAUD, 0x3F8, PLD_IRQ_UART0, STD_COM_FLAGS }, /* ttyS0 */ \
- { 0, BASE_BAUD, 0x2F8, PLD_IRQ_UART1, STD_COM_FLAGS }, /* ttyS1 */
-
-#else /* !CONFIG_PLAT_USRV */
-
-#if defined(CONFIG_SERIAL_M32R_PLDSIO)
-#define STD_SERIAL_PORT_DEFNS \
- { 0, BASE_BAUD, ((unsigned long)PLD_ESIO0CR), PLD_IRQ_SIO0_RCV, \
- STD_COM_FLAGS }, /* ttyS0 */
-#else
-#define STD_SERIAL_PORT_DEFNS \
- { 0, BASE_BAUD, M32R_SIO_OFFSET, M32R_IRQ_SIO0_R, \
- STD_COM_FLAGS }, /* ttyS0 */
-#endif
-
-#endif /* !CONFIG_PLAT_USRV */
-
-#define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS
+#define BASE_BAUD 115200
#endif /* _ASM_M32R_SERIAL_H */
diff --git a/include/asm-ppc/prom.h b/include/asm-ppc/prom.h
index 785dbbacba278e..56394c6cf52e3b 100644
--- a/include/asm-ppc/prom.h
+++ b/include/asm-ppc/prom.h
@@ -9,9 +9,10 @@
#define _PPC_PROM_H
#include <linux/config.h>
+#include <linux/types.h>
-typedef void *phandle;
-typedef void *ihandle;
+typedef u32 phandle;
+typedef u32 ihandle;
extern char *prom_display_paths[];
extern unsigned int prom_num_displays;
diff --git a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h
index 8f7e11d18adcae..cc51e5c9acc2eb 100644
--- a/include/asm-ppc/unistd.h
+++ b/include/asm-ppc/unistd.h
@@ -297,6 +297,7 @@
register unsigned long __sc_5 __asm__ ("r5"); \
register unsigned long __sc_6 __asm__ ("r6"); \
register unsigned long __sc_7 __asm__ ("r7"); \
+ register unsigned long __sc_8 __asm__ ("r8"); \
\
__sc_loadargs_##nr(name, args); \
__asm__ __volatile__ \
@@ -305,10 +306,10 @@
: "=&r" (__sc_0), \
"=&r" (__sc_3), "=&r" (__sc_4), \
"=&r" (__sc_5), "=&r" (__sc_6), \
- "=&r" (__sc_7) \
+ "=&r" (__sc_7), "=&r" (__sc_8) \
: __sc_asm_input_##nr \
: "cr0", "ctr", "memory", \
- "r8", "r9", "r10","r11", "r12"); \
+ "r9", "r10","r11", "r12"); \
__sc_ret = __sc_3; \
__sc_err = __sc_0; \
} \
@@ -336,6 +337,9 @@
#define __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5) \
__sc_loadargs_4(name, arg1, arg2, arg3, arg4); \
__sc_7 = (unsigned long) (arg5)
+#define __sc_loadargs_6(name, arg1, arg2, arg3, arg4, arg5, arg6) \
+ __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5); \
+ __sc_8 = (unsigned long) (arg6)
#define __sc_asm_input_0 "0" (__sc_0)
#define __sc_asm_input_1 __sc_asm_input_0, "1" (__sc_3)
@@ -343,6 +347,7 @@
#define __sc_asm_input_3 __sc_asm_input_2, "3" (__sc_5)
#define __sc_asm_input_4 __sc_asm_input_3, "4" (__sc_6)
#define __sc_asm_input_5 __sc_asm_input_4, "5" (__sc_7)
+#define __sc_asm_input_6 __sc_asm_input_5, "6" (__sc_8)
#define _syscall0(type,name) \
type name(void) \
@@ -380,6 +385,12 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
__syscall_nr(5, type, name, arg1, arg2, arg3, arg4, arg5); \
}
+#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \
+type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) \
+{ \
+ __syscall_nr(6, type, name, arg1, arg2, arg3, arg4, arg5, arg6); \
+}
+
#ifdef __KERNEL__
#define __NR__exit __NR_exit
diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h
index 8a79ece01aa505..4c4824653e8094 100644
--- a/include/asm-ppc64/pgtable.h
+++ b/include/asm-ppc64/pgtable.h
@@ -120,6 +120,9 @@
_PAGE_WRENABLE | _PAGE_NO_CACHE | _PAGE_GUARDED)
#define PAGE_KERNEL_EXEC __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_EXEC)
+#define PAGE_AGP __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_NO_CACHE)
+#define HAVE_PAGE_AGP
+
/*
* This bit in a hardware PTE indicates that the page is *not* executable.
*/
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h
index c5fea186bdf282..67f24e0ea819f4 100644
--- a/include/asm-x86_64/topology.h
+++ b/include/asm-x86_64/topology.h
@@ -35,8 +35,7 @@ static inline cpumask_t __pcibus_to_cpumask(int bus)
cpus_and(res, busmask, online);
return res;
}
-/* broken generic file uses #ifndef later on this */
-#define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus)
+#define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus->number)
#ifdef CONFIG_NUMA
/* sched_domains SD_NODE_INIT for x86_64 machines */
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index 4d478d8b2d0697..74ad31781e3ea7 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -725,6 +725,7 @@ extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb,
unsigned int block_group,
struct buffer_head ** bh);
extern int ext3_should_retry_alloc(struct super_block *sb, int *retries);
+extern void ext3_init_block_alloc_info(struct inode *);
extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv);
/* dir.c */
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h
index 5e781aaff40444..2914f7b0715661 100644
--- a/include/linux/ext3_fs_i.h
+++ b/include/linux/ext3_fs_i.h
@@ -27,12 +27,31 @@ struct ext3_reserve_window {
struct ext3_reserve_window_node {
struct rb_node rsv_node;
- atomic_t rsv_goal_size;
- atomic_t rsv_alloc_hit;
- seqlock_t rsv_seqlock;
+ __u32 rsv_goal_size;
+ __u32 rsv_alloc_hit;
struct ext3_reserve_window rsv_window;
};
+struct ext3_block_alloc_info {
+ /* information about reservation window */
+ struct ext3_reserve_window_node rsv_window_node;
+ /*
+ * was i_next_alloc_block in ext3_inode_info
+ * is the logical (file-relative) number of the
+ * most-recently-allocated block in this file.
+ * We use this for detecting linearly ascending allocation requests.
+ */
+ __u32 last_alloc_logical_block;
+ /*
+ * Was i_next_alloc_goal in ext3_inode_info
+ * is the *physical* companion to i_next_alloc_block.
+ * it the the physical block number of the block which was most-recentl
+ * allocated to this file. This give us the goal (target) for the next
+ * allocation when we detect linearly ascending requests.
+ */
+ __u32 last_alloc_physical_block;
+};
+
#define rsv_start rsv_window._rsv_start
#define rsv_end rsv_window._rsv_end
@@ -61,22 +80,8 @@ struct ext3_inode_info {
__u32 i_block_group;
__u32 i_state; /* Dynamic state flags for ext3 */
- /*
- * i_next_alloc_block is the logical (file-relative) number of the
- * most-recently-allocated block in this file. Yes, it is misnamed.
- * We use this for detecting linearly ascending allocation requests.
- */
- __u32 i_next_alloc_block;
-
- /*
- * i_next_alloc_goal is the *physical* companion to i_next_alloc_block.
- * it the the physical block number of the block which was most-recently
- * allocated to this file. This give us the goal (target) for the next
- * allocation when we detect linearly ascending requests.
- */
- __u32 i_next_alloc_goal;
- /* block reservation window */
- struct ext3_reserve_window_node i_rsv_window;
+ /* block reservation info */
+ struct ext3_block_alloc_info *i_block_alloc_info;
__u32 i_dir_start_lookup;
#ifdef CONFIG_EXT3_FS_XATTR
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 58d91a9d533256..9cfc0999becba7 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -756,7 +756,6 @@ typedef struct ide_drive_s {
struct list_head list;
struct device gendev;
struct semaphore gendev_rel_sem; /* to deal with device release() */
- struct gendisk *disk;
} ide_drive_t;
#define IDE_CHIPSET_PCI_MASK \
@@ -1327,7 +1326,7 @@ extern irqreturn_t ide_intr(int irq, void *dev_id, struct pt_regs *regs);
extern void do_ide_request(request_queue_t *);
extern void ide_init_subdrivers(void);
-extern struct block_device_operations ide_fops[];
+void ide_init_disk(struct gendisk *, ide_drive_t *);
extern int ata_attach(ide_drive_t *);
@@ -1442,6 +1441,9 @@ extern int ide_hwif_request_regions(ide_hwif_t *hwif);
extern void ide_hwif_release_regions(ide_hwif_t* hwif);
extern void ide_unregister (unsigned int index);
+void ide_register_region(struct gendisk *);
+void ide_unregister_region(struct gendisk *);
+
void ide_undecoded_slave(ide_hwif_t *);
int probe_hwif_init_with_fixup(ide_hwif_t *, void (*)(ide_hwif_t *));
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 418b928a661739..6a931374d6c497 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -164,6 +164,7 @@ extern unsigned int kobjsize(const void *objp);
#define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */
#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */
+#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */
#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 87da80182983d5..bea13a99e6fb4b 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -561,7 +561,7 @@ struct pci_dev {
int rom_attr_enabled; /* has display of the rom attribute been enabled? */
struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
#ifdef CONFIG_PCI_NAMES
-#define PCI_NAME_SIZE 96
+#define PCI_NAME_SIZE 255
#define PCI_NAME_HALF __stringify(43) /* less than half to handle slop */
char pretty_name[PCI_NAME_SIZE]; /* pretty name for users to see */
#endif
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index a27d42d3e65223..de33f6724867e6 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2122,6 +2122,8 @@
#define PCI_DEVICE_ID_MELLANOX_TAVOR 0x5a44
#define PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT 0x6278
#define PCI_DEVICE_ID_MELLANOX_ARBEL 0x6282
+#define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c
+#define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274
#define PCI_VENDOR_ID_PDC 0x15e9
#define PCI_DEVICE_ID_PDC_1841 0x1841
@@ -2390,7 +2392,7 @@
#define PCI_DEVICE_ID_INTEL_ICH6_18 0x266e
#define PCI_DEVICE_ID_INTEL_ICH6_19 0x266f
#define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8
-#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b1
+#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9
#define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0
#define PCI_DEVICE_ID_INTEL_ICH7_3 0x27c1
#define PCI_DEVICE_ID_INTEL_ICH7_5 0x27c4
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h
index 9a9bea508d1beb..0b95cf031d6e0f 100644
--- a/include/net/gen_stats.h
+++ b/include/net/gen_stats.h
@@ -15,7 +15,8 @@ struct gnet_dump
/* Backward compatability */
int compat_tc_stats;
int compat_xstats;
- struct rtattr * xstats;
+ void * xstats;
+ int xstats_len;
struct tc_stats tc_stats;
};
diff --git a/mm/nommu.c b/mm/nommu.c
index f613db39e84743..b293ec1cc4e668 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -256,29 +256,6 @@ asmlinkage unsigned long sys_brk(unsigned long brk)
return mm->brk = brk;
}
-/*
- * Combine the mmap "prot" and "flags" argument into one "vm_flags" used
- * internally. Essentially, translate the "PROT_xxx" and "MAP_xxx" bits
- * into "VM_xxx".
- */
-static inline unsigned long calc_vm_flags(unsigned long prot, unsigned long flags)
-{
-#define _trans(x,bit1,bit2) \
-((bit1==bit2)?(x&bit1):(x&bit1)?bit2:0)
-
- unsigned long prot_bits, flag_bits;
- prot_bits =
- _trans(prot, PROT_READ, VM_READ) |
- _trans(prot, PROT_WRITE, VM_WRITE) |
- _trans(prot, PROT_EXEC, VM_EXEC);
- flag_bits =
- _trans(flags, MAP_GROWSDOWN, VM_GROWSDOWN) |
- _trans(flags, MAP_DENYWRITE, VM_DENYWRITE) |
- _trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE);
- return prot_bits | flag_bits;
-#undef _trans
-}
-
#ifdef DEBUG
static void show_process_blocks(void)
{
@@ -381,30 +358,33 @@ static void delete_nommu_vma(struct vm_area_struct *vma)
}
/*
- * handle mapping creation for uClinux
+ * determine whether a mapping should be permitted and, if so, what sort of
+ * mapping we're capable of supporting
*/
-unsigned long do_mmap_pgoff(struct file *file,
- unsigned long addr,
- unsigned long len,
- unsigned long prot,
- unsigned long flags,
- unsigned long pgoff)
+static int validate_mmap_request(struct file *file,
+ unsigned long addr,
+ unsigned long len,
+ unsigned long prot,
+ unsigned long flags,
+ unsigned long pgoff,
+ unsigned long *_capabilities)
{
- struct vm_list_struct *vml = NULL;
- struct vm_area_struct *vma = NULL;
- struct rb_node *rb;
- unsigned int vm_flags;
- void *result;
- int ret, membacked;
+ unsigned long capabilities;
unsigned long reqprot = prot;
+ int ret;
/* do the simple checks first */
if (flags & MAP_FIXED || addr) {
- printk(KERN_DEBUG "%d: Can't do fixed-address/overlay mmap of RAM\n",
+ printk(KERN_DEBUG
+ "%d: Can't do fixed-address/overlay mmap of RAM\n",
current->pid);
return -EINVAL;
}
+ if ((flags & MAP_TYPE) != MAP_PRIVATE &&
+ (flags & MAP_TYPE) != MAP_SHARED)
+ return -EINVAL;
+
if (PAGE_ALIGN(len) == 0)
return addr;
@@ -415,35 +395,58 @@ unsigned long do_mmap_pgoff(struct file *file,
if ((pgoff + (len >> PAGE_SHIFT)) < pgoff)
return -EINVAL;
- /* validate file mapping requests */
- membacked = 0;
if (file) {
+ /* validate file mapping requests */
+ struct address_space *mapping;
+
/* files must support mmap */
if (!file->f_op || !file->f_op->mmap)
return -ENODEV;
- if ((prot & PROT_EXEC) &&
- (file->f_vfsmnt->mnt_flags & MNT_NOEXEC))
- return -EPERM;
-
/* work out if what we've got could possibly be shared
* - we support chardevs that provide their own "memory"
* - we support files/blockdevs that are memory backed
*/
- if (S_ISCHR(file->f_dentry->d_inode->i_mode)) {
- membacked = 1;
- }
- else {
- struct address_space *mapping = file->f_mapping;
- if (!mapping)
- mapping = file->f_dentry->d_inode->i_mapping;
- if (mapping && mapping->backing_dev_info)
- membacked = mapping->backing_dev_info->memory_backed;
+ mapping = file->f_mapping;
+ if (!mapping)
+ mapping = file->f_dentry->d_inode->i_mapping;
+
+ capabilities = 0;
+ if (mapping && mapping->backing_dev_info)
+ capabilities = mapping->backing_dev_info->capabilities;
+
+ if (!capabilities) {
+ /* no explicit capabilities set, so assume some
+ * defaults */
+ switch (file->f_dentry->d_inode->i_mode & S_IFMT) {
+ case S_IFREG:
+ case S_IFBLK:
+ capabilities = BDI_CAP_MAP_COPY;
+ break;
+
+ case S_IFCHR:
+ capabilities =
+ BDI_CAP_MAP_DIRECT |
+ BDI_CAP_READ_MAP |
+ BDI_CAP_WRITE_MAP;
+ break;
+
+ default:
+ return -EINVAL;
+ }
}
+ /* eliminate any capabilities that we can't support on this
+ * device */
+ if (!file->f_op->get_unmapped_area)
+ capabilities &= ~BDI_CAP_MAP_DIRECT;
+ if (!file->f_op->read)
+ capabilities &= ~BDI_CAP_MAP_COPY;
+
if (flags & MAP_SHARED) {
/* do checks for writing, appending and locking */
- if ((prot & PROT_WRITE) && !(file->f_mode & FMODE_WRITE))
+ if ((prot & PROT_WRITE) &&
+ !(file->f_mode & FMODE_WRITE))
return -EACCES;
if (IS_APPEND(file->f_dentry->d_inode) &&
@@ -453,64 +456,243 @@ unsigned long do_mmap_pgoff(struct file *file,
if (locks_verify_locked(file->f_dentry->d_inode))
return -EAGAIN;
- if (!membacked) {
+ if (!(capabilities & BDI_CAP_MAP_DIRECT))
+ return -ENODEV;
+
+ if (((prot & PROT_READ) && !(capabilities & BDI_CAP_READ_MAP)) ||
+ ((prot & PROT_WRITE) && !(capabilities & BDI_CAP_WRITE_MAP)) ||
+ ((prot & PROT_EXEC) && !(capabilities & BDI_CAP_EXEC_MAP))
+ ) {
printk("MAP_SHARED not completely supported on !MMU\n");
return -EINVAL;
}
- /* we require greater support from the driver or
- * filesystem - we ask it to tell us what memory to
- * use */
- if (!file->f_op->get_unmapped_area)
- return -ENODEV;
+ /* we mustn't privatise shared mappings */
+ capabilities &= ~BDI_CAP_MAP_COPY;
}
else {
- /* we read private files into memory we allocate */
- if (!file->f_op->read)
+ /* we're going to read the file into private memory we
+ * allocate */
+ if (!(capabilities & BDI_CAP_MAP_COPY))
return -ENODEV;
+
+ /* we don't permit a private writable mapping to be
+ * shared with the backing device */
+ if (prot & PROT_WRITE)
+ capabilities &= ~BDI_CAP_MAP_DIRECT;
+ }
+
+ /* handle executable mappings and implied executable
+ * mappings */
+ if (file->f_vfsmnt->mnt_flags & MNT_NOEXEC) {
+ if (prot & PROT_EXEC)
+ return -EPERM;
+ }
+ else if ((prot & PROT_READ) && !(prot & PROT_EXEC)) {
+ /* handle implication of PROT_EXEC by PROT_READ */
+ if (current->personality & READ_IMPLIES_EXEC) {
+ if (capabilities & BDI_CAP_EXEC_MAP)
+ prot |= PROT_EXEC;
+ }
+ }
+ else if ((prot & PROT_READ) &&
+ (prot & PROT_EXEC) &&
+ !(capabilities & BDI_CAP_EXEC_MAP)
+ ) {
+ /* backing file is not executable, try to copy */
+ capabilities &= ~BDI_CAP_MAP_DIRECT;
}
}
+ else {
+ /* anonymous mappings are always memory backed and can be
+ * privately mapped
+ */
+ capabilities = BDI_CAP_MAP_COPY;
- /* handle PROT_EXEC implication by PROT_READ */
- if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
- if (!(file && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC)))
+ /* handle PROT_EXEC implication by PROT_READ */
+ if ((prot & PROT_READ) &&
+ (current->personality & READ_IMPLIES_EXEC))
prot |= PROT_EXEC;
+ }
- /* do simple checking here so the lower-level routines won't have
- * to. we assume access permissions have been handled by the open
- * of the memory object, so we don't do any here.
- */
- vm_flags = calc_vm_flags(prot,flags) /* | mm->def_flags */
- | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
+ /* allow the security API to have its say */
+ ret = security_file_mmap(file, reqprot, prot, flags);
+ if (ret < 0)
+ return ret;
- if (!membacked) {
- /* share any file segment that's mapped read-only */
- if (((flags & MAP_PRIVATE) && !(prot & PROT_WRITE) && file) ||
- ((flags & MAP_SHARED) && !(prot & PROT_WRITE) && file))
- vm_flags |= VM_MAYSHARE;
+ /* looks okay */
+ *_capabilities = capabilities;
+ return 0;
+}
- /* refuse to let anyone share files with this process if it's being traced -
- * otherwise breakpoints set in it may interfere with another untraced process
- */
- if (current->ptrace & PT_PTRACED)
- vm_flags &= ~(VM_SHARED | VM_MAYSHARE);
+/*
+ * we've determined that we can make the mapping, now translate what we
+ * now know into VMA flags
+ */
+static unsigned long determine_vm_flags(struct file *file,
+ unsigned long prot,
+ unsigned long flags,
+ unsigned long capabilities)
+{
+ unsigned long vm_flags;
+
+ vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags);
+ vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
+ /* vm_flags |= mm->def_flags; */
+
+ if (!(capabilities & BDI_CAP_MAP_DIRECT)) {
+ /* attempt to share read-only copies of mapped file chunks */
+ if (file && !(prot & PROT_WRITE))
+ vm_flags |= VM_MAYSHARE;
}
else {
- /* permit sharing of character devices and ramfs files at any time for
- * anything other than a privately writable mapping
- */
- if (!(flags & MAP_PRIVATE) || !(prot & PROT_WRITE)) {
+ /* overlay a shareable mapping on the backing device or inode
+ * if possible - used for chardevs, ramfs/tmpfs/shmfs and
+ * romfs/cramfs */
+ if (flags & MAP_SHARED)
+ vm_flags |= VM_MAYSHARE | VM_SHARED;
+ else if ((((vm_flags & capabilities) ^ vm_flags) & BDI_CAP_VMFLAGS) == 0)
vm_flags |= VM_MAYSHARE;
- if (flags & MAP_SHARED)
- vm_flags |= VM_SHARED;
+ }
+
+ /* refuse to let anyone share private mappings with this process if
+ * it's being traced - otherwise breakpoints set in it may interfere
+ * with another untraced process
+ */
+ if ((flags & MAP_PRIVATE) && (current->ptrace & PT_PTRACED))
+ vm_flags &= ~VM_MAYSHARE;
+
+ return vm_flags;
+}
+
+/*
+ * set up a shared mapping on a file
+ */
+static int do_mmap_shared_file(struct vm_area_struct *vma, unsigned long len)
+{
+ int ret;
+
+ ret = vma->vm_file->f_op->mmap(vma->vm_file, vma);
+ if (ret != -ENOSYS)
+ return ret;
+
+ /* getting an ENOSYS error indicates that direct mmap isn't
+ * possible (as opposed to tried but failed) so we'll fall
+ * through to making a private copy of the data and mapping
+ * that if we can */
+ return -ENODEV;
+}
+
+/*
+ * set up a private mapping or an anonymous shared mapping
+ */
+static int do_mmap_private(struct vm_area_struct *vma, unsigned long len)
+{
+ void *base;
+ int ret;
+
+ /* invoke the file's mapping function so that it can keep track of
+ * shared mappings on devices or memory
+ * - VM_MAYSHARE will be set if it may attempt to share
+ */
+ if (vma->vm_file) {
+ ret = vma->vm_file->f_op->mmap(vma->vm_file, vma);
+ if (ret != -ENOSYS) {
+ /* shouldn't return success if we're not sharing */
+ BUG_ON(ret == 0 && !(vma->vm_flags & VM_MAYSHARE));
+ return ret; /* success or a real error */
}
+
+ /* getting an ENOSYS error indicates that direct mmap isn't
+ * possible (as opposed to tried but failed) so we'll try to
+ * make a private copy of the data and map that instead */
}
- /* allow the security API to have its say */
- ret = security_file_mmap(file, reqprot, prot, flags);
- if (ret)
+ /* allocate some memory to hold the mapping
+ * - note that this may not return a page-aligned address if the object
+ * we're allocating is smaller than a page
+ */
+ base = kmalloc(len, GFP_KERNEL);
+ if (!base)
+ goto enomem;
+
+ vma->vm_start = (unsigned long) base;
+ vma->vm_end = vma->vm_start + len;
+ vma->vm_flags |= VM_MAPPED_COPY;
+
+#ifdef WARN_ON_SLACK
+ if (len + WARN_ON_SLACK <= kobjsize(result))
+ printk("Allocation of %lu bytes from process %d has %lu bytes of slack\n",
+ len, current->pid, kobjsize(result) - len);
+#endif
+
+ if (vma->vm_file) {
+ /* read the contents of a file into the copy */
+ mm_segment_t old_fs;
+ loff_t fpos;
+
+ fpos = vma->vm_pgoff;
+ fpos <<= PAGE_SHIFT;
+
+ old_fs = get_fs();
+ set_fs(KERNEL_DS);
+ ret = vma->vm_file->f_op->read(vma->vm_file, base, len, &fpos);
+ set_fs(old_fs);
+
+ if (ret < 0)
+ goto error_free;
+
+ /* clear the last little bit */
+ if (ret < len)
+ memset(base + ret, 0, len - ret);
+
+ } else {
+ /* if it's an anonymous mapping, then just clear it */
+ memset(base, 0, len);
+ }
+
+ return 0;
+
+error_free:
+ kfree(base);
+ vma->vm_start = 0;
+ return ret;
+
+enomem:
+ printk("Allocation of length %lu from process %d failed\n",
+ len, current->pid);
+ show_free_areas();
+ return -ENOMEM;
+}
+
+/*
+ * handle mapping creation for uClinux
+ */
+unsigned long do_mmap_pgoff(struct file *file,
+ unsigned long addr,
+ unsigned long len,
+ unsigned long prot,
+ unsigned long flags,
+ unsigned long pgoff)
+{
+ struct vm_list_struct *vml = NULL;
+ struct vm_area_struct *vma = NULL;
+ struct rb_node *rb;
+ unsigned long capabilities, vm_flags;
+ void *result;
+ int ret;
+
+ /* decide whether we should attempt the mapping, and if so what sort of
+ * mapping */
+ ret = validate_mmap_request(file, addr, len, prot, flags, pgoff,
+ &capabilities);
+ if (ret < 0)
return ret;
+ /* we've determined that we can make the mapping, now translate what we
+ * now know into VMA flags */
+ vm_flags = determine_vm_flags(file, prot, flags, capabilities);
+
/* we're going to need to record the mapping if it works */
vml = kmalloc(sizeof(struct vm_list_struct), GFP_KERNEL);
if (!vml)
@@ -519,8 +701,8 @@ unsigned long do_mmap_pgoff(struct file *file,
down_write(&nommu_vma_sem);
- /* if we want to share, we need to search for VMAs created by another
- * mmap() call that overlap with our proposed mapping
+ /* if we want to share, we need to check for VMAs created by other
+ * mmap() calls that overlap with our proposed mapping
* - we can only share with an exact match on most regular files
* - shared mappings on character devices and memory backed files are
* permitted to overlap inexactly as far as we are concerned for in
@@ -544,13 +726,14 @@ unsigned long do_mmap_pgoff(struct file *file,
if (vma->vm_pgoff >= pgoff + pglen)
continue;
- vmpglen = (vma->vm_end - vma->vm_start + PAGE_SIZE - 1) >> PAGE_SHIFT;
+ vmpglen = vma->vm_end - vma->vm_start + PAGE_SIZE - 1;
+ vmpglen >>= PAGE_SHIFT;
if (pgoff >= vma->vm_pgoff + vmpglen)
continue;
- /* handle inexact matches between mappings */
- if (vmpglen != pglen || vma->vm_pgoff != pgoff) {
- if (!membacked)
+ /* handle inexactly overlapping matches between mappings */
+ if (vma->vm_pgoff != pgoff || vmpglen != pglen) {
+ if (!(capabilities & BDI_CAP_MAP_DIRECT))
goto sharing_violation;
continue;
}
@@ -562,21 +745,30 @@ unsigned long do_mmap_pgoff(struct file *file,
result = (void *) vma->vm_start;
goto shared;
}
- }
- vma = NULL;
+ vma = NULL;
- /* obtain the address to map to. we verify (or select) it and ensure
- * that it represents a valid section of the address space
- * - this is the hook for quasi-memory character devices
- */
- if (file && file->f_op->get_unmapped_area) {
- addr = file->f_op->get_unmapped_area(file, addr, len, pgoff, flags);
- if (IS_ERR((void *) addr)) {
- ret = addr;
- if (ret == (unsigned long) -ENOSYS)
+ /* obtain the address at which to make a shared mapping
+ * - this is the hook for quasi-memory character devices to
+ * tell us the location of a shared mapping
+ */
+ if (file && file->f_op->get_unmapped_area) {
+ addr = file->f_op->get_unmapped_area(file, addr, len,
+ pgoff, flags);
+ if (IS_ERR((void *) addr)) {
+ ret = addr;
+ if (ret != (unsigned long) -ENOSYS)
+ goto error;
+
+ /* the driver refused to tell us where to site
+ * the mapping so we'll have to attempt to copy
+ * it */
ret = (unsigned long) -ENODEV;
- goto error;
+ if (!(capabilities & BDI_CAP_MAP_COPY))
+ goto error;
+
+ capabilities &= ~BDI_CAP_MAP_DIRECT;
+ }
}
}
@@ -598,96 +790,18 @@ unsigned long do_mmap_pgoff(struct file *file,
vml->vma = vma;
- /* determine the object being mapped and call the appropriate specific
- * mapper.
- */
- if (file) {
-#ifdef MAGIC_ROM_PTR
- /* First, try simpler routine designed to give us a ROM pointer. */
- if (file->f_op->romptr && !(prot & PROT_WRITE)) {
- ret = file->f_op->romptr(file, vma);
-#ifdef DEBUG
- printk("romptr mmap returned %d (st=%lx)\n",
- ret, vma->vm_start);
-#endif
- result = (void *) vma->vm_start;
- if (!ret)
- goto done;
- else if (ret != -ENOSYS)
- goto error;
- } else
-#endif /* MAGIC_ROM_PTR */
- /* Then try full mmap routine, which might return a RAM
- * pointer, or do something truly complicated
- */
- if (file->f_op->mmap) {
- ret = file->f_op->mmap(file, vma);
-
-#ifdef DEBUG
- printk("f_op->mmap() returned %d (st=%lx)\n",
- ret, vma->vm_start);
-#endif
- result = (void *) vma->vm_start;
- if (!ret)
- goto done;
- else if (ret != -ENOSYS)
- goto error;
- } else {
- ret = -ENODEV; /* No mapping operations defined */
- goto error;
- }
-
- /* An ENOSYS error indicates that mmap isn't possible (as
- * opposed to tried but failed) so we'll fall through to the
- * copy. */
- }
-
- /* allocate some memory to hold the mapping
- * - note that this may not return a page-aligned address if the object
- * we're allocating is smaller than a page
- */
- ret = -ENOMEM;
- result = kmalloc(len, GFP_KERNEL);
- if (!result) {
- printk("Allocation of length %lu from process %d failed\n",
- len, current->pid);
- show_free_areas();
+ /* set up the mapping */
+ if (file && vma->vm_flags & VM_SHARED)
+ ret = do_mmap_shared_file(vma, len);
+ else
+ ret = do_mmap_private(vma, len);
+ if (ret < 0)
goto error;
- }
-
- vma->vm_start = (unsigned long) result;
- vma->vm_end = vma->vm_start + len;
-
-#ifdef WARN_ON_SLACK
- if (len + WARN_ON_SLACK <= kobjsize(result))
- printk("Allocation of %lu bytes from process %d has %lu bytes of slack\n",
- len, current->pid, kobjsize(result) - len);
-#endif
-
- if (file) {
- mm_segment_t old_fs = get_fs();
- loff_t fpos;
- fpos = pgoff;
- fpos <<= PAGE_SHIFT;
-
- set_fs(KERNEL_DS);
- ret = file->f_op->read(file, (char *) result, len, &fpos);
- set_fs(old_fs);
+ /* okay... we have a mapping; now we have to register it */
+ result = (void *) vma->vm_start;
- if (ret < 0)
- goto error2;
- if (ret < len)
- memset(result + ret, 0, len - ret);
- } else {
- memset(result, 0, len);
- }
-
- if (prot & PROT_EXEC)
- flush_icache_range((unsigned long) result, (unsigned long) result + len);
-
- done:
- if (!(vma->vm_flags & VM_SHARED)) {
+ if (vma->vm_flags & VM_MAPPED_COPY) {
realalloc += kobjsize(result);
askedalloc += len;
}
@@ -698,6 +812,7 @@ unsigned long do_mmap_pgoff(struct file *file,
current->mm->total_vm += len >> PAGE_SHIFT;
add_nommu_vma(vma);
+
shared:
realalloc += kobjsize(vml);
askedalloc += sizeof(*vml);
@@ -707,6 +822,10 @@ unsigned long do_mmap_pgoff(struct file *file,
up_write(&nommu_vma_sem);
+ if (prot & PROT_EXEC)
+ flush_icache_range((unsigned long) result,
+ (unsigned long) result + len);
+
#ifdef DEBUG
printk("do_mmap:\n");
show_process_blocks();
@@ -714,8 +833,6 @@ unsigned long do_mmap_pgoff(struct file *file,
return (unsigned long) result;
- error2:
- kfree(result);
error:
up_write(&nommu_vma_sem);
kfree(vml);
@@ -762,7 +879,7 @@ static void put_vma(struct vm_area_struct *vma)
/* IO memory and memory shared directly out of the pagecache from
* ramfs/tmpfs mustn't be released here */
- if (!(vma->vm_flags & (VM_IO | VM_SHARED)) && vma->vm_start) {
+ if (vma->vm_flags & VM_MAPPED_COPY) {
realalloc -= kobjsize((void *) vma->vm_start);
askedalloc -= vma->vm_end - vma->vm_start;
kfree((void *) vma->vm_start);
@@ -785,13 +902,6 @@ int do_munmap(struct mm_struct *mm, unsigned long addr, size_t len)
struct vm_list_struct *vml, **parent;
unsigned long end = addr + len;
-#ifdef MAGIC_ROM_PTR
- /* For efficiency's sake, if the pointer is obviously in ROM,
- don't bother walking the lists to free it */
- if (is_in_rom(addr))
- return 0;
-#endif
-
#ifdef DEBUG
printk("do_munmap:\n");
#endif
diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c
index ebb86fbd23ab65..8f21490355fa5b 100644
--- a/net/core/gen_stats.c
+++ b/net/core/gen_stats.c
@@ -26,9 +26,7 @@
static inline int
gnet_stats_copy(struct gnet_dump *d, int type, void *buf, int size)
{
- if (type)
- RTA_PUT(d->skb, type, size, buf);
-
+ RTA_PUT(d->skb, type, size, buf);
return 0;
rtattr_failure:
@@ -58,6 +56,8 @@ int
gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type,
int xstats_type, spinlock_t *lock, struct gnet_dump *d)
{
+ memset(d, 0, sizeof(*d));
+
spin_lock_bh(lock);
d->lock = lock;
if (type)
@@ -65,12 +65,11 @@ gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type,
d->skb = skb;
d->compat_tc_stats = tc_stats_type;
d->compat_xstats = xstats_type;
- d->xstats = NULL;
- if (d->compat_tc_stats)
- memset(&d->tc_stats, 0, sizeof(d->tc_stats));
+ if (d->tail)
+ return gnet_stats_copy(d, type, NULL, 0);
- return gnet_stats_copy(d, type, NULL, 0);
+ return 0;
}
/**
@@ -111,8 +110,11 @@ gnet_stats_copy_basic(struct gnet_dump *d, struct gnet_stats_basic *b)
d->tc_stats.bytes = b->bytes;
d->tc_stats.packets = b->packets;
}
-
- return gnet_stats_copy(d, TCA_STATS_BASIC, b, sizeof(*b));
+
+ if (d->tail)
+ return gnet_stats_copy(d, TCA_STATS_BASIC, b, sizeof(*b));
+
+ return 0;
}
/**
@@ -134,7 +136,10 @@ gnet_stats_copy_rate_est(struct gnet_dump *d, struct gnet_stats_rate_est *r)
d->tc_stats.pps = r->pps;
}
- return gnet_stats_copy(d, TCA_STATS_RATE_EST, r, sizeof(*r));
+ if (d->tail)
+ return gnet_stats_copy(d, TCA_STATS_RATE_EST, r, sizeof(*r));
+
+ return 0;
}
/**
@@ -157,8 +162,11 @@ gnet_stats_copy_queue(struct gnet_dump *d, struct gnet_stats_queue *q)
d->tc_stats.backlog = q->backlog;
d->tc_stats.overlimits = q->overlimits;
}
-
- return gnet_stats_copy(d, TCA_STATS_QUEUE, q, sizeof(*q));
+
+ if (d->tail)
+ return gnet_stats_copy(d, TCA_STATS_QUEUE, q, sizeof(*q));
+
+ return 0;
}
/**
@@ -177,9 +185,15 @@ gnet_stats_copy_queue(struct gnet_dump *d, struct gnet_stats_queue *q)
int
gnet_stats_copy_app(struct gnet_dump *d, void *st, int len)
{
- if (d->compat_xstats)
- d->xstats = (struct rtattr *) d->skb->tail;
- return gnet_stats_copy(d, TCA_STATS_APP, st, len);
+ if (d->compat_xstats) {
+ d->xstats = st;
+ d->xstats_len = len;
+ }
+
+ if (d->tail)
+ return gnet_stats_copy(d, TCA_STATS_APP, st, len);
+
+ return 0;
}
/**
@@ -206,8 +220,8 @@ gnet_stats_finish_copy(struct gnet_dump *d)
return -1;
if (d->compat_xstats && d->xstats) {
- if (gnet_stats_copy(d, d->compat_xstats, RTA_DATA(d->xstats),
- RTA_PAYLOAD(d->xstats)) < 0)
+ if (gnet_stats_copy(d, d->compat_xstats, d->xstats,
+ d->xstats_len) < 0)
return -1;
}
diff --git a/net/core/sock.c b/net/core/sock.c
index 29e8a34d83edb4..629ab4a5b45b5a 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1352,7 +1352,7 @@ void sk_common_release(struct sock *sk)
EXPORT_SYMBOL(sk_common_release);
-static rwlock_t proto_list_lock;
+static DEFINE_RWLOCK(proto_list_lock);
static LIST_HEAD(proto_list);
int proto_register(struct proto *prot, int alloc_slab)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 88962fa33199fb..5e6cc371b39ea6 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -397,6 +397,8 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
if (a->type == TCA_OLD_COMPAT)
err = gnet_stats_start_copy_compat(skb, 0,
TCA_STATS, TCA_XSTATS, h->stats_lock, &d);
+ else
+ return 0;
} else
err = gnet_stats_start_copy(skb, TCA_ACT_STATS,
h->stats_lock, &d);