CVSROOT: /home/cvs
Module name: linux
Changes by: ralf@ftp.linux-mips.org 05/02/28 15:45:19
Modified files:
. : Makefile
arch/alpha/kernel: setup.c
arch/arm/common: sa1111.c
arch/arm/kernel: debug.S sys_arm.c
arch/arm/mach-integrator: impd1.c time.c
arch/arm/mach-ixp2000: core.c enp2611.c ixdp2x00.c pci.c
arch/arm/mach-ixp4xx: common.c
arch/arm/mach-sa1100: badge4.c shannon.c
arch/arm/mach-shark: irq.c
arch/arm/mm : consistent.c
arch/i386/kernel: mca.c setup.c
arch/m32r : defconfig
arch/m32r/kernel: process.c smp.c
arch/m32r/m32700ut: defconfig.m32700ut.smp defconfig.m32700ut.up
arch/m32r/mappi: defconfig.nommu defconfig.smp defconfig.up
arch/m32r/mappi2: defconfig.vdec2
arch/m32r/oaks32r: defconfig.nommu
arch/m32r/opsput: defconfig.opsput
arch/mips : defconfig
arch/mips/configs: atlas_defconfig capcella_defconfig
cobalt_defconfig db1000_defconfig
db1100_defconfig db1500_defconfig
db1550_defconfig ddb5476_defconfig
ddb5477_defconfig decstation_defconfig
e55_defconfig ev64120_defconfig
ev96100_defconfig ip22_defconfig
ip27_defconfig ip32_defconfig
it8172_defconfig ivr_defconfig
jaguar-atx_defconfig jmr3927_defconfig
lasat200_defconfig malta_defconfig
mpc30x_defconfig ocelot_3_defconfig
ocelot_c_defconfig ocelot_defconfig
ocelot_g_defconfig osprey_defconfig
pb1100_defconfig pb1500_defconfig
pb1550_defconfig rm200_defconfig
sb1250-swarm_defconfig sead_defconfig
tb0226_defconfig tb0229_defconfig
workpad_defconfig yosemite_defconfig
arch/ppc/mm : pgtable.c tlb.c
arch/ppc/syslib: i8259.c
arch/ppc64/mm : hugetlbpage.c
arch/ppc64/xmon: xmon.c
arch/sparc/kernel: auxio.c idprom.c process.c sun4c_irq.c
arch/sparc/mm : io-unit.c iommu.c sun4c.c
arch/sparc/prom: console.c tree.c
arch/sparc64 : Kconfig defconfig
arch/sparc64/kernel: auxio.c sys_sparc32.c
arch/sparc64/lib: U1memcpy.S U3memcpy.S
arch/sparc64/prom: Makefile p1275.c
arch/x86_64/kernel: setup.c
drivers/acpi : Kconfig
drivers/acpi/dispatcher: dswexec.c
drivers/acpi/executer: exoparg6.c exresop.c exstoren.c
exstorob.c
drivers/acpi/namespace: nsxfname.c
drivers/acpi/parser: psopcode.c
drivers/acpi/tables: tbconvrt.c
drivers/block : ub.c
drivers/bluetooth: hci_usb.c
drivers/char : n_tty.c tty_io.c
drivers/char/ipmi: ipmi_msghandler.c
drivers/ide : Kconfig ide-io.c ide.c
drivers/input/mouse: alps.c
drivers/input/serio: ambakmi.c sa1111ps2.c
drivers/isdn/hardware/eicon: xdi_vers.h
drivers/isdn/i4l: isdn_net.h
drivers/md : dm-raid1.c
drivers/mmc : pxamci.c
drivers/net : natsemi.c r8169.c s2io.c tg3.c
drivers/net/ibm_emac: ibm_emac_core.c ibm_emac_core.h
drivers/net/tulip: de2104x.c
drivers/net/wan: dscc4.c
drivers/net/wireless: strip.c
drivers/pci : pci.c
drivers/pcmcia : soc_common.c soc_common.h
drivers/pnp/pnpbios: rsparser.c
drivers/s390/block: dasd_genhd.c
drivers/s390/cio: cmf.c css.c
drivers/scsi : Kconfig Makefile ahci.c ata_piix.c
libata-core.c libata-scsi.c libata.h sata_nv.c
sata_promise.c sata_sil.c sata_sis.c sata_svw.c
sata_sx4.c sata_uli.c sata_via.c sata_vsc.c
drivers/usb/core: hcd.c hub.c
drivers/usb/host: ehci-hcd.c ehci-q.c
drivers/video : au1100fb.c cg3.c
drivers/video/aty: atyfb_base.c radeon_accel.c radeon_base.c
radeon_pm.c
drivers/video/sis: sis_main.c
fs : binfmt_elf.c buffer.c compat_ioctl.c
fs/nfs : file.c
fs/xfs : xfs_vnodeops.c
fs/xfs/linux-2.6: xfs_aops.c xfs_lrw.c xfs_super.c
include/acpi : acconfig.h acinterp.h
include/acpi/platform: aclinux.h
include/asm-arm/hardware: sa1111.h
include/asm-generic: 4level-fixup.h
include/asm-i386: elf.h
include/asm-ia64: elf.h
include/asm-m32r: bitops.h spinlock.h
include/asm-ppc: io.h pgtable.h
include/asm-ppc64: io.h
include/asm-sparc: floppy.h oplib.h
include/asm-sparc64: compat.h uaccess.h
include/asm-x86_64: elf.h
include/linux : agp_backend.h agpgart.h compat.h fb.h fs.h
libata.h socket.h sysctl.h tcp.h
include/net : dst.h tcp.h
kernel : futex.c workqueue.c
mm : filemap.c memory.c mempolicy.c
net/core : dst.c pktgen.c
net/ipv4 : route.c sysctl_net_ipv4.c tcp.c tcp_input.c
tcp_ipv4.c tcp_minisocks.c tcp_output.c
tcp_timer.c
net/ipv6 : route.c tcp_ipv6.c udp.c
net/xfrm : xfrm_policy.c
Added files:
arch/sparc64/prom: cif.S
drivers/scsi : sata_qstor.c
Log message:
Merge with Linux 2.6.11-rc5.
diff -urN linux/Makefile linux/Makefile
--- linux/Makefile 2005/02/13 20:16:13 1.245
+++ linux/Makefile 2005/02/28 15:45:09 1.246
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 11
-EXTRAVERSION =-rc4
+EXTRAVERSION =-rc5
NAME=Woozy Numbat
# *DOCUMENTATION*
diff -urN linux/arch/alpha/kernel/setup.c linux/arch/alpha/kernel/setup.c
--- linux/arch/alpha/kernel/setup.c 2004/06/28 21:04:11 1.51
+++ linux/arch/alpha/kernel/setup.c 2005/02/28 15:45:09 1.52
@@ -213,14 +213,14 @@
reserve_std_resources(void)
{
static struct resource standard_io_resources[] = {
- { "rtc", -1, -1 },
- { "dma1", 0x00, 0x1f },
- { "pic1", 0x20, 0x3f },
- { "timer", 0x40, 0x5f },
- { "keyboard", 0x60, 0x6f },
- { "dma page reg", 0x80, 0x8f },
- { "pic2", 0xa0, 0xbf },
- { "dma2", 0xc0, 0xdf },
+ { .name = "rtc", .start = -1, .end = -1 },
+ { .name = "dma1", .start = 0x00, .end = 0x1f },
+ { .name = "pic1", .start = 0x20, .end = 0x3f },
+ { .name = "timer", .start = 0x40, .end = 0x5f },
+ { .name = "keyboard", .start = 0x60, .end = 0x6f },
+ { .name = "dma page reg", .start = 0x80, .end = 0x8f },
+ { .name = "pic2", .start = 0xa0, .end = 0xbf },
+ { .name = "dma2", .start = 0xc0, .end = 0xdf },
};
struct resource *io = &ioport_resource;
diff -urN linux/arch/arm/common/sa1111.c linux/arch/arm/common/sa1111.c
--- linux/arch/arm/common/sa1111.c 2005/01/13 14:05:17 1.23
+++ linux/arch/arm/common/sa1111.c 2005/02/28 15:45:09 1.24
@@ -53,7 +53,7 @@
unsigned long phys;
int irq;
spinlock_t lock;
- void *base;
+ void __iomem *base;
};
/*
@@ -141,15 +141,16 @@
sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs
*regs)
{
unsigned int stat0, stat1, i;
+ void __iomem *base = desc->data;
- stat0 = sa1111_readl(desc->data + SA1111_INTSTATCLR0);
- stat1 = sa1111_readl(desc->data + SA1111_INTSTATCLR1);
+ stat0 = sa1111_readl(base + SA1111_INTSTATCLR0);
+ stat1 = sa1111_readl(base + SA1111_INTSTATCLR1);
- sa1111_writel(stat0, desc->data + SA1111_INTSTATCLR0);
+ sa1111_writel(stat0, base + SA1111_INTSTATCLR0);
desc->chip->ack(irq);
- sa1111_writel(stat1, desc->data + SA1111_INTSTATCLR1);
+ sa1111_writel(stat1, base + SA1111_INTSTATCLR1);
if (stat0 == 0 && stat1 == 0) {
do_bad_IRQ(irq, desc, regs);
@@ -177,7 +178,7 @@
static void sa1111_mask_lowirq(unsigned int irq)
{
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long ie0;
ie0 = sa1111_readl(mapbase + SA1111_INTEN0);
@@ -187,7 +188,7 @@
static void sa1111_unmask_lowirq(unsigned int irq)
{
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long ie0;
ie0 = sa1111_readl(mapbase + SA1111_INTEN0);
@@ -205,7 +206,7 @@
static int sa1111_retrigger_lowirq(unsigned int irq)
{
unsigned int mask = SA1111_IRQMASK_LO(irq);
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long ip0;
int i;
@@ -226,7 +227,7 @@
static int sa1111_type_lowirq(unsigned int irq, unsigned int flags)
{
unsigned int mask = SA1111_IRQMASK_LO(irq);
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long ip0;
if (flags == IRQT_PROBE)
@@ -249,7 +250,7 @@
static int sa1111_wake_lowirq(unsigned int irq, unsigned int on)
{
unsigned int mask = SA1111_IRQMASK_LO(irq);
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long we0;
we0 = sa1111_readl(mapbase + SA1111_WAKEEN0);
@@ -273,7 +274,7 @@
static void sa1111_mask_highirq(unsigned int irq)
{
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long ie1;
ie1 = sa1111_readl(mapbase + SA1111_INTEN1);
@@ -283,7 +284,7 @@
static void sa1111_unmask_highirq(unsigned int irq)
{
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long ie1;
ie1 = sa1111_readl(mapbase + SA1111_INTEN1);
@@ -301,7 +302,7 @@
static int sa1111_retrigger_highirq(unsigned int irq)
{
unsigned int mask = SA1111_IRQMASK_HI(irq);
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long ip1;
int i;
@@ -322,7 +323,7 @@
static int sa1111_type_highirq(unsigned int irq, unsigned int flags)
{
unsigned int mask = SA1111_IRQMASK_HI(irq);
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long ip1;
if (flags == IRQT_PROBE)
@@ -345,7 +346,7 @@
static int sa1111_wake_highirq(unsigned int irq, unsigned int on)
{
unsigned int mask = SA1111_IRQMASK_HI(irq);
- void *mapbase = get_irq_chipdata(irq);
+ void __iomem *mapbase = get_irq_chipdata(irq);
unsigned long we1;
we1 = sa1111_readl(mapbase + SA1111_WAKEEN1);
@@ -369,7 +370,7 @@
static void sa1111_setup_irq(struct sa1111 *sachip)
{
- void *irqbase = sachip->base + SA1111_INTC;
+ void __iomem *irqbase = sachip->base + SA1111_INTC;
unsigned int irq;
/*
@@ -723,7 +724,7 @@
static void __sa1111_remove(struct sa1111 *sachip)
{
struct list_head *l, *n;
- void *irqbase = sachip->base + SA1111_INTC;
+ void __iomem *irqbase = sachip->base + SA1111_INTC;
list_for_each_safe(l, n, &sachip->dev->children) {
struct device *d = list_to_dev(l);
@@ -805,7 +806,7 @@
struct sa1111_save_data *save;
unsigned long flags;
unsigned int val;
- char *base;
+ void __iomem *base;
if (level != SUSPEND_DISABLE)
return 0;
@@ -866,7 +867,7 @@
struct sa1111 *sachip = dev_get_drvdata(dev);
struct sa1111_save_data *save;
unsigned long flags, id;
- char *base;
+ void __iomem *base;
if (level != RESUME_ENABLE)
return 0;
@@ -1094,7 +1095,7 @@
struct sa1111 *sachip = sa1111_chip_driver(sadev);
unsigned long flags;
unsigned int val;
- void *gpio = sachip->base + SA1111_GPIO;
+ void __iomem *gpio = sachip->base + SA1111_GPIO;
#define MODIFY_BITS(port, mask, dir) \
if (mask) { \
@@ -1120,7 +1121,7 @@
struct sa1111 *sachip = sa1111_chip_driver(sadev);
unsigned long flags;
unsigned int val;
- void *gpio = sachip->base + SA1111_GPIO;
+ void __iomem *gpio = sachip->base + SA1111_GPIO;
spin_lock_irqsave(&sachip->lock, flags);
MODIFY_BITS(gpio + SA1111_GPIO_PADWR, bits & 15, v);
@@ -1134,7 +1135,7 @@
struct sa1111 *sachip = sa1111_chip_driver(sadev);
unsigned long flags;
unsigned int val;
- void *gpio = sachip->base + SA1111_GPIO;
+ void __iomem *gpio = sachip->base + SA1111_GPIO;
spin_lock_irqsave(&sachip->lock, flags);
MODIFY_BITS(gpio + SA1111_GPIO_PASSR, bits & 15, v);
diff -urN linux/arch/arm/kernel/debug.S linux/arch/arm/kernel/debug.S
--- linux/arch/arm/kernel/debug.S 2005/02/07 02:54:30 1.16
+++ linux/arch/arm/kernel/debug.S 2005/02/28 15:45:09 1.17
@@ -1,5 +1,5 @@
/*
- * linux/arch/arm/kernel/debug-armv.S
+ * linux/arch/arm/kernel/debug.S
*
* Copyright (C) 1994-1999 Russell King
*
diff -urN linux/arch/arm/kernel/sys_arm.c linux/arch/arm/kernel/sys_arm.c
--- linux/arch/arm/kernel/sys_arm.c 2005/02/07 02:54:30 1.36
+++ linux/arch/arm/kernel/sys_arm.c 2005/02/28 15:45:09 1.37
@@ -242,8 +242,8 @@
* This is called indirectly via a small wrapper
*/
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
- int *parent_tidptr, int tls_val, int *child_tidptr,
- struct pt_regs *regs)
+ int __user *parent_tidptr, int tls_val,
+ int __user *child_tidptr, struct pt_regs *regs)
{
if (!newsp)
newsp = regs->ARM_sp;
diff -urN linux/arch/arm/mach-integrator/impd1.c
linux/arch/arm/mach-integrator/impd1.c
--- linux/arch/arm/mach-integrator/impd1.c 2005/01/13 14:05:18 1.7
+++ linux/arch/arm/mach-integrator/impd1.c 2005/02/28 15:45:09 1.8
@@ -35,7 +35,7 @@
MODULE_PARM_DESC(lmid, "logic module stack position");
struct impd1_module {
- void *base;
+ void __iomem *base;
struct clk vcos[2];
};
diff -urN linux/arch/arm/mach-integrator/time.c
linux/arch/arm/mach-integrator/time.c
--- linux/arch/arm/mach-integrator/time.c 2005/01/13 14:05:18 1.4
+++ linux/arch/arm/mach-integrator/time.c 2005/02/28 15:45:09 1.5
@@ -32,7 +32,7 @@
#define RTC_CR_MIE (1 << 0)
extern int (*set_rtc)(void);
-static void *rtc_base;
+static void __iomem *rtc_base;
static int integrator_set_rtc(void)
{
@@ -118,7 +118,7 @@
xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
ret = request_irq(dev->irq[0], rtc_interrupt, SA_INTERRUPT,
- "rtc-pl030", rtc_base);
+ "rtc-pl030", dev);
if (ret)
goto map_out;
@@ -130,7 +130,7 @@
return 0;
irq_out:
- free_irq(dev->irq[0], rtc_base);
+ free_irq(dev->irq[0], dev);
map_out:
iounmap(rtc_base);
rtc_base = NULL;
@@ -146,7 +146,7 @@
writel(0, rtc_base + RTC_CR);
- free_irq(dev->irq[0], rtc_base);
+ free_irq(dev->irq[0], dev);
unregister_rtc(&rtc_ops);
iounmap(rtc_base);
diff -urN linux/arch/arm/mach-ixp2000/core.c linux/arch/arm/mach-ixp2000/core.c
--- linux/arch/arm/mach-ixp2000/core.c 2005/01/25 04:27:53 1.6
+++ linux/arch/arm/mach-ixp2000/core.c 2005/02/28 15:45:09 1.7
@@ -160,6 +160,9 @@
iotable_init(ixp2000_small_io_desc, ARRAY_SIZE(ixp2000_small_io_desc));
iotable_init(ixp2000_large_io_desc, ARRAY_SIZE(ixp2000_large_io_desc));
early_serial_setup(&ixp2000_serial_port);
+
+ /* Set slowport to 8-bit mode. */
+ ixp2000_reg_write(IXP2000_SLOWPORT_FRM, 1);
}
/*************************************************************************
diff -urN linux/arch/arm/mach-ixp2000/enp2611.c
linux/arch/arm/mach-ixp2000/enp2611.c
--- linux/arch/arm/mach-ixp2000/enp2611.c 2005/01/13 14:05:18 1.4
+++ linux/arch/arm/mach-ixp2000/enp2611.c 2005/02/28 15:45:09 1.5
@@ -124,20 +124,28 @@
{
int irq;
- if (dev->bus->number == 0x00 && PCI_SLOT(dev->devfn) == 0x01) {
+ if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 0) {
+ /* IXP2400. */
+ irq = IRQ_IXP2000_PCIA;
+ } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 1) {
/* 21555 non-transparent bridge. */
irq = IRQ_IXP2000_PCIB;
- } else if (dev->bus->number == 0x01 && PCI_SLOT(dev->devfn) == 0x00) {
+ } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 4) {
+ /* PCI2050B transparent bridge. */
+ irq = -1;
+ } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 0) {
/* 82559 ethernet. */
irq = IRQ_IXP2000_PCIA;
+ } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 1) {
+ /* SPI-3 option board. */
+ irq = IRQ_IXP2000_PCIB;
} else {
- printk(KERN_INFO "enp2611_pci_map_irq for unknown device\n");
- irq = IRQ_IXP2000_PCI;
+ printk(KERN_ERR "enp2611_pci_map_irq() called for unknown "
+ "device PCI:%d:%d:%d\n", dev->bus->number,
+ PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
+ irq = -1;
}
- printk(KERN_INFO "Assigned IRQ %d to PCI:%d:%d:%d\n", irq,
- dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
-
return irq;
}
@@ -151,7 +159,9 @@
int __init enp2611_pci_init(void)
{
- pci_common_init(&enp2611_pci);
+ if (machine_is_enp2611())
+ pci_common_init(&enp2611_pci);
+
return 0;
}
diff -urN linux/arch/arm/mach-ixp2000/ixdp2x00.c
linux/arch/arm/mach-ixp2000/ixdp2x00.c
--- linux/arch/arm/mach-ixp2000/ixdp2x00.c 2004/12/04 18:15:58 1.3
+++ linux/arch/arm/mach-ixp2000/ixdp2x00.c 2005/02/28 15:45:09 1.4
@@ -91,7 +91,7 @@
unsigned long dummy;
static struct slowport_cfg old_cfg;
-#ifdef CONFGI_ARCH_IXDP2400
+#ifdef CONFIG_ARCH_IXDP2400
if (machine_is_ixdp2400())
ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg);
#endif
diff -urN linux/arch/arm/mach-ixp2000/pci.c linux/arch/arm/mach-ixp2000/pci.c
--- linux/arch/arm/mach-ixp2000/pci.c 2004/12/04 18:15:58 1.2
+++ linux/arch/arm/mach-ixp2000/pci.c 2005/02/28 15:45:09 1.3
@@ -142,10 +142,11 @@
{
volatile u32 temp;
+ unsigned long flags;
pci_master_aborts = 1;
- cli();
+ local_irq_save(flags);
temp = *(IXP2000_PCI_CONTROL);
if (temp & ((1 << 8) | (1 << 5))) {
ixp2000_reg_write(IXP2000_PCI_CONTROL, temp);
@@ -158,7 +159,7 @@
temp = *(IXP2000_PCI_CMDSTAT);
}
}
- sti();
+ local_irq_restore(flags);
/*
* If it was an imprecise abort, then we need to correct the
@@ -174,8 +175,9 @@
clear_master_aborts(void)
{
volatile u32 temp;
+ unsigned long flags;
- cli();
+ local_irq_save(flags);
temp = *(IXP2000_PCI_CONTROL);
if (temp & ((1 << 8) | (1 << 5))) {
ixp2000_reg_write(IXP2000_PCI_CONTROL, temp);
@@ -188,7 +190,7 @@
temp = *(IXP2000_PCI_CMDSTAT);
}
}
- sti();
+ local_irq_restore(flags);
return 0;
}
diff -urN linux/arch/arm/mach-ixp4xx/common.c
linux/arch/arm/mach-ixp4xx/common.c
--- linux/arch/arm/mach-ixp4xx/common.c 2005/01/13 14:05:18 1.7
+++ linux/arch/arm/mach-ixp4xx/common.c 2005/02/28 15:45:09 1.8
@@ -301,7 +301,7 @@
.name = "IOP3xx-I2C",
.id = 0,
.num_resources = 2,
- .resource = &ixp46x_i2c_resources
+ .resource = ixp46x_i2c_resources
};
static struct platform_device *ixp46x_devices[] __initdata = {
diff -urN linux/arch/arm/mach-sa1100/badge4.c
linux/arch/arm/mach-sa1100/badge4.c
--- linux/arch/arm/mach-sa1100/badge4.c 2004/11/15 11:49:15 1.17
+++ linux/arch/arm/mach-sa1100/badge4.c 2005/02/28 15:45:09 1.18
@@ -57,7 +57,7 @@
.name = "sa1111",
.id = 0,
.dev = {
- .dma_mask = &sa1111_dmamask;
+ .dma_mask = &sa1111_dmamask,
.coherent_dma_mask = 0xffffffff,
},
.num_resources = ARRAY_SIZE(sa1111_resources),
@@ -212,8 +212,7 @@
/* maybe turn on 5v0 from the start */
badge4_set_5V(BADGE4_5V_INITIALLY, five_v_on);
- sa11x0_set_flash_data(badge4_flash_data, badge4_flash_resources,
- ARRAY_SIZE(badge4_flash_resources);
+ sa11x0_set_flash_data(&badge4_flash_data, &badge4_flash_resource, 1);
return 0;
}
diff -urN linux/arch/arm/mach-sa1100/shannon.c
linux/arch/arm/mach-sa1100/shannon.c
--- linux/arch/arm/mach-sa1100/shannon.c 2004/11/15 11:49:15 1.6
+++ linux/arch/arm/mach-sa1100/shannon.c 2005/02/28 15:45:09 1.7
@@ -2,15 +2,17 @@
* linux/arch/arm/mach-sa1100/shannon.c
*/
+#include <linux/config.h>
#include <linux/init.h>
+#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/tty.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <asm/hardware.h>
+#include <asm/mach-types.h>
#include <asm/setup.h>
-#include <asm/irq.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
@@ -52,7 +54,7 @@
static void __init shannon_init(void)
{
- sa11x0_set_flash_data(&shannon_flash_data, shannon_flash_resource, 1);
+ sa11x0_set_flash_data(&shannon_flash_data, &shannon_flash_resource, 1);
}
static void __init shannon_map_io(void)
diff -urN linux/arch/arm/mach-shark/irq.c linux/arch/arm/mach-shark/irq.c
--- linux/arch/arm/mach-shark/irq.c 2005/02/13 20:16:14 1.4
+++ linux/arch/arm/mach-shark/irq.c 2005/02/28 15:45:10 1.5
@@ -103,10 +103,7 @@
//request_region(0xA0,0x2,"pic2");
cascade.handler = bogus_int;
- cascade.flags = 0;
cascade.name = "cascade";
- cascade.next = NULL;
- cascade.dev_id = NULL;
setup_irq(2,&cascade);
}
diff -urN linux/arch/arm/mm/consistent.c linux/arch/arm/mm/consistent.c
--- linux/arch/arm/mm/consistent.c 2005/01/25 04:27:54 1.24
+++ linux/arch/arm/mm/consistent.c 2005/02/28 15:45:10 1.25
@@ -284,13 +284,15 @@
spin_unlock_irqrestore(&consistent_lock, flags);
if (c) {
+ unsigned long off = vma->vm_pgoff;
+
kern_size = (c->vm_end - c->vm_start) >> PAGE_SHIFT;
- if (vma->vm_pgoff < kern_size &&
- user_size <= (kern_size - vma->vm_pgoff)) {
+ if (off < kern_size &&
+ user_size <= (kern_size - off)) {
vma->vm_flags |= VM_RESERVED;
ret = remap_pfn_range(vma, vma->vm_start,
- page_to_pfn(c->vm_pages),
+ page_to_pfn(c->vm_pages) + off,
user_size, vma->vm_page_prot);
}
}
diff -urN linux/arch/i386/kernel/mca.c linux/arch/i386/kernel/mca.c
--- linux/arch/i386/kernel/mca.c 2005/01/25 04:27:55 1.28
+++ linux/arch/i386/kernel/mca.c 2005/02/28 15:45:10 1.29
@@ -123,13 +123,13 @@
/*--------------------------------------------------------------------*/
static struct resource mca_standard_resources[] = {
- { "system control port B (MCA)", 0x60, 0x60 },
- { "arbitration (MCA)", 0x90, 0x90 },
- { "card Select Feedback (MCA)", 0x91, 0x91 },
- { "system Control port A (MCA)", 0x92, 0x92 },
- { "system board setup (MCA)", 0x94, 0x94 },
- { "POS (MCA)", 0x96, 0x97 },
- { "POS (MCA)", 0x100, 0x107 }
+ { .start = 0x60, .end = 0x60, .name = "system control port B (MCA)" },
+ { .start = 0x90, .end = 0x90, .name = "arbitration (MCA)" },
+ { .start = 0x91, .end = 0x91, .name = "card Select Feedback (MCA)" },
+ { .start = 0x92, .end = 0x92, .name = "system Control port A (MCA)" },
+ { .start = 0x94, .end = 0x94, .name = "system board setup (MCA)" },
+ { .start = 0x96, .end = 0x97, .name = "POS (MCA)" },
+ { .start = 0x100, .end = 0x107, .name = "POS (MCA)" }
};
#define MCA_STANDARD_RESOURCES (sizeof(mca_standard_resources)/sizeof(struct
resource))
diff -urN linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- linux/arch/i386/kernel/setup.c 2005/02/07 02:54:31 1.107
+++ linux/arch/i386/kernel/setup.c 2005/02/28 15:45:10 1.108
@@ -1166,9 +1166,10 @@
/*
* Request address space for all standard resources
*/
-static void __init register_memory(unsigned long max_low_pfn)
+static void __init register_memory(void)
{
- unsigned long low_mem_size;
+ unsigned long gapstart, gapsize;
+ unsigned long long last;
int i;
if (efi_enabled)
@@ -1183,10 +1184,46 @@
for (i = 0; i < STANDARD_IO_RESOURCES; i++)
request_resource(&ioport_resource, &standard_io_resources[i]);
- /* Tell the PCI layer not to allocate too close to the RAM area.. */
- low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
- if (low_mem_size > pci_mem_start)
- pci_mem_start = low_mem_size;
+ /*
+ * Search for the bigest gap in the low 32 bits of the e820
+ * memory space.
+ */
+ last = 0x100000000ull;
+ gapstart = 0x10000000;
+ gapsize = 0x400000;
+ i = e820.nr_map;
+ while (--i >= 0) {
+ unsigned long long start = e820.map[i].addr;
+ unsigned long long end = start + e820.map[i].size;
+
+ /*
+ * Since "last" is at most 4GB, we know we'll
+ * fit in 32 bits if this condition is true
+ */
+ if (last > end) {
+ unsigned long gap = last - end;
+
+ if (gap > gapsize) {
+ gapsize = gap;
+ gapstart = end;
+ }
+ }
+ if (start < last)
+ last = start;
+ }
+
+ /*
+ * Start allocating dynamic PCI memory a bit into the gap,
+ * aligned up to the nearest megabyte.
+ *
+ * Question: should we try to pad it up a bit (do something
+ * like " + (gapsize >> 3)" in there too?). We now have the
+ * technology.
+ */
+ pci_mem_start = (gapstart + 0xfffff) & ~0xfffff;
+
+ printk("Allocating PCI resources starting at %08lx (gap:
%08lx:%08lx)\n",
+ pci_mem_start, gapstart, gapsize);
}
/* Use inline assembly to define this because the nops are defined
@@ -1432,7 +1469,7 @@
get_smp_config();
#endif
- register_memory(max_low_pfn);
+ register_memory();
#ifdef CONFIG_VT
#if defined(CONFIG_VGA_CONSOLE)
diff -urN linux/arch/m32r/defconfig linux/arch/m32r/defconfig
--- linux/arch/m32r/defconfig 2004/12/04 18:15:59 1.2
+++ linux/arch/m32r/defconfig 2005/02/28 15:45:10 1.3
@@ -1,11 +1,13 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-bk21
-# Fri Nov 12 16:08:49 2004
+# Linux kernel version: 2.6.11-rc4
+# Wed Feb 16 21:10:44 2005
#
CONFIG_M32R=y
-CONFIG_UID16=y
+# CONFIG_UID16 is not set
CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
#
# Code maturity level options
@@ -81,6 +83,7 @@
# CONFIG_DISCONTIGMEM is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PREEMPT=y
# CONFIG_HAVE_DEC_LOCK is not set
# CONFIG_SMP is not set
@@ -96,7 +99,6 @@
#
CONFIG_PCCARD=y
# CONFIG_PCMCIA_DEBUG is not set
-# CONFIG_PCMCIA_OBSOLETE is not set
CONFIG_PCMCIA=y
#
@@ -146,10 +148,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_INITRAMFS_SOURCE=""
@@ -162,6 +166,7 @@
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
@@ -219,12 +224,12 @@
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
#
# SCSI low-level drivers
#
# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
# CONFIG_SCSI_DEBUG is not set
#
@@ -396,6 +401,7 @@
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_LIBPS2 is not set
# CONFIG_SERIO_RAW is not set
#
@@ -450,7 +456,6 @@
#
# Ftape, the floppy tape device driver
#
-# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
@@ -524,6 +529,7 @@
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Sound
@@ -537,11 +543,25 @@
# CONFIG_USB_ARCH_HAS_OHCI is not set
#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed;
see USB_STORAGE Help for more information
+#
+
+#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -558,6 +578,10 @@
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
@@ -628,7 +652,6 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
-# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -697,7 +720,8 @@
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FRAME_POINTER is not set
#
@@ -712,6 +736,10 @@
# CONFIG_CRYPTO is not set
#
+# Hardware crypto devices
+#
+
+#
# Library routines
#
# CONFIG_CRC_CCITT is not set
diff -urN linux/arch/m32r/kernel/process.c linux/arch/m32r/kernel/process.c
--- linux/arch/m32r/kernel/process.c 2004/10/25 20:44:16 1.2
+++ linux/arch/m32r/kernel/process.c 2005/02/28 15:45:10 1.3
@@ -1,6 +1,5 @@
/*
* linux/arch/m32r/kernel/process.c
- * orig : sh
*
* Copyright (c) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata,
* Hitoshi Yamamoto
@@ -290,13 +289,16 @@
}
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
- unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5,
- unsigned long r6, struct pt_regs regs)
+ unsigned long parent_tidptr,
+ unsigned long child_tidptr,
+ unsigned long r4, unsigned long r5, unsigned long r6,
+ struct pt_regs regs)
{
if (!newsp)
newsp = regs.spu;
- return do_fork(clone_flags, newsp, ®s, 0, NULL, NULL);
+ return do_fork(clone_flags, newsp, ®s, 0,
+ (int __user *)parent_tidptr, (int __user *)child_tidptr);
}
/*
@@ -320,9 +322,10 @@
/*
* sys_execve() executes a new program.
*/
-asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
char __user * __user *uenvp,
- unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6,
- struct pt_regs regs)
+asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
+ char __user * __user *uenvp,
+ unsigned long r3, unsigned long r4, unsigned long r5,
+ unsigned long r6, struct pt_regs regs)
{
int error;
char *filename;
@@ -354,4 +357,3 @@
/* M32R_FIXME */
return (0);
}
-
diff -urN linux/arch/m32r/kernel/smp.c linux/arch/m32r/kernel/smp.c
--- linux/arch/m32r/kernel/smp.c 2005/01/25 04:27:58 1.3
+++ linux/arch/m32r/kernel/smp.c 2005/02/28 15:45:10 1.4
@@ -953,7 +953,7 @@
"ldi r4, #1 \n\t"
"st r4, @%2 \n\t"
: "=&r"(ipicr_val)
- : "r"(flags), "r"(&ipilock->lock), "r"(ipicr_addr),
+ : "r"(flags), "r"(&ipilock->slock), "r"(ipicr_addr),
"r"(mask), "r"(try), "r"(my_physid_mask)
: "memory", "r4"
#ifdef CONFIG_CHIP_M32700_TS1
diff -urN linux/arch/m32r/m32700ut/defconfig.m32700ut.smp
linux/arch/m32r/m32700ut/defconfig.m32700ut.smp
--- linux/arch/m32r/m32700ut/defconfig.m32700ut.smp 2004/12/04 18:15:59
1.2
+++ linux/arch/m32r/m32700ut/defconfig.m32700ut.smp 2005/02/28 15:45:10
1.3
@@ -1,11 +1,13 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-bk21
-# Fri Nov 12 16:08:45 2004
+# Linux kernel version: 2.6.11-rc4
+# Wed Feb 16 21:10:50 2005
#
CONFIG_M32R=y
-CONFIG_UID16=y
+# CONFIG_UID16 is not set
CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
#
# Code maturity level options
@@ -81,6 +83,7 @@
# CONFIG_DISCONTIGMEM is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PREEMPT=y
# CONFIG_HAVE_DEC_LOCK is not set
CONFIG_SMP=y
@@ -99,7 +102,6 @@
#
CONFIG_PCCARD=y
# CONFIG_PCMCIA_DEBUG is not set
-# CONFIG_PCMCIA_OBSOLETE is not set
CONFIG_PCMCIA=y
#
@@ -149,10 +151,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_INITRAMFS_SOURCE=""
@@ -165,6 +169,7 @@
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
@@ -222,12 +227,12 @@
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
#
# SCSI low-level drivers
#
# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
# CONFIG_SCSI_DEBUG is not set
#
@@ -399,6 +404,7 @@
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_LIBPS2 is not set
# CONFIG_SERIO_RAW is not set
#
@@ -453,7 +459,6 @@
#
# Ftape, the floppy tape device driver
#
-# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
@@ -527,6 +532,7 @@
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Sound
@@ -540,11 +546,25 @@
# CONFIG_USB_ARCH_HAS_OHCI is not set
#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed;
see USB_STORAGE Help for more information
+#
+
+#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -561,6 +581,10 @@
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
@@ -631,7 +655,6 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
-# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -700,7 +723,8 @@
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FRAME_POINTER is not set
#
@@ -715,6 +739,10 @@
# CONFIG_CRYPTO is not set
#
+# Hardware crypto devices
+#
+
+#
# Library routines
#
# CONFIG_CRC_CCITT is not set
diff -urN linux/arch/m32r/m32700ut/defconfig.m32700ut.up
linux/arch/m32r/m32700ut/defconfig.m32700ut.up
--- linux/arch/m32r/m32700ut/defconfig.m32700ut.up 2004/12/04 18:15:59
1.2
+++ linux/arch/m32r/m32700ut/defconfig.m32700ut.up 2005/02/28 15:45:10
1.3
@@ -1,11 +1,13 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-bk21
-# Fri Nov 12 16:08:49 2004
+# Linux kernel version: 2.6.11-rc4
+# Wed Feb 16 21:10:54 2005
#
CONFIG_M32R=y
-CONFIG_UID16=y
+# CONFIG_UID16 is not set
CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
#
# Code maturity level options
@@ -81,6 +83,7 @@
# CONFIG_DISCONTIGMEM is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PREEMPT=y
# CONFIG_HAVE_DEC_LOCK is not set
# CONFIG_SMP is not set
@@ -96,7 +99,6 @@
#
CONFIG_PCCARD=y
# CONFIG_PCMCIA_DEBUG is not set
-# CONFIG_PCMCIA_OBSOLETE is not set
CONFIG_PCMCIA=y
#
@@ -146,10 +148,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_INITRAMFS_SOURCE=""
@@ -162,6 +166,7 @@
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
@@ -219,12 +224,12 @@
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
#
# SCSI low-level drivers
#
# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
# CONFIG_SCSI_DEBUG is not set
#
@@ -396,6 +401,7 @@
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_LIBPS2 is not set
# CONFIG_SERIO_RAW is not set
#
@@ -450,7 +456,6 @@
#
# Ftape, the floppy tape device driver
#
-# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
@@ -524,6 +529,7 @@
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Sound
@@ -537,11 +543,25 @@
# CONFIG_USB_ARCH_HAS_OHCI is not set
#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed;
see USB_STORAGE Help for more information
+#
+
+#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -558,6 +578,10 @@
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
@@ -628,7 +652,6 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
-# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -697,7 +720,8 @@
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FRAME_POINTER is not set
#
@@ -712,6 +736,10 @@
# CONFIG_CRYPTO is not set
#
+# Hardware crypto devices
+#
+
+#
# Library routines
#
# CONFIG_CRC_CCITT is not set
diff -urN linux/arch/m32r/mappi/defconfig.nommu
linux/arch/m32r/mappi/defconfig.nommu
--- linux/arch/m32r/mappi/defconfig.nommu 2004/12/04 18:15:59 1.2
+++ linux/arch/m32r/mappi/defconfig.nommu 2005/02/28 15:45:10 1.3
@@ -1,11 +1,13 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-bk21
-# Fri Nov 12 16:08:51 2004
+# Linux kernel version: 2.6.11-rc4
+# Wed Feb 16 21:10:57 2005
#
CONFIG_M32R=y
-CONFIG_UID16=y
+# CONFIG_UID16 is not set
CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
#
# Code maturity level options
@@ -34,12 +36,11 @@
# CONFIG_FUTEX is not set
# CONFIG_EPOLL is not set
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
-# CONFIG_TINY_SHMEM is not set
+CONFIG_TINY_SHMEM=y
#
# Loadable module support
@@ -79,6 +80,7 @@
# CONFIG_DISCONTIGMEM is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PREEMPT=y
# CONFIG_HAVE_DEC_LOCK is not set
# CONFIG_SMP is not set
@@ -94,7 +96,6 @@
#
CONFIG_PCCARD=y
# CONFIG_PCMCIA_DEBUG is not set
-# CONFIG_PCMCIA_OBSOLETE is not set
CONFIG_PCMCIA=y
#
@@ -144,10 +145,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_INITRAMFS_SOURCE=""
@@ -160,6 +163,7 @@
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
@@ -329,6 +333,7 @@
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_LIBPS2 is not set
# CONFIG_SERIO_RAW is not set
#
@@ -380,7 +385,6 @@
#
# Ftape, the floppy tape device driver
#
-# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
@@ -430,11 +434,25 @@
# CONFIG_USB_ARCH_HAS_OHCI is not set
#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed;
see USB_STORAGE Help for more information
+#
+
+#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -443,6 +461,10 @@
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
@@ -468,7 +490,6 @@
# Pseudo filesystems
#
CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
CONFIG_DEVFS_FS=y
CONFIG_DEVFS_MOUNT=y
@@ -507,7 +528,6 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
-# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -576,7 +596,8 @@
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FRAME_POINTER is not set
#
@@ -591,6 +612,10 @@
# CONFIG_CRYPTO is not set
#
+# Hardware crypto devices
+#
+
+#
# Library routines
#
# CONFIG_CRC_CCITT is not set
diff -urN linux/arch/m32r/mappi/defconfig.smp
linux/arch/m32r/mappi/defconfig.smp
--- linux/arch/m32r/mappi/defconfig.smp 2004/12/04 18:15:59 1.2
+++ linux/arch/m32r/mappi/defconfig.smp 2005/02/28 15:45:10 1.3
@@ -1,11 +1,13 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-bk21
-# Fri Nov 12 16:08:53 2004
+# Linux kernel version: 2.6.11-rc4
+# Wed Feb 16 21:11:02 2005
#
CONFIG_M32R=y
-CONFIG_UID16=y
+# CONFIG_UID16 is not set
CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
#
# Code maturity level options
@@ -84,6 +86,7 @@
CONFIG_IRAM_SIZE=0x00080000
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PREEMPT=y
# CONFIG_HAVE_DEC_LOCK is not set
CONFIG_SMP=y
@@ -102,7 +105,6 @@
#
CONFIG_PCCARD=y
# CONFIG_PCMCIA_DEBUG is not set
-# CONFIG_PCMCIA_OBSOLETE is not set
CONFIG_PCMCIA=y
#
@@ -140,6 +142,7 @@
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_CONCAT is not set
CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
@@ -185,6 +188,7 @@
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLKMTD is not set
+# CONFIG_MTD_BLOCK2MTD is not set
#
# Disk-On-Chip Device Drivers
@@ -211,10 +215,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
@@ -227,6 +233,7 @@
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
@@ -421,6 +428,7 @@
# CONFIG_SERIO_I8042 is not set
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_LIBPS2 is not set
# CONFIG_SERIO_RAW is not set
#
@@ -472,7 +480,6 @@
#
# Ftape, the floppy tape device driver
#
-# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
@@ -522,11 +529,25 @@
# CONFIG_USB_ARCH_HAS_OHCI is not set
#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed;
see USB_STORAGE Help for more information
+#
+
+#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -535,6 +556,10 @@
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
CONFIG_ROMFS_FS=y
@@ -593,6 +618,7 @@
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
# CONFIG_JFFS2_FS_NAND is not set
+# CONFIG_JFFS2_FS_NOR_ECC is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
@@ -615,7 +641,6 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
-# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -684,7 +709,8 @@
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FRAME_POINTER is not set
#
@@ -699,6 +725,10 @@
# CONFIG_CRYPTO is not set
#
+# Hardware crypto devices
+#
+
+#
# Library routines
#
# CONFIG_CRC_CCITT is not set
diff -urN linux/arch/m32r/mappi/defconfig.up linux/arch/m32r/mappi/defconfig.up
--- linux/arch/m32r/mappi/defconfig.up 2004/12/04 18:15:59 1.2
+++ linux/arch/m32r/mappi/defconfig.up 2005/02/28 15:45:10 1.3
@@ -1,11 +1,13 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-bk21
-# Fri Nov 12 16:08:55 2004
+# Linux kernel version: 2.6.11-rc4
+# Wed Feb 16 21:11:07 2005
#
CONFIG_M32R=y
-CONFIG_UID16=y
+# CONFIG_UID16 is not set
CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
#
# Code maturity level options
@@ -83,6 +85,7 @@
CONFIG_IRAM_SIZE=0x00080000
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PREEMPT=y
# CONFIG_HAVE_DEC_LOCK is not set
# CONFIG_SMP is not set
@@ -98,7 +101,6 @@
#
CONFIG_PCCARD=y
# CONFIG_PCMCIA_DEBUG is not set
-# CONFIG_PCMCIA_OBSOLETE is not set
CONFIG_PCMCIA=y
#
@@ -136,6 +138,7 @@
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_CONCAT is not set
CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
@@ -181,6 +184,7 @@
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLKMTD is not set
+# CONFIG_MTD_BLOCK2MTD is not set
#
# Disk-On-Chip Device Drivers
@@ -207,10 +211,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
@@ -223,6 +229,7 @@
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
@@ -417,6 +424,7 @@
# CONFIG_SERIO_I8042 is not set
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_LIBPS2 is not set
# CONFIG_SERIO_RAW is not set
#
@@ -468,7 +476,6 @@
#
# Ftape, the floppy tape device driver
#
-# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
@@ -518,11 +525,25 @@
# CONFIG_USB_ARCH_HAS_OHCI is not set
#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed;
see USB_STORAGE Help for more information
+#
+
+#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -531,6 +552,10 @@
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
CONFIG_ROMFS_FS=y
@@ -589,6 +614,7 @@
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
# CONFIG_JFFS2_FS_NAND is not set
+# CONFIG_JFFS2_FS_NOR_ECC is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
@@ -611,7 +637,6 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
-# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -680,7 +705,8 @@
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FRAME_POINTER is not set
#
@@ -695,6 +721,10 @@
# CONFIG_CRYPTO is not set
#
+# Hardware crypto devices
+#
+
+#
# Library routines
#
# CONFIG_CRC_CCITT is not set
diff -urN linux/arch/m32r/mappi2/defconfig.vdec2
linux/arch/m32r/mappi2/defconfig.vdec2
--- linux/arch/m32r/mappi2/defconfig.vdec2 2004/12/04 18:15:59 1.1
+++ linux/arch/m32r/mappi2/defconfig.vdec2 2005/02/28 15:45:10 1.2
@@ -1,11 +1,13 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-bk21
-# Fri Nov 12 16:08:58 2004
+# Linux kernel version: 2.6.11-rc4
+# Wed Feb 16 21:11:10 2005
#
CONFIG_M32R=y
-CONFIG_UID16=y
+# CONFIG_UID16 is not set
CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
#
# Code maturity level options
@@ -79,6 +81,7 @@
# CONFIG_DISCONTIGMEM is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PREEMPT=y
# CONFIG_HAVE_DEC_LOCK is not set
# CONFIG_SMP is not set
@@ -94,7 +97,6 @@
#
CONFIG_PCCARD=y
# CONFIG_PCMCIA_DEBUG is not set
-# CONFIG_PCMCIA_OBSOLETE is not set
CONFIG_PCMCIA=y
#
@@ -142,10 +144,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_INITRAMFS_SOURCE=""
@@ -158,6 +162,7 @@
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
@@ -215,12 +220,12 @@
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
#
# SCSI low-level drivers
#
# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
# CONFIG_SCSI_DEBUG is not set
#
@@ -392,6 +397,7 @@
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_LIBPS2 is not set
# CONFIG_SERIO_RAW is not set
#
@@ -445,7 +451,6 @@
#
# Ftape, the floppy tape device driver
#
-# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
@@ -516,11 +521,25 @@
# CONFIG_USB_ARCH_HAS_OHCI is not set
#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed;
see USB_STORAGE Help for more information
+#
+
+#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -537,6 +556,10 @@
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
@@ -607,7 +630,6 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
-# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -676,7 +698,8 @@
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FRAME_POINTER is not set
#
@@ -691,6 +714,10 @@
# CONFIG_CRYPTO is not set
#
+# Hardware crypto devices
+#
+
+#
# Library routines
#
# CONFIG_CRC_CCITT is not set
diff -urN linux/arch/m32r/oaks32r/defconfig.nommu
linux/arch/m32r/oaks32r/defconfig.nommu
--- linux/arch/m32r/oaks32r/defconfig.nommu 2004/12/04 18:15:59 1.2
+++ linux/arch/m32r/oaks32r/defconfig.nommu 2005/02/28 15:45:10 1.3
@@ -1,11 +1,13 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-bk21
-# Fri Nov 12 16:09:00 2004
+# Linux kernel version: 2.6.11-rc4
+# Wed Feb 16 21:11:13 2005
#
CONFIG_M32R=y
-CONFIG_UID16=y
+# CONFIG_UID16 is not set
CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
#
# Code maturity level options
@@ -33,12 +35,11 @@
# CONFIG_FUTEX is not set
# CONFIG_EPOLL is not set
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
-# CONFIG_TINY_SHMEM is not set
+CONFIG_TINY_SHMEM=y
#
# Loadable module support
@@ -74,6 +75,7 @@
# CONFIG_DISCONTIGMEM is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PREEMPT=y
# CONFIG_HAVE_DEC_LOCK is not set
# CONFIG_SMP is not set
@@ -134,10 +136,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_INITRAMFS_SOURCE=""
@@ -150,6 +154,7 @@
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
@@ -314,6 +319,7 @@
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_LIBPS2 is not set
# CONFIG_SERIO_RAW is not set
#
@@ -365,7 +371,6 @@
#
# Ftape, the floppy tape device driver
#
-# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set
@@ -410,11 +415,25 @@
# CONFIG_USB_ARCH_HAS_OHCI is not set
#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed;
see USB_STORAGE Help for more information
+#
+
+#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -423,6 +442,10 @@
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
@@ -448,7 +471,6 @@
# Pseudo filesystems
#
CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS_XATTR=y
@@ -485,7 +507,6 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
-# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -554,7 +575,8 @@
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FRAME_POINTER is not set
#
@@ -569,6 +591,10 @@
# CONFIG_CRYPTO is not set
#
+# Hardware crypto devices
+#
+
+#
# Library routines
#
# CONFIG_CRC_CCITT is not set
diff -urN linux/arch/m32r/opsput/defconfig.opsput
linux/arch/m32r/opsput/defconfig.opsput
--- linux/arch/m32r/opsput/defconfig.opsput 2004/12/04 18:15:59 1.2
+++ linux/arch/m32r/opsput/defconfig.opsput 2005/02/28 15:45:10 1.3
@@ -1,11 +1,13 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc1-bk21
-# Fri Nov 12 16:09:02 2004
+# Linux kernel version: 2.6.11-rc4
+# Wed Feb 16 21:11:41 2005
#
CONFIG_M32R=y
-CONFIG_UID16=y
+# CONFIG_UID16 is not set
CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
#
# Code maturity level options
@@ -80,6 +82,7 @@
# CONFIG_DISCONTIGMEM is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_PREEMPT is not set
# CONFIG_SMP is not set
@@ -94,7 +97,6 @@
#
CONFIG_PCCARD=y
# CONFIG_PCMCIA_DEBUG is not set
-# CONFIG_PCMCIA_OBSOLETE is not set
CONFIG_PCMCIA=y
#
@@ -144,10 +146,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_INITRAMFS_SOURCE=""
@@ -160,6 +164,7 @@
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
+# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
@@ -194,12 +199,12 @@
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
#
# SCSI low-level drivers
#
# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
# CONFIG_SCSI_DEBUG is not set
#
@@ -371,6 +376,7 @@
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_LIBPS2 is not set
# CONFIG_SERIO_RAW is not set
#
@@ -423,7 +429,6 @@
#
# Ftape, the floppy tape device driver
#
-# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
@@ -473,11 +478,25 @@
# CONFIG_USB_ARCH_HAS_OHCI is not set
#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed;
see USB_STORAGE Help for more information
+#
+
+#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
# File systems
#
CONFIG_EXT2_FS=y
@@ -494,6 +513,10 @@
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not set
+
+#
+# XFS support
+#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
@@ -564,7 +587,6 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
-# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -633,15 +655,19 @@
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_IOVIRT is not set
# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_PAGEALLOC is not set
-CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_FS is not set
# CONFIG_FRAME_POINTER is not set
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
#
# Security options
@@ -655,6 +681,10 @@
# CONFIG_CRYPTO is not set
#
+# Hardware crypto devices
+#
+
+#
# Library routines
#
# CONFIG_CRC_CCITT is not set
diff -urN linux/arch/mips/defconfig linux/arch/mips/defconfig
--- linux/arch/mips/defconfig 2005/02/13 20:16:17 1.283
+++ linux/arch/mips/defconfig 2005/02/28 15:45:10 1.284
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:08 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:35 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/atlas_defconfig
linux/arch/mips/configs/atlas_defconfig
--- linux/arch/mips/configs/atlas_defconfig 2005/02/13 20:16:17 1.47
+++ linux/arch/mips/configs/atlas_defconfig 2005/02/28 15:45:10 1.48
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:08 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:36 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/capcella_defconfig
linux/arch/mips/configs/capcella_defconfig
--- linux/arch/mips/configs/capcella_defconfig 2005/02/13 20:16:17 1.47
+++ linux/arch/mips/configs/capcella_defconfig 2005/02/28 15:45:10 1.48
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:09 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:37 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/cobalt_defconfig
linux/arch/mips/configs/cobalt_defconfig
--- linux/arch/mips/configs/cobalt_defconfig 2005/02/13 20:16:17 1.44
+++ linux/arch/mips/configs/cobalt_defconfig 2005/02/28 15:45:10 1.45
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:09 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:37 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/db1000_defconfig
linux/arch/mips/configs/db1000_defconfig
--- linux/arch/mips/configs/db1000_defconfig 2005/02/27 22:03:20 1.50
+++ linux/arch/mips/configs/db1000_defconfig 2005/02/28 15:45:10 1.51
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 27 14:10:14 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:38 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/db1100_defconfig
linux/arch/mips/configs/db1100_defconfig
--- linux/arch/mips/configs/db1100_defconfig 2005/02/27 22:03:20 1.48
+++ linux/arch/mips/configs/db1100_defconfig 2005/02/28 15:45:10 1.49
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 27 14:10:59 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:39 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/db1500_defconfig
linux/arch/mips/configs/db1500_defconfig
--- linux/arch/mips/configs/db1500_defconfig 2005/02/27 22:03:20 1.52
+++ linux/arch/mips/configs/db1500_defconfig 2005/02/28 15:45:10 1.53
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 27 14:11:31 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:39 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/db1550_defconfig
linux/arch/mips/configs/db1550_defconfig
--- linux/arch/mips/configs/db1550_defconfig 2005/02/27 22:03:20 1.27
+++ linux/arch/mips/configs/db1550_defconfig 2005/02/28 15:45:10 1.28
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 27 14:11:54 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:41 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ddb5476_defconfig
linux/arch/mips/configs/ddb5476_defconfig
--- linux/arch/mips/configs/ddb5476_defconfig 2005/02/13 20:16:17 1.44
+++ linux/arch/mips/configs/ddb5476_defconfig 2005/02/28 15:45:10 1.45
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:11 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:41 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ddb5477_defconfig
linux/arch/mips/configs/ddb5477_defconfig
--- linux/arch/mips/configs/ddb5477_defconfig 2005/02/13 20:16:17 1.44
+++ linux/arch/mips/configs/ddb5477_defconfig 2005/02/28 15:45:10 1.45
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:11 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:41 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/decstation_defconfig
linux/arch/mips/configs/decstation_defconfig
--- linux/arch/mips/configs/decstation_defconfig 2005/02/13 20:16:17
1.45
+++ linux/arch/mips/configs/decstation_defconfig 2005/02/28 15:45:10
1.46
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:11 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:42 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/e55_defconfig
linux/arch/mips/configs/e55_defconfig
--- linux/arch/mips/configs/e55_defconfig 2005/02/13 20:16:17 1.46
+++ linux/arch/mips/configs/e55_defconfig 2005/02/28 15:45:10 1.47
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:12 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:43 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ev64120_defconfig
linux/arch/mips/configs/ev64120_defconfig
--- linux/arch/mips/configs/ev64120_defconfig 2005/02/13 20:16:17 1.43
+++ linux/arch/mips/configs/ev64120_defconfig 2005/02/28 15:45:10 1.44
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:12 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:43 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ev96100_defconfig
linux/arch/mips/configs/ev96100_defconfig
--- linux/arch/mips/configs/ev96100_defconfig 2005/02/13 20:16:17 1.44
+++ linux/arch/mips/configs/ev96100_defconfig 2005/02/28 15:45:10 1.45
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:12 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:44 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ip22_defconfig
linux/arch/mips/configs/ip22_defconfig
--- linux/arch/mips/configs/ip22_defconfig 2005/02/13 20:16:17 1.53
+++ linux/arch/mips/configs/ip22_defconfig 2005/02/28 15:45:10 1.54
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:12 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:44 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ip27_defconfig
linux/arch/mips/configs/ip27_defconfig
--- linux/arch/mips/configs/ip27_defconfig 2005/02/13 20:16:17 1.57
+++ linux/arch/mips/configs/ip27_defconfig 2005/02/28 15:45:10 1.58
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:13 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:45 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ip32_defconfig
linux/arch/mips/configs/ip32_defconfig
--- linux/arch/mips/configs/ip32_defconfig 2005/02/13 20:16:17 1.47
+++ linux/arch/mips/configs/ip32_defconfig 2005/02/28 15:45:10 1.48
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:13 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:46 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/it8172_defconfig
linux/arch/mips/configs/it8172_defconfig
--- linux/arch/mips/configs/it8172_defconfig 2005/02/13 20:16:17 1.43
+++ linux/arch/mips/configs/it8172_defconfig 2005/02/28 15:45:10 1.44
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:13 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:47 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ivr_defconfig
linux/arch/mips/configs/ivr_defconfig
--- linux/arch/mips/configs/ivr_defconfig 2005/02/13 20:16:17 1.43
+++ linux/arch/mips/configs/ivr_defconfig 2005/02/28 15:45:11 1.44
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:14 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:47 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/jaguar-atx_defconfig
linux/arch/mips/configs/jaguar-atx_defconfig
--- linux/arch/mips/configs/jaguar-atx_defconfig 2005/02/13 20:16:17
1.48
+++ linux/arch/mips/configs/jaguar-atx_defconfig 2005/02/28 15:45:11
1.49
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:14 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:48 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/jmr3927_defconfig
linux/arch/mips/configs/jmr3927_defconfig
--- linux/arch/mips/configs/jmr3927_defconfig 2005/02/13 20:16:17 1.43
+++ linux/arch/mips/configs/jmr3927_defconfig 2005/02/28 15:45:11 1.44
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:14 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:48 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/lasat200_defconfig
linux/arch/mips/configs/lasat200_defconfig
--- linux/arch/mips/configs/lasat200_defconfig 2005/02/13 20:16:17 1.44
+++ linux/arch/mips/configs/lasat200_defconfig 2005/02/28 15:45:11 1.45
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:15 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:49 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/malta_defconfig
linux/arch/mips/configs/malta_defconfig
--- linux/arch/mips/configs/malta_defconfig 2005/02/13 20:16:17 1.46
+++ linux/arch/mips/configs/malta_defconfig 2005/02/28 15:45:11 1.47
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:15 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:50 2005
#
CONFIG_MIPS=y
@@ -154,8 +154,6 @@
# CONFIG_PAGE_SIZE_8KB is not set
# CONFIG_PAGE_SIZE_16KB is not set
# CONFIG_PAGE_SIZE_64KB is not set
-CONFIG_BOARD_SCACHE=y
-CONFIG_RM7000_CPU_SCACHE=y
CONFIG_CPU_HAS_PREFETCH=y
# CONFIG_64BIT_PHYS_ADDR is not set
# CONFIG_CPU_ADVANCED is not set
diff -urN linux/arch/mips/configs/mpc30x_defconfig
linux/arch/mips/configs/mpc30x_defconfig
--- linux/arch/mips/configs/mpc30x_defconfig 2005/02/13 20:16:17 1.48
+++ linux/arch/mips/configs/mpc30x_defconfig 2005/02/28 15:45:11 1.49
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:15 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:50 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ocelot_3_defconfig
linux/arch/mips/configs/ocelot_3_defconfig
--- linux/arch/mips/configs/ocelot_3_defconfig 2005/02/13 20:16:17 1.16
+++ linux/arch/mips/configs/ocelot_3_defconfig 2005/02/28 15:45:11 1.17
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:16 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:52 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ocelot_c_defconfig
linux/arch/mips/configs/ocelot_c_defconfig
--- linux/arch/mips/configs/ocelot_c_defconfig 2005/02/13 20:16:17 1.42
+++ linux/arch/mips/configs/ocelot_c_defconfig 2005/02/28 15:45:11 1.43
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:16 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:52 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ocelot_defconfig
linux/arch/mips/configs/ocelot_defconfig
--- linux/arch/mips/configs/ocelot_defconfig 2005/02/13 20:16:17 1.44
+++ linux/arch/mips/configs/ocelot_defconfig 2005/02/28 15:45:11 1.45
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:16 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:53 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/ocelot_g_defconfig
linux/arch/mips/configs/ocelot_g_defconfig
--- linux/arch/mips/configs/ocelot_g_defconfig 2005/02/13 20:16:17 1.37
+++ linux/arch/mips/configs/ocelot_g_defconfig 2005/02/28 15:45:11 1.38
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:16 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:53 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/osprey_defconfig
linux/arch/mips/configs/osprey_defconfig
--- linux/arch/mips/configs/osprey_defconfig 2005/02/13 20:16:17 1.43
+++ linux/arch/mips/configs/osprey_defconfig 2005/02/28 15:45:11 1.44
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:17 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:54 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/pb1100_defconfig
linux/arch/mips/configs/pb1100_defconfig
--- linux/arch/mips/configs/pb1100_defconfig 2005/02/27 22:03:20 1.46
+++ linux/arch/mips/configs/pb1100_defconfig 2005/02/28 15:45:11 1.47
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 27 14:06:11 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:55 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/pb1500_defconfig
linux/arch/mips/configs/pb1500_defconfig
--- linux/arch/mips/configs/pb1500_defconfig 2005/02/27 22:03:20 1.52
+++ linux/arch/mips/configs/pb1500_defconfig 2005/02/28 15:45:11 1.53
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 27 14:07:51 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:55 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/pb1550_defconfig
linux/arch/mips/configs/pb1550_defconfig
--- linux/arch/mips/configs/pb1550_defconfig 2005/02/27 22:03:20 1.42
+++ linux/arch/mips/configs/pb1550_defconfig 2005/02/28 15:45:11 1.43
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 27 14:09:25 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:56 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/rm200_defconfig
linux/arch/mips/configs/rm200_defconfig
--- linux/arch/mips/configs/rm200_defconfig 2005/02/13 20:16:17 1.53
+++ linux/arch/mips/configs/rm200_defconfig 2005/02/28 15:45:11 1.54
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:18 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:57 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/sb1250-swarm_defconfig
linux/arch/mips/configs/sb1250-swarm_defconfig
--- linux/arch/mips/configs/sb1250-swarm_defconfig 2005/02/13 20:16:17
1.50
+++ linux/arch/mips/configs/sb1250-swarm_defconfig 2005/02/28 15:45:11
1.51
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:18 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:58 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/sead_defconfig
linux/arch/mips/configs/sead_defconfig
--- linux/arch/mips/configs/sead_defconfig 2005/02/13 20:16:17 1.42
+++ linux/arch/mips/configs/sead_defconfig 2005/02/28 15:45:11 1.43
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:19 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:58 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/tb0226_defconfig
linux/arch/mips/configs/tb0226_defconfig
--- linux/arch/mips/configs/tb0226_defconfig 2005/02/13 20:16:17 1.46
+++ linux/arch/mips/configs/tb0226_defconfig 2005/02/28 15:45:11 1.47
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:19 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:59 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/tb0229_defconfig
linux/arch/mips/configs/tb0229_defconfig
--- linux/arch/mips/configs/tb0229_defconfig 2005/02/13 20:16:17 1.49
+++ linux/arch/mips/configs/tb0229_defconfig 2005/02/28 15:45:11 1.50
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:19 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:06:59 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/workpad_defconfig
linux/arch/mips/configs/workpad_defconfig
--- linux/arch/mips/configs/workpad_defconfig 2005/02/13 20:16:17 1.46
+++ linux/arch/mips/configs/workpad_defconfig 2005/02/28 15:45:11 1.47
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:19 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:07:00 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/mips/configs/yosemite_defconfig
linux/arch/mips/configs/yosemite_defconfig
--- linux/arch/mips/configs/yosemite_defconfig 2005/02/13 20:16:17 1.48
+++ linux/arch/mips/configs/yosemite_defconfig 2005/02/28 15:45:11 1.49
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc4
-# Sun Feb 13 19:46:20 2005
+# Linux kernel version: 2.6.11-rc5
+# Mon Feb 28 15:07:00 2005
#
CONFIG_MIPS=y
diff -urN linux/arch/ppc/mm/pgtable.c linux/arch/ppc/mm/pgtable.c
--- linux/arch/ppc/mm/pgtable.c 2005/01/13 14:05:32 1.23
+++ linux/arch/ppc/mm/pgtable.c 2005/02/28 15:45:11 1.24
@@ -107,8 +107,11 @@
ptepage->mapping = (void *) mm;
ptepage->index = address & PMD_MASK;
}
- } else
+ } else {
pte = (pte_t *)early_get_page();
+ if (pte)
+ clear_page(pte);
+ }
return pte;
}
diff -urN linux/arch/ppc/mm/tlb.c linux/arch/ppc/mm/tlb.c
--- linux/arch/ppc/mm/tlb.c 2004/06/09 14:12:05 1.11
+++ linux/arch/ppc/mm/tlb.c 2005/02/28 15:45:11 1.12
@@ -62,7 +62,7 @@
ptepage = virt_to_page(ptep);
mm = (struct mm_struct *) ptepage->mapping;
ptephys = __pa(ptep) & PAGE_MASK;
- addr = ptepage->index + (((unsigned long)ptep & ~PAGE_MASK) << 9);
+ addr = ptepage->index + (((unsigned long)ptep & ~PAGE_MASK) << 10);
flush_hash_pages(mm->context, addr, ptephys, 1);
}
diff -urN linux/arch/ppc/syslib/i8259.c linux/arch/ppc/syslib/i8259.c
--- linux/arch/ppc/syslib/i8259.c 2005/01/25 04:28:03 1.5
+++ linux/arch/ppc/syslib/i8259.c 2005/02/28 15:45:11 1.6
@@ -140,15 +140,24 @@
};
static struct resource pic1_iores = {
- "8259 (master)", 0x20, 0x21, IORESOURCE_BUSY
+ .name = "8259 (master)",
+ .start = 0x20,
+ .end = 0x21,
+ .flags = IORESOURCE_BUSY,
};
static struct resource pic2_iores = {
- "8259 (slave)", 0xa0, 0xa1, IORESOURCE_BUSY
+ .name = "8259 (slave)",
+ .start = 0xa0,
+ .end = 0xa1,
+ .flags = IORESOURCE_BUSY,
};
static struct resource pic_edgectrl_iores = {
- "8259 edge control", 0x4d0, 0x4d1, IORESOURCE_BUSY
+ .name = "8259 edge control",
+ .start = 0x4d0,
+ .end = 0x4d1,
+ .flags = IORESOURCE_BUSY,
};
static struct irqaction i8259_irqaction = {
diff -urN linux/arch/ppc64/mm/hugetlbpage.c linux/arch/ppc64/mm/hugetlbpage.c
--- linux/arch/ppc64/mm/hugetlbpage.c 2005/01/13 14:05:36 1.16
+++ linux/arch/ppc64/mm/hugetlbpage.c 2005/02/28 15:45:11 1.17
@@ -264,6 +264,10 @@
return -EBUSY;
mm->context.htlb_segs |= newsegs;
+
+ /* update the paca copy of the context struct */
+ get_paca()->context = mm->context;
+
/* the context change must make it to memory before the flush,
* so that further SLB misses do the right thing. */
mb();
diff -urN linux/arch/ppc64/xmon/xmon.c linux/arch/ppc64/xmon/xmon.c
--- linux/arch/ppc64/xmon/xmon.c 2005/02/07 02:54:37 1.29
+++ linux/arch/ppc64/xmon/xmon.c 2005/02/28 15:45:12 1.30
@@ -628,11 +628,13 @@
(data address breakpoint register) directly. */
static void set_controlled_dabr(unsigned long val)
{
+#ifdef CONFIG_PPC_PSERIES
if (systemcfg->platform == PLATFORM_PSERIES_LPAR) {
int rc = plpar_hcall_norets(H_SET_DABR, val);
if (rc != H_Success)
xmon_printf("Warning: setting DABR failed (%d)\n", rc);
} else
+#endif
set_dabr(val);
}
diff -urN linux/arch/sparc/kernel/auxio.c linux/arch/sparc/kernel/auxio.c
--- linux/arch/sparc/kernel/auxio.c 2005/01/25 04:28:05 1.8
+++ linux/arch/sparc/kernel/auxio.c 2005/02/28 15:45:12 1.9
@@ -53,7 +53,8 @@
#endif
}
}
- prom_getproperty(auxio_nd, "reg", (char *) auxregs, sizeof(auxregs));
+ if(prom_getproperty(auxio_nd, "reg", (char *) auxregs, sizeof(auxregs))
<= 0)
+ return;
prom_apply_obio_ranges(auxregs, 0x1);
/* Map the register both read and write */
r.flags = auxregs[0].which_io & 0xF;
@@ -121,7 +122,8 @@
return;
/* Map the power control register. */
- prom_getproperty(node, "reg", (char *)®s, sizeof(regs));
+ if (prom_getproperty(node, "reg", (char *)®s, sizeof(regs)) <= 0)
+ return;
prom_apply_obio_ranges(®s, 1);
memset(&r, 0, sizeof(r));
r.flags = regs.which_io & 0xF;
diff -urN linux/arch/sparc/kernel/idprom.c linux/arch/sparc/kernel/idprom.c
--- linux/arch/sparc/kernel/idprom.c 1999/10/09 00:01:04 1.4
+++ linux/arch/sparc/kernel/idprom.c 2005/02/28 15:45:12 1.5
@@ -53,13 +53,12 @@
for (i = 0; i < NUM_SUN_MACHINES; i++) {
if(Sun_Machines[i].id_machtype == machtype) {
- if (machtype != (SM_SUN4M_OBP | 0x00))
+ if (machtype != (SM_SUN4M_OBP | 0x00) ||
+ prom_getproperty(prom_root_node, "banner-name",
+ sysname, sizeof(sysname)) <= 0)
printk("TYPE: %s\n", Sun_Machines[i].name);
- else {
- prom_getproperty(prom_root_node, "banner-name",
- sysname, sizeof(sysname));
+ else
printk("TYPE: %s\n", sysname);
- }
return;
}
}
diff -urN linux/arch/sparc/kernel/process.c linux/arch/sparc/kernel/process.c
--- linux/arch/sparc/kernel/process.c 2005/02/07 02:54:38 1.62
+++ linux/arch/sparc/kernel/process.c 2005/02/28 15:45:12 1.63
@@ -549,6 +549,11 @@
}
}
+#ifdef CONFIG_SMP
+ /* FPU must be disabled on SMP. */
+ childregs->psr &= ~PSR_EF;
+#endif
+
/* Set the return value for the child. */
childregs->u_regs[UREG_I0] = current->pid;
childregs->u_regs[UREG_I1] = 1;
diff -urN linux/arch/sparc/kernel/sun4c_irq.c
linux/arch/sparc/kernel/sun4c_irq.c
--- linux/arch/sparc/kernel/sun4c_irq.c 2004/07/20 20:21:17 1.16
+++ linux/arch/sparc/kernel/sun4c_irq.c 2005/02/28 15:45:12 1.17
@@ -217,13 +217,18 @@
panic("Cannot find /interrupt-enable node");
/* Depending on the "address" property is bad news... */
- prom_getproperty(ie_node, "reg", (char *) int_regs,
sizeof(int_regs));
- memset(&phyres, 0, sizeof(struct resource));
- phyres.flags = int_regs[0].which_io;
- phyres.start = int_regs[0].phys_addr;
- interrupt_enable = (char *) sbus_ioremap(&phyres, 0,
- int_regs[0].reg_size, "sun4c_intr");
+ interrupt_enable = NULL;
+ if (prom_getproperty(ie_node, "reg", (char *) int_regs,
+ sizeof(int_regs)) != -1) {
+ memset(&phyres, 0, sizeof(struct resource));
+ phyres.flags = int_regs[0].which_io;
+ phyres.start = int_regs[0].phys_addr;
+ interrupt_enable = (char *) sbus_ioremap(&phyres, 0,
+ int_regs[0].reg_size, "sun4c_intr");
+ }
}
+ if (!interrupt_enable)
+ panic("Cannot map interrupt_enable");
BTFIXUPSET_CALL(sbint_to_irq, sun4c_sbint_to_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(enable_irq, sun4c_enable_irq, BTFIXUPCALL_NORM);
diff -urN linux/arch/sparc/mm/io-unit.c linux/arch/sparc/mm/io-unit.c
--- linux/arch/sparc/mm/io-unit.c 2005/01/13 14:05:38 1.19
+++ linux/arch/sparc/mm/io-unit.c 2005/02/28 15:45:12 1.20
@@ -52,13 +52,15 @@
iounit->rotor[1] = IOUNIT_BMAP2_START;
iounit->rotor[2] = IOUNIT_BMAPM_START;
- prom_getproperty(sbi_node, "reg", (void *) iommu_promregs,
- sizeof(iommu_promregs));
- prom_apply_generic_ranges(io_node, 0, iommu_promregs, 3);
- memset(&r, 0, sizeof(r));
- r.flags = iommu_promregs[2].which_io;
- r.start = iommu_promregs[2].phys_addr;
- xpt = (iopte_t *) sbus_ioremap(&r, 0, PAGE_SIZE * 16, "XPT");
+ xpt = NULL;
+ if(prom_getproperty(sbi_node, "reg", (void *) iommu_promregs,
+ sizeof(iommu_promregs)) != -1) {
+ prom_apply_generic_ranges(io_node, 0, iommu_promregs, 3);
+ memset(&r, 0, sizeof(r));
+ r.flags = iommu_promregs[2].which_io;
+ r.start = iommu_promregs[2].phys_addr;
+ xpt = (iopte_t *) sbus_ioremap(&r, 0, PAGE_SIZE * 16, "XPT");
+ }
if(!xpt) panic("Cannot map External Page Table.");
sbus->iommu = (struct iommu_struct *)iounit;
diff -urN linux/arch/sparc/mm/iommu.c linux/arch/sparc/mm/iommu.c
--- linux/arch/sparc/mm/iommu.c 2005/01/13 14:05:38 1.22
+++ linux/arch/sparc/mm/iommu.c 2005/02/28 15:45:12 1.23
@@ -71,14 +71,16 @@
prom_printf("Unable to allocate iommu structure\n");
prom_halt();
}
- prom_getproperty(iommund, "reg", (void *) iommu_promregs,
- sizeof(iommu_promregs));
- memset(&r, 0, sizeof(r));
- r.flags = iommu_promregs[0].which_io;
- r.start = iommu_promregs[0].phys_addr;
- iommu->regs = (struct iommu_regs *)
- sbus_ioremap(&r, 0, PAGE_SIZE * 3, "iommu_regs");
- if(!iommu->regs) {
+ iommu->regs = NULL;
+ if (prom_getproperty(iommund, "reg", (void *) iommu_promregs,
+ sizeof(iommu_promregs)) != -1) {
+ memset(&r, 0, sizeof(r));
+ r.flags = iommu_promregs[0].which_io;
+ r.start = iommu_promregs[0].phys_addr;
+ iommu->regs = (struct iommu_regs *)
+ sbus_ioremap(&r, 0, PAGE_SIZE * 3, "iommu_regs");
+ }
+ if (!iommu->regs) {
prom_printf("Cannot map IOMMU registers\n");
prom_halt();
}
diff -urN linux/arch/sparc/mm/sun4c.c linux/arch/sparc/mm/sun4c.c
--- linux/arch/sparc/mm/sun4c.c 2005/02/07 02:54:38 1.60
+++ linux/arch/sparc/mm/sun4c.c 2005/02/28 15:45:12 1.61
@@ -511,7 +511,8 @@
node = prom_searchsiblings(prom_root_node, "memory-error");
if (!node)
return;
- prom_getproperty(node, "reg", (char *)regs, sizeof(regs));
+ if (prom_getproperty(node, "reg", (char *)regs, sizeof(regs))
<= 0)
+ return;
/* hmm I think regs[0].which_io is zero here anyways */
sun4c_memerr_reg = ioremap(regs[0].phys_addr, regs[0].reg_size);
}
diff -urN linux/arch/sparc/prom/console.c linux/arch/sparc/prom/console.c
--- linux/arch/sparc/prom/console.c 2003/06/22 23:09:50 1.11
+++ linux/arch/sparc/prom/console.c 2005/02/28 15:45:12 1.12
@@ -111,6 +111,7 @@
int st_p;
char propb[64];
char *p;
+ int propl;
switch(prom_vers) {
case PROM_V0:
@@ -139,14 +140,16 @@
if(strncmp(propb, "serial", sizeof("serial")))
return PROMDEV_I_UNK;
}
- prom_getproperty(prom_root_node, "stdin-path", propb,
sizeof(propb));
- p = propb;
- while(*p) p++; p -= 2;
- if(p[0] == ':') {
- if(p[1] == 'a')
- return PROMDEV_ITTYA;
- else if(p[1] == 'b')
- return PROMDEV_ITTYB;
+ propl = prom_getproperty(prom_root_node, "stdin-path", propb,
sizeof(propb));
+ if(propl > 2) {
+ p = propb;
+ while(*p) p++; p -= 2;
+ if(p[0] == ':') {
+ if(p[1] == 'a')
+ return PROMDEV_ITTYA;
+ else if(p[1] == 'b')
+ return PROMDEV_ITTYB;
+ }
}
return PROMDEV_I_UNK;
}
@@ -179,7 +182,7 @@
restore_current();
spin_unlock_irqrestore(&prom_lock, flags);
propl = prom_getproperty(st_p, "device_type", propb,
sizeof(propb));
- if (propl >= 0 && propl == sizeof("display") &&
+ if (propl == sizeof("display") &&
strncmp("display", propb, sizeof("display")) == 0)
{
return PROMDEV_OSCREEN;
@@ -188,16 +191,20 @@
if(propl >= 0 &&
strncmp("serial", propb, sizeof("serial")) != 0)
return PROMDEV_O_UNK;
- prom_getproperty(prom_root_node, "stdout-path", propb,
sizeof(propb));
- if(strncmp(propb, con_name_jmc, CON_SIZE_JMC) == 0)
+ propl = prom_getproperty(prom_root_node, "stdout-path",
+ propb, sizeof(propb));
+ if(propl == CON_SIZE_JMC &&
+ strncmp(propb, con_name_jmc, CON_SIZE_JMC) == 0)
return PROMDEV_OTTYA;
- p = propb;
- while(*p) p++; p -= 2;
- if(p[0]==':') {
- if(p[1] == 'a')
- return PROMDEV_OTTYA;
- else if(p[1] == 'b')
- return PROMDEV_OTTYB;
+ if(propl > 2) {
+ p = propb;
+ while(*p) p++; p-= 2;
+ if(p[0]==':') {
+ if(p[1] == 'a')
+ return PROMDEV_OTTYA;
+ else if(p[1] == 'b')
+ return PROMDEV_OTTYB;
+ }
}
} else {
switch(*romvec->pv_stdin) {
diff -urN linux/arch/sparc/prom/tree.c linux/arch/sparc/prom/tree.c
--- linux/arch/sparc/prom/tree.c 2000/10/05 01:18:44 1.7
+++ linux/arch/sparc/prom/tree.c 2005/02/28 15:45:12 1.8
@@ -176,8 +176,11 @@
*/
int prom_nodematch(int node, char *name)
{
+ int error;
+
static char namebuf[128];
- prom_getproperty(node, "name", namebuf, sizeof(namebuf));
+ error = prom_getproperty(node, "name", namebuf, sizeof(namebuf));
+ if (error == -1) return 0;
if(strcmp(namebuf, name) == 0) return 1;
return 0;
}
diff -urN linux/arch/sparc64/Kconfig linux/arch/sparc64/Kconfig
--- linux/arch/sparc64/Kconfig 2005/01/25 04:28:06 1.40
+++ linux/arch/sparc64/Kconfig 2005/02/28 15:45:12 1.41
@@ -18,6 +18,11 @@
source "init/Kconfig"
+config SYSVIPC_COMPAT
+ bool
+ depends on COMPAT && SYSVIPC
+ default y
+
menu "General machine setup"
config BBC_I2C
diff -urN linux/arch/sparc64/defconfig linux/arch/sparc64/defconfig
--- linux/arch/sparc64/defconfig 2005/02/13 20:16:19 1.132
+++ linux/arch/sparc64/defconfig 2005/02/28 15:45:12 1.133
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc3
-# Mon Feb 7 15:29:00 2005
+# Linux kernel version: 2.6.11-rc4
+# Thu Feb 17 15:32:19 2005
#
CONFIG_64BIT=y
CONFIG_MMU=y
@@ -53,6 +53,7 @@
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
+CONFIG_SYSVIPC_COMPAT=y
#
# General machine setup
diff -urN linux/arch/sparc64/kernel/auxio.c linux/arch/sparc64/kernel/auxio.c
--- linux/arch/sparc64/kernel/auxio.c 2005/01/25 04:28:06 1.13
+++ linux/arch/sparc64/kernel/auxio.c 2005/02/28 15:45:12 1.14
@@ -17,7 +17,7 @@
#include <asm/auxio.h>
/* This cannot be static, as it is referenced in entry.S */
-void __iomem *auxio_register = 0UL;
+void __iomem *auxio_register = NULL;
enum auxio_type {
AUXIO_TYPE_NODEV,
diff -urN linux/arch/sparc64/kernel/sys_sparc32.c
linux/arch/sparc64/kernel/sys_sparc32.c
--- linux/arch/sparc64/kernel/sys_sparc32.c 2005/02/13 20:16:19 1.121
+++ linux/arch/sparc64/kernel/sys_sparc32.c 2005/02/28 15:45:12 1.122
@@ -242,7 +242,7 @@
static long get_tv32(struct timeval *o, struct compat_timeval __user *i)
{
- return (!access_ok(VERIFY_READ, tv32, sizeof(*tv32)) ||
+ return (!access_ok(VERIFY_READ, i, sizeof(*i)) ||
(__get_user(o->tv_sec, &i->tv_sec) |
__get_user(o->tv_usec, &i->tv_usec)));
}
@@ -254,602 +254,70 @@
__put_user(i->tv_usec, &o->tv_usec)));
}
-struct msgbuf32 { s32 mtype; char mtext[1]; };
-
-struct ipc_perm32 {
- key_t key;
- compat_uid_t uid;
- compat_gid_t gid;
- compat_uid_t cuid;
- compat_gid_t cgid;
- compat_mode_t mode;
- unsigned short seq;
-};
-
-struct semid_ds32 {
- struct ipc_perm32 sem_perm; /* permissions .. see ipc.h
*/
- compat_time_t sem_otime; /* last semop time */
- compat_time_t sem_ctime; /* last change time */
- u32 sem_base; /* ptr to first semaphore in array */
- u32 sem_pending; /* pending operations to be processed */
- u32 sem_pending_last; /* last pending operation */
- u32 undo; /* undo requests on this array */
- unsigned short sem_nsems; /* no. of semaphores in array
*/
-};
-
-struct semid64_ds32 {
- struct ipc64_perm sem_perm; /* this structure is the same
on sparc32 and sparc64 */
- unsigned int __pad1;
- compat_time_t sem_otime;
- unsigned int __pad2;
- compat_time_t sem_ctime;
- u32 sem_nsems;
- u32 __unused1;
- u32 __unused2;
-};
-
-struct msqid_ds32
-{
- struct ipc_perm32 msg_perm;
- u32 msg_first;
- u32 msg_last;
- compat_time_t msg_stime;
- compat_time_t msg_rtime;
- compat_time_t msg_ctime;
- u32 wwait;
- u32 rwait;
- unsigned short msg_cbytes;
- unsigned short msg_qnum;
- unsigned short msg_qbytes;
- compat_ipc_pid_t msg_lspid;
- compat_ipc_pid_t msg_lrpid;
-};
-
-struct msqid64_ds32 {
- struct ipc64_perm msg_perm;
- unsigned int __pad1;
- compat_time_t msg_stime;
- unsigned int __pad2;
- compat_time_t msg_rtime;
- unsigned int __pad3;
- compat_time_t msg_ctime;
- unsigned int msg_cbytes;
- unsigned int msg_qnum;
- unsigned int msg_qbytes;
- compat_pid_t msg_lspid;
- compat_pid_t msg_lrpid;
- unsigned int __unused1;
- unsigned int __unused2;
-};
-
-
-struct shmid_ds32 {
- struct ipc_perm32 shm_perm;
- int shm_segsz;
- compat_time_t shm_atime;
- compat_time_t shm_dtime;
- compat_time_t shm_ctime;
- compat_ipc_pid_t shm_cpid;
- compat_ipc_pid_t shm_lpid;
- unsigned short shm_nattch;
-};
-
-struct shmid64_ds32 {
- struct ipc64_perm shm_perm;
- unsigned int __pad1;
- compat_time_t shm_atime;
- unsigned int __pad2;
- compat_time_t shm_dtime;
- unsigned int __pad3;
- compat_time_t shm_ctime;
- compat_size_t shm_segsz;
- compat_pid_t shm_cpid;
- compat_pid_t shm_lpid;
- unsigned int shm_nattch;
- unsigned int __unused1;
- unsigned int __unused2;
-};
-
-
-/*
- * sys32_ipc() is the de-multiplexer for the SysV IPC calls in 32bit
emulation..
- *
- * This is really horribly ugly.
- */
-#define IPCOP_MASK(__x) (1UL << ((__x)&~IPC_64))
-static int do_sys32_semctl(int first, int second, int third,
- compat_uptr_t __user *uptr)
-{
- union semun fourth;
- compat_uptr_t pad;
- int err = -EINVAL;
-
- if (!uptr)
- goto out;
- err = -EFAULT;
- if (get_user(pad, uptr))
- goto out;
- if ((third & ~IPC_64) == SETVAL)
- fourth.val = (int)pad;
- else
- fourth.__pad = compat_ptr(pad);
- if (IPCOP_MASK (third) &
- (IPCOP_MASK (IPC_INFO) | IPCOP_MASK (SEM_INFO) | IPCOP_MASK
(GETVAL) |
- IPCOP_MASK (GETPID) | IPCOP_MASK (GETNCNT) | IPCOP_MASK (GETZCNT) |
- IPCOP_MASK (GETALL) | IPCOP_MASK (SETALL) | IPCOP_MASK
(IPC_RMID))) {
- err = sys_semctl (first, second, third, fourth);
- } else if (third & IPC_64) {
- struct semid64_ds s;
- struct semid64_ds32 __user *usp = compat_ptr(pad);
- mm_segment_t old_fs;
- int need_back_translation;
-
- if (third == (IPC_SET|IPC_64)) {
- err = get_user (s.sem_perm.uid, &usp->sem_perm.uid);
- err |= __get_user (s.sem_perm.gid, &usp->sem_perm.gid);
- err |= __get_user (s.sem_perm.mode,
&usp->sem_perm.mode);
- if (err)
- goto out;
- fourth.__pad = (void __user *) &s;
- }
- need_back_translation =
- (IPCOP_MASK (third) &
- (IPCOP_MASK (SEM_STAT) | IPCOP_MASK (IPC_STAT))) != 0;
- if (need_back_translation)
- fourth.__pad = (void __user *) &s;
- old_fs = get_fs ();
- set_fs (KERNEL_DS);
- err = sys_semctl (first, second, third, fourth);
- set_fs (old_fs);
- if (need_back_translation) {
- int err2 = copy_to_user (&usp->sem_perm, &s.sem_perm,
sizeof(struct ipc64_perm) + 2*sizeof(time_t));
- err2 |= __put_user (s.sem_nsems, &usp->sem_nsems);
- if (err2) err = -EFAULT;
- }
- } else {
- struct semid_ds s;
- struct semid_ds32 __user *usp = compat_ptr(pad);
- mm_segment_t old_fs;
- int need_back_translation;
-
- if (third == IPC_SET) {
- err = get_user (s.sem_perm.uid, &usp->sem_perm.uid);
- err |= __get_user (s.sem_perm.gid, &usp->sem_perm.gid);
- err |= __get_user (s.sem_perm.mode,
&usp->sem_perm.mode);
- if (err)
- goto out;
- fourth.__pad = (void __user *) &s;
- }
- need_back_translation =
- (IPCOP_MASK (third) &
- (IPCOP_MASK (SEM_STAT) | IPCOP_MASK (IPC_STAT))) != 0;
- if (need_back_translation)
- fourth.__pad = (void __user *) &s;
- old_fs = get_fs ();
- set_fs (KERNEL_DS);
- err = sys_semctl (first, second, third, fourth);
- set_fs (old_fs);
- if (need_back_translation) {
- int err2 = put_user (s.sem_perm.key,
&usp->sem_perm.key);
- err2 |= __put_user (high2lowuid(s.sem_perm.uid),
&usp->sem_perm.uid);
- err2 |= __put_user (high2lowgid(s.sem_perm.gid),
&usp->sem_perm.gid);
- err2 |= __put_user (high2lowuid(s.sem_perm.cuid),
&usp->sem_perm.cuid);
- err2 |= __put_user (high2lowgid(s.sem_perm.cgid),
&usp->sem_perm.cgid);
- err2 |= __put_user (s.sem_perm.mode,
&usp->sem_perm.mode);
- err2 |= __put_user (s.sem_perm.seq, &usp->sem_perm.seq);
- err2 |= __put_user (s.sem_otime, &usp->sem_otime);
- err2 |= __put_user (s.sem_ctime, &usp->sem_ctime);
- err2 |= __put_user (s.sem_nsems, &usp->sem_nsems);
- if (err2) err = -EFAULT;
- }
- }
-out:
- return err;
-}
-
-static int do_sys32_msgsnd(int first, int second, int third,
- void __user *uptr)
-{
- struct msgbuf32 __user *up = uptr;
- struct msgbuf *p;
- mm_segment_t old_fs;
- int err;
-
- p = kmalloc(second + sizeof (struct msgbuf), GFP_USER);
- if (!p)
- return -ENOMEM;
- err = -EFAULT;
- if (get_user (p->mtype, &up->mtype) ||
- __copy_from_user (p->mtext, &up->mtext, second))
- goto out;
- old_fs = get_fs ();
- set_fs (KERNEL_DS);
- err = sys_msgsnd (first, (struct msgbuf __user *) p,
- second, third);
- set_fs (old_fs);
-out:
- kfree (p);
- return err;
-}
-
-static int do_sys32_msgrcv(int first, int second, int msgtyp, int third,
- int version, void __user *uptr)
-{
- struct msgbuf32 __user *up;
- struct msgbuf *p;
- mm_segment_t old_fs;
- int err;
-
- if (!version) {
- struct ipc_kludge __user *uipck = uptr;
- struct ipc_kludge ipck;
-
- err = -EINVAL;
- if (!uptr)
- goto out;
- err = -EFAULT;
- if (copy_from_user (&ipck, uipck,
- sizeof (struct ipc_kludge)))
- goto out;
- uptr = compat_ptr(ipck.msgp);
- msgtyp = ipck.msgtyp;
- }
- err = -ENOMEM;
- p = kmalloc(second + sizeof (struct msgbuf), GFP_USER);
- if (!p)
- goto out;
- old_fs = get_fs ();
- set_fs (KERNEL_DS);
- err = sys_msgrcv (first, (struct msgbuf __user *) p, second,
- msgtyp, third);
- set_fs (old_fs);
- if (err < 0)
- goto free_then_out;
- up = uptr;
- if (put_user (p->mtype, &up->mtype) ||
- __copy_to_user (&up->mtext, p->mtext, err))
- err = -EFAULT;
-free_then_out:
- kfree (p);
-out:
- return err;
-}
-
-static int do_sys32_msgctl(int first, int second, void __user *uptr)
-{
- int err;
-
- if (IPCOP_MASK (second) &
- (IPCOP_MASK (IPC_INFO) | IPCOP_MASK (MSG_INFO) |
- IPCOP_MASK (IPC_RMID))) {
- err = sys_msgctl (first, second, uptr);
- } else if (second & IPC_64) {
- struct msqid64_ds m;
- struct msqid64_ds32 __user *up = uptr;
- mm_segment_t old_fs;
-
- if (second == (IPC_SET|IPC_64)) {
- err = get_user (m.msg_perm.uid,
- &up->msg_perm.uid);
- err |= __get_user (m.msg_perm.gid,
- &up->msg_perm.gid);
- err |= __get_user (m.msg_perm.mode,
- &up->msg_perm.mode);
- err |= __get_user (m.msg_qbytes,
- &up->msg_qbytes);
- if (err)
- goto out;
- }
- old_fs = get_fs ();
- set_fs (KERNEL_DS);
- err = sys_msgctl(first, second,
- (struct msqid_ds __user *)&m);
- set_fs (old_fs);
- if (IPCOP_MASK (second) &
- (IPCOP_MASK (MSG_STAT) | IPCOP_MASK (IPC_STAT))) {
- int err2 = copy_to_user(&up->msg_perm,
- &m.msg_perm,
- (sizeof(struct ipc64_perm) +
3*sizeof(time_t)));
- err2 |= __put_user (m.msg_cbytes,
- &up->msg_cbytes);
- err2 |= __put_user (m.msg_qnum, &up->msg_qnum);
- err2 |= __put_user (m.msg_qbytes,
- &up->msg_qbytes);
- err2 |= __put_user (m.msg_lspid, &up->msg_lspid);
- err2 |= __put_user (m.msg_lrpid, &up->msg_lrpid);
- if (err2)
- err = -EFAULT;
- }
- } else {
- struct msqid_ds m;
- struct msqid_ds32 __user *up = uptr;
- mm_segment_t old_fs;
-
- if (second == IPC_SET) {
- err = get_user(m.msg_perm.uid,
- &up->msg_perm.uid);
- err |= __get_user(m.msg_perm.gid,
- &up->msg_perm.gid);
- err |= __get_user(m.msg_perm.mode,
- &up->msg_perm.mode);
- err |= __get_user(m.msg_qbytes,
- &up->msg_qbytes);
- if (err)
- goto out;
- }
- old_fs = get_fs ();
- set_fs (KERNEL_DS);
- err = sys_msgctl(first, second,
- (struct msqid_ds __user *) &m);
- set_fs (old_fs);
- if (IPCOP_MASK (second) &
- (IPCOP_MASK (MSG_STAT) | IPCOP_MASK (IPC_STAT))) {
- int err2 = put_user(m.msg_perm.key,
- &up->msg_perm.key);
- err2 |= __put_user(high2lowuid(m.msg_perm.uid),
- &up->msg_perm.uid);
- err2 |= __put_user(high2lowgid(m.msg_perm.gid),
- &up->msg_perm.gid);
- err2 |= __put_user(high2lowuid(m.msg_perm.cuid),
- &up->msg_perm.cuid);
- err2 |= __put_user(high2lowgid(m.msg_perm.cgid),
- &up->msg_perm.cgid);
- err2 |= __put_user(m.msg_perm.mode,
- &up->msg_perm.mode);
- err2 |= __put_user(m.msg_perm.seq,
- &up->msg_perm.seq);
- err2 |= __put_user(m.msg_stime, &up->msg_stime);
- err2 |= __put_user(m.msg_rtime, &up->msg_rtime);
- err2 |= __put_user(m.msg_ctime, &up->msg_ctime);
- err2 |= __put_user(m.msg_cbytes,
- &up->msg_cbytes);
- err2 |= __put_user(m.msg_qnum, &up->msg_qnum);
- err2 |= __put_user(m.msg_qbytes,
- &up->msg_qbytes);
- err2 |= __put_user(m.msg_lspid, &up->msg_lspid);
- err2 |= __put_user(m.msg_lrpid, &up->msg_lrpid);
- if (err2)
- err = -EFAULT;
- }
- }
-
-out:
- return err;
-}
-
-static int do_sys32_shmat (int first, int second, int third, int version, void
__user *uptr)
-{
- unsigned long raddr;
- u32 __user *uaddr = compat_ptr((compat_uptr_t)third);
- int err = -EINVAL;
-
- if (version == 1)
- goto out;
- err = do_shmat (first, uptr, second, &raddr);
- if (err)
- goto out;
- err = put_user (raddr, uaddr);
-out:
- return err;
-}
-
-static int do_sys32_shmctl(int first, int second, void __user *uptr)
-{
- int err;
-
- if (IPCOP_MASK (second) &
- (IPCOP_MASK (IPC_INFO) | IPCOP_MASK (SHM_LOCK) |
- IPCOP_MASK (SHM_UNLOCK) | IPCOP_MASK (IPC_RMID))) {
- if (second == (IPC_INFO|IPC_64)) {
- /* So that we don't have to translate it */
- second = IPC_INFO;
- }
- err = sys_shmctl(first, second, uptr);
- } else if ((second & IPC_64) && second != (SHM_INFO|IPC_64)) {
- struct shmid64_ds s;
- struct shmid64_ds32 __user *up = uptr;
- mm_segment_t old_fs;
-
- if (second == (IPC_SET|IPC_64)) {
- err = get_user(s.shm_perm.uid,
- &up->shm_perm.uid);
- err |= __get_user(s.shm_perm.gid,
- &up->shm_perm.gid);
- err |= __get_user(s.shm_perm.mode,
- &up->shm_perm.mode);
- if (err)
- goto out;
- }
- old_fs = get_fs();
- set_fs(KERNEL_DS);
- err = sys_shmctl(first, second,
- (struct shmid_ds __user *)&s);
- set_fs(old_fs);
- if (err < 0)
- goto out;
-
- /* Mask it even in this case so it becomes a CSE. */
- if (IPCOP_MASK (second) &
- (IPCOP_MASK (SHM_STAT) | IPCOP_MASK (IPC_STAT))) {
- int err2 = copy_to_user(&up->shm_perm,
- &s.shm_perm,
- sizeof(struct ipc64_perm) +
3*sizeof(time_t));
- err2 |= __put_user(s.shm_segsz, &up->shm_segsz);
- err2 |= __put_user(s.shm_nattch,&up->shm_nattch);
- err2 |= __put_user(s.shm_cpid, &up->shm_cpid);
- err2 |= __put_user(s.shm_lpid, &up->shm_lpid);
- if (err2)
- err = -EFAULT;
- }
- } else {
- struct shmid_ds s;
- struct shmid_ds32 __user *up = uptr;
- mm_segment_t old_fs;
-
- second &= ~IPC_64;
- if (second == IPC_SET) {
- err = get_user(s.shm_perm.uid,
- &up->shm_perm.uid);
- err |= __get_user(s.shm_perm.gid,
- &up->shm_perm.gid);
- err |= __get_user(s.shm_perm.mode,
- &up->shm_perm.mode);
- if (err)
- goto out;
- }
- old_fs = get_fs();
- set_fs(KERNEL_DS);
- err = sys_shmctl(first, second,
- (struct shmid_ds __user *) &s);
- set_fs(old_fs);
- if (err < 0)
- goto out;
-
- /* Mask it even in this case so it becomes a CSE. */
- if (second == SHM_INFO) {
- struct shm_info32 {
- int used_ids;
- u32 shm_tot, shm_rss, shm_swp;
- u32 swap_attempts, swap_successes;
- };
- struct shm_info32 __user *uip = uptr;
- struct shm_info *kp = (struct shm_info *) &s;
- int err2 = put_user(kp->used_ids,
- &uip->used_ids);
- err2 |= __put_user(kp->shm_tot, &uip->shm_tot);
- err2 |= __put_user(kp->shm_rss, &uip->shm_rss);
- err2 |= __put_user(kp->shm_swp, &uip->shm_swp);
- err2 |= __put_user(kp->swap_attempts,
- &uip->swap_attempts);
- err2 |= __put_user(kp->swap_successes,
- &uip->swap_successes);
- if (err2)
- err = -EFAULT;
- } else if (IPCOP_MASK (second) &
- (IPCOP_MASK (SHM_STAT) |
- IPCOP_MASK (IPC_STAT))) {
- int err2;
-
- err2 = put_user(s.shm_perm.key,
- &up->shm_perm.key);
- err2 |= __put_user(high2lowuid(s.shm_perm.uid),
- &up->shm_perm.uid);
- err2 |= __put_user(high2lowuid(s.shm_perm.gid),
- &up->shm_perm.gid);
- err2 |= __put_user(high2lowuid(s.shm_perm.cuid),
- &up->shm_perm.cuid);
- err2 |= __put_user(high2lowuid(s.shm_perm.cgid),
- &up->shm_perm.cgid);
- err2 |= __put_user(s.shm_perm.mode,
- &up->shm_perm.mode);
- err2 |= __put_user(s.shm_perm.seq,
- &up->shm_perm.seq);
- err2 |= __put_user(s.shm_atime, &up->shm_atime);
- err2 |= __put_user(s.shm_dtime, &up->shm_dtime);
- err2 |= __put_user(s.shm_ctime, &up->shm_ctime);
- err2 |= __put_user(s.shm_segsz, &up->shm_segsz);
- err2 |= __put_user(s.shm_nattch,&up->shm_nattch);
- err2 |= __put_user(s.shm_cpid, &up->shm_cpid);
- err2 |= __put_user(s.shm_lpid, &up->shm_lpid);
- if (err2)
- err = -EFAULT;
- }
- }
-out:
- return err;
-}
-
-static int sys32_semtimedop(int semid, struct sembuf __user *tsems,
- int nsems,
- const struct compat_timespec __user *timeout32)
-{
- struct compat_timespec t32;
- struct timespec __user *t64;
-
- t64 = compat_alloc_user_space(sizeof(*t64));
- if (copy_from_user(&t32, timeout32, sizeof(t32)))
- return -EFAULT;
-
- if (put_user(t32.tv_sec, &t64->tv_sec) ||
- put_user(t32.tv_nsec, &t64->tv_nsec))
- return -EFAULT;
-
- return sys_semtimedop(semid, tsems, nsems, t64);
-}
-
-asmlinkage long compat_sys_ipc(u32 call, int first, int second, int third,
compat_uptr_t __ptr, u32 fifth)
+#ifdef CONFIG_SYSVIPC
+asmlinkage long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third,
compat_uptr_t ptr, u32 fifth)
{
- int version, err;
- void __user *ptr = compat_ptr(__ptr);
+ int version;
version = call >> 16; /* hack for backward compatibility */
call &= 0xffff;
- if (call <= SEMCTL) {
- switch (call) {
- case SEMOP:
- /* struct sembuf is the same on 32 and 64 :)) */
- err = sys_semtimedop (first, ptr, second, NULL);
- goto out;
- case SEMTIMEDOP:
- err = sys32_semtimedop(first, ptr, second,
- compat_ptr(fifth));
- case SEMGET:
- err = sys_semget(first, second, third);
- goto out;
- case SEMCTL:
- err = do_sys32_semctl(first, second, third, ptr);
- goto out;
- default:
- err = -ENOSYS;
- goto out;
- };
- }
- if (call <= MSGCTL) {
- switch (call) {
- case MSGSND:
- err = do_sys32_msgsnd(first, second, third, ptr);
- goto out;
- case MSGRCV:
- err = do_sys32_msgrcv(first, second, fifth,
- third, version, ptr);
- goto out;
- case MSGGET:
- err = sys_msgget((key_t) first, second);
- goto out;
- case MSGCTL:
- err = do_sys32_msgctl(first, second, ptr);
- goto out;
- default:
- err = -ENOSYS;
- goto out;
- };
- }
- if (call <= SHMCTL) {
- switch (call) {
- case SHMAT:
- err = do_sys32_shmat(first, second, third,
- version, ptr);
- goto out;
- case SHMDT:
- err = sys_shmdt(ptr);
- goto out;
- case SHMGET:
- err = sys_shmget(first, (unsigned)second, third);
- goto out;
- case SHMCTL:
- err = do_sys32_shmctl(first, second, ptr);
- goto out;
- default:
- err = -ENOSYS;
- goto out;
- };
- }
- err = -ENOSYS;
+ switch (call) {
+ case SEMTIMEDOP:
+ if (third)
+ /* sign extend semid */
+ return compat_sys_semtimedop((int)first,
+ compat_ptr(ptr), second,
+ compat_ptr(third));
+ /* else fall through for normal semop() */
+ case SEMOP:
+ /* struct sembuf is the same on 32 and 64bit :)) */
+ /* sign extend semid */
+ return sys_semtimedop((int)first, compat_ptr(ptr), second,
+ NULL);
+ case SEMGET:
+ /* sign extend key, nsems */
+ return sys_semget((int)first, (int)second, third);
+ case SEMCTL:
+ /* sign extend semid, semnum */
+ return compat_sys_semctl((int)first, (int)second, third,
+ compat_ptr(ptr));
+
+ case MSGSND:
+ /* sign extend msqid */
+ return compat_sys_msgsnd((int)first, (int)second, third,
+ compat_ptr(ptr));
+ case MSGRCV:
+ /* sign extend msqid, msgtyp */
+ return compat_sys_msgrcv((int)first, second, (int)fifth,
+ third, version, compat_ptr(ptr));
+ case MSGGET:
+ /* sign extend key */
+ return sys_msgget((int)first, second);
+ case MSGCTL:
+ /* sign extend msqid */
+ return compat_sys_msgctl((int)first, second, compat_ptr(ptr));
+
+ case SHMAT:
+ /* sign extend shmid */
+ return compat_sys_shmat((int)first, second, third, version,
+ compat_ptr(ptr));
+ case SHMDT:
+ return sys_shmdt(compat_ptr(ptr));
+ case SHMGET:
+ /* sign extend key_t */
+ return sys_shmget((int)first, second, third);
+ case SHMCTL:
+ /* sign extend shmid */
+ return compat_sys_shmctl((int)first, second, compat_ptr(ptr));
+
+ default:
+ return -ENOSYS;
+ };
-out:
- return err;
+ return -ENOSYS;
}
+#endif
asmlinkage long sys32_truncate64(const char __user * path, unsigned long high,
unsigned long low)
{
diff -urN linux/arch/sparc64/lib/U1memcpy.S linux/arch/sparc64/lib/U1memcpy.S
--- linux/arch/sparc64/lib/U1memcpy.S 2004/09/19 12:30:07 1.2
+++ linux/arch/sparc64/lib/U1memcpy.S 2005/02/28 15:45:12 1.3
@@ -119,6 +119,9 @@
.globl FUNC_NAME
.type FUNC_NAME,#function
FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
+ srlx %o2, 31, %g2
+ cmp %g2, 0
+ tne %xcc, 5
PREAMBLE
mov %o0, %g5
cmp %o2, 0
diff -urN linux/arch/sparc64/lib/U3memcpy.S linux/arch/sparc64/lib/U3memcpy.S
--- linux/arch/sparc64/lib/U3memcpy.S 2004/09/19 12:30:07 1.7
+++ linux/arch/sparc64/lib/U3memcpy.S 2005/02/28 15:45:12 1.8
@@ -80,6 +80,9 @@
.globl FUNC_NAME
.type FUNC_NAME,#function
FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
+ srlx %o2, 31, %g2
+ cmp %g2, 0
+ tne %xcc, 5
PREAMBLE
mov %o0, %g5
cmp %o2, 0
diff -urN linux/arch/sparc64/prom/cif.S linux/arch/sparc64/prom/cif.S
--- linux/arch/sparc64/prom/cif.S 1970/01/01 00:00:00
+++ linux/arch/sparc64/prom/cif.S Mon Feb 28 15:45:12 2005 1.1
@@ -0,0 +1,225 @@
+/* cif.S: PROM entry/exit assembler trampolines.
+ *
+ * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ * Copyright (C) 2005 David S. Miller <davem@davemloft.net>
+ */
+
+#include <asm/pstate.h>
+
+ .text
+ .globl prom_cif_interface
+prom_cif_interface:
+ sethi %hi(p1275buf), %o0
+ or %o0, %lo(p1275buf), %o0
+ ldx [%o0 + 0x010], %o1 ! prom_cif_stack
+ save %o1, -0x190, %sp
+ ldx [%i0 + 0x008], %l2 ! prom_cif_handler
+ rdpr %pstate, %l4
+ wrpr %g0, 0x15, %pstate ! save alternate globals
+ stx %g1, [%sp + 2047 + 0x0b0]
+ stx %g2, [%sp + 2047 + 0x0b8]
+ stx %g3, [%sp + 2047 + 0x0c0]
+ stx %g4, [%sp + 2047 + 0x0c8]
+ stx %g5, [%sp + 2047 + 0x0d0]
+ stx %g6, [%sp + 2047 + 0x0d8]
+ stx %g7, [%sp + 2047 + 0x0e0]
+ wrpr %g0, 0x814, %pstate ! save interrupt globals
+ stx %g1, [%sp + 2047 + 0x0e8]
+ stx %g2, [%sp + 2047 + 0x0f0]
+ stx %g3, [%sp + 2047 + 0x0f8]
+ stx %g4, [%sp + 2047 + 0x100]
+ stx %g5, [%sp + 2047 + 0x108]
+ stx %g6, [%sp + 2047 + 0x110]
+ stx %g7, [%sp + 2047 + 0x118]
+ wrpr %g0, 0x14, %pstate ! save normal globals
+ stx %g1, [%sp + 2047 + 0x120]
+ stx %g2, [%sp + 2047 + 0x128]
+ stx %g3, [%sp + 2047 + 0x130]
+ stx %g4, [%sp + 2047 + 0x138]
+ stx %g5, [%sp + 2047 + 0x140]
+ stx %g6, [%sp + 2047 + 0x148]
+ stx %g7, [%sp + 2047 + 0x150]
+ wrpr %g0, 0x414, %pstate ! save mmu globals
+ stx %g1, [%sp + 2047 + 0x158]
+ stx %g2, [%sp + 2047 + 0x160]
+ stx %g3, [%sp + 2047 + 0x168]
+ stx %g4, [%sp + 2047 + 0x170]
+ stx %g5, [%sp + 2047 + 0x178]
+ stx %g6, [%sp + 2047 + 0x180]
+ stx %g7, [%sp + 2047 + 0x188]
+ mov %g1, %l0 ! also save to locals, so we can handle
+ mov %g2, %l1 ! tlb faults later on, when accessing
+ mov %g3, %l3 ! the stack.
+ mov %g7, %l5
+ wrpr %l4, PSTATE_IE, %pstate ! turn off interrupts
+ call %l2
+ add %i0, 0x018, %o0 ! prom_args
+ wrpr %g0, 0x414, %pstate ! restore mmu globals
+ mov %l0, %g1
+ mov %l1, %g2
+ mov %l3, %g3
+ mov %l5, %g7
+ wrpr %g0, 0x14, %pstate ! restore normal globals
+ ldx [%sp + 2047 + 0x120], %g1
+ ldx [%sp + 2047 + 0x128], %g2
+ ldx [%sp + 2047 + 0x130], %g3
+ ldx [%sp + 2047 + 0x138], %g4
+ ldx [%sp + 2047 + 0x140], %g5
+ ldx [%sp + 2047 + 0x148], %g6
+ ldx [%sp + 2047 + 0x150], %g7
+ wrpr %g0, 0x814, %pstate ! restore interrupt globals
+ ldx [%sp + 2047 + 0x0e8], %g1
+ ldx [%sp + 2047 + 0x0f0], %g2
+ ldx [%sp + 2047 + 0x0f8], %g3
+ ldx [%sp + 2047 + 0x100], %g4
+ ldx [%sp + 2047 + 0x108], %g5
+ ldx [%sp + 2047 + 0x110], %g6
+ ldx [%sp + 2047 + 0x118], %g7
+ wrpr %g0, 0x15, %pstate ! restore alternate globals
+ ldx [%sp + 2047 + 0x0b0], %g1
+ ldx [%sp + 2047 + 0x0b8], %g2
+ ldx [%sp + 2047 + 0x0c0], %g3
+ ldx [%sp + 2047 + 0x0c8], %g4
+ ldx [%sp + 2047 + 0x0d0], %g5
+ ldx [%sp + 2047 + 0x0d8], %g6
+ ldx [%sp + 2047 + 0x0e0], %g7
+ wrpr %l4, 0, %pstate ! restore original pstate
+ ret
+ restore
+
+ .globl prom_cif_callback
+prom_cif_callback:
+ sethi %hi(p1275buf), %o1
+ or %o1, %lo(p1275buf), %o1
+ save %sp, -0x270, %sp
+ rdpr %pstate, %l4
+ wrpr %g0, 0x15, %pstate ! save PROM alternate globals
+ stx %g1, [%sp + 2047 + 0x0b0]
+ stx %g2, [%sp + 2047 + 0x0b8]
+ stx %g3, [%sp + 2047 + 0x0c0]
+ stx %g4, [%sp + 2047 + 0x0c8]
+ stx %g5, [%sp + 2047 + 0x0d0]
+ stx %g6, [%sp + 2047 + 0x0d8]
+ stx %g7, [%sp + 2047 + 0x0e0]
+ ! restore Linux alternate globals
+ ldx [%sp + 2047 + 0x190], %g1
+ ldx [%sp + 2047 + 0x198], %g2
+ ldx [%sp + 2047 + 0x1a0], %g3
+ ldx [%sp + 2047 + 0x1a8], %g4
+ ldx [%sp + 2047 + 0x1b0], %g5
+ ldx [%sp + 2047 + 0x1b8], %g6
+ ldx [%sp + 2047 + 0x1c0], %g7
+ wrpr %g0, 0x814, %pstate ! save PROM interrupt globals
+ stx %g1, [%sp + 2047 + 0x0e8]
+ stx %g2, [%sp + 2047 + 0x0f0]
+ stx %g3, [%sp + 2047 + 0x0f8]
+ stx %g4, [%sp + 2047 + 0x100]
+ stx %g5, [%sp + 2047 + 0x108]
+ stx %g6, [%sp + 2047 + 0x110]
+ stx %g7, [%sp + 2047 + 0x118]
+ ! restore Linux interrupt globals
+ ldx [%sp + 2047 + 0x1c8], %g1
+ ldx [%sp + 2047 + 0x1d0], %g2
+ ldx [%sp + 2047 + 0x1d8], %g3
+ ldx [%sp + 2047 + 0x1e0], %g4
+ ldx [%sp + 2047 + 0x1e8], %g5
+ ldx [%sp + 2047 + 0x1f0], %g6
+ ldx [%sp + 2047 + 0x1f8], %g7
+ wrpr %g0, 0x14, %pstate ! save PROM normal globals
+ stx %g1, [%sp + 2047 + 0x120]
+ stx %g2, [%sp + 2047 + 0x128]
+ stx %g3, [%sp + 2047 + 0x130]
+ stx %g4, [%sp + 2047 + 0x138]
+ stx %g5, [%sp + 2047 + 0x140]
+ stx %g6, [%sp + 2047 + 0x148]
+ stx %g7, [%sp + 2047 + 0x150]
+ ! restore Linux normal globals
+ ldx [%sp + 2047 + 0x200], %g1
+ ldx [%sp + 2047 + 0x208], %g2
+ ldx [%sp + 2047 + 0x210], %g3
+ ldx [%sp + 2047 + 0x218], %g4
+ ldx [%sp + 2047 + 0x220], %g5
+ ldx [%sp + 2047 + 0x228], %g6
+ ldx [%sp + 2047 + 0x230], %g7
+ wrpr %g0, 0x414, %pstate ! save PROM mmu globals
+ stx %g1, [%sp + 2047 + 0x158]
+ stx %g2, [%sp + 2047 + 0x160]
+ stx %g3, [%sp + 2047 + 0x168]
+ stx %g4, [%sp + 2047 + 0x170]
+ stx %g5, [%sp + 2047 + 0x178]
+ stx %g6, [%sp + 2047 + 0x180]
+ stx %g7, [%sp + 2047 + 0x188]
+ ! restore Linux mmu globals
+ ldx [%sp + 2047 + 0x238], %o0
+ ldx [%sp + 2047 + 0x240], %o1
+ ldx [%sp + 2047 + 0x248], %l2
+ ldx [%sp + 2047 + 0x250], %l3
+ ldx [%sp + 2047 + 0x258], %l5
+ ldx [%sp + 2047 + 0x260], %l6
+ ldx [%sp + 2047 + 0x268], %l7
+ ! switch to Linux tba
+ sethi %hi(sparc64_ttable_tl0), %l1
+ rdpr %tba, %l0 ! save PROM tba
+ mov %o0, %g1
+ mov %o1, %g2
+ mov %l2, %g3
+ mov %l3, %g4
+ mov %l5, %g5
+ mov %l6, %g6
+ mov %l7, %g7
+ wrpr %l1, %tba ! install Linux tba
+ wrpr %l4, 0, %pstate ! restore PSTATE
+ call prom_world
+ mov %g0, %o0
+ ldx [%i1 + 0x000], %l2
+ call %l2
+ mov %i0, %o0
+ mov %o0, %l1
+ call prom_world
+ or %g0, 1, %o0
+ wrpr %g0, 0x14, %pstate ! interrupts off
+ ! restore PROM mmu globals
+ ldx [%sp + 2047 + 0x158], %o0
+ ldx [%sp + 2047 + 0x160], %o1
+ ldx [%sp + 2047 + 0x168], %l2
+ ldx [%sp + 2047 + 0x170], %l3
+ ldx [%sp + 2047 + 0x178], %l5
+ ldx [%sp + 2047 + 0x180], %l6
+ ldx [%sp + 2047 + 0x188], %l7
+ wrpr %g0, 0x414, %pstate ! restore PROM mmu globals
+ mov %o0, %g1
+ mov %o1, %g2
+ mov %l2, %g3
+ mov %l3, %g4
+ mov %l5, %g5
+ mov %l6, %g6
+ mov %l7, %g7
+ wrpr %l0, %tba ! restore PROM tba
+ wrpr %g0, 0x14, %pstate ! restore PROM normal globals
+ ldx [%sp + 2047 + 0x120], %g1
+ ldx [%sp + 2047 + 0x128], %g2
+ ldx [%sp + 2047 + 0x130], %g3
+ ldx [%sp + 2047 + 0x138], %g4
+ ldx [%sp + 2047 + 0x140], %g5
+ ldx [%sp + 2047 + 0x148], %g6
+ ldx [%sp + 2047 + 0x150], %g7
+ wrpr %g0, 0x814, %pstate ! restore PROM interrupt globals
+ ldx [%sp + 2047 + 0x0e8], %g1
+ ldx [%sp + 2047 + 0x0f0], %g2
+ ldx [%sp + 2047 + 0x0f8], %g3
+ ldx [%sp + 2047 + 0x100], %g4
+ ldx [%sp + 2047 + 0x108], %g5
+ ldx [%sp + 2047 + 0x110], %g6
+ ldx [%sp + 2047 + 0x118], %g7
+ wrpr %g0, 0x15, %pstate ! restore PROM alternate globals
+ ldx [%sp + 2047 + 0x0b0], %g1
+ ldx [%sp + 2047 + 0x0b8], %g2
+ ldx [%sp + 2047 + 0x0c0], %g3
+ ldx [%sp + 2047 + 0x0c8], %g4
+ ldx [%sp + 2047 + 0x0d0], %g5
+ ldx [%sp + 2047 + 0x0d8], %g6
+ ldx [%sp + 2047 + 0x0e0], %g7
+ wrpr %l4, 0, %pstate
+ ret
+ restore %l1, 0, %o0
+
diff -urN linux/arch/sparc64/prom/Makefile linux/arch/sparc64/prom/Makefile
--- linux/arch/sparc64/prom/Makefile 2003/06/22 23:09:50 1.16
+++ linux/arch/sparc64/prom/Makefile 2005/02/28 15:45:12 1.17
@@ -7,4 +7,4 @@
EXTRA_CFLAGS := -Werror
lib-y := bootstr.o devops.o init.o memory.o misc.o \
- tree.o console.o printf.o p1275.o map.o
+ tree.o console.o printf.o p1275.o map.o cif.o
diff -urN linux/arch/sparc64/prom/p1275.c linux/arch/sparc64/prom/p1275.c
--- linux/arch/sparc64/prom/p1275.c 2005/01/25 04:28:07 1.12
+++ linux/arch/sparc64/prom/p1275.c 2005/02/28 15:45:12 1.13
@@ -27,225 +27,8 @@
extern void prom_world(int);
-void prom_cif_interface (void)
-{
- __asm__ __volatile__ (
-" mov %0, %%o0\n"
-" ldx [%%o0 + 0x010], %%o1 ! prom_cif_stack\n"
-" save %%o1, -0x190, %%sp\n"
-" ldx [%%i0 + 0x008], %%l2 ! prom_cif_handler\n"
-" rdpr %%pstate, %%l4\n"
-" wrpr %%g0, 0x15, %%pstate ! save alternate globals\n"
-" stx %%g1, [%%sp + 2047 + 0x0b0]\n"
-" stx %%g2, [%%sp + 2047 + 0x0b8]\n"
-" stx %%g3, [%%sp + 2047 + 0x0c0]\n"
-" stx %%g4, [%%sp + 2047 + 0x0c8]\n"
-" stx %%g5, [%%sp + 2047 + 0x0d0]\n"
-" stx %%g6, [%%sp + 2047 + 0x0d8]\n"
-" stx %%g7, [%%sp + 2047 + 0x0e0]\n"
-" wrpr %%g0, 0x814, %%pstate ! save interrupt globals\n"
-" stx %%g1, [%%sp + 2047 + 0x0e8]\n"
-" stx %%g2, [%%sp + 2047 + 0x0f0]\n"
-" stx %%g3, [%%sp + 2047 + 0x0f8]\n"
-" stx %%g4, [%%sp + 2047 + 0x100]\n"
-" stx %%g5, [%%sp + 2047 + 0x108]\n"
-" stx %%g6, [%%sp + 2047 + 0x110]\n"
-" stx %%g7, [%%sp + 2047 + 0x118]\n"
-" wrpr %%g0, 0x14, %%pstate ! save normal globals\n"
-" stx %%g1, [%%sp + 2047 + 0x120]\n"
-" stx %%g2, [%%sp + 2047 + 0x128]\n"
-" stx %%g3, [%%sp + 2047 + 0x130]\n"
-" stx %%g4, [%%sp + 2047 + 0x138]\n"
-" stx %%g5, [%%sp + 2047 + 0x140]\n"
-" stx %%g6, [%%sp + 2047 + 0x148]\n"
-" stx %%g7, [%%sp + 2047 + 0x150]\n"
-" wrpr %%g0, 0x414, %%pstate ! save mmu globals\n"
-" stx %%g1, [%%sp + 2047 + 0x158]\n"
-" stx %%g2, [%%sp + 2047 + 0x160]\n"
-" stx %%g3, [%%sp + 2047 + 0x168]\n"
-" stx %%g4, [%%sp + 2047 + 0x170]\n"
-" stx %%g5, [%%sp + 2047 + 0x178]\n"
-" stx %%g6, [%%sp + 2047 + 0x180]\n"
-" stx %%g7, [%%sp + 2047 + 0x188]\n"
-" mov %%g1, %%l0 ! also save to locals, so we can
handle\n"
-" mov %%g2, %%l1 ! tlb faults later on, when accessing\n"
-" mov %%g3, %%l3 ! the stack.\n"
-" mov %%g7, %%l5\n"
-" wrpr %%l4, %1, %%pstate ! turn off interrupts\n"
-" call %%l2\n"
-" add %%i0, 0x018, %%o0 ! prom_args\n"
-" wrpr %%g0, 0x414, %%pstate ! restore mmu globals\n"
-" mov %%l0, %%g1\n"
-" mov %%l1, %%g2\n"
-" mov %%l3, %%g3\n"
-" mov %%l5, %%g7\n"
-" wrpr %%g0, 0x14, %%pstate ! restore normal globals\n"
-" ldx [%%sp + 2047 + 0x120], %%g1\n"
-" ldx [%%sp + 2047 + 0x128], %%g2\n"
-" ldx [%%sp + 2047 + 0x130], %%g3\n"
-" ldx [%%sp + 2047 + 0x138], %%g4\n"
-" ldx [%%sp + 2047 + 0x140], %%g5\n"
-" ldx [%%sp + 2047 + 0x148], %%g6\n"
-" ldx [%%sp + 2047 + 0x150], %%g7\n"
-" wrpr %%g0, 0x814, %%pstate ! restore interrupt globals\n"
-" ldx [%%sp + 2047 + 0x0e8], %%g1\n"
-" ldx [%%sp + 2047 + 0x0f0], %%g2\n"
-" ldx [%%sp + 2047 + 0x0f8], %%g3\n"
-" ldx [%%sp + 2047 + 0x100], %%g4\n"
-" ldx [%%sp + 2047 + 0x108], %%g5\n"
-" ldx [%%sp + 2047 + 0x110], %%g6\n"
-" ldx [%%sp + 2047 + 0x118], %%g7\n"
-" wrpr %%g0, 0x15, %%pstate ! restore alternate globals\n"
-" ldx [%%sp + 2047 + 0x0b0], %%g1\n"
-" ldx [%%sp + 2047 + 0x0b8], %%g2\n"
-" ldx [%%sp + 2047 + 0x0c0], %%g3\n"
-" ldx [%%sp + 2047 + 0x0c8], %%g4\n"
-" ldx [%%sp + 2047 + 0x0d0], %%g5\n"
-" ldx [%%sp + 2047 + 0x0d8], %%g6\n"
-" ldx [%%sp + 2047 + 0x0e0], %%g7\n"
-" wrpr %%l4, 0, %%pstate ! restore original pstate\n"
-" ret\n"
-" restore\n"
-" " : : "r" (&p1275buf), "i" (PSTATE_IE));
-}
-
-void prom_cif_callback(void)
-{
- __asm__ __volatile__ (
-" mov %0, %%o1\n"
-" save %%sp, -0x270, %%sp\n"
-" rdpr %%pstate, %%l4\n"
-" wrpr %%g0, 0x15, %%pstate ! save PROM alternate globals\n"
-" stx %%g1, [%%sp + 2047 + 0x0b0]\n"
-" stx %%g2, [%%sp + 2047 + 0x0b8]\n"
-" stx %%g3, [%%sp + 2047 + 0x0c0]\n"
-" stx %%g4, [%%sp + 2047 + 0x0c8]\n"
-" stx %%g5, [%%sp + 2047 + 0x0d0]\n"
-" stx %%g6, [%%sp + 2047 + 0x0d8]\n"
-" stx %%g7, [%%sp + 2047 + 0x0e0]\n"
-" ! restore Linux alternate globals\n"
-" ldx [%%sp + 2047 + 0x190], %%g1\n"
-" ldx [%%sp + 2047 + 0x198], %%g2\n"
-" ldx [%%sp + 2047 + 0x1a0], %%g3\n"
-" ldx [%%sp + 2047 + 0x1a8], %%g4\n"
-" ldx [%%sp + 2047 + 0x1b0], %%g5\n"
-" ldx [%%sp + 2047 + 0x1b8], %%g6\n"
-" ldx [%%sp + 2047 + 0x1c0], %%g7\n"
-" wrpr %%g0, 0x814, %%pstate ! save PROM interrupt globals\n"
-" stx %%g1, [%%sp + 2047 + 0x0e8]\n"
-" stx %%g2, [%%sp + 2047 + 0x0f0]\n"
-" stx %%g3, [%%sp + 2047 + 0x0f8]\n"
-" stx %%g4, [%%sp + 2047 + 0x100]\n"
-" stx %%g5, [%%sp + 2047 + 0x108]\n"
-" stx %%g6, [%%sp + 2047 + 0x110]\n"
-" stx %%g7, [%%sp + 2047 + 0x118]\n"
-" ! restore Linux interrupt globals\n"
-" ldx [%%sp + 2047 + 0x1c8], %%g1\n"
-" ldx [%%sp + 2047 + 0x1d0], %%g2\n"
-" ldx [%%sp + 2047 + 0x1d8], %%g3\n"
-" ldx [%%sp + 2047 + 0x1e0], %%g4\n"
-" ldx [%%sp + 2047 + 0x1e8], %%g5\n"
-" ldx [%%sp + 2047 + 0x1f0], %%g6\n"
-" ldx [%%sp + 2047 + 0x1f8], %%g7\n"
-" wrpr %%g0, 0x14, %%pstate ! save PROM normal globals\n"
-" stx %%g1, [%%sp + 2047 + 0x120]\n"
-" stx %%g2, [%%sp + 2047 + 0x128]\n"
-" stx %%g3, [%%sp + 2047 + 0x130]\n"
-" stx %%g4, [%%sp + 2047 + 0x138]\n"
-" stx %%g5, [%%sp + 2047 + 0x140]\n"
-" stx %%g6, [%%sp + 2047 + 0x148]\n"
-" stx %%g7, [%%sp + 2047 + 0x150]\n"
-" ! restore Linux normal globals\n"
-" ldx [%%sp + 2047 + 0x200], %%g1\n"
-" ldx [%%sp + 2047 + 0x208], %%g2\n"
-" ldx [%%sp + 2047 + 0x210], %%g3\n"
-" ldx [%%sp + 2047 + 0x218], %%g4\n"
-" ldx [%%sp + 2047 + 0x220], %%g5\n"
-" ldx [%%sp + 2047 + 0x228], %%g6\n"
-" ldx [%%sp + 2047 + 0x230], %%g7\n"
-" wrpr %%g0, 0x414, %%pstate ! save PROM mmu globals\n"
-" stx %%g1, [%%sp + 2047 + 0x158]\n"
-" stx %%g2, [%%sp + 2047 + 0x160]\n"
-" stx %%g3, [%%sp + 2047 + 0x168]\n"
-" stx %%g4, [%%sp + 2047 + 0x170]\n"
-" stx %%g5, [%%sp + 2047 + 0x178]\n"
-" stx %%g6, [%%sp + 2047 + 0x180]\n"
-" stx %%g7, [%%sp + 2047 + 0x188]\n"
-" ! restore Linux mmu globals\n"
-" ldx [%%sp + 2047 + 0x238], %%o0\n"
-" ldx [%%sp + 2047 + 0x240], %%o1\n"
-" ldx [%%sp + 2047 + 0x248], %%l2\n"
-" ldx [%%sp + 2047 + 0x250], %%l3\n"
-" ldx [%%sp + 2047 + 0x258], %%l5\n"
-" ldx [%%sp + 2047 + 0x260], %%l6\n"
-" ldx [%%sp + 2047 + 0x268], %%l7\n"
-" ! switch to Linux tba\n"
-" sethi %%hi(sparc64_ttable_tl0), %%l1\n"
-" rdpr %%tba, %%l0 ! save PROM tba\n"
-" mov %%o0, %%g1\n"
-" mov %%o1, %%g2\n"
-" mov %%l2, %%g3\n"
-" mov %%l3, %%g4\n"
-" mov %%l5, %%g5\n"
-" mov %%l6, %%g6\n"
-" mov %%l7, %%g7\n"
-" wrpr %%l1, %%tba ! install Linux tba\n"
-" wrpr %%l4, 0, %%pstate ! restore PSTATE\n"
-" call prom_world\n"
-" mov %%g0, %%o0\n"
-" ldx [%%i1 + 0x000], %%l2\n"
-" call %%l2\n"
-" mov %%i0, %%o0\n"
-" mov %%o0, %%l1\n"
-" call prom_world\n"
-" or %%g0, 1, %%o0\n"
-" wrpr %%g0, 0x14, %%pstate ! interrupts off\n"
-" ! restore PROM mmu globals\n"
-" ldx [%%sp + 2047 + 0x158], %%o0\n"
-" ldx [%%sp + 2047 + 0x160], %%o1\n"
-" ldx [%%sp + 2047 + 0x168], %%l2\n"
-" ldx [%%sp + 2047 + 0x170], %%l3\n"
-" ldx [%%sp + 2047 + 0x178], %%l5\n"
-" ldx [%%sp + 2047 + 0x180], %%l6\n"
-" ldx [%%sp + 2047 + 0x188], %%l7\n"
-" wrpr %%g0, 0x414, %%pstate ! restore PROM mmu globals\n"
-" mov %%o0, %%g1\n"
-" mov %%o1, %%g2\n"
-" mov %%l2, %%g3\n"
-" mov %%l3, %%g4\n"
-" mov %%l5, %%g5\n"
-" mov %%l6, %%g6\n"
-" mov %%l7, %%g7\n"
-" wrpr %%l0, %%tba ! restore PROM tba\n"
-" wrpr %%g0, 0x14, %%pstate ! restore PROM normal globals\n"
-" ldx [%%sp + 2047 + 0x120], %%g1\n"
-" ldx [%%sp + 2047 + 0x128], %%g2\n"
-" ldx [%%sp + 2047 + 0x130], %%g3\n"
-" ldx [%%sp + 2047 + 0x138], %%g4\n"
-" ldx [%%sp + 2047 + 0x140], %%g5\n"
-" ldx [%%sp + 2047 + 0x148], %%g6\n"
-" ldx [%%sp + 2047 + 0x150], %%g7\n"
-" wrpr %%g0, 0x814, %%pstate ! restore PROM interrupt globals\n"
-" ldx [%%sp + 2047 + 0x0e8], %%g1\n"
-" ldx [%%sp + 2047 + 0x0f0], %%g2\n"
-" ldx [%%sp + 2047 + 0x0f8], %%g3\n"
-" ldx [%%sp + 2047 + 0x100], %%g4\n"
-" ldx [%%sp + 2047 + 0x108], %%g5\n"
-" ldx [%%sp + 2047 + 0x110], %%g6\n"
-" ldx [%%sp + 2047 + 0x118], %%g7\n"
-" wrpr %%g0, 0x15, %%pstate ! restore PROM alternate globals\n"
-" ldx [%%sp + 2047 + 0x0b0], %%g1\n"
-" ldx [%%sp + 2047 + 0x0b8], %%g2\n"
-" ldx [%%sp + 2047 + 0x0c0], %%g3\n"
-" ldx [%%sp + 2047 + 0x0c8], %%g4\n"
-" ldx [%%sp + 2047 + 0x0d0], %%g5\n"
-" ldx [%%sp + 2047 + 0x0d8], %%g6\n"
-" ldx [%%sp + 2047 + 0x0e0], %%g7\n"
-" wrpr %%l4, 0, %%pstate\n"
-" ret\n"
-" restore %%l1, 0, %%o0\n"
-" " : : "r" (&p1275buf), "i" (PSTATE_PRIV));
-}
+extern void prom_cif_interface(void);
+extern void prom_cif_callback(void);
/*
* This provides SMP safety on the p1275buf. prom_callback() drops this lock
diff -urN linux/arch/x86_64/kernel/setup.c linux/arch/x86_64/kernel/setup.c
--- linux/arch/x86_64/kernel/setup.c 2005/02/07 02:54:39 1.39
+++ linux/arch/x86_64/kernel/setup.c 2005/02/28 15:45:12 1.40
@@ -111,15 +111,24 @@
char command_line[COMMAND_LINE_SIZE];
struct resource standard_io_resources[] = {
- { "dma1", 0x00, 0x1f, IORESOURCE_BUSY | IORESOURCE_IO },
- { "pic1", 0x20, 0x21, IORESOURCE_BUSY | IORESOURCE_IO },
- { "timer0", 0x40, 0x43, IORESOURCE_BUSY | IORESOURCE_IO },
- { "timer1", 0x50, 0x53, IORESOURCE_BUSY | IORESOURCE_IO },
- { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY | IORESOURCE_IO },
- { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY | IORESOURCE_IO },
- { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY | IORESOURCE_IO },
- { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY | IORESOURCE_IO },
- { "fpu", 0xf0, 0xff, IORESOURCE_BUSY | IORESOURCE_IO }
+ { .name = "dma1", .start = 0x00, .end = 0x1f,
+ .flags = IORESOURCE_BUSY | IORESOURCE_IO },
+ { .name = "pic1", .start = 0x20, .end = 0x21,
+ .flags = IORESOURCE_BUSY | IORESOURCE_IO },
+ { .name = "timer0", .start = 0x40, .end = 0x43,
+ .flags = IORESOURCE_BUSY | IORESOURCE_IO },
+ { .name = "timer1", .start = 0x50, .end = 0x53,
+ .flags = IORESOURCE_BUSY | IORESOURCE_IO },
+ { .name = "keyboard", .start = 0x60, .end = 0x6f,
+ .flags = IORESOURCE_BUSY | IORESOURCE_IO },
+ { .name = "dma page reg", .start = 0x80, .end = 0x8f,
+ .flags = IORESOURCE_BUSY | IORESOURCE_IO },
+ { .name = "pic2", .start = 0xa0, .end = 0xa1,
+ .flags = IORESOURCE_BUSY | IORESOURCE_IO },
+ { .name = "dma2", .start = 0xc0, .end = 0xdf,
+ .flags = IORESOURCE_BUSY | IORESOURCE_IO },
+ { .name = "fpu", .start = 0xf0, .end = 0xff,
+ .flags = IORESOURCE_BUSY | IORESOURCE_IO }
};
#define STANDARD_IO_RESOURCES \
@@ -127,28 +136,66 @@
#define IORESOURCE_RAM (IORESOURCE_BUSY | IORESOURCE_MEM)
-struct resource data_resource = { "Kernel data", 0, 0, IORESOURCE_RAM };
-struct resource code_resource = { "Kernel code", 0, 0, IORESOURCE_RAM };
+struct resource data_resource = {
+ .name = "Kernel data",
+ .start = 0,
+ .end = 0,
+ .flags = IORESOURCE_RAM,
+};
+struct resource code_resource = {
+ .name = "Kernel code",
+ .start = 0,
+ .end = 0,
+ .flags = IORESOURCE_RAM,
+};
#define IORESOURCE_ROM (IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM)
-static struct resource system_rom_resource = { "System ROM", 0xf0000, 0xfffff,
IORESOURCE_ROM };
-static struct resource extension_rom_resource = { "Extension ROM", 0xe0000,
0xeffff, IORESOURCE_ROM };
+static struct resource system_rom_resource = {
+ .name = "System ROM",
+ .start = 0xf0000,
+ .end = 0xfffff,
+ .flags = IORESOURCE_ROM,
+};
+
+static struct resource extension_rom_resource = {
+ .name = "Extension ROM",
+ .start = 0xe0000,
+ .end = 0xeffff,
+ .flags = IORESOURCE_ROM,
+};
static struct resource adapter_rom_resources[] = {
- { "Adapter ROM", 0xc8000, 0, IORESOURCE_ROM },
- { "Adapter ROM", 0, 0, IORESOURCE_ROM },
- { "Adapter ROM", 0, 0, IORESOURCE_ROM },
- { "Adapter ROM", 0, 0, IORESOURCE_ROM },
- { "Adapter ROM", 0, 0, IORESOURCE_ROM },
- { "Adapter ROM", 0, 0, IORESOURCE_ROM }
+ { .name = "Adapter ROM", .start = 0xc8000, .end = 0,
+ .flags = IORESOURCE_ROM },
+ { .name = "Adapter ROM", .start = 0, .end = 0,
+ .flags = IORESOURCE_ROM },
+ { .name = "Adapter ROM", .start = 0, .end = 0,
+ .flags = IORESOURCE_ROM },
+ { .name = "Adapter ROM", .start = 0, .end = 0,
+ .flags = IORESOURCE_ROM },
+ { .name = "Adapter ROM", .start = 0, .end = 0,
+ .flags = IORESOURCE_ROM },
+ { .name = "Adapter ROM", .start = 0, .end = 0,
+ .flags = IORESOURCE_ROM }
};
#define ADAPTER_ROM_RESOURCES \
(sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
-static struct resource video_rom_resource = { "Video ROM", 0xc0000, 0xc7fff,
IORESOURCE_ROM };
-static struct resource video_ram_resource = { "Video RAM area", 0xa0000,
0xbffff, IORESOURCE_RAM };
+static struct resource video_rom_resource = {
+ .name = "Video ROM",
+ .start = 0xc0000,
+ .end = 0xc7fff,
+ .flags = IORESOURCE_ROM,
+};
+
+static struct resource video_ram_resource = {
+ .name = "Video RAM area",
+ .start = 0xa0000,
+ .end = 0xbffff,
+ .flags = IORESOURCE_RAM,
+};
#define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
diff -urN linux/drivers/acpi/Kconfig linux/drivers/acpi/Kconfig
--- linux/drivers/acpi/Kconfig 2005/01/25 04:28:09 1.21
+++ linux/drivers/acpi/Kconfig 2005/02/28 15:45:12 1.22
@@ -259,6 +259,7 @@
config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year"
+ depends on ACPI_INTERPRETER
default 0
help
enter a 4-digit year, eg. 2001 to disable ACPI by default
diff -urN linux/drivers/acpi/dispatcher/dswexec.c
linux/drivers/acpi/dispatcher/dswexec.c
--- linux/drivers/acpi/dispatcher/dswexec.c 2005/02/07 02:54:40 1.24
+++ linux/drivers/acpi/dispatcher/dswexec.c 2005/02/28 15:45:13 1.25
@@ -578,6 +578,13 @@
break;
}
+ /* Done with this result state (Now that operand stack
is built) */
+
+ status = acpi_ds_result_stack_pop (walk_state);
+ if (ACPI_FAILURE (status)) {
+ goto cleanup;
+ }
+
/*
* If a result object was returned from above, push it
on the
* current result stack
diff -urN linux/drivers/acpi/executer/exoparg6.c
linux/drivers/acpi/executer/exoparg6.c
--- linux/drivers/acpi/executer/exoparg6.c 2005/02/07 02:54:40 1.9
+++ linux/drivers/acpi/executer/exoparg6.c 2005/02/28 15:45:13 1.10
@@ -81,75 +81,119 @@
* FUNCTION: acpi_ex_do_match
*
* PARAMETERS: match_op - The AML match operand
- * package_value - Value from the target package
- * match_value - Value to be matched
+ * package_obj - Object from the target package
+ * match_obj - Object to be matched
*
* RETURN: TRUE if the match is successful, FALSE otherwise
*
- * DESCRIPTION: Implements the low-level match for the ASL Match operator
+ * DESCRIPTION: Implements the low-level match for the ASL Match operator.
+ * Package elements will be implicitly converted to the type of
+ * the match object (Integer/Buffer/String).
*
******************************************************************************/
u8
acpi_ex_do_match (
u32 match_op,
- acpi_integer package_value,
- acpi_integer match_value)
+ union acpi_operand_object *package_obj,
+ union acpi_operand_object *match_obj)
{
+ u8 logical_result = TRUE;
+ acpi_status status;
+
+ /*
+ * Note: Since the package_obj/match_obj ordering is opposite to that of
+ * the standard logical operators, we have to reverse them when we call
+ * do_logical_op in order to make the implicit conversion rules work
+ * correctly. However, this means we have to flip the entire equation
+ * also. A bit ugly perhaps, but overall, better than fussing the
+ * parameters around at runtime, over and over again.
+ *
+ * Below, P[i] refers to the package element, M refers to the Match
object.
+ */
switch (match_op) {
- case MATCH_MTR: /* always true */
+ case MATCH_MTR:
- break;
+ /* Always true */
+ break;
- case MATCH_MEQ: /* true if equal */
+ case MATCH_MEQ:
- if (package_value != match_value) {
+ /*
+ * True if equal: (P[i] == M)
+ * Change to: (M == P[i])
+ */
+ status = acpi_ex_do_logical_op (AML_LEQUAL_OP, match_obj,
package_obj,
+ &logical_result);
+ if (ACPI_FAILURE (status)) {
return (FALSE);
}
break;
+ case MATCH_MLE:
- case MATCH_MLE: /* true if less than or equal */
-
- if (package_value > match_value) {
+ /*
+ * True if less than or equal: (P[i] <= M) (P[i] not_greater
than M)
+ * Change to: (M >= P[i]) (M not_less than
P[i])
+ */
+ status = acpi_ex_do_logical_op (AML_LLESS_OP, match_obj,
package_obj,
+ &logical_result);
+ if (ACPI_FAILURE (status)) {
return (FALSE);
}
+ logical_result = (u8) !logical_result;
break;
+ case MATCH_MLT:
- case MATCH_MLT: /* true if less than */
-
- if (package_value >= match_value) {
+ /*
+ * True if less than: (P[i] < M)
+ * Change to: (M > P[i])
+ */
+ status = acpi_ex_do_logical_op (AML_LGREATER_OP, match_obj,
package_obj,
+ &logical_result);
+ if (ACPI_FAILURE (status)) {
return (FALSE);
}
break;
+ case MATCH_MGE:
- case MATCH_MGE: /* true if greater than or equal */
-
- if (package_value < match_value) {
+ /*
+ * True if greater than or equal: (P[i] >= M) (P[i] not_less
than M)
+ * Change to: (M <= P[i]) (M not_greater
than P[i])
+ */
+ status = acpi_ex_do_logical_op (AML_LGREATER_OP, match_obj,
package_obj,
+ &logical_result);
+ if (ACPI_FAILURE (status)) {
return (FALSE);
}
+ logical_result = (u8)!logical_result;
break;
+ case MATCH_MGT:
- case MATCH_MGT: /* true if greater than */
-
- if (package_value <= match_value) {
+ /*
+ * True if greater than: (P[i] > M)
+ * Change to: (M < P[i])
+ */
+ status = acpi_ex_do_logical_op (AML_LLESS_OP, match_obj,
package_obj,
+ &logical_result);
+ if (ACPI_FAILURE (status)) {
return (FALSE);
}
break;
+ default:
- default: /* undefined */
+ /* Undefined */
return (FALSE);
}
-
- return TRUE;
+ return logical_result;
}
@@ -182,19 +226,21 @@
switch (walk_state->opcode) {
case AML_MATCH_OP:
/*
- * Match (search_package[0], match_op1[1], match_object1[2],
- * match_op2[3], match_object2[4],
start_index[5])
+ * Match (search_pkg[0], match_op1[1], match_obj1[2],
+ * match_op2[3], match_obj2[4],
start_index[5])
*/
- /* Validate match comparison sub-opcodes */
+ /* Validate both Match Term Operators (MTR, MEQ, etc.) */
if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) ||
(operand[3]->integer.value > MAX_MATCH_OPERATOR)) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "operation encoding
out of range\n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Match operator out
of range\n"));
status = AE_AML_OPERAND_VALUE;
goto cleanup;
}
+ /* Get the package start_index, validate against the package
length */
+
index = (u32) operand[5]->integer.value;
if (index >= (u32) operand[0]->package.count) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Index beyond package
end\n"));
@@ -202,6 +248,8 @@
goto cleanup;
}
+ /* Create an integer for the return value */
+
return_desc = acpi_ut_create_internal_object
(ACPI_TYPE_INTEGER);
if (!return_desc) {
status = AE_NO_MEMORY;
@@ -214,37 +262,39 @@
return_desc->integer.value = ACPI_INTEGER_MAX;
/*
- * Examine each element until a match is found. Within the
loop,
+ * Examine each element until a match is found. Both match
conditions
+ * must be satisfied for a match to occur. Within the loop,
* "continue" signifies that the current element does not match
* and the next should be examined.
*
* Upon finding a match, the loop will terminate via "break" at
- * the bottom. If it terminates "normally", match_value will
be -1
- * (its initial value) indicating that no match was found. When
- * returned as a Number, this will produce the Ones value as
specified.
+ * the bottom. If it terminates "normally", match_value will be
+ * ACPI_INTEGER_MAX (Ones) (its initial value) indicating that
no
+ * match was found.
*/
for ( ; index < operand[0]->package.count; index++) {
+ /* Get the current package element */
+
this_element = operand[0]->package.elements[index];
- /*
- * Treat any NULL or non-numeric elements as
non-matching.
- */
- if (!this_element ||
- ACPI_GET_OBJECT_TYPE (this_element) !=
ACPI_TYPE_INTEGER) {
+ /* Treat any uninitialized (NULL) elements as
non-matching */
+
+ if (!this_element) {
continue;
}
/*
- * "continue" (proceed to next iteration of enclosing
- * "for" loop) signifies a non-match.
+ * Both match conditions must be satisfied. Execution
of a continue
+ * (proceed to next iteration of enclosing for loop)
signifies a
+ * non-match.
*/
if (!acpi_ex_do_match ((u32) operand[1]->integer.value,
- this_element->integer.value,
operand[2]->integer.value)) {
+ this_element, operand[2])) {
continue;
}
if (!acpi_ex_do_match ((u32) operand[3]->integer.value,
- this_element->integer.value,
operand[4]->integer.value)) {
+ this_element, operand[4])) {
continue;
}
@@ -253,7 +303,6 @@
return_desc->integer.value = index;
break;
}
-
break;
diff -urN linux/drivers/acpi/executer/exresop.c
linux/drivers/acpi/executer/exresop.c
--- linux/drivers/acpi/executer/exresop.c 2005/02/07 02:54:41 1.22
+++ linux/drivers/acpi/executer/exresop.c 2005/02/28 15:45:13 1.23
@@ -312,7 +312,7 @@
goto next_operand;
- case ARGI_ANYTYPE:
+ case ARGI_DATAREFOBJ: /* Store operator only */
/*
* We don't want to resolve index_op reference objects
during
diff -urN linux/drivers/acpi/executer/exstoren.c
linux/drivers/acpi/executer/exstoren.c
--- linux/drivers/acpi/executer/exstoren.c 2005/02/07 02:54:41 1.18
+++ linux/drivers/acpi/executer/exstoren.c 2005/02/28 15:45:13 1.19
@@ -206,6 +206,7 @@
{
union acpi_operand_object *actual_src_desc;
acpi_status status = AE_OK;
+ acpi_object_type original_src_type;
ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_object", source_desc);
@@ -222,7 +223,8 @@
return_ACPI_STATUS (status);
}
- if (ACPI_GET_OBJECT_TYPE (source_desc) != ACPI_GET_OBJECT_TYPE
(dest_desc)) {
+ original_src_type = ACPI_GET_OBJECT_TYPE (source_desc);
+ if (original_src_type != ACPI_GET_OBJECT_TYPE (dest_desc)) {
/*
* The source type does not match the type of the destination.
* Perform the "implicit conversion" of the source to the
current type
@@ -232,15 +234,15 @@
* Otherwise, actual_src_desc is a temporary object to hold the
* converted object.
*/
- status = acpi_ex_convert_to_target_type (ACPI_GET_OBJECT_TYPE
(dest_desc), source_desc,
- &actual_src_desc, walk_state);
+ status = acpi_ex_convert_to_target_type (ACPI_GET_OBJECT_TYPE
(dest_desc),
+ source_desc, &actual_src_desc, walk_state);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
if (source_desc == actual_src_desc) {
/*
- * No conversion was performed. Return the source_desc
as the
+ * No conversion was performed. Return the source_desc
as the
* new object.
*/
*new_desc = source_desc;
@@ -269,12 +271,18 @@
case ACPI_TYPE_BUFFER:
- status = acpi_ex_store_buffer_to_buffer (actual_src_desc,
dest_desc);
+ /*
+ * Note: There is different store behavior depending on the
original
+ * source type
+ */
+ status = acpi_ex_store_buffer_to_buffer (original_src_type,
actual_src_desc,
+ dest_desc);
break;
case ACPI_TYPE_PACKAGE:
- status = acpi_ut_copy_iobject_to_iobject (actual_src_desc,
&dest_desc, walk_state);
+ status = acpi_ut_copy_iobject_to_iobject (actual_src_desc,
&dest_desc,
+ walk_state);
break;
default:
diff -urN linux/drivers/acpi/executer/exstorob.c
linux/drivers/acpi/executer/exstorob.c
--- linux/drivers/acpi/executer/exstorob.c 2005/02/07 02:54:41 1.16
+++ linux/drivers/acpi/executer/exstorob.c 2005/02/28 15:45:13 1.17
@@ -66,6 +66,7 @@
acpi_status
acpi_ex_store_buffer_to_buffer (
+ acpi_object_type original_src_type,
union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc)
{
@@ -104,9 +105,16 @@
ACPI_MEMSET (target_desc->buffer.pointer, 0,
target_desc->buffer.length);
ACPI_MEMCPY (target_desc->buffer.pointer, buffer, length);
- /* Set the new length of the target */
+ /*
+ * If the original source was a string, we must truncate the
buffer,
+ * according to the ACPI spec. Integer-to-Buffer and
Buffer-to-Buffer
+ * copy must not truncate the original buffer.
+ */
+ if (original_src_type == ACPI_TYPE_STRING) {
+ /* Set the new length of the target */
- target_desc->buffer.length = length;
+ target_desc->buffer.length = length;
+ }
}
else {
/* Truncate the source, copy only what will fit */
diff -urN linux/drivers/acpi/namespace/nsxfname.c
linux/drivers/acpi/namespace/nsxfname.c
--- linux/drivers/acpi/namespace/nsxfname.c 2005/02/07 02:54:41 1.22
+++ linux/drivers/acpi/namespace/nsxfname.c 2005/02/28 15:45:13 1.23
@@ -237,7 +237,7 @@
{
acpi_status status;
struct acpi_namespace_node *node;
- struct acpi_device_info info;
+ struct acpi_device_info *info;
struct acpi_device_info *return_info;
struct acpi_compatible_id_list *cid_list = NULL;
acpi_size size;
@@ -254,55 +254,59 @@
return (status);
}
+ info = ACPI_MEM_CALLOCATE (sizeof (struct acpi_device_info));
+ if (!info) {
+ return (AE_NO_MEMORY);
+ }
+
status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (status)) {
- return (status);
+ goto cleanup;
}
node = acpi_ns_map_handle_to_node (handle);
if (!node) {
(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
- return (AE_BAD_PARAMETER);
+ goto cleanup;
}
/* Init return structure */
size = sizeof (struct acpi_device_info);
- ACPI_MEMSET (&info, 0, size);
- info.type = node->type;
- info.name = node->name.integer;
- info.valid = 0;
+ info->type = node->type;
+ info->name = node->name.integer;
+ info->valid = 0;
status = acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (status)) {
- return (status);
+ goto cleanup;
}
/* If not a device, we are all done */
- if (info.type == ACPI_TYPE_DEVICE) {
+ if (info->type == ACPI_TYPE_DEVICE) {
/*
* Get extra info for ACPI Devices objects only:
* Run the Device _HID, _UID, _CID, _STA, _ADR and _sx_d
methods.
*
* Note: none of these methods are required, so they may or may
- * not be present for this device. The Info.Valid bitfield is
used
+ * not be present for this device. The Info->Valid bitfield is
used
* to indicate which methods were found and ran successfully.
*/
/* Execute the Device._HID method */
- status = acpi_ut_execute_HID (node, &info.hardware_id);
+ status = acpi_ut_execute_HID (node, &info->hardware_id);
if (ACPI_SUCCESS (status)) {
- info.valid |= ACPI_VALID_HID;
+ info->valid |= ACPI_VALID_HID;
}
/* Execute the Device._UID method */
- status = acpi_ut_execute_UID (node, &info.unique_id);
+ status = acpi_ut_execute_UID (node, &info->unique_id);
if (ACPI_SUCCESS (status)) {
- info.valid |= ACPI_VALID_UID;
+ info->valid |= ACPI_VALID_UID;
}
/* Execute the Device._CID method */
@@ -311,32 +315,30 @@
if (ACPI_SUCCESS (status)) {
size += ((acpi_size) cid_list->count - 1) *
sizeof (struct acpi_compatible_id);
- info.valid |= ACPI_VALID_CID;
+ info->valid |= ACPI_VALID_CID;
}
/* Execute the Device._STA method */
- status = acpi_ut_execute_STA (node, &info.current_status);
+ status = acpi_ut_execute_STA (node, &info->current_status);
if (ACPI_SUCCESS (status)) {
- info.valid |= ACPI_VALID_STA;
+ info->valid |= ACPI_VALID_STA;
}
/* Execute the Device._ADR method */
status = acpi_ut_evaluate_numeric_object (METHOD_NAME__ADR,
node,
- &info.address);
+ &info->address);
if (ACPI_SUCCESS (status)) {
- info.valid |= ACPI_VALID_ADR;
+ info->valid |= ACPI_VALID_ADR;
}
/* Execute the Device._sx_d methods */
- status = acpi_ut_execute_sxds (node, info.highest_dstates);
+ status = acpi_ut_execute_sxds (node, info->highest_dstates);
if (ACPI_SUCCESS (status)) {
- info.valid |= ACPI_VALID_SXDS;
+ info->valid |= ACPI_VALID_SXDS;
}
-
- status = AE_OK;
}
/* Validate/Allocate/Clear caller buffer */
@@ -349,7 +351,7 @@
/* Populate the return buffer */
return_info = buffer->pointer;
- ACPI_MEMCPY (return_info, &info, sizeof (struct acpi_device_info));
+ ACPI_MEMCPY (return_info, info, sizeof (struct acpi_device_info));
if (cid_list) {
ACPI_MEMCPY (&return_info->compatibility_id, cid_list,
cid_list->size);
@@ -357,6 +359,7 @@
cleanup:
+ ACPI_MEM_FREE (info);
if (cid_list) {
ACPI_MEM_FREE (cid_list);
}
diff -urN linux/drivers/acpi/parser/psopcode.c
linux/drivers/acpi/parser/psopcode.c
--- linux/drivers/acpi/parser/psopcode.c 2005/02/07 02:54:42 1.25
+++ linux/drivers/acpi/parser/psopcode.c 2005/02/28 15:45:13 1.26
@@ -289,7 +289,7 @@
#define ARGI_LOCAL6 ARG_NONE
#define ARGI_LOCAL7 ARG_NONE
#define ARGI_LOR_OP ARGI_LIST2 (ARGI_INTEGER,
ARGI_INTEGER)
-#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE,
ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER,
ARGI_INTEGER)
+#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE,
ARGI_INTEGER, ARGI_COMPUTEDATA,
ARGI_INTEGER,ARGI_COMPUTEDATA,ARGI_INTEGER)
#define ARGI_METHOD_OP ARGI_INVALID_OPCODE
#define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE
#define ARGI_MID_OP ARGI_LIST4
(ARGI_BUFFER_OR_STRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
diff -urN linux/drivers/acpi/tables/tbconvrt.c
linux/drivers/acpi/tables/tbconvrt.c
--- linux/drivers/acpi/tables/tbconvrt.c 2005/02/07 02:54:42 1.27
+++ linux/drivers/acpi/tables/tbconvrt.c 2005/02/28 15:45:13 1.28
@@ -269,8 +269,8 @@
* that immediately follows.
*/
ACPI_MEMCPY (&local_fadt->reset_register,
- &((struct fadt_descriptor_rev2_minus *)
original_fadt)->reset_register,
- sizeof (struct acpi_generic_address) + 1);
+ &(ACPI_CAST_PTR (struct fadt_descriptor_rev2_minus,
original_fadt))->reset_register,
+ sizeof (struct acpi_generic_address) + 1);
}
else {
/*
diff -urN linux/drivers/block/ub.c linux/drivers/block/ub.c
--- linux/drivers/block/ub.c 2005/01/25 04:28:11 1.6
+++ linux/drivers/block/ub.c 2005/02/28 15:45:13 1.7
@@ -300,6 +300,11 @@
/*
*/
+static int ub_bd_rq_fn_1(struct ub_dev *sc, struct request *rq);
+static int ub_cmd_build_block(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
+ struct request *rq);
+static int ub_cmd_build_packet(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
+ struct request *rq);
static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
static void ub_end_rq(struct request *rq, int uptodate);
static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
@@ -591,40 +596,73 @@
* The request function is our main entry point
*/
-static inline int ub_bd_rq_fn_1(request_queue_t *q)
+static void ub_bd_rq_fn(request_queue_t *q)
{
-#if 0
- int writing = 0, pci_dir, i, n_elem;
- u32 tmp;
- unsigned int msg_size;
-#endif
struct ub_dev *sc = q->queuedata;
struct request *rq;
-#if 0 /* We use rq->buffer for now */
- struct scatterlist *sg;
- int n_elem;
-#endif
+
+ while ((rq = elv_next_request(q)) != NULL) {
+ if (ub_bd_rq_fn_1(sc, rq) != 0) {
+ blk_stop_queue(q);
+ break;
+ }
+ }
+}
+
+static int ub_bd_rq_fn_1(struct ub_dev *sc, struct request *rq)
+{
struct ub_scsi_cmd *cmd;
- int ub_dir;
- unsigned int block, nblks;
int rc;
- if ((rq = elv_next_request(q)) == NULL)
- return 1;
-
if (atomic_read(&sc->poison) || sc->changed) {
blkdev_dequeue_request(rq);
ub_end_rq(rq, 0);
return 0;
}
- if ((cmd = ub_get_cmd(sc)) == NULL) {
- blk_stop_queue(q);
- return 1;
- }
+ if ((cmd = ub_get_cmd(sc)) == NULL)
+ return -1;
+ memset(cmd, 0, sizeof(struct ub_scsi_cmd));
blkdev_dequeue_request(rq);
+ if (blk_pc_request(rq)) {
+ rc = ub_cmd_build_packet(sc, cmd, rq);
+ } else {
+ rc = ub_cmd_build_block(sc, cmd, rq);
+ }
+ if (rc != 0) {
+ ub_put_cmd(sc, cmd);
+ ub_end_rq(rq, 0);
+ blk_start_queue(sc->disk->queue);
+ return 0;
+ }
+
+ cmd->state = UB_CMDST_INIT;
+ cmd->done = ub_rw_cmd_done;
+ cmd->back = rq;
+
+ cmd->tag = sc->tagcnt++;
+ if ((rc = ub_submit_scsi(sc, cmd)) != 0) {
+ ub_put_cmd(sc, cmd);
+ ub_end_rq(rq, 0);
+ blk_start_queue(sc->disk->queue);
+ return 0;
+ }
+
+ return 0;
+}
+
+static int ub_cmd_build_block(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
+ struct request *rq)
+{
+ int ub_dir;
+#if 0 /* We use rq->buffer for now */
+ struct scatterlist *sg;
+ int n_elem;
+#endif
+ unsigned int block, nblks;
+
if (rq_data_dir(rq) == WRITE)
ub_dir = UB_DIR_WRITE;
else
@@ -652,6 +690,7 @@
return 0;
}
#endif
+
/*
* XXX Unfortunately, this check does not work. It is quite possible
* to get bogus non-null rq->buffer if you allow sg by mistake.
@@ -663,13 +702,12 @@
*/
static int do_print = 1;
if (do_print) {
- printk(KERN_WARNING "%s: unmapped request\n", sc->name);
+ printk(KERN_WARNING "%s: unmapped block request"
+ " flags 0x%lx sectors %lu\n",
+ sc->name, rq->flags, rq->nr_sectors);
do_print = 0;
}
- ub_put_cmd(sc, cmd);
- ub_end_rq(rq, 0);
- blk_start_queue(q);
- return 0;
+ return -1;
}
/*
@@ -681,7 +719,6 @@
block = rq->sector >> sc->capacity.bshift;
nblks = rq->nr_sectors >> sc->capacity.bshift;
- memset(cmd, 0, sizeof(struct ub_scsi_cmd));
cmd->cdb[0] = (ub_dir == UB_DIR_READ)? READ_10: WRITE_10;
/* 10-byte uses 4 bytes of LBA: 2147483648KB, 2097152MB, 2048GB */
cmd->cdb[2] = block >> 24;
@@ -691,27 +728,44 @@
cmd->cdb[7] = nblks >> 8;
cmd->cdb[8] = nblks;
cmd->cdb_len = 10;
+
cmd->dir = ub_dir;
- cmd->state = UB_CMDST_INIT;
cmd->data = rq->buffer;
cmd->len = rq->nr_sectors * 512;
- cmd->done = ub_rw_cmd_done;
- cmd->back = rq;
-
- cmd->tag = sc->tagcnt++;
- if ((rc = ub_submit_scsi(sc, cmd)) != 0) {
- ub_put_cmd(sc, cmd);
- ub_end_rq(rq, 0);
- blk_start_queue(q);
- return 0;
- }
return 0;
}
-static void ub_bd_rq_fn(request_queue_t *q)
+static int ub_cmd_build_packet(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
+ struct request *rq)
{
- do { } while (ub_bd_rq_fn_1(q) == 0);
+
+ if (rq->data_len != 0 && rq->data == NULL) {
+ static int do_print = 1;
+ if (do_print) {
+ printk(KERN_WARNING "%s: unmapped packet request"
+ " flags 0x%lx length %d\n",
+ sc->name, rq->flags, rq->data_len);
+ do_print = 0;
+ }
+ return -1;
+ }
+
+ memcpy(&cmd->cdb, rq->cmd, rq->cmd_len);
+ cmd->cdb_len = rq->cmd_len;
+
+ if (rq->data_len == 0) {
+ cmd->dir = UB_DIR_NONE;
+ } else {
+ if (rq_data_dir(rq) == WRITE)
+ cmd->dir = UB_DIR_WRITE;
+ else
+ cmd->dir = UB_DIR_READ;
+ }
+ cmd->data = rq->data;
+ cmd->len = rq->data_len;
+
+ return 0;
}
static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
@@ -721,6 +775,12 @@
request_queue_t *q = disk->queue;
int uptodate;
+ if (blk_pc_request(rq)) {
+ /* UB_SENSE_SIZE is smaller than SCSI_SENSE_BUFFERSIZE */
+ memcpy(rq->sense, sc->top_sense, UB_SENSE_SIZE);
+ rq->sense_len = UB_SENSE_SIZE;
+ }
+
if (cmd->error == 0)
uptodate = 1;
else
@@ -779,6 +839,17 @@
bcb = &sc->work_bcb;
+ /*
+ * ``If the allocation length is eighteen or greater, and a device
+ * server returns less than eithteen bytes of data, the application
+ * client should assume that the bytes not transferred would have been
+ * zeroes had the device server returned those bytes.''
+ *
+ * We zero sense for all commands so that when a packet request
+ * fails it does not return a stale sense.
+ */
+ memset(&sc->top_sense, 0, UB_SENSE_SIZE);
+
/* set up the command wrapper */
bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
bcb->Tag = cmd->tag; /* Endianness is not important */
@@ -1222,14 +1293,6 @@
goto error;
}
- /*
- * ``If the allocation length is eighteen or greater, and a device
- * server returns less than eithteen bytes of data, the application
- * client should assume that the bytes not transferred would have been
- * zeroes had the device server returned those bytes.''
- */
- memset(&sc->top_sense, 0, UB_SENSE_SIZE);
-
scmd = &sc->top_rqs_cmd;
scmd->cdb[0] = REQUEST_SENSE;
scmd->cdb[4] = UB_SENSE_SIZE;
@@ -1495,30 +1558,10 @@
static int ub_bd_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
-// void __user *usermem = (void *) arg;
-// struct carm_port *port = ino->i_bdev->bd_disk->private_data;
-// struct hd_geometry geom;
-
-#if 0
- switch (cmd) {
- case HDIO_GETGEO:
- if (usermem == NULL) // XXX Bizzare. Why?
- return -EINVAL;
-
- geom.heads = (u8) port->dev_geom_head;
- geom.sectors = (u8) port->dev_geom_sect;
- geom.cylinders = port->dev_geom_cyl;
- geom.start = get_start_sect(ino->i_bdev);
-
- if (copy_to_user(usermem, &geom, sizeof(geom)))
- return -EFAULT;
- return 0;
-
- default: ;
- }
-#endif
+ struct gendisk *disk = inode->i_bdev->bd_disk;
+ void __user *usermem = (void __user *) arg;
- return -ENOTTY;
+ return scsi_cmd_ioctl(filp, disk, cmd, usermem);
}
/*
diff -urN linux/drivers/bluetooth/hci_usb.c linux/drivers/bluetooth/hci_usb.c
--- linux/drivers/bluetooth/hci_usb.c 2005/02/13 20:16:21 1.40
+++ linux/drivers/bluetooth/hci_usb.c 2005/02/28 15:45:13 1.41
@@ -108,7 +108,7 @@
{ USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 },
/* Microsoft Wireless Transceiver for Bluetooth 2.0 */
- { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_BCM92035 },
+ { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET },
/* ISSC Bluetooth Adapter v3.1 */
{ USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET },
diff -urN linux/drivers/char/n_tty.c linux/drivers/char/n_tty.c
--- linux/drivers/char/n_tty.c 2005/02/07 02:54:43 1.46
+++ linux/drivers/char/n_tty.c 2005/02/28 15:45:14 1.47
@@ -317,8 +317,6 @@
return 0;
if (nr > space)
nr = space;
- if (nr > sizeof(buf))
- nr = sizeof(buf);
for (i = 0, cp = buf; i < nr; i++, cp++) {
switch (*cp) {
diff -urN linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
--- linux/drivers/char/tty_io.c 2005/02/13 20:16:21 1.130
+++ linux/drivers/char/tty_io.c 2005/02/28 15:45:14 1.131
@@ -1047,8 +1047,13 @@
*
* But if TTY_NO_WRITE_SPLIT is set, we should use a
* big chunk-size..
+ *
+ * The default chunk-size is 2kB, because the NTTY
+ * layer has problems with bigger chunks. It will
+ * claim to be able to handle more characters than
+ * it actually does.
*/
- chunk = 4096;
+ chunk = 2048;
if (test_bit(TTY_NO_WRITE_SPLIT, &tty->flags))
chunk = 65536;
if (count < chunk)
diff -urN linux/drivers/char/ipmi/ipmi_msghandler.c
linux/drivers/char/ipmi/ipmi_msghandler.c
--- linux/drivers/char/ipmi/ipmi_msghandler.c 2005/01/25 04:28:13 1.15
+++ linux/drivers/char/ipmi/ipmi_msghandler.c 2005/02/28 15:45:14 1.16
@@ -443,6 +443,9 @@
return sizeof(struct ipmi_ipmb_addr);
}
+ if (addr_type == IPMI_LAN_ADDR_TYPE)
+ return sizeof(struct ipmi_lan_addr);
+
return 0;
}
diff -urN linux/drivers/ide/Kconfig linux/drivers/ide/Kconfig
--- linux/drivers/ide/Kconfig 2004/11/15 11:49:26 1.34
+++ linux/drivers/ide/Kconfig 2005/02/28 15:45:14 1.35
@@ -816,7 +816,7 @@
config BLK_DEV_IDE_BAST
tristate "Simtec BAST / Thorcom VR1000 IDE support"
- depends on ARM && (ARCH_BAST || MACH_VR100)
+ depends on ARM && (ARCH_BAST || MACH_VR1000)
help
Say Y here if you want to support the onboard IDE channels on the
Simtec BAST or the Thorcom VR1000
diff -urN linux/drivers/ide/ide-io.c linux/drivers/ide/ide-io.c
--- linux/drivers/ide/ide-io.c 2005/02/13 20:16:22 1.30
+++ linux/drivers/ide/ide-io.c 2005/02/28 15:45:14 1.31
@@ -238,9 +238,10 @@
high = ide_read_24(drive);
} else {
u8 cur = HWIF(drive)->INB(IDE_SELECT_REG);
- if (cur & 0x40)
+ if (cur & 0x40) {
+ high = cur & 0xf;
low = (hcyl << 16) | (lcyl << 8) | sect;
- else {
+ } else {
low = hcyl * drive->head * drive->sect;
low += lcyl * drive->sect;
low += sect - 1;
diff -urN linux/drivers/ide/ide.c linux/drivers/ide/ide.c
--- linux/drivers/ide/ide.c 2005/02/13 20:16:22 1.112
+++ linux/drivers/ide/ide.c 2005/02/28 15:45:14 1.113
@@ -335,10 +335,14 @@
static int ide_system_bus_speed(void)
{
+#ifdef CONFIG_PCI
static struct pci_device_id pci_default[] = {
{ PCI_DEVICE(PCI_ANY_ID, PCI_ANY_ID) },
{ }
};
+#else
+#define pci_default 0
+#endif /* CONFIG_PCI */
if (!system_bus_speed) {
if (idebus_parameter) {
diff -urN linux/drivers/input/mouse/alps.c linux/drivers/input/mouse/alps.c
--- linux/drivers/input/mouse/alps.c 2005/01/13 14:06:03 1.1
+++ linux/drivers/input/mouse/alps.c 2005/02/28 15:45:14 1.2
@@ -34,7 +34,7 @@
unsigned char signature[3];
unsigned char model;
} alps_model_data[] = {
- { { 0x33, 0x02, 0x0a }, ALPS_MODEL_GLIDEPOINT },
+/* { { 0x33, 0x02, 0x0a }, ALPS_MODEL_GLIDEPOINT }, */
{ { 0x53, 0x02, 0x0a }, ALPS_MODEL_GLIDEPOINT },
{ { 0x53, 0x02, 0x14 }, ALPS_MODEL_GLIDEPOINT },
{ { 0x63, 0x02, 0x0a }, ALPS_MODEL_GLIDEPOINT },
@@ -42,8 +42,8 @@
{ { 0x73, 0x02, 0x0a }, ALPS_MODEL_GLIDEPOINT },
{ { 0x73, 0x02, 0x14 }, ALPS_MODEL_GLIDEPOINT },
{ { 0x63, 0x02, 0x28 }, ALPS_MODEL_GLIDEPOINT },
- { { 0x63, 0x02, 0x3c }, ALPS_MODEL_GLIDEPOINT },
- { { 0x63, 0x02, 0x50 }, ALPS_MODEL_GLIDEPOINT },
+/* { { 0x63, 0x02, 0x3c }, ALPS_MODEL_GLIDEPOINT }, */
+/* { { 0x63, 0x02, 0x50 }, ALPS_MODEL_GLIDEPOINT }, */
{ { 0x63, 0x02, 0x64 }, ALPS_MODEL_GLIDEPOINT },
{ { 0x20, 0x02, 0x0e }, ALPS_MODEL_DUALPOINT },
{ { 0x22, 0x02, 0x0a }, ALPS_MODEL_DUALPOINT },
@@ -175,8 +175,8 @@
return PSMOUSE_BAD_DATA;
/* Bytes 2 - 6 should have 0 in the highest bit */
- if (psmouse->pktcnt > 1 && psmouse->pktcnt <= 6 &&
- (psmouse->packet[psmouse->pktcnt] & 0x80))
+ if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
+ (psmouse->packet[psmouse->pktcnt-1] & 0x80))
return PSMOUSE_BAD_DATA;
if (psmouse->pktcnt == 6) {
diff -urN linux/drivers/input/serio/ambakmi.c
linux/drivers/input/serio/ambakmi.c
--- linux/drivers/input/serio/ambakmi.c 2004/10/12 01:45:45 1.9
+++ linux/drivers/input/serio/ambakmi.c 2005/02/28 15:45:14 1.10
@@ -31,7 +31,7 @@
struct amba_kmi_port {
struct serio *io;
struct clk *clk;
- unsigned char *base;
+ void __iomem *base;
unsigned int irq;
unsigned int divisor;
unsigned int open;
diff -urN linux/drivers/input/serio/sa1111ps2.c
linux/drivers/input/serio/sa1111ps2.c
--- linux/drivers/input/serio/sa1111ps2.c 2004/10/12 01:45:45 1.10
+++ linux/drivers/input/serio/sa1111ps2.c 2005/02/28 15:45:14 1.11
@@ -28,7 +28,7 @@
struct ps2if {
struct serio *io;
struct sa1111_dev *dev;
- unsigned long base;
+ void __iomem *base;
unsigned int open;
spinlock_t lock;
unsigned int head;
@@ -272,7 +272,7 @@
/*
* Our parent device has already mapped the region.
*/
- ps2if->base = (unsigned long)dev->mapbase;
+ ps2if->base = dev->mapbase;
sa1111_enable_device(ps2if->dev);
diff -urN linux/drivers/isdn/hardware/eicon/xdi_vers.h
linux/drivers/isdn/hardware/eicon/xdi_vers.h
--- linux/drivers/isdn/hardware/eicon/xdi_vers.h 2005/02/13 20:16:23
1.2
+++ linux/drivers/isdn/hardware/eicon/xdi_vers.h 2005/02/28 15:45:14
1.3
@@ -1,25 +1,26 @@
-/*
- *
- Copyright (c) Eicon Networks, 2002.
- *
- This source file is supplied for the use with
- Eicon Networks range of DIVA Server Adapters.
- *
- Eicon File Revision : 2.1
- *
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
- *
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
- *
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-static char diva_xdi_common_code_build[] = "102-52";
+
+/*
+ *
+ Copyright (c) Eicon Networks, 2002.
+ *
+ This source file is supplied for the use with
+ Eicon Networks range of DIVA Server Adapters.
+ *
+ Eicon File Revision : 2.1
+ *
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ *
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+ *
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+static char diva_xdi_common_code_build[] = "102-52";
diff -urN linux/drivers/isdn/i4l/isdn_net.h linux/drivers/isdn/i4l/isdn_net.h
--- linux/drivers/isdn/i4l/isdn_net.h 2004/06/26 15:15:15 1.13
+++ linux/drivers/isdn/i4l/isdn_net.h 2005/02/28 15:45:14 1.14
@@ -78,18 +78,19 @@
spin_lock_irqsave(&nd->queue_lock, flags);
lp = nd->queue; /* get lp on top of queue */
- spin_lock_bh(&nd->queue->xmit_lock);
+ spin_lock(&nd->queue->xmit_lock);
while (isdn_net_lp_busy(nd->queue)) {
- spin_unlock_bh(&nd->queue->xmit_lock);
+ spin_unlock(&nd->queue->xmit_lock);
nd->queue = nd->queue->next;
if (nd->queue == lp) { /* not found -- should never happen */
lp = NULL;
goto errout;
}
- spin_lock_bh(&nd->queue->xmit_lock);
+ spin_lock(&nd->queue->xmit_lock);
}
lp = nd->queue;
nd->queue = nd->queue->next;
+ local_bh_disable();
errout:
spin_unlock_irqrestore(&nd->queue_lock, flags);
return lp;
diff -urN linux/drivers/md/dm-raid1.c linux/drivers/md/dm-raid1.c
--- linux/drivers/md/dm-raid1.c 2005/02/13 20:16:24 1.5
+++ linux/drivers/md/dm-raid1.c 2005/02/28 15:45:15 1.6
@@ -253,9 +253,9 @@
else {
__rh_insert(rh, nreg);
if (nreg->state == RH_CLEAN) {
- spin_lock_irq(&rh->region_lock);
+ spin_lock(&rh->region_lock);
list_add(&nreg->list, &rh->clean_regions);
- spin_unlock_irq(&rh->region_lock);
+ spin_unlock(&rh->region_lock);
}
reg = nreg;
}
diff -urN linux/drivers/mmc/pxamci.c linux/drivers/mmc/pxamci.c
--- linux/drivers/mmc/pxamci.c 2005/01/13 14:06:08 1.7
+++ linux/drivers/mmc/pxamci.c 2005/02/28 15:45:15 1.8
@@ -52,7 +52,7 @@
struct mmc_host *mmc;
spinlock_t lock;
struct resource *res;
- void *base;
+ void __iomem *base;
int irq;
int dma;
unsigned int clkrt;
diff -urN linux/drivers/net/natsemi.c linux/drivers/net/natsemi.c
--- linux/drivers/net/natsemi.c 2005/01/13 14:06:10 1.41
+++ linux/drivers/net/natsemi.c 2005/02/28 15:45:15 1.42
@@ -441,6 +441,7 @@
#define DSPCFG_VAL 0x5040
#define SDCFG_VAL 0x008c /* set voltage thresholds for Signal Detect */
#define DSPCFG_LOCK 0x20 /* coefficient lock bit in DSPCFG */
+#define DSPCFG_COEF 0x1000 /* see coefficient (in TSTDAT) bit in DSPCFG */
#define TSTDAT_FIXED 0xe8 /* magic number for bad coefficients */
/* misc PCI space registers */
@@ -1243,7 +1244,8 @@
writew(1, ioaddr + PGSEL);
writew(PMDCSR_VAL, ioaddr + PMDCSR);
writew(TSTDAT_VAL, ioaddr + TSTDAT);
- np->dspcfg = DSPCFG_VAL;
+ np->dspcfg = (np->srr <= SRR_DP83815_C)?
+ DSPCFG_VAL : (DSPCFG_COEF | readw(ioaddr + DSPCFG));
writew(np->dspcfg, ioaddr + DSPCFG);
writew(SDCFG_VAL, ioaddr + SDCFG);
writew(0, ioaddr + PGSEL);
diff -urN linux/drivers/net/r8169.c linux/drivers/net/r8169.c
--- linux/drivers/net/r8169.c 2005/02/07 02:54:49 1.22
+++ linux/drivers/net/r8169.c 2005/02/28 15:45:15 1.23
@@ -41,7 +41,14 @@
- Suspend/resume
- Endianness
- Misc Rx/Tx bugs
-*/
+
+VERSION 2.2LK <2005/01/25>
+
+ - RX csum, TX csum/SG, TSO
+ - VLAN
+ - baby (< 7200) Jumbo frames support
+ - Merge of Realtek's version 2.2 (new phy)
+ */
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -62,7 +69,7 @@
#include <asm/io.h>
#include <asm/irq.h>
-#define RTL8169_VERSION "1.6LK"
+#define RTL8169_VERSION "2.2LK"
#define MODULENAME "r8169"
#define PFX MODULENAME ": "
@@ -72,7 +79,7 @@
printk( "Assertion failed! %s,%s,%s,line=%d\n", \
#expr,__FILE__,__FUNCTION__,__LINE__); \
}
-#define dprintk(fmt, args...) do { printk(PFX fmt, ## args) } while (0)
+#define dprintk(fmt, args...) do { printk(PFX fmt, ## args); } while (0)
#else
#define assert(expr) do {} while (0)
#define dprintk(fmt, args...) do {} while (0)
@@ -100,15 +107,13 @@
static int max_interrupt_work = 20;
/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
- The RTL chips use a 64 element hash table based on the Ethernet CRC. */
+ The RTL chips use a 64 element hash table based on the Ethernet CRC. */
static int multicast_filter_limit = 32;
-/* MAC address length*/
+/* MAC address length */
#define MAC_ADDR_LEN 6
-#define TX_FIFO_THRESH 256 /* In bytes */
-
-#define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before
first PCI xfer. */
+#define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before
first PCI xfer. */
#define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
#define EarlyTxThld 0x3F /* 0x3F means NO early transmit */
@@ -149,6 +154,7 @@
RTL_GIGA_PHY_VER_E = 0x05, /* PHY Reg 0x03 bit0-3 == 0x0000 */
RTL_GIGA_PHY_VER_F = 0x06, /* PHY Reg 0x03 bit0-3 == 0x0001 */
RTL_GIGA_PHY_VER_G = 0x07, /* PHY Reg 0x03 bit0-3 == 0x0002 */
+ RTL_GIGA_PHY_VER_H = 0x08, /* PHY Reg 0x03 bit0-3 == 0x0003 */
};
@@ -162,7 +168,8 @@
} rtl_chip_info[] = {
_R("RTL8169", RTL_GIGA_MAC_VER_B, 0xff7e1880),
_R("RTL8169s/8110s", RTL_GIGA_MAC_VER_D, 0xff7e1880),
- _R("RTL8169s/8110s", RTL_GIGA_MAC_VER_E, 0xff7e1880)
+ _R("RTL8169s/8110s", RTL_GIGA_MAC_VER_E, 0xff7e1880),
+ _R("RTL8169s/8110s", RTL_GIGA_MAC_VER_X, 0xff7e1880),
};
#undef _R
@@ -208,6 +215,7 @@
PHYstatus = 0x6C,
RxMaxSize = 0xDA,
CPlusCmd = 0xE0,
+ IntrMitigate = 0xE2,
RxDescAddrLow = 0xE4,
RxDescAddrHigh = 0xE8,
EarlyTxThres = 0xEC,
@@ -218,7 +226,7 @@
};
enum RTL8169_register_content {
- /*InterruptStatusBits */
+ /* InterruptStatusBits */
SYSErr = 0x8000,
PCSTimeout = 0x4000,
SWInt = 0x0100,
@@ -231,23 +239,23 @@
RxErr = 0x02,
RxOK = 0x01,
- /*RxStatusDesc */
+ /* RxStatusDesc */
RxRES = 0x00200000,
RxCRC = 0x00080000,
RxRUNT = 0x00100000,
RxRWT = 0x00400000,
- /*ChipCmdBits */
+ /* ChipCmdBits */
CmdReset = 0x10,
CmdRxEnb = 0x08,
CmdTxEnb = 0x04,
RxBufEmpty = 0x01,
- /*Cfg9346Bits */
+ /* Cfg9346Bits */
Cfg9346_Lock = 0x00,
Cfg9346_Unlock = 0xC0,
- /*rx_mode_bits */
+ /* rx_mode_bits */
AcceptErr = 0x20,
AcceptRunt = 0x10,
AcceptBroadcast = 0x08,
@@ -255,11 +263,11 @@
AcceptMyPhys = 0x02,
AcceptAllPhys = 0x01,
- /*RxConfigBits */
+ /* RxConfigBits */
RxCfgFIFOShift = 13,
RxCfgDMAShift = 8,
- /*TxConfigBits */
+ /* TxConfigBits */
TxInterFrameGapShift = 24,
TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */
@@ -277,7 +285,7 @@
PCIDAC = (1 << 4),
PCIMulRW = (1 << 3),
- /*rtl8169_PHYstatus */
+ /* rtl8169_PHYstatus */
TBI_Enable = 0x80,
TxFlowCtrl = 0x40,
RxFlowCtrl = 0x20,
@@ -287,38 +295,38 @@
LinkStatus = 0x02,
FullDup = 0x01,
- /*GIGABIT_PHY_registers */
+ /* GIGABIT_PHY_registers */
PHY_CTRL_REG = 0,
PHY_STAT_REG = 1,
PHY_AUTO_NEGO_REG = 4,
PHY_1000_CTRL_REG = 9,
- /*GIGABIT_PHY_REG_BIT */
+ /* GIGABIT_PHY_REG_BIT */
PHY_Restart_Auto_Nego = 0x0200,
PHY_Enable_Auto_Nego = 0x1000,
- //PHY_STAT_REG = 1;
+ /* PHY_STAT_REG = 1 */
PHY_Auto_Neco_Comp = 0x0020,
- //PHY_AUTO_NEGO_REG = 4;
+ /* PHY_AUTO_NEGO_REG = 4 */
PHY_Cap_10_Half = 0x0020,
PHY_Cap_10_Full = 0x0040,
PHY_Cap_100_Half = 0x0080,
PHY_Cap_100_Full = 0x0100,
- //PHY_1000_CTRL_REG = 9;
+ /* PHY_1000_CTRL_REG = 9 */
PHY_Cap_1000_Full = 0x0200,
PHY_Cap_Null = 0x0,
- /*_MediaType*/
+ /* _MediaType */
_10_Half = 0x01,
_10_Full = 0x02,
_100_Half = 0x04,
_100_Full = 0x08,
_1000_Full = 0x10,
- /*_TBICSRBit*/
+ /* _TBICSRBit */
TBILinkOK = 0x02000000,
};
@@ -374,7 +382,7 @@
struct rtl8169_private {
void __iomem *mmio_addr; /* memory map physical address */
- struct pci_dev *pci_dev; /* Index of PCI device */
+ struct pci_dev *pci_dev; /* Index of PCI device */
struct net_device_stats stats; /* statistics of net device */
spinlock_t lock; /* spin lock flag */
int chipset;
@@ -407,7 +415,7 @@
struct work_struct task;
};
-MODULE_AUTHOR("Realtek");
+MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@oss.sgi.com>");
MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver");
module_param_array(media, int, &num_media, 0);
module_param(rx_copybreak, int, 0);
@@ -455,7 +463,7 @@
udelay(1000);
for (i = 2000; i > 0; i--) {
- // Check if the RTL8169 has completed writing to the specified
MII register
+ /* Check if the RTL8169 has completed writing to the specified
MII register */
if (!(RTL_R32(PHYAR) & 0x80000000))
break;
udelay(100);
@@ -470,7 +478,7 @@
udelay(1000);
for (i = 2000; i > 0; i--) {
- // Check if the RTL8169 has completed retrieving data from the
specified MII register
+ /* Check if the RTL8169 has completed retrieving data from the
specified MII register */
if (RTL_R32(PHYAR) & 0x80000000) {
value = (int) (RTL_R32(PHYAR) & 0xFFFF);
break;
@@ -480,6 +488,20 @@
return value;
}
+static void rtl8169_irq_mask_and_ack(void __iomem *ioaddr)
+{
+ RTL_W16(IntrMask, 0x0000);
+
+ RTL_W16(IntrStatus, 0xffff);
+}
+
+static void rtl8169_asic_down(void __iomem *ioaddr)
+{
+ RTL_W8(ChipCmd, 0x00);
+ rtl8169_irq_mask_and_ack(ioaddr);
+ RTL_R16(CPlusCmd);
+}
+
static unsigned int rtl8169_tbi_reset_pending(void __iomem *ioaddr)
{
return RTL_R32(TBICSR) & TBIReset;
@@ -698,7 +720,7 @@
struct sk_buff *skb)
{
return (tp->vlgrp && vlan_tx_tag_present(skb)) ?
- TxVlanTag | cpu_to_be16(vlan_tx_tag_get(skb)) : 0x00;
+ TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00;
}
static void rtl8169_vlan_rx_register(struct net_device *dev,
@@ -733,12 +755,12 @@
static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc,
struct sk_buff *skb)
{
- u32 opts2 = desc->opts2;
+ u32 opts2 = le32_to_cpu(desc->opts2);
int ret;
if (tp->vlgrp && (opts2 & RxVlanTag)) {
rtl8169_rx_hwaccel_skb(skb, tp->vlgrp,
- be16_to_cpu(opts2 & 0xffff));
+ swab16(opts2 & 0xffff));
ret = 0;
} else
ret = -1;
@@ -1002,7 +1024,7 @@
if (tp->mac_version <= RTL_GIGA_MAC_VER_B)
return;
- if (tp->phy_version >= RTL_GIGA_PHY_VER_F)
+ if (tp->phy_version >= RTL_GIGA_PHY_VER_H)
return;
dprintk("MAC version != 0 && PHY version == 0 or 1\n");
@@ -1010,7 +1032,19 @@
/* Shazam ! */
- // phy config for RTL8169s mac_version C chip
+ if (tp->mac_version == RTL_GIGA_MAC_VER_X) {
+ mdio_write(ioaddr, 31, 0x0001);
+ mdio_write(ioaddr, 9, 0x273a);
+ mdio_write(ioaddr, 14, 0x7bfb);
+ mdio_write(ioaddr, 27, 0x841e);
+
+ mdio_write(ioaddr, 31, 0x0002);
+ mdio_write(ioaddr, 1, 0x90d0);
+ mdio_write(ioaddr, 31, 0x0000);
+ return;
+ }
+
+ /* phy config for RTL8169s mac_version C chip */
mdio_write(ioaddr, 31, 0x0001); //w 31 2 0 1
mdio_write(ioaddr, 21, 0x1000); //w 21 15 0 1000
mdio_write(ioaddr, 24, 0x65c7); //w 24 15 0 65c7
@@ -1038,7 +1072,7 @@
unsigned long timeout = RTL8169_PHY_TIMEOUT;
assert(tp->mac_version > RTL_GIGA_MAC_VER_B);
- assert(tp->phy_version < RTL_GIGA_PHY_VER_G);
+ assert(tp->phy_version < RTL_GIGA_PHY_VER_H);
if (!(tp->phy_1000_ctrl_reg & PHY_Cap_1000_Full))
return;
@@ -1073,7 +1107,7 @@
struct timer_list *timer = &tp->timer;
if ((tp->mac_version <= RTL_GIGA_MAC_VER_B) ||
- (tp->phy_version >= RTL_GIGA_PHY_VER_G))
+ (tp->phy_version >= RTL_GIGA_PHY_VER_H))
return;
del_timer_sync(timer);
@@ -1085,7 +1119,7 @@
struct timer_list *timer = &tp->timer;
if ((tp->mac_version <= RTL_GIGA_MAC_VER_B) ||
- (tp->phy_version >= RTL_GIGA_PHY_VER_G))
+ (tp->phy_version >= RTL_GIGA_PHY_VER_H))
return;
init_timer(timer);
@@ -1132,7 +1166,7 @@
assert(ioaddr_out != NULL);
- // dev zeroed in alloc_etherdev
+ /* dev zeroed in alloc_etherdev */
dev = alloc_etherdev(sizeof (*tp));
if (dev == NULL) {
printk(KERN_ERR PFX "unable to alloc new ethernet\n");
@@ -1143,7 +1177,7 @@
SET_NETDEV_DEV(dev, &pdev->dev);
tp = netdev_priv(dev);
- // enable device (incl. PCI PM wakeup and hotplug setup)
+ /* enable device (incl. PCI PM wakeup and hotplug setup) */
rc = pci_enable_device(pdev);
if (rc) {
printk(KERN_ERR PFX "%s: enable failure\n", pdev->slot_name);
@@ -1167,14 +1201,14 @@
goto err_out_mwi;
}
- // make sure PCI base addr 1 is MMIO
+ /* make sure PCI base addr 1 is MMIO */
if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
printk(KERN_ERR PFX
"region #1 not an MMIO resource, aborting\n");
rc = -ENODEV;
goto err_out_mwi;
}
- // check for weird/broken PCI region reporting
+ /* check for weird/broken PCI region reporting */
if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) {
printk(KERN_ERR PFX "Invalid PCI region size(s), aborting\n");
rc = -ENODEV;
@@ -1204,7 +1238,7 @@
pci_set_master(pdev);
- // ioremap MMIO region
+ /* ioremap MMIO region */
ioaddr = ioremap(pci_resource_start(pdev, 1), R8169_REGS_SIZE);
if (ioaddr == NULL) {
printk(KERN_ERR PFX "cannot remap MMIO, aborting\n");
@@ -1212,17 +1246,20 @@
goto err_out_free_res;
}
- // Soft reset the chip.
+ /* Unneeded ? Don't mess with Mrs. Murphy. */
+ rtl8169_irq_mask_and_ack(ioaddr);
+
+ /* Soft reset the chip. */
RTL_W8(ChipCmd, CmdReset);
- // Check that the chip has finished the reset.
+ /* Check that the chip has finished the reset. */
for (i = 1000; i > 0; i--) {
if ((RTL_R8(ChipCmd) & CmdReset) == 0)
break;
udelay(10);
}
- // Identify chip attached to board
+ /* Identify chip attached to board */
rtl8169_get_mac_version(tp, ioaddr);
rtl8169_get_phy_version(tp, ioaddr);
@@ -1310,7 +1347,7 @@
tp->link_ok = rtl8169_xmii_link_ok;
}
- // Get MAC address. FIXME: read EEPROM
+ /* Get MAC address. FIXME: read EEPROM */
for (i = 0; i < MAC_ADDR_LEN; i++)
dev->dev_addr[i] = RTL_R8(MAC0 + i);
@@ -1518,7 +1555,7 @@
static void rtl8169_hw_reset(void __iomem *ioaddr)
{
/* Disable interrupts */
- RTL_W16(IntrMask, 0x0000);
+ rtl8169_irq_mask_and_ack(ioaddr);
/* Reset the chipset */
RTL_W8(ChipCmd, CmdReset);
@@ -1548,10 +1585,10 @@
RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
RTL_W8(EarlyTxThres, EarlyTxThld);
- // For gigabit rtl8169, MTU + header + CRC + VLAN
+ /* For gigabit rtl8169, MTU + header + CRC + VLAN */
RTL_W16(RxMaxSize, tp->rx_buf_sz);
- // Set Rx Config register
+ /* Set Rx Config register */
i = rtl8169_rx_config |
(RTL_R32(RxConfig) & rtl_chip_info[tp->chipset].RxConfigMask);
RTL_W32(RxConfig, i);
@@ -1563,13 +1600,20 @@
tp->cp_cmd |= RTL_R16(CPlusCmd);
RTL_W16(CPlusCmd, tp->cp_cmd);
- if (tp->mac_version == RTL_GIGA_MAC_VER_D) {
+ if ((tp->mac_version == RTL_GIGA_MAC_VER_D) ||
+ (tp->mac_version == RTL_GIGA_MAC_VER_E)) {
dprintk(KERN_INFO PFX "Set MAC Reg C+CR Offset 0xE0. "
"Bit-3 and bit-14 MUST be 1\n");
tp->cp_cmd |= (1 << 14) | PCIMulRW;
RTL_W16(CPlusCmd, tp->cp_cmd);
}
+ /*
+ * Undocumented corner. Supposedly:
+ * (TxTimer << 12) | (TxPackets << 8) | (RxTimer << 4) | RxPackets
+ */
+ RTL_W16(IntrMitigate, 0x0000);
+
RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr >> 32));
RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr & DMA_32BIT_MASK));
@@ -1611,10 +1655,10 @@
if (ret < 0)
goto out;
- rtl8169_hw_start(dev);
-
netif_poll_enable(dev);
+ rtl8169_hw_start(dev);
+
rtl8169_request_timer(dev);
out:
@@ -1658,11 +1702,11 @@
dma_addr_t mapping;
int ret = 0;
- skb = dev_alloc_skb(rx_buf_sz);
+ skb = dev_alloc_skb(rx_buf_sz + NET_IP_ALIGN);
if (!skb)
goto err_out;
- skb_reserve(skb, 2);
+ skb_reserve(skb, NET_IP_ALIGN);
*sk_buff = skb;
mapping = pci_map_single(pdev, skb->tail, rx_buf_sz,
@@ -1795,9 +1839,7 @@
/* Wait for any pending NAPI task to complete */
netif_poll_disable(dev);
- RTL_W16(IntrMask, 0x0000);
-
- RTL_W16(IntrStatus, 0xffff);
+ rtl8169_irq_mask_and_ack(ioaddr);
netif_poll_enable(dev);
}
@@ -1974,7 +2016,7 @@
smp_wmb();
- RTL_W8(TxPoll, 0x40); //set polling bit
+ RTL_W8(TxPoll, 0x40); /* set polling bit */
if (TX_BUFFS_AVAIL(tp) < MAX_SKB_FRAGS) {
netif_stop_queue(dev);
@@ -2084,7 +2126,7 @@
static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc)
{
- u32 opts1 = desc->opts1;
+ u32 opts1 = le32_to_cpu(desc->opts1);
u32 status = opts1 & RxProtoMask;
if (((status == RxProtoTCP) && !(opts1 & TCPFail)) ||
@@ -2103,9 +2145,9 @@
if (pkt_size < rx_copybreak) {
struct sk_buff *skb;
- skb = dev_alloc_skb(pkt_size + 2);
+ skb = dev_alloc_skb(pkt_size + NET_IP_ALIGN);
if (skb) {
- skb_reserve(skb, 2);
+ skb_reserve(skb, NET_IP_ALIGN);
eth_copy_and_sum(skb, sk_buff[0]->tail, pkt_size, 0);
*sk_buff = skb;
rtl8169_return_to_asic(desc, rx_buf_sz);
@@ -2119,8 +2161,8 @@
rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
void __iomem *ioaddr)
{
- unsigned int cur_rx, rx_left, count;
- int delta;
+ unsigned int cur_rx, rx_left;
+ unsigned int delta, count;
assert(dev != NULL);
assert(tp != NULL);
@@ -2188,10 +2230,8 @@
tp->cur_rx = cur_rx;
delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx);
- if (delta < 0) {
+ if (!delta && count)
printk(KERN_INFO "%s: no Rx buffer allocated\n", dev->name);
- delta = 0;
- }
tp->dirty_rx += delta;
/*
@@ -2215,12 +2255,9 @@
struct rtl8169_private *tp = netdev_priv(dev);
int boguscnt = max_interrupt_work;
void __iomem *ioaddr = tp->mmio_addr;
- int status = 0;
+ int status;
int handled = 0;
- if (unlikely(!netif_running(dev)))
- goto out;
-
do {
status = RTL_R16(IntrStatus);
@@ -2230,6 +2267,11 @@
handled = 1;
+ if (unlikely(!netif_running(dev))) {
+ rtl8169_asic_down(ioaddr);
+ goto out;
+ }
+
status &= tp->intr_mask;
RTL_W16(IntrStatus,
(status & RxFIFOOver) ? (status | RxOverflow) : status);
@@ -2257,11 +2299,11 @@
}
break;
#else
- // Rx interrupt
+ /* Rx interrupt */
if (status & (RxOK | RxOverflow | RxFIFOOver)) {
rtl8169_rx_interrupt(dev, tp, ioaddr);
}
- // Tx interrupt
+ /* Tx interrupt */
if (status & (TxOK | TxErr))
rtl8169_tx_interrupt(dev, tp, ioaddr);
#endif
@@ -2292,7 +2334,7 @@
*budget -= work_done;
dev->quota -= work_done;
- if ((work_done < work_to_do) || !netif_running(dev)) {
+ if (work_done < work_to_do) {
netif_rx_complete(dev);
tp->intr_mask = 0xffff;
/*
@@ -2313,6 +2355,7 @@
{
struct rtl8169_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->mmio_addr;
+ unsigned int poll_locked = 0;
rtl8169_delete_timer(dev);
@@ -2320,13 +2363,10 @@
flush_scheduled_work();
+core_down:
spin_lock_irq(&tp->lock);
- /* Stop the chip's Tx and Rx DMA processes. */
- RTL_W8(ChipCmd, 0x00);
-
- /* Disable interrupts by clearing the interrupt mask. */
- RTL_W16(IntrMask, 0x0000);
+ rtl8169_asic_down(ioaddr);
/* Update the error counts. */
tp->stats.rx_missed_errors += RTL_R32(RxMissed);
@@ -2336,11 +2376,27 @@
synchronize_irq(dev->irq);
- netif_poll_disable(dev);
+ if (!poll_locked) {
+ netif_poll_disable(dev);
+ poll_locked++;
+ }
/* Give a racing hard_start_xmit a few cycles to complete. */
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ synchronize_kernel();
+
+ /*
+ * And now for the 50k$ question: are IRQ disabled or not ?
+ *
+ * Two paths lead here:
+ * 1) dev->close
+ * -> netif_running() is available to sync the current code and the
+ * IRQ handler. See rtl8169_interrupt for details.
+ * 2) dev->change_mtu
+ * -> rtl8169_poll can not be issued again and re-enable the
+ * interruptions. Let's simply issue the IRQ down sequence again.
+ */
+ if (RTL_R16(IntrMask))
+ goto core_down;
rtl8169_tx_clear(tp);
@@ -2356,6 +2412,8 @@
free_irq(dev->irq, dev);
+ netif_poll_enable(dev);
+
pci_free_consistent(pdev, R8169_RX_RING_BYTES, tp->RxDescArray,
tp->RxPhyAddr);
pci_free_consistent(pdev, R8169_TX_RING_BYTES, tp->TxDescArray,
diff -urN linux/drivers/net/s2io.c linux/drivers/net/s2io.c
--- linux/drivers/net/s2io.c 2005/01/25 04:28:28 1.10
+++ linux/drivers/net/s2io.c 2005/02/28 15:45:15 1.11
@@ -3026,6 +3026,8 @@
for (i = 0; i < prev_cnt; i++) {
writeq(RMAC_ADDR_DATA0_MEM_ADDR(dis_addr),
&bar0->rmac_addr_data0_mem);
+ writeq(RMAC_ADDR_DATA1_MEM_MASK(0ULL),
+ &bar0->rmac_addr_data1_mem);
val64 = RMAC_ADDR_CMD_MEM_WE |
RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD |
RMAC_ADDR_CMD_MEM_OFFSET
@@ -3050,8 +3052,11 @@
mac_addr |= mclist->dmi_addr[j];
mac_addr <<= 8;
}
+ mac_addr >>= 8;
writeq(RMAC_ADDR_DATA0_MEM_ADDR(mac_addr),
&bar0->rmac_addr_data0_mem);
+ writeq(RMAC_ADDR_DATA1_MEM_MASK(0ULL),
+ &bar0->rmac_addr_data1_mem);
val64 = RMAC_ADDR_CMD_MEM_WE |
RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD |
diff -urN linux/drivers/net/tg3.c linux/drivers/net/tg3.c
--- linux/drivers/net/tg3.c 2005/02/13 20:16:24 1.55
+++ linux/drivers/net/tg3.c 2005/02/28 15:45:15 1.56
@@ -60,8 +60,8 @@
#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
-#define DRV_MODULE_VERSION "3.22"
-#define DRV_MODULE_RELDATE "February 11, 2005"
+#define DRV_MODULE_VERSION "3.23"
+#define DRV_MODULE_RELDATE "February 15, 2005"
#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
@@ -591,9 +591,10 @@
if (tp->tg3_flags2 & TG3_FLG2_NO_ETH_WIRE_SPEED)
return;
- tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x7007);
- tg3_readphy(tp, MII_TG3_AUX_CTRL, &val);
- tg3_writephy(tp, MII_TG3_AUX_CTRL, (val | (1 << 15) | (1 << 4)));
+ if (!tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x7007) &&
+ !tg3_readphy(tp, MII_TG3_AUX_CTRL, &val))
+ tg3_writephy(tp, MII_TG3_AUX_CTRL,
+ (val | (1 << 15) | (1 << 4)));
}
static int tg3_bmcr_reset(struct tg3 *tp)
@@ -634,9 +635,10 @@
while (limit--) {
u32 tmp32;
- tg3_readphy(tp, 0x16, &tmp32);
- if ((tmp32 & 0x1000) == 0)
- break;
+ if (!tg3_readphy(tp, 0x16, &tmp32)) {
+ if ((tmp32 & 0x1000) == 0)
+ break;
+ }
}
if (limit <= 0)
return -EBUSY;
@@ -688,9 +690,9 @@
for (i = 0; i < 6; i += 2) {
u32 low, high;
- tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low);
- tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high);
- if (tg3_wait_macro_done(tp)) {
+ if (tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low) ||
+ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high) ||
+ tg3_wait_macro_done(tp)) {
*resetp = 1;
return -EBUSY;
}
@@ -746,7 +748,9 @@
}
/* Disable transmitter and interrupt. */
- tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32);
+ if (tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32))
+ continue;
+
reg32 |= 0x3000;
tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32);
@@ -755,7 +759,9 @@
BMCR_FULLDPLX | TG3_BMCR_SPEED1000);
/* Set to master mode. */
- tg3_readphy(tp, MII_TG3_CTRL, &phy9_orig);
+ if (tg3_readphy(tp, MII_TG3_CTRL, &phy9_orig))
+ continue;
+
tg3_writephy(tp, MII_TG3_CTRL,
(MII_TG3_CTRL_AS_MASTER |
MII_TG3_CTRL_ENABLE_AS_MASTER));
@@ -793,9 +799,11 @@
tg3_writephy(tp, MII_TG3_CTRL, phy9_orig);
- tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32);
- reg32 &= ~0x3000;
- tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32);
+ if (!tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32)) {
+ reg32 &= ~0x3000;
+ tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32);
+ } else if (!err)
+ err = -EBUSY;
return err;
}
@@ -859,9 +867,9 @@
u32 phy_reg;
/* Set bit 14 with read-modify-write to preserve other bits */
- tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0007);
- tg3_readphy(tp, MII_TG3_AUX_CTRL, &phy_reg);
- tg3_writephy(tp, MII_TG3_AUX_CTRL, phy_reg | 0x4000);
+ if (!tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0007) &&
+ !tg3_readphy(tp, MII_TG3_AUX_CTRL, &phy_reg))
+ tg3_writephy(tp, MII_TG3_AUX_CTRL, phy_reg | 0x4000);
}
tg3_phy_set_wirespeed(tp);
return 0;
@@ -1244,7 +1252,7 @@
};
}
-static int tg3_phy_copper_begin(struct tg3 *tp)
+static void tg3_phy_copper_begin(struct tg3 *tp)
{
u32 new_adv;
int i;
@@ -1359,15 +1367,16 @@
if (tp->link_config.duplex == DUPLEX_FULL)
bmcr |= BMCR_FULLDPLX;
- tg3_readphy(tp, MII_BMCR, &orig_bmcr);
- if (bmcr != orig_bmcr) {
+ if (!tg3_readphy(tp, MII_BMCR, &orig_bmcr) &&
+ (bmcr != orig_bmcr)) {
tg3_writephy(tp, MII_BMCR, BMCR_LOOPBACK);
for (i = 0; i < 1500; i++) {
u32 tmp;
udelay(10);
- tg3_readphy(tp, MII_BMSR, &tmp);
- tg3_readphy(tp, MII_BMSR, &tmp);
+ if (tg3_readphy(tp, MII_BMSR, &tmp) ||
+ tg3_readphy(tp, MII_BMSR, &tmp))
+ continue;
if (!(tmp & BMSR_LSTATUS)) {
udelay(40);
break;
@@ -1380,8 +1389,6 @@
tg3_writephy(tp, MII_BMCR,
BMCR_ANENABLE | BMCR_ANRESTART);
}
-
- return 0;
}
static int tg3_init_5401phy_dsp(struct tg3 *tp)
@@ -1416,7 +1423,9 @@
{
u32 adv_reg, all_mask;
- tg3_readphy(tp, MII_ADVERTISE, &adv_reg);
+ if (tg3_readphy(tp, MII_ADVERTISE, &adv_reg))
+ return 0;
+
all_mask = (ADVERTISE_10HALF | ADVERTISE_10FULL |
ADVERTISE_100HALF | ADVERTISE_100FULL);
if ((adv_reg & all_mask) != all_mask)
@@ -1424,7 +1433,9 @@
if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY)) {
u32 tg3_ctrl;
- tg3_readphy(tp, MII_TG3_CTRL, &tg3_ctrl);
+ if (tg3_readphy(tp, MII_TG3_CTRL, &tg3_ctrl))
+ return 0;
+
all_mask = (MII_TG3_CTRL_ADV_1000_HALF |
MII_TG3_CTRL_ADV_1000_FULL);
if ((tg3_ctrl & all_mask) != all_mask)
@@ -1464,8 +1475,8 @@
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) &&
netif_carrier_ok(tp->dev)) {
tg3_readphy(tp, MII_BMSR, &bmsr);
- tg3_readphy(tp, MII_BMSR, &bmsr);
- if (!(bmsr & BMSR_LSTATUS))
+ if (!tg3_readphy(tp, MII_BMSR, &bmsr) &&
+ !(bmsr & BMSR_LSTATUS))
force_reset = 1;
}
if (force_reset)
@@ -1473,9 +1484,8 @@
if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) {
tg3_readphy(tp, MII_BMSR, &bmsr);
- tg3_readphy(tp, MII_BMSR, &bmsr);
-
- if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE))
+ if (tg3_readphy(tp, MII_BMSR, &bmsr) ||
+ !(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE))
bmsr = 0;
if (!(bmsr & BMSR_LSTATUS)) {
@@ -1486,8 +1496,8 @@
tg3_readphy(tp, MII_BMSR, &bmsr);
for (i = 0; i < 1000; i++) {
udelay(10);
- tg3_readphy(tp, MII_BMSR, &bmsr);
- if (bmsr & BMSR_LSTATUS) {
+ if (!tg3_readphy(tp, MII_BMSR, &bmsr) &&
+ (bmsr & BMSR_LSTATUS)) {
udelay(40);
break;
}
@@ -1549,8 +1559,8 @@
bmsr = 0;
for (i = 0; i < 100; i++) {
tg3_readphy(tp, MII_BMSR, &bmsr);
- tg3_readphy(tp, MII_BMSR, &bmsr);
- if (bmsr & BMSR_LSTATUS)
+ if (!tg3_readphy(tp, MII_BMSR, &bmsr) &&
+ (bmsr & BMSR_LSTATUS))
break;
udelay(40);
}
@@ -1561,8 +1571,8 @@
tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat);
for (i = 0; i < 2000; i++) {
udelay(10);
- tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat);
- if (aux_stat)
+ if (!tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat) &&
+ aux_stat)
break;
}
@@ -1573,7 +1583,8 @@
bmcr = 0;
for (i = 0; i < 200; i++) {
tg3_readphy(tp, MII_BMCR, &bmcr);
- tg3_readphy(tp, MII_BMCR, &bmcr);
+ if (tg3_readphy(tp, MII_BMCR, &bmcr))
+ continue;
if (bmcr && bmcr != 0x7fff)
break;
udelay(10);
@@ -1610,10 +1621,13 @@
(tp->link_config.autoneg == AUTONEG_ENABLE)) {
u32 local_adv, remote_adv;
- tg3_readphy(tp, MII_ADVERTISE, &local_adv);
+ if (tg3_readphy(tp, MII_ADVERTISE, &local_adv))
+ local_adv = 0;
local_adv &= (ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
- tg3_readphy(tp, MII_LPA, &remote_adv);
+ if (tg3_readphy(tp, MII_LPA, &remote_adv))
+ remote_adv = 0;
+
remote_adv &= (LPA_PAUSE_CAP | LPA_PAUSE_ASYM);
/* If we are not advertising full pause capability,
@@ -1632,8 +1646,8 @@
tg3_phy_copper_begin(tp);
tg3_readphy(tp, MII_BMSR, &tmp);
- tg3_readphy(tp, MII_BMSR, &tmp);
- if (tmp & BMSR_LSTATUS)
+ if (!tg3_readphy(tp, MII_BMSR, &tmp) &&
+ (tmp & BMSR_LSTATUS))
current_link_up = 1;
}
@@ -5441,9 +5455,10 @@
u32 tmp;
/* Clear CRC stats. */
- tg3_readphy(tp, 0x1e, &tmp);
- tg3_writephy(tp, 0x1e, tmp | 0x8000);
- tg3_readphy(tp, 0x14, &tmp);
+ if (!tg3_readphy(tp, 0x1e, &tmp)) {
+ tg3_writephy(tp, 0x1e, tmp | 0x8000);
+ tg3_readphy(tp, 0x14, &tmp);
+ }
}
__tg3_set_rx_mode(tp->dev);
@@ -6033,9 +6048,11 @@
u32 val;
spin_lock_irqsave(&tp->lock, flags);
- tg3_readphy(tp, 0x1e, &val);
- tg3_writephy(tp, 0x1e, val | 0x8000);
- tg3_readphy(tp, 0x14, &val);
+ if (!tg3_readphy(tp, 0x1e, &val)) {
+ tg3_writephy(tp, 0x1e, val | 0x8000);
+ tg3_readphy(tp, 0x14, &val);
+ } else
+ val = 0;
spin_unlock_irqrestore(&tp->lock, flags);
tp->phy_crc_errors += val;
@@ -6651,10 +6668,10 @@
int r;
spin_lock_irq(&tp->lock);
- tg3_readphy(tp, MII_BMCR, &bmcr);
- tg3_readphy(tp, MII_BMCR, &bmcr);
r = -EINVAL;
- if (bmcr & BMCR_ANENABLE) {
+ tg3_readphy(tp, MII_BMCR, &bmcr);
+ if (!tg3_readphy(tp, MII_BMCR, &bmcr) &&
+ (bmcr & BMCR_ANENABLE)) {
tg3_writephy(tp, MII_BMCR, bmcr | BMCR_ANRESTART);
r = 0;
}
@@ -7654,9 +7671,8 @@
u32 bmsr, adv_reg, tg3_ctrl;
tg3_readphy(tp, MII_BMSR, &bmsr);
- tg3_readphy(tp, MII_BMSR, &bmsr);
-
- if (bmsr & BMSR_LSTATUS)
+ if (!tg3_readphy(tp, MII_BMSR, &bmsr) &&
+ (bmsr & BMSR_LSTATUS))
goto skip_phy_reset;
err = tg3_phy_reset(tp);
diff -urN linux/drivers/net/ibm_emac/ibm_emac_core.c
linux/drivers/net/ibm_emac/ibm_emac_core.c
--- linux/drivers/net/ibm_emac/ibm_emac_core.c 2005/01/25 04:28:35 1.6
+++ linux/drivers/net/ibm_emac/ibm_emac_core.c 2005/02/28 15:45:15 1.7
@@ -475,8 +475,9 @@
out_be32(&emacp->em0stacr, stacr);
- while (((stacr = in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0)
- && (count++ < 5000))
+ count = 0;
+ while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0)
+ && (count++ < MDIO_DELAY))
udelay(1);
MDIO_DEBUG((" (count was %d)\n", count));
@@ -912,7 +913,6 @@
PKT_DEBUG(("emac_start_xmit() stopping queue\n"));
netif_stop_queue(dev);
spin_unlock_irqrestore(&fep->lock, flags);
- restore_flags(flags);
return -EBUSY;
}
@@ -1281,7 +1281,7 @@
/* Format the receive descriptor ring. */
ep->rx_slot = 0;
/* Default is MTU=1500 + Ethernet overhead */
- ep->rx_buffer_size = ENET_DEF_BUF_SIZE;
+ ep->rx_buffer_size = dev->mtu + ENET_HEADER_SIZE + ENET_FCS_SIZE;
emac_rx_fill(dev, 0);
if (ep->rx_slot != 0) {
printk(KERN_ERR
diff -urN linux/drivers/net/ibm_emac/ibm_emac_core.h
linux/drivers/net/ibm_emac/ibm_emac_core.h
--- linux/drivers/net/ibm_emac/ibm_emac_core.h 2004/09/19 12:30:12 1.2
+++ linux/drivers/net/ibm_emac/ibm_emac_core.h 2005/02/28 15:45:15 1.3
@@ -77,8 +77,6 @@
#define ENET_HEADER_SIZE 14
#define ENET_FCS_SIZE 4
-#define ENET_DEF_MTU_SIZE 1500
-#define ENET_DEF_BUF_SIZE (ENET_DEF_MTU_SIZE + ENET_HEADER_SIZE +
ENET_FCS_SIZE)
#define EMAC_MIN_FRAME 64
#define EMAC_MAX_FRAME 9018
#define EMAC_MIN_MTU (EMAC_MIN_FRAME - ENET_HEADER_SIZE -
ENET_FCS_SIZE)
diff -urN linux/drivers/net/tulip/de2104x.c linux/drivers/net/tulip/de2104x.c
--- linux/drivers/net/tulip/de2104x.c 2005/02/07 02:54:50 1.24
+++ linux/drivers/net/tulip/de2104x.c 2005/02/28 15:45:15 1.25
@@ -1960,8 +1960,6 @@
dev->tx_timeout = de_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
- dev->irq = pdev->irq;
-
de = dev->priv;
de->de21040 = ent->driver_data == 0 ? 1 : 0;
de->pdev = pdev;
@@ -1997,6 +1995,8 @@
goto err_out_res;
}
+ dev->irq = pdev->irq;
+
/* obtain and check validity of PCI I/O address */
pciaddr = pci_resource_start(pdev, 1);
if (!pciaddr) {
diff -urN linux/drivers/net/wan/dscc4.c linux/drivers/net/wan/dscc4.c
--- linux/drivers/net/wan/dscc4.c 2005/01/13 14:06:16 1.30
+++ linux/drivers/net/wan/dscc4.c 2005/02/28 15:45:15 1.31
@@ -691,7 +691,7 @@
root = ppriv->root;
for (i = 0; i < dev_per_card; i++)
- unregister_hdlc_device(dscc4_to_dev(&root[i]));
+ unregister_hdlc_device(dscc4_to_dev(root + i));
pci_set_drvdata(pdev, NULL);
@@ -706,33 +706,36 @@
{
struct dscc4_pci_priv *priv;
struct dscc4_dev_priv *dpriv;
- static int cards_found = 0;
void __iomem *ioaddr;
- int i;
+ int i, rc;
printk(KERN_DEBUG "%s", version);
- if (pci_enable_device(pdev))
- goto err_out;
- if (!request_mem_region(pci_resource_start(pdev, 0),
- pci_resource_len(pdev, 0), "registers")) {
+ rc = pci_enable_device(pdev);
+ if (rc < 0)
+ goto out;
+
+ rc = pci_request_region(pdev, 0, "registers");
+ if (rc < 0) {
printk(KERN_ERR "%s: can't reserve MMIO region (regs)\n",
DRV_NAME);
- goto err_out;
+ goto err_disable_0;
}
- if (!request_mem_region(pci_resource_start(pdev, 1),
- pci_resource_len(pdev, 1), "LBI interface")) {
+ rc = pci_request_region(pdev, 1, "LBI interface");
+ if (rc < 0) {
printk(KERN_ERR "%s: can't reserve MMIO region (lbi)\n",
DRV_NAME);
- goto err_out_free_mmio_region0;
+ goto err_free_mmio_region_1;
}
+
ioaddr = ioremap(pci_resource_start(pdev, 0),
pci_resource_len(pdev, 0));
if (!ioaddr) {
printk(KERN_ERR "%s: cannot remap MMIO region %lx @ %lx\n",
DRV_NAME, pci_resource_len(pdev, 0),
pci_resource_start(pdev, 0));
- goto err_out_free_mmio_region;
+ rc = -EIO;
+ goto err_free_mmio_regions_2;
}
printk(KERN_DEBUG "Siemens DSCC4, MMIO at %#lx (regs), %#lx (lbi), IRQ
%d\n",
pci_resource_start(pdev, 0),
@@ -742,14 +745,16 @@
pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xf8);
pci_set_master(pdev);
- if (dscc4_found1(pdev, ioaddr))
- goto err_out_iounmap;
+ rc = dscc4_found1(pdev, ioaddr);
+ if (rc < 0)
+ goto err_iounmap_3;
- priv = (struct dscc4_pci_priv *)pci_get_drvdata(pdev);
+ priv = pci_get_drvdata(pdev);
- if (request_irq(pdev->irq, &dscc4_irq, SA_SHIRQ, DRV_NAME, priv->root)){
+ rc = request_irq(pdev->irq, dscc4_irq, SA_SHIRQ, DRV_NAME, priv->root);
+ if (rc < 0) {
printk(KERN_WARNING "%s: IRQ %d busy\n", DRV_NAME, pdev->irq);
- goto err_out_free1;
+ goto err_release_4;
}
/* power up/little endian/dma core controlled via lrda/ltda */
@@ -769,9 +774,11 @@
priv->iqcfg = (u32 *) pci_alloc_consistent(pdev,
IRQ_RING_SIZE*sizeof(u32), &priv->iqcfg_dma);
if (!priv->iqcfg)
- goto err_out_free_irq;
+ goto err_free_irq_5;
writel(priv->iqcfg_dma, ioaddr + IQCFG);
+ rc = -ENOMEM;
+
/*
* SCC 0-3 private rx/tx irq structures
* IQRX/TXi needs to be set soon. Learned it the hard way...
@@ -781,7 +788,7 @@
dpriv->iqtx = (u32 *) pci_alloc_consistent(pdev,
IRQ_RING_SIZE*sizeof(u32), &dpriv->iqtx_dma);
if (!dpriv->iqtx)
- goto err_out_free_iqtx;
+ goto err_free_iqtx_6;
writel(dpriv->iqtx_dma, ioaddr + IQTX0 + i*4);
}
for (i = 0; i < dev_per_card; i++) {
@@ -789,7 +796,7 @@
dpriv->iqrx = (u32 *) pci_alloc_consistent(pdev,
IRQ_RING_SIZE*sizeof(u32), &dpriv->iqrx_dma);
if (!dpriv->iqrx)
- goto err_out_free_iqrx;
+ goto err_free_iqrx_7;
writel(dpriv->iqrx_dma, ioaddr + IQRX0 + i*4);
}
@@ -804,17 +811,18 @@
writel(0xff200001, ioaddr + GCMDR);
- cards_found++;
- return 0;
+ rc = 0;
+out:
+ return rc;
-err_out_free_iqrx:
+err_free_iqrx_7:
while (--i >= 0) {
dpriv = priv->root + i;
pci_free_consistent(pdev, IRQ_RING_SIZE*sizeof(u32),
dpriv->iqrx, dpriv->iqrx_dma);
}
i = dev_per_card;
-err_out_free_iqtx:
+err_free_iqtx_6:
while (--i >= 0) {
dpriv = priv->root + i;
pci_free_consistent(pdev, IRQ_RING_SIZE*sizeof(u32),
@@ -822,20 +830,19 @@
}
pci_free_consistent(pdev, IRQ_RING_SIZE*sizeof(u32), priv->iqcfg,
priv->iqcfg_dma);
-err_out_free_irq:
+err_free_irq_5:
free_irq(pdev->irq, priv->root);
-err_out_free1:
+err_release_4:
dscc4_free1(pdev);
-err_out_iounmap:
+err_iounmap_3:
iounmap (ioaddr);
-err_out_free_mmio_region:
- release_mem_region(pci_resource_start(pdev, 1),
- pci_resource_len(pdev, 1));
-err_out_free_mmio_region0:
- release_mem_region(pci_resource_start(pdev, 0),
- pci_resource_len(pdev, 0));
-err_out:
- return -ENODEV;
+err_free_mmio_regions_2:
+ pci_release_region(pdev, 1);
+err_free_mmio_region_1:
+ pci_release_region(pdev, 0);
+err_disable_0:
+ pci_disable_device(pdev);
+ goto out;
};
/*
@@ -882,8 +889,7 @@
struct dscc4_dev_priv *root;
int i, ret = -ENOMEM;
- root = (struct dscc4_dev_priv *)
- kmalloc(dev_per_card*sizeof(*root), GFP_KERNEL);
+ root = kmalloc(dev_per_card*sizeof(*root), GFP_KERNEL);
if (!root) {
printk(KERN_ERR "%s: can't allocate data\n", DRV_NAME);
goto err_out;
@@ -892,22 +898,17 @@
for (i = 0; i < dev_per_card; i++) {
root[i].dev = alloc_hdlcdev(root + i);
- if (!root[i].dev) {
- while (i--)
- free_netdev(root[i].dev);
+ if (!root[i].dev)
goto err_free_dev;
- }
}
- ppriv = (struct dscc4_pci_priv *) kmalloc(sizeof(*ppriv), GFP_KERNEL);
+ ppriv = kmalloc(sizeof(*ppriv), GFP_KERNEL);
if (!ppriv) {
printk(KERN_ERR "%s: can't allocate private data\n", DRV_NAME);
- goto err_free_dev2;
+ goto err_free_dev;
}
memset(ppriv, 0, sizeof(struct dscc4_pci_priv));
- ret = dscc4_set_quartz(root, quartz);
- if (ret < 0)
- goto err_free_priv;
+
ppriv->root = root;
spin_lock_init(&ppriv->lock);
@@ -951,20 +952,24 @@
goto err_unregister;
}
}
+
+ ret = dscc4_set_quartz(root, quartz);
+ if (ret < 0)
+ goto err_unregister;
+
pci_set_drvdata(pdev, ppriv);
return ret;
err_unregister:
- while (--i >= 0) {
+ while (i-- > 0) {
dscc4_release_ring(root + i);
- unregister_hdlc_device(dscc4_to_dev(&root[i]));
+ unregister_hdlc_device(dscc4_to_dev(root + i));
}
-err_free_priv:
kfree(ppriv);
-err_free_dev2:
- for (i = 0; i < dev_per_card; i++)
- free_netdev(root[i].dev);
+ i = dev_per_card;
err_free_dev:
+ while (i-- > 0)
+ free_netdev(root[i].dev);
kfree(root);
err_out:
return ret;
@@ -1998,10 +2003,10 @@
iounmap(ioaddr);
- release_mem_region(pci_resource_start(pdev, 1),
- pci_resource_len(pdev, 1));
- release_mem_region(pci_resource_start(pdev, 0),
- pci_resource_len(pdev, 0));
+ pci_release_region(pdev, 1);
+ pci_release_region(pdev, 0);
+
+ pci_disable_device(pdev);
}
static int dscc4_hdlc_attach(struct net_device *dev, unsigned short encoding,
diff -urN linux/drivers/net/wireless/strip.c linux/drivers/net/wireless/strip.c
--- linux/drivers/net/wireless/strip.c 2005/01/25 04:28:37 1.15
+++ linux/drivers/net/wireless/strip.c 2005/02/28 15:45:15 1.16
@@ -2398,7 +2398,7 @@
return 0;
}
-static int dev_set_mac_address(struct net_device *dev, void *addr)
+static int strip_set_mac_address(struct net_device *dev, void *addr)
{
struct strip *strip_info = (struct strip *) (dev->priv);
struct sockaddr *sa = addr;
@@ -2552,7 +2552,7 @@
dev->hard_start_xmit = strip_xmit;
dev->hard_header = strip_header;
dev->rebuild_header = strip_rebuild_header;
- dev->set_mac_address = dev_set_mac_address;
+ dev->set_mac_address = strip_set_mac_address;
dev->get_stats = strip_get_stats;
dev->change_mtu = strip_change_mtu;
}
diff -urN linux/drivers/pci/pci.c linux/drivers/pci/pci.c
--- linux/drivers/pci/pci.c 2005/01/25 04:28:38 1.80
+++ linux/drivers/pci/pci.c 2005/02/28 15:45:15 1.81
@@ -268,7 +268,7 @@
return -EIO;
pci_read_config_word(dev,pm + PCI_PM_PMC,&pmc);
- if ((pmc & PCI_PM_CAP_VER_MASK) != 2) {
+ if ((pmc & PCI_PM_CAP_VER_MASK) > 2) {
printk(KERN_DEBUG
"PCI: %s has unsupported PM cap regs version (%u)\n",
dev->slot_name, pmc & PCI_PM_CAP_VER_MASK);
diff -urN linux/drivers/pcmcia/soc_common.c linux/drivers/pcmcia/soc_common.c
--- linux/drivers/pcmcia/soc_common.c 2005/01/25 04:28:39 1.6
+++ linux/drivers/pcmcia/soc_common.c 2005/02/28 15:45:15 1.7
@@ -397,8 +397,8 @@
map->stop = PAGE_SIZE-1;
map->stop -= map->start;
- map->stop += (unsigned long)skt->virt_io;
- map->start = (unsigned long)skt->virt_io;
+ map->stop += skt->socket.io_offset;
+ map->start = skt->socket.io_offset;
return 0;
}
diff -urN linux/drivers/pcmcia/soc_common.h linux/drivers/pcmcia/soc_common.h
--- linux/drivers/pcmcia/soc_common.h 2004/06/09 14:12:10 1.2
+++ linux/drivers/pcmcia/soc_common.h 2005/02/28 15:45:15 1.3
@@ -53,7 +53,7 @@
struct resource res_io;
struct resource res_mem;
struct resource res_attr;
- void *virt_io;
+ void __iomem *virt_io;
unsigned int irq_state;
diff -urN linux/drivers/pnp/pnpbios/rsparser.c
linux/drivers/pnp/pnpbios/rsparser.c
--- linux/drivers/pnp/pnpbios/rsparser.c 2004/11/15 11:49:30 1.5
+++ linux/drivers/pnp/pnpbios/rsparser.c 2005/02/28 15:45:15 1.6
@@ -7,7 +7,12 @@
#include <linux/ctype.h>
#include <linux/pnp.h>
#include <linux/pnpbios.h>
+
+#ifdef CONFIG_PCI
#include <linux/pci.h>
+#else
+inline void pcibios_penalize_isa_irq(int irq) {}
+#endif /* CONFIG_PCI */
#include "pnpbios.h"
diff -urN linux/drivers/s390/block/dasd_genhd.c
linux/drivers/s390/block/dasd_genhd.c
--- linux/drivers/s390/block/dasd_genhd.c 2004/07/09 02:16:49 1.22
+++ linux/drivers/s390/block/dasd_genhd.c 2005/02/28 15:45:16 1.23
@@ -149,8 +149,8 @@
* Can't call delete_partitions directly. Use ioctl.
* The ioctl also does locking and invalidation.
*/
- memset(&bpart, sizeof(struct blkpg_partition), 0);
- memset(&barg, sizeof(struct blkpg_ioctl_arg), 0);
+ memset(&bpart, 0, sizeof(struct blkpg_partition));
+ memset(&barg, 0, sizeof(struct blkpg_ioctl_arg));
barg.data = &bpart;
barg.op = BLKPG_DEL_PARTITION;
for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--)
diff -urN linux/drivers/s390/cio/cmf.c linux/drivers/s390/cio/cmf.c
--- linux/drivers/s390/cio/cmf.c 2004/10/12 14:36:37 1.3
+++ linux/drivers/s390/cio/cmf.c 2005/02/28 15:45:16 1.4
@@ -526,7 +526,7 @@
time = get_clock() - cdev->private->cmb_start_time;
spin_unlock_irqrestore(cdev->ccwlock, flags);
- memset(data, sizeof(struct cmbdata), 0);
+ memset(data, 0, sizeof(struct cmbdata));
/* we only know values before device_busy_time */
data->size = offsetof(struct cmbdata, device_busy_time);
@@ -736,7 +736,7 @@
time = get_clock() - cdev->private->cmb_start_time;
spin_unlock_irqrestore(cdev->ccwlock, flags);
- memset (data, sizeof(struct cmbdata), 0);
+ memset (data, 0, sizeof(struct cmbdata));
/* we only know values before device_busy_time */
data->size = offsetof(struct cmbdata, device_busy_time);
diff -urN linux/drivers/s390/cio/css.c linux/drivers/s390/cio/css.c
--- linux/drivers/s390/cio/css.c 2005/01/25 04:28:41 1.15
+++ linux/drivers/s390/cio/css.c 2005/02/28 15:45:16 1.16
@@ -527,7 +527,7 @@
new_slow_sch = kmalloc(sizeof(struct slow_subchannel), GFP_ATOMIC);
if (!new_slow_sch)
return -ENOMEM;
- memset(new_slow_sch, sizeof(struct slow_subchannel), 0);
+ memset(new_slow_sch, 0, sizeof(struct slow_subchannel));
new_slow_sch->schid = schid;
spin_lock_irqsave(&slow_subchannel_lock, flags);
list_add_tail(&new_slow_sch->slow_list, &slow_subchannels_head);
diff -urN linux/drivers/scsi/sata_qstor.c linux/drivers/scsi/sata_qstor.c
--- linux/drivers/scsi/sata_qstor.c 1970/01/01 00:00:00
+++ linux/drivers/scsi/sata_qstor.c Mon Feb 28 15:45:16 2005 1.1
@@ -0,0 +1,700 @@
+/*
+ * sata_qstor.c - Pacific Digital Corporation QStor SATA
+ *
+ * Maintained by: Mark Lord <mlord@pobox.com>
+ *
+ * Copyright 2005 Pacific Digital Corporation.
+ * (OSL/GPL code release authorized by Jalil Fadavi).
+ *
+ * The contents of this file are subject to the Open
+ * Software License version 1.1 that can be found at
+ * http://www.opensource.org/licenses/osl-1.1.txt and is included herein
+ * by reference.
+ *
+ * Alternatively, the contents of this file may be used under the terms
+ * of the GNU General Public License version 2 (the "GPL") as distributed
+ * in the kernel source COPYING file, in which case the provisions of
+ * the GPL are applicable instead of the above. If you wish to allow
+ * the use of your version of this file only under the terms of the
+ * GPL and not to allow others to use your version of this file under
+ * the OSL, indicate your decision by deleting the provisions above and
+ * replace them with the notice and other provisions required by the GPL.
+ * If you do not delete the provisions above, a recipient may use your
+ * version of this file under either the OSL or the GPL.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/blkdev.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
+#include "scsi.h"
+#include <scsi/scsi_host.h>
+#include <asm/io.h>
+#include <linux/libata.h>
+
+#define DRV_NAME "sata_qstor"
+#define DRV_VERSION "0.03"
+
+enum {
+ QS_PORTS = 4,
+ QS_MAX_PRD = LIBATA_MAX_PRD,
+ QS_CPB_ORDER = 6,
+ QS_CPB_BYTES = (1 << QS_CPB_ORDER),
+ QS_PRD_BYTES = QS_MAX_PRD * 16,
+ QS_PKT_BYTES = QS_CPB_BYTES + QS_PRD_BYTES,
+
+ QS_DMA_BOUNDARY = ~0UL,
+
+ /* global register offsets */
+ QS_HCF_CNFG3 = 0x0003, /* host configuration offset */
+ QS_HID_HPHY = 0x0004, /* host physical interface info */
+ QS_HCT_CTRL = 0x00e4, /* global interrupt mask offset */
+ QS_HST_SFF = 0x0100, /* host status fifo offset */
+ QS_HVS_SERD3 = 0x0393, /* PHY enable offset */
+
+ /* global control bits */
+ QS_HPHY_64BIT = (1 << 1), /* 64-bit bus detected */
+ QS_CNFG3_GSRST = 0x01, /* global chip reset */
+ QS_SERD3_PHY_ENA = 0xf0, /* PHY detection ENAble*/
+
+ /* per-channel register offsets */
+ QS_CCF_CPBA = 0x0710, /* chan CPB base address */
+ QS_CCF_CSEP = 0x0718, /* chan CPB separation factor */
+ QS_CFC_HUFT = 0x0800, /* host upstream fifo threshold */
+ QS_CFC_HDFT = 0x0804, /* host downstream fifo threshold */
+ QS_CFC_DUFT = 0x0808, /* dev upstream fifo threshold */
+ QS_CFC_DDFT = 0x080c, /* dev downstream fifo threshold */
+ QS_CCT_CTR0 = 0x0900, /* chan control-0 offset */
+ QS_CCT_CTR1 = 0x0901, /* chan control-1 offset */
+ QS_CCT_CFF = 0x0a00, /* chan command fifo offset */
+
+ /* channel control bits */
+ QS_CTR0_REG = (1 << 1), /* register mode (vs. pkt mode) */
+ QS_CTR0_CLER = (1 << 2), /* clear channel errors */
+ QS_CTR1_RDEV = (1 << 1), /* sata phy/comms reset */
+ QS_CTR1_RCHN = (1 << 4), /* reset channel logic */
+ QS_CCF_RUN_PKT = 0x107, /* RUN a new dma PKT */
+
+ /* pkt sub-field headers */
+ QS_HCB_HDR = 0x01, /* Host Control Block header */
+ QS_DCB_HDR = 0x02, /* Device Control Block header */
+
+ /* pkt HCB flag bits */
+ QS_HF_DIRO = (1 << 0), /* data DIRection Out */
+ QS_HF_DAT = (1 << 3), /* DATa pkt */
+ QS_HF_IEN = (1 << 4), /* Interrupt ENable */
+ QS_HF_VLD = (1 << 5), /* VaLiD pkt */
+
+ /* pkt DCB flag bits */
+ QS_DF_PORD = (1 << 2), /* Pio OR Dma */
+ QS_DF_ELBA = (1 << 3), /* Extended LBA (lba48) */
+
+ /* PCI device IDs */
+ board_2068_idx = 0, /* QStor 4-port SATA/RAID */
+};
+
+typedef enum { qs_state_idle, qs_state_pkt, qs_state_mmio } qs_state_t;
+
+struct qs_port_priv {
+ u8 *pkt;
+ dma_addr_t pkt_dma;
+ qs_state_t state;
+};
+
+static u32 qs_scr_read (struct ata_port *ap, unsigned int sc_reg);
+static void qs_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
+static int qs_ata_init_one (struct pci_dev *pdev, const struct pci_device_id
*ent);
+static irqreturn_t qs_intr (int irq, void *dev_instance, struct pt_regs *regs);
+static int qs_port_start(struct ata_port *ap);
+static void qs_host_stop(struct ata_host_set *host_set);
+static void qs_port_stop(struct ata_port *ap);
+static void qs_phy_reset(struct ata_port *ap);
+static void qs_qc_prep(struct ata_queued_cmd *qc);
+static int qs_qc_issue(struct ata_queued_cmd *qc);
+static int qs_check_atapi_dma(struct ata_queued_cmd *qc);
+static void qs_bmdma_stop(struct ata_port *ap);
+static u8 qs_bmdma_status(struct ata_port *ap);
+static void qs_irq_clear(struct ata_port *ap);
+
+static Scsi_Host_Template qs_ata_sht = {
+ .module = THIS_MODULE,
+ .name = DRV_NAME,
+ .ioctl = ata_scsi_ioctl,
+ .queuecommand = ata_scsi_queuecmd,
+ .eh_strategy_handler = ata_scsi_error,
+ .can_queue = ATA_DEF_QUEUE,
+ .this_id = ATA_SHT_THIS_ID,
+ .sg_tablesize = QS_MAX_PRD,
+ .max_sectors = ATA_MAX_SECTORS,
+ .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
+ .emulated = ATA_SHT_EMULATED,
+ //FIXME .use_clustering = ATA_SHT_USE_CLUSTERING,
+ .use_clustering = ENABLE_CLUSTERING,
+ .proc_name = DRV_NAME,
+ .dma_boundary = QS_DMA_BOUNDARY,
+ .slave_configure = ata_scsi_slave_config,
+ .bios_param = ata_std_bios_param,
+};
+
+static struct ata_port_operations qs_ata_ops = {
+ .port_disable = ata_port_disable,
+ .tf_load = ata_tf_load,
+ .tf_read = ata_tf_read,
+ .check_status = ata_check_status,
+ .check_atapi_dma = qs_check_atapi_dma,
+ .exec_command = ata_exec_command,
+ .dev_select = ata_std_dev_select,
+ .phy_reset = qs_phy_reset,
+ .qc_prep = qs_qc_prep,
+ .qc_issue = qs_qc_issue,
+ .eng_timeout = ata_eng_timeout,
+ .irq_handler = qs_intr,
+ .irq_clear = qs_irq_clear,
+ .scr_read = qs_scr_read,
+ .scr_write = qs_scr_write,
+ .port_start = qs_port_start,
+ .port_stop = qs_port_stop,
+ .host_stop = qs_host_stop,
+ .bmdma_stop = qs_bmdma_stop,
+ .bmdma_status = qs_bmdma_status,
+};
+
+static struct ata_port_info qs_port_info[] = {
+ /* board_2068_idx */
+ {
+ .sht = &qs_ata_sht,
+ .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
+ ATA_FLAG_SATA_RESET |
+ //FIXME ATA_FLAG_SRST |
+ ATA_FLAG_MMIO,
+ .pio_mask = 0x10, /* pio4 */
+ .udma_mask = 0x7f, /* udma0-6 */
+ .port_ops = &qs_ata_ops,
+ },
+};
+
+static struct pci_device_id qs_ata_pci_tbl[] = {
+ { PCI_VENDOR_ID_PDC, 0x2068, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_2068_idx },
+
+ { } /* terminate list */
+};
+
+static struct pci_driver qs_ata_pci_driver = {
+ .name = DRV_NAME,
+ .id_table = qs_ata_pci_tbl,
+ .probe = qs_ata_init_one,
+ .remove = ata_pci_remove_one,
+};
+
+static int qs_check_atapi_dma(struct ata_queued_cmd *qc)
+{
+ return 1; /* ATAPI DMA not supported */
+}
+
+static void qs_bmdma_stop(struct ata_port *ap)
+{
+ /* nothing */
+}
+
+static u8 qs_bmdma_status(struct ata_port *ap)
+{
+ return 0;
+}
+
+static void qs_irq_clear(struct ata_port *ap)
+{
+ /* nothing */
+}
+
+static void qs_enter_reg_mode(struct ata_port *ap)
+{
+ u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000);
+
+ writeb(QS_CTR0_REG, chan + QS_CCT_CTR0);
+ readb(chan + QS_CCT_CTR0); /* flush */
+}
+
+static void qs_phy_reset(struct ata_port *ap)
+{
+ u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000);
+ struct qs_port_priv *pp = ap->private_data;
+
+ pp->state = qs_state_idle;
+ writeb(QS_CTR1_RCHN, chan + QS_CCT_CTR1);
+ qs_enter_reg_mode(ap);
+ sata_phy_reset(ap);
+}
+
+static u32 qs_scr_read (struct ata_port *ap, unsigned int sc_reg)
+{
+ if (sc_reg > SCR_CONTROL)
+ return ~0U;
+ return readl((void __iomem *)(ap->ioaddr.scr_addr + (sc_reg * 8)));
+}
+
+static void qs_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
+{
+ if (sc_reg > SCR_CONTROL)
+ return;
+ writel(val, (void __iomem *)(ap->ioaddr.scr_addr + (sc_reg * 8)));
+}
+
+static void qs_fill_sg(struct ata_queued_cmd *qc)
+{
+ struct scatterlist *sg = qc->sg;
+ struct ata_port *ap = qc->ap;
+ struct qs_port_priv *pp = ap->private_data;
+ unsigned int nelem;
+ u8 *prd = pp->pkt + QS_CPB_BYTES;
+
+ assert(sg != NULL);
+ assert(qc->n_elem > 0);
+
+ for (nelem = 0; nelem < qc->n_elem; nelem++,sg++) {
+ u64 addr;
+ u32 len;
+
+ addr = sg_dma_address(sg);
+ *(u64 *)prd = cpu_to_le64(addr);
+ prd += sizeof(u64);
+
+ len = sg_dma_len(sg);
+ *(u32 *)prd = cpu_to_le32(len);
+ prd += sizeof(u64);
+
+ VPRINTK("PRD[%u] = (0x%llX, 0x%X)\n", nelem,
+ (unsigned long long)addr, len);
+ }
+}
+
+static void qs_qc_prep(struct ata_queued_cmd *qc)
+{
+ struct qs_port_priv *pp = qc->ap->private_data;
+ u8 dflags = QS_DF_PORD, *buf = pp->pkt;
+ u8 hflags = QS_HF_DAT | QS_HF_IEN | QS_HF_VLD;
+ u64 addr;
+
+ VPRINTK("ENTER\n");
+
+ qs_enter_reg_mode(qc->ap);
+ if (qc->tf.protocol != ATA_PROT_DMA) {
+ ata_qc_prep(qc);
+ return;
+ }
+
+ qs_fill_sg(qc);
+
+ if ((qc->tf.flags & ATA_TFLAG_WRITE))
+ hflags |= QS_HF_DIRO;
+ if ((qc->tf.flags & ATA_TFLAG_LBA48))
+ dflags |= QS_DF_ELBA;
+
+ /* host control block (HCB) */
+ buf[ 0] = QS_HCB_HDR;
+ buf[ 1] = hflags;
+ *(u32 *)(&buf[ 4]) = cpu_to_le32(qc->nsect * ATA_SECT_SIZE);
+ *(u32 *)(&buf[ 8]) = cpu_to_le32(qc->n_elem);
+ addr = ((u64)pp->pkt_dma) + QS_CPB_BYTES;
+ *(u64 *)(&buf[16]) = cpu_to_le64(addr);
+
+ /* device control block (DCB) */
+ buf[24] = QS_DCB_HDR;
+ buf[28] = dflags;
+
+ /* frame information structure (FIS) */
+ ata_tf_to_fis(&qc->tf, &buf[32], 0);
+}
+
+static inline void qs_packet_start(struct ata_queued_cmd *qc)
+{
+ struct ata_port *ap = qc->ap;
+ u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000);
+
+ VPRINTK("ENTER, ap %p\n", ap);
+
+ writeb(QS_CTR0_CLER, chan + QS_CCT_CTR0);
+ wmb(); /* flush PRDs and pkt to memory */
+ writel(QS_CCF_RUN_PKT, chan + QS_CCT_CFF);
+ readl(chan + QS_CCT_CFF); /* flush */
+}
+
+static int qs_qc_issue(struct ata_queued_cmd *qc)
+{
+ struct qs_port_priv *pp = qc->ap->private_data;
+
+ switch (qc->tf.protocol) {
+ case ATA_PROT_DMA:
+
+ pp->state = qs_state_pkt;
+ qs_packet_start(qc);
+ return 0;
+
+ case ATA_PROT_ATAPI_DMA:
+ BUG();
+ break;
+
+ default:
+ break;
+ }
+
+ pp->state = qs_state_mmio;
+ return ata_qc_issue_prot(qc);
+}
+
+static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set)
+{
+ unsigned int handled = 0;
+ u8 sFFE;
+ u8 __iomem *mmio_base = host_set->mmio_base;
+
+ do {
+ u32 sff0 = readl(mmio_base + QS_HST_SFF);
+ u32 sff1 = readl(mmio_base + QS_HST_SFF + 4);
+ u8 sEVLD = (sff1 >> 30) & 0x01; /* valid flag */
+ sFFE = sff1 >> 31; /* empty flag */
+
+ if (sEVLD) {
+ u8 sDST = sff0 >> 16; /* dev status */
+ u8 sHST = sff1 & 0x3f; /* host status */
+ unsigned int port_no = (sff1 >> 8) & 0x03;
+ struct ata_port *ap = host_set->ports[port_no];
+
+ DPRINTK("SFF=%08x%08x: sCHAN=%u sHST=%d sDST=%02x\n",
+ sff1, sff0, port_no, sHST, sDST);
+ handled = 1;
+ if (ap && (!(ap->flags & ATA_FLAG_PORT_DISABLED))) {
+ struct ata_queued_cmd *qc;
+ struct qs_port_priv *pp = ap->private_data;
+ if (!pp || pp->state != qs_state_pkt)
+ continue;
+ qc = ata_qc_from_tag(ap, ap->active_tag);
+ if (qc && (!(qc->tf.ctl & ATA_NIEN))) {
+ switch (sHST) {
+ case 0: /* sucessful CPB */
+ case 3: /* device error */
+ pp->state = qs_state_idle;
+ qs_enter_reg_mode(qc->ap);
+ ata_qc_complete(qc, sDST);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ } while (!sFFE);
+ return handled;
+}
+
+static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set)
+{
+ unsigned int handled = 0, port_no;
+
+ for (port_no = 0; port_no < host_set->n_ports; ++port_no) {
+ struct ata_port *ap;
+ ap = host_set->ports[port_no];
+ if (ap && (!(ap->flags & ATA_FLAG_PORT_DISABLED))) {
+ struct ata_queued_cmd *qc;
+ struct qs_port_priv *pp = ap->private_data;
+ if (!pp || pp->state != qs_state_mmio)
+ continue;
+ qc = ata_qc_from_tag(ap, ap->active_tag);
+ if (qc && (!(qc->tf.ctl & ATA_NIEN))) {
+
+ /* check main status, clearing INTRQ */
+ u8 status = ata_chk_status(ap);
+ if ((status & ATA_BUSY))
+ continue;
+ DPRINTK("ata%u: protocol %d (dev_stat 0x%X)\n",
+ ap->id, qc->tf.protocol, status);
+
+ /* complete taskfile transaction */
+ pp->state = qs_state_idle;
+ ata_qc_complete(qc, status);
+ handled = 1;
+ }
+ }
+ }
+ return handled;
+}
+
+static irqreturn_t qs_intr(int irq, void *dev_instance, struct pt_regs *regs)
+{
+ struct ata_host_set *host_set = dev_instance;
+ unsigned int handled = 0;
+
+ VPRINTK("ENTER\n");
+
+ spin_lock(&host_set->lock);
+ handled = qs_intr_pkt(host_set) | qs_intr_mmio(host_set);
+ spin_unlock(&host_set->lock);
+
+ VPRINTK("EXIT\n");
+
+ return IRQ_RETVAL(handled);
+}
+
+static void qs_ata_setup_port(struct ata_ioports *port, unsigned long base)
+{
+ port->cmd_addr =
+ port->data_addr = base + 0x400;
+ port->error_addr =
+ port->feature_addr = base + 0x408; /* hob_feature = 0x409 */
+ port->nsect_addr = base + 0x410; /* hob_nsect = 0x411 */
+ port->lbal_addr = base + 0x418; /* hob_lbal = 0x419 */
+ port->lbam_addr = base + 0x420; /* hob_lbam = 0x421 */
+ port->lbah_addr = base + 0x428; /* hob_lbah = 0x429 */
+ port->device_addr = base + 0x430;
+ port->status_addr =
+ port->command_addr = base + 0x438;
+ port->altstatus_addr =
+ port->ctl_addr = base + 0x440;
+ port->scr_addr = base + 0xc00;
+}
+
+static int qs_port_start(struct ata_port *ap)
+{
+ struct device *dev = ap->host_set->dev;
+ struct qs_port_priv *pp;
+ void __iomem *mmio_base = ap->host_set->mmio_base;
+ void __iomem *chan = mmio_base + (ap->port_no * 0x4000);
+ u64 addr;
+ int rc;
+
+ rc = ata_port_start(ap);
+ if (rc)
+ return rc;
+ qs_enter_reg_mode(ap);
+ pp = kcalloc(1, sizeof(*pp), GFP_KERNEL);
+ if (!pp) {
+ rc = -ENOMEM;
+ goto err_out;
+ }
+ pp->pkt = dma_alloc_coherent(dev, QS_PKT_BYTES, &pp->pkt_dma,
+ GFP_KERNEL);
+ if (!pp->pkt) {
+ rc = -ENOMEM;
+ goto err_out_kfree;
+ }
+ memset(pp->pkt, 0, QS_PKT_BYTES);
+ ap->private_data = pp;
+
+ addr = (u64)pp->pkt_dma;
+ writel((u32) addr, chan + QS_CCF_CPBA);
+ writel((u32)(addr >> 32), chan + QS_CCF_CPBA + 4);
+ return 0;
+
+err_out_kfree:
+ kfree(pp);
+err_out:
+ ata_port_stop(ap);
+ return rc;
+}
+
+static void qs_port_stop(struct ata_port *ap)
+{
+ struct device *dev = ap->host_set->dev;
+ struct qs_port_priv *pp = ap->private_data;
+
+ if (pp != NULL) {
+ ap->private_data = NULL;
+ if (pp->pkt != NULL)
+ dma_free_coherent(dev, QS_PKT_BYTES, pp->pkt,
+ pp->pkt_dma);
+ kfree(pp);
+ }
+ ata_port_stop(ap);
+}
+
+static void qs_host_stop(struct ata_host_set *host_set)
+{
+ void __iomem *mmio_base = host_set->mmio_base;
+
+ writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */
+ writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */
+}
+
+static void qs_host_init(unsigned int chip_id, struct ata_probe_ent *pe)
+{
+ void __iomem *mmio_base = pe->mmio_base;
+ unsigned int port_no;
+
+ writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */
+ writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */
+
+ /* reset each channel in turn */
+ for (port_no = 0; port_no < pe->n_ports; ++port_no) {
+ u8 __iomem *chan = mmio_base + (port_no * 0x4000);
+ writeb(QS_CTR1_RDEV|QS_CTR1_RCHN, chan + QS_CCT_CTR1);
+ writeb(QS_CTR0_REG, chan + QS_CCT_CTR0);
+ readb(chan + QS_CCT_CTR0); /* flush */
+ }
+ writeb(QS_SERD3_PHY_ENA, mmio_base + QS_HVS_SERD3); /* enable phy */
+
+ for (port_no = 0; port_no < pe->n_ports; ++port_no) {
+ u8 __iomem *chan = mmio_base + (port_no * 0x4000);
+ /* set FIFO depths to same settings as Windows driver */
+ writew(32, chan + QS_CFC_HUFT);
+ writew(32, chan + QS_CFC_HDFT);
+ writew(10, chan + QS_CFC_DUFT);
+ writew( 8, chan + QS_CFC_DDFT);
+ /* set CPB size in bytes, as a power of two */
+ writeb(QS_CPB_ORDER, chan + QS_CCF_CSEP);
+ }
+ writeb(1, mmio_base + QS_HCT_CTRL); /* enable host interrupts */
+}
+
+/*
+ * The QStor understands 64-bit buses, and uses 64-bit fields
+ * for DMA pointers regardless of bus width. We just have to
+ * make sure our DMA masks are set appropriately for whatever
+ * bridge lies between us and the QStor, and then the DMA mapping
+ * code will ensure we only ever "see" appropriate buffer addresses.
+ * If we're 32-bit limited somewhere, then our 64-bit fields will
+ * just end up with zeros in the upper 32-bits, without any special
+ * logic required outside of this routine (below).
+ */
+static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
+{
+ u32 bus_info = readl(mmio_base + QS_HID_HPHY);
+ int rc, have_64bit_bus = (bus_info & QS_HPHY_64BIT);
+
+ if (have_64bit_bus &&
+ !pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) {
+ rc = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
+ if (rc) {
+ rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL);
+ if (rc) {
+ printk(KERN_ERR DRV_NAME
+ "(%s): 64-bit DMA enable failed\n",
+ pci_name(pdev));
+ return rc;
+ }
+ }
+ } else {
+ rc = pci_set_dma_mask(pdev, 0xffffffffULL);
+ if (rc) {
+ printk(KERN_ERR DRV_NAME
+ "(%s): 32-bit DMA enable failed\n",
+ pci_name(pdev));
+ return rc;
+ }
+ rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL);
+ if (rc) {
+ printk(KERN_ERR DRV_NAME
+ "(%s): 32-bit consistent DMA enable failed\n",
+ pci_name(pdev));
+ return rc;
+ }
+ }
+ return 0;
+}
+
+static int qs_ata_init_one(struct pci_dev *pdev,
+ const struct pci_device_id *ent)
+{
+ static int printed_version;
+ struct ata_probe_ent *probe_ent = NULL;
+ void __iomem *mmio_base;
+ unsigned int board_idx = (unsigned int) ent->driver_data;
+ int rc, port_no;
+
+ if (!printed_version++)
+ printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
+
+ rc = pci_enable_device(pdev);
+ if (rc)
+ return rc;
+
+ rc = pci_request_regions(pdev, DRV_NAME);
+ if (rc)
+ goto err_out;
+
+ if ((pci_resource_flags(pdev, 4) & IORESOURCE_MEM) == 0) {
+ rc = -ENODEV;
+ goto err_out_regions;
+ }
+
+ mmio_base = ioremap(pci_resource_start(pdev, 4),
+ pci_resource_len(pdev, 4));
+ if (mmio_base == NULL) {
+ rc = -ENOMEM;
+ goto err_out_regions;
+ }
+
+ rc = qs_set_dma_masks(pdev, mmio_base);
+ if (rc)
+ goto err_out_iounmap;
+
+ probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL);
+ if (probe_ent == NULL) {
+ rc = -ENOMEM;
+ goto err_out_iounmap;
+ }
+
+ memset(probe_ent, 0, sizeof(*probe_ent));
+ probe_ent->dev = pci_dev_to_dev(pdev);
+ INIT_LIST_HEAD(&probe_ent->node);
+
+ probe_ent->sht = qs_port_info[board_idx].sht;
+ probe_ent->host_flags = qs_port_info[board_idx].host_flags;
+ probe_ent->pio_mask = qs_port_info[board_idx].pio_mask;
+ probe_ent->mwdma_mask = qs_port_info[board_idx].mwdma_mask;
+ probe_ent->udma_mask = qs_port_info[board_idx].udma_mask;
+ probe_ent->port_ops = qs_port_info[board_idx].port_ops;
+
+ probe_ent->irq = pdev->irq;
+ probe_ent->irq_flags = SA_SHIRQ;
+ probe_ent->mmio_base = mmio_base;
+ probe_ent->n_ports = QS_PORTS;
+
+ for (port_no = 0; port_no < probe_ent->n_ports; ++port_no) {
+ unsigned long chan = (unsigned long)mmio_base +
+ (port_no * 0x4000);
+ qs_ata_setup_port(&probe_ent->port[port_no], chan);
+ }
+
+ pci_set_master(pdev);
+
+ /* initialize adapter */
+ qs_host_init(board_idx, probe_ent);
+
+ rc = ata_device_add(probe_ent);
+ kfree(probe_ent);
+ if (rc != QS_PORTS)
+ goto err_out_iounmap;
+ return 0;
+
+err_out_iounmap:
+ iounmap(mmio_base);
+err_out_regions:
+ pci_release_regions(pdev);
+err_out:
+ pci_disable_device(pdev);
+ return rc;
+}
+
+static int __init qs_ata_init(void)
+{
+ return pci_module_init(&qs_ata_pci_driver);
+}
+
+static void __exit qs_ata_exit(void)
+{
+ pci_unregister_driver(&qs_ata_pci_driver);
+}
+
+MODULE_AUTHOR("Mark Lord");
+MODULE_DESCRIPTION("Pacific Digital Corporation QStor SATA low-level driver");
+MODULE_LICENSE("GPL");
+MODULE_DEVICE_TABLE(pci, qs_ata_pci_tbl);
+MODULE_VERSION(DRV_VERSION);
+
+module_init(qs_ata_init);
+module_exit(qs_ata_exit);
diff -urN linux/drivers/scsi/Kconfig linux/drivers/scsi/Kconfig
--- linux/drivers/scsi/Kconfig 2005/01/25 04:28:41 1.44
+++ linux/drivers/scsi/Kconfig 2005/02/28 15:45:16 1.45
@@ -457,6 +457,14 @@
If unsure, say N.
+config SCSI_SATA_QSTOR
+ tristate "Pacific Digital SATA QStor support"
+ depends on SCSI_SATA && PCI
+ help
+ This option enables support for Pacific Digital Serial ATA QStor.
+
+ If unsure, say N.
+
config SCSI_SATA_SX4
tristate "Promise SATA SX4 support"
depends on SCSI_SATA && PCI && EXPERIMENTAL
diff -urN linux/drivers/scsi/Makefile linux/drivers/scsi/Makefile
--- linux/drivers/scsi/Makefile 2005/01/13 14:06:20 1.76
+++ linux/drivers/scsi/Makefile 2005/02/28 15:45:16 1.77
@@ -125,6 +125,7 @@
obj-$(CONFIG_SCSI_SATA_SVW) += libata.o sata_svw.o
obj-$(CONFIG_SCSI_ATA_PIIX) += libata.o ata_piix.o
obj-$(CONFIG_SCSI_SATA_PROMISE) += libata.o sata_promise.o
+obj-$(CONFIG_SCSI_SATA_QSTOR) += libata.o sata_qstor.o
obj-$(CONFIG_SCSI_SATA_SIL) += libata.o sata_sil.o
obj-$(CONFIG_SCSI_SATA_VIA) += libata.o sata_via.o
obj-$(CONFIG_SCSI_SATA_VITESSE) += libata.o sata_vsc.o
diff -urN linux/drivers/scsi/ahci.c linux/drivers/scsi/ahci.c
--- linux/drivers/scsi/ahci.c 2005/02/13 20:16:26 1.7
+++ linux/drivers/scsi/ahci.c 2005/02/28 15:45:16 1.8
@@ -179,6 +179,7 @@
static void ahci_host_stop(struct ata_host_set *host_set);
static void ahci_qc_prep(struct ata_queued_cmd *qc);
static u8 ahci_check_status(struct ata_port *ap);
+static u8 ahci_check_err(struct ata_port *ap);
static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd
*qc);
static Scsi_Host_Template ahci_sht = {
@@ -204,6 +205,8 @@
.port_disable = ata_port_disable,
.check_status = ahci_check_status,
+ .check_altstatus = ahci_check_status,
+ .check_err = ahci_check_err,
.dev_select = ata_noop_dev_select,
.phy_reset = ahci_phy_reset,
@@ -452,6 +455,13 @@
return readl(mmio + PORT_TFDATA) & 0xFF;
}
+static u8 ahci_check_err(struct ata_port *ap)
+{
+ void *mmio = (void *) ap->ioaddr.cmd_addr;
+
+ return (readl(mmio + PORT_TFDATA) >> 8) & 0xFF;
+}
+
static void ahci_fill_sg(struct ata_queued_cmd *qc)
{
struct ahci_port_priv *pp = qc->ap->private_data;
@@ -940,6 +950,7 @@
unsigned long base;
void *mmio_base;
unsigned int board_idx = (unsigned int) ent->driver_data;
+ int pci_dev_busy = 0;
int rc;
VPRINTK("ENTER\n");
@@ -952,8 +963,10 @@
return rc;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out;
+ }
pci_enable_intx(pdev);
@@ -1015,7 +1028,8 @@
err_out_regions:
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
return rc;
}
diff -urN linux/drivers/scsi/ata_piix.c linux/drivers/scsi/ata_piix.c
--- linux/drivers/scsi/ata_piix.c 2005/01/13 14:06:20 1.17
+++ linux/drivers/scsi/ata_piix.c 2005/02/28 15:45:16 1.18
@@ -138,6 +138,8 @@
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
+ .bmdma_stop = ata_bmdma_stop,
+ .bmdma_status = ata_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
@@ -163,6 +165,8 @@
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
+ .bmdma_stop = ata_bmdma_stop,
+ .bmdma_status = ata_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
diff -urN linux/drivers/scsi/libata-core.c linux/drivers/scsi/libata-core.c
--- linux/drivers/scsi/libata-core.c 2005/02/13 20:16:26 1.25
+++ linux/drivers/scsi/libata-core.c 2005/02/28 15:45:16 1.26
@@ -377,7 +377,7 @@
}
/**
- * ata_check_status - Read device status reg & clear interrupt
+ * ata_check_status_pio - Read device status reg & clear interrupt
* @ap: port where the device is
*
* Reads ATA taskfile status register for currently-selected device
@@ -415,6 +415,27 @@
return ata_check_status_pio(ap);
}
+u8 ata_altstatus(struct ata_port *ap)
+{
+ if (ap->ops->check_altstatus)
+ return ap->ops->check_altstatus(ap);
+
+ if (ap->flags & ATA_FLAG_MMIO)
+ return readb((void __iomem *)ap->ioaddr.altstatus_addr);
+ return inb(ap->ioaddr.altstatus_addr);
+}
+
+u8 ata_chk_err(struct ata_port *ap)
+{
+ if (ap->ops->check_err)
+ return ap->ops->check_err(ap);
+
+ if (ap->flags & ATA_FLAG_MMIO) {
+ return readb((void __iomem *) ap->ioaddr.error_addr);
+ }
+ return inb(ap->ioaddr.error_addr);
+}
+
/**
* ata_tf_to_fis - Convert ATA taskfile to SATA FIS structure
* @tf: Taskfile to convert
@@ -1161,7 +1182,6 @@
printk(KERN_WARNING "ata%u: dev %u not supported, ignoring\n",
ap->id, device);
err_out:
- ata_irq_on(ap); /* re-enable interrupts */
dev->class++; /* converts ATA_DEV_xxx into ATA_DEV_xxx_UNSUP */
DPRINTK("EXIT, err\n");
}
@@ -1669,7 +1689,8 @@
ata_dev_try_classify(ap, 1);
/* re-enable interrupts */
- ata_irq_on(ap);
+ if (ap->ioaddr.ctl_addr) /* FIXME: hack. create a hook instead */
+ ata_irq_on(ap);
/* is double-select really necessary? */
if (ap->device[1].class != ATA_DEV_NONE)
@@ -2601,10 +2622,10 @@
case ATA_PROT_DMA:
case ATA_PROT_ATAPI_DMA:
- host_stat = ata_bmdma_status(ap);
+ host_stat = ap->ops->bmdma_status(ap);
/* before we do anything else, clear DMA-Start bit */
- ata_bmdma_stop(ap);
+ ap->ops->bmdma_stop(ap);
/* fall through */
@@ -2613,7 +2634,7 @@
drv_stat = ata_chk_status(ap);
/* ack bmdma irq events */
- ata_bmdma_ack_irq(ap);
+ ap->ops->irq_clear(ap);
printk(KERN_ERR "ata%u: command 0x%x timeout, stat 0x%x
host_stat 0x%x\n",
ap->id, qc->tf.command, drv_stat, host_stat);
@@ -2752,6 +2773,24 @@
}
/**
+ * ata_qc_free - free unused ata_queued_cmd
+ * @qc: Command to complete
+ *
+ * Designed to free unused ata_queued_cmd object
+ * in case something prevents using it.
+ *
+ * LOCKING:
+ *
+ */
+void ata_qc_free(struct ata_queued_cmd *qc)
+{
+ assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */
+ assert(qc->waiting == NULL); /* nothing should be waiting */
+
+ __ata_qc_complete(qc);
+}
+
+/**
* ata_qc_complete - Complete an active ATA command
* @qc: Command to complete
* @drv_stat: ATA status register contents
@@ -2800,7 +2839,7 @@
return 1;
/* fall through */
-
+
default:
return 0;
}
@@ -3042,7 +3081,43 @@
void ata_bmdma_irq_clear(struct ata_port *ap)
{
- ata_bmdma_ack_irq(ap);
+ if (ap->flags & ATA_FLAG_MMIO) {
+ void __iomem *mmio = ((void __iomem *) ap->ioaddr.bmdma_addr) +
ATA_DMA_STATUS;
+ writeb(readb(mmio), mmio);
+ } else {
+ unsigned long addr = ap->ioaddr.bmdma_addr + ATA_DMA_STATUS;
+ outb(inb(addr), addr);
+ }
+
+}
+
+u8 ata_bmdma_status(struct ata_port *ap)
+{
+ u8 host_stat;
+ if (ap->flags & ATA_FLAG_MMIO) {
+ void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr;
+ host_stat = readb(mmio + ATA_DMA_STATUS);
+ } else
+ host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+ return host_stat;
+}
+
+void ata_bmdma_stop(struct ata_port *ap)
+{
+ if (ap->flags & ATA_FLAG_MMIO) {
+ void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr;
+
+ /* clear start/stop bit */
+ writeb(readb(mmio + ATA_DMA_CMD) & ~ATA_DMA_START,
+ mmio + ATA_DMA_CMD);
+ } else {
+ /* clear start/stop bit */
+ outb(inb(ap->ioaddr.bmdma_addr + ATA_DMA_CMD) & ~ATA_DMA_START,
+ ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
+ }
+
+ /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
+ ata_altstatus(ap); /* dummy read */
}
/**
@@ -3072,7 +3147,7 @@
case ATA_PROT_ATAPI_DMA:
case ATA_PROT_ATAPI:
/* check status of DMA engine */
- host_stat = ata_bmdma_status(ap);
+ host_stat = ap->ops->bmdma_status(ap);
VPRINTK("ata%u: host_stat 0x%X\n", ap->id, host_stat);
/* if it's not our irq... */
@@ -3080,7 +3155,7 @@
goto idle_irq;
/* before we do anything else, clear DMA-Start bit */
- ata_bmdma_stop(ap);
+ ap->ops->bmdma_stop(ap);
/* fall through */
@@ -3099,7 +3174,7 @@
ap->id, qc->tf.protocol, status);
/* ack bmdma irq events */
- ata_bmdma_ack_irq(ap);
+ ap->ops->irq_clear(ap);
/* complete taskfile transaction */
ata_qc_complete(qc, status);
@@ -3656,6 +3731,7 @@
struct ata_port_info *port[2];
u8 tmp8, mask;
unsigned int legacy_mode = 0;
+ int disable_dev_on_err = 1;
int rc;
DPRINTK("ENTER\n");
@@ -3686,8 +3762,10 @@
return rc;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ disable_dev_on_err = 0;
goto err_out;
+ }
if (legacy_mode) {
if (!request_region(0x1f0, 8, "libata")) {
@@ -3697,8 +3775,10 @@
conflict = ____request_resource(&ioport_resource, &res);
if (!strcmp(conflict->name, "libata"))
legacy_mode |= (1 << 0);
- else
+ else {
+ disable_dev_on_err = 0;
printk(KERN_WARNING "ata: 0x1f0 IDE port
busy\n");
+ }
} else
legacy_mode |= (1 << 0);
@@ -3709,8 +3789,10 @@
conflict = ____request_resource(&ioport_resource, &res);
if (!strcmp(conflict->name, "libata"))
legacy_mode |= (1 << 1);
- else
+ else {
+ disable_dev_on_err = 0;
printk(KERN_WARNING "ata: 0x170 IDE port
busy\n");
+ }
} else
legacy_mode |= (1 << 1);
}
@@ -3743,16 +3825,13 @@
if (legacy_mode) {
if (legacy_mode & (1 << 0))
ata_device_add(probe_ent);
- else
- kfree(probe_ent);
if (legacy_mode & (1 << 1))
ata_device_add(probe_ent2);
- else
- kfree(probe_ent2);
- } else {
+ } else
ata_device_add(probe_ent);
- }
+
kfree(probe_ent);
+ kfree(probe_ent2);
return 0;
@@ -3763,7 +3842,8 @@
release_region(0x170, 8);
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (disable_dev_on_err)
+ pci_disable_device(pdev);
return rc;
}
@@ -3913,6 +3993,8 @@
EXPORT_SYMBOL_GPL(ata_tf_to_fis);
EXPORT_SYMBOL_GPL(ata_tf_from_fis);
EXPORT_SYMBOL_GPL(ata_check_status);
+EXPORT_SYMBOL_GPL(ata_altstatus);
+EXPORT_SYMBOL_GPL(ata_chk_err);
EXPORT_SYMBOL_GPL(ata_exec_command);
EXPORT_SYMBOL_GPL(ata_port_start);
EXPORT_SYMBOL_GPL(ata_port_stop);
@@ -3921,6 +4003,8 @@
EXPORT_SYMBOL_GPL(ata_bmdma_setup);
EXPORT_SYMBOL_GPL(ata_bmdma_start);
EXPORT_SYMBOL_GPL(ata_bmdma_irq_clear);
+EXPORT_SYMBOL_GPL(ata_bmdma_status);
+EXPORT_SYMBOL_GPL(ata_bmdma_stop);
EXPORT_SYMBOL_GPL(ata_port_probe);
EXPORT_SYMBOL_GPL(sata_phy_reset);
EXPORT_SYMBOL_GPL(__sata_phy_reset);
diff -urN linux/drivers/scsi/libata-scsi.c linux/drivers/scsi/libata-scsi.c
--- linux/drivers/scsi/libata-scsi.c 2005/02/13 20:16:26 1.19
+++ linux/drivers/scsi/libata-scsi.c 2005/02/28 15:45:16 1.20
@@ -701,6 +701,7 @@
return;
err_out:
+ ata_qc_free(qc);
ata_bad_cdb(cmd, done);
DPRINTK("EXIT - badcmd\n");
}
diff -urN linux/drivers/scsi/libata.h linux/drivers/scsi/libata.h
--- linux/drivers/scsi/libata.h 2005/01/13 14:06:20 1.13
+++ linux/drivers/scsi/libata.h 2005/02/28 15:45:16 1.14
@@ -37,6 +37,7 @@
/* libata-core.c */
extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
struct ata_device *dev);
+extern void ata_qc_free(struct ata_queued_cmd *qc);
extern int ata_qc_issue(struct ata_queued_cmd *qc);
extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
extern void ata_dev_select(struct ata_port *ap, unsigned int device,
diff -urN linux/drivers/scsi/sata_nv.c linux/drivers/scsi/sata_nv.c
--- linux/drivers/scsi/sata_nv.c 2005/02/13 20:16:26 1.10
+++ linux/drivers/scsi/sata_nv.c 2005/02/28 15:45:16 1.11
@@ -217,6 +217,8 @@
.phy_reset = sata_phy_reset,
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
+ .bmdma_stop = ata_bmdma_stop,
+ .bmdma_status = ata_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,
@@ -332,6 +334,7 @@
struct nv_host *host;
struct ata_port_info *ppi;
struct ata_probe_ent *probe_ent;
+ int pci_dev_busy = 0;
int rc;
u32 bar;
@@ -350,8 +353,10 @@
goto err_out;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out_disable;
+ }
rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
if (rc)
@@ -427,7 +432,8 @@
err_out_regions:
pci_release_regions(pdev);
err_out_disable:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
err_out:
return rc;
}
diff -urN linux/drivers/scsi/sata_promise.c linux/drivers/scsi/sata_promise.c
--- linux/drivers/scsi/sata_promise.c 2005/02/13 20:16:26 1.16
+++ linux/drivers/scsi/sata_promise.c 2005/02/28 15:45:16 1.17
@@ -556,6 +556,7 @@
unsigned long base;
void *mmio_base;
unsigned int board_idx = (unsigned int) ent->driver_data;
+ int pci_dev_busy = 0;
int rc;
if (!printed_version++)
@@ -570,8 +571,10 @@
return rc;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out;
+ }
rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
if (rc)
@@ -650,7 +653,8 @@
err_out_regions:
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
return rc;
}
diff -urN linux/drivers/scsi/sata_sil.c linux/drivers/scsi/sata_sil.c
--- linux/drivers/scsi/sata_sil.c 2005/02/13 20:16:26 1.17
+++ linux/drivers/scsi/sata_sil.c 2005/02/28 15:45:16 1.18
@@ -139,6 +139,8 @@
.post_set_mode = sil_post_set_mode,
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
+ .bmdma_stop = ata_bmdma_stop,
+ .bmdma_status = ata_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,
@@ -336,6 +338,7 @@
void *mmio_base;
int rc;
unsigned int i;
+ int pci_dev_busy = 0;
u32 tmp, irq_mask;
if (!printed_version++)
@@ -350,8 +353,10 @@
return rc;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out;
+ }
rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
if (rc)
@@ -438,7 +443,8 @@
err_out_regions:
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
return rc;
}
diff -urN linux/drivers/scsi/sata_sis.c linux/drivers/scsi/sata_sis.c
--- linux/drivers/scsi/sata_sis.c 2004/11/15 11:49:31 1.9
+++ linux/drivers/scsi/sata_sis.c 2005/02/28 15:45:16 1.10
@@ -102,6 +102,8 @@
.phy_reset = sata_phy_reset,
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
+ .bmdma_stop = ata_bmdma_stop,
+ .bmdma_status = ata_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,
@@ -200,14 +202,17 @@
int rc;
u32 genctl;
struct ata_port_info *ppi;
+ int pci_dev_busy = 0;
rc = pci_enable_device(pdev);
if (rc)
return rc;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out;
+ }
rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
if (rc)
@@ -259,7 +264,8 @@
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
return rc;
}
diff -urN linux/drivers/scsi/sata_svw.c linux/drivers/scsi/sata_svw.c
--- linux/drivers/scsi/sata_svw.c 2004/11/15 11:49:31 1.14
+++ linux/drivers/scsi/sata_svw.c 2005/02/28 15:45:16 1.15
@@ -301,6 +301,8 @@
.phy_reset = sata_phy_reset,
.bmdma_setup = k2_bmdma_setup_mmio,
.bmdma_start = k2_bmdma_start_mmio,
+ .bmdma_stop = ata_bmdma_stop,
+ .bmdma_status = ata_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,
@@ -338,6 +340,7 @@
struct ata_probe_ent *probe_ent = NULL;
unsigned long base;
void *mmio_base;
+ int pci_dev_busy = 0;
int rc;
if (!printed_version++)
@@ -359,8 +362,10 @@
/* Request PCI regions */
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out;
+ }
rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
if (rc)
@@ -433,7 +438,8 @@
err_out_regions:
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
return rc;
}
diff -urN linux/drivers/scsi/sata_sx4.c linux/drivers/scsi/sata_sx4.c
--- linux/drivers/scsi/sata_sx4.c 2004/11/15 11:49:31 1.8
+++ linux/drivers/scsi/sata_sx4.c 2005/02/28 15:45:16 1.9
@@ -1366,6 +1366,7 @@
void *mmio_base, *dimm_mmio = NULL;
struct pdc_host_priv *hpriv = NULL;
unsigned int board_idx = (unsigned int) ent->driver_data;
+ int pci_dev_busy = 0;
int rc;
if (!printed_version++)
@@ -1380,8 +1381,10 @@
return rc;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out;
+ }
rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
if (rc)
@@ -1471,7 +1474,8 @@
err_out_regions:
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
return rc;
}
diff -urN linux/drivers/scsi/sata_uli.c linux/drivers/scsi/sata_uli.c
--- linux/drivers/scsi/sata_uli.c 2005/01/13 14:06:20 1.3
+++ linux/drivers/scsi/sata_uli.c 2005/02/28 15:45:16 1.4
@@ -97,6 +97,8 @@
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
+ .bmdma_stop = ata_bmdma_stop,
+ .bmdma_status = ata_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
@@ -185,14 +187,17 @@
struct ata_port_info *ppi;
int rc;
unsigned int board_idx = (unsigned int) ent->driver_data;
+ int pci_dev_busy = 0;
rc = pci_enable_device(pdev);
if (rc)
return rc;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out;
+ }
rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
if (rc)
@@ -260,7 +265,8 @@
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
return rc;
}
diff -urN linux/drivers/scsi/sata_via.c linux/drivers/scsi/sata_via.c
--- linux/drivers/scsi/sata_via.c 2004/11/15 11:49:31 1.13
+++ linux/drivers/scsi/sata_via.c 2005/02/28 15:45:16 1.14
@@ -24,6 +24,11 @@
If you do not delete the provisions above, a recipient may use your
version of this file under either the OSL or the GPL.
+ ----------------------------------------------------------------------
+
+ To-do list:
+ * VT6421 PATA support
+
*/
#include <linux/kernel.h>
@@ -38,11 +43,14 @@
#include <asm/io.h>
#define DRV_NAME "sata_via"
-#define DRV_VERSION "1.0"
+#define DRV_VERSION "1.1"
-enum {
- via_sata = 0,
+enum board_ids_enum {
+ vt6420,
+ vt6421,
+};
+enum {
SATA_CHAN_ENAB = 0x40, /* SATA channel enable */
SATA_INT_GATE = 0x41, /* SATA interrupt gating */
SATA_NATIVE_MODE = 0x42, /* Native mode enable */
@@ -50,10 +58,8 @@
PORT0 = (1 << 1),
PORT1 = (1 << 0),
-
- ENAB_ALL = PORT0 | PORT1,
-
- INT_GATE_ALL = PORT0 | PORT1,
+ ALL_PORTS = PORT0 | PORT1,
+ N_PORTS = 2,
NATIVE_MODE_ALL = (1 << 7) | (1 << 6) | (1 << 5) | (1 << 4),
@@ -66,7 +72,8 @@
static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
static struct pci_device_id svia_pci_tbl[] = {
- { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, via_sata },
+ { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 },
+ { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 },
{ } /* terminate list */
};
@@ -110,6 +117,9 @@
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
+ .bmdma_stop = ata_bmdma_stop,
+ .bmdma_status = ata_bmdma_status,
+
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
@@ -158,18 +168,132 @@
8, 4, 8, 4, 16, 256
};
+static const unsigned int vt6421_bar_sizes[] = {
+ 16, 16, 16, 16, 32, 128
+};
+
static unsigned long svia_scr_addr(unsigned long addr, unsigned int port)
{
return addr + (port * 128);
}
+static unsigned long vt6421_scr_addr(unsigned long addr, unsigned int port)
+{
+ return addr + (port * 64);
+}
+
+static void vt6421_init_addrs(struct ata_probe_ent *probe_ent,
+ struct pci_dev *pdev,
+ unsigned int port)
+{
+ unsigned long reg_addr = pci_resource_start(pdev, port);
+ unsigned long bmdma_addr = pci_resource_start(pdev, 4) + (port * 8);
+ unsigned long scr_addr;
+
+ probe_ent->port[port].cmd_addr = reg_addr;
+ probe_ent->port[port].altstatus_addr =
+ probe_ent->port[port].ctl_addr = (reg_addr + 8) | ATA_PCI_CTL_OFS;
+ probe_ent->port[port].bmdma_addr = bmdma_addr;
+
+ scr_addr = vt6421_scr_addr(pci_resource_start(pdev, 5), port);
+ probe_ent->port[port].scr_addr = scr_addr;
+
+ ata_std_ports(&probe_ent->port[port]);
+}
+
+static struct ata_probe_ent *vt6420_init_probe_ent(struct pci_dev *pdev)
+{
+ struct ata_probe_ent *probe_ent;
+ struct ata_port_info *ppi = &svia_port_info;
+
+ probe_ent = ata_pci_init_native_mode(pdev, &ppi);
+ if (!probe_ent)
+ return NULL;
+
+ probe_ent->port[0].scr_addr =
+ svia_scr_addr(pci_resource_start(pdev, 5), 0);
+ probe_ent->port[1].scr_addr =
+ svia_scr_addr(pci_resource_start(pdev, 5), 1);
+
+ return probe_ent;
+}
+
+static struct ata_probe_ent *vt6421_init_probe_ent(struct pci_dev *pdev)
+{
+ struct ata_probe_ent *probe_ent;
+ unsigned int i;
+
+ probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL);
+ if (!probe_ent)
+ return NULL;
+
+ memset(probe_ent, 0, sizeof(*probe_ent));
+ probe_ent->dev = pci_dev_to_dev(pdev);
+ INIT_LIST_HEAD(&probe_ent->node);
+
+ probe_ent->sht = &svia_sht;
+ probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET |
+ ATA_FLAG_NO_LEGACY;
+ probe_ent->port_ops = &svia_sata_ops;
+ probe_ent->n_ports = N_PORTS;
+ probe_ent->irq = pdev->irq;
+ probe_ent->irq_flags = SA_SHIRQ;
+ probe_ent->pio_mask = 0x1f;
+ probe_ent->mwdma_mask = 0x07;
+ probe_ent->udma_mask = 0x7f;
+
+ for (i = 0; i < N_PORTS; i++)
+ vt6421_init_addrs(probe_ent, pdev, i);
+
+ return probe_ent;
+}
+
+static void svia_configure(struct pci_dev *pdev)
+{
+ u8 tmp8;
+
+ pci_read_config_byte(pdev, PCI_INTERRUPT_LINE, &tmp8);
+ printk(KERN_INFO DRV_NAME "(%s): routed to hard irq line %d\n",
+ pci_name(pdev),
+ (int) (tmp8 & 0xf0) == 0xf0 ? 0 : tmp8 & 0x0f);
+
+ /* make sure SATA channels are enabled */
+ pci_read_config_byte(pdev, SATA_CHAN_ENAB, &tmp8);
+ if ((tmp8 & ALL_PORTS) != ALL_PORTS) {
+ printk(KERN_DEBUG DRV_NAME "(%s): enabling SATA channels
(0x%x)\n",
+ pci_name(pdev), (int) tmp8);
+ tmp8 |= ALL_PORTS;
+ pci_write_config_byte(pdev, SATA_CHAN_ENAB, tmp8);
+ }
+
+ /* make sure interrupts for each channel sent to us */
+ pci_read_config_byte(pdev, SATA_INT_GATE, &tmp8);
+ if ((tmp8 & ALL_PORTS) != ALL_PORTS) {
+ printk(KERN_DEBUG DRV_NAME "(%s): enabling SATA channel
interrupts (0x%x)\n",
+ pci_name(pdev), (int) tmp8);
+ tmp8 |= ALL_PORTS;
+ pci_write_config_byte(pdev, SATA_INT_GATE, tmp8);
+ }
+
+ /* make sure native mode is enabled */
+ pci_read_config_byte(pdev, SATA_NATIVE_MODE, &tmp8);
+ if ((tmp8 & NATIVE_MODE_ALL) != NATIVE_MODE_ALL) {
+ printk(KERN_DEBUG DRV_NAME "(%s): enabling SATA channel native
mode (0x%x)\n",
+ pci_name(pdev), (int) tmp8);
+ tmp8 |= NATIVE_MODE_ALL;
+ pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8);
+ }
+}
+
static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id
*ent)
{
static int printed_version;
unsigned int i;
int rc;
- struct ata_port_info *ppi;
struct ata_probe_ent *probe_ent;
+ int board_id = (int) ent->driver_data;
+ const int *bar_sizes;
+ int pci_dev_busy = 0;
u8 tmp8;
if (!printed_version++)
@@ -180,20 +304,28 @@
return rc;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out;
+ }
- pci_read_config_byte(pdev, SATA_PATA_SHARING, &tmp8);
- if (tmp8 & SATA_2DEV) {
- printk(KERN_ERR DRV_NAME "(%s): SATA master/slave not supported
(0x%x)\n",
- pci_name(pdev), (int) tmp8);
- rc = -EIO;
- goto err_out_regions;
+ if (board_id == vt6420) {
+ pci_read_config_byte(pdev, SATA_PATA_SHARING, &tmp8);
+ if (tmp8 & SATA_2DEV) {
+ printk(KERN_ERR DRV_NAME "(%s): SATA master/slave not
supported (0x%x)\n",
+ pci_name(pdev), (int) tmp8);
+ rc = -EIO;
+ goto err_out_regions;
+ }
+
+ bar_sizes = &svia_bar_sizes[0];
+ } else {
+ bar_sizes = &vt6421_bar_sizes[0];
}
for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++)
if ((pci_resource_start(pdev, i) == 0) ||
- (pci_resource_len(pdev, i) < svia_bar_sizes[i])) {
+ (pci_resource_len(pdev, i) < bar_sizes[i])) {
printk(KERN_ERR DRV_NAME "(%s): invalid PCI BAR %u (sz
0x%lx, val 0x%lx)\n",
pci_name(pdev), i,
pci_resource_start(pdev, i),
@@ -209,8 +341,11 @@
if (rc)
goto err_out_regions;
- ppi = &svia_port_info;
- probe_ent = ata_pci_init_native_mode(pdev, &ppi);
+ if (board_id == vt6420)
+ probe_ent = vt6420_init_probe_ent(pdev);
+ else
+ probe_ent = vt6421_init_probe_ent(pdev);
+
if (!probe_ent) {
printk(KERN_ERR DRV_NAME "(%s): out of memory\n",
pci_name(pdev));
@@ -218,42 +353,7 @@
goto err_out_regions;
}
- probe_ent->port[0].scr_addr =
- svia_scr_addr(pci_resource_start(pdev, 5), 0);
- probe_ent->port[1].scr_addr =
- svia_scr_addr(pci_resource_start(pdev, 5), 1);
-
- pci_read_config_byte(pdev, PCI_INTERRUPT_LINE, &tmp8);
- printk(KERN_INFO DRV_NAME "(%s): routed to hard irq line %d\n",
- pci_name(pdev),
- (int) (tmp8 & 0xf0) == 0xf0 ? 0 : tmp8 & 0x0f);
-
- /* make sure SATA channels are enabled */
- pci_read_config_byte(pdev, SATA_CHAN_ENAB, &tmp8);
- if ((tmp8 & ENAB_ALL) != ENAB_ALL) {
- printk(KERN_DEBUG DRV_NAME "(%s): enabling SATA channels
(0x%x)\n",
- pci_name(pdev), (int) tmp8);
- tmp8 |= ENAB_ALL;
- pci_write_config_byte(pdev, SATA_CHAN_ENAB, tmp8);
- }
-
- /* make sure interrupts for each channel sent to us */
- pci_read_config_byte(pdev, SATA_INT_GATE, &tmp8);
- if ((tmp8 & INT_GATE_ALL) != INT_GATE_ALL) {
- printk(KERN_DEBUG DRV_NAME "(%s): enabling SATA channel
interrupts (0x%x)\n",
- pci_name(pdev), (int) tmp8);
- tmp8 |= INT_GATE_ALL;
- pci_write_config_byte(pdev, SATA_INT_GATE, tmp8);
- }
-
- /* make sure native mode is enabled */
- pci_read_config_byte(pdev, SATA_NATIVE_MODE, &tmp8);
- if ((tmp8 & NATIVE_MODE_ALL) != NATIVE_MODE_ALL) {
- printk(KERN_DEBUG DRV_NAME "(%s): enabling SATA channel native
mode (0x%x)\n",
- pci_name(pdev), (int) tmp8);
- tmp8 |= NATIVE_MODE_ALL;
- pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8);
- }
+ svia_configure(pdev);
pci_set_master(pdev);
@@ -266,7 +366,8 @@
err_out_regions:
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
return rc;
}
diff -urN linux/drivers/scsi/sata_vsc.c linux/drivers/scsi/sata_vsc.c
--- linux/drivers/scsi/sata_vsc.c 2004/11/15 11:49:31 1.10
+++ linux/drivers/scsi/sata_vsc.c 2005/02/28 15:45:16 1.11
@@ -217,6 +217,8 @@
.phy_reset = sata_phy_reset,
.bmdma_setup = ata_bmdma_setup,
.bmdma_start = ata_bmdma_start,
+ .bmdma_stop = ata_bmdma_stop,
+ .bmdma_status = ata_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,
@@ -255,6 +257,7 @@
static int printed_version;
struct ata_probe_ent *probe_ent = NULL;
unsigned long base;
+ int pci_dev_busy = 0;
void *mmio_base;
int rc;
@@ -274,8 +277,10 @@
}
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc)
+ if (rc) {
+ pci_dev_busy = 1;
goto err_out;
+ }
/*
* Use 32 bit DMA mask, because 64 bit address support is poor.
@@ -352,7 +357,8 @@
err_out_regions:
pci_release_regions(pdev);
err_out:
- pci_disable_device(pdev);
+ if (!pci_dev_busy)
+ pci_disable_device(pdev);
return rc;
}
diff -urN linux/drivers/usb/core/hcd.c linux/drivers/usb/core/hcd.c
--- linux/drivers/usb/core/hcd.c 2005/02/13 20:16:27 1.51
+++ linux/drivers/usb/core/hcd.c 2005/02/28 15:45:16 1.52
@@ -39,6 +39,7 @@
#include <asm/scatterlist.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
+#include <asm/irq.h>
#include <asm/byteorder.h>
#include <linux/usb.h>
diff -urN linux/drivers/usb/core/hub.c linux/drivers/usb/core/hub.c
--- linux/drivers/usb/core/hub.c 2005/01/25 04:28:45 1.52
+++ linux/drivers/usb/core/hub.c 2005/02/28 15:45:16 1.53
@@ -1382,6 +1382,9 @@
/* return on disconnect or reset */
switch (status) {
case 0:
+ /* TRSTRCY = 10 ms */
+ msleep(10);
+ /* FALL THROUGH */
case -ENOTCONN:
case -ENODEV:
clear_port_feature(hub->hdev,
diff -urN linux/drivers/usb/host/ehci-hcd.c linux/drivers/usb/host/ehci-hcd.c
--- linux/drivers/usb/host/ehci-hcd.c 2005/01/25 04:28:45 1.50
+++ linux/drivers/usb/host/ehci-hcd.c 2005/02/28 15:45:16 1.51
@@ -389,8 +389,29 @@
temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
temp &= 0x0f;
if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) {
- temp |= (ehci->hcs_params & ~0xf);
- ehci->hcs_params = temp;
+ ehci_dbg (ehci, "bogus port configuration: "
+ "cc=%d x pcc=%d < ports=%d\n",
+ HCS_N_CC(ehci->hcs_params),
+ HCS_N_PCC(ehci->hcs_params),
+ HCS_N_PORTS(ehci->hcs_params));
+
+#ifdef CONFIG_PCI
+ if (hcd->self.controller->bus == &pci_bus_type) {
+ struct pci_dev *pdev;
+
+ pdev = to_pci_dev(hcd->self.controller);
+ switch (pdev->vendor) {
+ case 0x17a0: /* GENESYS */
+ /* GL880S: should be PORTS=2 */
+ temp |= (ehci->hcs_params & ~0xf);
+ ehci->hcs_params = temp;
+ break;
+ case PCI_VENDOR_ID_NVIDIA:
+ /* NF4: should be PCC=10 */
+ break;
+ }
+ }
+#endif
}
/* force HC to halt state */
diff -urN linux/drivers/usb/host/ehci-q.c linux/drivers/usb/host/ehci-q.c
--- linux/drivers/usb/host/ehci-q.c 2005/02/07 02:54:53 1.38
+++ linux/drivers/usb/host/ehci-q.c 2005/02/28 15:45:16 1.39
@@ -267,6 +267,7 @@
}
static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
+static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
@@ -430,7 +431,7 @@
intr_deschedule (ehci, qh);
(void) qh_schedule (ehci, qh);
} else
- start_unlink_async (ehci, qh);
+ unlink_async (ehci, qh);
break;
/* otherwise, unlink already started */
}
diff -urN linux/drivers/video/au1100fb.c linux/drivers/video/au1100fb.c
--- linux/drivers/video/au1100fb.c 2005/02/28 13:35:57 1.4
+++ linux/drivers/video/au1100fb.c 2005/02/28 15:45:16 1.5
@@ -408,7 +408,7 @@
/* This is an IO map - tell maydump to skip this VMA */
vma->vm_flags |= VM_IO;
- if (io_remap_page_range(vma->vm_start, off,
+ if (io_remap_page_range(vma, vma->vm_start, off,
vma->vm_end - vma->vm_start,
vma->vm_page_prot)) {
return -EAGAIN;
diff -urN linux/drivers/video/cg3.c linux/drivers/video/cg3.c
--- linux/drivers/video/cg3.c 2005/02/13 20:16:27 1.11
+++ linux/drivers/video/cg3.c 2005/02/28 15:45:16 1.12
@@ -209,7 +209,7 @@
case FB_BLANK_HSYNC_SUSPEND: /* VESA blank (hsync off) */
case FB_BLANK_POWERDOWN: /* Poweroff */
val = sbus_readb(®s->control);
- val |= CG3_CR_ENABLE_VIDEO;
+ val &= ~CG3_CR_ENABLE_VIDEO;
sbus_writeb(val, ®s->control);
par->flags |= CG3_FLAG_BLANKED;
break;
diff -urN linux/drivers/video/aty/atyfb_base.c
linux/drivers/video/aty/atyfb_base.c
--- linux/drivers/video/aty/atyfb_base.c 2005/01/13 14:06:30 1.29
+++ linux/drivers/video/aty/atyfb_base.c 2005/02/28 15:45:16 1.30
@@ -2511,7 +2511,15 @@
}
} else
#endif /* !CONFIG_PPC */
- if (!fb_find_mode(&var, info, mode, NULL, 0, &defmode, 8))
+ if (
+#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)
+ /* On Sparc, unless the user gave a specific mode
+ * specification, use the PROM probed values in
+ * default_var.
+ */
+ !mode ||
+#endif
+ !fb_find_mode(&var, info, mode, NULL, 0, &defmode, 8))
var = default_var;
if (noaccel)
diff -urN linux/drivers/video/aty/radeon_accel.c
linux/drivers/video/aty/radeon_accel.c
--- linux/drivers/video/aty/radeon_accel.c 2004/06/30 17:26:48 1.6
+++ linux/drivers/video/aty/radeon_accel.c 2005/02/28 15:45:17 1.7
@@ -4,6 +4,41 @@
* "ACCEL_MMIO" ifdef branches in XFree86
* --dte
*/
+
+static void radeon_fixup_offset(struct radeonfb_info *rinfo)
+{
+ u32 local_base;
+
+ /* *** Ugly workaround *** */
+ /*
+ * On some platforms, the video memory is mapped at 0 in radeon chip
space
+ * (like PPCs) by the firmware. X will always move it up so that it's
seen
+ * by the chip to be at the same address as the PCI BAR.
+ * That means that when switching back from X, there is a mismatch
between
+ * the offsets programmed into the engine. This means that potentially,
+ * accel operations done before radeonfb has a chance to re-init the
engine
+ * will have incorrect offsets, and potentially trash system memory !
+ *
+ * The correct fix is for fbcon to never call any accel op before the
engine
+ * has properly been re-initialized (by a call to set_var), but this is
a
+ * complex fix. This workaround in the meantime, called before every
accel
+ * operation, makes sure the offsets are in sync.
+ */
+
+ radeon_fifo_wait (1);
+ local_base = INREG(MC_FB_LOCATION) << 16;
+ if (local_base == rinfo->fb_local_base)
+ return;
+
+ rinfo->fb_local_base = local_base;
+
+ radeon_fifo_wait (3);
+ OUTREG(DEFAULT_PITCH_OFFSET, (rinfo->pitch << 0x16) |
+ (rinfo->fb_local_base >> 10));
+ OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base
>> 10));
+ OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base
>> 10));
+}
+
static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo,
const struct fb_fillrect *region)
{
@@ -38,6 +73,8 @@
return;
}
+ radeon_fixup_offset(rinfo);
+
vxres = info->var.xres_virtual;
vyres = info->var.yres_virtual;
@@ -105,6 +142,8 @@
return;
}
+ radeon_fixup_offset(rinfo);
+
vxres = info->var.xres_virtual;
vyres = info->var.yres_virtual;
diff -urN linux/drivers/video/aty/radeon_base.c
linux/drivers/video/aty/radeon_base.c
--- linux/drivers/video/aty/radeon_base.c 2005/02/13 20:16:27 1.15
+++ linux/drivers/video/aty/radeon_base.c 2005/02/28 15:45:17 1.16
@@ -2361,13 +2361,6 @@
pci_set_drvdata(pdev, info);
- /* Setup Power Management capabilities */
- if (default_dynclk < -1) {
- /* -2 is special: means ON on mobility chips and do not change
on others */
- radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1);
- } else
- radeonfb_pm_init(rinfo, default_dynclk);
-
/* Register with fbdev layer */
ret = register_framebuffer(info);
if (ret < 0) {
@@ -2376,6 +2369,13 @@
goto err_unmap_fb;
}
+ /* Setup Power Management capabilities */
+ if (default_dynclk < -1) {
+ /* -2 is special: means ON on mobility chips and do not change
on others */
+ radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1);
+ } else
+ radeonfb_pm_init(rinfo, default_dynclk);
+
#ifdef CONFIG_MTRR
rinfo->mtrr_hdl = nomtrr ? -1 : mtrr_add(rinfo->fb_base_phys,
rinfo->video_ram,
diff -urN linux/drivers/video/aty/radeon_pm.c
linux/drivers/video/aty/radeon_pm.c
--- linux/drivers/video/aty/radeon_pm.c 2005/02/13 20:16:27 1.8
+++ linux/drivers/video/aty/radeon_pm.c 2005/02/28 15:45:17 1.9
@@ -180,7 +180,7 @@
tmp = INPLL(pllMCLK_CNTL);
tmp &= ~(MCLK_CNTL__FORCE_MCLKA |
MCLK_CNTL__FORCE_YCLKA);
- OUTREG(pllMCLK_CNTL, tmp);
+ OUTPLL(pllMCLK_CNTL, tmp);
radeon_msleep(16);
}
/* Hrm... same shit, X doesn't do that but I have to */
@@ -404,7 +404,7 @@
((INREG(CONFIG_CNTL) & CFG_ATI_REV_ID_MASK) < CFG_ATI_REV_A13)) {
tmp = INPLL(pllPLL_PWRMGT_CNTL);
tmp |= PLL_PWRMGT_CNTL__TCL_BYPASS_DISABLE;
- OUTREG(pllPLL_PWRMGT_CNTL, tmp);
+ OUTPLL(pllPLL_PWRMGT_CNTL, tmp);
radeon_msleep(15);
}
diff -urN linux/drivers/video/sis/sis_main.c linux/drivers/video/sis/sis_main.c
--- linux/drivers/video/sis/sis_main.c 2005/01/25 04:28:47 1.27
+++ linux/drivers/video/sis/sis_main.c 2005/02/28 15:45:17 1.28
@@ -39,6 +39,7 @@
#include <linux/moduleparam.h>
#endif
#include <linux/kernel.h>
+#include <linux/smp_lock.h>
#include <linux/spinlock.h>
#include <linux/errno.h>
#include <linux/string.h>
diff -urN linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- linux/fs/binfmt_elf.c 2005/02/13 20:16:28 1.105
+++ linux/fs/binfmt_elf.c 2005/02/28 15:45:17 1.106
@@ -757,7 +757,7 @@
/* Do this immediately, since STACK_TOP as used in setup_arg_pages
may depend on the personality. */
SET_PERSONALITY(loc->elf_ex, ibcs2_interpreter);
- if (elf_read_implies_exec(loc->elf_ex, have_pt_gnu_stack))
+ if (elf_read_implies_exec(loc->elf_ex, executable_stack))
current->personality |= READ_IMPLIES_EXEC;
arch_pick_mmap_layout(current->mm);
diff -urN linux/fs/buffer.c linux/fs/buffer.c
--- linux/fs/buffer.c 2005/01/25 04:28:47 1.149
+++ linux/fs/buffer.c 2005/02/28 15:45:17 1.150
@@ -550,7 +550,8 @@
set_buffer_uptodate(bh);
} else {
clear_buffer_uptodate(bh);
- buffer_io_error(bh);
+ if (printk_ratelimit())
+ buffer_io_error(bh);
SetPageError(page);
}
diff -urN linux/fs/compat_ioctl.c linux/fs/compat_ioctl.c
--- linux/fs/compat_ioctl.c 2005/02/13 20:16:28 1.27
+++ linux/fs/compat_ioctl.c 2005/02/28 15:45:17 1.28
@@ -687,6 +687,11 @@
set_fs (old_fs);
if (!err) {
switch (cmd) {
+ /* TUNSETIFF is defined as _IOW, it should be _IORW
+ * as the data is copied back to user space, but that
+ * cannot be fixed without breaking all existing apps.
+ */
+ case TUNSETIFF:
case SIOCGIFFLAGS:
case SIOCGIFMETRIC:
case SIOCGIFMTU:
diff -urN linux/fs/nfs/file.c linux/fs/nfs/file.c
--- linux/fs/nfs/file.c 2005/01/25 04:28:51 1.63
+++ linux/fs/nfs/file.c 2005/02/28 15:45:17 1.64
@@ -303,10 +303,10 @@
status = NFS_PROTO(inode)->lock(filp, cmd, fl);
else {
struct file_lock *cfl = posix_test_lock(filp, fl);
- if (cfl != NULL) {
+
+ fl->fl_type = F_UNLCK;
+ if (cfl != NULL)
memcpy(fl, cfl, sizeof(*fl));
- fl->fl_type = F_UNLCK;
- }
}
unlock_kernel();
return status;
diff -urN linux/fs/xfs/xfs_vnodeops.c linux/fs/xfs/xfs_vnodeops.c
--- linux/fs/xfs/xfs_vnodeops.c 2005/02/07 02:54:55 1.29
+++ linux/fs/xfs/xfs_vnodeops.c 2005/02/28 15:45:17 1.30
@@ -3681,27 +3681,27 @@
{
xfs_inode_t *ip;
xfs_mount_t *mp;
+ xfs_inode_log_item_t *iip;
int error = 0;
ip = XFS_BHVTOI(bdp);
mp = ip->i_mount;
+ iip = ip->i_itemp;
if (XFS_FORCED_SHUTDOWN(mp))
return XFS_ERROR(EIO);
- /* Bypass inodes which have already been cleaned by
+ /*
+ * Bypass inodes which have already been cleaned by
* the inode flush clustering code inside xfs_iflush
*/
if ((ip->i_update_core == 0) &&
- ((ip->i_itemp == NULL) ||
- !(ip->i_itemp->ili_format.ilf_fields & XFS_ILOG_ALL)))
+ ((iip == NULL) || !(iip->ili_format.ilf_fields & XFS_ILOG_ALL)))
return 0;
if (flags & FLUSH_LOG) {
- xfs_inode_log_item_t *iip = ip->i_itemp;
-
if (iip && iip->ili_last_lsn) {
- xlog_t *log = mp->m_log;
+ xlog_t *log = mp->m_log;
xfs_lsn_t sync_lsn;
int s, log_flags = XFS_LOG_FORCE;
@@ -3714,12 +3714,12 @@
if (flags & FLUSH_SYNC)
log_flags |= XFS_LOG_SYNC;
- return xfs_log_force(mp, iip->ili_last_lsn,
- log_flags);
+ return xfs_log_force(mp, iip->ili_last_lsn, log_flags);
}
}
- /* We make this non-blocking if the inode is contended,
+ /*
+ * We make this non-blocking if the inode is contended,
* return EAGAIN to indicate to the caller that they
* did not succeed. This prevents the flush path from
* blocking on inodes inside another operation right
diff -urN linux/fs/xfs/linux-2.6/xfs_aops.c linux/fs/xfs/linux-2.6/xfs_aops.c
--- linux/fs/xfs/linux-2.6/xfs_aops.c 2005/02/07 02:54:56 1.6
+++ linux/fs/xfs/linux-2.6/xfs_aops.c 2005/02/28 15:45:17 1.7
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
@@ -156,9 +156,7 @@
{
ASSERT(!private || inode == (struct inode *)private);
- /* private indicates an unwritten extent lay beneath this IO,
- * see linvfs_get_block_core.
- */
+ /* private indicates an unwritten extent lay beneath this IO */
if (private && size > 0) {
vnode_t *vp = LINVFS_GET_VP(inode);
int error;
@@ -728,11 +726,9 @@
pgoff_t end_index, last_index, tlast;
int len, err, i, cnt = 0, uptodate = 1;
int flags = startio ? 0 : BMAPI_TRYLOCK;
- int page_dirty = 1;
- int delalloc = 0;
-
+ int page_dirty, delalloc = 0;
- /* Are we off the end of the file ? */
+ /* Is this page beyond the end of the file? */
offset = i_size_read(inode);
end_index = offset >> PAGE_CACHE_SHIFT;
last_index = (offset - 1) >> PAGE_CACHE_SHIFT;
@@ -751,7 +747,13 @@
bh = head = page_buffers(page);
iomp = NULL;
+ /*
+ * page_dirty is initially a count of buffers on the page and
+ * is decrememted as we move each into a cleanable state.
+ */
len = bh->b_size;
+ page_dirty = PAGE_CACHE_SIZE / len;
+
do {
if (offset >= end_offset)
break;
@@ -794,7 +796,7 @@
}
BUG_ON(!buffer_locked(bh));
bh_arr[cnt++] = bh;
- page_dirty = 0;
+ page_dirty--;
}
/*
* Second case, allocate space for a delalloc buffer.
@@ -821,7 +823,7 @@
unlock_buffer(bh);
mark_buffer_dirty(bh);
}
- page_dirty = 0;
+ page_dirty--;
}
} else if ((buffer_uptodate(bh) || PageUptodate(page)) &&
(unmapped || startio)) {
@@ -857,13 +859,13 @@
unlock_buffer(bh);
mark_buffer_dirty(bh);
}
- page_dirty = 0;
+ page_dirty--;
}
} else if (startio) {
if (buffer_uptodate(bh) &&
!test_and_set_bit(BH_Lock, &bh->b_state)) {
bh_arr[cnt++] = bh;
- page_dirty = 0;
+ page_dirty--;
}
}
}
@@ -907,7 +909,7 @@
}
STATIC int
-linvfs_get_block_core(
+__linvfs_get_block(
struct inode *inode,
sector_t iblock,
unsigned long blocks,
@@ -977,10 +979,10 @@
if (iomap.iomap_flags & IOMAP_DELAY) {
BUG_ON(direct);
if (create) {
- set_buffer_mapped(bh_result);
set_buffer_uptodate(bh_result);
+ set_buffer_mapped(bh_result);
+ set_buffer_delay(bh_result);
}
- set_buffer_delay(bh_result);
}
if (blocks) {
@@ -999,7 +1001,7 @@
struct buffer_head *bh_result,
int create)
{
- return linvfs_get_block_core(inode, iblock, 0, bh_result,
+ return __linvfs_get_block(inode, iblock, 0, bh_result,
create, 0, BMAPI_WRITE);
}
@@ -1011,7 +1013,7 @@
struct buffer_head *bh_result,
int create)
{
- return linvfs_get_block_core(inode, iblock, max_blocks, bh_result,
+ return __linvfs_get_block(inode, iblock, max_blocks, bh_result,
create, 1, BMAPI_WRITE|BMAPI_DIRECT);
}
diff -urN linux/fs/xfs/linux-2.6/xfs_lrw.c linux/fs/xfs/linux-2.6/xfs_lrw.c
--- linux/fs/xfs/linux-2.6/xfs_lrw.c 2005/02/07 02:54:56 1.6
+++ linux/fs/xfs/linux-2.6/xfs_lrw.c 2005/02/28 15:45:17 1.7
@@ -676,6 +676,8 @@
if (XFS_FORCED_SHUTDOWN(mp))
return -EIO;
+ fs_check_frozen(vp->v_vfsp, SB_FREEZE_WRITE);
+
if (ioflags & IO_ISDIRECT) {
xfs_buftarg_t *target =
(xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ?
@@ -960,9 +962,9 @@
xfs_trans_set_sync(tp);
error = xfs_trans_commit(tp, 0, NULL);
xfs_iunlock(xip, XFS_ILOCK_EXCL);
- if (error)
- goto out_unlock_internal;
}
+ if (error)
+ goto out_unlock_internal;
}
xfs_rwunlock(bdp, locktype);
diff -urN linux/fs/xfs/linux-2.6/xfs_super.c linux/fs/xfs/linux-2.6/xfs_super.c
--- linux/fs/xfs/linux-2.6/xfs_super.c 2005/02/07 02:54:56 1.10
+++ linux/fs/xfs/linux-2.6/xfs_super.c 2005/02/28 15:45:17 1.11
@@ -348,6 +348,12 @@
if (sync)
flags |= FLUSH_SYNC;
VOP_IFLUSH(vp, flags, error);
+ if (error == EAGAIN) {
+ if (sync)
+ VOP_IFLUSH(vp, flags | FLUSH_LOG, error);
+ else
+ error = 0;
+ }
}
return -error;
diff -urN linux/include/acpi/acconfig.h linux/include/acpi/acconfig.h
--- linux/include/acpi/acconfig.h 2005/02/07 02:54:56 1.19
+++ linux/include/acpi/acconfig.h 2005/02/28 15:45:17 1.20
@@ -64,7 +64,7 @@
/* Version string */
-#define ACPI_CA_VERSION 0x20050125
+#define ACPI_CA_VERSION 0x20050211
/*
* OS name, used for the _OS object. The _OS object is essentially obsolete,
diff -urN linux/include/acpi/acinterp.h linux/include/acpi/acinterp.h
--- linux/include/acpi/acinterp.h 2005/02/07 02:54:56 1.8
+++ linux/include/acpi/acinterp.h 2005/02/28 15:45:17 1.9
@@ -217,8 +217,8 @@
u8
acpi_ex_do_match (
u32 match_op,
- acpi_integer package_value,
- acpi_integer match_value);
+ union acpi_operand_object *package_obj,
+ union acpi_operand_object *match_obj);
acpi_status
acpi_ex_get_object_reference (
@@ -617,6 +617,7 @@
acpi_status
acpi_ex_store_buffer_to_buffer (
+ acpi_object_type original_src_type,
union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
diff -urN linux/include/acpi/platform/aclinux.h
linux/include/acpi/platform/aclinux.h
--- linux/include/acpi/platform/aclinux.h 2005/02/07 02:54:57 1.6
+++ linux/include/acpi/platform/aclinux.h 2005/02/28 15:45:17 1.7
@@ -81,6 +81,8 @@
#define ACPI_USE_NATIVE_DIVIDE
#endif
+#define __cdecl
+#define ACPI_FLUSH_CPU_CACHE()
#endif /* __KERNEL__ */
/* Linux uses GCC */
diff -urN linux/include/asm-arm/hardware/sa1111.h
linux/include/asm-arm/hardware/sa1111.h
--- linux/include/asm-arm/hardware/sa1111.h 2004/06/06 02:12:53 1.15
+++ linux/include/asm-arm/hardware/sa1111.h 2005/02/28 15:45:17 1.16
@@ -49,8 +49,8 @@
*/
#define __CCREG(x) __REGP(SA1111_VBASE + (x))
-#define sa1111_writel(val,addr) ({ *(volatile unsigned int *)(addr) =
(val); })
-#define sa1111_readl(addr) (*(volatile unsigned int *)(addr))
+#define sa1111_writel(val,addr) __raw_writel(val, addr)
+#define sa1111_readl(addr) __raw_readl(addr)
/*
* System Bus Interface (SBI)
@@ -551,7 +551,7 @@
struct device dev;
unsigned int devid;
struct resource res;
- void *mapbase;
+ void __iomem *mapbase;
unsigned int skpcr_mask;
unsigned int irq[6];
u64 dma_mask;
diff -urN linux/include/asm-generic/4level-fixup.h
linux/include/asm-generic/4level-fixup.h
--- linux/include/asm-generic/4level-fixup.h 2005/01/13 14:06:46 1.1
+++ linux/include/asm-generic/4level-fixup.h 2005/02/28 15:45:17 1.2
@@ -24,7 +24,7 @@
#define pud_bad(pud) 0
#define pud_present(pud) 1
#define pud_ERROR(pud) do { } while (0)
-#define pud_clear(pud) do { } while (0)
+#define pud_clear(pud) pgd_clear(pud)
#undef pud_free_tlb
#define pud_free_tlb(tlb, x) do { } while (0)
diff -urN linux/include/asm-i386/elf.h linux/include/asm-i386/elf.h
--- linux/include/asm-i386/elf.h 2004/10/12 01:45:51 1.22
+++ linux/include/asm-i386/elf.h 2005/02/28 15:45:18 1.23
@@ -123,7 +123,7 @@
* An executable for which elf_read_implies_exec() returns TRUE will
* have the READ_IMPLIES_EXEC personality flag set automatically.
*/
-#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack))
+#define elf_read_implies_exec(ex, executable_stack) (executable_stack !=
EXSTACK_DISABLE_X)
extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
diff -urN linux/include/asm-ia64/elf.h linux/include/asm-ia64/elf.h
--- linux/include/asm-ia64/elf.h 2004/10/12 14:36:39 1.14
+++ linux/include/asm-ia64/elf.h 2005/02/28 15:45:18 1.15
@@ -186,8 +186,8 @@
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX)
-#define elf_read_implies_exec(ex, have_pt_gnu_stack)
\
- (!(have_pt_gnu_stack) && ((ex).e_flags &
EF_IA_64_LINUX_EXECUTABLE_STACK) != 0)
+#define elf_read_implies_exec(ex, executable_stack)
\
+ ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags &
EF_IA_64_LINUX_EXECUTABLE_STACK) != 0)
struct task_struct;
diff -urN linux/include/asm-m32r/bitops.h linux/include/asm-m32r/bitops.h
--- linux/include/asm-m32r/bitops.h 2005/01/13 14:06:47 1.3
+++ linux/include/asm-m32r/bitops.h 2005/02/28 15:45:18 1.4
@@ -405,9 +405,10 @@
* @offset: The bitnumber to start searching at
* @size: The maximum size to search
*/
-static __inline__ int find_next_zero_bit(void *addr, int size, int offset)
+static __inline__ int find_next_zero_bit(const unsigned long *addr,
+ int size, int offset)
{
- unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
+ const unsigned long *p = addr + (offset >> 5);
unsigned long result = offset & ~31UL;
unsigned long tmp;
diff -urN linux/include/asm-m32r/spinlock.h linux/include/asm-m32r/spinlock.h
--- linux/include/asm-m32r/spinlock.h 2005/01/25 04:28:54 1.3
+++ linux/include/asm-m32r/spinlock.h 2005/02/28 15:45:18 1.4
@@ -20,23 +20,13 @@
#define RW_LOCK_BIAS 0x01000000
#define RW_LOCK_BIAS_STR "0x01000000"
-/* It seems that people are forgetting to
- * initialize their spinlocks properly, tsk tsk.
- * Remember to turn this off in 2.4. -ben
- */
-#if defined(CONFIG_DEBUG_SPINLOCK)
-#define SPINLOCK_DEBUG 1
-#else
-#define SPINLOCK_DEBUG 0
-#endif
-
/*
* Your basic SMP spinlocks, allowing only a single CPU anywhere
*/
typedef struct {
- volatile int lock;
-#if SPINLOCK_DEBUG
+ volatile int slock;
+#ifdef CONFIG_DEBUG_SPINLOCK
unsigned magic;
#endif
#ifdef CONFIG_PREEMPT
@@ -46,7 +36,7 @@
#define SPINLOCK_MAGIC 0xdead4ead
-#if SPINLOCK_DEBUG
+#ifdef CONFIG_DEBUG_SPINLOCK
#define SPINLOCK_MAGIC_INIT , SPINLOCK_MAGIC
#else
#define SPINLOCK_MAGIC_INIT /* */
@@ -63,7 +53,7 @@
* We make no fairness assumptions. They have a cost.
*/
-#define spin_is_locked(x) (*(volatile int *)(&(x)->lock) <= 0)
+#define spin_is_locked(x) (*(volatile int *)(&(x)->slock) <= 0)
#define spin_unlock_wait(x) do { barrier(); } while(spin_is_locked(x))
#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock)
@@ -80,11 +70,11 @@
unsigned long tmp1, tmp2;
/*
- * lock->lock : =1 : unlock
- * : <=0 : lock
+ * lock->slock : =1 : unlock
+ * : <=0 : lock
* {
- * oldval = lock->lock; <--+ need atomic operation
- * lock->lock = 0; <--+
+ * oldval = lock->slock; <--+ need atomic operation
+ * lock->slock = 0; <--+
* }
*/
__asm__ __volatile__ (
@@ -97,7 +87,7 @@
"unlock %1, @%3; \n\t"
"mvtc %2, psw; \n\t"
: "=&r" (oldval), "=&r" (tmp1), "=&r" (tmp2)
- : "r" (&lock->lock)
+ : "r" (&lock->slock)
: "memory"
#ifdef CONFIG_CHIP_M32700_TS1
, "r6"
@@ -111,22 +101,22 @@
{
unsigned long tmp0, tmp1;
-#if SPINLOCK_DEBUG
+#ifdef CONFIG_DEBUG_SPINLOCK
__label__ here;
here:
if (lock->magic != SPINLOCK_MAGIC) {
- printk("eip: %p\n", &&here);
+ printk("pc: %p\n", &&here);
BUG();
}
#endif
/*
- * lock->lock : =1 : unlock
- * : <=0 : lock
+ * lock->slock : =1 : unlock
+ * : <=0 : lock
*
* for ( ; ; ) {
- * lock->lock -= 1; <-- need atomic operation
- * if (lock->lock == 0) break;
- * for ( ; lock->lock <= 0 ; );
+ * lock->slock -= 1; <-- need atomic operation
+ * if (lock->slock == 0) break;
+ * for ( ; lock->slock <= 0 ; );
* }
*/
__asm__ __volatile__ (
@@ -149,7 +139,7 @@
"bra 2b; \n\t"
LOCK_SECTION_END
: "=&r" (tmp0), "=&r" (tmp1)
- : "r" (&lock->lock)
+ : "r" (&lock->slock)
: "memory"
#ifdef CONFIG_CHIP_M32700_TS1
, "r6"
@@ -159,12 +149,12 @@
static inline void _raw_spin_unlock(spinlock_t *lock)
{
-#if SPINLOCK_DEBUG
+#ifdef CONFIG_DEBUG_SPINLOCK
BUG_ON(lock->magic != SPINLOCK_MAGIC);
BUG_ON(!spin_is_locked(lock));
#endif
mb();
- lock->lock = 1;
+ lock->slock = 1;
}
/*
@@ -179,7 +169,7 @@
*/
typedef struct {
volatile int lock;
-#if SPINLOCK_DEBUG
+#ifdef CONFIG_DEBUG_SPINLOCK
unsigned magic;
#endif
#ifdef CONFIG_PREEMPT
@@ -189,7 +179,7 @@
#define RWLOCK_MAGIC 0xdeaf1eed
-#if SPINLOCK_DEBUG
+#ifdef CONFIG_DEBUG_SPINLOCK
#define RWLOCK_MAGIC_INIT , RWLOCK_MAGIC
#else
#define RWLOCK_MAGIC_INIT /* */
@@ -199,6 +189,18 @@
#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
+/**
+ * read_can_lock - would read_trylock() succeed?
+ * @lock: the rwlock in question.
+ */
+#define read_can_lock(x) ((int)(x)->lock > 0)
+
+/**
+ * write_can_lock - would write_trylock() succeed?
+ * @lock: the rwlock in question.
+ */
+#define write_can_lock(x) ((x)->lock == RW_LOCK_BIAS)
+
/*
* On x86, we implement read-write locks as a 32-bit counter
* with the high bit (sign) being the "contended" bit.
@@ -214,7 +216,7 @@
{
unsigned long tmp0, tmp1;
-#if SPINLOCK_DEBUG
+#ifdef CONFIG_DEBUG_SPINLOCK
BUG_ON(rw->magic != RWLOCK_MAGIC);
#endif
/*
@@ -268,7 +270,7 @@
{
unsigned long tmp0, tmp1, tmp2;
-#if SPINLOCK_DEBUG
+#ifdef CONFIG_DEBUG_SPINLOCK
BUG_ON(rw->magic != RWLOCK_MAGIC);
#endif
/*
diff -urN linux/include/asm-ppc/io.h linux/include/asm-ppc/io.h
--- linux/include/asm-ppc/io.h 2005/02/13 20:16:30 1.44
+++ linux/include/asm-ppc/io.h 2005/02/28 15:45:18 1.45
@@ -360,6 +360,7 @@
{
memcpy((void __force *) dst, src, count);
}
+#endif
#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void
__force *)(void __iomem *)(b),(c),(d))
@@ -408,7 +409,7 @@
return (void*) mm_ptov (address);
#endif
}
-#endif
+
/*
* Change virtual addresses to physical addresses and vv, for
* addresses in the area where the kernel has the RAM mapped.
diff -urN linux/include/asm-ppc/pgtable.h linux/include/asm-ppc/pgtable.h
--- linux/include/asm-ppc/pgtable.h 2005/01/25 04:28:55 1.62
+++ linux/include/asm-ppc/pgtable.h 2005/02/28 15:45:18 1.63
@@ -560,12 +560,12 @@
static inline int ptep_test_and_clear_young(pte_t *ptep)
{
unsigned long old;
- old = (pte_update(ptep, _PAGE_ACCESSED, 0) & _PAGE_ACCESSED);
+ old = pte_update(ptep, _PAGE_ACCESSED, 0);
#if _PAGE_HASHPTE != 0
if (old & _PAGE_HASHPTE)
flush_hash_one_pte(ptep);
#endif
- return old != 0;
+ return (old & _PAGE_ACCESSED) != 0;
}
static inline int ptep_test_and_clear_dirty(pte_t *ptep)
diff -urN linux/include/asm-ppc64/io.h linux/include/asm-ppc64/io.h
--- linux/include/asm-ppc64/io.h 2005/02/07 02:55:00 1.18
+++ linux/include/asm-ppc64/io.h 2005/02/28 15:45:18 1.19
@@ -1,4 +1,4 @@
- #ifndef _PPC64_IO_H
+#ifndef _PPC64_IO_H
#define _PPC64_IO_H
/*
diff -urN linux/include/asm-sparc/floppy.h linux/include/asm-sparc/floppy.h
--- linux/include/asm-sparc/floppy.h 2005/02/13 20:16:30 1.12
+++ linux/include/asm-sparc/floppy.h 2005/02/28 15:45:18 1.13
@@ -312,8 +312,8 @@
}
/* The sun4m lets us know if the controller is actually usable. */
- if(sparc_cpu_model == sun4m) {
- prom_getproperty(fd_node, "status", state, sizeof(state));
+ if(sparc_cpu_model == sun4m &&
+ prom_getproperty(fd_node, "status", state, sizeof(state)) != -1) {
if(!strcmp(state, "disabled")) {
goto no_sun_fdc;
}
diff -urN linux/include/asm-sparc/oplib.h linux/include/asm-sparc/oplib.h
--- linux/include/asm-sparc/oplib.h 2004/04/12 20:23:39 1.10
+++ linux/include/asm-sparc/oplib.h 2005/02/28 15:45:18 1.11
@@ -10,6 +10,7 @@
#include <asm/openprom.h>
#include <linux/spinlock.h>
+#include <linux/compiler.h>
/* The master romvec pointer... */
extern struct linux_romvec *romvec;
@@ -244,8 +245,8 @@
/* Fetch the requested property using the given buffer. Returns
* the number of bytes the prom put into your buffer or -1 on error.
*/
-extern int prom_getproperty(int thisnode, char *property,
- char *prop_buffer, int propbuf_size);
+extern int __must_check prom_getproperty(int thisnode, char *property,
+ char *prop_buffer, int propbuf_size);
/* Acquire an integer property. */
extern int prom_getint(int node, char *property);
diff -urN linux/include/asm-sparc64/compat.h linux/include/asm-sparc64/compat.h
--- linux/include/asm-sparc64/compat.h 2005/02/13 20:16:30 1.14
+++ linux/include/asm-sparc64/compat.h 2005/02/28 15:45:18 1.15
@@ -24,6 +24,7 @@
typedef s32 compat_daddr_t;
typedef u32 compat_caddr_t;
typedef __kernel_fsid_t compat_fsid_t;
+typedef s32 compat_key_t;
typedef s32 compat_int_t;
typedef s32 compat_long_t;
@@ -139,4 +140,62 @@
return (void __user *) (usp - len);
}
+struct compat_ipc64_perm {
+ compat_key_t key;
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_uid_t cuid;
+ __kernel_gid_t cgid;
+ unsigned short __pad1;
+ compat_mode_t mode;
+ unsigned short __pad2;
+ unsigned short seq;
+ unsigned long __unused1; /* yes they really are 64bit pads */
+ unsigned long __unused2;
+};
+
+struct compat_semid64_ds {
+ struct compat_ipc64_perm sem_perm;
+ unsigned int __pad1;
+ compat_time_t sem_otime;
+ unsigned int __pad2;
+ compat_time_t sem_ctime;
+ u32 sem_nsems;
+ u32 __unused1;
+ u32 __unused2;
+};
+
+struct compat_msqid64_ds {
+ struct compat_ipc64_perm msg_perm;
+ unsigned int __pad1;
+ compat_time_t msg_stime;
+ unsigned int __pad2;
+ compat_time_t msg_rtime;
+ unsigned int __pad3;
+ compat_time_t msg_ctime;
+ unsigned int msg_cbytes;
+ unsigned int msg_qnum;
+ unsigned int msg_qbytes;
+ compat_pid_t msg_lspid;
+ compat_pid_t msg_lrpid;
+ unsigned int __unused1;
+ unsigned int __unused2;
+};
+
+struct compat_shmid64_ds {
+ struct compat_ipc64_perm shm_perm;
+ unsigned int __pad1;
+ compat_time_t shm_atime;
+ unsigned int __pad2;
+ compat_time_t shm_dtime;
+ unsigned int __pad3;
+ compat_time_t shm_ctime;
+ compat_size_t shm_segsz;
+ compat_pid_t shm_cpid;
+ compat_pid_t shm_lpid;
+ unsigned int shm_nattch;
+ unsigned int __unused1;
+ unsigned int __unused2;
+};
+
#endif /* _ASM_SPARC64_COMPAT_H */
diff -urN linux/include/asm-sparc64/uaccess.h
linux/include/asm-sparc64/uaccess.h
--- linux/include/asm-sparc64/uaccess.h 2004/11/15 11:49:39 1.24
+++ linux/include/asm-sparc64/uaccess.h 2005/02/28 15:45:18 1.25
@@ -49,10 +49,10 @@
__asm__ __volatile__ ("wr %%g0, %0, %%asi" : : "r" ((val).seg));
\
} while(0)
-#define __user_ok(addr,size) 1
+#define __user_ok(addr,size) ((void)(addr), (void)(size), 1)
#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
-#define __access_ok(addr,size) 1
-#define access_ok(type,addr,size) 1
+#define __access_ok(addr,size) ((void)(addr), (void)(size), 1)
+#define access_ok(type,addr,size) ((void)(type), (void)(addr), (void)(size), 1)
static inline int verify_area(int type, const void __user * addr, unsigned
long size)
{
diff -urN linux/include/asm-x86_64/elf.h linux/include/asm-x86_64/elf.h
--- linux/include/asm-x86_64/elf.h 2004/10/25 20:44:45 1.9
+++ linux/include/asm-x86_64/elf.h 2005/02/28 15:45:18 1.10
@@ -147,14 +147,7 @@
* An executable for which elf_read_implies_exec() returns TRUE will
* have the READ_IMPLIES_EXEC personality flag set automatically.
*/
-#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack))
-
-/*
- * An executable for which elf_read_implies_exec() returns TRUE will
- * have the READ_IMPLIES_EXEC personality flag set automatically.
- */
-#define elf_read_implies_exec_binary(ex, have_pt_gnu_stack) \
- (!(have_pt_gnu_stack))
+#define elf_read_implies_exec(ex, executable_stack) (executable_stack !=
EXSTACK_DISABLE_X)
extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
diff -urN linux/include/linux/agp_backend.h linux/include/linux/agp_backend.h
--- linux/include/linux/agp_backend.h 2005/01/25 04:28:56 1.29
+++ linux/include/linux/agp_backend.h 2005/02/28 15:45:18 1.30
@@ -54,7 +54,7 @@
struct pci_dev *device;
enum chipset_type chipset;
unsigned long mode;
- off_t aper_base;
+ unsigned long aper_base;
size_t aper_size;
int max_memory; /* In pages */
int current_memory;
diff -urN linux/include/linux/agpgart.h linux/include/linux/agpgart.h
--- linux/include/linux/agpgart.h 2003/06/05 18:24:11 1.5
+++ linux/include/linux/agpgart.h 2005/02/28 15:45:18 1.6
@@ -64,7 +64,7 @@
struct agp_version version; /* version of the driver */
__u32 bridge_id; /* bridge vendor/device */
__u32 agp_mode; /* mode info of bridge */
- off_t aper_base; /* base of aperture */
+ unsigned long aper_base;/* base of aperture */
size_t aper_size; /* size of aperture */
size_t pg_total; /* max pages (swap + system) */
size_t pg_system; /* max pages (system) */
@@ -118,7 +118,7 @@
struct agp_version version; /* version of the driver */
u32 bridge_id; /* bridge vendor/device */
u32 agp_mode; /* mode info of bridge */
- off_t aper_base; /* base of aperture */
+ unsigned long aper_base;/* base of aperture */
size_t aper_size; /* size of aperture */
size_t pg_total; /* max pages (swap + system) */
size_t pg_system; /* max pages (system) */
diff -urN linux/include/linux/compat.h linux/include/linux/compat.h
--- linux/include/linux/compat.h 2005/01/13 14:06:53 1.18
+++ linux/include/linux/compat.h 2005/02/28 15:45:18 1.19
@@ -18,6 +18,8 @@
#define compat_jiffies_to_clock_t(x) \
(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
+struct rusage;
+
struct compat_itimerspec {
struct compat_timespec it_interval;
struct compat_timespec it_value;
diff -urN linux/include/linux/fb.h linux/include/linux/fb.h
--- linux/include/linux/fb.h 2005/01/25 04:28:56 1.52
+++ linux/include/linux/fb.h 2005/02/28 15:45:18 1.53
@@ -862,7 +862,6 @@
/* drivers/video/modedb.c */
#define VESA_MODEDB_SIZE 34
-extern const struct fb_videomode vesa_modes[];
extern void fb_var_to_videomode(struct fb_videomode *mode,
struct fb_var_screeninfo *var);
extern void fb_videomode_to_var(struct fb_var_screeninfo *var,
@@ -907,6 +906,8 @@
u32 flag;
};
+extern const struct fb_videomode vesa_modes[];
+
struct fb_modelist {
struct list_head list;
struct fb_videomode mode;
diff -urN linux/include/linux/fs.h linux/include/linux/fs.h
--- linux/include/linux/fs.h 2005/02/13 20:16:31 1.166
+++ linux/include/linux/fs.h 2005/02/28 15:45:18 1.167
@@ -7,25 +7,8 @@
*/
#include <linux/config.h>
-#include <linux/linkage.h>
#include <linux/limits.h>
-#include <linux/wait.h>
-#include <linux/types.h>
-#include <linux/kdev_t.h>
#include <linux/ioctl.h>
-#include <linux/dcache.h>
-#include <linux/stat.h>
-#include <linux/cache.h>
-#include <linux/kobject.h>
-#include <asm/atomic.h>
-
-struct iovec;
-struct nameidata;
-struct pipe_inode_info;
-struct poll_table_struct;
-struct kstatfs;
-struct vm_area_struct;
-struct vfsmount;
/*
* It's silly to have NR_OPEN bigger than NR_FILE, but you can change
@@ -216,14 +199,32 @@
#ifdef __KERNEL__
+#include <linux/linkage.h>
+#include <linux/wait.h>
+#include <linux/types.h>
+#include <linux/kdev_t.h>
+#include <linux/dcache.h>
+#include <linux/stat.h>
+#include <linux/cache.h>
+#include <linux/kobject.h>
#include <linux/list.h>
#include <linux/radix-tree.h>
#include <linux/prio_tree.h>
#include <linux/audit.h>
#include <linux/init.h>
+
+#include <asm/atomic.h>
#include <asm/semaphore.h>
#include <asm/byteorder.h>
+struct iovec;
+struct nameidata;
+struct pipe_inode_info;
+struct poll_table_struct;
+struct kstatfs;
+struct vm_area_struct;
+struct vfsmount;
+
/* Used to be a macro which just called the function, now just a function */
extern void update_atime (struct inode *);
diff -urN linux/include/linux/libata.h linux/include/linux/libata.h
--- linux/include/linux/libata.h 2005/02/13 20:16:31 1.19
+++ linux/include/linux/libata.h 2005/02/28 15:45:18 1.20
@@ -334,6 +334,8 @@
void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf);
u8 (*check_status)(struct ata_port *ap);
+ u8 (*check_altstatus)(struct ata_port *ap);
+ u8 (*check_err)(struct ata_port *ap);
void (*dev_select)(struct ata_port *ap, unsigned int device);
void (*phy_reset) (struct ata_port *ap);
@@ -360,6 +362,9 @@
void (*port_stop) (struct ata_port *ap);
void (*host_stop) (struct ata_host_set *host_set);
+
+ void (*bmdma_stop) (struct ata_port *ap);
+ u8 (*bmdma_status) (struct ata_port *ap);
};
struct ata_port_info {
@@ -400,6 +405,8 @@
extern void ata_noop_dev_select (struct ata_port *ap, unsigned int device);
extern void ata_std_dev_select (struct ata_port *ap, unsigned int device);
extern u8 ata_check_status(struct ata_port *ap);
+extern u8 ata_altstatus(struct ata_port *ap);
+extern u8 ata_chk_err(struct ata_port *ap);
extern void ata_exec_command(struct ata_port *ap, struct ata_taskfile *tf);
extern int ata_port_start (struct ata_port *ap);
extern void ata_port_stop (struct ata_port *ap);
@@ -415,6 +422,8 @@
unsigned int ofs, unsigned int len);
extern void ata_bmdma_setup (struct ata_queued_cmd *qc);
extern void ata_bmdma_start (struct ata_queued_cmd *qc);
+extern void ata_bmdma_stop(struct ata_port *ap);
+extern u8 ata_bmdma_status(struct ata_port *ap);
extern void ata_bmdma_irq_clear(struct ata_port *ap);
extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat);
extern void ata_eng_timeout(struct ata_port *ap);
@@ -452,26 +461,11 @@
(dev->class == ATA_DEV_ATAPI));
}
-static inline u8 ata_chk_err(struct ata_port *ap)
-{
- if (ap->flags & ATA_FLAG_MMIO) {
- return readb((void __iomem *) ap->ioaddr.error_addr);
- }
- return inb(ap->ioaddr.error_addr);
-}
-
static inline u8 ata_chk_status(struct ata_port *ap)
{
return ap->ops->check_status(ap);
}
-static inline u8 ata_altstatus(struct ata_port *ap)
-{
- if (ap->flags & ATA_FLAG_MMIO)
- return readb((void __iomem *)ap->ioaddr.altstatus_addr);
- return inb(ap->ioaddr.altstatus_addr);
-}
-
static inline void ata_pause(struct ata_port *ap)
{
ata_altstatus(ap);
@@ -595,46 +589,6 @@
return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0;
}
-static inline void ata_bmdma_stop(struct ata_port *ap)
-{
- if (ap->flags & ATA_FLAG_MMIO) {
- void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr;
-
- /* clear start/stop bit */
- writeb(readb(mmio + ATA_DMA_CMD) & ~ATA_DMA_START,
- mmio + ATA_DMA_CMD);
- } else {
- /* clear start/stop bit */
- outb(inb(ap->ioaddr.bmdma_addr + ATA_DMA_CMD) & ~ATA_DMA_START,
- ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
- }
-
- /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
- ata_altstatus(ap); /* dummy read */
-}
-
-static inline void ata_bmdma_ack_irq(struct ata_port *ap)
-{
- if (ap->flags & ATA_FLAG_MMIO) {
- void __iomem *mmio = ((void __iomem *) ap->ioaddr.bmdma_addr) +
ATA_DMA_STATUS;
- writeb(readb(mmio), mmio);
- } else {
- unsigned long addr = ap->ioaddr.bmdma_addr + ATA_DMA_STATUS;
- outb(inb(addr), addr);
- }
-}
-
-static inline u8 ata_bmdma_status(struct ata_port *ap)
-{
- u8 host_stat;
- if (ap->flags & ATA_FLAG_MMIO) {
- void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr;
- host_stat = readb(mmio + ATA_DMA_STATUS);
- } else
- host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
- return host_stat;
-}
-
static inline int ata_try_flush_cache(struct ata_device *dev)
{
return ata_id_wcache_enabled(dev->id) ||
diff -urN linux/include/linux/socket.h linux/include/linux/socket.h
--- linux/include/linux/socket.h 2005/01/25 04:28:56 1.32
+++ linux/include/linux/socket.h 2005/02/28 15:45:18 1.33
@@ -120,7 +120,7 @@
* Now it always returns valid, not truncated ancillary object
* HEADER. But caller still MUST check, that cmsg->cmsg_len is
* inside range, given by msg->msg_controllen before using
- * ansillary object DATA. --ANK (980731)
+ * ancillary object DATA. --ANK (980731)
*/
__KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
diff -urN linux/include/linux/sysctl.h linux/include/linux/sysctl.h
--- linux/include/linux/sysctl.h 2005/02/13 20:16:31 1.92
+++ linux/include/linux/sysctl.h 2005/02/28 15:45:18 1.93
@@ -344,6 +344,7 @@
NET_TCP_DEFAULT_WIN_SCALE=105,
NET_TCP_MODERATE_RCVBUF=106,
NET_TCP_TSO_WIN_DIVISOR=107,
+ NET_TCP_BIC_BETA=108,
};
enum {
diff -urN linux/include/linux/tcp.h linux/include/linux/tcp.h
--- linux/include/linux/tcp.h 2005/01/25 04:28:56 1.33
+++ linux/include/linux/tcp.h 2005/02/28 15:45:18 1.34
@@ -210,6 +210,27 @@
TCP_BIC,
};
+struct tcp_options_received {
+/* PAWS/RTTM data */
+ long ts_recent_stamp;/* Time we stored ts_recent (for aging) */
+ __u32 ts_recent; /* Time stamp to echo next */
+ __u32 rcv_tsval; /* Time stamp value */
+ __u32 rcv_tsecr; /* Time stamp echo reply */
+ char saw_tstamp; /* Saw TIMESTAMP on last packet */
+ char tstamp_ok; /* TIMESTAMP seen on SYN packet */
+ char sack_ok; /* SACK seen on SYN packet */
+ char wscale_ok; /* Wscale seen on SYN packet */
+ __u8 snd_wscale; /* Window scaling received from sender */
+ __u8 rcv_wscale; /* Window scaling to send to receiver */
+/* SACKs data */
+ __u8 dsack; /* D-SACK is scheduled */
+ __u8 eff_sacks; /* Size of SACK array to send with next packet
*/
+ __u8 num_sacks; /* Number of SACK blocks */
+ __u8 __pad;
+ __u16 user_mss; /* mss requested by user in ioctl */
+ __u16 mss_clamp; /* Maximal mss, negotiated at connection setup
*/
+};
+
struct tcp_sock {
/* inet_sock has to be the first member of tcp_sock */
struct inet_sock inet;
@@ -262,22 +283,19 @@
__u32 pmtu_cookie; /* Last pmtu seen by socket */
__u32 mss_cache; /* Cached effective mss, not including SACKS */
__u16 mss_cache_std; /* Like mss_cache, but without TSO */
- __u16 mss_clamp; /* Maximal mss, negotiated at connection setup
*/
__u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options)
*/
__u16 ext2_header_len;/* Options depending on route */
__u8 ca_state; /* State of fast-retransmit machine */
__u8 retransmits; /* Number of unrecovered RTO timeouts. */
+ __u32 frto_highmark; /* snd_nxt when RTO occurred */
__u8 reordering; /* Packet reordering metric. */
__u8 frto_counter; /* Number of new acks after RTO */
- __u32 frto_highmark; /* snd_nxt when RTO occurred */
__u8 adv_cong; /* Using Vegas, Westwood, or BIC */
__u8 defer_accept; /* User waits for some data after accept() */
- /* one byte hole, try to pack */
/* RTT measurement */
- __u8 backoff; /* backoff */
__u32 srtt; /* smoothed round trip time << 3 */
__u32 mdev; /* medium deviation */
__u32 mdev_max; /* maximal mdev for the last rtt period */
@@ -288,7 +306,15 @@
__u32 packets_out; /* Packets which are "in flight" */
__u32 left_out; /* Packets which leaved network */
__u32 retrans_out; /* Retransmitted packets out */
+ __u8 backoff; /* backoff */
+/*
+ * Options received (usually on last packet, some only on SYN packets).
+ */
+ __u8 nonagle; /* Disable Nagle algorithm? */
+ __u8 keepalive_probes; /* num of allowed keep alive probes */
+ __u8 probes_out; /* unanswered 0 window probes */
+ struct tcp_options_received rx_opt;
/*
* Slow start and congestion control (see also Nagle, and Karn & Partridge)
@@ -314,40 +340,19 @@
__u32 write_seq; /* Tail(+1) of data held in tcp send buffer */
__u32 pushed_seq; /* Last pushed seq, required to talk to windows
*/
__u32 copied_seq; /* Head of yet unread data */
-/*
- * Options received (usually on last packet, some only on SYN packets).
- */
- char tstamp_ok, /* TIMESTAMP seen on SYN packet */
- wscale_ok, /* Wscale seen on SYN packet */
- sack_ok; /* SACK seen on SYN packet */
- char saw_tstamp; /* Saw TIMESTAMP on last packet */
- __u8 snd_wscale; /* Window scaling received from sender */
- __u8 rcv_wscale; /* Window scaling to send to receiver */
- __u8 nonagle; /* Disable Nagle algorithm? */
- __u8 keepalive_probes; /* num of allowed keep alive probes */
-
-/* PAWS/RTTM data */
- __u32 rcv_tsval; /* Time stamp value */
- __u32 rcv_tsecr; /* Time stamp echo reply */
- __u32 ts_recent; /* Time stamp to echo next */
- long ts_recent_stamp;/* Time we stored ts_recent (for aging) */
/* SACKs data */
- __u16 user_mss; /* mss requested by user in ioctl */
- __u8 dsack; /* D-SACK is scheduled */
- __u8 eff_sacks; /* Size of SACK array to send with next packet
*/
struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */
struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/
__u32 window_clamp; /* Maximal window to advertise */
__u32 rcv_ssthresh; /* Current window clamp */
- __u8 probes_out; /* unanswered 0 window probes */
- __u8 num_sacks; /* Number of SACK blocks */
__u16 advmss; /* Advertised MSS */
__u8 syn_retries; /* num of allowed syn retries */
__u8 ecn_flags; /* ECN status bits. */
__u16 prior_ssthresh; /* ssthresh saved at recovery start */
+ __u16 __pad1;
__u32 lost_out; /* Lost packets */
__u32 sacked_out; /* SACK'd packets */
__u32 fackets_out; /* FACK'd packets */
diff -urN linux/include/net/dst.h linux/include/net/dst.h
--- linux/include/net/dst.h 2005/02/13 20:16:32 1.30
+++ linux/include/net/dst.h 2005/02/28 15:45:18 1.31
@@ -89,7 +89,8 @@
int (*gc)(void);
struct dst_entry * (*check)(struct dst_entry *, __u32 cookie);
void (*destroy)(struct dst_entry *);
- void (*ifdown)(struct dst_entry *, int how);
+ void (*ifdown)(struct dst_entry *,
+ struct net_device *dev, int how);
struct dst_entry * (*negative_advice)(struct dst_entry *);
void (*link_failure)(struct sk_buff *);
void (*update_pmtu)(struct dst_entry *dst, u32 mtu);
diff -urN linux/include/net/tcp.h linux/include/net/tcp.h
--- linux/include/net/tcp.h 2005/01/25 04:28:58 1.82
+++ linux/include/net/tcp.h 2005/02/28 15:45:18 1.83
@@ -505,9 +505,8 @@
# define TCP_TW_RECYCLE_TICK (12+2-TCP_TW_RECYCLE_SLOTS_LOG)
#endif
-#define BICTCP_1_OVER_BETA 8 /*
- * Fast recovery
- * multiplicative decrease factor
+#define BICTCP_BETA_SCALE 1024 /* Scale factor beta calculation
+ * max_cwnd = snd_cwnd * beta
*/
#define BICTCP_MAX_INCREMENT 32 /*
* Limit on the amount of
@@ -606,6 +605,7 @@
extern int sysctl_tcp_bic;
extern int sysctl_tcp_bic_fast_convergence;
extern int sysctl_tcp_bic_low_window;
+extern int sysctl_tcp_bic_beta;
extern int sysctl_tcp_moderate_rcvbuf;
extern int sysctl_tcp_tso_win_divisor;
@@ -832,9 +832,9 @@
memset(&tp->ack, 0, sizeof(tp->ack));
}
-static inline void tcp_clear_options(struct tcp_sock *tp)
+static inline void tcp_clear_options(struct tcp_options_received *rx_opt)
{
- tp->tstamp_ok = tp->sack_ok = tp->wscale_ok = tp->snd_wscale = 0;
+ rx_opt->tstamp_ok = rx_opt->sack_ok = rx_opt->wscale_ok =
rx_opt->snd_wscale = 0;
}
enum tcp_tw_status
@@ -883,7 +883,7 @@
extern int tcp_listen_start(struct sock *sk);
extern void tcp_parse_options(struct sk_buff *skb,
- struct tcp_sock *tp,
+ struct tcp_options_received
*opt_rx,
int estab);
/*
@@ -1071,7 +1071,7 @@
static __inline__ void tcp_fast_path_on(struct tcp_sock *tp)
{
- __tcp_fast_path_on(tp, tp->snd_wnd>>tp->snd_wscale);
+ __tcp_fast_path_on(tp, tp->snd_wnd >> tp->rx_opt.snd_wscale);
}
static inline void tcp_fast_path_check(struct sock *sk, struct tcp_sock *tp)
@@ -1244,15 +1244,16 @@
if (tcp_is_bic(tp)) {
if (sysctl_tcp_bic_fast_convergence &&
tp->snd_cwnd < tp->bictcp.last_max_cwnd)
- tp->bictcp.last_max_cwnd
- = (tp->snd_cwnd * (2*BICTCP_1_OVER_BETA-1))
- / (BICTCP_1_OVER_BETA/2);
+ tp->bictcp.last_max_cwnd = (tp->snd_cwnd *
+ (BICTCP_BETA_SCALE
+ + sysctl_tcp_bic_beta))
+ / (2 * BICTCP_BETA_SCALE);
else
tp->bictcp.last_max_cwnd = tp->snd_cwnd;
if (tp->snd_cwnd > sysctl_tcp_bic_low_window)
- return max(tp->snd_cwnd -
(tp->snd_cwnd/BICTCP_1_OVER_BETA),
- 2U);
+ return max((tp->snd_cwnd * sysctl_tcp_bic_beta)
+ / BICTCP_BETA_SCALE, 2U);
}
return max(tp->snd_cwnd >> 1U, 2U);
@@ -1322,7 +1323,7 @@
static inline void tcp_sync_left_out(struct tcp_sock *tp)
{
- if (tp->sack_ok &&
+ if (tp->rx_opt.sack_ok &&
(tp->sacked_out >= tp->packets_out - tp->lost_out))
tp->sacked_out = tp->packets_out - tp->lost_out;
tp->left_out = tp->sacked_out + tp->lost_out;
@@ -1648,39 +1649,39 @@
tcp_destroy_sock(sk);
}
-static __inline__ void tcp_sack_reset(struct tcp_sock *tp)
+static __inline__ void tcp_sack_reset(struct tcp_options_received *rx_opt)
{
- tp->dsack = 0;
- tp->eff_sacks = 0;
- tp->num_sacks = 0;
+ rx_opt->dsack = 0;
+ rx_opt->eff_sacks = 0;
+ rx_opt->num_sacks = 0;
}
static __inline__ void tcp_build_and_update_options(__u32 *ptr, struct
tcp_sock *tp, __u32 tstamp)
{
- if (tp->tstamp_ok) {
+ if (tp->rx_opt.tstamp_ok) {
*ptr++ = __constant_htonl((TCPOPT_NOP << 24) |
(TCPOPT_NOP << 16) |
(TCPOPT_TIMESTAMP << 8) |
TCPOLEN_TIMESTAMP);
*ptr++ = htonl(tstamp);
- *ptr++ = htonl(tp->ts_recent);
+ *ptr++ = htonl(tp->rx_opt.ts_recent);
}
- if (tp->eff_sacks) {
- struct tcp_sack_block *sp = tp->dsack ? tp->duplicate_sack :
tp->selective_acks;
+ if (tp->rx_opt.eff_sacks) {
+ struct tcp_sack_block *sp = tp->rx_opt.dsack ?
tp->duplicate_sack : tp->selective_acks;
int this_sack;
*ptr++ = __constant_htonl((TCPOPT_NOP << 24) |
(TCPOPT_NOP << 16) |
(TCPOPT_SACK << 8) |
(TCPOLEN_SACK_BASE +
- (tp->eff_sacks *
TCPOLEN_SACK_PERBLOCK)));
- for(this_sack = 0; this_sack < tp->eff_sacks; this_sack++) {
+ (tp->rx_opt.eff_sacks *
TCPOLEN_SACK_PERBLOCK)));
+ for(this_sack = 0; this_sack < tp->rx_opt.eff_sacks;
this_sack++) {
*ptr++ = htonl(sp[this_sack].start_seq);
*ptr++ = htonl(sp[this_sack].end_seq);
}
- if (tp->dsack) {
- tp->dsack = 0;
- tp->eff_sacks--;
+ if (tp->rx_opt.dsack) {
+ tp->rx_opt.dsack = 0;
+ tp->rx_opt.eff_sacks--;
}
}
}
@@ -1826,17 +1827,17 @@
}
static __inline__ void tcp_openreq_init(struct open_request *req,
- struct tcp_sock *tp,
+ struct tcp_options_received *rx_opt,
struct sk_buff *skb)
{
req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */
req->rcv_isn = TCP_SKB_CB(skb)->seq;
- req->mss = tp->mss_clamp;
- req->ts_recent = tp->saw_tstamp ? tp->rcv_tsval : 0;
- req->tstamp_ok = tp->tstamp_ok;
- req->sack_ok = tp->sack_ok;
- req->snd_wscale = tp->snd_wscale;
- req->wscale_ok = tp->wscale_ok;
+ req->mss = rx_opt->mss_clamp;
+ req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0;
+ req->tstamp_ok = rx_opt->tstamp_ok;
+ req->sack_ok = rx_opt->sack_ok;
+ req->snd_wscale = rx_opt->snd_wscale;
+ req->wscale_ok = rx_opt->wscale_ok;
req->acked = 0;
req->ecn_ok = 0;
req->rmt_port = skb->h.th->source;
@@ -1885,11 +1886,11 @@
return fin_timeout;
}
-static inline int tcp_paws_check(const struct tcp_sock *tp, int rst)
+static inline int tcp_paws_check(const struct tcp_options_received *rx_opt,
int rst)
{
- if ((s32)(tp->rcv_tsval - tp->ts_recent) >= 0)
+ if ((s32)(rx_opt->rcv_tsval - rx_opt->ts_recent) >= 0)
return 0;
- if (xtime.tv_sec >= tp->ts_recent_stamp + TCP_PAWS_24DAYS)
+ if (xtime.tv_sec >= rx_opt->ts_recent_stamp + TCP_PAWS_24DAYS)
return 0;
/* RST segments are not recommended to carry timestamp,
@@ -1904,7 +1905,7 @@
However, we can relax time bounds for RST segments to MSL.
*/
- if (rst && xtime.tv_sec >= tp->ts_recent_stamp + TCP_PAWS_MSL)
+ if (rst && xtime.tv_sec >= rx_opt->ts_recent_stamp + TCP_PAWS_MSL)
return 0;
return 1;
}
diff -urN linux/kernel/futex.c linux/kernel/futex.c
--- linux/kernel/futex.c 2004/12/04 18:16:10 1.30
+++ linux/kernel/futex.c 2005/02/28 15:45:19 1.31
@@ -258,6 +258,18 @@
}
}
+static inline int get_futex_value_locked(int *dest, int __user *from)
+{
+ int ret;
+
+ inc_preempt_count();
+ ret = __copy_from_user_inatomic(dest, from, sizeof(int));
+ dec_preempt_count();
+ preempt_check_resched();
+
+ return ret ? -EFAULT : 0;
+}
+
/*
* The hash bucket lock must be held when this is called.
* Afterwards, the futex_q must not be accessed.
@@ -329,6 +341,7 @@
int ret, drop_count = 0;
unsigned int nqueued;
+ retry:
down_read(¤t->mm->mmap_sem);
ret = get_futex_key(uaddr1, &key1);
@@ -355,9 +368,20 @@
before *uaddr1. */
smp_mb();
- if (get_user(curval, (int __user *)uaddr1) != 0) {
- ret = -EFAULT;
- goto out;
+ ret = get_futex_value_locked(&curval, (int __user *)uaddr1);
+
+ if (unlikely(ret)) {
+ /* If we would have faulted, release mmap_sem, fault
+ * it in and start all over again.
+ */
+ up_read(¤t->mm->mmap_sem);
+
+ ret = get_user(curval, (int __user *)uaddr1);
+
+ if (!ret)
+ goto retry;
+
+ return ret;
}
if (curval != *valp) {
ret = -EAGAIN;
@@ -480,6 +504,7 @@
int ret, curval;
struct futex_q q;
+ retry:
down_read(¤t->mm->mmap_sem);
ret = get_futex_key(uaddr, &q.key);
@@ -508,9 +533,23 @@
* We hold the mmap semaphore, so the mapping cannot have changed
* since we looked it up in get_futex_key.
*/
- if (get_user(curval, (int __user *)uaddr) != 0) {
- ret = -EFAULT;
- goto out_unqueue;
+
+ ret = get_futex_value_locked(&curval, (int __user *)uaddr);
+
+ if (unlikely(ret)) {
+ /* If we would have faulted, release mmap_sem, fault it in and
+ * start all over again.
+ */
+ up_read(¤t->mm->mmap_sem);
+
+ if (!unqueue_me(&q)) /* There's a chance we got woken already */
+ return 0;
+
+ ret = get_user(curval, (int __user *)uaddr);
+
+ if (!ret)
+ goto retry;
+ return ret;
}
if (curval != val) {
ret = -EWOULDBLOCK;
diff -urN linux/kernel/workqueue.c linux/kernel/workqueue.c
--- linux/kernel/workqueue.c 2005/01/13 14:06:59 1.17
+++ linux/kernel/workqueue.c 2005/02/28 15:45:19 1.18
@@ -485,8 +485,10 @@
case CPU_ONLINE:
/* Kick off worker threads. */
- list_for_each_entry(wq, &workqueues, list)
+ list_for_each_entry(wq, &workqueues, list) {
+ kthread_bind(wq->cpu_wq[hotcpu].thread, hotcpu);
wake_up_process(wq->cpu_wq[hotcpu].thread);
+ }
break;
case CPU_UP_CANCELED:
diff -urN linux/mm/filemap.c linux/mm/filemap.c
--- linux/mm/filemap.c 2005/02/13 20:16:32 1.160
+++ linux/mm/filemap.c 2005/02/28 15:45:19 1.161
@@ -2078,6 +2078,8 @@
count = ocount;
pos = *ppos;
+ vfs_check_frozen(inode->i_sb, SB_FREEZE_WRITE);
+
/* We can write back this queue in page reclaim */
current->backing_dev_info = mapping->backing_dev_info;
written = 0;
diff -urN linux/mm/memory.c linux/mm/memory.c
--- linux/mm/memory.c 2005/02/07 02:55:03 1.129
+++ linux/mm/memory.c 2005/02/28 15:45:19 1.130
@@ -98,7 +98,8 @@
pmd_clear(pmd);
return;
}
- if (!(start & ~PMD_MASK) && !(end & ~PMD_MASK)) {
+ if (!((start | end) & ~PMD_MASK)) {
+ /* Only clear full, aligned ranges */
page = pmd_page(*pmd);
pmd_clear(pmd);
dec_page_state(nr_page_table_pages);
@@ -131,7 +132,8 @@
addr = next;
} while (addr && (addr < end));
- if (!(start & ~PUD_MASK) && !(end & ~PUD_MASK)) {
+ if (!((start | end) & ~PUD_MASK)) {
+ /* Only clear full, aligned ranges */
pud_clear(pud);
pmd_free_tlb(tlb, __pmd);
}
@@ -162,7 +164,8 @@
addr = next;
} while (addr && (addr < end));
- if (!(start & ~PGDIR_MASK) && !(end & ~PGDIR_MASK)) {
+ if (!((start | end) & ~PGDIR_MASK)) {
+ /* Only clear full, aligned ranges */
pgd_clear(pgd);
pud_free_tlb(tlb, __pud);
}
@@ -358,7 +361,7 @@
for (; addr < end; addr = next, src_pmd++, dst_pmd++) {
next = (addr + PMD_SIZE) & PMD_MASK;
- if (next > end)
+ if (next > end || next <= addr)
next = end;
if (pmd_none(*src_pmd))
continue;
@@ -390,7 +393,7 @@
for (; addr < end; addr = next, src_pud++, dst_pud++) {
next = (addr + PUD_SIZE) & PUD_MASK;
- if (next > end)
+ if (next > end || next <= addr)
next = end;
if (pud_none(*src_pud))
continue;
@@ -1041,7 +1044,8 @@
error = -ENOMEM;
if (!pmd)
break;
- error = zeromap_pmd_range(mm, pmd, address, end - address,
prot);
+ error = zeromap_pmd_range(mm, pmd, base + address,
+ end - address, prot);
if (error)
break;
address = (address + PUD_SIZE) & PUD_MASK;
diff -urN linux/mm/mempolicy.c linux/mm/mempolicy.c
--- linux/mm/mempolicy.c 2005/01/25 04:29:00 1.10
+++ linux/mm/mempolicy.c 2005/02/28 15:45:19 1.11
@@ -524,9 +524,13 @@
} else
pval = pol->policy;
- err = -EFAULT;
+ if (vma) {
+ up_read(¤t->mm->mmap_sem);
+ vma = NULL;
+ }
+
if (policy && put_user(pval, policy))
- goto out;
+ return -EFAULT;
err = 0;
if (nmask) {
diff -urN linux/net/core/dst.c linux/net/core/dst.c
--- linux/net/core/dst.c 2005/02/13 20:16:33 1.29
+++ linux/net/core/dst.c 2005/02/28 15:45:19 1.30
@@ -220,31 +220,28 @@
*
* Commented and originally written by Alexey.
*/
-static void dst_ifdown(struct dst_entry *dst, int unregister)
+static inline void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
+ int unregister)
{
- struct net_device *dev = dst->dev;
+ if (dst->ops->ifdown)
+ dst->ops->ifdown(dst, dev, unregister);
+
+ if (dev != dst->dev)
+ return;
if (!unregister) {
dst->input = dst_discard_in;
dst->output = dst_discard_out;
- }
-
- do {
- if (unregister) {
- dst->dev = &loopback_dev;
- dev_hold(&loopback_dev);
+ } else {
+ dst->dev = &loopback_dev;
+ dev_hold(&loopback_dev);
+ dev_put(dev);
+ if (dst->neighbour && dst->neighbour->dev == dev) {
+ dst->neighbour->dev = &loopback_dev;
dev_put(dev);
- if (dst->neighbour && dst->neighbour->dev == dev) {
- dst->neighbour->dev = &loopback_dev;
- dev_put(dev);
- dev_hold(&loopback_dev);
- }
+ dev_hold(&loopback_dev);
}
-
- if (dst->ops->ifdown)
- dst->ops->ifdown(dst, unregister);
- } while ((dst = dst->child) && dst->flags & DST_NOHASH &&
- dst->dev == dev);
+ }
}
static int dst_dev_event(struct notifier_block *this, unsigned long event,
void *ptr)
@@ -257,8 +254,7 @@
case NETDEV_DOWN:
spin_lock_bh(&dst_lock);
for (dst = dst_garbage_list; dst; dst = dst->next) {
- if (dst->dev == dev)
- dst_ifdown(dst, event != NETDEV_DOWN);
+ dst_ifdown(dst, dev, event != NETDEV_DOWN);
}
spin_unlock_bh(&dst_lock);
break;
diff -urN linux/net/core/pktgen.c linux/net/core/pktgen.c
--- linux/net/core/pktgen.c 2005/02/07 02:55:05 1.19
+++ linux/net/core/pktgen.c 2005/02/28 15:45:19 1.20
@@ -148,7 +148,7 @@
#include <asm/timex.h>
-#define VERSION "pktgen v2.54: Packet Generator for packet performance
testing.\n"
+#define VERSION "pktgen v2.56: Packet Generator for packet performance
testing.\n"
/* #define PG_DEBUG(a) a */
#define PG_DEBUG(a)
@@ -167,9 +167,6 @@
#define F_TXSIZE_RND (1<<6) /* Transmit size is random */
#define F_IPV6 (1<<7) /* Interface in IPV6 Mode */
-#define L_PUSH(t, i) {i->next = t; t=i;}
-#define L_POP(t, i) {i=t; if(i) t = i->next;}
-
/* Thread control flag bits */
#define T_TERMINATE (1<<0)
#define T_STOP (1<<1) /* Stop run */
@@ -1366,19 +1363,15 @@
p += sprintf(p, "Running: ");
if_lock(t);
- pkt_dev = t->if_list;
- while (pkt_dev && pkt_dev->running) {
- p += sprintf(p, "%s ", pkt_dev->ifname);
- pkt_dev = pkt_dev->next;
- }
+ for(pkt_dev = t->if_list;pkt_dev; pkt_dev = pkt_dev->next)
+ if(pkt_dev->running)
+ p += sprintf(p, "%s ", pkt_dev->ifname);
+
p += sprintf(p, "\nStopped: ");
- pkt_dev = t->if_list;
- while (pkt_dev && !pkt_dev->running) {
- p += sprintf(p, "%s ", pkt_dev->ifname);
- pkt_dev = pkt_dev->next;
- }
-
+ for(pkt_dev = t->if_list;pkt_dev; pkt_dev = pkt_dev->next)
+ if(!pkt_dev->running)
+ p += sprintf(p, "%s ", pkt_dev->ifname);
if (t->result[0])
p += sprintf(p, "\nResult: %s\n", t->result);
@@ -2393,7 +2386,7 @@
thread_unlock();
}
-static int running(struct pktgen_thread *t )
+static int thread_is_running(struct pktgen_thread *t )
{
struct pktgen_dev *next;
int res = 0;
@@ -2415,7 +2408,7 @@
if_lock(t);
- while(running(t)) {
+ while(thread_is_running(t)) {
if_unlock(t);
interruptible_sleep_on_timeout(&queue, HZ/10);
@@ -2520,13 +2513,15 @@
return -EINVAL;
}
- if (pkt_dev->skb)
- kfree_skb(pkt_dev->skb);
-
pkt_dev->stopped_at = getCurUs();
pkt_dev->running = 0;
show_results(pkt_dev, skb_shinfo(pkt_dev->skb)->nr_frags);
+
+ if (pkt_dev->skb)
+ kfree_skb(pkt_dev->skb);
+
+ pkt_dev->skb = NULL;
return 0;
}
@@ -2860,10 +2855,10 @@
for(pkt_dev=t->if_list; pkt_dev; pkt_dev = pkt_dev->next ) {
if (strcmp(pkt_dev->ifname, ifname) == 0) {
- goto out;
+ break;
}
}
- out:
+
if_unlock(t);
PG_DEBUG(printk("pktgen: find_dev(%s) returning %p\n", ifname,pkt_dev));
return pkt_dev;
@@ -2884,8 +2879,7 @@
rv = -EBUSY;
goto out;
}
-
- L_PUSH(t->if_list, pkt_dev);
+ pkt_dev->next =t->if_list; t->if_list=pkt_dev;
pkt_dev->pg_thread = t;
pkt_dev->running = 0;
diff -urN linux/net/ipv4/route.c linux/net/ipv4/route.c
--- linux/net/ipv4/route.c 2005/02/13 20:16:33 1.81
+++ linux/net/ipv4/route.c 2005/02/28 15:45:19 1.82
@@ -138,7 +138,8 @@
static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie);
static void ipv4_dst_destroy(struct dst_entry *dst);
-static void ipv4_dst_ifdown(struct dst_entry *dst, int how);
+static void ipv4_dst_ifdown(struct dst_entry *dst,
+ struct net_device *dev, int how);
static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst);
static void ipv4_link_failure(struct sk_buff *skb);
static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu);
@@ -1342,11 +1343,12 @@
}
}
-static void ipv4_dst_ifdown(struct dst_entry *dst, int how)
+static void ipv4_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
+ int how)
{
struct rtable *rt = (struct rtable *) dst;
struct in_device *idev = rt->idev;
- if (idev && idev->dev != &loopback_dev) {
+ if (dev != &loopback_dev && idev && idev->dev == dev) {
struct in_device *loopback_idev = in_dev_get(&loopback_dev);
if (loopback_idev) {
rt->idev = loopback_idev;
diff -urN linux/net/ipv4/sysctl_net_ipv4.c linux/net/ipv4/sysctl_net_ipv4.c
--- linux/net/ipv4/sysctl_net_ipv4.c 2004/10/12 14:36:41 1.41
+++ linux/net/ipv4/sysctl_net_ipv4.c 2005/02/28 15:45:19 1.42
@@ -682,6 +682,14 @@
.mode = 0644,
.proc_handler = &proc_dointvec,
},
+ {
+ .ctl_name = NET_TCP_BIC_BETA,
+ .procname = "tcp_bic_beta",
+ .data = &sysctl_tcp_bic_beta,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
{ .ctl_name = 0 }
};
diff -urN linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
--- linux/net/ipv4/tcp.c 2005/01/25 04:29:03 1.89
+++ linux/net/ipv4/tcp.c 2005/02/28 15:45:19 1.90
@@ -1829,8 +1829,8 @@
tcp_clear_retrans(tp);
tcp_delack_init(tp);
sk->sk_send_head = NULL;
- tp->saw_tstamp = 0;
- tcp_sack_reset(tp);
+ tp->rx_opt.saw_tstamp = 0;
+ tcp_sack_reset(&tp->rx_opt);
__sk_dst_reset(sk);
BUG_TRAP(!inet->num || tp->bind_hash);
@@ -1969,7 +1969,7 @@
err = -EINVAL;
break;
}
- tp->user_mss = val;
+ tp->rx_opt.user_mss = val;
break;
case TCP_NODELAY:
@@ -2119,14 +2119,14 @@
info->tcpi_probes = tp->probes_out;
info->tcpi_backoff = tp->backoff;
- if (tp->tstamp_ok)
+ if (tp->rx_opt.tstamp_ok)
info->tcpi_options |= TCPI_OPT_TIMESTAMPS;
- if (tp->sack_ok)
+ if (tp->rx_opt.sack_ok)
info->tcpi_options |= TCPI_OPT_SACK;
- if (tp->wscale_ok) {
+ if (tp->rx_opt.wscale_ok) {
info->tcpi_options |= TCPI_OPT_WSCALE;
- info->tcpi_snd_wscale = tp->snd_wscale;
- info->tcpi_rcv_wscale = tp->rcv_wscale;
+ info->tcpi_snd_wscale = tp->rx_opt.snd_wscale;
+ info->tcpi_rcv_wscale = tp->rx_opt.rcv_wscale;
}
if (tp->ecn_flags&TCP_ECN_OK)
@@ -2186,7 +2186,7 @@
case TCP_MAXSEG:
val = tp->mss_cache_std;
if (!val && ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN)))
- val = tp->user_mss;
+ val = tp->rx_opt.user_mss;
break;
case TCP_NODELAY:
val = !!(tp->nonagle&TCP_NAGLE_OFF);
diff -urN linux/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
--- linux/net/ipv4/tcp_input.c 2005/02/13 20:16:33 1.89
+++ linux/net/ipv4/tcp_input.c 2005/02/28 15:45:19 1.90
@@ -102,6 +102,7 @@
int sysctl_tcp_bic = 1;
int sysctl_tcp_bic_fast_convergence = 1;
int sysctl_tcp_bic_low_window = 14;
+int sysctl_tcp_bic_beta = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */
#define FLAG_DATA 0x01 /* Incoming frame contained data.
*/
#define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window
update. */
@@ -118,9 +119,9 @@
#define FLAG_CA_ALERT (FLAG_DATA_SACKED|FLAG_ECE)
#define FLAG_FORWARD_PROGRESS (FLAG_ACKED|FLAG_DATA_SACKED)
-#define IsReno(tp) ((tp)->sack_ok == 0)
-#define IsFack(tp) ((tp)->sack_ok & 2)
-#define IsDSack(tp) ((tp)->sack_ok & 4)
+#define IsReno(tp) ((tp)->rx_opt.sack_ok == 0)
+#define IsFack(tp) ((tp)->rx_opt.sack_ok & 2)
+#define IsDSack(tp) ((tp)->rx_opt.sack_ok & 4)
#define TCP_REMNANT (TCP_FLAG_FIN|TCP_FLAG_URG|TCP_FLAG_SYN|TCP_FLAG_PSH)
@@ -204,7 +205,7 @@
static void tcp_fixup_sndbuf(struct sock *sk)
{
- int sndmem = tcp_sk(sk)->mss_clamp + MAX_TCP_HEADER + 16 +
+ int sndmem = tcp_sk(sk)->rx_opt.mss_clamp + MAX_TCP_HEADER + 16 +
sizeof(struct sk_buff);
if (sk->sk_sndbuf < 3 * sndmem)
@@ -439,10 +440,10 @@
static inline void tcp_rcv_rtt_measure_ts(struct tcp_sock *tp, struct sk_buff
*skb)
{
- if (tp->rcv_tsecr &&
+ if (tp->rx_opt.rcv_tsecr &&
(TCP_SKB_CB(skb)->end_seq -
TCP_SKB_CB(skb)->seq >= tp->ack.rcv_mss))
- tcp_rcv_rtt_update(tp, tcp_time_stamp - tp->rcv_tsecr, 0);
+ tcp_rcv_rtt_update(tp, tcp_time_stamp - tp->rx_opt.rcv_tsecr,
0);
}
/*
@@ -832,7 +833,7 @@
}
if (dst_metric(dst, RTAX_REORDERING) &&
tp->reordering != dst_metric(dst, RTAX_REORDERING)) {
- tp->sack_ok &= ~2;
+ tp->rx_opt.sack_ok &= ~2;
tp->reordering = dst_metric(dst, RTAX_REORDERING);
}
@@ -866,7 +867,7 @@
}
tcp_set_rto(tp);
tcp_bound_rto(tp);
- if (tp->rto < TCP_TIMEOUT_INIT && !tp->saw_tstamp)
+ if (tp->rto < TCP_TIMEOUT_INIT && !tp->rx_opt.saw_tstamp)
goto reset;
tp->snd_cwnd = tcp_init_cwnd(tp, dst);
tp->snd_cwnd_stamp = tcp_time_stamp;
@@ -877,7 +878,7 @@
* supported, TCP will fail to recalculate correct
* rtt, if initial rto is too small. FORGET ALL AND RESET!
*/
- if (!tp->saw_tstamp && tp->srtt) {
+ if (!tp->rx_opt.saw_tstamp && tp->srtt) {
tp->srtt = 0;
tp->mdev = tp->mdev_max = tp->rttvar = TCP_TIMEOUT_INIT;
tp->rto = TCP_TIMEOUT_INIT;
@@ -900,14 +901,14 @@
NET_INC_STATS_BH(LINUX_MIB_TCPSACKREORDER);
#if FASTRETRANS_DEBUG > 1
printk(KERN_DEBUG "Disorder%d %d %u f%u s%u rr%d\n",
- tp->sack_ok, tp->ca_state,
+ tp->rx_opt.sack_ok, tp->ca_state,
tp->reordering,
tp->fackets_out,
tp->sacked_out,
tp->undo_marker ? tp->undo_retrans : 0);
#endif
/* Disable FACK yet. */
- tp->sack_ok &= ~2;
+ tp->rx_opt.sack_ok &= ~2;
}
}
@@ -997,13 +998,13 @@
if (before(start_seq, ack)) {
dup_sack = 1;
- tp->sack_ok |= 4;
+ tp->rx_opt.sack_ok |= 4;
NET_INC_STATS_BH(LINUX_MIB_TCPDSACKRECV);
} else if (num_sacks > 1 &&
!after(end_seq, ntohl(sp[1].end_seq)) &&
!before(start_seq, ntohl(sp[1].start_seq))) {
dup_sack = 1;
- tp->sack_ok |= 4;
+ tp->rx_opt.sack_ok |= 4;
NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOFORECV);
}
@@ -1628,8 +1629,8 @@
static inline int tcp_packet_delayed(struct tcp_sock *tp)
{
return !tp->retrans_stamp ||
- (tp->saw_tstamp && tp->rcv_tsecr &&
- (__s32)(tp->rcv_tsecr - tp->retrans_stamp) < 0);
+ (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr &&
+ (__s32)(tp->rx_opt.rcv_tsecr - tp->retrans_stamp) < 0);
}
/* Undo procedures. */
@@ -1977,7 +1978,7 @@
* answer arrives rto becomes 120 seconds! If at least one of segments
* in window is lost... Voila. --ANK (010210)
*/
- seq_rtt = tcp_time_stamp - tp->rcv_tsecr;
+ seq_rtt = tcp_time_stamp - tp->rx_opt.rcv_tsecr;
tcp_rtt_estimator(tp, seq_rtt);
tcp_set_rto(tp);
tp->backoff = 0;
@@ -2008,7 +2009,7 @@
int flag, s32 seq_rtt)
{
/* Note that peer MAY send zero echo. In this case it is ignored.
(rfc1323) */
- if (tp->saw_tstamp && tp->rcv_tsecr)
+ if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr)
tcp_ack_saw_tstamp(tp, flag);
else if (seq_rtt >= 0)
tcp_ack_no_tstamp(tp, seq_rtt, flag);
@@ -2482,7 +2483,7 @@
BUG_TRAP((int)tp->sacked_out >= 0);
BUG_TRAP((int)tp->lost_out >= 0);
BUG_TRAP((int)tp->retrans_out >= 0);
- if (!tp->packets_out && tp->sack_ok) {
+ if (!tp->packets_out && tp->rx_opt.sack_ok) {
if (tp->lost_out) {
printk(KERN_DEBUG "Leak l=%u %d\n",
tp->lost_out, tp->ca_state);
@@ -2558,7 +2559,7 @@
u32 nwin = ntohs(skb->h.th->window);
if (likely(!skb->h.th->syn))
- nwin <<= tp->snd_wscale;
+ nwin <<= tp->rx_opt.snd_wscale;
if (tcp_may_update_window(tp, ack, ack_seq, nwin)) {
flag |= FLAG_WIN_UPDATE;
@@ -2978,14 +2979,14 @@
* But, this can also be called on packets in the established flow when
* the fast version below fails.
*/
-void tcp_parse_options(struct sk_buff *skb, struct tcp_sock *tp, int estab)
+void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received
*opt_rx, int estab)
{
unsigned char *ptr;
struct tcphdr *th = skb->h.th;
int length=(th->doff*4)-sizeof(struct tcphdr);
ptr = (unsigned char *)(th + 1);
- tp->saw_tstamp = 0;
+ opt_rx->saw_tstamp = 0;
while(length>0) {
int opcode=*ptr++;
@@ -3008,41 +3009,41 @@
if(opsize==TCPOLEN_MSS && th->syn &&
!estab) {
u16 in_mss = ntohs(*(__u16
*)ptr);
if (in_mss) {
- if (tp->user_mss &&
tp->user_mss < in_mss)
- in_mss =
tp->user_mss;
- tp->mss_clamp = in_mss;
+ if (opt_rx->user_mss &&
opt_rx->user_mss < in_mss)
+ in_mss =
opt_rx->user_mss;
+ opt_rx->mss_clamp =
in_mss;
}
}
break;
case TCPOPT_WINDOW:
if(opsize==TCPOLEN_WINDOW && th->syn &&
!estab)
if (sysctl_tcp_window_scaling) {
- tp->wscale_ok = 1;
- tp->snd_wscale = *(__u8
*)ptr;
- if(tp->snd_wscale > 14)
{
+ opt_rx->wscale_ok = 1;
+ opt_rx->snd_wscale =
*(__u8 *)ptr;
+ if(opt_rx->snd_wscale >
14) {
if(net_ratelimit())
printk(KERN_INFO "tcp_parse_options: Illegal window "
"scaling value %d >14 received.\n",
-
tp->snd_wscale);
- tp->snd_wscale
= 14;
+
opt_rx->snd_wscale);
+
opt_rx->snd_wscale = 14;
}
}
break;
case TCPOPT_TIMESTAMP:
if(opsize==TCPOLEN_TIMESTAMP) {
- if ((estab && tp->tstamp_ok) ||
+ if ((estab &&
opt_rx->tstamp_ok) ||
(!estab &&
sysctl_tcp_timestamps)) {
- tp->saw_tstamp = 1;
- tp->rcv_tsval =
ntohl(*(__u32 *)ptr);
- tp->rcv_tsecr =
ntohl(*(__u32 *)(ptr+4));
+ opt_rx->saw_tstamp = 1;
+ opt_rx->rcv_tsval =
ntohl(*(__u32 *)ptr);
+ opt_rx->rcv_tsecr =
ntohl(*(__u32 *)(ptr+4));
}
}
break;
case TCPOPT_SACK_PERM:
if(opsize==TCPOLEN_SACK_PERM && th->syn
&& !estab) {
if (sysctl_tcp_sack) {
- tp->sack_ok = 1;
- tcp_sack_reset(tp);
+ opt_rx->sack_ok = 1;
+ tcp_sack_reset(opt_rx);
}
}
break;
@@ -3050,7 +3051,7 @@
case TCPOPT_SACK:
if((opsize >= (TCPOLEN_SACK_BASE +
TCPOLEN_SACK_PERBLOCK)) &&
!((opsize - TCPOLEN_SACK_BASE) %
TCPOLEN_SACK_PERBLOCK) &&
- tp->sack_ok) {
+ opt_rx->sack_ok) {
TCP_SKB_CB(skb)->sacked = (ptr
- 2) - (unsigned char *)th;
}
};
@@ -3067,34 +3068,34 @@
struct tcp_sock *tp)
{
if (th->doff == sizeof(struct tcphdr)>>2) {
- tp->saw_tstamp = 0;
+ tp->rx_opt.saw_tstamp = 0;
return 0;
- } else if (tp->tstamp_ok &&
+ } else if (tp->rx_opt.tstamp_ok &&
th->doff == (sizeof(struct
tcphdr)>>2)+(TCPOLEN_TSTAMP_ALIGNED>>2)) {
__u32 *ptr = (__u32 *)(th + 1);
if (*ptr == ntohl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16)
| (TCPOPT_TIMESTAMP << 8) |
TCPOLEN_TIMESTAMP)) {
- tp->saw_tstamp = 1;
+ tp->rx_opt.saw_tstamp = 1;
++ptr;
- tp->rcv_tsval = ntohl(*ptr);
+ tp->rx_opt.rcv_tsval = ntohl(*ptr);
++ptr;
- tp->rcv_tsecr = ntohl(*ptr);
+ tp->rx_opt.rcv_tsecr = ntohl(*ptr);
return 1;
}
}
- tcp_parse_options(skb, tp, 1);
+ tcp_parse_options(skb, &tp->rx_opt, 1);
return 1;
}
static inline void tcp_store_ts_recent(struct tcp_sock *tp)
{
- tp->ts_recent = tp->rcv_tsval;
- tp->ts_recent_stamp = xtime.tv_sec;
+ tp->rx_opt.ts_recent = tp->rx_opt.rcv_tsval;
+ tp->rx_opt.ts_recent_stamp = xtime.tv_sec;
}
static inline void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq)
{
- if (tp->saw_tstamp && !after(seq, tp->rcv_wup)) {
+ if (tp->rx_opt.saw_tstamp && !after(seq, tp->rcv_wup)) {
/* PAWS bug workaround wrt. ACK frames, the PAWS discard
* extra check below makes sure this can only happen
* for pure ACK frames. -DaveM
@@ -3102,8 +3103,8 @@
* Not only, also it occurs for expired timestamps.
*/
- if((s32)(tp->rcv_tsval - tp->ts_recent) >= 0 ||
- xtime.tv_sec >= tp->ts_recent_stamp + TCP_PAWS_24DAYS)
+ if((s32)(tp->rx_opt.rcv_tsval - tp->rx_opt.ts_recent) >= 0 ||
+ xtime.tv_sec >= tp->rx_opt.ts_recent_stamp + TCP_PAWS_24DAYS)
tcp_store_ts_recent(tp);
}
}
@@ -3144,16 +3145,16 @@
ack == tp->snd_una &&
/* 3. ... and does not update window. */
- !tcp_may_update_window(tp, ack, seq,
ntohs(th->window)<<tp->snd_wscale) &&
+ !tcp_may_update_window(tp, ack, seq, ntohs(th->window) <<
tp->rx_opt.snd_wscale) &&
/* 4. ... and sits in replay window. */
- (s32)(tp->ts_recent - tp->rcv_tsval) <= (tp->rto*1024)/HZ);
+ (s32)(tp->rx_opt.ts_recent - tp->rx_opt.rcv_tsval) <=
(tp->rto*1024)/HZ);
}
static inline int tcp_paws_discard(struct tcp_sock *tp, struct sk_buff *skb)
{
- return ((s32)(tp->ts_recent - tp->rcv_tsval) > TCP_PAWS_WINDOW &&
- xtime.tv_sec < tp->ts_recent_stamp + TCP_PAWS_24DAYS &&
+ return ((s32)(tp->rx_opt.ts_recent - tp->rx_opt.rcv_tsval) >
TCP_PAWS_WINDOW &&
+ xtime.tv_sec < tp->rx_opt.ts_recent_stamp + TCP_PAWS_24DAYS &&
!tcp_disordered_ack(tp, skb));
}
@@ -3266,8 +3267,8 @@
* Probably, we should reset in this case. For now drop them.
*/
__skb_queue_purge(&tp->out_of_order_queue);
- if (tp->sack_ok)
- tcp_sack_reset(tp);
+ if (tp->rx_opt.sack_ok)
+ tcp_sack_reset(&tp->rx_opt);
sk_stream_mem_reclaim(sk);
if (!sock_flag(sk, SOCK_DEAD)) {
@@ -3297,22 +3298,22 @@
static inline void tcp_dsack_set(struct tcp_sock *tp, u32 seq, u32 end_seq)
{
- if (tp->sack_ok && sysctl_tcp_dsack) {
+ if (tp->rx_opt.sack_ok && sysctl_tcp_dsack) {
if (before(seq, tp->rcv_nxt))
NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOLDSENT);
else
NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOFOSENT);
- tp->dsack = 1;
+ tp->rx_opt.dsack = 1;
tp->duplicate_sack[0].start_seq = seq;
tp->duplicate_sack[0].end_seq = end_seq;
- tp->eff_sacks = min(tp->num_sacks+1, 4-tp->tstamp_ok);
+ tp->rx_opt.eff_sacks = min(tp->rx_opt.num_sacks + 1, 4 -
tp->rx_opt.tstamp_ok);
}
}
static inline void tcp_dsack_extend(struct tcp_sock *tp, u32 seq, u32 end_seq)
{
- if (!tp->dsack)
+ if (!tp->rx_opt.dsack)
tcp_dsack_set(tp, seq, end_seq);
else
tcp_sack_extend(tp->duplicate_sack, seq, end_seq);
@@ -3327,7 +3328,7 @@
NET_INC_STATS_BH(LINUX_MIB_DELAYEDACKLOST);
tcp_enter_quickack_mode(tp);
- if (tp->sack_ok && sysctl_tcp_dsack) {
+ if (tp->rx_opt.sack_ok && sysctl_tcp_dsack) {
u32 end_seq = TCP_SKB_CB(skb)->end_seq;
if (after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt))
@@ -3351,16 +3352,16 @@
/* See if the recent change to the first SACK eats into
* or hits the sequence space of other SACK blocks, if so coalesce.
*/
- for (this_sack = 1; this_sack < tp->num_sacks; ) {
+ for (this_sack = 1; this_sack < tp->rx_opt.num_sacks; ) {
if (tcp_sack_extend(sp, swalk->start_seq, swalk->end_seq)) {
int i;
/* Zap SWALK, by moving every further SACK up by one
slot.
* Decrease num_sacks.
*/
- tp->num_sacks--;
- tp->eff_sacks = min(tp->num_sacks+tp->dsack,
4-tp->tstamp_ok);
- for(i=this_sack; i < tp->num_sacks; i++)
+ tp->rx_opt.num_sacks--;
+ tp->rx_opt.eff_sacks = min(tp->rx_opt.num_sacks +
tp->rx_opt.dsack, 4 - tp->rx_opt.tstamp_ok);
+ for(i=this_sack; i < tp->rx_opt.num_sacks; i++)
sp[i] = sp[i+1];
continue;
}
@@ -3385,7 +3386,7 @@
{
struct tcp_sock *tp = tcp_sk(sk);
struct tcp_sack_block *sp = &tp->selective_acks[0];
- int cur_sacks = tp->num_sacks;
+ int cur_sacks = tp->rx_opt.num_sacks;
int this_sack;
if (!cur_sacks)
@@ -3410,7 +3411,7 @@
*/
if (this_sack >= 4) {
this_sack--;
- tp->num_sacks--;
+ tp->rx_opt.num_sacks--;
sp--;
}
for(; this_sack > 0; this_sack--, sp--)
@@ -3420,8 +3421,8 @@
/* Build the new head SACK, and we're done. */
sp->start_seq = seq;
sp->end_seq = end_seq;
- tp->num_sacks++;
- tp->eff_sacks = min(tp->num_sacks + tp->dsack, 4 - tp->tstamp_ok);
+ tp->rx_opt.num_sacks++;
+ tp->rx_opt.eff_sacks = min(tp->rx_opt.num_sacks + tp->rx_opt.dsack, 4 -
tp->rx_opt.tstamp_ok);
}
/* RCV.NXT advances, some SACKs should be eaten. */
@@ -3429,13 +3430,13 @@
static void tcp_sack_remove(struct tcp_sock *tp)
{
struct tcp_sack_block *sp = &tp->selective_acks[0];
- int num_sacks = tp->num_sacks;
+ int num_sacks = tp->rx_opt.num_sacks;
int this_sack;
/* Empty ofo queue, hence, all the SACKs are eaten. Clear. */
if (skb_queue_len(&tp->out_of_order_queue) == 0) {
- tp->num_sacks = 0;
- tp->eff_sacks = tp->dsack;
+ tp->rx_opt.num_sacks = 0;
+ tp->rx_opt.eff_sacks = tp->rx_opt.dsack;
return;
}
@@ -3456,9 +3457,9 @@
this_sack++;
sp++;
}
- if (num_sacks != tp->num_sacks) {
- tp->num_sacks = num_sacks;
- tp->eff_sacks = min(tp->num_sacks+tp->dsack, 4-tp->tstamp_ok);
+ if (num_sacks != tp->rx_opt.num_sacks) {
+ tp->rx_opt.num_sacks = num_sacks;
+ tp->rx_opt.eff_sacks = min(tp->rx_opt.num_sacks +
tp->rx_opt.dsack, 4 - tp->rx_opt.tstamp_ok);
}
}
@@ -3516,10 +3517,10 @@
TCP_ECN_accept_cwr(tp, skb);
- if (tp->dsack) {
- tp->dsack = 0;
- tp->eff_sacks = min_t(unsigned int, tp->num_sacks,
- 4 - tp->tstamp_ok);
+ if (tp->rx_opt.dsack) {
+ tp->rx_opt.dsack = 0;
+ tp->rx_opt.eff_sacks = min_t(unsigned int, tp->rx_opt.num_sacks,
+ 4 - tp->rx_opt.tstamp_ok);
}
/* Queue data for delivery to the user.
@@ -3577,7 +3578,7 @@
tp->ack.pingpong = 0;
}
- if (tp->num_sacks)
+ if (tp->rx_opt.num_sacks)
tcp_sack_remove(tp);
tcp_fast_path_check(sk, tp);
@@ -3644,10 +3645,10 @@
if (!skb_peek(&tp->out_of_order_queue)) {
/* Initial out of order segment, build 1 SACK. */
- if (tp->sack_ok) {
- tp->num_sacks = 1;
- tp->dsack = 0;
- tp->eff_sacks = 1;
+ if (tp->rx_opt.sack_ok) {
+ tp->rx_opt.num_sacks = 1;
+ tp->rx_opt.dsack = 0;
+ tp->rx_opt.eff_sacks = 1;
tp->selective_acks[0].start_seq = TCP_SKB_CB(skb)->seq;
tp->selective_acks[0].end_seq =
TCP_SKB_CB(skb)->end_seq;
@@ -3661,7 +3662,7 @@
if (seq == TCP_SKB_CB(skb1)->end_seq) {
__skb_append(skb1, skb);
- if (!tp->num_sacks ||
+ if (!tp->rx_opt.num_sacks ||
tp->selective_acks[0].end_seq != seq)
goto add_sack;
@@ -3709,7 +3710,7 @@
}
add_sack:
- if (tp->sack_ok)
+ if (tp->rx_opt.sack_ok)
tcp_sack_new_ofo_skb(sk, seq, end_seq);
}
}
@@ -3891,8 +3892,8 @@
* is in a sad state like this, we care only about integrity
* of the connection not performance.
*/
- if (tp->sack_ok)
- tcp_sack_reset(tp);
+ if (tp->rx_opt.sack_ok)
+ tcp_sack_reset(&tp->rx_opt);
sk_stream_mem_reclaim(sk);
}
@@ -3947,7 +3948,7 @@
!(sk->sk_userlocks & SOCK_SNDBUF_LOCK) &&
!tcp_memory_pressure &&
atomic_read(&tcp_memory_allocated) < sysctl_tcp_mem[0]) {
- int sndmem = max_t(u32, tp->mss_clamp, tp->mss_cache_std) +
+ int sndmem = max_t(u32, tp->rx_opt.mss_clamp,
tp->mss_cache_std) +
MAX_TCP_HEADER + 16 + sizeof(struct sk_buff),
demanded = max_t(unsigned int, tp->snd_cwnd,
tp->reordering + 1);
@@ -4214,7 +4215,7 @@
* We do checksum and copy also but from device to kernel.
*/
- tp->saw_tstamp = 0;
+ tp->rx_opt.saw_tstamp = 0;
/* pred_flags is 0xS?10 << 16 + snd_wnd
* if header_predition is to be made
@@ -4243,14 +4244,14 @@
| (TCPOPT_TIMESTAMP << 8) |
TCPOLEN_TIMESTAMP))
goto slow_path;
- tp->saw_tstamp = 1;
+ tp->rx_opt.saw_tstamp = 1;
++ptr;
- tp->rcv_tsval = ntohl(*ptr);
+ tp->rx_opt.rcv_tsval = ntohl(*ptr);
++ptr;
- tp->rcv_tsecr = ntohl(*ptr);
+ tp->rx_opt.rcv_tsecr = ntohl(*ptr);
/* If PAWS failed, check it more carefully in slow path
*/
- if ((s32)(tp->rcv_tsval - tp->ts_recent) < 0)
+ if ((s32)(tp->rx_opt.rcv_tsval - tp->rx_opt.ts_recent)
< 0)
goto slow_path;
/* DO NOT update ts_recent here, if checksum fails
@@ -4376,7 +4377,7 @@
/*
* RFC1323: H1. Apply PAWS check first.
*/
- if (tcp_fast_parse_options(skb, th, tp) && tp->saw_tstamp &&
+ if (tcp_fast_parse_options(skb, th, tp) && tp->rx_opt.saw_tstamp &&
tcp_paws_discard(tp, skb)) {
if (!th->rst) {
NET_INC_STATS_BH(LINUX_MIB_PAWSESTABREJECTED);
@@ -4448,9 +4449,9 @@
struct tcphdr *th, unsigned len)
{
struct tcp_sock *tp = tcp_sk(sk);
- int saved_clamp = tp->mss_clamp;
+ int saved_clamp = tp->rx_opt.mss_clamp;
- tcp_parse_options(skb, tp, 0);
+ tcp_parse_options(skb, &tp->rx_opt, 0);
if (th->ack) {
/* rfc793:
@@ -4467,8 +4468,8 @@
if (TCP_SKB_CB(skb)->ack_seq != tp->snd_nxt)
goto reset_and_undo;
- if (tp->saw_tstamp && tp->rcv_tsecr &&
- !between(tp->rcv_tsecr, tp->retrans_stamp,
+ if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr &&
+ !between(tp->rx_opt.rcv_tsecr, tp->retrans_stamp,
tcp_time_stamp)) {
NET_INC_STATS_BH(LINUX_MIB_PAWSACTIVEREJECTED);
goto reset_and_undo;
@@ -4523,13 +4524,13 @@
tp->snd_wnd = ntohs(th->window);
tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq, TCP_SKB_CB(skb)->seq);
- if (!tp->wscale_ok) {
- tp->snd_wscale = tp->rcv_wscale = 0;
+ if (!tp->rx_opt.wscale_ok) {
+ tp->rx_opt.snd_wscale = tp->rx_opt.rcv_wscale = 0;
tp->window_clamp = min(tp->window_clamp, 65535U);
}
- if (tp->saw_tstamp) {
- tp->tstamp_ok = 1;
+ if (tp->rx_opt.saw_tstamp) {
+ tp->rx_opt.tstamp_ok = 1;
tp->tcp_header_len =
sizeof(struct tcphdr) + TCPOLEN_TSTAMP_ALIGNED;
tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;
@@ -4538,8 +4539,8 @@
tp->tcp_header_len = sizeof(struct tcphdr);
}
- if (tp->sack_ok && sysctl_tcp_fack)
- tp->sack_ok |= 2;
+ if (tp->rx_opt.sack_ok && sysctl_tcp_fack)
+ tp->rx_opt.sack_ok |= 2;
tcp_sync_mss(sk, tp->pmtu_cookie);
tcp_initialize_rcv_mss(sk);
@@ -4566,7 +4567,7 @@
if (sock_flag(sk, SOCK_KEEPOPEN))
tcp_reset_keepalive_timer(sk, keepalive_time_when(tp));
- if (!tp->snd_wscale)
+ if (!tp->rx_opt.snd_wscale)
__tcp_fast_path_on(tp, tp->snd_wnd);
else
tp->pred_flags = 0;
@@ -4613,7 +4614,7 @@
}
/* PAWS check. */
- if (tp->ts_recent_stamp && tp->saw_tstamp && tcp_paws_check(tp, 0))
+ if (tp->rx_opt.ts_recent_stamp && tp->rx_opt.saw_tstamp &&
tcp_paws_check(&tp->rx_opt, 0))
goto discard_and_undo;
if (th->syn) {
@@ -4623,8 +4624,8 @@
*/
tcp_set_state(sk, TCP_SYN_RECV);
- if (tp->saw_tstamp) {
- tp->tstamp_ok = 1;
+ if (tp->rx_opt.saw_tstamp) {
+ tp->rx_opt.tstamp_ok = 1;
tcp_store_ts_recent(tp);
tp->tcp_header_len =
sizeof(struct tcphdr) + TCPOLEN_TSTAMP_ALIGNED;
@@ -4671,13 +4672,13 @@
*/
discard_and_undo:
- tcp_clear_options(tp);
- tp->mss_clamp = saved_clamp;
+ tcp_clear_options(&tp->rx_opt);
+ tp->rx_opt.mss_clamp = saved_clamp;
goto discard;
reset_and_undo:
- tcp_clear_options(tp);
- tp->mss_clamp = saved_clamp;
+ tcp_clear_options(&tp->rx_opt);
+ tp->rx_opt.mss_clamp = saved_clamp;
return 1;
}
@@ -4695,7 +4696,7 @@
struct tcp_sock *tp = tcp_sk(sk);
int queued = 0;
- tp->saw_tstamp = 0;
+ tp->rx_opt.saw_tstamp = 0;
switch (sk->sk_state) {
case TCP_CLOSE:
@@ -4750,7 +4751,7 @@
return 0;
}
- if (tcp_fast_parse_options(skb, th, tp) && tp->saw_tstamp &&
+ if (tcp_fast_parse_options(skb, th, tp) && tp->rx_opt.saw_tstamp &&
tcp_paws_discard(tp, skb)) {
if (!th->rst) {
NET_INC_STATS_BH(LINUX_MIB_PAWSESTABREJECTED);
@@ -4810,7 +4811,7 @@
tp->snd_una = TCP_SKB_CB(skb)->ack_seq;
tp->snd_wnd = ntohs(th->window) <<
- tp->snd_wscale;
+ tp->rx_opt.snd_wscale;
tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq,
TCP_SKB_CB(skb)->seq);
@@ -4818,11 +4819,11 @@
* and does not calculate rtt.
* Fix it at least with timestamps.
*/
- if (tp->saw_tstamp && tp->rcv_tsecr &&
+ if (tp->rx_opt.saw_tstamp &&
tp->rx_opt.rcv_tsecr &&
!tp->srtt)
tcp_ack_saw_tstamp(tp, 0);
- if (tp->tstamp_ok)
+ if (tp->rx_opt.tstamp_ok)
tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;
/* Make sure socket is routed, for
diff -urN linux/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
--- linux/net/ipv4/tcp_ipv4.c 2005/01/13 14:07:03 1.98
+++ linux/net/ipv4/tcp_ipv4.c 2005/02/28 15:45:19 1.99
@@ -591,8 +591,8 @@
if ((tp->write_seq =
tw->tw_snd_nxt + 65535 + 2) ==
0)
tp->write_seq = 1;
- tp->ts_recent = tw->tw_ts_recent;
- tp->ts_recent_stamp = tw->tw_ts_recent_stamp;
+ tp->rx_opt.ts_recent = tw->tw_ts_recent;
+ tp->rx_opt.ts_recent_stamp =
tw->tw_ts_recent_stamp;
sock_hold(sk2);
goto unique;
} else
@@ -783,25 +783,25 @@
inet->saddr = rt->rt_src;
inet->rcv_saddr = inet->saddr;
- if (tp->ts_recent_stamp && inet->daddr != daddr) {
+ if (tp->rx_opt.ts_recent_stamp && inet->daddr != daddr) {
/* Reset inherited state */
- tp->ts_recent = 0;
- tp->ts_recent_stamp = 0;
- tp->write_seq = 0;
+ tp->rx_opt.ts_recent = 0;
+ tp->rx_opt.ts_recent_stamp = 0;
+ tp->write_seq = 0;
}
if (sysctl_tcp_tw_recycle &&
- !tp->ts_recent_stamp && rt->rt_dst == daddr) {
+ !tp->rx_opt.ts_recent_stamp && rt->rt_dst == daddr) {
struct inet_peer *peer = rt_get_peer(rt);
/* VJ's idea. We save last timestamp seen from
* the destination in peer table, when entering state TIME-WAIT
- * and initialize ts_recent from it, when trying new connection.
+ * and initialize rx_opt.ts_recent from it, when trying new
connection.
*/
if (peer && peer->tcp_ts_stamp + TCP_PAWS_MSL >= xtime.tv_sec) {
- tp->ts_recent_stamp = peer->tcp_ts_stamp;
- tp->ts_recent = peer->tcp_ts;
+ tp->rx_opt.ts_recent_stamp = peer->tcp_ts_stamp;
+ tp->rx_opt.ts_recent = peer->tcp_ts;
}
}
@@ -812,7 +812,7 @@
if (inet->opt)
tp->ext_header_len = inet->opt->optlen;
- tp->mss_clamp = 536;
+ tp->rx_opt.mss_clamp = 536;
/* Socket identity is still unknown (sport may be zero).
* However we set state to SYN-SENT and not releasing socket
@@ -1393,7 +1393,7 @@
int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
{
- struct tcp_sock tp;
+ struct tcp_options_received tmp_opt;
struct open_request *req;
__u32 saddr = skb->nh.iph->saddr;
__u32 daddr = skb->nh.iph->daddr;
@@ -1435,29 +1435,29 @@
if (!req)
goto drop;
- tcp_clear_options(&tp);
- tp.mss_clamp = 536;
- tp.user_mss = tcp_sk(sk)->user_mss;
+ tcp_clear_options(&tmp_opt);
+ tmp_opt.mss_clamp = 536;
+ tmp_opt.user_mss = tcp_sk(sk)->rx_opt.user_mss;
- tcp_parse_options(skb, &tp, 0);
+ tcp_parse_options(skb, &tmp_opt, 0);
if (want_cookie) {
- tcp_clear_options(&tp);
- tp.saw_tstamp = 0;
+ tcp_clear_options(&tmp_opt);
+ tmp_opt.saw_tstamp = 0;
}
- if (tp.saw_tstamp && !tp.rcv_tsval) {
+ if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval) {
/* Some OSes (unknown ones, but I see them on web server, which
* contains information interesting only for windows'
* users) do not send their stamp in SYN. It is easy case.
* We simply do not advertise TS support.
*/
- tp.saw_tstamp = 0;
- tp.tstamp_ok = 0;
+ tmp_opt.saw_tstamp = 0;
+ tmp_opt.tstamp_ok = 0;
}
- tp.tstamp_ok = tp.saw_tstamp;
+ tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;
- tcp_openreq_init(req, &tp, skb);
+ tcp_openreq_init(req, &tmp_opt, skb);
req->af.v4_req.loc_addr = daddr;
req->af.v4_req.rmt_addr = saddr;
@@ -1483,7 +1483,7 @@
* timewait bucket, so that all the necessary checks
* are made in the function processing timewait state.
*/
- if (tp.saw_tstamp &&
+ if (tmp_opt.saw_tstamp &&
sysctl_tcp_tw_recycle &&
(dst = tcp_v4_route_req(sk, req)) != NULL &&
(peer = rt_get_peer((struct rtable *)dst)) != NULL &&
@@ -1987,11 +1987,11 @@
}
if (peer) {
- if ((s32)(peer->tcp_ts - tp->ts_recent) <= 0 ||
+ if ((s32)(peer->tcp_ts - tp->rx_opt.ts_recent) <= 0 ||
(peer->tcp_ts_stamp + TCP_PAWS_MSL < xtime.tv_sec &&
- peer->tcp_ts_stamp <= tp->ts_recent_stamp)) {
- peer->tcp_ts_stamp = tp->ts_recent_stamp;
- peer->tcp_ts = tp->ts_recent;
+ peer->tcp_ts_stamp <= tp->rx_opt.ts_recent_stamp)) {
+ peer->tcp_ts_stamp = tp->rx_opt.ts_recent_stamp;
+ peer->tcp_ts = tp->rx_opt.ts_recent;
}
if (release_it)
inet_putpeer(peer);
diff -urN linux/net/ipv4/tcp_minisocks.c linux/net/ipv4/tcp_minisocks.c
--- linux/net/ipv4/tcp_minisocks.c 2005/01/25 04:29:04 1.40
+++ linux/net/ipv4/tcp_minisocks.c 2005/02/28 15:45:19 1.41
@@ -125,17 +125,17 @@
tcp_timewait_state_process(struct tcp_tw_bucket *tw, struct sk_buff *skb,
struct tcphdr *th, unsigned len)
{
- struct tcp_sock tp;
+ struct tcp_options_received tmp_opt;
int paws_reject = 0;
- tp.saw_tstamp = 0;
+ tmp_opt.saw_tstamp = 0;
if (th->doff > (sizeof(struct tcphdr) >> 2) && tw->tw_ts_recent_stamp) {
- tcp_parse_options(skb, &tp, 0);
+ tcp_parse_options(skb, &tmp_opt, 0);
- if (tp.saw_tstamp) {
- tp.ts_recent = tw->tw_ts_recent;
- tp.ts_recent_stamp = tw->tw_ts_recent_stamp;
- paws_reject = tcp_paws_check(&tp, th->rst);
+ if (tmp_opt.saw_tstamp) {
+ tmp_opt.ts_recent = tw->tw_ts_recent;
+ tmp_opt.ts_recent_stamp = tw->tw_ts_recent_stamp;
+ paws_reject = tcp_paws_check(&tmp_opt, th->rst);
}
}
@@ -176,9 +176,9 @@
/* FIN arrived, enter true time-wait state. */
tw->tw_substate = TCP_TIME_WAIT;
tw->tw_rcv_nxt = TCP_SKB_CB(skb)->end_seq;
- if (tp.saw_tstamp) {
+ if (tmp_opt.saw_tstamp) {
tw->tw_ts_recent_stamp = xtime.tv_sec;
- tw->tw_ts_recent = tp.rcv_tsval;
+ tw->tw_ts_recent = tmp_opt.rcv_tsval;
}
/* I am shamed, but failed to make it more elegant.
@@ -231,8 +231,8 @@
}
tcp_tw_schedule(tw, TCP_TIMEWAIT_LEN);
- if (tp.saw_tstamp) {
- tw->tw_ts_recent = tp.rcv_tsval;
+ if (tmp_opt.saw_tstamp) {
+ tw->tw_ts_recent = tmp_opt.rcv_tsval;
tw->tw_ts_recent_stamp = xtime.tv_sec;
}
@@ -259,7 +259,7 @@
if (th->syn && !th->rst && !th->ack && !paws_reject &&
(after(TCP_SKB_CB(skb)->seq, tw->tw_rcv_nxt) ||
- (tp.saw_tstamp && (s32)(tw->tw_ts_recent - tp.rcv_tsval) < 0))) {
+ (tmp_opt.saw_tstamp && (s32)(tw->tw_ts_recent - tmp_opt.rcv_tsval)
< 0))) {
u32 isn = tw->tw_snd_nxt + 65535 + 2;
if (isn == 0)
isn++;
@@ -332,7 +332,7 @@
struct tcp_sock *tp = tcp_sk(sk);
int recycle_ok = 0;
- if (sysctl_tcp_tw_recycle && tp->ts_recent_stamp)
+ if (sysctl_tcp_tw_recycle && tp->rx_opt.ts_recent_stamp)
recycle_ok = tp->af_specific->remember_stamp(sk);
if (tcp_tw_count < sysctl_tcp_max_tw_buckets)
@@ -353,15 +353,15 @@
tw->tw_dport = inet->dport;
tw->tw_family = sk->sk_family;
tw->tw_reuse = sk->sk_reuse;
- tw->tw_rcv_wscale = tp->rcv_wscale;
+ tw->tw_rcv_wscale = tp->rx_opt.rcv_wscale;
atomic_set(&tw->tw_refcnt, 1);
tw->tw_hashent = sk->sk_hashent;
tw->tw_rcv_nxt = tp->rcv_nxt;
tw->tw_snd_nxt = tp->snd_nxt;
tw->tw_rcv_wnd = tcp_receive_window(tp);
- tw->tw_ts_recent = tp->ts_recent;
- tw->tw_ts_recent_stamp = tp->ts_recent_stamp;
+ tw->tw_ts_recent = tp->rx_opt.ts_recent;
+ tw->tw_ts_recent_stamp = tp->rx_opt.ts_recent_stamp;
tw_dead_node_init(tw);
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -780,13 +780,13 @@
newtp->pushed_seq = newtp->write_seq;
newtp->copied_seq = req->rcv_isn + 1;
- newtp->saw_tstamp = 0;
+ newtp->rx_opt.saw_tstamp = 0;
- newtp->dsack = 0;
- newtp->eff_sacks = 0;
+ newtp->rx_opt.dsack = 0;
+ newtp->rx_opt.eff_sacks = 0;
newtp->probes_out = 0;
- newtp->num_sacks = 0;
+ newtp->rx_opt.num_sacks = 0;
newtp->urg_data = 0;
newtp->listen_opt = NULL;
newtp->accept_queue = newtp->accept_queue_tail = NULL;
@@ -809,36 +809,36 @@
newsk->sk_sleep = NULL;
newsk->sk_owner = NULL;
- newtp->tstamp_ok = req->tstamp_ok;
- if((newtp->sack_ok = req->sack_ok) != 0) {
+ newtp->rx_opt.tstamp_ok = req->tstamp_ok;
+ if((newtp->rx_opt.sack_ok = req->sack_ok) != 0) {
if (sysctl_tcp_fack)
- newtp->sack_ok |= 2;
+ newtp->rx_opt.sack_ok |= 2;
}
newtp->window_clamp = req->window_clamp;
newtp->rcv_ssthresh = req->rcv_wnd;
newtp->rcv_wnd = req->rcv_wnd;
- newtp->wscale_ok = req->wscale_ok;
- if (newtp->wscale_ok) {
- newtp->snd_wscale = req->snd_wscale;
- newtp->rcv_wscale = req->rcv_wscale;
+ newtp->rx_opt.wscale_ok = req->wscale_ok;
+ if (newtp->rx_opt.wscale_ok) {
+ newtp->rx_opt.snd_wscale = req->snd_wscale;
+ newtp->rx_opt.rcv_wscale = req->rcv_wscale;
} else {
- newtp->snd_wscale = newtp->rcv_wscale = 0;
+ newtp->rx_opt.snd_wscale = newtp->rx_opt.rcv_wscale = 0;
newtp->window_clamp = min(newtp->window_clamp, 65535U);
}
- newtp->snd_wnd = ntohs(skb->h.th->window) << newtp->snd_wscale;
+ newtp->snd_wnd = ntohs(skb->h.th->window) <<
newtp->rx_opt.snd_wscale;
newtp->max_window = newtp->snd_wnd;
- if (newtp->tstamp_ok) {
- newtp->ts_recent = req->ts_recent;
- newtp->ts_recent_stamp = xtime.tv_sec;
+ if (newtp->rx_opt.tstamp_ok) {
+ newtp->rx_opt.ts_recent = req->ts_recent;
+ newtp->rx_opt.ts_recent_stamp = xtime.tv_sec;
newtp->tcp_header_len = sizeof(struct tcphdr) +
TCPOLEN_TSTAMP_ALIGNED;
} else {
- newtp->ts_recent_stamp = 0;
+ newtp->rx_opt.ts_recent_stamp = 0;
newtp->tcp_header_len = sizeof(struct tcphdr);
}
if (skb->len >= TCP_MIN_RCVMSS+newtp->tcp_header_len)
newtp->ack.last_seg_size =
skb->len-newtp->tcp_header_len;
- newtp->mss_clamp = req->mss;
+ newtp->rx_opt.mss_clamp = req->mss;
TCP_ECN_openreq_child(newtp, req);
if (newtp->ecn_flags&TCP_ECN_OK)
newsk->sk_no_largesend = 1;
@@ -863,21 +863,21 @@
struct tcp_sock *tp = tcp_sk(sk);
u32 flg = tcp_flag_word(th) & (TCP_FLAG_RST|TCP_FLAG_SYN|TCP_FLAG_ACK);
int paws_reject = 0;
- struct tcp_sock ttp;
+ struct tcp_options_received tmp_opt;
struct sock *child;
- ttp.saw_tstamp = 0;
+ tmp_opt.saw_tstamp = 0;
if (th->doff > (sizeof(struct tcphdr)>>2)) {
- tcp_parse_options(skb, &ttp, 0);
+ tcp_parse_options(skb, &tmp_opt, 0);
- if (ttp.saw_tstamp) {
- ttp.ts_recent = req->ts_recent;
+ if (tmp_opt.saw_tstamp) {
+ tmp_opt.ts_recent = req->ts_recent;
/* We do not store true stamp, but it is not required,
* it can be estimated (approximately)
* from another data.
*/
- ttp.ts_recent_stamp = xtime.tv_sec -
((TCP_TIMEOUT_INIT/HZ)<<req->retrans);
- paws_reject = tcp_paws_check(&ttp, th->rst);
+ tmp_opt.ts_recent_stamp = xtime.tv_sec -
((TCP_TIMEOUT_INIT/HZ)<<req->retrans);
+ paws_reject = tcp_paws_check(&tmp_opt, th->rst);
}
}
@@ -982,63 +982,63 @@
/* In sequence, PAWS is OK. */
- if (ttp.saw_tstamp && !after(TCP_SKB_CB(skb)->seq, req->rcv_isn+1))
- req->ts_recent = ttp.rcv_tsval;
+ if (tmp_opt.saw_tstamp && !after(TCP_SKB_CB(skb)->seq, req->rcv_isn+1))
+ req->ts_recent = tmp_opt.rcv_tsval;
- if (TCP_SKB_CB(skb)->seq == req->rcv_isn) {
- /* Truncate SYN, it is out of window starting
- at req->rcv_isn+1. */
- flg &= ~TCP_FLAG_SYN;
- }
+ if (TCP_SKB_CB(skb)->seq == req->rcv_isn) {
+ /* Truncate SYN, it is out of window starting
+ at req->rcv_isn+1. */
+ flg &= ~TCP_FLAG_SYN;
+ }
- /* RFC793: "second check the RST bit" and
- * "fourth, check the SYN bit"
- */
- if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN))
- goto embryonic_reset;
+ /* RFC793: "second check the RST bit" and
+ * "fourth, check the SYN bit"
+ */
+ if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN))
+ goto embryonic_reset;
- /* ACK sequence verified above, just make sure ACK is
- * set. If ACK not set, just silently drop the packet.
- */
- if (!(flg & TCP_FLAG_ACK))
- return NULL;
+ /* ACK sequence verified above, just make sure ACK is
+ * set. If ACK not set, just silently drop the packet.
+ */
+ if (!(flg & TCP_FLAG_ACK))
+ return NULL;
- /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */
- if (tp->defer_accept && TCP_SKB_CB(skb)->end_seq == req->rcv_isn+1) {
- req->acked = 1;
- return NULL;
- }
+ /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */
+ if (tp->defer_accept && TCP_SKB_CB(skb)->end_seq ==
req->rcv_isn+1) {
+ req->acked = 1;
+ return NULL;
+ }
- /* OK, ACK is valid, create big socket and
- * feed this segment to it. It will repeat all
- * the tests. THIS SEGMENT MUST MOVE SOCKET TO
- * ESTABLISHED STATE. If it will be dropped after
- * socket is created, wait for troubles.
- */
- child = tp->af_specific->syn_recv_sock(sk, skb, req, NULL);
- if (child == NULL)
- goto listen_overflow;
-
- sk_set_owner(child, sk->sk_owner);
- tcp_synq_unlink(tp, req, prev);
- tcp_synq_removed(sk, req);
-
- tcp_acceptq_queue(sk, req, child);
- return child;
-
-listen_overflow:
- if (!sysctl_tcp_abort_on_overflow) {
- req->acked = 1;
- return NULL;
- }
+ /* OK, ACK is valid, create big socket and
+ * feed this segment to it. It will repeat all
+ * the tests. THIS SEGMENT MUST MOVE SOCKET TO
+ * ESTABLISHED STATE. If it will be dropped after
+ * socket is created, wait for troubles.
+ */
+ child = tp->af_specific->syn_recv_sock(sk, skb, req, NULL);
+ if (child == NULL)
+ goto listen_overflow;
+
+ sk_set_owner(child, sk->sk_owner);
+ tcp_synq_unlink(tp, req, prev);
+ tcp_synq_removed(sk, req);
+
+ tcp_acceptq_queue(sk, req, child);
+ return child;
+
+ listen_overflow:
+ if (!sysctl_tcp_abort_on_overflow) {
+ req->acked = 1;
+ return NULL;
+ }
-embryonic_reset:
- NET_INC_STATS_BH(LINUX_MIB_EMBRYONICRSTS);
- if (!(flg & TCP_FLAG_RST))
- req->class->send_reset(skb);
+ embryonic_reset:
+ NET_INC_STATS_BH(LINUX_MIB_EMBRYONICRSTS);
+ if (!(flg & TCP_FLAG_RST))
+ req->class->send_reset(skb);
- tcp_synq_drop(sk, req, prev);
- return NULL;
+ tcp_synq_drop(sk, req, prev);
+ return NULL;
}
/*
diff -urN linux/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
--- linux/net/ipv4/tcp_output.c 2005/02/13 20:16:33 1.66
+++ linux/net/ipv4/tcp_output.c 2005/02/28 15:45:19 1.67
@@ -236,13 +236,13 @@
/* Make sure we do not exceed the maximum possible
* scaled window.
*/
- if (!tp->rcv_wscale)
+ if (!tp->rx_opt.rcv_wscale)
new_win = min(new_win, MAX_TCP_WINDOW);
else
- new_win = min(new_win, (65535U << tp->rcv_wscale));
+ new_win = min(new_win, (65535U << tp->rx_opt.rcv_wscale));
/* RFC1323 scaling applied */
- new_win >>= tp->rcv_wscale;
+ new_win >>= tp->rx_opt.rcv_wscale;
/* If we advertise zero window, disable fast path. */
if (new_win == 0)
@@ -296,12 +296,12 @@
if(!(sysctl_flags & SYSCTL_FLAG_TSTAMPS))
tcp_header_size +=
TCPOLEN_SACKPERM_ALIGNED;
}
- } else if (tp->eff_sacks) {
+ } else if (tp->rx_opt.eff_sacks) {
/* A SACK is 2 pad bytes, a 2 byte header, plus
* 2 32-bit sequence numbers for each SACK block.
*/
tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED +
- (tp->eff_sacks *
TCPOLEN_SACK_PERBLOCK));
+ (tp->rx_opt.eff_sacks *
TCPOLEN_SACK_PERBLOCK));
}
/*
@@ -349,9 +349,9 @@
(sysctl_flags &
SYSCTL_FLAG_TSTAMPS),
(sysctl_flags & SYSCTL_FLAG_SACK),
(sysctl_flags &
SYSCTL_FLAG_WSCALE),
- tp->rcv_wscale,
+ tp->rx_opt.rcv_wscale,
tcb->when,
- tp->ts_recent);
+ tp->rx_opt.ts_recent);
} else {
tcp_build_and_update_options((__u32 *)(th + 1),
tp, tcb->when);
@@ -607,10 +607,10 @@
/* This function synchronize snd mss to current pmtu/exthdr set.
- tp->user_mss is mss set by user by TCP_MAXSEG. It does NOT counts
+ tp->rx_opt.user_mss is mss set by user by TCP_MAXSEG. It does NOT counts
for TCP options, but includes only bare TCP header.
- tp->mss_clamp is mss negotiated at connection setup.
+ tp->rx_opt.mss_clamp is mss negotiated at connection setup.
It is minumum of user_mss and mss received with SYN.
It also does not include TCP options.
@@ -619,7 +619,7 @@
tp->mss_cache is current effective sending mss, including
all tcp options except for SACKs. It is evaluated,
taking into account current pmtu, but never exceeds
- tp->mss_clamp.
+ tp->rx_opt.mss_clamp.
NOTE1. rfc1122 clearly states that advertised MSS
DOES NOT include either tcp or ip options.
@@ -643,8 +643,8 @@
mss_now = pmtu - tp->af_specific->net_header_len - sizeof(struct
tcphdr);
/* Clamp it (mss_clamp does not include tcp options) */
- if (mss_now > tp->mss_clamp)
- mss_now = tp->mss_clamp;
+ if (mss_now > tp->rx_opt.mss_clamp)
+ mss_now = tp->rx_opt.mss_clamp;
/* Now subtract optional transport overhead */
mss_now -= tp->ext_header_len + tp->ext2_header_len;
@@ -723,9 +723,9 @@
mss_now = tp->mss_cache;
}
- if (tp->eff_sacks)
+ if (tp->rx_opt.eff_sacks)
mss_now -= (TCPOLEN_SACK_BASE_ALIGNED +
- (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK));
+ (tp->rx_opt.eff_sacks * TCPOLEN_SACK_PERBLOCK));
return mss_now;
}
@@ -875,16 +875,16 @@
* scaled window will not line up with the MSS boundary anyway.
*/
window = tp->rcv_wnd;
- if (tp->rcv_wscale) {
+ if (tp->rx_opt.rcv_wscale) {
window = free_space;
/* Advertise enough space so that it won't get scaled away.
* Import case: prevent zero window announcement if
* 1<<rcv_wscale > mss.
*/
- if (((window >> tp->rcv_wscale) << tp->rcv_wscale) != window)
- window = (((window >> tp->rcv_wscale) + 1)
- << tp->rcv_wscale);
+ if (((window >> tp->rx_opt.rcv_wscale) <<
tp->rx_opt.rcv_wscale) != window)
+ window = (((window >> tp->rx_opt.rcv_wscale) + 1)
+ << tp->rx_opt.rcv_wscale);
} else {
/* Get the largest window that is a nice multiple of mss.
* Window clamp already applied above.
@@ -962,7 +962,7 @@
tp->left_out -= tcp_skb_pcount(next_skb);
}
/* Reno case is special. Sigh... */
- if (!tp->sack_ok && tp->sacked_out) {
+ if (!tp->rx_opt.sack_ok && tp->sacked_out) {
tcp_dec_pcount_approx(&tp->sacked_out, next_skb);
tp->left_out -= tcp_skb_pcount(next_skb);
}
@@ -1200,7 +1200,7 @@
return;
/* No forward retransmissions in Reno are possible. */
- if (!tp->sack_ok)
+ if (!tp->rx_opt.sack_ok)
return;
/* Yeah, we have to make difficult choice between forward transmission
@@ -1439,8 +1439,8 @@
(sysctl_tcp_timestamps ? TCPOLEN_TSTAMP_ALIGNED : 0);
/* If user gave his TCP_MAXSEG, record it to clamp */
- if (tp->user_mss)
- tp->mss_clamp = tp->user_mss;
+ if (tp->rx_opt.user_mss)
+ tp->rx_opt.mss_clamp = tp->rx_opt.user_mss;
tp->max_window = 0;
tcp_sync_mss(sk, dst_pmtu(dst));
@@ -1451,11 +1451,11 @@
tcp_ca_init(tp);
tcp_select_initial_window(tcp_full_space(sk),
- tp->advmss - (tp->ts_recent_stamp ?
tp->tcp_header_len - sizeof(struct tcphdr) : 0),
+ tp->advmss - (tp->rx_opt.ts_recent_stamp ?
tp->tcp_header_len - sizeof(struct tcphdr) : 0),
&tp->rcv_wnd,
&tp->window_clamp,
sysctl_tcp_window_scaling,
- &tp->rcv_wscale);
+ &tp->rx_opt.rcv_wscale);
tp->rcv_ssthresh = tp->rcv_wnd;
diff -urN linux/net/ipv4/tcp_timer.c linux/net/ipv4/tcp_timer.c
--- linux/net/ipv4/tcp_timer.c 2005/01/25 04:29:04 1.50
+++ linux/net/ipv4/tcp_timer.c 2005/02/28 15:45:19 1.51
@@ -353,7 +353,7 @@
if (tp->retransmits == 0) {
if (tp->ca_state == TCP_CA_Disorder || tp->ca_state ==
TCP_CA_Recovery) {
- if (tp->sack_ok) {
+ if (tp->rx_opt.sack_ok) {
if (tp->ca_state == TCP_CA_Recovery)
NET_INC_STATS_BH(LINUX_MIB_TCPSACKRECOVERYFAIL);
else
diff -urN linux/net/ipv6/route.c linux/net/ipv6/route.c
--- linux/net/ipv6/route.c 2005/01/25 04:29:05 1.67
+++ linux/net/ipv6/route.c 2005/02/28 15:45:19 1.68
@@ -84,7 +84,8 @@
static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32
cookie);
static struct dst_entry *ip6_negative_advice(struct dst_entry *);
static void ip6_dst_destroy(struct dst_entry *);
-static void ip6_dst_ifdown(struct dst_entry *, int how);
+static void ip6_dst_ifdown(struct dst_entry *,
+ struct net_device *dev, int how);
static int ip6_dst_gc(void);
static int ip6_pkt_discard(struct sk_buff *skb);
@@ -153,12 +154,13 @@
}
}
-static void ip6_dst_ifdown(struct dst_entry *dst, int how)
+static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
+ int how)
{
struct rt6_info *rt = (struct rt6_info *)dst;
struct inet6_dev *idev = rt->rt6i_idev;
- if (idev != NULL && idev->dev != &loopback_dev) {
+ if (dev != &loopback_dev && idev != NULL && idev->dev == dev) {
struct inet6_dev *loopback_idev = in6_dev_get(&loopback_dev);
if (loopback_idev != NULL) {
rt->rt6i_idev = loopback_idev;
diff -urN linux/net/ipv6/tcp_ipv6.c linux/net/ipv6/tcp_ipv6.c
--- linux/net/ipv6/tcp_ipv6.c 2005/01/13 14:07:05 1.84
+++ linux/net/ipv6/tcp_ipv6.c 2005/02/28 15:45:19 1.85
@@ -473,8 +473,8 @@
tp->write_seq = tw->tw_snd_nxt + 65535 + 2;
if (!tp->write_seq)
tp->write_seq = 1;
- tp->ts_recent = tw->tw_ts_recent;
- tp->ts_recent_stamp = tw->tw_ts_recent_stamp;
+ tp->rx_opt.ts_recent = tw->tw_ts_recent;
+ tp->rx_opt.ts_recent_stamp =
tw->tw_ts_recent_stamp;
sock_hold(sk2);
goto unique;
} else
@@ -609,10 +609,10 @@
return -EINVAL;
}
- if (tp->ts_recent_stamp &&
+ if (tp->rx_opt.ts_recent_stamp &&
!ipv6_addr_equal(&np->daddr, &usin->sin6_addr)) {
- tp->ts_recent = 0;
- tp->ts_recent_stamp = 0;
+ tp->rx_opt.ts_recent = 0;
+ tp->rx_opt.ts_recent_stamp = 0;
tp->write_seq = 0;
}
@@ -703,7 +703,7 @@
tp->ext_header_len = np->opt->opt_flen + np->opt->opt_nflen;
tp->ext2_header_len = dst->header_len;
- tp->mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - sizeof(struct
ipv6hdr);
+ tp->rx_opt.mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) -
sizeof(struct ipv6hdr);
inet->dport = usin->sin6_port;
@@ -1202,7 +1202,8 @@
static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
{
struct ipv6_pinfo *np = inet6_sk(sk);
- struct tcp_sock tmptp, *tp = tcp_sk(sk);
+ struct tcp_options_received tmp_opt;
+ struct tcp_sock *tp = tcp_sk(sk);
struct open_request *req = NULL;
__u32 isn = TCP_SKB_CB(skb)->when;
@@ -1228,14 +1229,14 @@
if (req == NULL)
goto drop;
- tcp_clear_options(&tmptp);
- tmptp.mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - sizeof(struct
ipv6hdr);
- tmptp.user_mss = tp->user_mss;
+ tcp_clear_options(&tmp_opt);
+ tmp_opt.mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) -
sizeof(struct ipv6hdr);
+ tmp_opt.user_mss = tp->rx_opt.user_mss;
- tcp_parse_options(skb, &tmptp, 0);
+ tcp_parse_options(skb, &tmp_opt, 0);
- tmptp.tstamp_ok = tmptp.saw_tstamp;
- tcp_openreq_init(req, &tmptp, skb);
+ tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;
+ tcp_openreq_init(req, &tmp_opt, skb);
req->class = &or_ipv6;
ipv6_addr_copy(&req->af.v6_req.rmt_addr, &skb->nh.ipv6h->saddr);
diff -urN linux/net/ipv6/udp.c linux/net/ipv6/udp.c
--- linux/net/ipv6/udp.c 2005/01/25 04:29:05 1.72
+++ linux/net/ipv6/udp.c 2005/02/28 15:45:19 1.73
@@ -219,6 +219,7 @@
int noblock, int flags, int *addr_len)
{
struct ipv6_pinfo *np = inet6_sk(sk);
+ struct inet_sock *inet = inet_sk(sk);
struct sk_buff *skb;
size_t copied;
int err;
@@ -268,21 +269,22 @@
sin6->sin6_flowinfo = 0;
sin6->sin6_scope_id = 0;
- if (skb->protocol == htons(ETH_P_IP)) {
- struct inet_sock *inet = inet_sk(sk);
-
+ if (skb->protocol == htons(ETH_P_IP))
ipv6_addr_set(&sin6->sin6_addr, 0, 0,
htonl(0xffff), skb->nh.iph->saddr);
- if (inet->cmsg_flags)
- ip_cmsg_recv(msg, skb);
- } else {
+ else {
ipv6_addr_copy(&sin6->sin6_addr, &skb->nh.ipv6h->saddr);
-
- if (np->rxopt.all)
- datagram_recv_ctl(sk, msg, skb);
if (ipv6_addr_type(&sin6->sin6_addr) &
IPV6_ADDR_LINKLOCAL)
sin6->sin6_scope_id = IP6CB(skb)->iif;
}
+
+ }
+ if (skb->protocol == htons(ETH_P_IP)) {
+ if (inet->cmsg_flags)
+ ip_cmsg_recv(msg, skb);
+ } else {
+ if (np->rxopt.all)
+ datagram_recv_ctl(sk, msg, skb);
}
err = copied;
diff -urN linux/net/xfrm/xfrm_policy.c linux/net/xfrm/xfrm_policy.c
--- linux/net/xfrm/xfrm_policy.c 2005/02/13 20:16:34 1.23
+++ linux/net/xfrm/xfrm_policy.c 2005/02/28 15:45:19 1.24
@@ -1043,6 +1043,19 @@
dst->xfrm = NULL;
}
+static void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
+ int unregister)
+{
+ if (!unregister)
+ return;
+
+ while ((dst = dst->child) && dst->xfrm && dst->dev == dev) {
+ dst->dev = &loopback_dev;
+ dev_hold(&loopback_dev);
+ dev_put(dev);
+ }
+}
+
static void xfrm_link_failure(struct sk_buff *skb)
{
/* Impossible. Such dst must be popped before reaches point of failure.
*/
@@ -1166,6 +1179,8 @@
dst_ops->check = xfrm_dst_check;
if (likely(dst_ops->destroy == NULL))
dst_ops->destroy = xfrm_dst_destroy;
+ if (likely(dst_ops->ifdown == NULL))
+ dst_ops->ifdown = xfrm_dst_ifdown;
if (likely(dst_ops->negative_advice == NULL))
dst_ops->negative_advice = xfrm_negative_advice;
if (likely(dst_ops->link_failure == NULL))
@@ -1198,6 +1213,7 @@
dst_ops->kmem_cachep = NULL;
dst_ops->check = NULL;
dst_ops->destroy = NULL;
+ dst_ops->ifdown = NULL;
dst_ops->negative_advice = NULL;
dst_ops->link_failure = NULL;
dst_ops->get_mss = NULL;
|