]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Pull sony into release branch
authorLen Brown <len.brown@intel.com>
Sun, 29 Apr 2007 03:09:57 +0000 (23:09 -0400)
committerLen Brown <len.brown@intel.com>
Sun, 29 Apr 2007 03:09:57 +0000 (23:09 -0400)
199 files changed:
.mailmap
Documentation/ABI/obsolete/dv1394 [new file with mode: 0644]
Documentation/feature-removal-schedule.txt
Documentation/gpio.txt
Documentation/networking/ip-sysctl.txt
Documentation/x86_64/boot-options.txt
MAINTAINERS
Makefile
arch/alpha/kernel/core_mcpcia.c
arch/alpha/kernel/err_titan.c
arch/alpha/kernel/module.c
arch/alpha/kernel/sys_nautilus.c
arch/alpha/kernel/sys_noritake.c
arch/alpha/kernel/sys_rawhide.c
arch/alpha/kernel/sys_sio.c
arch/alpha/kernel/sys_sx164.c
arch/alpha/kernel/sys_titan.c
arch/arm/configs/s3c2410_defconfig
arch/arm/tools/mach-types
arch/i386/kernel/alternative.c
arch/i386/kernel/cpu/cpufreq/longhaul.c
arch/i386/kernel/nmi.c
arch/i386/kernel/vmi.c
arch/i386/kernel/vmlinux.lds.S
arch/ia64/kernel/msi_ia64.c
arch/ia64/kernel/setup.c
arch/ia64/sn/kernel/bte_error.c
arch/ia64/sn/pci/pcibr/pcibr_dma.c
arch/mips/kernel/r2300_switch.S
arch/mips/kernel/r4k_switch.S
arch/mips/kernel/signal-common.h
arch/mips/kernel/signal.c
arch/mips/kernel/signal32.c
arch/mips/kernel/traps.c
arch/mips/oprofile/op_model_mipsxx.c
arch/mips/sibyte/sb1250/setup.c
arch/powerpc/platforms/52xx/mpc52xx_pic.c
arch/ppc/8xx_io/commproc.c
arch/ppc/configs/ads8272_defconfig
arch/ppc/platforms/mpc8272ads_setup.c
arch/ppc/platforms/mpc866ads_setup.c
arch/ppc/platforms/mpc885ads_setup.c
arch/sparc/kernel/pcic.c
arch/sparc/kernel/sys_sunos.c
arch/sparc64/kernel/pci.c
arch/sparc64/kernel/pci_iommu.c
arch/sparc64/kernel/sbus.c
arch/sparc64/kernel/sys32.S
arch/sparc64/kernel/sys_sunos32.c
arch/sparc64/kernel/systbls.S
arch/sparc64/solaris/misc.c
arch/x86_64/kernel/functionlist
arch/x86_64/kernel/hpet.c
arch/x86_64/kernel/k8.c
arch/x86_64/kernel/nmi.c
arch/x86_64/kernel/pci-gart.c
arch/x86_64/kernel/vmlinux.lds.S
arch/x86_64/mm/pageattr.c
block/cfq-iosched.c
drivers/acpi/thermal.c
drivers/ata/pata_sis.c
drivers/base/power/main.c
drivers/block/cciss.c
drivers/block/paride/pcd.c
drivers/block/paride/pf.c
drivers/block/pktcdvd.c
drivers/char/agp/intel-agp.c
drivers/char/mem.c
drivers/char/mxser.c
drivers/char/mxser_new.c
drivers/hid/hid-core.c
drivers/hwmon/w83627ehf.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/i2c-pasemi.c
drivers/ide/Kconfig
drivers/ide/ide-cd.c
drivers/ide/ide-io.c
drivers/ide/ide-iops.c
drivers/ide/ide.c
drivers/ide/pci/delkin_cb.c
drivers/ide/pci/hpt366.c
drivers/ieee1394/Kconfig
drivers/ieee1394/dv1394.c
drivers/infiniband/hw/cxgb3/iwch_cm.c
drivers/infiniband/hw/mthca/mthca_mr.c
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/iser/iscsi_iser.h
drivers/infiniband/ulp/iser/iser_verbs.c
drivers/input/touchscreen/ucb1400_ts.c
drivers/kvm/mmu.c
drivers/macintosh/smu.c
drivers/md/bitmap.c
drivers/media/dvb/dvb-usb/dvb-usb-remote.c
drivers/misc/asus-laptop.c
drivers/net/Kconfig
drivers/net/bnx2.c
drivers/net/bnx2.h
drivers/net/cxgb3/common.h
drivers/net/cxgb3/cxgb3_defs.h
drivers/net/cxgb3/cxgb3_main.c
drivers/net/cxgb3/cxgb3_offload.c
drivers/net/cxgb3/regs.h
drivers/net/cxgb3/t3_hw.c
drivers/net/cxgb3/xgmac.c
drivers/net/depca.c
drivers/net/e1000/e1000_main.c
drivers/net/hamradio/baycom_ser_fdx.c
drivers/net/myri10ge/myri10ge.c
drivers/net/ppp_async.c
drivers/net/sc92031.c
drivers/net/sis900.c
drivers/net/skge.c
drivers/net/sky2.c
drivers/net/sky2.h
drivers/net/spider_net.c
drivers/net/sunhme.c
drivers/net/sunlance.c
drivers/net/sunqe.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/bcm43xx/bcm43xx_phy.c
drivers/net/wireless/zd1211rw/zd_chip.c
drivers/net/wireless/zd1211rw/zd_chip.h
drivers/net/wireless/zd1211rw/zd_rf_al2230.c
drivers/net/wireless/zd1211rw/zd_usb.c
drivers/parport/parport_sunbpp.c
drivers/pci/probe.c
drivers/sbus/char/openprom.c
drivers/sbus/char/vfc_dev.c
drivers/scsi/3w-xxxx.c
drivers/scsi/qlogicpti.c
drivers/serial/8250.c
drivers/serial/icom.c
drivers/serial/icom.h
drivers/spi/spi_s3c24xx.c
drivers/usb/host/ehci-hcd.c
drivers/usb/net/pegasus.c
drivers/usb/net/pegasus.h
drivers/usb/storage/unusual_devs.h
drivers/video/Kconfig
fs/9p/vfs_inode.c
fs/autofs4/root.c
fs/exec.c
fs/nfs/dir.c
fs/nfs/direct.c
fs/nfs/inode.c
fs/nfs/write.c
fs/reiserfs/item_ops.c
fs/reiserfs/xattr.c
fs/ufs/inode.c
include/asm-alpha/compiler.h
include/asm-alpha/core_mcpcia.h
include/asm-alpha/io.h
include/asm-ia64/sn/pcibr_provider.h
include/asm-mips/bug.h
include/asm-mips/checksum.h
include/asm-mips/fpu.h
include/asm-mips/sibyte/sb1250_scd.h
include/asm-mips/thread_info.h
include/asm-powerpc/systbl.h
include/linux/ide.h
include/linux/io.h
include/linux/ipv6.h
include/linux/nfs_page.h
include/linux/plist.h
include/linux/skbuff.h
include/linux/sysctl.h
include/linux/taskstats.h
kernel/params.c
kernel/sysctl.c
mm/migrate.c
mm/nommu.c
mm/oom_kill.c
net/8021q/vlan_dev.c
net/bridge/br_stp_if.c
net/core/neighbour.c
net/core/netpoll.c
net/core/pktgen.c
net/core/skbuff.c
net/ipv4/fib_frontend.c
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ipt_CLUSTERIP.c
net/ipv4/netfilter/ipt_ULOG.c
net/ipv4/tcp_cong.c
net/ipv4/tcp_output.c
net/ipv4/xfrm4_mode_beet.c
net/ipv6/addrconf.c
net/ipv6/exthdrs.c
net/ipv6/route.c
net/irda/af_irda.c
net/key/af_key.c
net/netlink/af_netlink.c
net/sched/cls_tcindex.c
net/sctp/socket.c
net/sctp/ulpqueue.c
net/sunrpc/clnt.c
net/sunrpc/svcauth_unix.c
net/sunrpc/svcsock.c
net/sunrpc/xprt.c
net/xfrm/xfrm_user.c

index bf62dbea88e613d8a22a6f9977289b4eb2eb968b..ebf9bf84da0aab5ed944264a5db2a65fe3a3e883 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -67,6 +67,8 @@ Koushik <raghavendra.koushik@neterion.com>
 Leonid I Ananiev <leonid.i.ananiev@intel.com>
 Linas Vepstas <linas@austin.ibm.com>
 Matthieu CASTET <castet.matthieu@free.fr>
+Michael Buesch <mb@bu3sch.de>
+Michael Buesch <mbuesch@freenet.de>
 Michel Dänzer <michel@tungstengraphics.com>
 Mitesh shah <mshah@teja.com>
 Morten Welinder <terra@gnome.org>
diff --git a/Documentation/ABI/obsolete/dv1394 b/Documentation/ABI/obsolete/dv1394
new file mode 100644 (file)
index 0000000..2ee3686
--- /dev/null
@@ -0,0 +1,9 @@
+What:          dv1394 (a.k.a. "OHCI-DV I/O support" for FireWire)
+Contact:       linux1394-devel@lists.sourceforge.net
+Description:
+       New application development should use raw1394 + userspace libraries
+       instead, notably libiec61883 which is functionally equivalent.
+
+Users:
+       ffmpeg/libavformat (used by a variety of media players)
+       dvgrab v1.x (replaced by dvgrab2 on top of raw1394 and resp. libraries)
index 0bc8b0b2e103421cc7062e01d642b91cd0dc3abd..19b4c96b2a495a3f0f1bf3a152bab0095eba8700 100644 (file)
@@ -39,17 +39,6 @@ Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
 
 ---------------------------
 
-What:  dv1394 driver (CONFIG_IEEE1394_DV1394)
-When:  June 2007
-Why:   Replaced by raw1394 + userspace libraries, notably libiec61883.  This
-       shift of application support has been indicated on www.linux1394.org
-       and developers' mailinglists for quite some time.  Major applications
-       have been converted, with the exception of ffmpeg and hence xine.
-       Piped output of dvgrab2 is a partial equivalent to dv1394.
-Who:   Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
-
----------------------------
-
 What:  Video4Linux API 1 ioctls and video_decoder.h from Video devices.
 When:  December 2006
 Why:   V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6
index 989f1130f4f33e6960459b971b41862b10713a2d..f8528db967fa758ad3afbfcc5f5fed4d170d1b7f 100644 (file)
@@ -27,7 +27,7 @@ The exact capabilities of GPIOs vary between systems.  Common options:
   - Output values are writable (high=1, low=0).  Some chips also have
     options about how that value is driven, so that for example only one
     value might be driven ... supporting "wire-OR" and similar schemes
-    for the other value.
+    for the other value (notably, "open drain" signaling).
 
   - Input values are likewise readable (1, 0).  Some chips support readback
     of pins configured as "output", which is very useful in such "wire-OR"
@@ -247,6 +247,35 @@ with gpio_get_value(), for example to initialize or update driver state
 when the IRQ is edge-triggered.
 
 
+Emulating Open Drain Signals
+----------------------------
+Sometimes shared signals need to use "open drain" signaling, where only the
+low signal level is actually driven.  (That term applies to CMOS transistors;
+"open collector" is used for TTL.)  A pullup resistor causes the high signal
+level.  This is sometimes called a "wire-AND"; or more practically, from the
+negative logic (low=true) perspective this is a "wire-OR".
+
+One common example of an open drain signal is a shared active-low IRQ line.
+Also, bidirectional data bus signals sometimes use open drain signals.
+
+Some GPIO controllers directly support open drain outputs; many don't.  When
+you need open drain signaling but your hardware doesn't directly support it,
+there's a common idiom you can use to emulate it with any GPIO pin that can
+be used as either an input or an output:
+
+ LOW:  gpio_direction_output(gpio, 0) ... this drives the signal
+       and overrides the pullup.
+
+ HIGH: gpio_direction_input(gpio) ... this turns off the output,
+       so the pullup (or some other device) controls the signal.
+
+If you are "driving" the signal high but gpio_get_value(gpio) reports a low
+value (after the appropriate rise time passes), you know some other component
+is driving the shared signal low.  That's not necessarily an error.  As one
+common example, that's how I2C clocks are stretched:  a slave that needs a
+slower clock delays the rising edge of SCK, and the I2C master adjusts its
+signaling rate accordingly.
+
 
 What do these conventions omit?
 ===============================
index d3aae1f9b4c1970f5d119be92e54549d19640be3..702d1d8dd04a1261b598a0370095df1cbfc0899e 100644 (file)
@@ -851,6 +851,15 @@ accept_redirects - BOOLEAN
        Functional default: enabled if local forwarding is disabled.
                            disabled if local forwarding is enabled.
 
+accept_source_route - INTEGER
+       Accept source routing (routing extension header).
+
+       > 0: Accept routing header.
+       = 0: Accept only routing header type 2.
+       < 0: Do not accept routing header.
+
+       Default: 0
+
 autoconf - BOOLEAN
        Autoconfigure addresses using Prefix Information in Router 
        Advertisements.
index 625a21db0c2a7e8f1825bf1cacc18b7131a37a82..85f51e5a749ff5a4367f65792350563fe6e84da8 100644 (file)
@@ -293,7 +293,3 @@ Debugging
                        stuck (default)
 
 Miscellaneous
-
-  noreplacement  Don't replace instructions with more appropriate ones
-                for the CPU. This may be useful on asymmetric MP systems
-                where some CPUs have less capabilities than others.
index 829407ff41f1a068194b1fc5f01f67d821df3465..277877a34ef620f4a43614018e4cd2f89b74d921 100644 (file)
@@ -1318,7 +1318,7 @@ S:        Maintained
 ETHERNET BRIDGE
 P:     Stephen Hemminger
 M:     shemminger@linux-foundation.org
-L:     bridge@lists.osdl.org
+L:     bridge@lists.linux-foundation.org
 W:     http://bridge.sourceforge.net/
 S:     Maintained
 
@@ -1355,6 +1355,11 @@ M:       kevin.curtis@farsite.co.uk
 W:     http://www.farsite.co.uk/
 S:     Supported
 
+FAULT INJECTION SUPPORT
+P:     Akinobu Mita
+M:     akinobu.mita@gmail.com
+S:     Supported
+
 FRAMEBUFFER LAYER
 P:     Antonino Daplas
 M:     adaplas@gmail.com
@@ -1404,7 +1409,7 @@ M:        hch@infradead.org
 W:     ftp://ftp.openlinux.org/pub/people/hch/vxfs
 S:     Maintained
 
-FUJITSU FR-V PORT
+FUJITSU FR-V (FRV) PORT
 P:     David Howells
 M:     dhowells@redhat.com
 S:     Maintained
@@ -1690,7 +1695,7 @@ S:        Maintained
 
 IEEE 1394 SUBSYSTEM
 P:     Ben Collins
-M:     bcollins@debian.org
+M:     ben.collins@ubuntu.com
 P:     Stefan Richter
 M:     stefanr@s5r6.in-berlin.de
 L:     linux1394-devel@lists.sourceforge.net
@@ -1698,25 +1703,11 @@ W:      http://www.linux1394.org/
 T:     git kernel.org:/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
 S:     Maintained
 
-IEEE 1394 IPV4 DRIVER (eth1394)
-P:     Stefan Richter
-M:     stefanr@s5r6.in-berlin.de
-L:     linux1394-devel@lists.sourceforge.net
-S:     Odd Fixes
-
-IEEE 1394 PCILYNX DRIVER
-P:     Jody McIntyre
-M:     scjody@modernduck.com
-P:     Stefan Richter
-M:     stefanr@s5r6.in-berlin.de
-L:     linux1394-devel@lists.sourceforge.net
-S:     Odd Fixes
-
-IEEE 1394 RAW I/O DRIVER
-P:     Ben Collins
-M:     bcollins@debian.org
+IEEE 1394 RAW I/O DRIVER (raw1394)
 P:     Dan Dennedy
 M:     dan@dennedy.org
+P:     Stefan Richter
+M:     stefanr@s5r6.in-berlin.de
 L:     linux1394-devel@lists.sourceforge.net
 S:     Maintained
 
@@ -1951,7 +1942,7 @@ P:        Vivek Goyal
 M:     vgoyal@in.ibm.com
 P:     Haren Myneni
 M:     hbabu@us.ibm.com
-L:     fastboot@lists.osdl.org
+L:     fastboot@lists.linux-foundation.org
 L:     linux-kernel@vger.kernel.org
 W:     http://lse.sourceforge.net/kdump/
 S:     Maintained
@@ -1978,7 +1969,7 @@ S:        Maintained
 
 KERNEL JANITORS
 P:     Several
-L:     kernel-janitors@lists.osdl.org
+L:     kernel-janitors@lists.linux-foundation.org
 W:     http://www.kerneljanitors.org/
 S:     Maintained
 
@@ -2001,7 +1992,7 @@ P:        Eric Biederman
 M:     ebiederm@xmission.com
 W:     http://www.xmission.com/~ebiederm/files/kexec/
 L:     linux-kernel@vger.kernel.org
-L:     fastboot@lists.osdl.org
+L:     fastboot@lists.linux-foundation.org
 S:     Maintained
 
 KPROBES
@@ -2339,7 +2330,7 @@ S:        Maintained
 NETEM NETWORK EMULATOR
 P:     Stephen Hemminger
 M:     shemminger@linux-foundation.org
-L:     netem@lists.osdl.org
+L:     netem@lists.linux-foundation.org
 S:     Maintained
 
 NETFILTER/IPTABLES/IPCHAINS
@@ -3068,7 +3059,7 @@ S:        Supported
 SOFTWARE SUSPEND:
 P:     Pavel Machek
 M:     pavel@suse.cz
-L:     linux-pm@lists.osdl.org
+L:     linux-pm@lists.linux-foundation.org
 S:     Maintained
 
 SONIC NETWORK DRIVER
index 6486af1ae69c6096a29169870273322a1da66f27..d970cb16545ac5adfffbe2b9446afec556803825 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 21
-EXTRAVERSION = -rc6
+EXTRAVERSION =
 NAME = Nocturnal Monster Puppy
 
 # *DOCUMENTATION*
index 8d019071190a4bf45ecd42397a0afc38ee2be45f..381fec0af52e35a6262586059ccdacbcfd863148 100644 (file)
@@ -40,8 +40,6 @@
 # define DBG_CFG(args)
 #endif
 
-#define MCPCIA_MAX_HOSES 4
-
 /*
  * Given a bus, device, and function number, compute resulting
  * configuration space address and setup the MCPCIA_HAXR2 register
index febe71c6869fae5b8f7baea4751611c026d596c4..543d96d7fa2b6f32d1629812fc269e149e1677f4 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/smp.h>
 #include <asm/err_common.h>
 #include <asm/err_ev6.h>
+#include <asm/irq_regs.h>
 
 #include "err_impl.h"
 #include "proto.h"
index aac6d4b22f7a23dd81a2f954fb380778708a0cf9..bd03dc94c72bfb458a5428c3eac584562bda50c3 100644 (file)
@@ -285,12 +285,12 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
                reloc_overflow:
                        if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION)
                          printk(KERN_ERR
-                                "module %s: Relocation overflow vs section %d\n",
-                                me->name, sym->st_shndx);
+                                "module %s: Relocation (type %lu) overflow vs section %d\n",
+                                me->name, r_type, sym->st_shndx);
                        else
                          printk(KERN_ERR
-                                "module %s: Relocation overflow vs %s\n",
-                                me->name, strtab + sym->st_name);
+                                "module %s: Relocation (type %lu) overflow vs %s\n",
+                                me->name, r_type, strtab + sym->st_name);
                        return -ENOEXEC;
                }
        }
index e7594a7cf5850830c0d5b75ccece2e0914a842bd..920196bcbb6168fb4227a745aec38923051ad201 100644 (file)
@@ -70,6 +70,12 @@ nautilus_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
        /* Preserve the IRQ set up by the console.  */
 
        u8 irq;
+       /* UP1500: AGP INTA is actually routed to IRQ 5, not IRQ 10 as
+          console reports. Check the device id of AGP bridge to distinguish
+          UP1500 from UP1000/1100. Note: 'pin' is 2 due to bridge swizzle. */
+       if (slot == 1 && pin == 2 &&
+           dev->bus->self && dev->bus->self->device == 0x700f)
+               return 5;
        pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
        return irq;
 }
index de6ba3432e8ad191a0c7d13cf4b8dc6435489930..eb2a1d63f484e6ff4ff283bd2152493fa87d2d40 100644 (file)
@@ -66,6 +66,13 @@ noritake_startup_irq(unsigned int irq)
        return 0;
 }
 
+static void
+noritake_end_irq(unsigned int irq)
+{
+        if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+                noritake_enable_irq(irq);
+}
+
 static struct hw_interrupt_type noritake_irq_type = {
        .typename       = "NORITAKE",
        .startup        = noritake_startup_irq,
@@ -73,7 +80,7 @@ static struct hw_interrupt_type noritake_irq_type = {
        .enable         = noritake_enable_irq,
        .disable        = noritake_disable_irq,
        .ack            = noritake_disable_irq,
-       .end            = noritake_enable_irq,
+       .end            = noritake_end_irq,
 };
 
 static void 
index 581d08c70b9234302cb65126756659a2d8b25839..672cb2df53dfc7e6b53814701f181d346ebf9599 100644 (file)
@@ -52,6 +52,9 @@ rawhide_update_irq_hw(int hose, int mask)
        *(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose));
 }
 
+#define hose_exists(h) \
+  (((h) < MCPCIA_MAX_HOSES) && (cached_irq_masks[(h)] != 0))
+
 static inline void 
 rawhide_enable_irq(unsigned int irq)
 {
@@ -59,6 +62,9 @@ rawhide_enable_irq(unsigned int irq)
 
        irq -= 16;
        hose = irq / 24;
+       if (!hose_exists(hose)) /* if hose non-existent, exit */
+               return;
+
        irq -= hose * 24;
        mask = 1 << irq;
 
@@ -76,6 +82,9 @@ rawhide_disable_irq(unsigned int irq)
 
        irq -= 16;
        hose = irq / 24;
+       if (!hose_exists(hose)) /* if hose non-existent, exit */
+               return;
+
        irq -= hose * 24;
        mask = ~(1 << irq) | hose_irq_masks[hose];
 
@@ -93,6 +102,9 @@ rawhide_mask_and_ack_irq(unsigned int irq)
 
        irq -= 16;
        hose = irq / 24;
+       if (!hose_exists(hose)) /* if hose non-existent, exit */
+               return;
+
        irq -= hose * 24;
        mask1 = 1 << irq;
        mask = ~mask1 | hose_irq_masks[hose];
@@ -169,6 +181,9 @@ rawhide_init_irq(void)
 
        mcpcia_init_hoses();
 
+       /* Clear them all; only hoses that exist will be non-zero. */
+       for (i = 0; i < MCPCIA_MAX_HOSES; i++) cached_irq_masks[i] = 0;
+
        for (hose = hose_head; hose; hose = hose->next) {
                unsigned int h = hose->index;
                unsigned int mask = hose_irq_masks[h];
index a654014d202a251a9e01b63d8919bdd3c1a63c2f..14b5a753aba50ec40bb9a31e38e9824b9beee5a5 100644 (file)
@@ -84,12 +84,16 @@ alphabook1_init_arch(void)
 static void __init
 sio_pci_route(void)
 {
-#if defined(ALPHA_RESTORE_SRM_SETUP)
-       /* First, read and save the original setting. */
+       unsigned int orig_route_tab;
+
+       /* First, ALWAYS read and print the original setting. */
        pci_bus_read_config_dword(pci_isa_hose->bus, PCI_DEVFN(7, 0), 0x60,
-                                 &saved_config.orig_route_tab);
+                                 &orig_route_tab);
        printk("%s: PIRQ original 0x%x new 0x%x\n", __FUNCTION__,
-              saved_config.orig_route_tab, alpha_mv.sys.sio.route_tab);
+              orig_route_tab, alpha_mv.sys.sio.route_tab);
+
+#if defined(ALPHA_RESTORE_SRM_SETUP)
+       saved_config.orig_route_tab = orig_route_tab;
 #endif
 
        /* Now override with desired setting. */
@@ -334,7 +338,7 @@ struct alpha_machine_vector avanti_mv __initmv = {
        .pci_swizzle            = common_swizzle,
 
        .sys = { .sio = {
-               .route_tab      = 0x0b0a0e0f,
+               .route_tab      = 0x0b0a050f, /* leave 14 for IDE, 9 for SND */
        }}
 };
 ALIAS_MV(avanti)
index 94ad68b7c0ae70e3e6ab0ef80f062ca661498950..41d4ad4c7c444b292dd485206fa92bee5d1267e8 100644 (file)
@@ -132,7 +132,7 @@ sx164_init_arch(void)
 
        if (amask(AMASK_MAX) != 0
            && alpha_using_srm
-           && (cpu->pal_revision & 0xffff) == 0x117) {
+           && (cpu->pal_revision & 0xffff) <= 0x117) {
                __asm__ __volatile__(
                "lda    $16,8($31)\n"
                "call_pal 9\n"          /* Allow PALRES insns in kernel mode */
index 29ab7db81c30983cc113fcf5c51bea39375749f9..f009b7bc094310da51ff2f154df86911e01d24cc 100644 (file)
@@ -257,8 +257,7 @@ titan_dispatch_irqs(u64 mask)
         */
        while (mask) {
                /* convert to SRM vector... priority is <63> -> <0> */
-               __asm__("ctlz %1, %0" : "=r"(vector) : "r"(mask));
-               vector = 63 - vector;
+               vector = 63 - __kernel_ctlz(mask);
                mask &= ~(1UL << vector);       /* clear it out          */
                vector = 0x900 + (vector << 4); /* convert to SRM vector */
                
index d4ca0f06be5f53eca5ef1c52a241c71ff9b36658..a850da377a295065ea4e15c9d06dcb7cb7377fcf 100644 (file)
@@ -1,10 +1,11 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.21-rc1
-# Wed Feb 21 16:48:01 2007
+# Linux kernel version: 2.6.21-rc6
+# Mon Apr  9 10:12:58 2007
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
 # CONFIG_GENERIC_TIME is not set
 CONFIG_MMU=y
 CONFIG_NO_IOPORT=y
@@ -45,6 +46,7 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_IKCONFIG is not set
 CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
@@ -531,7 +533,6 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
-CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 CONFIG_ATA_OVER_ETH=m
 
@@ -560,7 +561,6 @@ CONFIG_IDE_GENERIC=y
 CONFIG_BLK_DEV_IDE_BAST=y
 # CONFIG_IDE_CHIPSETS is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
-# CONFIG_IDEDMA_AUTO is not set
 # CONFIG_BLK_DEV_HD is not set
 
 #
@@ -941,6 +941,7 @@ CONFIG_LEDS_CLASS=m
 # LED drivers
 #
 CONFIG_LEDS_S3C24XX=m
+CONFIG_LEDS_H1940=m
 
 #
 # LED Triggers
@@ -1125,6 +1126,7 @@ CONFIG_USB_MON=y
 # CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_LD is not set
 # CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -1169,7 +1171,6 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_DS1672 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_PCF8563 is not set
-# CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_RS5C348 is not set
 # CONFIG_RTC_DRV_RS5C372 is not set
 CONFIG_RTC_DRV_S3C=y
index bd78058b717852637dbbc2df88981138fbb5de09..b1142ce4ac47f4ebf929c710fca0b477d2514796 100644 (file)
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Tue Jan 16 16:52:56 2007
+# Last update: Mon Apr 16 21:01:04 2007
 #
 # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
 #
@@ -1190,13 +1190,12 @@ g500                    MACH_G500               G500                    1178
 bug                    MACH_BUG                BUG                     1179
 mx33ads                        MACH_MX33ADS            MX33ADS                 1180
 chub                   MACH_CHUB               CHUB                    1181
-gta01                  MACH_GTA01              GTA01                   1182
+neo1973_gta01          MACH_NEO1973_GTA01      NEO1973_GTA01           1182
 w90n740                        MACH_W90N740            W90N740                 1183
 medallion_sa2410       MACH_MEDALLION_SA2410   MEDALLION_SA2410        1184
 ia_cpu_9200_2          MACH_IA_CPU_9200_2      IA_CPU_9200_2           1185
 dimmrm9200             MACH_DIMMRM9200         DIMMRM9200              1186
 pm9261                 MACH_PM9261             PM9261                  1187
-mx21                   MACH_MX21               MX21                    1188
 ml7304                 MACH_ML7304             ML7304                  1189
 ucp250                 MACH_UCP250             UCP250                  1190
 intboard               MACH_INTBOARD           INTBOARD                1191
@@ -1242,3 +1241,97 @@ xscale_treo680           MACH_XSCALE_TREO680     XSCALE_TREO680          1230
 tecon_tmezon           MACH_TECON_TMEZON       TECON_TMEZON            1231
 zylonite               MACH_ZYLONITE           ZYLONITE                1233
 gene1270               MACH_GENE1270           GENE1270                1234
+zir2412                        MACH_ZIR2412            ZIR2412                 1235
+mx31lite               MACH_MX31LITE           MX31LITE                1236
+t700wx                 MACH_T700WX             T700WX                  1237
+vf100                  MACH_VF100              VF100                   1238
+nsb2                   MACH_NSB2               NSB2                    1239
+nxhmi_bb               MACH_NXHMI_BB           NXHMI_BB                1240
+nxhmi_re               MACH_NXHMI_RE           NXHMI_RE                1241
+n4100pro               MACH_N4100PRO           N4100PRO                1242
+sam9260                        MACH_SAM9260            SAM9260                 1243
+omap_treo600           MACH_OMAP_TREO600       OMAP_TREO600            1244
+indy2410               MACH_INDY2410           INDY2410                1245
+nelt_a                 MACH_NELT_A             NELT_A                  1246
+n311                   MACH_N311               N311                    1248
+at91sam9260vgk         MACH_AT91SAM9260VGK     AT91SAM9260VGK          1249
+at91leppe              MACH_AT91LEPPE          AT91LEPPE               1250
+at91lepccn             MACH_AT91LEPCCN         AT91LEPCCN              1251
+apc7100                        MACH_APC7100            APC7100                 1252
+stargazer              MACH_STARGAZER          STARGAZER               1253
+sonata                 MACH_SONATA             SONATA                  1254
+schmoogie              MACH_SCHMOOGIE          SCHMOOGIE               1255
+aztool                 MACH_AZTOOL             AZTOOL                  1256
+mioa701                        MACH_MIOA701            MIOA701                 1257
+sxni9260               MACH_SXNI9260           SXNI9260                1258
+mxc27520evb            MACH_MXC27520EVB        MXC27520EVB             1259
+armadillo5x0           MACH_ARMADILLO5X0       ARMADILLO5X0            1260
+mb9260                 MACH_MB9260             MB9260                  1261
+mb9263                 MACH_MB9263             MB9263                  1262
+ipac9302               MACH_IPAC9302           IPAC9302                1263
+cc9p9360js             MACH_CC9P9360JS         CC9P9360JS              1264
+gallium                        MACH_GALLIUM            GALLIUM                 1265
+msc2410                        MACH_MSC2410            MSC2410                 1266
+ghi270                 MACH_GHI270             GHI270                  1267
+davinci_leonardo       MACH_DAVINCI_LEONARDO   DAVINCI_LEONARDO        1268
+oiab                   MACH_OIAB               OIAB                    1269
+smdk6400               MACH_SMDK6400           SMDK6400                1270
+nokia_n800             MACH_NOKIA_N800         NOKIA_N800              1271
+greenphone             MACH_GREENPHONE         GREENPHONE              1272
+compex42x              MACH_COMPEXWP18         COMPEXWP18              1273
+xmate                  MACH_XMATE              XMATE                   1274
+energizer              MACH_ENERGIZER          ENERGIZER               1275
+ime1                   MACH_IME1               IME1                    1276
+sweda_tms              MACH_SWEDATMS           SWEDATMS                1277
+ntnp435c               MACH_NTNP435C           NTNP435C                1278
+spectro2               MACH_SPECTRO2           SPECTRO2                1279
+h6039                  MACH_H6039              H6039                   1280
+ep80219                        MACH_EP80219            EP80219                 1281
+samoa_ii               MACH_SAMOA_II           SAMOA_II                1282
+cwmxl                  MACH_CWMXL              CWMXL                   1283
+as9200                 MACH_AS9200             AS9200                  1284
+sfx1149                        MACH_SFX1149            SFX1149                 1285
+navi010                        MACH_NAVI010            NAVI010                 1286
+multmdp                        MACH_MULTMDP            MULTMDP                 1287
+scb9520                        MACH_SCB9520            SCB9520                 1288
+htcathena              MACH_HTCATHENA          HTCATHENA               1289
+xp179                  MACH_XP179              XP179                   1290
+h4300                  MACH_H4300              H4300                   1291
+goramo_mlr             MACH_GORAMO_MLR         GORAMO_MLR              1292
+mxc30020evb            MACH_MXC30020EVB        MXC30020EVB             1293
+adsbitsymx             MACH_ADSBITSIMX         ADSBITSIMX              1294
+adsportalplus          MACH_ADSPORTALPLUS      ADSPORTALPLUS           1295
+mmsp2plus              MACH_MMSP2PLUS          MMSP2PLUS               1296
+em_x270                        MACH_EM_X270            EM_X270                 1297
+tpp302                 MACH_TPP302             TPP302                  1298
+tpp104                 MACH_TPM104             TPM104                  1299
+tpm102                 MACH_TPM102             TPM102                  1300
+tpm109                 MACH_TPM109             TPM109                  1301
+fbxo1                  MACH_FBXO1              FBXO1                   1302
+hxd8                   MACH_HXD8               HXD8                    1303
+neo1973_gta02          MACH_NEO1973_GTA02      NEO1973_GTA02           1304
+emtest                 MACH_EMTEST             EMTEST                  1305
+ad6900                 MACH_AD6900             AD6900                  1306
+europa                 MACH_EUROPA             EUROPA                  1307
+metroconnect           MACH_METROCONNECT       METROCONNECT            1308
+ez_s2410               MACH_EZ_S2410           EZ_S2410                1309
+ez_s2440               MACH_EZ_S2440           EZ_S2440                1310
+ez_ep9312              MACH_EZ_EP9312          EZ_EP9312               1311
+ez_ep9315              MACH_EZ_EP9315          EZ_EP9315               1312
+ez_x7                  MACH_EZ_X7              EZ_X7                   1313
+godotdb                        MACH_GODOTDB            GODOTDB                 1314
+mistral                        MACH_MISTRAL            MISTRAL                 1315
+msm                    MACH_MSM                MSM                     1316
+ct5910                 MACH_CT5910             CT5910                  1317
+ct5912                 MACH_CT5912             CT5912                  1318
+hynet_ine              MACH_HYNET_INE          HYNET_INE               1319
+hynet_app              MACH_HYNET_APP          HYNET_APP               1320
+msm7200                        MACH_MSM7200            MSM7200                 1321
+msm7600                        MACH_MSM7600            MSM7600                 1322
+ceb255                 MACH_CEB255             CEB255                  1323
+ciel                   MACH_CIEL               CIEL                    1324
+slm5650                        MACH_SLM5650            SLM5650                 1325
+at91sam9rlek           MACH_AT91SAM9RLEK       AT91SAM9RLEK            1326
+comtech_router         MACH_COMTECH_ROUTER     COMTECH_ROUTER          1327
+sbc2410x               MACH_SBC2410X           SBC2410X                1328
+at4x0bd                        MACH_AT4X0BD            AT4X0BD                 1329
index 9eca21b49f6b3d0487df153594cdcbbfdebc17c7..426f59b0106b65ae5c9fe7d574354c92ff9a8a32 100644 (file)
@@ -5,15 +5,9 @@
 #include <asm/alternative.h>
 #include <asm/sections.h>
 
-static int no_replacement    = 0;
 static int smp_alt_once      = 0;
 static int debug_alternative = 0;
 
-static int __init noreplacement_setup(char *s)
-{
-       no_replacement = 1;
-       return 1;
-}
 static int __init bootonly(char *str)
 {
        smp_alt_once = 1;
@@ -25,7 +19,6 @@ static int __init debug_alt(char *str)
        return 1;
 }
 
-__setup("noreplacement", noreplacement_setup);
 __setup("smp-alt-boot", bootonly);
 __setup("debug-alternative", debug_alt);
 
@@ -252,9 +245,6 @@ void alternatives_smp_module_add(struct module *mod, char *name,
        struct smp_alt_module *smp;
        unsigned long flags;
 
-       if (no_replacement)
-               return;
-
        if (smp_alt_once) {
                if (boot_cpu_has(X86_FEATURE_UP))
                        alternatives_smp_unlock(locks, locks_end,
@@ -289,7 +279,7 @@ void alternatives_smp_module_del(struct module *mod)
        struct smp_alt_module *item;
        unsigned long flags;
 
-       if (no_replacement || smp_alt_once)
+       if (smp_alt_once)
                return;
 
        spin_lock_irqsave(&smp_alt, flags);
@@ -320,7 +310,7 @@ void alternatives_smp_switch(int smp)
        return;
 #endif
 
-       if (no_replacement || smp_alt_once)
+       if (smp_alt_once)
                return;
        BUG_ON(!smp && (num_online_cpus() > 1));
 
@@ -386,13 +376,6 @@ extern struct paravirt_patch __start_parainstructions[],
 void __init alternative_instructions(void)
 {
        unsigned long flags;
-       if (no_replacement) {
-               printk(KERN_INFO "(SMP-)alternatives turned off\n");
-               free_init_pages("SMP alternatives",
-                               (unsigned long)__smp_alt_begin,
-                               (unsigned long)__smp_alt_end);
-               return;
-       }
 
        local_irq_save(flags);
        apply_alternatives(__alt_instructions, __alt_instructions_end);
index a1f1b715bcf8f0fd7cda241a05885c44f344f170..2b030d6ccbf7336d6cb6f14c813ea049d3d60184 100644 (file)
@@ -758,7 +758,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
                                NULL, (void *)&pr);
 
        /* Check ACPI support for C3 state */
-       if (pr != NULL && longhaul_version != TYPE_LONGHAUL_V1) {
+       if (pr != NULL && longhaul_version == TYPE_POWERSAVER) {
                cx = &pr->power.states[ACPI_STATE_C3];
                if (cx->address > 0 && cx->latency <= 1000) {
                        longhaul_flags |= USE_ACPI_C3;
index a98ba88a8c0ca04dc2385306b8697dea4a10b681..84c3497efb609e898713c5e6925aa5fd5390da69 100644 (file)
@@ -41,16 +41,17 @@ int nmi_watchdog_enabled;
  *   different subsystems this reservation system just tries to coordinate
  *   things a little
  */
-static DEFINE_PER_CPU(unsigned long, perfctr_nmi_owner);
-static DEFINE_PER_CPU(unsigned long, evntsel_nmi_owner[3]);
-
-static cpumask_t backtrace_mask = CPU_MASK_NONE;
 
 /* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's
  * offset from MSR_P4_BSU_ESCR0.  It will be the max for all platforms (for now)
  */
 #define NMI_MAX_COUNTER_BITS 66
+#define NMI_MAX_COUNTER_LONGS BITS_TO_LONGS(NMI_MAX_COUNTER_BITS)
 
+static DEFINE_PER_CPU(unsigned long, perfctr_nmi_owner[NMI_MAX_COUNTER_LONGS]);
+static DEFINE_PER_CPU(unsigned long, evntsel_nmi_owner[NMI_MAX_COUNTER_LONGS]);
+
+static cpumask_t backtrace_mask = CPU_MASK_NONE;
 /* nmi_active:
  * >0: the lapic NMI watchdog is active, but can be disabled
  * <0: the lapic NMI watchdog has not been set up, and cannot
@@ -125,7 +126,7 @@ int avail_to_resrv_perfctr_nmi_bit(unsigned int counter)
        int cpu;
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
        for_each_possible_cpu (cpu) {
-               if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)))
+               if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]))
                        return 0;
        }
        return 1;
@@ -141,7 +142,7 @@ int avail_to_resrv_perfctr_nmi(unsigned int msr)
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
 
        for_each_possible_cpu (cpu) {
-               if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)))
+               if (test_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]))
                        return 0;
        }
        return 1;
@@ -156,7 +157,7 @@ static int __reserve_perfctr_nmi(int cpu, unsigned int msr)
        counter = nmi_perfctr_msr_to_bit(msr);
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
 
-       if (!test_and_set_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)))
+       if (!test_and_set_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]))
                return 1;
        return 0;
 }
@@ -170,7 +171,7 @@ static void __release_perfctr_nmi(int cpu, unsigned int msr)
        counter = nmi_perfctr_msr_to_bit(msr);
        BUG_ON(counter > NMI_MAX_COUNTER_BITS);
 
-       clear_bit(counter, &per_cpu(perfctr_nmi_owner, cpu));
+       clear_bit(counter, &per_cpu(perfctr_nmi_owner, cpu)[0]);
 }
 
 int reserve_perfctr_nmi(unsigned int msr)
index edc339fa50382f0cc98269e5b1c864ae99e96377..697a70e8c0c9b381ffb753429916f0c5cbb4a006 100644 (file)
@@ -712,11 +712,14 @@ static void *vmi_get_function(int vmicall)
 do {                                                           \
        reloc = call_vrom_long_func(vmi_rom, get_reloc,         \
                                    VMI_CALL_##vmicall);        \
-       if (rel->type != VMI_RELOCATION_NONE) {                 \
-               BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);   \
+       if (rel->type == VMI_RELOCATION_CALL_REL)               \
                paravirt_ops.opname = (void *)rel->eip;         \
-       } else if (rel->type == VMI_RELOCATION_NOP)             \
+       else if (rel->type == VMI_RELOCATION_NOP)               \
                paravirt_ops.opname = (void *)vmi_nop;          \
+       else if (rel->type != VMI_RELOCATION_NONE)              \
+               printk(KERN_WARNING "VMI: Unknown relocation "  \
+                                   "type %d for " #vmicall"\n",\
+                                       rel->type);             \
 } while (0)
 
 /*
index ca51610955df34f56e83b323db66a8208366dc00..6f38f818380b34edddfaae7a7494d926a33ff82d 100644 (file)
@@ -26,7 +26,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
 OUTPUT_ARCH(i386)
 ENTRY(phys_startup_32)
 jiffies = jiffies_64;
-_proxy_pda = 0;
+_proxy_pda = 1;
 
 PHDRS {
        text PT_LOAD FLAGS(5);  /* R_E */
index ebbeadfee42d2029f31d9bbf94821efa4c66cfb2..c81080df70df47244579c1edeebef9969b6769bd 100644 (file)
@@ -76,7 +76,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
 
        set_irq_msi(irq, desc);
        dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map));
-       vector = irq;
+       vector = irq_to_vector(irq);
 
        msg.address_hi = 0;
        msg.address_lo =
@@ -110,7 +110,7 @@ static void ia64_ack_msi_irq(unsigned int irq)
 
 static int ia64_msi_retrigger_irq(unsigned int irq)
 {
-       unsigned int vector = irq;
+       unsigned int vector = irq_to_vector(irq);
        ia64_resend_irq(vector);
 
        return 1;
index 69b9bb3fd7c54d3fe9666332eb0ac97ec7324baa..dc7dd7648ec5fe7490af9fee94b20a2bce5d4690 100644 (file)
@@ -640,7 +640,7 @@ show_cpuinfo (struct seq_file *m, void *v)
                   "features   : %s\n"
                   "cpu number : %lu\n"
                   "cpu regs   : %u\n"
-                  "cpu MHz    : %lu.%06lu\n"
+                  "cpu MHz    : %lu.%03lu\n"
                   "itc MHz    : %lu.%06lu\n"
                   "BogoMIPS   : %lu.%02lu\n",
                   cpunum, c->vendor, c->family, c->model,
index f1ec1370b3e37afc87fe9237763b4adc62054e9e..b6fcf8164f2b91e25fcff564255745f40a7d28ac 100644 (file)
@@ -78,7 +78,7 @@ int shub1_bte_error_handler(unsigned long _nodepda)
                 * There are errors which still need to be cleaned up by
                 * hubiio_crb_error_handler
                 */
-               mod_timer(recovery_timer, HZ * 5);
+               mod_timer(recovery_timer, jiffies + (HZ * 5));
                BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,
                            smp_processor_id()));
                return 1;
@@ -95,7 +95,7 @@ int shub1_bte_error_handler(unsigned long _nodepda)
                        icrbd.ii_icrb0_d_regval =
                            REMOTE_HUB_L(nasid, IIO_ICRB_D(i));
                        if (icrbd.d_bteop) {
-                               mod_timer(recovery_timer, HZ * 5);
+                               mod_timer(recovery_timer, jiffies + (HZ * 5));
                                BTE_PRINTK(("eh:%p:%d Valid %d, Giving up\n",
                                            err_nodepda, smp_processor_id(),
                                            i));
@@ -150,7 +150,7 @@ int shub2_bte_error_handler(unsigned long _nodepda)
                status = BTE_LNSTAT_LOAD(bte);
                if ((status & IBLS_ERROR) || !(status & IBLS_BUSY))
                        continue;
-               mod_timer(recovery_timer, HZ * 5);
+               mod_timer(recovery_timer, jiffies + (HZ * 5));
                BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,
                            smp_processor_id()));
                return 1;
index 1ee977fb6ebb8ab3d33fdf7cd184994b41856522..95af40cb22f216dd3dc160766bf46102e57d5273 100644 (file)
@@ -96,10 +96,14 @@ pcibr_dmamap_ate32(struct pcidev_info *info,
        }
 
        /*
-        * If we're mapping for MSI, set the MSI bit in the ATE
+        * If we're mapping for MSI, set the MSI bit in the ATE.  If it's a
+        * TIOCP based pci bus, we also need to set the PIO bit in the ATE.
         */
-       if (dma_flags & SN_DMA_MSI)
+       if (dma_flags & SN_DMA_MSI) {
                ate |= PCI32_ATE_MSI;
+               if (IS_TIOCP_SOFT(pcibus_info))
+                       ate |= PCI32_ATE_PIO;
+       }
 
        ate_write(pcibus_info, ate_index, ate_count, ate);
 
index 28c2e2e6af73e7ff65df2c9d56ada233d601aca0..656bde2e11b14d37186b5d3ec850b5397a78167d 100644 (file)
@@ -49,7 +49,8 @@ LEAF(resume)
 #ifndef CONFIG_CPU_HAS_LLSC
        sw      zero, ll_bit
 #endif
-       mfc0    t2, CP0_STATUS
+       mfc0    t1, CP0_STATUS
+       sw      t1, THREAD_STATUS(a0)
        cpu_save_nonscratch a0
        sw      ra, THREAD_REG31(a0)
 
@@ -59,8 +60,8 @@ LEAF(resume)
        lw      t3, TASK_THREAD_INFO(a0)
        lw      t0, TI_FLAGS(t3)
        li      t1, _TIF_USEDFPU
-       and     t1, t0
-       beqz    t1, 1f
+       and     t2, t0, t1
+       beqz    t2, 1f
        nor     t1, zero, t1
 
        and     t0, t0, t1
@@ -73,13 +74,10 @@ LEAF(resume)
        li      t1, ~ST0_CU1
        and     t0, t0, t1
        sw      t0, ST_OFF(t3)
-       /* clear thread_struct CU1 bit */
-       and     t2, t1
 
        fpu_save_single a0, t0                  # clobbers t0
 
 1:
-       sw      t2, THREAD_STATUS(a0)
        /*
         * The order of restoring the registers takes care of the race
         * updating $28, $29 and kernelsp without disabling ints.
index c7698fd9955c14b121fed998398a4803970aed3c..cc566cf122464f8672685766dd595bc8cc50cceb 100644 (file)
@@ -48,7 +48,8 @@
 #ifndef CONFIG_CPU_HAS_LLSC
        sw      zero, ll_bit
 #endif
-       mfc0    t2, CP0_STATUS
+       mfc0    t1, CP0_STATUS
+       LONG_S  t1, THREAD_STATUS(a0)
        cpu_save_nonscratch a0
        LONG_S  ra, THREAD_REG31(a0)
 
@@ -58,8 +59,8 @@
        PTR_L   t3, TASK_THREAD_INFO(a0)
        LONG_L  t0, TI_FLAGS(t3)
        li      t1, _TIF_USEDFPU
-       and     t1, t0
-       beqz    t1, 1f
+       and     t2, t0, t1
+       beqz    t2, 1f
        nor     t1, zero, t1
 
        and     t0, t0, t1
        li      t1, ~ST0_CU1
        and     t0, t0, t1
        LONG_S  t0, ST_OFF(t3)
-       /* clear thread_struct CU1 bit */
-       and     t2, t1
 
        fpu_save_double a0 t0 t1                # c0_status passed in t0
                                                # clobbers t1
 1:
-       LONG_S  t2, THREAD_STATUS(a0)
 
        /*
         * The order of restoring the registers takes care of the race
index 297dfcb97524fc65009d266c6fd53f52fc907658..c0faabd520103dec45ddce73aefaf8e27f775d35 100644 (file)
@@ -34,4 +34,13 @@ extern int install_sigtramp(unsigned int __user *tramp, unsigned int syscall);
 /* Check and clear pending FPU exceptions in saved CSR */
 extern int fpcsr_pending(unsigned int __user *fpcsr);
 
+/* Make sure we will not lose FPU ownership */
+#ifdef CONFIG_PREEMPT
+#define lock_fpu_owner()       preempt_disable()
+#define unlock_fpu_owner()     preempt_enable()
+#else
+#define lock_fpu_owner()       pagefault_disable()
+#define unlock_fpu_owner()     pagefault_enable()
+#endif
+
 #endif /* __SIGNAL_COMMON_H */
index 8c3c5a5789b0935d9a99334e358663e0e91a69e7..07d67309451a62cc4bc4ac89c9ec520e30f45639 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/ptrace.h>
 #include <linux/unistd.h>
 #include <linux/compiler.h>
+#include <linux/uaccess.h>
 
 #include <asm/abi.h>
 #include <asm/asm.h>
@@ -27,7 +28,6 @@
 #include <asm/cacheflush.h>
 #include <asm/fpu.h>
 #include <asm/sim.h>
-#include <asm/uaccess.h>
 #include <asm/ucontext.h>
 #include <asm/cpu-features.h>
 #include <asm/war.h>
@@ -78,6 +78,46 @@ struct rt_sigframe {
 /*
  * Helper routines
  */
+static int protected_save_fp_context(struct sigcontext __user *sc)
+{
+       int err;
+       while (1) {
+               lock_fpu_owner();
+               own_fpu_inatomic(1);
+               err = save_fp_context(sc); /* this might fail */
+               unlock_fpu_owner();
+               if (likely(!err))
+                       break;
+               /* touch the sigcontext and try again */
+               err = __put_user(0, &sc->sc_fpregs[0]) |
+                       __put_user(0, &sc->sc_fpregs[31]) |
+                       __put_user(0, &sc->sc_fpc_csr);
+               if (err)
+                       break;  /* really bad sigcontext */
+       }
+       return err;
+}
+
+static int protected_restore_fp_context(struct sigcontext __user *sc)
+{
+       int err, tmp;
+       while (1) {
+               lock_fpu_owner();
+               own_fpu_inatomic(0);
+               err = restore_fp_context(sc); /* this might fail */
+               unlock_fpu_owner();
+               if (likely(!err))
+                       break;
+               /* touch the sigcontext and try again */
+               err = __get_user(tmp, &sc->sc_fpregs[0]) |
+                       __get_user(tmp, &sc->sc_fpregs[31]) |
+                       __get_user(tmp, &sc->sc_fpc_csr);
+               if (err)
+                       break;  /* really bad sigcontext */
+       }
+       return err;
+}
+
 int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
 {
        int err = 0;
@@ -113,10 +153,7 @@ int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
                 * Save FPU state to signal context. Signal handler
                 * will "inherit" current FPU state.
                 */
-               own_fpu(1);
-               enable_fp_in_kernel();
-               err |= save_fp_context(sc);
-               disable_fp_in_kernel();
+               err |= protected_save_fp_context(sc);
        }
        return err;
 }
@@ -148,7 +185,7 @@ check_and_restore_fp_context(struct sigcontext __user *sc)
        err = sig = fpcsr_pending(&sc->sc_fpc_csr);
        if (err > 0)
                err = 0;
-       err |= restore_fp_context(sc);
+       err |= protected_restore_fp_context(sc);
        return err ?: sig;
 }
 
@@ -187,11 +224,8 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
 
        if (used_math) {
                /* restore fpu context if we have used it before */
-               own_fpu(0);
-               enable_fp_in_kernel();
                if (!err)
                        err = check_and_restore_fp_context(sc);
-               disable_fp_in_kernel();
        } else {
                /* signal handler may have used FPU.  Give it up. */
                lose_fpu(0);
index 151fd2f0893ab7e1c2e2f94f91964d74cdfb1ba7..b9a014411f83db184c8a094d88f97b8c8d64b336 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/compat.h>
 #include <linux/suspend.h>
 #include <linux/compiler.h>
+#include <linux/uaccess.h>
 
 #include <asm/abi.h>
 #include <asm/asm.h>
@@ -29,7 +30,6 @@
 #include <linux/bitops.h>
 #include <asm/cacheflush.h>
 #include <asm/sim.h>
-#include <asm/uaccess.h>
 #include <asm/ucontext.h>
 #include <asm/system.h>
 #include <asm/fpu.h>
@@ -176,6 +176,46 @@ struct rt_sigframe32 {
 /*
  * sigcontext handlers
  */
+static int protected_save_fp_context32(struct sigcontext32 __user *sc)
+{
+       int err;
+       while (1) {
+               lock_fpu_owner();
+               own_fpu_inatomic(1);
+               err = save_fp_context32(sc); /* this might fail */
+               unlock_fpu_owner();
+               if (likely(!err))
+                       break;
+               /* touch the sigcontext and try again */
+               err = __put_user(0, &sc->sc_fpregs[0]) |
+                       __put_user(0, &sc->sc_fpregs[31]) |
+                       __put_user(0, &sc->sc_fpc_csr);
+               if (err)
+                       break;  /* really bad sigcontext */
+       }
+       return err;
+}
+
+static int protected_restore_fp_context32(struct sigcontext32 __user *sc)
+{
+       int err, tmp;
+       while (1) {
+               lock_fpu_owner();
+               own_fpu_inatomic(0);
+               err = restore_fp_context32(sc); /* this might fail */
+               unlock_fpu_owner();
+               if (likely(!err))
+                       break;
+               /* touch the sigcontext and try again */
+               err = __get_user(tmp, &sc->sc_fpregs[0]) |
+                       __get_user(tmp, &sc->sc_fpregs[31]) |
+                       __get_user(tmp, &sc->sc_fpc_csr);
+               if (err)
+                       break;  /* really bad sigcontext */
+       }
+       return err;
+}
+
 static int setup_sigcontext32(struct pt_regs *regs,
                              struct sigcontext32 __user *sc)
 {
@@ -209,10 +249,7 @@ static int setup_sigcontext32(struct pt_regs *regs,
                 * Save FPU state to signal context.  Signal handler
                 * will "inherit" current FPU state.
                 */
-               own_fpu(1);
-               enable_fp_in_kernel();
-               err |= save_fp_context32(sc);
-               disable_fp_in_kernel();
+               err |= protected_save_fp_context32(sc);
        }
        return err;
 }
@@ -225,7 +262,7 @@ check_and_restore_fp_context32(struct sigcontext32 __user *sc)
        err = sig = fpcsr_pending(&sc->sc_fpc_csr);
        if (err > 0)
                err = 0;
-       err |= restore_fp_context32(sc);
+       err |= protected_restore_fp_context32(sc);
        return err ?: sig;
 }
 
@@ -261,11 +298,8 @@ static int restore_sigcontext32(struct pt_regs *regs,
 
        if (used_math) {
                /* restore fpu context if we have used it before */
-               own_fpu(0);
-               enable_fp_in_kernel();
                if (!err)
                        err = check_and_restore_fp_context32(sc);
-               disable_fp_in_kernel();
        } else {
                /* signal handler may have used FPU.  Give it up. */
                lose_fpu(0);
index 7d76a85422b21ca5c250484fda8fc9125d734f5f..493cb29b8a4284ed13ecd8e22a8abe650cf468b4 100644 (file)
@@ -650,7 +650,7 @@ asmlinkage void do_bp(struct pt_regs *regs)
        unsigned int opcode, bcode;
        siginfo_t info;
 
-       if (get_user(opcode, (unsigned int __user *) exception_epc(regs)))
+       if (__get_user(opcode, (unsigned int __user *) exception_epc(regs)))
                goto out_sigsegv;
 
        /*
@@ -700,7 +700,7 @@ asmlinkage void do_tr(struct pt_regs *regs)
        unsigned int opcode, tcode = 0;
        siginfo_t info;
 
-       if (get_user(opcode, (unsigned int __user *) exception_epc(regs)))
+       if (__get_user(opcode, (unsigned int __user *) exception_epc(regs)))
                goto out_sigsegv;
 
        /* Immediate versions don't provide a code.  */
@@ -757,11 +757,12 @@ asmlinkage void do_cpu(struct pt_regs *regs)
 {
        unsigned int cpid;
 
+       die_if_kernel("do_cpu invoked from kernel context!", regs);
+
        cpid = (regs->cp0_cause >> CAUSEB_CE) & 3;
 
        switch (cpid) {
        case 0:
-               die_if_kernel("do_cpu invoked from kernel context!", regs);
                if (!cpu_has_llsc)
                        if (!simulate_llsc(regs))
                                return;
@@ -772,9 +773,6 @@ asmlinkage void do_cpu(struct pt_regs *regs)
                break;
 
        case 1:
-               if (!test_thread_flag(TIF_ALLOW_FP_IN_KERNEL))
-                       die_if_kernel("do_cpu invoked from kernel context!",
-                                     regs);
                if (used_math())        /* Using the FPU again.  */
                        own_fpu(1);
                else {                  /* First time FPU user.  */
@@ -782,19 +780,7 @@ asmlinkage void do_cpu(struct pt_regs *regs)
                        set_used_math();
                }
 
-               if (raw_cpu_has_fpu) {
-                       if (test_thread_flag(TIF_ALLOW_FP_IN_KERNEL)) {
-                               local_irq_disable();
-                               if (cpu_has_fpu)
-                                       regs->cp0_status |= ST0_CU1;
-                               /*
-                                * We must return without enabling
-                                * interrupts to ensure keep FPU
-                                * ownership until resume.
-                                */
-                               return;
-                       }
-               } else {
+               if (!raw_cpu_has_fpu) {
                        int sig;
                        sig = fpu_emulator_cop1Handler(regs,
                                                &current->thread.fpu, 0);
@@ -836,7 +822,6 @@ asmlinkage void do_cpu(struct pt_regs *regs)
 
        case 2:
        case 3:
-               die_if_kernel("do_cpu invoked from kernel context!", regs);
                break;
        }
 
index 69a8bcfe72b2bc37a7fd8d0360fd1d70e1ee22fa..4f94fa261aae37a1fbe64e2000dd9b76a5bf2bec 100644 (file)
@@ -35,7 +35,7 @@
 #define vpe_id()       smp_processor_id()
 #else
 #define WHAT           0
-#define vpe_id()       smp_processor_id()
+#define vpe_id()       0
 #endif
 
 #define __define_perf_accessors(r, n, np)                              \
index 87188f0f6fbe1e4f7d61683c8cdc9bec1b5afb19..f4a6169aa0a422e4b35522f11e0770abcf7b57bb 100644 (file)
@@ -141,6 +141,18 @@ static int __init setup_bcm112x(void)
                periph_rev = 3;
                pass_str = "A2";
                break;
+       case K_SYS_REVISION_BCM112x_A3:
+               periph_rev = 3;
+               pass_str = "A3";
+               break;
+       case K_SYS_REVISION_BCM112x_A4:
+               periph_rev = 3;
+               pass_str = "A4";
+               break;
+       case K_SYS_REVISION_BCM112x_B0:
+               periph_rev = 3;
+               pass_str = "B0";
+               break;
        default:
                printk("Unknown %s rev %x\n", soc_str, soc_pass);
                ret = 1;
index c75192567e5573e2292dfb98f4fc7f433552e1d1..fbfff95b4437e9b92113c9f9929d123fe8ad6291 100644 (file)
@@ -128,7 +128,7 @@ static void mpc52xx_main_mask(unsigned int virq)
 
        pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
 
-       io_be_setbit(&intr->main_mask, 15 - l2irq);
+       io_be_setbit(&intr->main_mask, 16 - l2irq);
 }
 
 static void mpc52xx_main_unmask(unsigned int virq)
@@ -141,7 +141,7 @@ static void mpc52xx_main_unmask(unsigned int virq)
 
        pr_debug("%s: irq=%x. l2=%d\n", __func__, irq, l2irq);
 
-       io_be_clrbit(&intr->main_mask, 15 - l2irq);
+       io_be_clrbit(&intr->main_mask, 16 - l2irq);
 }
 
 static struct irq_chip mpc52xx_main_irqchip = {
index 3b23bcb35b7abf9f8b3bd1c2efc9373f53ac60db..7a8722beac1262bafeb4fe49545dcd5d66370f6b 100644 (file)
 #include <asm/tlbflush.h>
 #include <asm/rheap.h>
 
+#define immr_map(member)                                               \
+({                                                                     \
+       u32 offset = offsetof(immap_t, member);                         \
+       void *addr = ioremap (IMAP_ADDR + offset,                       \
+                             sizeof( ((immap_t*)0)->member));          \
+       addr;                                                           \
+})
+
+#define immr_map_size(member, size)                                    \
+({                                                                     \
+       u32 offset = offsetof(immap_t, member);                         \
+       void *addr = ioremap (IMAP_ADDR + offset, size);                \
+       addr;                                                           \
+})
+
 static void m8xx_cpm_dpinit(void);
 static uint    host_buffer;    /* One page of host buffer */
 static uint    host_end;       /* end + 1 */
@@ -364,11 +379,16 @@ static rh_block_t cpm_boot_dpmem_rh_block[16];
 static rh_info_t cpm_dpmem_info;
 
 #define CPM_DPMEM_ALIGNMENT    8
+static u8* dpram_vbase;
+static uint dpram_pbase;
 
 void m8xx_cpm_dpinit(void)
 {
        spin_lock_init(&cpm_dpmem_lock);
 
+       dpram_vbase = immr_map_size(im_cpm.cp_dpmem, CPM_DATAONLY_BASE + CPM_DATAONLY_SIZE);
+       dpram_pbase = (uint)&((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem;
+
        /* Initialize the info header */
        rh_init(&cpm_dpmem_info, CPM_DPMEM_ALIGNMENT,
                        sizeof(cpm_boot_dpmem_rh_block) /
@@ -442,3 +462,9 @@ void *cpm_dpram_addr(uint offset)
        return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset;
 }
 EXPORT_SYMBOL(cpm_dpram_addr);
+
+uint cpm_dpram_phys(u8* addr)
+{
+       return (dpram_pbase + (uint)(addr - dpram_vbase));
+}
+EXPORT_SYMBOL(cpm_dpram_phys);
index d1db7d14780e8ee1837d016c84655986b8ea2659..6619f9118b001d2f21518e609808e001e309465f 100644 (file)
 #
 # Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-rc5
+# Wed Apr  4 20:55:16 2007
 #
 CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_HAVE_DEC_LOCK=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_GENERIC_NVRAM=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
 CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
 
 #
 # General setup
 #
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_HOTPLUG is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+# CONFIG_HOTPLUG is not set
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 # CONFIG_EPOLL is not set
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
 #
 # CONFIG_MODULES is not set
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor
 #
 CONFIG_6xx=y
 # CONFIG_40x is not set
 # CONFIG_44x is not set
-# CONFIG_POWER3 is not set
-# CONFIG_POWER4 is not set
 # CONFIG_8xx is not set
+# CONFIG_E200 is not set
+# CONFIG_E500 is not set
+CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_KEXEC is not set
 # CONFIG_CPU_FREQ is not set
+# CONFIG_WANT_EARLY_SERIAL is not set
 CONFIG_EMBEDDEDBOOT=y
 CONFIG_PPC_STD_MMU=y
 
 #
 # Platform options
 #
-# CONFIG_PPC_MULTIPLATFORM is not set
+
+#
+# Freescale Ethernet driver platform-specific options
+#
+# CONFIG_PPC_PREP is not set
 # CONFIG_APUS is not set
+# CONFIG_KATANA is not set
 # CONFIG_WILLOW is not set
-# CONFIG_PCORE is not set
+# CONFIG_CPCI690 is not set
 # CONFIG_POWERPMC250 is not set
-# CONFIG_EV64260 is not set
+# CONFIG_CHESTNUT is not set
 # CONFIG_SPRUCE is not set
+# CONFIG_HDPU is not set
+# CONFIG_EV64260 is not set
 # CONFIG_LOPEC is not set
-# CONFIG_MCPN765 is not set
 # CONFIG_MVME5100 is not set
 # CONFIG_PPLUS is not set
 # CONFIG_PRPMC750 is not set
 # CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
-# CONFIG_ADIR is not set
-# CONFIG_K2 is not set
+# CONFIG_RADSTONE_PPC7D is not set
 # CONFIG_PAL4 is not set
-# CONFIG_GEMINI is not set
 # CONFIG_EST8260 is not set
 # CONFIG_SBC82xx is not set
 # CONFIG_SBS8260 is not set
-# CONFIG_RPX6 is not set
+# CONFIG_RPX8260 is not set
 # CONFIG_TQM8260 is not set
 CONFIG_ADS8272=y
+# CONFIG_PQ2FADS is not set
+# CONFIG_LITE5200 is not set
+# CONFIG_MPC834x_SYS is not set
+# CONFIG_EV64360 is not set
 CONFIG_PQ2ADS=y
 CONFIG_8260=y
 CONFIG_8272=y
 CONFIG_CPM2=y
 # CONFIG_PC_KEYBOARD is not set
-CONFIG_SERIAL_CONSOLE=y
 # CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
 # CONFIG_HIGHMEM is not set
-CONFIG_KERNEL_ELF=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
 
 #
 # Bus options
 #
+CONFIG_ZONE_DMA=y
+# CONFIG_PPC_I8259 is not set
+CONFIG_PPC_INDIRECT_PCI=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
+CONFIG_PCI_8260=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
 
 #
 # Advanced setup
@@ -119,6 +204,96 @@ CONFIG_KERNEL_START=0xc0000000
 CONFIG_TASK_SIZE=0x80000000
 CONFIG_BOOT_LOAD=0x00400000
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -126,6 +301,14 @@ CONFIG_BOOT_LOAD=0x00400000
 #
 # Generic Driver Options
 #
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -140,6 +323,7 @@ CONFIG_BOOT_LOAD=0x00400000
 #
 # Plug and Play support
 #
+# CONFIG_PNPACPI is not set
 
 #
 # Block devices
@@ -149,14 +333,23 @@ CONFIG_BOOT_LOAD=0x00400000
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM 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_CARMEL is not set
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=32768
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_LBD is not set
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -166,7 +359,14 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -176,6 +376,7 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -190,70 +391,12 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
+# CONFIG_WINDFARM is not set
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
+# Network device support
 #
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
@@ -265,14 +408,32 @@ CONFIG_NETDEVICES=y
 #
 # CONFIG_ARCNET is not set
 
+#
+# PHY device support
+#
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+CONFIG_DAVICOM_PHY=y
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_FIXED_PHY is not set
+
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
-# CONFIG_OAKNET is not set
+CONFIG_MII=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 
 #
@@ -281,6 +442,9 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
 # CONFIG_NET_PCI is not set
+CONFIG_FS_ENET=y
+# CONFIG_FS_ENET_HAS_SCC is not set
+CONFIG_FS_ENET_HAS_FCC=y
 
 #
 # Ethernet (1000 Mbit)
@@ -292,14 +456,24 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
 
 #
 # Ethernet (10000 Mbit)
 #
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -321,6 +495,8 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -336,6 +512,7 @@ CONFIG_NET_ETHERNET=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -346,14 +523,6 @@ CONFIG_INPUT=y
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-# CONFIG_SERIO is not set
-# CONFIG_SERIO_I8042 is not set
-
 #
 # Input Device Drivers
 #
@@ -363,6 +532,12 @@ CONFIG_SOUND_GAMEPORT=y
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
 
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
 #
 # Character devices
 #
@@ -377,10 +552,21 @@ CONFIG_SOUND_GAMEPORT=y
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_CPM=y
+CONFIG_SERIAL_CPM_CONSOLE=y
+CONFIG_SERIAL_CPM_SCC1=y
+# CONFIG_SERIAL_CPM_SCC2 is not set
+# CONFIG_SERIAL_CPM_SCC3 is not set
+CONFIG_SERIAL_CPM_SCC4=y
+# CONFIG_SERIAL_CPM_SMC1 is not set
+# CONFIG_SERIAL_CPM_SMC2 is not set
+# CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_QIC02_TAPE is not set
 
 #
 # IPMI
@@ -391,29 +577,53 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_NVRAM is not set
 CONFIG_GEN_RTC=y
 # CONFIG_GEN_RTC_X is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
 #
-# Misc devices
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
 
 #
 # Multimedia devices
@@ -428,43 +638,120 @@ CONFIG_GEN_RTC=y
 #
 # Graphics support
 #
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 
 #
 # Sound
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
 #
 # USB support
 #
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_USB is not set
 
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
 #
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
 
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# Auxiliary Display support
+#
+
+#
+# Virtualization
+#
+
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -475,7 +762,8 @@ CONFIG_FS_MBCACHE=y
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
 # CONFIG_NTFS_FS is not set
 
 #
@@ -483,12 +771,13 @@ CONFIG_FS_MBCACHE=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -511,20 +800,26 @@ CONFIG_RAMFS=y
 # Network File Systems
 #
 CONFIG_NFS_FS=y
-# CONFIG_NFS_V3 is not set
-# CONFIG_NFS_V4 is not set
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
-# CONFIG_EXPORTFS is not set
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -537,46 +832,99 @@ CONFIG_PARTITION_ADVANCED=y
 # CONFIG_MAC_PARTITION is not set
 # CONFIG_MSDOS_PARTITION is not set
 # CONFIG_LDM_PARTITION is not set
-# CONFIG_NEC98_PARTITION is not set
 # CONFIG_SGI_PARTITION is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 
 #
 # Native Language Support
 #
 # CONFIG_NLS is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
 # CONFIG_SCC_ENET is not set
-CONFIG_FEC_ENET=y
-# CONFIG_USE_MDIO is not set
+# CONFIG_FEC_ENET is not set
 
 #
 # CPM2 Options
 #
-CONFIG_SCC_CONSOLE=y
-CONFIG_FCC1_ENET=y
-# CONFIG_FCC2_ENET is not set
-# CONFIG_FCC3_ENET is not set
 
 #
 # Library routines
 #
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 # CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+# CONFIG_PROFILING is not set
 
 #
 # Kernel hacking
 #
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_KGDB_CONSOLE is not set
 
 #
 # Security options
 #
+# CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 
 #
 # Cryptographic options
 #
-# CONFIG_CRYPTO is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=y
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+
+#
+# Hardware crypto devices
+#
index 0bc06768cf24dd13b92a166ca0ab5bf4b99dd4a2..47f4b38edb5fb55d4363ae2e1e496339816dc099 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/fs_enet_pd.h>
 #include <linux/platform_device.h>
+#include <linux/phy.h>
 
 #include <asm/io.h>
 #include <asm/mpc8260.h>
 
 #include "pq2ads_pd.h"
 
-static void init_fcc1_ioports(void);
-static void init_fcc2_ioports(void);
-static void init_scc1_uart_ioports(void);
-static void init_scc4_uart_ioports(void);
+static void init_fcc1_ioports(struct fs_platform_info*);
+static void init_fcc2_ioports(struct fs_platform_info*);
+static void init_scc1_uart_ioports(struct fs_uart_platform_info*);
+static void init_scc4_uart_ioports(struct fs_uart_platform_info*);
 
 static struct fs_uart_platform_info mpc8272_uart_pdata[] = {
        [fsid_scc1_uart] = {
@@ -103,7 +104,7 @@ static struct fs_platform_info mpc82xx_enet_pdata[] = {
        },
 };
 
-static void init_fcc1_ioports(struct fs_platform_info*)
+static void init_fcc1_ioports(struct fs_platform_info* pdata)
 {
        struct io_port *io;
        u32 tempval;
@@ -144,7 +145,7 @@ static void init_fcc1_ioports(struct fs_platform_info*)
        iounmap(immap);
 }
 
-static void init_fcc2_ioports(struct fs_platform_info*)
+static void init_fcc2_ioports(struct fs_platform_info* pdata)
 {
        cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t));
        u32 *bcsr = ioremap(BCSR_ADDR+12, sizeof(u32));
@@ -229,7 +230,7 @@ static void mpc8272ads_fixup_uart_pdata(struct platform_device *pdev,
        }
 }
 
-static void init_scc1_uart_ioports(struct fs_uart_platform_info*)
+static void init_scc1_uart_ioports(struct fs_uart_platform_info* pdata)
 {
        cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t));
 
@@ -246,7 +247,7 @@ static void init_scc1_uart_ioports(struct fs_uart_platform_info*)
        iounmap(immap);
 }
 
-static void init_scc4_uart_ioports(struct fs_uart_platform_info*)
+static void init_scc4_uart_ioports(struct fs_uart_platform_info* pdata)
 {
        cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t));
 
index 5b05d4bd0df7de168959af76285423ee2b847fc7..7ce5364fdb3b0d2243c072c1b21bdbe6c46dcc3c 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/fs_enet_pd.h>
 #include <linux/fs_uart_pd.h>
 #include <linux/mii.h>
+#include <linux/phy.h>
 
 #include <asm/delay.h>
 #include <asm/io.h>
 
 extern unsigned char __res[];
 
-static void setup_fec1_ioports(void);
-static void setup_scc1_ioports(void);
-static void setup_smc1_ioports(void);
-static void setup_smc2_ioports(void);
+static void setup_fec1_ioports(struct fs_platform_info*);
+static void setup_scc1_ioports(struct fs_platform_info*);
+static void setup_smc1_ioports(struct fs_uart_platform_info*);
+static void setup_smc2_ioports(struct fs_uart_platform_info*);
 
 static struct fs_mii_fec_platform_info mpc8xx_mdio_fec_pdata;
 
@@ -137,7 +138,7 @@ void __init board_init(void)
        iounmap(bcsr_io);
 }
 
-static void setup_fec1_ioports(struct fs_platform_info*)
+static void setup_fec1_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
 
@@ -145,7 +146,7 @@ static void setup_fec1_ioports(struct fs_platform_info*)
        setbits16(&immap->im_ioport.iop_pddir, 0x1fff);
 }
 
-static void setup_scc1_ioports(struct fs_platform_info*)
+static void setup_scc1_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
        unsigned *bcsr_io;
@@ -194,7 +195,7 @@ static void setup_scc1_ioports(struct fs_platform_info*)
 
 }
 
-static void setup_smc1_ioports(struct fs_uart_platform_info*)
+static void setup_smc1_ioports(struct fs_uart_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
        unsigned *bcsr_io;
@@ -216,7 +217,7 @@ static void setup_smc1_ioports(struct fs_uart_platform_info*)
 
 }
 
-static void setup_smc2_ioports(struct fs_uart_platform_info*)
+static void setup_smc2_ioports(struct fs_uart_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
        unsigned *bcsr_io;
index f8161f3557f5df414b79ff046b7d927f99fd03a8..87deaefd6c5b9faf0889f64561643e9016152500 100644 (file)
 #include <asm/ppc_sys.h>
 
 extern unsigned char __res[];
-static void setup_smc1_ioports(void);
-static void setup_smc2_ioports(void);
+static void setup_smc1_ioports(struct fs_uart_platform_info*);
+static void setup_smc2_ioports(struct fs_uart_platform_info*);
 
 static struct fs_mii_fec_platform_info mpc8xx_mdio_fec_pdata;
-static void setup_fec1_ioports(void);
-static void setup_fec2_ioports(void);
-static void setup_scc3_ioports(void);
+static void setup_fec1_ioports(struct fs_platform_info*);
+static void setup_fec2_ioports(struct fs_platform_info*);
+static void setup_scc3_ioports(struct fs_platform_info*);
 
 static struct fs_uart_platform_info mpc885_uart_pdata[] = {
        [fsid_smc1_uart] = {
@@ -161,7 +161,7 @@ void __init board_init(void)
 #endif
 }
 
-static void setup_fec1_ioports(struct fs_platform_info*)
+static void setup_fec1_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
 
@@ -181,7 +181,7 @@ static void setup_fec1_ioports(struct fs_platform_info*)
        clrbits32(&immap->im_cpm.cp_cptr, 0x00000100);
 }
 
-static void setup_fec2_ioports(struct fs_platform_info*)
+static void setup_fec2_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
 
@@ -193,7 +193,7 @@ static void setup_fec2_ioports(struct fs_platform_info*)
        clrbits32(&immap->im_cpm.cp_cptr, 0x00000080);
 }
 
-static void setup_scc3_ioports(struct fs_platform_info*)
+static void setup_scc3_ioports(struct fs_platform_info* pdata)
 {
        immap_t *immap = (immap_t *) IMAP_ADDR;
        unsigned *bcsr_io;
@@ -315,7 +315,7 @@ static void __init mpc885ads_fixup_scc_enet_pdata(struct platform_device *pdev,
        mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1);
 }
 
-static void setup_smc1_ioports(struct fs_uart_platform_info*)
+static void setup_smc1_ioports(struct fs_uart_platform_info* pdata)
 {
         immap_t *immap = (immap_t *) IMAP_ADDR;
         unsigned *bcsr_io;
@@ -335,7 +335,7 @@ static void setup_smc1_ioports(struct fs_uart_platform_info*)
         clrbits16(&immap->im_cpm.cp_pbodr, iobits);
 }
 
-static void setup_smc2_ioports(struct fs_uart_platform_info*)
+static void setup_smc2_ioports(struct fs_uart_platform_info* pdata)
 {
         immap_t *immap = (immap_t *) IMAP_ADDR;
         unsigned *bcsr_io;
index 3fa5f95c4614dac56b67ffc7285901588ee28cf3..1c927c538b8bbe1231bb23d92832f1fb6ac71a16 100644 (file)
@@ -601,7 +601,7 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node)
 /*
  * Normally called from {do_}pci_scan_bus...
  */
-void __init pcibios_fixup_bus(struct pci_bus *bus)
+void __devinit pcibios_fixup_bus(struct pci_bus *bus)
 {
        struct pci_dev *dev;
        int i, has_io, has_mem;
@@ -842,7 +842,7 @@ static void watchdog_reset() {
 /*
  * Other archs parse arguments here.
  */
-char * __init pcibios_setup(char *str)
+char * __devinit pcibios_setup(char *str)
 {
        return str;
 }
index da6606f0cffc41b4f85e3d6ea65c4042361d6f54..f807172cab0ea139d07ea70fb7c1e795708e013b 100644 (file)
@@ -910,7 +910,7 @@ asmlinkage long sunos_sysconf (int name)
                ret = ARG_MAX;
                break;
        case _SC_CHILD_MAX:
-               ret = -1; /* no limit */
+               ret = current->signal->rlim[RLIMIT_NPROC].rlim_cur;
                break;
        case _SC_CLK_TCK:
                ret = HZ;
@@ -919,7 +919,7 @@ asmlinkage long sunos_sysconf (int name)
                ret = NGROUPS_MAX;
                break;
        case _SC_OPEN_MAX:
-               ret = OPEN_MAX;
+               ret = current->signal->rlim[RLIMIT_NOFILE].rlim_cur;
                break;
        case _SC_JOB_CONTROL:
                ret = 1;        /* yes, we do support job control */
index 196b4b72482bd80f7f58a1caf44fcf23a3c66545..12109886bb1eebac367bb57259cc566631c4a62b 100644 (file)
@@ -327,7 +327,7 @@ static int __init pcibios_init(void)
 
 subsys_initcall(pcibios_init);
 
-void pcibios_fixup_bus(struct pci_bus *pbus)
+void __devinit pcibios_fixup_bus(struct pci_bus *pbus)
 {
        struct pci_pbm_info *pbm = pbus->sysdata;
 
@@ -405,7 +405,7 @@ void pcibios_bus_to_resource(struct pci_dev *pdev, struct resource *res,
 }
 EXPORT_SYMBOL(pcibios_bus_to_resource);
 
-char * __init pcibios_setup(char *str)
+char * __devinit pcibios_setup(char *str)
 {
        return str;
 }
index 2e7f1427088ad439d3a375f5627ec28a2445de8e..7aca0f33f88592d5053932711524978822ff9b2f 100644 (file)
@@ -64,7 +64,7 @@ static void __iommu_flushall(struct pci_iommu *iommu)
 #define IOPTE_IS_DUMMY(iommu, iopte)   \
        ((iopte_val(*iopte) & IOPTE_PAGE) == (iommu)->dummy_page_pa)
 
-static void inline iopte_make_dummy(struct pci_iommu *iommu, iopte_t *iopte)
+static inline void iopte_make_dummy(struct pci_iommu *iommu, iopte_t *iopte)
 {
        unsigned long val = iopte_val(*iopte);
 
index 01d6d869ea2b5e261110567220886d3c1b422359..14f78fb5e890e8dfff2cbe49469ce5313e26cbd9 100644 (file)
 
 #include "iommu_common.h"
 
-/* These should be allocated on an SMP_CACHE_BYTES
- * aligned boundary for optimal performance.
- *
- * On SYSIO, using an 8K page size we have 1GB of SBUS
- * DMA space mapped.  We divide this space into equally
- * sized clusters. We allocate a DMA mapping from the
- * cluster that matches the order of the allocation, or
- * if the order is greater than the number of clusters,
- * we try to allocate from the last cluster.
- */
-
-#define NCLUSTERS      8UL
-#define ONE_GIG                (1UL * 1024UL * 1024UL * 1024UL)
-#define CLUSTER_SIZE   (ONE_GIG / NCLUSTERS)
-#define CLUSTER_MASK   (CLUSTER_SIZE - 1)
-#define CLUSTER_NPAGES (CLUSTER_SIZE >> IO_PAGE_SHIFT)
 #define MAP_BASE       ((u32)0xc0000000)
 
+struct sbus_iommu_arena {
+       unsigned long   *map;
+       unsigned int    hint;
+       unsigned int    limit;
+};
+
 struct sbus_iommu {
-/*0x00*/spinlock_t             lock;
+       spinlock_t              lock;
 
-/*0x08*/iopte_t                        *page_table;
-/*0x10*/unsigned long          strbuf_regs;
-/*0x18*/unsigned long          iommu_regs;
-/*0x20*/unsigned long          sbus_control_reg;
+       struct sbus_iommu_arena arena;
 
-/*0x28*/volatile unsigned long strbuf_flushflag;
+       iopte_t                 *page_table;
+       unsigned long           strbuf_regs;
+       unsigned long           iommu_regs;
+       unsigned long           sbus_control_reg;
 
-       /* If NCLUSTERS is ever decresed to 4 or lower,
-        * you must increase the size of the type of
-        * these counters.  You have been duly warned. -DaveM
-        */
-/*0x30*/struct {
-               u16     next;
-               u16     flush;
-       } alloc_info[NCLUSTERS];
-
-       /* The lowest used consistent mapping entry.  Since
-        * we allocate consistent maps out of cluster 0 this
-        * is relative to the beginning of closter 0.
-        */
-/*0x50*/u32            lowest_consistent_map;
+       volatile unsigned long  strbuf_flushflag;
 };
 
 /* Offsets from iommu_regs */
@@ -91,19 +68,6 @@ static void __iommu_flushall(struct sbus_iommu *iommu)
                tag += 8UL;
        }
        upa_readq(iommu->sbus_control_reg);
-
-       for (entry = 0; entry < NCLUSTERS; entry++) {
-               iommu->alloc_info[entry].flush =
-                       iommu->alloc_info[entry].next;
-       }
-}
-
-static void iommu_flush(struct sbus_iommu *iommu, u32 base, unsigned long npages)
-{
-       while (npages--)
-               upa_writeq(base + (npages << IO_PAGE_SHIFT),
-                          iommu->iommu_regs + IOMMU_FLUSH);
-       upa_readq(iommu->sbus_control_reg);
 }
 
 /* Offsets from strbuf_regs */
@@ -156,178 +120,115 @@ static void sbus_strbuf_flush(struct sbus_iommu *iommu, u32 base, unsigned long
                       base, npages);
 }
 
-static iopte_t *alloc_streaming_cluster(struct sbus_iommu *iommu, unsigned long npages)
+/* Based largely upon the ppc64 iommu allocator.  */
+static long sbus_arena_alloc(struct sbus_iommu *iommu, unsigned long npages)
 {
-       iopte_t *iopte, *limit, *first, *cluster;
-       unsigned long cnum, ent, nent, flush_point, found;
-
-       cnum = 0;
-       nent = 1;
-       while ((1UL << cnum) < npages)
-               cnum++;
-       if(cnum >= NCLUSTERS) {
-               nent = 1UL << (cnum - NCLUSTERS);
-               cnum = NCLUSTERS - 1;
-       }
-       iopte  = iommu->page_table + (cnum * CLUSTER_NPAGES);
-
-       if (cnum == 0)
-               limit = (iommu->page_table +
-                        iommu->lowest_consistent_map);
-       else
-               limit = (iopte + CLUSTER_NPAGES);
-
-       iopte += ((ent = iommu->alloc_info[cnum].next) << cnum);
-       flush_point = iommu->alloc_info[cnum].flush;
-
-       first = iopte;
-       cluster = NULL;
-       found = 0;
-       for (;;) {
-               if (iopte_val(*iopte) == 0UL) {
-                       found++;
-                       if (!cluster)
-                               cluster = iopte;
+       struct sbus_iommu_arena *arena = &iommu->arena;
+       unsigned long n, i, start, end, limit;
+       int pass;
+
+       limit = arena->limit;
+       start = arena->hint;
+       pass = 0;
+
+again:
+       n = find_next_zero_bit(arena->map, limit, start);
+       end = n + npages;
+       if (unlikely(end >= limit)) {
+               if (likely(pass < 1)) {
+                       limit = start;
+                       start = 0;
+                       __iommu_flushall(iommu);
+                       pass++;
+                       goto again;
                } else {
-                       /* Used cluster in the way */
-                       cluster = NULL;
-                       found = 0;
+                       /* Scanned the whole thing, give up. */
+                       return -1;
                }
+       }
 
-               if (found == nent)
-                       break;
-
-               iopte += (1 << cnum);
-               ent++;
-               if (iopte >= limit) {
-                       iopte = (iommu->page_table + (cnum * CLUSTER_NPAGES));
-                       ent = 0;
-
-                       /* Multiple cluster allocations must not wrap */
-                       cluster = NULL;
-                       found = 0;
+       for (i = n; i < end; i++) {
+               if (test_bit(i, arena->map)) {
+                       start = i + 1;
+                       goto again;
                }
-               if (ent == flush_point)
-                       __iommu_flushall(iommu);
-               if (iopte == first)
-                       goto bad;
        }
 
-       /* ent/iopte points to the last cluster entry we're going to use,
-        * so save our place for the next allocation.
-        */
-       if ((iopte + (1 << cnum)) >= limit)
-               ent = 0;
-       else
-               ent = ent + 1;
-       iommu->alloc_info[cnum].next = ent;
-       if (ent == flush_point)
-               __iommu_flushall(iommu);
-
-       /* I've got your streaming cluster right here buddy boy... */
-       return cluster;
-
-bad:
-       printk(KERN_EMERG "sbus: alloc_streaming_cluster of npages(%ld) failed!\n",
-              npages);
-       return NULL;
+       for (i = n; i < end; i++)
+               __set_bit(i, arena->map);
+
+       arena->hint = end;
+
+       return n;
 }
 
-static void free_streaming_cluster(struct sbus_iommu *iommu, u32 base, unsigned long npages)
+static void sbus_arena_free(struct sbus_iommu_arena *arena, unsigned long base, unsigned long npages)
 {
-       unsigned long cnum, ent, nent;
-       iopte_t *iopte;
+       unsigned long i;
 
-       cnum = 0;
-       nent = 1;
-       while ((1UL << cnum) < npages)
-               cnum++;
-       if(cnum >= NCLUSTERS) {
-               nent = 1UL << (cnum - NCLUSTERS);
-               cnum = NCLUSTERS - 1;
-       }
-       ent = (base & CLUSTER_MASK) >> (IO_PAGE_SHIFT + cnum);
-       iopte = iommu->page_table + ((base - MAP_BASE) >> IO_PAGE_SHIFT);
-       do {
-               iopte_val(*iopte) = 0UL;
-               iopte += 1 << cnum;
-       } while(--nent);
-
-       /* If the global flush might not have caught this entry,
-        * adjust the flush point such that we will flush before
-        * ever trying to reuse it.
-        */
-#define between(X,Y,Z) (((Z) - (Y)) >= ((X) - (Y)))
-       if (between(ent, iommu->alloc_info[cnum].next, iommu->alloc_info[cnum].flush))
-               iommu->alloc_info[cnum].flush = ent;
-#undef between
+       for (i = base; i < (base + npages); i++)
+               __clear_bit(i, arena->map);
 }
 
-/* We allocate consistent mappings from the end of cluster zero. */
-static iopte_t *alloc_consistent_cluster(struct sbus_iommu *iommu, unsigned long npages)
+static void sbus_iommu_table_init(struct sbus_iommu *iommu, unsigned int tsbsize)
 {
-       iopte_t *iopte;
+       unsigned long tsbbase, order, sz, num_tsb_entries;
 
-       iopte = iommu->page_table + (1 * CLUSTER_NPAGES);
-       while (iopte > iommu->page_table) {
-               iopte--;
-               if (!(iopte_val(*iopte) & IOPTE_VALID)) {
-                       unsigned long tmp = npages;
+       num_tsb_entries = tsbsize / sizeof(iopte_t);
 
-                       while (--tmp) {
-                               iopte--;
-                               if (iopte_val(*iopte) & IOPTE_VALID)
-                                       break;
-                       }
-                       if (tmp == 0) {
-                               u32 entry = (iopte - iommu->page_table);
+       /* Setup initial software IOMMU state. */
+       spin_lock_init(&iommu->lock);
 
-                               if (entry < iommu->lowest_consistent_map)
-                                       iommu->lowest_consistent_map = entry;
-                               return iopte;
-                       }
-               }
+       /* Allocate and initialize the free area map.  */
+       sz = num_tsb_entries / 8;
+       sz = (sz + 7UL) & ~7UL;
+       iommu->arena.map = kzalloc(sz, GFP_KERNEL);
+       if (!iommu->arena.map) {
+               prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n");
+               prom_halt();
+       }
+       iommu->arena.limit = num_tsb_entries;
+
+       /* Now allocate and setup the IOMMU page table itself.  */
+       order = get_order(tsbsize);
+       tsbbase = __get_free_pages(GFP_KERNEL, order);
+       if (!tsbbase) {
+               prom_printf("IOMMU: Error, gfp(tsb) failed.\n");
+               prom_halt();
        }
-       return NULL;
+       iommu->page_table = (iopte_t *)tsbbase;
+       memset(iommu->page_table, 0, tsbsize);
 }
 
-static void free_consistent_cluster(struct sbus_iommu *iommu, u32 base, unsigned long npages)
+static inline iopte_t *alloc_npages(struct sbus_iommu *iommu, unsigned long npages)
 {
-       iopte_t *iopte = iommu->page_table + ((base - MAP_BASE) >> IO_PAGE_SHIFT);
+       long entry;
 
-       if ((iopte - iommu->page_table) == iommu->lowest_consistent_map) {
-               iopte_t *walk = iopte + npages;
-               iopte_t *limit;
+       entry = sbus_arena_alloc(iommu, npages);
+       if (unlikely(entry < 0))
+               return NULL;
 
-               limit = iommu->page_table + CLUSTER_NPAGES;
-               while (walk < limit) {
-                       if (iopte_val(*walk) != 0UL)
-                               break;
-                       walk++;
-               }
-               iommu->lowest_consistent_map =
-                       (walk - iommu->page_table);
-       }
+       return iommu->page_table + entry;
+}
 
-       while (npages--)
-               *iopte++ = __iopte(0UL);
+static inline void free_npages(struct sbus_iommu *iommu, dma_addr_t base, unsigned long npages)
+{
+       sbus_arena_free(&iommu->arena, base >> IO_PAGE_SHIFT, npages);
 }
 
 void *sbus_alloc_consistent(struct sbus_dev *sdev, size_t size, dma_addr_t *dvma_addr)
 {
-       unsigned long order, first_page, flags;
        struct sbus_iommu *iommu;
        iopte_t *iopte;
+       unsigned long flags, order, first_page;
        void *ret;
        int npages;
 
-       if (size <= 0 || sdev == NULL || dvma_addr == NULL)
-               return NULL;
-
        size = IO_PAGE_ALIGN(size);
        order = get_order(size);
        if (order >= 10)
                return NULL;
+
        first_page = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
        if (first_page == 0UL)
                return NULL;
@@ -336,108 +237,121 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, size_t size, dma_addr_t *dvma
        iommu = sdev->bus->iommu;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       iopte = alloc_consistent_cluster(iommu, size >> IO_PAGE_SHIFT);
-       if (iopte == NULL) {
-               spin_unlock_irqrestore(&iommu->lock, flags);
+       iopte = alloc_npages(iommu, size >> IO_PAGE_SHIFT);
+       spin_unlock_irqrestore(&iommu->lock, flags);
+
+       if (unlikely(iopte == NULL)) {
                free_pages(first_page, order);
                return NULL;
        }
 
-       /* Ok, we're committed at this point. */
-       *dvma_addr = MAP_BASE + ((iopte - iommu->page_table) << IO_PAGE_SHIFT);
+       *dvma_addr = (MAP_BASE +
+                     ((iopte - iommu->page_table) << IO_PAGE_SHIFT));
        ret = (void *) first_page;
        npages = size >> IO_PAGE_SHIFT;
+       first_page = __pa(first_page);
        while (npages--) {
-               *iopte++ = __iopte(IOPTE_VALID | IOPTE_CACHE | IOPTE_WRITE |
-                                  (__pa(first_page) & IOPTE_PAGE));
+               iopte_val(*iopte) = (IOPTE_VALID | IOPTE_CACHE |
+                                    IOPTE_WRITE |
+                                    (first_page & IOPTE_PAGE));
+               iopte++;
                first_page += IO_PAGE_SIZE;
        }
-       iommu_flush(iommu, *dvma_addr, size >> IO_PAGE_SHIFT);
-       spin_unlock_irqrestore(&iommu->lock, flags);
 
        return ret;
 }
 
 void sbus_free_consistent(struct sbus_dev *sdev, size_t size, void *cpu, dma_addr_t dvma)
 {
-       unsigned long order, npages;
        struct sbus_iommu *iommu;
-
-       if (size <= 0 || sdev == NULL || cpu == NULL)
-               return;
+       iopte_t *iopte;
+       unsigned long flags, order, npages;
 
        npages = IO_PAGE_ALIGN(size) >> IO_PAGE_SHIFT;
        iommu = sdev->bus->iommu;
+       iopte = iommu->page_table +
+               ((dvma - MAP_BASE) >> IO_PAGE_SHIFT);
+
+       spin_lock_irqsave(&iommu->lock, flags);
+
+       free_npages(iommu, dvma - MAP_BASE, npages);
 
-       spin_lock_irq(&iommu->lock);
-       free_consistent_cluster(iommu, dvma, npages);
-       iommu_flush(iommu, dvma, npages);
-       spin_unlock_irq(&iommu->lock);
+       spin_unlock_irqrestore(&iommu->lock, flags);
 
        order = get_order(size);
        if (order < 10)
                free_pages((unsigned long)cpu, order);
 }
 
-dma_addr_t sbus_map_single(struct sbus_dev *sdev, void *ptr, size_t size, int dir)
+dma_addr_t sbus_map_single(struct sbus_dev *sdev, void *ptr, size_t sz, int direction)
 {
-       struct sbus_iommu *iommu = sdev->bus->iommu;
-       unsigned long npages, pbase, flags;
-       iopte_t *iopte;
-       u32 dma_base, offset;
-       unsigned long iopte_bits;
+       struct sbus_iommu *iommu;
+       iopte_t *base;
+       unsigned long flags, npages, oaddr;
+       unsigned long i, base_paddr;
+       u32 bus_addr, ret;
+       unsigned long iopte_protection;
+
+       iommu = sdev->bus->iommu;
 
-       if (dir == SBUS_DMA_NONE)
+       if (unlikely(direction == SBUS_DMA_NONE))
                BUG();
 
-       pbase = (unsigned long) ptr;
-       offset = (u32) (pbase & ~IO_PAGE_MASK);
-       size = (IO_PAGE_ALIGN(pbase + size) - (pbase & IO_PAGE_MASK));
-       pbase = (unsigned long) __pa(pbase & IO_PAGE_MASK);
+       oaddr = (unsigned long)ptr;
+       npages = IO_PAGE_ALIGN(oaddr + sz) - (oaddr & IO_PAGE_MASK);
+       npages >>= IO_PAGE_SHIFT;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       npages = size >> IO_PAGE_SHIFT;
-       iopte = alloc_streaming_cluster(iommu, npages);
-       if (iopte == NULL)
-               goto bad;
-       dma_base = MAP_BASE + ((iopte - iommu->page_table) << IO_PAGE_SHIFT);
-       npages = size >> IO_PAGE_SHIFT;
-       iopte_bits = IOPTE_VALID | IOPTE_STBUF | IOPTE_CACHE;
-       if (dir != SBUS_DMA_TODEVICE)
-               iopte_bits |= IOPTE_WRITE;
-       while (npages--) {
-               *iopte++ = __iopte(iopte_bits | (pbase & IOPTE_PAGE));
-               pbase += IO_PAGE_SIZE;
-       }
-       npages = size >> IO_PAGE_SHIFT;
+       base = alloc_npages(iommu, npages);
        spin_unlock_irqrestore(&iommu->lock, flags);
 
-       return (dma_base | offset);
+       if (unlikely(!base))
+               BUG();
 
-bad:
-       spin_unlock_irqrestore(&iommu->lock, flags);
-       BUG();
-       return 0;
+       bus_addr = (MAP_BASE +
+                   ((base - iommu->page_table) << IO_PAGE_SHIFT));
+       ret = bus_addr | (oaddr & ~IO_PAGE_MASK);
+       base_paddr = __pa(oaddr & IO_PAGE_MASK);
+
+       iopte_protection = IOPTE_VALID | IOPTE_STBUF | IOPTE_CACHE;
+       if (direction != SBUS_DMA_TODEVICE)
+               iopte_protection |= IOPTE_WRITE;
+
+       for (i = 0; i < npages; i++, base++, base_paddr += IO_PAGE_SIZE)
+               iopte_val(*base) = iopte_protection | base_paddr;
+
+       return ret;
 }
 
-void sbus_unmap_single(struct sbus_dev *sdev, dma_addr_t dma_addr, size_t size, int direction)
+void sbus_unmap_single(struct sbus_dev *sdev, dma_addr_t bus_addr, size_t sz, int direction)
 {
        struct sbus_iommu *iommu = sdev->bus->iommu;
-       u32 dma_base = dma_addr & IO_PAGE_MASK;
-       unsigned long flags;
+       iopte_t *base;
+       unsigned long flags, npages, i;
+
+       if (unlikely(direction == SBUS_DMA_NONE))
+               BUG();
+
+       npages = IO_PAGE_ALIGN(bus_addr + sz) - (bus_addr & IO_PAGE_MASK);
+       npages >>= IO_PAGE_SHIFT;
+       base = iommu->page_table +
+               ((bus_addr - MAP_BASE) >> IO_PAGE_SHIFT);
 
-       size = (IO_PAGE_ALIGN(dma_addr + size) - dma_base);
+       bus_addr &= IO_PAGE_MASK;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       free_streaming_cluster(iommu, dma_base, size >> IO_PAGE_SHIFT);
-       sbus_strbuf_flush(iommu, dma_base, size >> IO_PAGE_SHIFT, direction);
+       sbus_strbuf_flush(iommu, bus_addr, npages, direction);
+       for (i = 0; i < npages; i++)
+               iopte_val(base[i]) = 0UL;
+       free_npages(iommu, bus_addr - MAP_BASE, npages);
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
 
 #define SG_ENT_PHYS_ADDRESS(SG)        \
        (__pa(page_address((SG)->page)) + (SG)->offset)
 
-static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, int nelems, unsigned long iopte_bits)
+static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg,
+                          int nused, int nelems, unsigned long iopte_protection)
 {
        struct scatterlist *dma_sg = sg;
        struct scatterlist *sg_end = sg + nelems;
@@ -462,7 +376,7 @@ static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, in
                        for (;;) {
                                unsigned long tmp;
 
-                               tmp = (unsigned long) SG_ENT_PHYS_ADDRESS(sg);
+                               tmp = SG_ENT_PHYS_ADDRESS(sg);
                                len = sg->length;
                                if (((tmp ^ pteval) >> IO_PAGE_SHIFT) != 0UL) {
                                        pteval = tmp & IO_PAGE_MASK;
@@ -478,7 +392,7 @@ static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, in
                                sg++;
                        }
 
-                       pteval = ((pteval & IOPTE_PAGE) | iopte_bits);
+                       pteval = iopte_protection | (pteval & IOPTE_PAGE);
                        while (len > 0) {
                                *iopte++ = __iopte(pteval);
                                pteval += IO_PAGE_SIZE;
@@ -509,103 +423,111 @@ static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, in
        }
 }
 
-int sbus_map_sg(struct sbus_dev *sdev, struct scatterlist *sg, int nents, int dir)
+int sbus_map_sg(struct sbus_dev *sdev, struct scatterlist *sglist, int nelems, int direction)
 {
-       struct sbus_iommu *iommu = sdev->bus->iommu;
-       unsigned long flags, npages;
-       iopte_t *iopte;
+       struct sbus_iommu *iommu;
+       unsigned long flags, npages, iopte_protection;
+       iopte_t *base;
        u32 dma_base;
        struct scatterlist *sgtmp;
        int used;
-       unsigned long iopte_bits;
-
-       if (dir == SBUS_DMA_NONE)
-               BUG();
 
        /* Fast path single entry scatterlists. */
-       if (nents == 1) {
-               sg->dma_address =
+       if (nelems == 1) {
+               sglist->dma_address =
                        sbus_map_single(sdev,
-                                       (page_address(sg->page) + sg->offset),
-                                       sg->length, dir);
-               sg->dma_length = sg->length;
+                                       (page_address(sglist->page) + sglist->offset),
+                                       sglist->length, direction);
+               sglist->dma_length = sglist->length;
                return 1;
        }
 
-       npages = prepare_sg(sg, nents);
+       iommu = sdev->bus->iommu;
+
+       if (unlikely(direction == SBUS_DMA_NONE))
+               BUG();
+
+       npages = prepare_sg(sglist, nelems);
 
        spin_lock_irqsave(&iommu->lock, flags);
-       iopte = alloc_streaming_cluster(iommu, npages);
-       if (iopte == NULL)
-               goto bad;
-       dma_base = MAP_BASE + ((iopte - iommu->page_table) << IO_PAGE_SHIFT);
+       base = alloc_npages(iommu, npages);
+       spin_unlock_irqrestore(&iommu->lock, flags);
+
+       if (unlikely(base == NULL))
+               BUG();
+
+       dma_base = MAP_BASE +
+               ((base - iommu->page_table) << IO_PAGE_SHIFT);
 
        /* Normalize DVMA addresses. */
-       sgtmp = sg;
-       used = nents;
+       used = nelems;
 
+       sgtmp = sglist;
        while (used && sgtmp->dma_length) {
                sgtmp->dma_address += dma_base;
                sgtmp++;
                used--;
        }
-       used = nents - used;
+       used = nelems - used;
 
-       iopte_bits = IOPTE_VALID | IOPTE_STBUF | IOPTE_CACHE;
-       if (dir != SBUS_DMA_TODEVICE)
-               iopte_bits |= IOPTE_WRITE;
+       iopte_protection = IOPTE_VALID | IOPTE_STBUF | IOPTE_CACHE;
+       if (direction != SBUS_DMA_TODEVICE)
+               iopte_protection |= IOPTE_WRITE;
+
+       fill_sg(base, sglist, used, nelems, iopte_protection);
 
-       fill_sg(iopte, sg, used, nents, iopte_bits);
 #ifdef VERIFY_SG
-       verify_sglist(sg, nents, iopte, npages);
+       verify_sglist(sglist, nelems, base, npages);
 #endif
-       spin_unlock_irqrestore(&iommu->lock, flags);
 
        return used;
-
-bad:
-       spin_unlock_irqrestore(&iommu->lock, flags);
-       BUG();
-       return 0;
 }
 
-void sbus_unmap_sg(struct sbus_dev *sdev, struct scatterlist *sg, int nents, int direction)
+void sbus_unmap_sg(struct sbus_dev *sdev, struct scatterlist *sglist, int nelems, int direction)
 {
-       unsigned long size, flags;
        struct sbus_iommu *iommu;
-       u32 dvma_base;
-       int i;
+       iopte_t *base;
+       unsigned long flags, i, npages;
+       u32 bus_addr;
 
-       /* Fast path single entry scatterlists. */
-       if (nents == 1) {
-               sbus_unmap_single(sdev, sg->dma_address, sg->dma_length, direction);
-               return;
-       }
+       if (unlikely(direction == SBUS_DMA_NONE))
+               BUG();
+
+       iommu = sdev->bus->iommu;
+
+       bus_addr = sglist->dma_address & IO_PAGE_MASK;
 
-       dvma_base = sg[0].dma_address & IO_PAGE_MASK;
-       for (i = 0; i < nents; i++) {
-               if (sg[i].dma_length == 0)
+       for (i = 1; i < nelems; i++)
+               if (sglist[i].dma_length == 0)
                        break;
-       }
        i--;
-       size = IO_PAGE_ALIGN(sg[i].dma_address + sg[i].dma_length) - dvma_base;
+       npages = (IO_PAGE_ALIGN(sglist[i].dma_address + sglist[i].dma_length) -
+                 bus_addr) >> IO_PAGE_SHIFT;
+
+       base = iommu->page_table +
+               ((bus_addr - MAP_BASE) >> IO_PAGE_SHIFT);
 
-       iommu = sdev->bus->iommu;
        spin_lock_irqsave(&iommu->lock, flags);
-       free_streaming_cluster(iommu, dvma_base, size >> IO_PAGE_SHIFT);
-       sbus_strbuf_flush(iommu, dvma_base, size >> IO_PAGE_SHIFT, direction);
+       sbus_strbuf_flush(iommu, bus_addr, npages, direction);
+       for (i = 0; i < npages; i++)
+               iopte_val(base[i]) = 0UL;
+       free_npages(iommu, bus_addr - MAP_BASE, npages);
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
 
-void sbus_dma_sync_single_for_cpu(struct sbus_dev *sdev, dma_addr_t base, size_t size, int direction)
+void sbus_dma_sync_single_for_cpu(struct sbus_dev *sdev, dma_addr_t bus_addr, size_t sz, int direction)
 {
-       struct sbus_iommu *iommu = sdev->bus->iommu;
-       unsigned long flags;
+       struct sbus_iommu *iommu;
+       unsigned long flags, npages;
+
+       iommu = sdev->bus->iommu;
 
-       size = (IO_PAGE_ALIGN(base + size) - (base & IO_PAGE_MASK));
+       npages = IO_PAGE_ALIGN(bus_addr + sz) - (bus_addr & IO_PAGE_MASK);
+       npages >>= IO_PAGE_SHIFT;
+       bus_addr &= IO_PAGE_MASK;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       sbus_strbuf_flush(iommu, base & IO_PAGE_MASK, size >> IO_PAGE_SHIFT, direction);
+       sbus_strbuf_flush(iommu, bus_addr, npages, direction);
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
 
@@ -613,23 +535,25 @@ void sbus_dma_sync_single_for_device(struct sbus_dev *sdev, dma_addr_t base, siz
 {
 }
 
-void sbus_dma_sync_sg_for_cpu(struct sbus_dev *sdev, struct scatterlist *sg, int nents, int direction)
+void sbus_dma_sync_sg_for_cpu(struct sbus_dev *sdev, struct scatterlist *sglist, int nelems, int direction)
 {
-       struct sbus_iommu *iommu = sdev->bus->iommu;
-       unsigned long flags, size;
-       u32 base;
-       int i;
+       struct sbus_iommu *iommu;
+       unsigned long flags, npages, i;
+       u32 bus_addr;
+
+       iommu = sdev->bus->iommu;
 
-       base = sg[0].dma_address & IO_PAGE_MASK;
-       for (i = 0; i < nents; i++) {
-               if (sg[i].dma_length == 0)
+       bus_addr = sglist[0].dma_address & IO_PAGE_MASK;
+       for (i = 0; i < nelems; i++) {
+               if (!sglist[i].dma_length)
                        break;
        }
        i--;
-       size = IO_PAGE_ALIGN(sg[i].dma_address + sg[i].dma_length) - base;
+       npages = (IO_PAGE_ALIGN(sglist[i].dma_address + sglist[i].dma_length)
+                 - bus_addr) >> IO_PAGE_SHIFT;
 
        spin_lock_irqsave(&iommu->lock, flags);
-       sbus_strbuf_flush(iommu, base, size >> IO_PAGE_SHIFT, direction);
+       sbus_strbuf_flush(iommu, bus_addr, npages, direction);
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
 
@@ -1104,7 +1028,7 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
        struct linux_prom64_registers *pr;
        struct device_node *dp;
        struct sbus_iommu *iommu;
-       unsigned long regs, tsb_base;
+       unsigned long regs;
        u64 control;
        int i;
 
@@ -1132,14 +1056,6 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
 
        memset(iommu, 0, sizeof(*iommu));
 
-       /* We start with no consistent mappings. */
-       iommu->lowest_consistent_map = CLUSTER_NPAGES;
-
-       for (i = 0; i < NCLUSTERS; i++) {
-               iommu->alloc_info[i].flush = 0;
-               iommu->alloc_info[i].next = 0;
-       }
-
        /* Setup spinlock. */
        spin_lock_init(&iommu->lock);
 
@@ -1159,25 +1075,13 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
               sbus->portid, regs);
 
        /* Setup for TSB_SIZE=7, TBW_SIZE=0, MMU_DE=1, MMU_EN=1 */
+       sbus_iommu_table_init(iommu, IO_TSB_SIZE);
+
        control = upa_readq(iommu->iommu_regs + IOMMU_CONTROL);
        control = ((7UL << 16UL)        |
                   (0UL << 2UL)         |
                   (1UL << 1UL)         |
                   (1UL << 0UL));
-
-       /* Using the above configuration we need 1MB iommu page
-        * table (128K ioptes * 8 bytes per iopte).  This is
-        * page order 7 on UltraSparc.
-        */
-       tsb_base = __get_free_pages(GFP_ATOMIC, get_order(IO_TSB_SIZE));
-       if (tsb_base == 0UL) {
-               prom_printf("sbus_iommu_init: Fatal error, cannot alloc TSB table.\n");
-               prom_halt();
-       }
-
-       iommu->page_table = (iopte_t *) tsb_base;
-       memset(iommu->page_table, 0, IO_TSB_SIZE);
-
        upa_writeq(control, iommu->iommu_regs + IOMMU_CONTROL);
 
        /* Clean out any cruft in the IOMMU using
@@ -1195,7 +1099,7 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
        upa_readq(iommu->sbus_control_reg);
 
        /* Give the TSB to SYSIO. */
-       upa_writeq(__pa(tsb_base), iommu->iommu_regs + IOMMU_TSBBASE);
+       upa_writeq(__pa(iommu->page_table), iommu->iommu_regs + IOMMU_TSBBASE);
 
        /* Setup streaming buffer, DE=1 SB_EN=1 */
        control = (1UL << 1UL) | (1UL << 0UL);
index c09ab4b9431ddf4c2e1552f2e31b90b1d4302b28..010a737908ee51f15fcd27fe1b1a08b072bc8028 100644 (file)
@@ -91,7 +91,6 @@ SIGN1(sys32_select, compat_sys_select, %o0)
 SIGN1(sys32_mkdir, sys_mkdir, %o1)
 SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5)
 SIGN1(sys32_sysfs, compat_sys_sysfs, %o0)
-SIGN3(sys32_ipc, compat_sys_ipc, %o1, %o2, %o3)
 SIGN2(sys32_sendfile, compat_sys_sendfile, %o0, %o1)
 SIGN2(sys32_sendfile64, compat_sys_sendfile64, %o0, %o1)
 SIGN1(sys32_prctl, sys_prctl, %o0)
index 4cff95b7b3a4732cdf1b2405833691b02216bf25..8f7a06e2c7e739dfec3f3206c2b34745f222e3d7 100644 (file)
@@ -871,7 +871,7 @@ asmlinkage s32 sunos_sysconf (int name)
                ret = ARG_MAX;
                break;
        case _SC_CHILD_MAX:
-               ret = -1; /* no limit */
+               ret = current->signal->rlim[RLIMIT_NPROC].rlim_cur;
                break;
        case _SC_CLK_TCK:
                ret = HZ;
@@ -880,7 +880,7 @@ asmlinkage s32 sunos_sysconf (int name)
                ret = NGROUPS_MAX;
                break;
        case _SC_OPEN_MAX:
-               ret = OPEN_MAX;
+               ret = current->signal->rlim[RLIMIT_NOFILE].rlim_cur;
                break;
        case _SC_JOB_CONTROL:
                ret = 1;        /* yes, we do support job control */
index aaeb5e06735c4eb69e28d09126315f025f6f0857..48c36fe6dc624f91a4e85fdbf6129f2da85e4a92 100644 (file)
@@ -62,7 +62,7 @@ sys_call_table32:
 /*200*/        .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir
        .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64
 /*210*/        .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, compat_sys_sysinfo
-       .word sys32_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex
+       .word compat_sys_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex
 /*220*/        .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid
        .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16
 /*230*/        .word sys32_select, compat_sys_time, sys32_splice, compat_sys_stime, compat_sys_statfs64
index bca16e8c95c325d406f7bac43701f611f75837f9..9fcaad6dd11fad2297b342ced72937dd77a555d4 100644 (file)
@@ -363,8 +363,10 @@ asmlinkage int solaris_sysconf(int id)
 {
        switch (id) {
        case SOLARIS_CONFIG_NGROUPS:    return NGROUPS_MAX;
-       case SOLARIS_CONFIG_CHILD_MAX:  return -1; /* no limit */
-       case SOLARIS_CONFIG_OPEN_FILES: return OPEN_MAX;
+       case SOLARIS_CONFIG_CHILD_MAX:
+               return current->signal->rlim[RLIMIT_NPROC].rlim_cur;
+       case SOLARIS_CONFIG_OPEN_FILES:
+               return current->signal->rlim[RLIMIT_NOFILE].rlim_cur;
        case SOLARIS_CONFIG_POSIX_VER:  return 199309;
        case SOLARIS_CONFIG_PAGESIZE:   return PAGE_SIZE;
        case SOLARIS_CONFIG_XOPEN_VER:  return 3;
index 01fa23580c85f4dd707f166dca06f49226924078..7ae18ec12454e05ef4e45c56bb685a42d61559ca 100644 (file)
 *(.text.dentry_open)
 *(.text.dentry_iput)
 *(.text.bio_alloc)
-*(.text.alloc_skb_from_cache)
 *(.text.wait_on_page_bit)
 *(.text.vfs_readdir)
 *(.text.vfs_lstat)
index 8cf0b8a13778ae0e497ffd228fb24f9eef8d163d..b8286968662d0d19d21a99443f604016e0883ce2 100644 (file)
@@ -191,6 +191,7 @@ int hpet_reenable(void)
 
 #define TICK_COUNT 100000000
 #define TICK_MIN   5000
+#define MAX_TRIES  5
 
 /*
  * Some platforms take periodic SMI interrupts with 5ms duration. Make sure none
@@ -198,13 +199,15 @@ int hpet_reenable(void)
  */
 static void __init read_hpet_tsc(int *hpet, int *tsc)
 {
-       int tsc1, tsc2, hpet1;
+       int tsc1, tsc2, hpet1, i;
 
-       do {
+       for (i = 0; i < MAX_TRIES; i++) {
                tsc1 = get_cycles_sync();
                hpet1 = hpet_readl(HPET_COUNTER);
                tsc2 = get_cycles_sync();
-       } while (tsc2 - tsc1 > TICK_MIN);
+               if (tsc2 - tsc1 > TICK_MIN)
+                       break;
+       }
        *hpet = hpet1;
        *tsc = tsc2;
 }
index 6416682d33d08b878ed771ea32d0497aedbdb960..bc11b32e8b4d41fb000692825048d1dcd3a0339c 100644 (file)
@@ -61,8 +61,8 @@ int cache_k8_northbridges(void)
        dev = NULL;
        i = 0;
        while ((dev = next_k8_northbridge(dev)) != NULL) {
-               k8_northbridges[i++] = dev;
-               pci_read_config_dword(dev, 0x9c, &flush_words[i]);
+               k8_northbridges[i] = dev;
+               pci_read_config_dword(dev, 0x9c, &flush_words[i++]);
        }
        k8_northbridges[i] = NULL;
        return 0;
index a90996c27dc87c95844bf8d0e648734b71f587e9..dfab9f1673662ae9dc9963cf1de216402164877d 100644 (file)
@@ -39,15 +39,17 @@ int panic_on_unrecovered_nmi;
  *   different subsystems this reservation system just tries to coordinate
  *   things a little
  */
-static DEFINE_PER_CPU(unsigned, perfctr_nmi_owner);
-static DEFINE_PER_CPU(unsigned, evntsel_nmi_owner[2]);
-
-static cpumask_t backtrace_mask = CPU_MASK_NONE;
 
 /* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's
  * offset from MSR_P4_BSU_ESCR0.  It will be the max for all platforms (for now)
  */
 #define NMI_MAX_COUNTER_BITS 66
+#define NMI_MAX_COUNTER_LONGS BITS_TO_LONGS(NMI_MAX_COUNTER_BITS)
+
+static DEFINE_PER_CPU(unsigned, perfctr_nmi_owner[NMI_MAX_COUNTER_LONGS]);
+static DEFINE_PER_CPU(unsigned, evntsel_nmi_owner[NMI_MAX_COUNTER_LONGS]);
+
+static cpumask_t backtrace_mask = CPU_MASK_NONE;
 
 /* nmi_active:
  * >0: the lapic NMI watchdog is active, but can be disabled
index 2bac8c60ad61e1d5f60ea9b90183af3039a88b7f..0bae862e9a55ec773d42edfe7670df39dfd3f7f5 100644 (file)
@@ -519,7 +519,11 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
        gatt_size = (aper_size >> PAGE_SHIFT) * sizeof(u32); 
        gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size)); 
        if (!gatt) 
-               panic("Cannot allocate GATT table"); 
+               panic("Cannot allocate GATT table");
+       if (change_page_attr_addr((unsigned long)gatt, gatt_size >> PAGE_SHIFT, PAGE_KERNEL_NOCACHE))
+               panic("Could not set GART PTEs to uncacheable pages");
+       global_flush_tlb();
+
        memset(gatt, 0, gatt_size); 
        agp_gatt_table = gatt;
 
index b73212c0a55001d0c24df52442a9b027879e3183..5176ecf006ee42fd71f46f49a781d0a98cc2e588 100644 (file)
@@ -13,7 +13,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
 OUTPUT_ARCH(i386:x86-64)
 ENTRY(phys_startup_64)
 jiffies_64 = jiffies;
-_proxy_pda = 0;
+_proxy_pda = 1;
 PHDRS {
        text PT_LOAD FLAGS(5);  /* R_E */
        data PT_LOAD FLAGS(7);  /* RWE */
index 65c5eaa5990563048b1ac59e04e3dcd645441b5c..081409aa3452bb773f0d6331bd319c6d2b7d231c 100644 (file)
@@ -81,8 +81,8 @@ static void flush_kernel_map(void *arg)
                void *adr = page_address(pg);
                if (cpu_has_clflush)
                        cache_flush_page(adr);
-               __flush_tlb_one(adr);
        }
+       __flush_tlb_all();
 }
 
 static inline void flush_map(struct list_head *l)
index b6491c020f26ec53dedcbed84e20aea0a7aea299..f92ba2a869b4fe32348002cf00260ce6ac943542 100644 (file)
@@ -532,6 +532,12 @@ static void cfq_add_rq_rb(struct request *rq)
 
        if (!cfq_cfqq_on_rr(cfqq))
                cfq_add_cfqq_rr(cfqd, cfqq);
+
+       /*
+        * check if this request is a better next-serve candidate
+        */
+       cfqq->next_rq = cfq_choose_req(cfqd, cfqq->next_rq, rq);
+       BUG_ON(!cfqq->next_rq);
 }
 
 static inline void
@@ -986,9 +992,9 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq,
         * expire an async queue immediately if it has used up its slice. idle
         * queue always expire after 1 dispatch round.
         */
-       if ((!cfq_cfqq_sync(cfqq) &&
+       if (cfqd->busy_queues > 1 && ((!cfq_cfqq_sync(cfqq) &&
            cfqd->dispatch_slice >= cfq_prio_to_maxrq(cfqd, cfqq)) ||
-           cfq_class_idle(cfqq)) {
+           cfq_class_idle(cfqq))) {
                cfqq->slice_end = jiffies + 1;
                cfq_slice_expired(cfqd, 0, 0);
        }
@@ -1051,19 +1057,21 @@ cfq_dispatch_requests(request_queue_t *q, int force)
        while ((cfqq = cfq_select_queue(cfqd)) != NULL) {
                int max_dispatch;
 
-               /*
-                * Don't repeat dispatch from the previous queue.
-                */
-               if (prev_cfqq == cfqq)
-                       break;
+               if (cfqd->busy_queues > 1) {
+                       /*
+                        * Don't repeat dispatch from the previous queue.
+                        */
+                       if (prev_cfqq == cfqq)
+                               break;
 
-               /*
-                * So we have dispatched before in this round, if the
-                * next queue has idling enabled (must be sync), don't
-                * allow it service until the previous have continued.
-                */
-               if (cfqd->rq_in_driver && cfq_cfqq_idle_window(cfqq))
-                       break;
+                       /*
+                        * So we have dispatched before in this round, if the
+                        * next queue has idling enabled (must be sync), don't
+                        * allow it service until the previous have continued.
+                        */
+                       if (cfqd->rq_in_driver && cfq_cfqq_idle_window(cfqq))
+                               break;
+               }
 
                cfq_clear_cfqq_must_dispatch(cfqq);
                cfq_clear_cfqq_wait_request(cfqq);
@@ -1370,7 +1378,9 @@ retry:
                atomic_set(&cfqq->ref, 0);
                cfqq->cfqd = cfqd;
 
-               cfq_mark_cfqq_idle_window(cfqq);
+               if (key != CFQ_KEY_ASYNC)
+                       cfq_mark_cfqq_idle_window(cfqq);
+
                cfq_mark_cfqq_prio_changed(cfqq);
                cfq_mark_cfqq_queue_new(cfqq);
                cfq_init_prio_data(cfqq);
@@ -1634,12 +1644,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
        if (rq_is_meta(rq))
                cfqq->meta_pending++;
 
-       /*
-        * check if this request is a better next-serve candidate)) {
-        */
-       cfqq->next_rq = cfq_choose_req(cfqd, cfqq->next_rq, rq);
-       BUG_ON(!cfqq->next_rq);
-
        /*
         * we never wait for an async request and we don't allow preemption
         * of an async request. so just return early
index 0ae8b9310cbf98d2320dc40800f08b12bb0f7f48..589b98b7b216e5096b9cb74fee45d6ae4035a0c9 100644 (file)
@@ -758,7 +758,8 @@ static void acpi_thermal_check(void *data)
                        del_timer(&(tz->timer));
        } else {
                if (timer_pending(&(tz->timer)))
-                       mod_timer(&(tz->timer), (HZ * sleep_time) / 1000);
+                       mod_timer(&(tz->timer),
+                                       jiffies + (HZ * sleep_time) / 1000);
                else {
                        tz->timer.data = (unsigned long)tz;
                        tz->timer.function = acpi_thermal_run;
index f482078659309edb35c53b5a9ef6048f9a895130..8dc3bc4f5863dc33ea1832083ef3a6325d896b1f 100644 (file)
@@ -878,6 +878,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        struct ata_port_info *port;
        struct pci_dev *host = NULL;
        struct sis_chipset *chipset = NULL;
+       struct sis_chipset *sets;
 
        static struct sis_chipset sis_chipsets[] = {
 
@@ -932,10 +933,11 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 
        /* We have to find the bridge first */
 
-       for (chipset = &sis_chipsets[0]; chipset->device; chipset++) {
-               host = pci_get_device(PCI_VENDOR_ID_SI, chipset->device, NULL);
+       for (sets = &sis_chipsets[0]; sets->device; sets++) {
+               host = pci_get_device(PCI_VENDOR_ID_SI, sets->device, NULL);
                if (host != NULL) {
-                       if (chipset->device == 0x630) { /* SIS630 */
+                       chipset = sets;                 /* Match found */
+                       if (sets->device == 0x630) {    /* SIS630 */
                                u8 host_rev;
                                pci_read_config_byte(host, PCI_REVISION_ID, &host_rev);
                                if (host_rev >= 0x30)   /* 630 ET */
@@ -946,7 +948,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        /* Look for concealed bridges */
-       if (host == NULL) {
+       if (chipset == NULL) {
                /* Second check */
                u32 idemisc;
                u16 trueid;
index fdfa3d0cf6afa6f0bf2fb247f54333abfab8f1fc..bbbb973a9d3cbee5cb79d5083a89ebab58f17477 100644 (file)
@@ -54,7 +54,8 @@ int device_pm_add(struct device * dev)
        int error;
 
        pr_debug("PM: Adding info for %s:%s\n",
-                dev->bus ? dev->bus->name : "No Bus", dev->kobj.name);
+                dev->bus ? dev->bus->name : "No Bus",
+                kobject_name(&dev->kobj));
        down(&dpm_list_sem);
        list_add_tail(&dev->power.entry, &dpm_active);
        device_pm_set_parent(dev, dev->parent);
@@ -67,7 +68,8 @@ int device_pm_add(struct device * dev)
 void device_pm_remove(struct device * dev)
 {
        pr_debug("PM: Removing info for %s:%s\n",
-                dev->bus ? dev->bus->name : "No Bus", dev->kobj.name);
+                dev->bus ? dev->bus->name : "No Bus",
+                kobject_name(&dev->kobj));
        down(&dpm_list_sem);
        dpm_sysfs_remove(dev);
        put_device(dev->power.pm_parent);
index 14d780666c0a40257e4c6aa4dbb2a06d460b462c..65a725cd3422ec565d9508de378d32cb9c52ffd5 100644 (file)
@@ -3423,6 +3423,25 @@ static void cciss_remove_one(struct pci_dev *pdev)
                       "already be removed \n");
                return;
        }
+
+       remove_proc_entry(hba[i]->devname, proc_cciss);
+       unregister_blkdev(hba[i]->major, hba[i]->devname);
+
+       /* remove it from the disk list */
+       for (j = 0; j < CISS_MAX_LUN; j++) {
+               struct gendisk *disk = hba[i]->gendisk[j];
+               if (disk) {
+                       request_queue_t *q = disk->queue;
+
+                       if (disk->flags & GENHD_FL_UP)
+                               del_gendisk(disk);
+                       if (q)
+                               blk_cleanup_queue(q);
+               }
+       }
+
+       cciss_unregister_scsi(i);       /* unhook from SCSI subsystem */
+
        /* Turn board interrupts off  and send the flush cache command */
        /* sendcmd will turn off interrupt, and send the flush...
         * To write all data in the battery backed cache to disks */
@@ -3444,22 +3463,6 @@ static void cciss_remove_one(struct pci_dev *pdev)
 #endif                         /* CONFIG_PCI_MSI */
 
        iounmap(hba[i]->vaddr);
-       cciss_unregister_scsi(i);       /* unhook from SCSI subsystem */
-       unregister_blkdev(hba[i]->major, hba[i]->devname);
-       remove_proc_entry(hba[i]->devname, proc_cciss);
-
-       /* remove it from the disk list */
-       for (j = 0; j < CISS_MAX_LUN; j++) {
-               struct gendisk *disk = hba[i]->gendisk[j];
-               if (disk) {
-                       request_queue_t *q = disk->queue;
-
-                       if (disk->flags & GENHD_FL_UP)
-                               del_gendisk(disk);
-                       if (q)
-                               blk_cleanup_queue(q);
-               }
-       }
 
        pci_free_consistent(hba[i]->pdev, hba[i]->nr_cmds * sizeof(CommandList_struct),
                            hba[i]->cmd_pool, hba[i]->cmd_pool_dhandle);
index c852eed91e4b6d82cdea3950271abc17e7f4762d..1eeb8f2cde71e1b05cc988e4a728dbf99e5ef618 100644 (file)
@@ -140,7 +140,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY};
 #include <linux/blkdev.h>
 #include <asm/uaccess.h>
 
-static spinlock_t pcd_lock;
+static DEFINE_SPINLOCK(pcd_lock);
 
 module_param(verbose, bool, 0644);
 module_param(major, int, 0);
index 7cdaa19512605d7cc28356d41132426ca0953630..5826508f6731772e8260e8edf8809dab6a11ce4a 100644 (file)
@@ -154,7 +154,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_LUN, D_DLY};
 #include <linux/blkpg.h>
 #include <asm/uaccess.h>
 
-static spinlock_t pf_spin_lock;
+static DEFINE_SPINLOCK(pf_spin_lock);
 
 module_param(verbose, bool, 0644);
 module_param(major, int, 0);
index a4fb7038318817d02b6d39f83c5ccf8e004408dd..f1b9dd7d47d62c00868acdba0927d68a0c8777e0 100644 (file)
@@ -777,7 +777,8 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
                rq->cmd_flags |= REQ_QUIET;
 
        blk_execute_rq(rq->q, pd->bdev->bd_disk, rq, 0);
-       ret = rq->errors;
+       if (rq->errors)
+               ret = -EIO;
 out:
        blk_put_request(rq);
        return ret;
index a9fdbf9126caf58b919912529f5cea509cb09f43..55392a45a14b5d1c3e033bd8d3c11af8801b2a61 100644 (file)
@@ -431,9 +431,8 @@ static void intel_i830_init_gtt_entries(void)
 
        if (IS_I965) {
                u32 pgetbl_ctl;
+               pgetbl_ctl = readl(intel_i830_private.registers+I810_PGETBL_CTL);
 
-               pci_read_config_dword(agp_bridge->dev, I810_PGETBL_CTL,
-                                     &pgetbl_ctl);
                /* The 965 has a field telling us the size of the GTT,
                 * which may be larger than what is necessary to map the
                 * aperture.
index f5c160caf9f480978db2cb0698192268433370ae..5f066963f171b5c9ff3a321b77e32798ee14be39 100644 (file)
@@ -248,7 +248,7 @@ static unsigned long get_unmapped_area_mem(struct file *file,
 {
        if (!valid_mmap_phys_addr_range(pgoff, len))
                return (unsigned long) -EINVAL;
-       return pgoff;
+       return pgoff << PAGE_SHIFT;
 }
 
 /* can't do an in-place private mapping if there's no MMU */
index a61fb6da5d03f0b757b93c45893f01a8d031ddc8..80a01150b86c40674d9f0158062b2e91bdbff676 100644 (file)
@@ -1338,43 +1338,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
                 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
                 * Caller should use TIOCGICOUNT to see which one it was
                 */
-       case TIOCMIWAIT: {
-                       DECLARE_WAITQUEUE(wait, current);
-                       int ret;
+       case TIOCMIWAIT:
+               spin_lock_irqsave(&info->slock, flags);
+               cnow = info->icount;    /* note the counters on entry */
+               spin_unlock_irqrestore(&info->slock, flags);
+
+               wait_event_interruptible(info->delta_msr_wait, ({
+                       cprev = cnow;
                        spin_lock_irqsave(&info->slock, flags);
-                       cprev = info->icount;   /* note the counters on entry */
+                       cnow = info->icount;    /* atomic copy */
                        spin_unlock_irqrestore(&info->slock, flags);
 
-                       add_wait_queue(&info->delta_msr_wait, &wait);
-                       while (1) {
-                               spin_lock_irqsave(&info->slock, flags);
-                               cnow = info->icount;    /* atomic copy */
-                               spin_unlock_irqrestore(&info->slock, flags);
-
-                               set_current_state(TASK_INTERRUPTIBLE);
-                               if (((arg & TIOCM_RNG) &&
-                                               (cnow.rng != cprev.rng)) ||
-                                               ((arg & TIOCM_DSR) &&
-                                               (cnow.dsr != cprev.dsr)) ||
-                                               ((arg & TIOCM_CD) &&
-                                               (cnow.dcd != cprev.dcd)) ||
-                                               ((arg & TIOCM_CTS) &&
-                                               (cnow.cts != cprev.cts))) {
-                                       ret = 0;
-                                       break;
-                               }
-                               /* see if a signal did it */
-                               if (signal_pending(current)) {
-                                       ret = -ERESTARTSYS;
-                                       break;
-                               }
-                               cprev = cnow;
-                       }
-                       current->state = TASK_RUNNING;
-                       remove_wait_queue(&info->delta_msr_wait, &wait);
-                       break;
-               }
-               /* NOTREACHED */
+                       ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+                       ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+                       ((arg & TIOCM_CD)  && (cnow.dcd != cprev.dcd)) ||
+                       ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts));
+               }));
+               break;
                /*
                 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
                 * Return: write counters to the user passed counter struct
index 9af07e4999d5f0cac406a3f2200adad82b27dcca..f7603b6aeb87e3ec526d6550ce9ce2d1e42aa600 100644 (file)
@@ -1758,43 +1758,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
                 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
                 * Caller should use TIOCGICOUNT to see which one it was
                 */
-       case TIOCMIWAIT: {
-               DECLARE_WAITQUEUE(wait, current);
-               int ret;
+       case TIOCMIWAIT:
                spin_lock_irqsave(&info->slock, flags);
-               cprev = info->icount;   /* note the counters on entry */
+               cnow = info->icount;    /* note the counters on entry */
                spin_unlock_irqrestore(&info->slock, flags);
 
-               add_wait_queue(&info->delta_msr_wait, &wait);
-               while (1) {
+               wait_event_interruptible(info->delta_msr_wait, ({
+                       cprev = cnow;
                        spin_lock_irqsave(&info->slock, flags);
                        cnow = info->icount;    /* atomic copy */
                        spin_unlock_irqrestore(&info->slock, flags);
 
-                       set_current_state(TASK_INTERRUPTIBLE);
-                       if (((arg & TIOCM_RNG) &&
-                                       (cnow.rng != cprev.rng)) ||
-                                       ((arg & TIOCM_DSR) &&
-                                       (cnow.dsr != cprev.dsr)) ||
-                                       ((arg & TIOCM_CD) &&
-                                       (cnow.dcd != cprev.dcd)) ||
-                                       ((arg & TIOCM_CTS) &&
-                                       (cnow.cts != cprev.cts))) {
-                               ret = 0;
-                               break;
-                       }
-                       /* see if a signal did it */
-                       if (signal_pending(current)) {
-                               ret = -ERESTARTSYS;
-                               break;
-                       }
-                       cprev = cnow;
-               }
-               current->state = TASK_RUNNING;
-               remove_wait_queue(&info->delta_msr_wait, &wait);
+                       ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+                       ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+                       ((arg & TIOCM_CD)  && (cnow.dcd != cprev.dcd)) ||
+                       ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts));
+               }));
                break;
-       }
-       /* NOTREACHED */
        /*
         * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
         * Return: write counters to the user passed counter struct
@@ -2230,7 +2210,14 @@ end_intr:
        port->mon_data.rxcnt += cnt;
        port->mon_data.up_rxcnt += cnt;
 
+       /*
+        * We are called from an interrupt context with &port->slock
+        * being held. Drop it temporarily in order to prevent
+        * recursive locking.
+        */
+       spin_unlock(&port->slock);
        tty_flip_buffer_push(tty);
+       spin_lock(&port->slock);
 }
 
 static void mxser_transmit_chars(struct mxser_port *port)
index 67f3347afcf35620d941a893183f0883f0392f00..1cca32f46947e0675ea7b77ea28b043393ef3f75 100644 (file)
@@ -969,7 +969,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
 
        if (size < rsize) {
                dbg("report %d is too short, (%d < %d)", report->id, size, rsize);
-               return -1;
+               memset(data + size, 0, rsize - size);
        }
 
        if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event)
index da5828f2dfc200d50381498e053bcb2fbdb05642..30a76404f0af31f965d4f48387b64e744ea73f27 100644 (file)
@@ -121,9 +121,9 @@ superio_exit(void)
  * ISA constants
  */
 
-#define REGION_ALIGNMENT       ~7
-#define REGION_OFFSET          5
-#define REGION_LENGTH          2
+#define IOREGION_ALIGNMENT     ~7
+#define IOREGION_OFFSET                5
+#define IOREGION_LENGTH                2
 #define ADDR_REG_OFFSET                5
 #define DATA_REG_OFFSET                6
 
@@ -407,7 +407,7 @@ static void w83627ehf_write_fan_div(struct i2c_client *client, int nr)
                break;
        case 4:
                reg = (w83627ehf_read_value(client, W83627EHF_REG_DIODE) & 0x73)
-                   | ((data->fan_div[4] & 0x03) << 3)
+                   | ((data->fan_div[4] & 0x03) << 2)
                    | ((data->fan_div[4] & 0x04) << 5);
                w83627ehf_write_value(client, W83627EHF_REG_DIODE, reg);
                break;
@@ -471,9 +471,9 @@ static struct w83627ehf_data *w83627ehf_update_device(struct device *dev)
                           time */
                        if (data->fan[i] == 0xff
                         && data->fan_div[i] < 0x07) {
-                               dev_dbg(&client->dev, "Increasing fan %d "
+                               dev_dbg(&client->dev, "Increasing fan%d "
                                        "clock divider from %u to %u\n",
-                                       i, div_from_reg(data->fan_div[i]),
+                                       i + 1, div_from_reg(data->fan_div[i]),
                                        div_from_reg(data->fan_div[i] + 1));
                                data->fan_div[i]++;
                                w83627ehf_write_fan_div(client, i);
@@ -1194,7 +1194,7 @@ static int w83627ehf_detect(struct i2c_adapter *adapter)
        u8 fan4pin, fan5pin;
        int i, err = 0;
 
-       if (!request_region(address + REGION_OFFSET, REGION_LENGTH,
+       if (!request_region(address + IOREGION_OFFSET, IOREGION_LENGTH,
                            w83627ehf_driver.driver.name)) {
                err = -EBUSY;
                goto exit;
@@ -1322,7 +1322,7 @@ exit_remove:
 exit_free:
        kfree(data);
 exit_release:
-       release_region(address + REGION_OFFSET, REGION_LENGTH);
+       release_region(address + IOREGION_OFFSET, IOREGION_LENGTH);
 exit:
        return err;
 }
@@ -1337,7 +1337,7 @@ static int w83627ehf_detach_client(struct i2c_client *client)
 
        if ((err = i2c_detach_client(client)))
                return err;
-       release_region(client->addr + REGION_OFFSET, REGION_LENGTH);
+       release_region(client->addr + IOREGION_OFFSET, IOREGION_LENGTH);
        kfree(data);
 
        return 0;
@@ -1380,7 +1380,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr)
        superio_select(W83627EHF_LD_HWM);
        val = (superio_inb(SIO_REG_ADDR) << 8)
            | superio_inb(SIO_REG_ADDR + 1);
-       *addr = val & REGION_ALIGNMENT;
+       *addr = val & IOREGION_ALIGNMENT;
        if (*addr == 0) {
                superio_exit();
                return -ENODEV;
index fb19dbb31e427fa29642aeacf592ad515b74f50a..ece31d2c6c64fde3a50b48c0db7bf6c13af18af7 100644 (file)
@@ -344,8 +344,7 @@ config I2C_PARPORT_LIGHT
 
 config I2C_PASEMI
        tristate "PA Semi SMBus interface"
-#      depends on PPC_PASEMI && I2C && PCI
-       depends on I2C && PCI
+       depends on PPC_PASEMI && I2C && PCI
        help
          Supports the PA Semi PWRficient on-chip SMBus interfaces.
 
index f54fb5d65cc47c3e90aacd1056ff27dd95a4e8a5..bf89eeef74e9f83c7fcd5d687304050c0492d68b 100644 (file)
@@ -141,7 +141,7 @@ static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter,
                for (i = 0; i < msg->len - 1; i++)
                        TXFIFO_WR(smbus, msg->buf[i]);
 
-               TXFIFO_WR(smbus, msg->buf[msg->len] |
+               TXFIFO_WR(smbus, msg->buf[msg->len-1] |
                          (stop ? MTXFIFO_STOP : 0));
        }
 
@@ -226,7 +226,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter,
                        rd = RXFIFO_RD(smbus);
                        len = min_t(u8, (rd & MRXFIFO_DATA_M),
                                    I2C_SMBUS_BLOCK_MAX);
-                       TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ |
+                       TXFIFO_WR(smbus, len | MTXFIFO_READ |
                                         MTXFIFO_STOP);
                } else {
                        len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX);
@@ -258,7 +258,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter,
                rd = RXFIFO_RD(smbus);
                len = min_t(u8, (rd & MRXFIFO_DATA_M),
                            I2C_SMBUS_BLOCK_MAX - len);
-               TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ | MTXFIFO_STOP);
+               TXFIFO_WR(smbus, len | MTXFIFO_READ | MTXFIFO_STOP);
                break;
 
        default:
index ca2e4f830c392b01491248362c834901f73f920a..5bdf64b779134d555508891dbe49e7a55651f904 100644 (file)
@@ -57,6 +57,7 @@ if IDE
 config IDE_MAX_HWIFS
        int "Max IDE interfaces"
        depends on ALPHA || SUPERH || IA64 || EMBEDDED
+       range 1 10
        default 4
        help
          This is the maximum number of IDE hardware interfaces that will
index 45a928c058cfb0b21c5b150127458d4fb9256773..638becda81c6206fa1413bac1003842e6d8664eb 100644 (file)
@@ -735,6 +735,15 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
                        cdrom_saw_media_change (drive);
                        /*printk("%s: media changed\n",drive->name);*/
                        return 0;
+               } else if ((sense_key == ILLEGAL_REQUEST) &&
+                          (rq->cmd[0] == GPCMD_START_STOP_UNIT)) {
+                       /*
+                        * Don't print error message for this condition--
+                        * SFF8090i indicates that 5/24/00 is the correct
+                        * response to a request to close the tray if the
+                        * drive doesn't have that capability.
+                        * cdrom_log_sense() knows this!
+                        */
                } else if (!(rq->cmd_flags & REQ_QUIET)) {
                        /* Otherwise, print an error. */
                        ide_dump_status(drive, "packet command error", stat);
index 0e0280076fcde4b1274d5dee331e547509a3f335..8670112f1d3947a579fef59d59ec431485c9d288 100644 (file)
@@ -1226,6 +1226,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
 #endif
                                /* so that ide_timer_expiry knows what to do */
                                hwgroup->sleeping = 1;
+                               hwgroup->req_gen_timer = hwgroup->req_gen;
                                mod_timer(&hwgroup->timer, sleep);
                                /* we purposely leave hwgroup->busy==1
                                 * while sleeping */
@@ -1411,7 +1412,8 @@ void ide_timer_expiry (unsigned long data)
 
        spin_lock_irqsave(&ide_lock, flags);
 
-       if ((handler = hwgroup->handler) == NULL) {
+       if (((handler = hwgroup->handler) == NULL) ||
+           (hwgroup->req_gen != hwgroup->req_gen_timer)) {
                /*
                 * Either a marginal timeout occurred
                 * (got the interrupt just as timer expired),
@@ -1439,6 +1441,7 @@ void ide_timer_expiry (unsigned long data)
                                if ((wait = expiry(drive)) > 0) {
                                        /* reset timer */
                                        hwgroup->timer.expires  = jiffies + wait;
+                                       hwgroup->req_gen_timer = hwgroup->req_gen;
                                        add_timer(&hwgroup->timer);
                                        spin_unlock_irqrestore(&ide_lock, flags);
                                        return;
@@ -1653,6 +1656,7 @@ irqreturn_t ide_intr (int irq, void *dev_id)
                printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name);
        }
        hwgroup->handler = NULL;
+       hwgroup->req_gen++;
        del_timer(&hwgroup->timer);
        spin_unlock(&ide_lock);
 
index 1ee53a551c3adf6fe6397aea0945c5f1f4cbff20..3caa176b31553bd4b2b79cee575aa9b4c8a43595 100644 (file)
@@ -889,6 +889,7 @@ static void __ide_set_handler (ide_drive_t *drive, ide_handler_t *handler,
        hwgroup->handler        = handler;
        hwgroup->expiry         = expiry;
        hwgroup->timer.expires  = jiffies + timeout;
+       hwgroup->req_gen_timer = hwgroup->req_gen;
        add_timer(&hwgroup->timer);
 }
 
@@ -929,6 +930,7 @@ void ide_execute_command(ide_drive_t *drive, task_ioreg_t cmd, ide_handler_t *ha
        hwgroup->handler        = handler;
        hwgroup->expiry         = expiry;
        hwgroup->timer.expires  = jiffies + timeout;
+       hwgroup->req_gen_timer = hwgroup->req_gen;
        add_timer(&hwgroup->timer);
        hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG);
        /* Drive takes 400nS to respond, we must avoid the IRQ being
index a6f098fda884719b1b51b0341238a752d1b6d23d..ae5bf2be6f52b158597aadd6b57245b746824f43 100644 (file)
@@ -1962,6 +1962,8 @@ static char *media_string(ide_drive_t *drive)
                return "tape";
        case ide_floppy:
                return "floppy";
+       case ide_optical:
+               return "optical";
        default:
                return "UNKNOWN";
        }
index d4b753e70119725625997049347fef1c1a78361a..dd7ec37fdeab2d14ea76e855f7dd57e0961c84b1 100644 (file)
@@ -108,6 +108,7 @@ delkin_cb_remove (struct pci_dev *dev)
 
 static struct pci_device_id delkin_cb_pci_tbl[] __devinitdata = {
        { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        { 0, },
 };
 MODULE_DEVICE_TABLE(pci, delkin_cb_pci_tbl);
index 60ecdc258c7cbc1272edff2082c0e97c17ba98d4..ab6fa271aeb3f5ab36f87c846fe4775126cff6ed 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * linux/drivers/ide/pci/hpt366.c              Version 1.01    Dec 23, 2006
+ * linux/drivers/ide/pci/hpt366.c              Version 1.02    Apr 18, 2007
  *
  * Copyright (C) 1999-2003             Andre Hedrick <andre@linux-ide.org>
  * Portions Copyright (C) 2001         Sun Microsystems, Inc.
  * Portions Copyright (C) 2003         Red Hat Inc
- * Portions Copyright (C) 2005-2006    MontaVista Software, Inc.
+ * Portions Copyright (C) 2005-2007    MontaVista Software, Inc.
  *
  * Thanks to HighPoint Technologies for their assistance, and hardware.
  * Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
@@ -494,6 +494,7 @@ static struct hpt_info hpt302n __devinitdata = {
        .chip_type      = HPT302N,
        .max_mode       = HPT302_ALLOW_ATA133_6 ? 4 : 3,
        .dpll_clk       = 77,
+       .settings       = hpt37x_settings
 };
 
 static struct hpt_info hpt371n __devinitdata = {
index b8a47342cd2ca33c08ccf20180e66f44c754d331..cd84a55ecf2020dfad052d88bfe9fabdad20a9ad 100644 (file)
@@ -138,9 +138,9 @@ config IEEE1394_DV1394
        tristate "OHCI-DV I/O support (deprecated)"
        depends on IEEE1394 && IEEE1394_OHCI1394
        help
-         The dv1394 driver will be removed from Linux in a future release.
-         Its functionality is now provided by raw1394 together with libraries
-         such as libiec61883.
+         The dv1394 driver is unsupported and may be removed from Linux in a
+         future release.  Its functionality is now provided by raw1394 together
+         with libraries such as libiec61883.
 
 config IEEE1394_RAWIO
        tristate "Raw IEEE1394 I/O support"
index dee9529aa8e7e3a742e1223fc4bd51d63f87c6fd..026e38face5c7d18a13274c451b3c6638af4bd6a 100644 (file)
@@ -2564,8 +2564,8 @@ static int __init dv1394_init_module(void)
        int ret;
 
        printk(KERN_WARNING
-              "WARNING: The dv1394 driver is unsupported and will be removed "
-              "from Linux soon. Use raw1394 instead.\n");
+              "NOTE: The dv1394 driver is unsupported and may be removed in a "
+              "future Linux release. Use raw1394 instead.\n");
 
        cdev_init(&dv1394_cdev, &dv1394_fops);
        dv1394_cdev.owner = THIS_MODULE;
index d0ed1d35ca3ebda4a171393fd1c6122aa916e9dd..2d2de9b8b7293eb6042fea3f350ffb0acea52ec7 100644 (file)
@@ -2026,6 +2026,17 @@ static int sched(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
        return 0;
 }
 
+static int set_tcb_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
+{
+       struct cpl_set_tcb_rpl *rpl = cplhdr(skb);
+
+       if (rpl->status != CPL_ERR_NONE) {
+               printk(KERN_ERR MOD "Unexpected SET_TCB_RPL status %u "
+                      "for tid %u\n", rpl->status, GET_TID(rpl));
+       }
+       return CPL_RET_BUF_DONE;
+}
+
 int __init iwch_cm_init(void)
 {
        skb_queue_head_init(&rxq);
@@ -2053,6 +2064,7 @@ int __init iwch_cm_init(void)
        t3c_handlers[CPL_ABORT_REQ_RSS] = sched;
        t3c_handlers[CPL_RDMA_TERMINATE] = sched;
        t3c_handlers[CPL_RDMA_EC_STATUS] = sched;
+       t3c_handlers[CPL_SET_TCB_RPL] = set_tcb_rpl;
 
        /*
         * These are the real handlers that are called from a
index fdb576dcfaa852bd859d8c4ed8d72f9141148c5f..ee561c569d5f0c95c17fc2fe659274d9069696ba 100644 (file)
@@ -835,6 +835,7 @@ void mthca_arbel_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr)
 
        key = arbel_key_to_hw_index(fmr->ibmr.lkey);
        key &= dev->limits.num_mpts - 1;
+       key = adjust_key(dev, key);
        fmr->ibmr.lkey = fmr->ibmr.rkey = arbel_hw_index_to_key(key);
 
        fmr->maps = 0;
index e70492db74f636eadd46a52bbc951a33e85e09bc..2b242a4823f8d42525323d3fac318f2c33851c17 100644 (file)
@@ -131,7 +131,7 @@ static struct sk_buff *ipoib_cm_alloc_rx_skb(struct net_device *dev, int id, int
                skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE);
 
                mapping[i + 1] = ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[i].page,
-                                                0, PAGE_SIZE, DMA_TO_DEVICE);
+                                                0, PAGE_SIZE, DMA_FROM_DEVICE);
                if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1])))
                        goto partial_error;
        }
index cae8c96a55f8dbb77cd43a36ab4a3b166dc0fb46..8960196ffb0fb198f4904384d07588ad9642d478 100644 (file)
@@ -245,7 +245,6 @@ struct iser_conn {
        wait_queue_head_t            wait;          /* waitq for conn/disconn  */
        atomic_t                     post_recv_buf_count; /* posted rx count   */
        atomic_t                     post_send_buf_count; /* posted tx count   */
-       struct work_struct           comperror_work; /* conn term sleepable ctx*/
        char                         name[ISER_OBJECT_NAME_SIZE];
        struct iser_page_vec         *page_vec;     /* represents SG to fmr maps*
                                                     * maps serialized as tx is*/
index 693b770028971102d0e364919f7091d776ed6abb..1fc967464a2810a6d45a3b45acab9b7cbc6a02e3 100644 (file)
@@ -48,7 +48,6 @@
 
 static void iser_cq_tasklet_fn(unsigned long data);
 static void iser_cq_callback(struct ib_cq *cq, void *cq_context);
-static void iser_comp_error_worker(struct work_struct *work);
 
 static void iser_cq_event_callback(struct ib_event *cause, void *context)
 {
@@ -480,7 +479,6 @@ int iser_conn_init(struct iser_conn **ibconn)
        init_waitqueue_head(&ib_conn->wait);
        atomic_set(&ib_conn->post_recv_buf_count, 0);
        atomic_set(&ib_conn->post_send_buf_count, 0);
-       INIT_WORK(&ib_conn->comperror_work, iser_comp_error_worker);
        INIT_LIST_HEAD(&ib_conn->conn_list);
        spin_lock_init(&ib_conn->lock);
 
@@ -753,26 +751,6 @@ int iser_post_send(struct iser_desc *tx_desc)
        return ret_val;
 }
 
-static void iser_comp_error_worker(struct work_struct *work)
-{
-       struct iser_conn *ib_conn =
-               container_of(work, struct iser_conn, comperror_work);
-
-       /* getting here when the state is UP means that the conn is being *
-        * terminated asynchronously from the iSCSI layer's perspective.  */
-       if (iser_conn_state_comp_exch(ib_conn, ISER_CONN_UP,
-                                     ISER_CONN_TERMINATING))
-               iscsi_conn_failure(ib_conn->iser_conn->iscsi_conn,
-                                       ISCSI_ERR_CONN_FAILED);
-
-       /* complete the termination process if disconnect event was delivered *
-        * note there are no more non completed posts to the QP               */
-       if (ib_conn->disc_evt_flag) {
-               ib_conn->state = ISER_CONN_DOWN;
-               wake_up_interruptible(&ib_conn->wait);
-       }
-}
-
 static void iser_handle_comp_error(struct iser_desc *desc)
 {
        struct iser_dto  *dto     = &desc->dto;
@@ -791,8 +769,22 @@ static void iser_handle_comp_error(struct iser_desc *desc)
        }
 
        if (atomic_read(&ib_conn->post_recv_buf_count) == 0 &&
-           atomic_read(&ib_conn->post_send_buf_count) == 0)
-               schedule_work(&ib_conn->comperror_work);
+           atomic_read(&ib_conn->post_send_buf_count) == 0) {
+               /* getting here when the state is UP means that the conn is *
+                * being terminated asynchronously from the iSCSI layer's   *
+                * perspective.                                             */
+               if (iser_conn_state_comp_exch(ib_conn, ISER_CONN_UP,
+                   ISER_CONN_TERMINATING))
+                       iscsi_conn_failure(ib_conn->iser_conn->iscsi_conn,
+                                          ISCSI_ERR_CONN_FAILED);
+
+               /* complete the termination process if disconnect event was delivered *
+                * note there are no more non completed posts to the QP               */
+               if (ib_conn->disc_evt_flag) {
+                       ib_conn->state = ISER_CONN_DOWN;
+                       wake_up_interruptible(&ib_conn->wait);
+               }
+       }
 }
 
 static void iser_cq_tasklet_fn(unsigned long data)
index c7db4032ef02e5a09f4ddd98fd93d28753c96935..e8606c48c9c31b6aa1f18736e24b967d69ee3fe6 100644 (file)
@@ -553,6 +553,7 @@ static int ucb1400_ts_remove(struct device *dev)
 }
 
 static struct device_driver ucb1400_ts_driver = {
+       .name           = "ucb1400_ts",
        .owner          = THIS_MODULE,
        .bus            = &ac97_bus_type,
        .probe          = ucb1400_ts_probe,
index e85b4c7c36f7139bc20a7bcb3138ac4edb654acd..cab26f301eab5caed62b1a3dcf8c4c7896b23d8b 100644 (file)
@@ -1171,6 +1171,7 @@ void kvm_mmu_pre_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes)
                         * and zap two pdes instead of one.
                         */
                        if (level == PT32_ROOT_LEVEL) {
+                               page_offset &= ~7; /* kill rounding error */
                                page_offset <<= 1;
                                npte = 2;
                        }
index 3096836d8bd3309e35b459d2684b6688838ff58e..c9f3dc4fd3ee47a567d8087e9064efd55cf078bd 100644 (file)
@@ -1259,9 +1259,9 @@ static int smu_release(struct inode *inode, struct file *file)
                        set_current_state(TASK_UNINTERRUPTIBLE);
                        if (pp->cmd.status != 1)
                                break;
-                       spin_lock_irqsave(&pp->lock, flags);
-                       schedule();
                        spin_unlock_irqrestore(&pp->lock, flags);
+                       schedule();
+                       spin_lock_irqsave(&pp->lock, flags);
                }
                set_current_state(TASK_RUNNING);
                remove_wait_queue(&pp->wait, &wait);
index 5554adaa58f9be01d37bc5623f63384c084e69de..e61e0efe9ec71db54a91916d978ecbda05ec1314 100644 (file)
@@ -863,9 +863,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
 
        /* We need 4 bits per page, rounded up to a multiple of sizeof(unsigned long) */
        bitmap->filemap_attr = kzalloc(
-               (((num_pages*4/8)+sizeof(unsigned long)-1)
-                /sizeof(unsigned long))
-               *sizeof(unsigned long),
+               roundup( DIV_ROUND_UP(num_pages*4, 8), sizeof(unsigned long)),
                GFP_KERNEL);
        if (!bitmap->filemap_attr)
                goto out;
index 9511a31c8f506bc90296133a8974564191c4ccbb..68ed3a788083dd1a69124fa430e440c49d55bd49 100644 (file)
@@ -107,8 +107,6 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)
                return -ENOMEM;
 
        input_dev->evbit[0] = BIT(EV_KEY);
-       input_dev->keycodesize = sizeof(unsigned char);
-       input_dev->keycodemax = KEY_MAX;
        input_dev->name = "IR-receiver inside an USB DVB receiver";
        input_dev->phys = d->rc_phys;
        usb_to_input_id(d->udev, &input_dev->id);
index 4b232124a1abb0dea3b9e737062250e3988b968c..65c32a95e121360d3288e95fc5b96792538084ad 100644 (file)
@@ -3,7 +3,7 @@
  *
  *
  *  Copyright (C) 2002-2005 Julien Lerouge, 2003-2006 Karol Kozimor
- *  Copyright (C) 2006 Corentin Chary
+ *  Copyright (C) 2006-2007 Corentin Chary
  *
  *  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
@@ -48,7 +48,7 @@
 #include <acpi/acpi_bus.h>
 #include <asm/uaccess.h>
 
-#define ASUS_LAPTOP_VERSION "0.40"
+#define ASUS_LAPTOP_VERSION "0.41"
 
 #define ASUS_HOTK_NAME          "Asus Laptop Support"
 #define ASUS_HOTK_CLASS         "hotkey"
@@ -81,7 +81,8 @@
 #define TLED_ON     0x08       //touchpad LED
 #define RLED_ON     0x10       //Record LED
 #define PLED_ON     0x20       //Phone LED
-#define LCD_ON      0x40       //LCD backlight
+#define GLED_ON     0x40       //Gaming LED
+#define LCD_ON      0x80       //LCD backlight
 
 #define ASUS_LOG    ASUS_HOTK_FILE ": "
 #define ASUS_ERR    KERN_ERR    ASUS_LOG
@@ -94,6 +95,19 @@ MODULE_AUTHOR("Julien Lerouge, Karol Kozimor, Corentin Chary");
 MODULE_DESCRIPTION(ASUS_HOTK_NAME);
 MODULE_LICENSE("GPL");
 
+/* WAPF defines the behavior of the Fn+Fx wlan key
+ * The significance of values is yet to be found, but
+ * most of the time:
+ * 0x0 will do nothing
+ * 0x1 will allow to control the device with Fn+Fx key.
+ * 0x4 will send an ACPI event (0x88) while pressing the Fn+Fx key
+ * 0x5 like 0x1 or 0x4
+ * So, if something doesn't work as you want, just try other values =)
+ */
+static uint wapf = 1;
+module_param(wapf, uint, 0644);
+MODULE_PARM_DESC(wapf, "WAPF value");
+
 #define ASUS_HANDLE(object, paths...)                                  \
        static acpi_handle  object##_handle = NULL;                     \
        static char *object##_paths[] = { paths }
@@ -103,6 +117,7 @@ ASUS_HANDLE(mled_set, ASUS_HOTK_PREFIX "MLED");
 ASUS_HANDLE(tled_set, ASUS_HOTK_PREFIX "TLED");
 ASUS_HANDLE(rled_set, ASUS_HOTK_PREFIX "RLED");        /* W1JC */
 ASUS_HANDLE(pled_set, ASUS_HOTK_PREFIX "PLED");        /* A7J */
+ASUS_HANDLE(gled_set, ASUS_HOTK_PREFIX "GLED");        /* G1, G2 (probably) */
 
 /* LEDD */
 ASUS_HANDLE(ledd_set, ASUS_HOTK_PREFIX "SLCM");
@@ -221,6 +236,7 @@ ASUS_LED(mled, "mail");
 ASUS_LED(tled, "touchpad");
 ASUS_LED(rled, "record");
 ASUS_LED(pled, "phone");
+ASUS_LED(gled, "gaming");
 
 /*
  * This function evaluates an ACPI method, given an int as parameter, the
@@ -245,32 +261,19 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
        return (status == AE_OK);
 }
 
-static int read_acpi_int(acpi_handle handle, const char *method, int *val,
-                        struct acpi_object_list *params)
-{
-       struct acpi_buffer output;
-       union acpi_object out_obj;
-       acpi_status status;
-
-       output.length = sizeof(out_obj);
-       output.pointer = &out_obj;
-
-       status = acpi_evaluate_object(handle, (char *)method, params, &output);
-       *val = out_obj.integer.value;
-       return (status == AE_OK) && (out_obj.type == ACPI_TYPE_INTEGER);
-}
-
 static int read_wireless_status(int mask)
 {
-       int status;
+       ulong status;
+       acpi_status rv = AE_OK;
 
        if (!wireless_status_handle)
                return (hotk->status & mask) ? 1 : 0;
 
-       if (read_acpi_int(wireless_status_handle, NULL, &status, NULL)) {
-               return (status & mask) ? 1 : 0;
-       } else
+       rv = acpi_evaluate_integer(wireless_status_handle, NULL, NULL, &status);
+       if (ACPI_FAILURE(rv))
                printk(ASUS_WARNING "Error reading Wireless status\n");
+       else
+               return (status & mask) ? 1 : 0;
 
        return (hotk->status & mask) ? 1 : 0;
 }
@@ -285,19 +288,28 @@ static int read_status(int mask)
        return (hotk->status & mask) ? 1 : 0;
 }
 
-static void write_status(acpi_handle handle, int out, int mask, int invert)
+static void write_status(acpi_handle handle, int out, int mask)
 {
        hotk->status = (out) ? (hotk->status | mask) : (hotk->status & ~mask);
 
-       if (invert)             /* invert target value */
+       switch (mask) {
+       case MLED_ON:
                out = !out & 0x1;
+               break;
+       case GLED_ON:
+               out = (out & 0x1) + 1;
+               break;
+       default:
+               out &= 0x1;
+               break;
+       }
 
        if (handle && !write_acpi_int(handle, NULL, out, NULL))
-               printk(ASUS_WARNING " write failed\n");
+               printk(ASUS_WARNING " write failed %x\n", mask);
 }
 
 /* /sys/class/led handlers */
-#define ASUS_LED_HANDLER(object, mask, invert)                         \
+#define ASUS_LED_HANDLER(object, mask)                                 \
        static void object##_led_set(struct led_classdev *led_cdev,     \
                                     enum led_brightness value)         \
        {                                                               \
@@ -307,13 +319,14 @@ static void write_status(acpi_handle handle, int out, int mask, int invert)
        static void object##_led_update(struct work_struct *ignored)    \
        {                                                               \
                int value = object##_led_wk;                            \
-               write_status(object##_set_handle, value, (mask), (invert)); \
+               write_status(object##_set_handle, value, (mask));       \
        }
 
-ASUS_LED_HANDLER(mled, MLED_ON, 1);
-ASUS_LED_HANDLER(pled, PLED_ON, 0);
-ASUS_LED_HANDLER(rled, RLED_ON, 0);
-ASUS_LED_HANDLER(tled, TLED_ON, 0);
+ASUS_LED_HANDLER(mled, MLED_ON);
+ASUS_LED_HANDLER(pled, PLED_ON);
+ASUS_LED_HANDLER(rled, RLED_ON);
+ASUS_LED_HANDLER(tled, TLED_ON);
+ASUS_LED_HANDLER(gled, GLED_ON);
 
 static int get_lcd_state(void)
 {
@@ -338,7 +351,7 @@ static int set_lcd_state(int value)
                        printk(ASUS_WARNING "Error switching LCD\n");
        }
 
-       write_status(NULL, lcd, LCD_ON, 0);
+       write_status(NULL, lcd, LCD_ON);
        return 0;
 }
 
@@ -354,9 +367,11 @@ static void lcd_blank(int blank)
 
 static int read_brightness(struct backlight_device *bd)
 {
-       int value;
+       ulong value;
+       acpi_status rv = AE_OK;
 
-       if (!read_acpi_int(brightness_get_handle, NULL, &value, NULL))
+       rv = acpi_evaluate_integer(brightness_get_handle, NULL, NULL, &value);
+       if (ACPI_FAILURE(rv))
                printk(ASUS_WARNING "Error reading brightness\n");
 
        return value;
@@ -403,8 +418,10 @@ static ssize_t show_infos(struct device *dev,
                          struct device_attribute *attr, char *page)
 {
        int len = 0;
-       int temp;
+       ulong temp;
        char buf[16];           //enough for all info
+       acpi_status rv = AE_OK;
+
        /*
         * We use the easy way, we don't care of off and count, so we don't set eof
         * to 1
@@ -418,9 +435,10 @@ static ssize_t show_infos(struct device *dev,
         * bit signifies that the laptop is equipped with a Wi-Fi MiniPCI card.
         * The significance of others is yet to be found.
         */
-       if (read_acpi_int(hotk->handle, "SFUN", &temp, NULL))
-               len +=
-                   sprintf(page + len, "SFUN value         : 0x%04x\n", temp);
+       rv = acpi_evaluate_integer(hotk->handle, "SFUN", NULL, &temp);
+       if (!ACPI_FAILURE(rv))
+               len += sprintf(page + len, "SFUN value         : 0x%04x\n",
+                              (uint) temp);
        /*
         * Another value for userspace: the ASYM method returns 0x02 for
         * battery low and 0x04 for battery critical, its readings tend to be
@@ -428,9 +446,10 @@ static ssize_t show_infos(struct device *dev,
         * Note: since not all the laptops provide this method, errors are
         * silently ignored.
         */
-       if (read_acpi_int(hotk->handle, "ASYM", &temp, NULL))
-               len +=
-                   sprintf(page + len, "ASYM value         : 0x%04x\n", temp);
+       rv = acpi_evaluate_integer(hotk->handle, "ASYM", NULL, &temp);
+       if (!ACPI_FAILURE(rv))
+               len += sprintf(page + len, "ASYM value         : 0x%04x\n",
+                              (uint) temp);
        if (asus_info) {
                snprintf(buf, 16, "%d", asus_info->length);
                len += sprintf(page + len, "DSDT length        : %s\n", buf);
@@ -465,7 +484,7 @@ static int parse_arg(const char *buf, unsigned long count, int *val)
 }
 
 static ssize_t store_status(const char *buf, size_t count,
-                           acpi_handle handle, int mask, int invert)
+                           acpi_handle handle, int mask)
 {
        int rv, value;
        int out = 0;
@@ -474,7 +493,7 @@ static ssize_t store_status(const char *buf, size_t count,
        if (rv > 0)
                out = value ? 1 : 0;
 
-       write_status(handle, out, mask, invert);
+       write_status(handle, out, mask);
 
        return rv;
 }
@@ -515,7 +534,7 @@ static ssize_t show_wlan(struct device *dev,
 static ssize_t store_wlan(struct device *dev, struct device_attribute *attr,
                          const char *buf, size_t count)
 {
-       return store_status(buf, count, wl_switch_handle, WL_ON, 0);
+       return store_status(buf, count, wl_switch_handle, WL_ON);
 }
 
 /*
@@ -531,7 +550,7 @@ static ssize_t store_bluetooth(struct device *dev,
                               struct device_attribute *attr, const char *buf,
                               size_t count)
 {
-       return store_status(buf, count, bt_switch_handle, BT_ON, 0);
+       return store_status(buf, count, bt_switch_handle, BT_ON);
 }
 
 /*
@@ -547,12 +566,15 @@ static void set_display(int value)
 
 static int read_display(void)
 {
-       int value = 0;
+       ulong value = 0;
+       acpi_status rv = AE_OK;
 
        /* In most of the case, we know how to set the display, but sometime
           we can't read it */
        if (display_get_handle) {
-               if (!read_acpi_int(display_get_handle, NULL, &value, NULL))
+               rv = acpi_evaluate_integer(display_get_handle, NULL,
+                                          NULL, &value);
+               if (ACPI_FAILURE(rv))
                        printk(ASUS_WARNING "Error reading display status\n");
        }
 
@@ -656,10 +678,10 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
         * switched
         */
        if (event == ATKD_LCD_ON) {
-               write_status(NULL, 1, LCD_ON, 0);
+               write_status(NULL, 1, LCD_ON);
                lcd_blank(FB_BLANK_UNBLANK);
        } else if (event == ATKD_LCD_OFF) {
-               write_status(NULL, 0, LCD_ON, 0);
+               write_status(NULL, 0, LCD_ON);
                lcd_blank(FB_BLANK_POWERDOWN);
        }
 
@@ -771,7 +793,7 @@ static int asus_hotk_get_info(void)
 {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        union acpi_object *model = NULL;
-       int bsts_result, hwrs_result;
+       ulong bsts_result, hwrs_result;
        char *string = NULL;
        acpi_status status;
 
@@ -794,11 +816,16 @@ static int asus_hotk_get_info(void)
        }
 
        /* This needs to be called for some laptops to init properly */
-       if (!read_acpi_int(hotk->handle, "BSTS", &bsts_result, NULL))
+       status =
+           acpi_evaluate_integer(hotk->handle, "BSTS", NULL, &bsts_result);
+       if (ACPI_FAILURE(status))
                printk(ASUS_WARNING "Error calling BSTS\n");
        else if (bsts_result)
                printk(ASUS_NOTICE "BSTS called, 0x%02x returned\n",
-                      bsts_result);
+                      (uint) bsts_result);
+
+       /* This too ... */
+       write_acpi_int(hotk->handle, "CWAP", wapf, NULL);
 
        /*
         * Try to match the object returned by INIT to the specific model.
@@ -831,6 +858,7 @@ static int asus_hotk_get_info(void)
        ASUS_HANDLE_INIT(tled_set);
        ASUS_HANDLE_INIT(rled_set);
        ASUS_HANDLE_INIT(pled_set);
+       ASUS_HANDLE_INIT(gled_set);
 
        ASUS_HANDLE_INIT(ledd_set);
 
@@ -840,7 +868,9 @@ static int asus_hotk_get_info(void)
         * The significance of others is yet to be found.
         * If we don't find the method, we assume the device are present.
         */
-       if (!read_acpi_int(hotk->handle, "HRWS", &hwrs_result, NULL))
+       status =
+           acpi_evaluate_integer(hotk->handle, "HRWS", NULL, &hwrs_result);
+       if (ACPI_FAILURE(status))
                hwrs_result = WL_HWRS | BT_HWRS;
 
        if (hwrs_result & WL_HWRS)
@@ -928,11 +958,15 @@ static int asus_hotk_add(struct acpi_device *device)
        asus_hotk_found = 1;
 
        /* WLED and BLED are on by default */
-       write_status(bt_switch_handle, 1, BT_ON, 0);
-       write_status(wl_switch_handle, 1, WL_ON, 0);
+       write_status(bt_switch_handle, 1, BT_ON);
+       write_status(wl_switch_handle, 1, WL_ON);
+
+       /* If the h/w switch is off, we need to check the real status */
+       write_status(NULL, read_status(BT_ON), BT_ON);
+       write_status(NULL, read_status(WL_ON), WL_ON);
 
        /* LCD Backlight is on by default */
-       write_status(NULL, 1, LCD_ON, 0);
+       write_status(NULL, 1, LCD_ON);
 
        /* LED display is off by default */
        hotk->ledd_status = 0xFFF;
@@ -991,6 +1025,7 @@ static void asus_led_exit(void)
        ASUS_LED_UNREGISTER(tled);
        ASUS_LED_UNREGISTER(pled);
        ASUS_LED_UNREGISTER(rled);
+       ASUS_LED_UNREGISTER(gled);
 
        destroy_workqueue(led_workqueue);
 }
@@ -1062,6 +1097,10 @@ static int asus_led_init(struct device *dev)
        if (rv)
                return rv;
 
+       rv = ASUS_LED_REGISTER(gled, dev);
+       if (rv)
+               return rv;
+
        led_workqueue = create_singlethread_workqueue("led_workqueue");
        if (!led_workqueue)
                return -ENOMEM;
index c3f9f599f134b941fabf6647a32f0673bf4dec39..a3d46ea371269d4e0ae069365405389b6443ffb8 100644 (file)
@@ -2263,6 +2263,7 @@ config GIANFAR
        tristate "Gianfar Ethernet"
        depends on 85xx || 83xx || PPC_86xx
        select PHYLIB
+       select CRC32
        help
          This driver supports the Gigabit TSEC on the MPC83xx, MPC85xx,
          and MPC86xx family of chips, and the FEC on the 8540.
index 0b7aded8dcfdd00f4adf08bce68a7e85ef116137..e85f5ec48f96fdd092eb39311781ceaf9c5facff 100644 (file)
@@ -54,8 +54,8 @@
 
 #define DRV_MODULE_NAME                "bnx2"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "1.5.7"
-#define DRV_MODULE_RELDATE     "March 29, 2007"
+#define DRV_MODULE_VERSION     "1.5.8"
+#define DRV_MODULE_RELDATE     "April 24, 2007"
 
 #define RUN_AT(x) (jiffies + (x))
 
@@ -3421,6 +3421,9 @@ bnx2_init_chip(struct bnx2 *bp)
        val = REG_RD(bp, BNX2_MQ_CONFIG);
        val &= ~BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE;
        val |= BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE_256;
+       if (CHIP_ID(bp) == CHIP_ID_5709_A0 || CHIP_ID(bp) == CHIP_ID_5709_A1)
+               val |= BNX2_MQ_CONFIG_HALT_DIS;
+
        REG_WR(bp, BNX2_MQ_CONFIG, val);
 
        val = 0x10000 + (MAX_CID_CNT * MB_KERNEL_CTX_SIZE);
index ccbdf81c6599eab3a51cd31f4b3f91a72b6de35b..878eee58f12ab2b5b50584ab062612e4e745cb61 100644 (file)
@@ -6518,6 +6518,7 @@ struct bnx2 {
 #define CHIP_ID_5708_B0                        0x57081000
 #define CHIP_ID_5708_B1                        0x57081010
 #define CHIP_ID_5709_A0                        0x57090000
+#define CHIP_ID_5709_A1                        0x57090010
 
 #define CHIP_BOND_ID(bp)               (((bp)->chip_id) & 0xf)
 
index 97128d88eaefe29472e80ab01084af7217b26dc5..8d1379633698737835b28e66bb0f9c2bd1e067b0 100644 (file)
@@ -478,8 +478,11 @@ struct cmac {
        struct adapter *adapter;
        unsigned int offset;
        unsigned int nucast;    /* # of address filters for unicast MACs */
-       unsigned int tcnt;
-       unsigned int xcnt;
+       unsigned int tx_tcnt;
+       unsigned int tx_xcnt;
+       u64 tx_mcnt;
+       unsigned int rx_xcnt;
+       u64 rx_mcnt;
        unsigned int toggle_cnt;
        unsigned int txen;
        struct mac_stats stats;
index e14862b43d174041845086e35e5b617627c69980..483a594210a725d065227737b392adec46e99e11 100644 (file)
@@ -67,7 +67,10 @@ static inline union listen_entry *stid2entry(const struct tid_info *t,
 static inline struct t3c_tid_entry *lookup_tid(const struct tid_info *t,
                                               unsigned int tid)
 {
-       return tid < t->ntids ? &(t->tid_tab[tid]) : NULL;
+       struct t3c_tid_entry *t3c_tid = tid < t->ntids ?
+           &(t->tid_tab[tid]) : NULL;
+
+       return (t3c_tid && t3c_tid->client) ? t3c_tid : NULL;
 }
 
 /*
index 26240fd5e76835d4fa3af47b44df76675d50fb68..67b4b219d927884395857446ce1550548a53b6fd 100644 (file)
@@ -194,15 +194,13 @@ void t3_os_link_changed(struct adapter *adapter, int port_id, int link_stat,
 
        if (link_stat != netif_carrier_ok(dev)) {
                if (link_stat) {
-                       t3_set_reg_field(adapter,
-                                        A_XGM_TXFIFO_CFG + mac->offset,
-                                        F_ENDROPPKT, 0);
+                       t3_mac_enable(mac, MAC_DIRECTION_RX);
                        netif_carrier_on(dev);
                } else {
                        netif_carrier_off(dev);
-                       t3_set_reg_field(adapter,
-                                        A_XGM_TXFIFO_CFG + mac->offset,
-                                        F_ENDROPPKT, F_ENDROPPKT);
+                       pi->phy.ops->power_down(&pi->phy, 1);
+                       t3_mac_disable(mac, MAC_DIRECTION_RX);
+                       t3_link_start(&pi->phy, mac, &pi->link_config);
                }
 
                link_report(dev);
@@ -772,6 +770,8 @@ static int cxgb_up(struct adapter *adap)
                if (err)
                        goto out;
 
+               t3_write_reg(adap, A_ULPRX_TDDP_PSZ, V_HPZ0(PAGE_SHIFT - 12));
+               
                err = setup_sge_qsets(adap);
                if (err)
                        goto out;
@@ -2119,7 +2119,9 @@ static void check_t3b2_mac(struct adapter *adapter)
 {
        int i;
 
-       rtnl_lock();                      /* synchronize with ifdown */
+       if (!rtnl_trylock())    /* synchronize with ifdown */
+               return;
+
        for_each_port(adapter, i) {
                struct net_device *dev = adapter->port[i];
                struct port_info *p = netdev_priv(dev);
index eed7a48e3111d886292254b6eb6b33e92b19faf6..199e5066acf395ced8afe97112cf20588b3602a2 100644 (file)
@@ -508,6 +508,7 @@ void cxgb3_queue_tid_release(struct t3cdev *tdev, unsigned int tid)
 
        spin_lock_bh(&td->tid_release_lock);
        p->ctx = (void *)td->tid_release_list;
+       p->client = NULL;
        td->tid_release_list = p;
        if (!p->ctx)
                schedule_work(&td->tid_release_task);
@@ -623,7 +624,8 @@ static int do_act_open_rpl(struct t3cdev *dev, struct sk_buff *skb)
        struct t3c_tid_entry *t3c_tid;
 
        t3c_tid = lookup_atid(&(T3C_DATA(dev))->tid_maps, atid);
-       if (t3c_tid->ctx && t3c_tid->client && t3c_tid->client->handlers &&
+       if (t3c_tid && t3c_tid->ctx && t3c_tid->client &&
+           t3c_tid->client->handlers &&
            t3c_tid->client->handlers[CPL_ACT_OPEN_RPL]) {
                return t3c_tid->client->handlers[CPL_ACT_OPEN_RPL] (dev, skb,
                                                                    t3c_tid->
@@ -642,7 +644,7 @@ static int do_stid_rpl(struct t3cdev *dev, struct sk_buff *skb)
        struct t3c_tid_entry *t3c_tid;
 
        t3c_tid = lookup_stid(&(T3C_DATA(dev))->tid_maps, stid);
-       if (t3c_tid->ctx && t3c_tid->client->handlers &&
+       if (t3c_tid && t3c_tid->ctx && t3c_tid->client->handlers &&
            t3c_tid->client->handlers[p->opcode]) {
                return t3c_tid->client->handlers[p->opcode] (dev, skb,
                                                             t3c_tid->ctx);
@@ -660,7 +662,7 @@ static int do_hwtid_rpl(struct t3cdev *dev, struct sk_buff *skb)
        struct t3c_tid_entry *t3c_tid;
 
        t3c_tid = lookup_tid(&(T3C_DATA(dev))->tid_maps, hwtid);
-       if (t3c_tid->ctx && t3c_tid->client->handlers &&
+       if (t3c_tid && t3c_tid->ctx && t3c_tid->client->handlers &&
            t3c_tid->client->handlers[p->opcode]) {
                return t3c_tid->client->handlers[p->opcode]
                    (dev, skb, t3c_tid->ctx);
@@ -689,6 +691,28 @@ static int do_cr(struct t3cdev *dev, struct sk_buff *skb)
        }
 }
 
+/*
+ * Returns an sk_buff for a reply CPL message of size len.  If the input
+ * sk_buff has no other users it is trimmed and reused, otherwise a new buffer
+ * is allocated.  The input skb must be of size at least len.  Note that this
+ * operation does not destroy the original skb data even if it decides to reuse
+ * the buffer.
+ */
+static struct sk_buff *cxgb3_get_cpl_reply_skb(struct sk_buff *skb, size_t len,
+                                              int gfp)
+{
+       if (likely(!skb_cloned(skb))) {
+               BUG_ON(skb->len < len);
+               __skb_trim(skb, len);
+               skb_get(skb);
+       } else {
+               skb = alloc_skb(len, gfp);
+               if (skb)
+                       __skb_put(skb, len);
+       }
+       return skb;
+}
+
 static int do_abort_req_rss(struct t3cdev *dev, struct sk_buff *skb)
 {
        union opcode_tid *p = cplhdr(skb);
@@ -696,30 +720,39 @@ static int do_abort_req_rss(struct t3cdev *dev, struct sk_buff *skb)
        struct t3c_tid_entry *t3c_tid;
 
        t3c_tid = lookup_tid(&(T3C_DATA(dev))->tid_maps, hwtid);
-       if (t3c_tid->ctx && t3c_tid->client->handlers &&
+       if (t3c_tid && t3c_tid->ctx && t3c_tid->client->handlers &&
            t3c_tid->client->handlers[p->opcode]) {
                return t3c_tid->client->handlers[p->opcode]
                    (dev, skb, t3c_tid->ctx);
        } else {
                struct cpl_abort_req_rss *req = cplhdr(skb);
                struct cpl_abort_rpl *rpl;
+               struct sk_buff *reply_skb;
+               unsigned int tid = GET_TID(req);
+               u8 cmd = req->status;
+
+               if (req->status == CPL_ERR_RTX_NEG_ADVICE ||
+                   req->status == CPL_ERR_PERSIST_NEG_ADVICE)
+                       goto out;
 
-               struct sk_buff *skb =
-                   alloc_skb(sizeof(struct cpl_abort_rpl), GFP_ATOMIC);
-               if (!skb) {
+               reply_skb = cxgb3_get_cpl_reply_skb(skb,
+                                                   sizeof(struct
+                                                          cpl_abort_rpl),
+                                                   GFP_ATOMIC);
+
+               if (!reply_skb) {
                        printk("do_abort_req_rss: couldn't get skb!\n");
                        goto out;
                }
-               skb->priority = CPL_PRIORITY_DATA;
-               __skb_put(skb, sizeof(struct cpl_abort_rpl));
-               rpl = cplhdr(skb);
+               reply_skb->priority = CPL_PRIORITY_DATA;
+               __skb_put(reply_skb, sizeof(struct cpl_abort_rpl));
+               rpl = cplhdr(reply_skb);
                rpl->wr.wr_hi =
                    htonl(V_WR_OP(FW_WROPCODE_OFLD_HOST_ABORT_CON_RPL));
-               rpl->wr.wr_lo = htonl(V_WR_TID(GET_TID(req)));
-               OPCODE_TID(rpl) =
-                   htonl(MK_OPCODE_TID(CPL_ABORT_RPL, GET_TID(req)));
-               rpl->cmd = req->status;
-               cxgb3_ofld_send(dev, skb);
+               rpl->wr.wr_lo = htonl(V_WR_TID(tid));
+               OPCODE_TID(rpl) = htonl(MK_OPCODE_TID(CPL_ABORT_RPL, tid));
+               rpl->cmd = cmd;
+               cxgb3_ofld_send(dev, reply_skb);
 out:
                return CPL_RET_BUF_DONE;
        }
@@ -732,7 +765,7 @@ static int do_act_establish(struct t3cdev *dev, struct sk_buff *skb)
        struct t3c_tid_entry *t3c_tid;
 
        t3c_tid = lookup_atid(&(T3C_DATA(dev))->tid_maps, atid);
-       if (t3c_tid->ctx && t3c_tid->client->handlers &&
+       if (t3c_tid && t3c_tid->ctx && t3c_tid->client->handlers &&
            t3c_tid->client->handlers[CPL_ACT_ESTABLISH]) {
                return t3c_tid->client->handlers[CPL_ACT_ESTABLISH]
                    (dev, skb, t3c_tid->ctx);
@@ -743,17 +776,6 @@ static int do_act_establish(struct t3cdev *dev, struct sk_buff *skb)
        }
 }
 
-static int do_set_tcb_rpl(struct t3cdev *dev, struct sk_buff *skb)
-{
-       struct cpl_set_tcb_rpl *rpl = cplhdr(skb);
-
-       if (rpl->status != CPL_ERR_NONE)
-               printk(KERN_ERR
-                      "Unexpected SET_TCB_RPL status %u for tid %u\n",
-                      rpl->status, GET_TID(rpl));
-       return CPL_RET_BUF_DONE;
-}
-
 static int do_trace(struct t3cdev *dev, struct sk_buff *skb)
 {
        struct cpl_trace_pkt *p = cplhdr(skb);
@@ -773,7 +795,7 @@ static int do_term(struct t3cdev *dev, struct sk_buff *skb)
        struct t3c_tid_entry *t3c_tid;
 
        t3c_tid = lookup_tid(&(T3C_DATA(dev))->tid_maps, hwtid);
-       if (t3c_tid->ctx && t3c_tid->client->handlers &&
+       if (t3c_tid && t3c_tid->ctx && t3c_tid->client->handlers &&
            t3c_tid->client->handlers[opcode]) {
                return t3c_tid->client->handlers[opcode] (dev, skb,
                                                          t3c_tid->ctx);
@@ -972,7 +994,7 @@ void cxgb_redirect(struct dst_entry *old, struct dst_entry *new)
        for (tid = 0; tid < ti->ntids; tid++) {
                te = lookup_tid(ti, tid);
                BUG_ON(!te);
-               if (te->ctx && te->client && te->client->redirect) {
+               if (te && te->ctx && te->client && te->client->redirect) {
                        update_tcb = te->client->redirect(te->ctx, old, new, e);
                        if (update_tcb) {
                                l2t_hold(L2DATA(tdev), e);
@@ -1215,7 +1237,8 @@ void __init cxgb3_offload_init(void)
        t3_register_cpl_handler(CPL_CLOSE_CON_RPL, do_hwtid_rpl);
        t3_register_cpl_handler(CPL_ABORT_REQ_RSS, do_abort_req_rss);
        t3_register_cpl_handler(CPL_ACT_ESTABLISH, do_act_establish);
-       t3_register_cpl_handler(CPL_SET_TCB_RPL, do_set_tcb_rpl);
+       t3_register_cpl_handler(CPL_SET_TCB_RPL, do_hwtid_rpl);
+       t3_register_cpl_handler(CPL_GET_TCB_RPL, do_hwtid_rpl);
        t3_register_cpl_handler(CPL_RDMA_TERMINATE, do_term);
        t3_register_cpl_handler(CPL_RDMA_EC_STATUS, do_hwtid_rpl);
        t3_register_cpl_handler(CPL_TRACE_PKT, do_trace);
index f8be41c5a0817b7fcbb94f95c364f8f20558e267..e5a553410e24c6038668b688ce0498cbf0fb3f00 100644 (file)
 
 #define A_ULPRX_ISCSI_TAGMASK 0x514
 
+#define S_HPZ0    0
+#define M_HPZ0    0xf
+#define V_HPZ0(x) ((x) << S_HPZ0)
+#define G_HPZ0(x) (((x) >> S_HPZ0) & M_HPZ0)
+
 #define A_ULPRX_TDDP_LLIMIT 0x51c
 
 #define A_ULPRX_TDDP_ULIMIT 0x520
+#define A_ULPRX_TDDP_PSZ 0x528
 
 #define A_ULPRX_STAG_LLIMIT 0x52c
 
index d83f075ef2d788527a25c8ca4d7b325b154f174c..fb485d0a43d8a768bcc5673c4a3d51b1f5a8f0f3 100644 (file)
@@ -1523,19 +1523,25 @@ static int mac_intr_handler(struct adapter *adap, unsigned int idx)
  */
 int t3_phy_intr_handler(struct adapter *adapter)
 {
-       static const int intr_gpio_bits[] = { 8, 0x20 };
-
+       u32 mask, gpi = adapter_info(adapter)->gpio_intr;
        u32 i, cause = t3_read_reg(adapter, A_T3DBG_INT_CAUSE);
 
        for_each_port(adapter, i) {
-               if (cause & intr_gpio_bits[i]) {
-                       struct cphy *phy = &adap2pinfo(adapter, i)->phy;
-                       int phy_cause = phy->ops->intr_handler(phy);
+               struct port_info *p = adap2pinfo(adapter, i);
+
+               mask = gpi - (gpi & (gpi - 1));
+               gpi -= mask;
+
+               if (!(p->port_type->caps & SUPPORTED_IRQ))
+                       continue;
+
+               if (cause & mask) {
+                       int phy_cause = p->phy.ops->intr_handler(&p->phy);
 
                        if (phy_cause & cphy_cause_link_change)
                                t3_link_changed(adapter, i);
                        if (phy_cause & cphy_cause_fifo_error)
-                               phy->fifo_errors++;
+                               p->phy.fifo_errors++;
                }
        }
 
index 94aaff005a355fd352123001fadacdf20f0a59c1..a506792f9575a6d5bfd60a15bbdbd570579a226d 100644 (file)
@@ -367,7 +367,8 @@ int t3_mac_enable(struct cmac *mac, int which)
        int idx = macidx(mac);
        struct adapter *adap = mac->adapter;
        unsigned int oft = mac->offset;
-
+       struct mac_stats *s = &mac->stats;
+       
        if (which & MAC_DIRECTION_TX) {
                t3_write_reg(adap, A_XGM_TX_CTRL + oft, F_TXEN);
                t3_write_reg(adap, A_TP_PIO_ADDR, A_TP_TX_DROP_CFG_CH0 + idx);
@@ -376,10 +377,16 @@ int t3_mac_enable(struct cmac *mac, int which)
                t3_set_reg_field(adap, A_TP_PIO_DATA, 1 << idx, 1 << idx);
 
                t3_write_reg(adap, A_TP_PIO_ADDR, A_TP_TX_DROP_CNT_CH0 + idx);
-               mac->tcnt = (G_TXDROPCNTCH0RCVD(t3_read_reg(adap,
-                                                           A_TP_PIO_DATA)));
-               mac->xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap,
-                                               A_XGM_TX_SPI4_SOP_EOP_CNT)));
+               mac->tx_mcnt = s->tx_frames;
+               mac->tx_tcnt = (G_TXDROPCNTCH0RCVD(t3_read_reg(adap,
+                                                       A_TP_PIO_DATA)));
+               mac->tx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap,
+                                               A_XGM_TX_SPI4_SOP_EOP_CNT +
+                                               oft)));
+               mac->rx_mcnt = s->rx_frames;
+               mac->rx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap,
+                                               A_XGM_RX_SPI4_SOP_EOP_CNT +
+                                               oft)));
                mac->txen = F_TXEN;
                mac->toggle_cnt = 0;
        }
@@ -392,6 +399,7 @@ int t3_mac_disable(struct cmac *mac, int which)
 {
        int idx = macidx(mac);
        struct adapter *adap = mac->adapter;
+       int val;
 
        if (which & MAC_DIRECTION_TX) {
                t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, 0);
@@ -401,44 +409,89 @@ int t3_mac_disable(struct cmac *mac, int which)
                t3_set_reg_field(adap, A_TP_PIO_DATA, 1 << idx, 1 << idx);
                mac->txen = 0;
        }
-       if (which & MAC_DIRECTION_RX)
+       if (which & MAC_DIRECTION_RX) {
+               t3_set_reg_field(mac->adapter, A_XGM_RESET_CTRL + mac->offset,
+                                F_PCS_RESET_, 0);
+               msleep(100);
                t3_write_reg(adap, A_XGM_RX_CTRL + mac->offset, 0);
+               val = F_MAC_RESET_;
+               if (is_10G(adap))
+                       val |= F_PCS_RESET_;
+               else if (uses_xaui(adap))
+                       val |= F_PCS_RESET_ | F_XG2G_RESET_;
+               else
+                       val |= F_RGMII_RESET_ | F_XG2G_RESET_;
+               t3_write_reg(mac->adapter, A_XGM_RESET_CTRL + mac->offset, val);
+       }
        return 0;
 }
 
 int t3b2_mac_watchdog_task(struct cmac *mac)
 {
        struct adapter *adap = mac->adapter;
-       unsigned int tcnt, xcnt;
+       struct mac_stats *s = &mac->stats;
+       unsigned int tx_tcnt, tx_xcnt;
+       unsigned int tx_mcnt = s->tx_frames;
+       unsigned int rx_mcnt = s->rx_frames;
+       unsigned int rx_xcnt;
        int status;
 
-       t3_write_reg(adap, A_TP_PIO_ADDR, A_TP_TX_DROP_CNT_CH0 + macidx(mac));
-       tcnt = (G_TXDROPCNTCH0RCVD(t3_read_reg(adap, A_TP_PIO_DATA)));
-       xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap, 
-                                          A_XGM_TX_SPI4_SOP_EOP_CNT +
-                                          mac->offset)));
-
-       if (tcnt != mac->tcnt && xcnt == 0 && mac->xcnt == 0) {
-               if (mac->toggle_cnt > 4) {
-                       t3b2_mac_reset(mac);
+       if (tx_mcnt == mac->tx_mcnt) {
+               tx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap,
+                                               A_XGM_TX_SPI4_SOP_EOP_CNT +
+                                               mac->offset)));
+               if (tx_xcnt == 0) {
+                       t3_write_reg(adap, A_TP_PIO_ADDR,
+                                    A_TP_TX_DROP_CNT_CH0 + macidx(mac));
+                       tx_tcnt = (G_TXDROPCNTCH0RCVD(t3_read_reg(adap,
+                                                     A_TP_PIO_DATA)));
+               } else {
                        mac->toggle_cnt = 0;
+                       return 0;
+               }
+       } else {
+               mac->toggle_cnt = 0;
+               return 0;
+       }
+
+       if (((tx_tcnt != mac->tx_tcnt) &&
+            (tx_xcnt == 0) && (mac->tx_xcnt == 0)) ||
+           ((mac->tx_mcnt == tx_mcnt) &&
+            (tx_xcnt != 0) && (mac->tx_xcnt != 0))) {
+               if (mac->toggle_cnt > 4)
                        status = 2;
-               } else {
-                       t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, 0);
-                       t3_read_reg(adap, A_XGM_TX_CTRL + mac->offset);
-                       t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset,
-                                    mac->txen);
-                       t3_read_reg(adap, A_XGM_TX_CTRL + mac->offset);
-                       mac->toggle_cnt++;
+               else 
                        status = 1;
-               }       
        } else {
                mac->toggle_cnt = 0;
-               status = 0;
+               return 0;
        }
-       mac->tcnt = tcnt;
-       mac->xcnt = xcnt;
 
+       if (rx_mcnt != mac->rx_mcnt)
+               rx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap,
+                                               A_XGM_RX_SPI4_SOP_EOP_CNT +
+                                               mac->offset)));
+       else 
+               return 0;
+
+       if (mac->rx_mcnt != s->rx_frames && rx_xcnt == 0 && mac->rx_xcnt == 0) 
+               status = 2;
+       
+       mac->tx_tcnt = tx_tcnt;
+       mac->tx_xcnt = tx_xcnt;
+       mac->tx_mcnt = s->tx_frames;
+       mac->rx_xcnt = rx_xcnt;
+       mac->rx_mcnt = s->rx_frames;
+       if (status == 1) {
+               t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, 0);
+               t3_read_reg(adap, A_XGM_TX_CTRL + mac->offset);  /* flush */
+               t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, mac->txen);
+               t3_read_reg(adap, A_XGM_TX_CTRL + mac->offset);  /* flush */
+               mac->toggle_cnt++;
+       } else if (status == 2) {
+               t3b2_mac_reset(mac);
+               mac->toggle_cnt = 0;
+       }
        return status;
 }
 
index 5113eef755b98cbc5104d9e4a4aff493b6a5be67..f3807aaf10aa59d01285a51eaf7e018fece1747f 100644 (file)
@@ -1491,8 +1491,9 @@ static void __init depca_platform_probe (void)
                depca_io_ports[i].device = pldev;
 
                if (platform_device_add(pldev)) {
-                       platform_device_put(pldev);
                        depca_io_ports[i].device = NULL;
+                       pldev->dev.platform_data = NULL;
+                       platform_device_put(pldev);
                        continue;
                }
 
index 1d08e937af825421009ba1071190ac1dc5049a9c..b28a915bd980983738fe30180c57c1c5956a01a0 100644 (file)
@@ -3796,7 +3796,7 @@ e1000_intr_msi(int irq, void *data)
 
        for (i = 0; i < E1000_MAX_INTR; i++)
                if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) &
-                  e1000_clean_tx_irq(adapter, adapter->tx_ring)))
+                  !e1000_clean_tx_irq(adapter, adapter->tx_ring)))
                        break;
 
        if (likely(adapter->itr_setting & 3))
@@ -3899,7 +3899,7 @@ e1000_intr(int irq, void *data)
 
        for (i = 0; i < E1000_MAX_INTR; i++)
                if (unlikely(!adapter->clean_rx(adapter, adapter->rx_ring) &
-                  e1000_clean_tx_irq(adapter, adapter->tx_ring)))
+                  !e1000_clean_tx_irq(adapter, adapter->tx_ring)))
                        break;
 
        if (likely(adapter->itr_setting & 3))
@@ -3949,7 +3949,7 @@ e1000_clean(struct net_device *poll_dev, int *budget)
        poll_dev->quota -= work_done;
 
        /* If no Tx and not enough Rx work done, exit the polling mode */
-       if ((tx_cleaned && (work_done < work_to_do)) ||
+       if ((!tx_cleaned && (work_done == 0)) ||
           !netif_running(poll_dev)) {
 quit_polling:
                if (likely(adapter->itr_setting & 3))
@@ -3979,7 +3979,7 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
 #ifdef CONFIG_E1000_NAPI
        unsigned int count = 0;
 #endif
-       boolean_t cleaned = TRUE;
+       boolean_t cleaned = FALSE;
        unsigned int total_tx_bytes=0, total_tx_packets=0;
 
        i = tx_ring->next_to_clean;
@@ -4013,10 +4013,7 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter,
 #ifdef CONFIG_E1000_NAPI
 #define E1000_TX_WEIGHT 64
                /* weight of a sort for tx, to avoid endless transmit cleanup */
-               if (count++ == E1000_TX_WEIGHT) {
-                       cleaned = FALSE;
-                       break;
-               }
+               if (count++ == E1000_TX_WEIGHT) break;
 #endif
        }
 
index 59214e74b9cf5bcd05ff614bf2a5bb3553afa41a..30baf6ecfc63c6eabe38eaa2dfd40a4b68677148 100644 (file)
 #include <linux/ioport.h>
 #include <linux/string.h>
 #include <linux/init.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
 #include <linux/hdlcdrv.h>
 #include <linux/baycom.h>
 #include <linux/jiffies.h>
 
+#include <asm/uaccess.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+
 /* --------------------------------------------------------------------- */
 
 #define BAYCOM_DEBUG
index c216e6a5d2353ff4c2643e3b054c99910c6b5c2a..f8efe0e70a6bbec3fd5878dd9cd4d9f7458aba38 100644 (file)
@@ -71,7 +71,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.3.0-1.227"
+#define MYRI10GE_VERSION_STR "1.3.0-1.233"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -900,19 +900,9 @@ myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,
        /* try to refill entire ring */
        while (rx->fill_cnt != (rx->cnt + rx->mask + 1)) {
                idx = rx->fill_cnt & rx->mask;
-
-               if ((bytes < MYRI10GE_ALLOC_SIZE / 2) &&
-                   (rx->page_offset + bytes <= MYRI10GE_ALLOC_SIZE)) {
+               if (rx->page_offset + bytes <= MYRI10GE_ALLOC_SIZE) {
                        /* we can use part of previous page */
                        get_page(rx->page);
-#if MYRI10GE_ALLOC_SIZE > 4096
-                       /* Firmware cannot cross 4K boundary.. */
-                       if ((rx->page_offset >> 12) !=
-                           ((rx->page_offset + bytes - 1) >> 12)) {
-                               rx->page_offset =
-                                   (rx->page_offset + bytes) & ~4095;
-                       }
-#endif
                } else {
                        /* we need a new page */
                        page =
@@ -941,6 +931,13 @@ myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,
 
                /* start next packet on a cacheline boundary */
                rx->page_offset += SKB_DATA_ALIGN(bytes);
+
+#if MYRI10GE_ALLOC_SIZE > 4096
+               /* don't cross a 4KB boundary */
+               if ((rx->page_offset >> 12) !=
+                   ((rx->page_offset + bytes - 1) >> 12))
+                       rx->page_offset = (rx->page_offset + 4096) & ~4095;
+#endif
                rx->fill_cnt++;
 
                /* copy 8 descriptors to the firmware at a time */
@@ -2490,6 +2487,10 @@ static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp)
 
 #define PCI_DEVICE_ID_INTEL_E5000_PCIE23 0x25f7
 #define PCI_DEVICE_ID_INTEL_E5000_PCIE47 0x25fa
+#define PCI_DEVICE_ID_INTEL_6300ESB_PCIEE1 0x3510
+#define PCI_DEVICE_ID_INTEL_6300ESB_PCIEE4 0x351b
+#define PCI_DEVICE_ID_INTEL_E3000_PCIE 0x2779
+#define PCI_DEVICE_ID_INTEL_E3010_PCIE 0x277a
 #define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST 0x140
 #define PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST 0x142
 
@@ -2529,6 +2530,18 @@ static void myri10ge_select_firmware(struct myri10ge_priv *mgp)
                                PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_FIRST
                                && bridge->device <=
                                PCI_DEVICE_ID_SERVERWORKS_HT2100_PCIE_LAST)
+                           /* All Intel E3000/E3010 PCIE ports */
+                           || (bridge->vendor == PCI_VENDOR_ID_INTEL
+                               && (bridge->device ==
+                                   PCI_DEVICE_ID_INTEL_E3000_PCIE
+                                   || bridge->device ==
+                                   PCI_DEVICE_ID_INTEL_E3010_PCIE))
+                           /* All Intel 6310/6311/6321ESB PCIE ports */
+                           || (bridge->vendor == PCI_VENDOR_ID_INTEL
+                               && bridge->device >=
+                               PCI_DEVICE_ID_INTEL_6300ESB_PCIEE1
+                               && bridge->device <=
+                               PCI_DEVICE_ID_INTEL_6300ESB_PCIEE4)
                            /* All Intel E5000 PCIE ports */
                            || (bridge->vendor == PCI_VENDOR_ID_INTEL
                                && bridge->device >=
index 933e2f3c77aac7ccb76f7ee226e9db0e1994977c..caabbc408c343c6e6ef6f1cfb0118725b9046fbf 100644 (file)
@@ -802,9 +802,9 @@ process_input_packet(struct asyncppp *ap)
 
        /* check for address/control and protocol compression */
        p = skb->data;
-       if (p[0] == PPP_ALLSTATIONS && p[1] == PPP_UI) {
+       if (p[0] == PPP_ALLSTATIONS) {
                /* chop off address/control */
-               if (skb->len < 3)
+               if (p[1] != PPP_UI || skb->len < 3)
                        goto err;
                p = skb_pull(skb, 2);
        }
index 4a926f20b6ea9e8603e1f5d5967a937f402da406..c32c21af3fddd767c3ca715474c29569a7bc2a59 100644 (file)
@@ -964,7 +964,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
                goto out;
        }
 
-       spin_lock_bh(&priv->lock);
+       spin_lock(&priv->lock);
 
        if (unlikely(!netif_carrier_ok(dev))) {
                err = -ENOLINK;
@@ -1005,7 +1005,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
                netif_stop_queue(dev);
 
 out_unlock:
-       spin_unlock_bh(&priv->lock);
+       spin_unlock(&priv->lock);
 
 out:
        dev_kfree_skb(skb);
@@ -1042,12 +1042,12 @@ static int sc92031_open(struct net_device *dev)
        priv->pm_config = 0;
 
        /* Interrupts already disabled by sc92031_stop or sc92031_probe */
-       spin_lock(&priv->lock);
+       spin_lock_bh(&priv->lock);
 
        _sc92031_reset(dev);
        mmiowb();
 
-       spin_unlock(&priv->lock);
+       spin_unlock_bh(&priv->lock);
        sc92031_enable_interrupts(dev);
 
        if (netif_carrier_ok(dev))
@@ -1077,13 +1077,13 @@ static int sc92031_stop(struct net_device *dev)
        /* Disable interrupts, stop Tx and Rx. */
        sc92031_disable_interrupts(dev);
 
-       spin_lock(&priv->lock);
+       spin_lock_bh(&priv->lock);
 
        _sc92031_disable_tx_rx(dev);
        _sc92031_tx_clear(dev);
        mmiowb();
 
-       spin_unlock(&priv->lock);
+       spin_unlock_bh(&priv->lock);
 
        free_irq(pdev->irq, dev);
        pci_free_consistent(pdev, TX_BUF_TOT_LEN, priv->tx_bufs,
@@ -1539,13 +1539,13 @@ static int sc92031_suspend(struct pci_dev *pdev, pm_message_t state)
        /* Disable interrupts, stop Tx and Rx. */
        sc92031_disable_interrupts(dev);
 
-       spin_lock(&priv->lock);
+       spin_lock_bh(&priv->lock);
 
        _sc92031_disable_tx_rx(dev);
        _sc92031_tx_clear(dev);
        mmiowb();
 
-       spin_unlock(&priv->lock);
+       spin_unlock_bh(&priv->lock);
 
 out:
        pci_set_power_state(pdev, pci_choose_state(pdev, state));
@@ -1565,12 +1565,12 @@ static int sc92031_resume(struct pci_dev *pdev)
                goto out;
 
        /* Interrupts already disabled by sc92031_suspend */
-       spin_lock(&priv->lock);
+       spin_lock_bh(&priv->lock);
 
        _sc92031_reset(dev);
        mmiowb();
 
-       spin_unlock(&priv->lock);
+       spin_unlock_bh(&priv->lock);
        sc92031_enable_interrupts(dev);
 
        netif_device_attach(dev);
index b3750f28427926d29e101b5a0bbd5f58a619e3e6..b2a3b19d773a8c8979bcb066dc9e1059c880cb2d 100644 (file)
@@ -1755,6 +1755,24 @@ static int sis900_rx(struct net_device *net_dev)
                } else {
                        struct sk_buff * skb;
 
+                       pci_unmap_single(sis_priv->pci_dev,
+                               sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE,
+                               PCI_DMA_FROMDEVICE);
+
+                       /* refill the Rx buffer, what if there is not enought
+                        * memory for new socket buffer ?? */
+                       if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) {
+                               /*
+                                * Not enough memory to refill the buffer
+                                * so we need to recycle the old one so
+                                * as to avoid creating a memory hole
+                                * in the rx ring
+                                */
+                               skb = sis_priv->rx_skbuff[entry];
+                               sis_priv->stats.rx_dropped++;
+                               goto refill_rx_ring;
+                       }       
+
                        /* This situation should never happen, but due to
                           some unknow bugs, it is possible that
                           we are working on NULL sk_buff :-( */
@@ -1768,9 +1786,6 @@ static int sis900_rx(struct net_device *net_dev)
                                break;
                        }
 
-                       pci_unmap_single(sis_priv->pci_dev,
-                               sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE,
-                               PCI_DMA_FROMDEVICE);
                        /* give the socket buffer to upper layers */
                        skb = sis_priv->rx_skbuff[entry];
                        skb_put(skb, rx_size);
@@ -1783,33 +1798,14 @@ static int sis900_rx(struct net_device *net_dev)
                        net_dev->last_rx = jiffies;
                        sis_priv->stats.rx_bytes += rx_size;
                        sis_priv->stats.rx_packets++;
-
-                       /* refill the Rx buffer, what if there is not enought
-                        * memory