http://linux.bkbits.net/linux-2.5
torvalds@evo.osdl.org|ChangeSet|20040608211834|24150 torvalds
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/06/08 12:10:44-07:00 dhowells@redhat.com 
#   [PATCH] Fix semaphore downgrade_write()
#   
#   Stop downgrade_write() from under-adjusting the rwsem counter in optimised
#   rw-semaphores.
#   
#   Signed-off-by: David Howells <dhowells@redhat.com>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# lib/rwsem.c
#   2004/06/08 11:31:36-07:00 dhowells@redhat.com +20 -15
#   Fix semaphore downgrade_write()
# 
# ChangeSet
#   2004/06/08 19:55:14+01:00 dwmw2@dwmw2.baythorne.internal 
#   Merge linux-mtd@bkbits.net:sbc8260-2.6
#   into dwmw2.baythorne.internal:/inst/bk/sbc8260-2.6
# 
# arch/ppc/syslib/Makefile
#   2004/06/08 19:55:09+01:00 dwmw2@dwmw2.baythorne.internal +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/06/08 11:51:14-07:00 linux-mtd.adm@hostme.bitkeeper.com 
#   Merge http://linux.bkbits.net/linux-2.6
#   into hostme.bitkeeper.com:/repos/l/linux-mtd/sbc8260-2.6
# 
# arch/ppc/syslib/Makefile
#   2004/06/08 11:51:08-07:00 linux-mtd.adm@hostme.bitkeeper.com +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/06/08 19:47:33+01:00 dwmw2@dwmw2.baythorne.internal 
#   Add WindRiver PowerQUICC II flash map driver
# 
# drivers/mtd/maps/wr_sbc82xx_flash.c
#   2004/06/08 19:47:24+01:00 dwmw2@dwmw2.baythorne.internal +167 -0
# 
# drivers/mtd/maps/wr_sbc82xx_flash.c
#   2004/06/08 19:47:24+01:00 dwmw2@dwmw2.baythorne.internal +0 -0
#   BitKeeper file /inst/bk/sbc8260-2.6/drivers/mtd/maps/wr_sbc82xx_flash.c
# 
# drivers/mtd/maps/Makefile
#   2004/06/08 19:47:24+01:00 dwmw2@dwmw2.baythorne.internal +1 -0
#   Add WindRiver PowerQUICC II flash map driver
# 
# drivers/mtd/maps/Kconfig
#   2004/06/08 19:47:24+01:00 dwmw2@dwmw2.baythorne.internal +8 -0
#   Add WindRiver PowerQUICC II flash map driver
# 
# ChangeSet
#   2004/06/08 19:46:28+01:00 dwmw2@dwmw2.baythorne.internal 
#   Wind River PowerQUICC II SBC82xx update:
#    - Switch to using u-boot bdinfo.
#    - Set up CS11 for RTC if the bootloader didn't bother.
#    - Set BOOTROM_RESTART_ADDR so machine_restart() actually works.
#    - For non-uboot boot, note bus clock is 66MHz on 8265 model.
# 
# ChangeSet
#   2004/06/08 14:36:38-04:00 jesse.brandeburg@intel.com 
#   [PATCH] e1000: fix napi crash on ifdown during traffic
#   
#   Signed off by: Jesse Brandeburg
# 
# drivers/net/e1000/e1000_main.c
#   2004/06/03 20:59:04-04:00 jesse.brandeburg@intel.com +2 -1
#   e1000: fix napi crash on ifdown during traffic
# 
# arch/ppc/platforms/sbc82xx.h
#   2004/06/08 19:35:06+01:00 dwmw2@dwmw2.baythorne.internal +8 -18
#   Switch SBC82xx to u-boot bd_info
#   Set BOOTROM_RESTART_ADDR
# 
# arch/ppc/platforms/sbc82xx.c
#   2004/06/08 19:35:06+01:00 dwmw2@dwmw2.baythorne.internal +15 -3
#   Switch SBC82xx to u-boot bd_info
#   Set up CS11 for RTC if bootloader didn't.
# 
# arch/ppc/boot/simple/embed_config.c
#   2004/06/08 19:35:06+01:00 dwmw2@dwmw2.baythorne.internal +6 -18
#   Switch SBC82xx to u-boot bd_info
#   Master bus clock is 66MHz on 8265 model
# 
# arch/ppc/8260_io/fcc_enet.c
#   2004/06/08 19:35:06+01:00 dwmw2@dwmw2.baythorne.internal +8 -2
#   Switch SBC82xx to u-boot bd_info
# 
# ChangeSet
#   2004/06/08 14:33:48-04:00 akpm@osdl.org 
#   [PATCH] Fix tulip deadlocks on device removal
#   
#   From: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>
#   
#   Handle going-away devices.
# 
# drivers/net/tulip/interrupt.c
#   2004/05/25 23:28:59-04:00 akpm@osdl.org +4 -0
#   Fix tulip deadlocks on device removal
# 
# ChangeSet
#   2004/06/08 14:32:21-04:00 herbert@gondor.apana.org.au 
#   [PATCH] Fixed MCA resource bugs in at1700
#   
#   This patch fixes an incorrect MCA check as well as a leak on probe
#   failure in at1700.
# 
# drivers/net/at1700.c
#   2004/06/05 04:34:29-04:00 herbert@gondor.apana.org.au +9 -4
#   Fixed MCA resource bugs in at1700
# 
# ChangeSet
#   2004/06/08 14:32:12-04:00 herbert@gondor.apana.org.au 
#   [PATCH] Fix netdev leak on probe failure in 3c527
#   
#   This patch frees the netdev on failure in mc32_probe in 3c527.
# 
# drivers/net/3c527.c
#   2004/06/05 03:51:23-04:00 herbert@gondor.apana.org.au +1 -0
#   Fix netdev leak on probe failure in 3c527
# 
# ChangeSet
#   2004/06/08 11:31:45-07:00 hunold@convergence.de 
#   [PATCH] Make tda1004x DVB frontend driver work again
#   
#   Adrian Bunk noticed that the tda1004x DVB frontend driver was broken and
#   sent a small patch that at least made the driver work again.
#   
#   There was a discussion afterwards about the kernel syscall interface,
#   but at the end, the tda1004x DVB frontend driver is still non-functional.
#   
#   This re-applies the temporary band-aid.
# 
# drivers/media/dvb/frontends/tda1004x.c
#   2004/06/08 11:12:45-07:00 hunold@convergence.de +1 -0
#   Make tda1004x DVB frontend driver work again
# 
# ChangeSet
#   2004/06/08 14:11:12-04:00 alan@redhat.com 
#   [PATCH] epic100 fixes
#   
#   "Gee it works better if you turn the chip on before programming it"
#   
#   The ioctl to ethtool change broke that little detail...
#   
#   
#   I made the changes, Jeff agreed in principle, Red Hat owns them and I know
#   no reason they can't be contributed under the GPL v2 or later.
#   
#   Requires: ethtool change
# 
# drivers/net/epic100.c
#   2004/06/02 18:05:21-04:00 alan@redhat.com +28 -2
#   PATCH: epic100 fixes
# 
# ChangeSet
#   2004/06/08 14:11:04-04:00 alan@redhat.com 
#   [PATCH] ethtool power manglement hooks
#   
#   Several ethernet drivers have been broken by the ethtool support because
#   the ioctl code used to power the interface up and down as needed. Rather
#   than add this to each driver call Jeff Garzik suggested we add hooks
#   for before/after ethtool processing.
#   
#   This patch implements them which makes fixing the PM stuff easier,
#   as the epic100 patch to follow will show. It also cleans up the
#   via-velocity driver pm/ethtool logic a great deal. As per Jeff's
#   request the before handler is allowed to fail the operation.
#   
#   --
#   
#   The contribution herein included is a creation of Red Hat Inc. It is hereby
#   submitted under the license of the existing files and as a derivative work
#   thereof. I know of no reason for not having the right to submit the
#   work herein included.
#   
#   (Bluff your way in legalese ;))
# 
# net/core/ethtool.c
#   2004/06/02 17:54:28-04:00 alan@redhat.com +71 -31
#   PATCH: ethtool power manglement hooks
# 
# include/linux/ethtool.h
#   2004/06/02 17:53:29-04:00 alan@redhat.com +2 -0
#   PATCH: ethtool power manglement hooks
# 
# ChangeSet
#   2004/06/08 18:55:07+01:00 dwmw2@dwmw2.baythorne.internal 
#   Merge linux-mtd@bkbits.net:sbc8260-2.6
#   into dwmw2.baythorne.internal:/inst/bk/sbc8260-2.6
# 
# arch/ppc/syslib/Makefile
#   2004/06/08 18:55:02+01:00 dwmw2@dwmw2.baythorne.internal +0 -0
#   Auto merged
# 
# ChangeSet
#   2004/06/08 09:27:15-07:00 paulus@samba.org 
#   [PATCH] Make paca xCurrent field be a pointer
#   
#   The paca struct contains a pointer to the current task, which is used
#   for the `current' macro.  For some reason, this field is a u64, and
#   every time we use it we need a cast, because it is really a pointer.
#   This patch cleans things up a little by making it a pointer to struct
#   task_struct and removing the casts.  It also removes a now-incorrect
#   comment which said that r13 contains current (it now holds
#   &paca[smp_processor_id()]).
#   
#   Signed-off-by: Paul Mackerras <paulus@samba.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# include/asm-ppc64/paca.h
#   2004/06/07 21:49:03-07:00 paulus@samba.org +3 -1
#   Make paca xCurrent field be a pointer
# 
# include/asm-ppc64/current.h
#   2004/06/07 21:49:53-07:00 paulus@samba.org +1 -3
#   Make paca xCurrent field be a pointer
# 
# arch/ppc64/kernel/smp.c
#   2004/06/07 21:52:06-07:00 paulus@samba.org +3 -4
#   Make paca xCurrent field be a pointer
# 
# ChangeSet
#   2004/06/08 09:27:01-07:00 paulus@samba.org 
#   [PATCH] Single-stepping emulated instructions
#   
#   Occasionally the ppc64 kernel emulates a usermode instruction, for
#   example in the alignment exception handler.  Kumar Gala pointed out
#   (in the context of the ppc32 kernel) that if the instruction was being
#   single-stepped, and we end up emulating the instruction, we should
#   then send the process a SIGTRAP as if it had not been emulated and the
#   process had then taken a single-step exception.  This patch implements
#   this for ppc64.
#   
#   Signed-off-by: Paul Mackerras <paulus@samba.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/ppc64/kernel/traps.c
#   2004/06/07 22:31:36-07:00 paulus@samba.org +13 -3
#   Single-stepping emulated instructions
# 
# ChangeSet
#   2004/06/07 16:21:38-07:00 davem@nuts.davemloft.net 
#   [NETFILTER]: Put arpt_mutex back into arp_tables.c
# 
# net/ipv4/netfilter/arp_tables.c
#   2004/06/07 16:21:20-07:00 davem@nuts.davemloft.net +2 -0
#   [NETFILTER]: Put arpt_mutex back into arp_tables.c
# 
# include/linux/netfilter_arp.h
#   2004/06/07 16:21:20-07:00 davem@nuts.davemloft.net +0 -1
#   [NETFILTER]: Put arpt_mutex back into arp_tables.c
# 
# ChangeSet
#   2004/06/07 15:28:12-07:00 shemminger@osdl.org 
#   [TCP]: Add receive DRS info to tcp_info.
# 
# net/ipv4/tcp_diag.c
#   2004/06/07 15:27:58-07:00 shemminger@osdl.org +3 -0
#   [TCP]: Add receive DRS info to tcp_info.
# 
# include/linux/tcp.h
#   2004/06/07 15:27:58-07:00 shemminger@osdl.org +3 -0
#   [TCP]: Add receive DRS info to tcp_info.
# 
# ChangeSet
#   2004/06/07 15:27:26-07:00 shemminger@osdl.org 
#   [TCP]: Update tcp_get_info() comments in net/tcp.h
# 
# include/linux/tcp.h
#   2004/06/07 15:27:13-07:00 shemminger@osdl.org +3 -3
#   [TCP]: Update tcp_get_info() comments in net/tcp.h
# 
# ChangeSet
#   2004/06/07 14:21:48-07:00 baldrick@free.fr 
#   [PATCH] USB devio.c: deadlock fix
#   
#   proc_resetdevice is called with dev->serialize held.
#   usb_reset_device takes dev->serialize and then calls
#   __usb_reset_device.  To avoid deadlock, proc_resetdevice
#   should call __usb_reset_device directly.
#   
#   Signed-off-by: Duncan Sands <baldrick@free.fr>
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# include/linux/usb.h
#   2004/06/07 01:39:20-07:00 baldrick@free.fr +1 -0
#   USB devio.c: deadlock fix
# 
# drivers/usb/core/devio.c
#   2004/06/07 01:39:20-07:00 baldrick@free.fr +1 -1
#   USB devio.c: deadlock fix
# 
# ChangeSet
#   2004/06/07 14:14:47-07:00 akpm@osdl.org 
#   [PATCH] i386 defconfig update
#   
#   Updates i386 defconfig.  I simply ran `make oldconfig' and selected `m' where
#   it was available, otherwise `y'.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# arch/i386/defconfig
#   2004/06/07 06:29:17-07:00 akpm@osdl.org +50 -43
#   i386 defconfig update
# 
# ChangeSet
#   2004/06/07 14:14:37-07:00 akpm@osdl.org 
#   [PATCH] make buildcheck missing hunk
#   
#   Forgot to update the top-level makefile to invoke the new reference_init
#   script.
#   
#   Signed-off-by: Andrew Morton <akpm@osdl.org>
#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
# 
# Makefile
#   2004/06/07 06:30:33-07:00 akpm@osdl.org +1 -0
#   make buildcheck missing hunk
# 
# ChangeSet
#   2004/06/07 14:08:08-07:00 kaie@kuix.de 
#   [PATCH] USB: enable pwc usb camera driver
#   
#   The attached patch enables the pwc driver included with kernel 2.6.7-rc2
#   
#   It also removes the warnings during compilation.
#   However, note that I blindly duplicated the release approach used by
#   other usb camera drivers, replacing the current no-op.
#   
#   The driver works for me with a Logitech QuickCam Notebook Pro and
#   GnomeMeeting.
#   
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/media/pwc-if.c
#   2004/06/07 02:42:50-07:00 kaie@kuix.de +1 -8
#   USB: enable pwc usb camera driver
# 
# drivers/usb/media/Kconfig
#   2004/06/07 02:27:03-07:00 kaie@kuix.de +1 -1
#   USB: enable pwc usb camera driver
# 
# ChangeSet
#   2004/06/07 14:05:59-07:00 Siegfried.Hildebrand@FernUni-Hagen.de 
#   [PATCH] USB: Fix problems with cyberjack usb-serial-module since kernel 2.6.2
#   
#   > Send me a patch to back those changes out to fix your device and I'll
#   > apply it.  If the author is around to realize this, that should wake
#   > them up :)
#   
#   Ok, here you are! :)
#   Attached is a patch for linux-2.6.7-rc2. (though the patch hasn't changed
#   since -rc1)
#   
#   Again a short description:
#   (the patch removes most of the changes done in linux-2.6.2)
#   1. Removed the local buffer of cyberjack_write, because something goes wrong
#   upon a write-request bigger than the buffer. Without this, a write-request
#   stalls with error -3.
#   2. Removed some usb_clear_halt() lines. Without this, the device doesn't even
#   open and returns -7.
#   
#   It works for my cyberjack pinpad USB card reader on
#   - nforce2 chipset
#   - VIA KM266 chipset
#   - AMD Irongate chipset
#   
#   Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
# 
# drivers/usb/serial/cyberjack.c
#   2004/06/06 09:25:11-07:00 Siegfried.Hildebrand@FernUni-Hagen.de +6 -15
#   USB: Fix problems with cyberjack usb-serial-module since kernel 2.6.2
# 
# ChangeSet
#   2004/06/02 01:22:23+01:00 dwmw2@shinybook.infradead.org 
#   [PPC sbc82xx] Use mfspr macro for reading PVR in boot setup.
# 
# arch/ppc/boot/simple/embed_config.c
#   2004/06/02 01:22:02+01:00 dwmw2@shinybook.infradead.org +2 -1
#   Use mfspr macro.
# 
# ChangeSet
#   2004/05/31 13:28:44+01:00 dwmw2@shinybook.infradead.org 
#   Add support for WindRiver PowerQUICC II.
#   
#   Code from Guy Streeter <streeter@redhat.com>
# 
# arch/ppc/platforms/sbc82xx.h
#   2004/05/31 13:28:13+01:00 dwmw2@shinybook.infradead.org +34 -0
# 
# arch/ppc/platforms/sbc82xx.h
#   2004/05/31 13:28:13+01:00 dwmw2@shinybook.infradead.org +0 -0
#   BitKeeper file /home/dwmw2/bk/sbc8260-2.6/arch/ppc/platforms/sbc82xx.h
# 
# arch/ppc/platforms/sbc82xx.c
#   2004/05/31 13:28:12+01:00 dwmw2@shinybook.infradead.org +101 -0
# 
# include/asm-ppc/mpc8260.h
#   2004/05/31 13:28:12+01:00 dwmw2@shinybook.infradead.org +4 -0
#   Add SBC82xx
# 
# arch/ppc/syslib/Makefile
#   2004/05/31 13:28:12+01:00 dwmw2@shinybook.infradead.org +1 -0
#   Add todc_time.o for SBC82xx
# 
# arch/ppc/platforms/sbc82xx.c
#   2004/05/31 13:28:12+01:00 dwmw2@shinybook.infradead.org +0 -0
#   BitKeeper file /home/dwmw2/bk/sbc8260-2.6/arch/ppc/platforms/sbc82xx.c
# 
# arch/ppc/platforms/Makefile
#   2004/05/31 13:28:12+01:00 dwmw2@shinybook.infradead.org +1 -0
#   Add sbc82xx.o for SBC82xx
# 
# arch/ppc/boot/simple/embed_config.c
#   2004/05/31 13:28:12+01:00 dwmw2@shinybook.infradead.org +45 -0
#   Add setup for SBC82xx
# 
# arch/ppc/Kconfig
#   2004/05/31 13:28:12+01:00 dwmw2@shinybook.infradead.org +10 -1
#   Add SBC82xx for WindRiver PowerQUICC II
# 
# arch/ppc/8260_io/uart.c
#   2004/05/31 13:28:12+01:00 dwmw2@shinybook.infradead.org +1 -1
#   Don't use SCC2 on SBC82xx
# 
# arch/ppc/8260_io/fcc_enet.c
#   2004/05/31 13:28:12+01:00 dwmw2@shinybook.infradead.org +13 -0
#   Add SBC82xx support
# 
# ChangeSet
#   2004/05/31 13:21:45+01:00 dwmw2@shinybook.infradead.org 
#   Fix handle_sysrq() call in PPC 8260 uart driver
# 
# arch/ppc/8260_io/uart.c
#   2004/05/31 13:21:26+01:00 dwmw2@shinybook.infradead.org +1 -1
#   Fix handle_sysrq() args
# 
# ChangeSet
#   2004/05/31 13:16:19+01:00 dwmw2@shinybook.infradead.org 
#   PPC 8260 FCC Ethernet: Fix skb leak when TX ring overflows
#   
#   Patch from Guy Streeter <streeter@redhat.com>
#   and/or Peter Barada <pbarada@redhat.com>
# 
# arch/ppc/8260_io/fcc_enet.c
#   2004/05/31 13:15:47+01:00 dwmw2@shinybook.infradead.org +31 -7
#   Fix skb leak when TX ring overflows
# 
# ChangeSet
#   2004/05/31 13:07:48+01:00 dwmw2@shinybook.infradead.org 
#   Add PPC 8280 support, calculate core clock frequency.
#   
#   Patch from Guy Streeter <streeter@redhat.com>
# 
# arch/ppc/kernel/cputable.c
#   2004/05/31 13:07:12+01:00 dwmw2@shinybook.infradead.org +8 -0
#   Add 8280
# 
# arch/ppc/boot/simple/embed_config.c
#   2004/05/31 13:07:12+01:00 dwmw2@shinybook.infradead.org +48 -6
#   Calculate core clock frequency for 8260,8280.
# 
diff -Nru a/Makefile b/Makefile
--- a/Makefile	2004-06-08 21:28:52 -07:00
+++ b/Makefile	2004-06-08 21:28:52 -07:00
@@ -1062,6 +1062,7 @@
 
 buildcheck:
 	$(PERL) scripts/reference_discarded.pl
+	$(PERL) scripts/reference_init.pl
 
 endif #ifeq ($(config-targets),1)
 endif #ifeq ($(mixed-targets),1)
diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig
--- a/arch/i386/defconfig	2004-06-08 21:28:52 -07:00
+++ b/arch/i386/defconfig	2004-06-08 21:28:52 -07:00
@@ -18,8 +18,11 @@
 #
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
 CONFIG_LOG_BUF_SHIFT=15
 CONFIG_HOTPLUG=y
 # CONFIG_IKCONFIG is not set
@@ -30,6 +33,7 @@
 CONFIG_IOSCHED_NOOP=y
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 
 #
@@ -88,6 +92,7 @@
 # CONFIG_HPET_EMULATE_RTC is not set
 CONFIG_SMP=y
 CONFIG_NR_CPUS=8
+CONFIG_SCHED_SMT=y
 CONFIG_PREEMPT=y
 CONFIG_X86_LOCAL_APIC=y
 CONFIG_X86_IO_APIC=y
@@ -200,7 +205,7 @@
 #
 # Generic Driver Options
 #
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=m
 
 #
 # Memory Technology Devices (MTD)
@@ -259,7 +264,6 @@
 # CONFIG_BLK_DEV_HD_IDE is not set
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
-# CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -307,6 +311,7 @@
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_ARM is not set
 # CONFIG_IDE_CHIPSETS is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
@@ -332,7 +337,6 @@
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 #
 # CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_REPORT_LUNS=y
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
 
@@ -354,6 +358,7 @@
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+CONFIG_SCSI_DPT_I2O=m
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
 # CONFIG_SCSI_MEGARAID is not set
@@ -361,7 +366,9 @@
 # CONFIG_SCSI_SATA_SVW is not set
 CONFIG_SCSI_ATA_PIIX=y
 # CONFIG_SCSI_SATA_PROMISE is not set
+CONFIG_SCSI_SATA_SX4=m
 # CONFIG_SCSI_SATA_SIL is not set
+CONFIG_SCSI_SATA_SIS=m
 # CONFIG_SCSI_SATA_VIA is not set
 # CONFIG_SCSI_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
@@ -380,6 +387,9 @@
 # CONFIG_SCSI_IMM is not set
 # CONFIG_SCSI_NCR53C406A is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
+CONFIG_SCSI_IPR=m
+# CONFIG_SCSI_IPR_TRACE is not set
+# CONFIG_SCSI_IPR_DUMP is not set
 # CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PSI240I is not set
 # CONFIG_SCSI_QLOGIC_FAS is not set
@@ -484,8 +494,6 @@
 #
 # CONFIG_IP_VS is not set
 # CONFIG_IPV6 is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
 
@@ -539,13 +547,17 @@
 CONFIG_IP_NF_ARPTABLES=y
 CONFIG_IP_NF_ARPFILTER=y
 CONFIG_IP_NF_ARP_MANGLE=y
+CONFIG_IP_NF_TARGET_NOTRACK=m
+CONFIG_IP_NF_RAW=m
 
 #
 # 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
@@ -566,12 +578,12 @@
 # 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
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
 CONFIG_DUMMY=m
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
@@ -579,6 +591,11 @@
 # CONFIG_NET_SB1000 is not set
 
 #
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
@@ -619,7 +636,6 @@
 # CONFIG_8139TOO_TUNE_TWISTER is not set
 # CONFIG_8139TOO_8129 is not set
 # CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_8139_RXBUF_IDX=2
 # CONFIG_SIS900 is not set
 # CONFIG_EPIC100 is not set
 # CONFIG_SUNDANCE is not set
@@ -637,7 +653,6 @@
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
 
@@ -645,47 +660,31 @@
 # Ethernet (10000 Mbit)
 #
 # CONFIG_IXGB is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
+CONFIG_S2IO=m
+# CONFIG_S2IO_NAPI is not set
 
 #
 # Token Ring devices
 #
 # CONFIG_TR is not set
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
 
 #
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
+# Wireless LAN (non-hamradio)
 #
-# CONFIG_IRDA is not set
+# CONFIG_NET_RADIO is not set
 
 #
-# Bluetooth support
+# Wan interfaces
 #
-# CONFIG_BT is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
 
 #
 # ISDN subsystem
@@ -803,6 +802,7 @@
 # CONFIG_AGP_AMD is not set
 # CONFIG_AGP_AMD64 is not set
 CONFIG_AGP_INTEL=y
+CONFIG_AGP_INTEL_MCH=m
 # CONFIG_AGP_NVIDIA is not set
 # CONFIG_AGP_SIS is not set
 # CONFIG_AGP_SWORKS is not set
@@ -978,6 +978,7 @@
 #
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 # CONFIG_USB_OHCI_HCD is not set
 CONFIG_USB_UHCI_HCD=y
 
@@ -1012,6 +1013,7 @@
 # CONFIG_USB_KBTAB is not set
 # CONFIG_USB_POWERMATE is not set
 # CONFIG_USB_MTOUCH is not set
+CONFIG_USB_EGALAX=m
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
 
@@ -1061,6 +1063,8 @@
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_PHIDGETSERVO=m
 # CONFIG_USB_TEST is not set
 
 #
@@ -1110,6 +1114,7 @@
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
 # CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
@@ -1152,7 +1157,6 @@
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -1217,6 +1221,7 @@
 CONFIG_EARLY_PRINTK=y
 CONFIG_DEBUG_SPINLOCK_SLEEP=y
 # CONFIG_FRAME_POINTER is not set
+CONFIG_4KSTACKS=y
 CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
 
@@ -1234,8 +1239,10 @@
 # Library routines
 #
 CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
 CONFIG_X86_SMP=y
 CONFIG_X86_HT=y
 CONFIG_X86_BIOS_REBOOT=y
 CONFIG_X86_TRAMPOLINE=y
+CONFIG_X86_STD_RESOURCES=y
 CONFIG_PC=y
diff -Nru a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c
--- a/arch/ppc/8260_io/fcc_enet.c	2004-06-08 21:28:52 -07:00
+++ b/arch/ppc/8260_io/fcc_enet.c	2004-06-08 21:28:52 -07:00
@@ -158,12 +158,21 @@
 #define PA1_DIRA0	(PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV)
 #define PA1_DIRA1	(PA1_TXDAT | PA1_TXEN | PA1_TXER)
 
+#ifdef CONFIG_SBC82xx
+/* rx is clk9, tx is clk10
+ */
+#define PC_F1RXCLK     ((uint)0x00000100)
+#define PC_F1TXCLK     ((uint)0x00000200)
+#define CMX1_CLK_ROUTE ((uint)0x25000000)
+#define CMX1_CLK_MASK  ((uint)0xff000000)
+#else
 /* CLK12 is receive, CLK11 is transmit.  These are board specific.
 */
 #define PC_F1RXCLK	((uint)0x00000800)
 #define PC_F1TXCLK	((uint)0x00000400)
 #define CMX1_CLK_ROUTE	((uint)0x3e000000)
 #define CMX1_CLK_MASK	((uint)0xff000000)
+#endif /* !CONFIG_SBC82xx */
 
 /* I/O Pin assignment for FCC2.  I don't yet know the best way to do this,
  * but there is little variation among the choices.
@@ -288,6 +297,8 @@
 	ushort	skb_cur;
 	ushort	skb_dirty;
 
+	atomic_t n_pkts;  /* Number of packets in tx ring */
+
 	/* CPM dual port RAM relative addresses.
 	*/
 	cbd_t	*rx_bd_base;		/* Address of Rx and Tx buffers. */
@@ -347,6 +358,7 @@
 {
 	struct fcc_enet_private *cep = (struct fcc_enet_private *)dev->priv;
 	volatile cbd_t	*bdp;
+	int idx;
 
 	if (!cep->link) {
 		/* Link is down or autonegotiation is in progress. */
@@ -379,13 +391,24 @@
 	bdp->cbd_datlen = skb->len;
 	bdp->cbd_bufaddr = __pa(skb->data);
 
+	spin_lock_irq(&cep->lock);
+
 	/* Save skb pointer. */
-	cep->tx_skbuff[cep->skb_cur] = skb;
+	idx = cep->skb_cur & TX_RING_MOD_MASK;
+	if (cep->tx_skbuff[idx]) {
+		/* This should never happen (any more).
+		   Leave the sanity check in for now... */
+		printk(KERN_ERR "EEP. cep->tx_skbuff[%d] is %p not NULL in %s\n", 
+		       idx, cep->tx_skbuff[idx], __func__);
+		printk(KERN_ERR "Expect to lose %d bytes of sock space", 
+		       cep->tx_skbuff[idx]->truesize);
+	}
+	cep->tx_skbuff[idx] = skb;
 
 	cep->stats.tx_bytes += skb->len;
-	cep->skb_cur = (cep->skb_cur+1) & TX_RING_MOD_MASK;
+	cep->skb_cur++;
 
-	spin_lock_irq(&cep->lock);
+	atomic_inc(&cep->n_pkts);
 
 	/* Send it on its way.  Tell CPM its ready, interrupt when done,
 	 * its the last BD of the frame, and to put the CRC on the end.
@@ -404,9 +427,13 @@
 	else
 		bdp++;
 
-	if (bdp->cbd_sc & BD_ENET_TX_READY) {
-		netif_stop_queue(dev);
+
+	/* If the tx_ring is full, stop the queue */
+	if (atomic_read(&cep->n_pkts) >= (TX_RING_SIZE-1)) {
+	  if (!netif_queue_stopped(dev)) {
+		netif_stop_queue(dev);	  
 		cep->tx_full = 1;
+	  }
 	}
 
 	cep->cur_tx = (cbd_t *)bdp;
@@ -460,6 +487,7 @@
 	volatile cbd_t	*bdp;
 	ushort	int_events;
 	int	must_restart;
+	int idx;
 
 	cep = (struct fcc_enet_private *)dev->priv;
 
@@ -522,8 +550,12 @@
 			cep->stats.collisions++;
 
 		/* Free the sk buffer associated with this last transmit. */
-		dev_kfree_skb_irq(cep->tx_skbuff[cep->skb_dirty]);
-		cep->skb_dirty = (cep->skb_dirty + 1) & TX_RING_MOD_MASK;
+		idx = cep->skb_dirty & TX_RING_MOD_MASK;
+		dev_kfree_skb_irq(cep->tx_skbuff[idx]);
+		cep->tx_skbuff[idx] = NULL;
+		cep->skb_dirty++;
+
+		atomic_dec(&cep->n_pkts);
 
 		/* Update pointer to next buffer descriptor to be transmitted. */
 		if (bdp->cbd_sc & BD_ENET_TX_WRAP)
@@ -1594,11 +1626,21 @@
 	 */
 	eap = (unsigned char *)&(ep->fen_paddrh);
 	for (i=5; i>=0; i--) {
+#ifdef CONFIG_SBC82xx
+		if (i == 5) {
+			/* bd->bi_enetaddr holds the SCC0 address; the FCC
+			   devices count up from there */
+			dev->dev_addr[i] = bd->bi_enetaddr[i] & ~3;
+			dev->dev_addr[i] += 1 + fip->fc_fccnum;
+			*eap++ = dev->dev_addr[i];
+		}
+#else
 		if (i == 3) {
 			dev->dev_addr[i] = bd->bi_enetaddr[i];
 			dev->dev_addr[i] |= (1 << (7 - fip->fc_fccnum));
 			*eap++ = dev->dev_addr[i];
 		}
+#endif
 		else {
 			*eap++ = dev->dev_addr[i] = bd->bi_enetaddr[i];
 		}
@@ -1683,6 +1725,7 @@
 	while (cp->cp_cpcr & CPM_CR_FLG);
 
 	cep->skb_cur = cep->skb_dirty = 0;
+	atomic_set(&cep->n_pkts, 0);
 }
 
 /* Let 'er rip.
diff -Nru a/arch/ppc/8260_io/uart.c b/arch/ppc/8260_io/uart.c
--- a/arch/ppc/8260_io/uart.c	2004-06-08 21:28:52 -07:00
+++ b/arch/ppc/8260_io/uart.c	2004-06-08 21:28:52 -07:00
@@ -161,7 +161,7 @@
 #ifndef CONFIG_SCC1_ENET
 	{ 0,     0, PROFF_SCC1, SIU_INT_SCC1,   0, SCC_NUM_BASE},    /* SCC1 ttyS2 */
 #endif
-#ifndef CONFIG_SCC2_ENET
+#if !defined(CONFIG_SBC82xx) && !defined(CONFIG_SCC2_ENET)
 	{ 0,     0, PROFF_SCC2, SIU_INT_SCC2,   0, SCC_NUM_BASE + 1},    /* SCC2 ttyS3 */
 #endif
 };
@@ -475,7 +475,7 @@
 			if (break_pressed && info->line == sercons.index) {
 				if (ch != 0 && time_before(jiffies,
 							break_pressed + HZ*5)) {
-					handle_sysrq(ch, regs, NULL, NULL);
+					handle_sysrq(ch, regs, NULL);
 					break_pressed = 0;
 					goto ignore_char;
 				} else
diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig	2004-06-08 21:28:52 -07:00
+++ b/arch/ppc/Kconfig	2004-06-08 21:28:52 -07:00
@@ -542,6 +542,15 @@
 	  <http://www.windriver.com/>, but the EST8260 cannot be found on it
 	  and has probably been discontinued or rebadged.
 
+config SBC82xx
+	bool "SBC82xx"
+	---help---
+	  SBC PowerQUICC II, single-board computer with MPC82xx CPU
+	  Manufacturer: Wind River Systems, Inc.
+	  Date of Release: May 2003
+	  End of Life: -
+	  URL: <http://www.windriver.com/>
+
 config SBS8260
 	bool "SBS8260"
 
@@ -575,7 +584,7 @@
 config 8260
 	bool "MPC8260 CPM Support" if WILLOW
 	depends on 6xx
-	default y if TQM8260 || RPXSUPER || EST8260 || SBS8260
+	default y if TQM8260 || RPXSUPER || EST8260 || SBS8260 || SBC82xx
 	help
 	  The MPC8260 CPM (Communications Processor Module) is a typical
 	  embedded CPU made by Motorola.  Selecting this option means that
diff -Nru a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c
--- a/arch/ppc/boot/simple/embed_config.c	2004-06-08 21:28:52 -07:00
+++ b/arch/ppc/boot/simple/embed_config.c	2004-06-08 21:28:52 -07:00
@@ -10,6 +10,7 @@
 #include <linux/types.h>
 #include <linux/config.h>
 #include <linux/string.h>
+#include <asm/reg.h>
 #ifdef CONFIG_8xx
 #include <asm/mpc8xx.h>
 #endif
@@ -402,14 +403,18 @@
 
 #ifdef CONFIG_8260
 /* Compute 8260 clock values if the rom doesn't provide them.
- * We can't compute the internal core frequency (I don't know how to
- * do that).
  */
+static unsigned char bus2core_8260[] = {
+/*      0   1   2   3   4   5   6   7   8   9   a   b   c   d   e   f */
+	3,  2,  2,  2,  4,  4,  5,  9,  6, 11,  8, 10,  3, 12,  7,  2,
+	6,  5, 13,  2, 14,  4, 15,  2,  3, 11,  8, 10, 16, 12,  7,  2,
+};
+
 static void
 clk_8260(bd_t *bd)
 {
 	uint	scmr, vco_out, clkin;
-	uint	plldf, pllmf, busdf, brgdf, cpmdf;
+	uint	plldf, pllmf, corecnf;
 	volatile immap_t	*ip;
 
 	ip = (immap_t *)IMAP_ADDR;
@@ -423,8 +428,7 @@
 	*/
 	plldf = (scmr >> 12) & 1;
 	pllmf = scmr & 0xfff;
-	cpmdf = (scmr >> 16) & 0x0f;
-	busdf = (scmr >> 20) & 0x0f;
+	corecnf = (scmr >> 24) &0x1f;
 
 	/* This is arithmetic from the 8260 manual.
 	*/
@@ -433,6 +437,7 @@
 	bd->bi_vco = vco_out;		/* Save for later */
 
 	bd->bi_cpmfreq = vco_out / 2;	/* CPM Freq, in MHz */
+	bd->bi_intfreq = bd->bi_busfreq * bus2core_8260[corecnf] / 2;
 
 	/* Set Baud rate divisor.  The power up default is divide by 16,
 	 * but we set it again here in case it was changed.
@@ -440,7 +445,78 @@
 	ip->im_clkrst.car_sccr = 1;	/* DIV 16 BRG */
 	bd->bi_brgfreq = vco_out / 16;
 }
+
+static unsigned char bus2core_8280[] = {
+/*      0   1   2   3   4   5   6   7   8   9   a   b   c   d   e   f */
+	3,  2,  2,  2,  4,  4,  5,  9,  6, 11,  8, 10,  3, 12,  7,  2,
+	6,  5, 13,  2, 14,  2, 15,  2,  3,  2,  2,  2, 16,  2,  2,  2,
+};
+
+static void
+clk_8280(bd_t *bd)
+{
+	uint	scmr, main_clk, clkin;
+	uint	pllmf, corecnf;
+	volatile immap_t	*ip;
+
+	ip = (immap_t *)IMAP_ADDR;
+	scmr = ip->im_clkrst.car_scmr;
+
+	/* The clkin is always bus frequency.
+	*/
+	clkin = bd->bi_busfreq;
+
+	/* Collect the bits from the scmr.
+	*/
+	pllmf = scmr & 0xf;
+	corecnf = (scmr >> 24) & 0x1f;
+
+	/* This is arithmetic from the 8280 manual.
+	*/
+	main_clk = clkin * (pllmf + 1);
+
+	bd->bi_cpmfreq = main_clk / 2;	/* CPM Freq, in MHz */
+	bd->bi_intfreq = bd->bi_busfreq * bus2core_8280[corecnf] / 2;
+
+	/* Set Baud rate divisor.  The power up default is divide by 16,
+	 * but we set it again here in case it was changed.
+	 */
+	ip->im_clkrst.car_sccr = (ip->im_clkrst.car_sccr & 0x3) | 0x1;
+	bd->bi_brgfreq = main_clk / 16;
+}
 #endif
+
+#ifdef CONFIG_SBC82xx
+void
+embed_config(bd_t **bdp)
+{
+	u_char	*cp;
+	int	i;
+	bd_t	*bd;
+	unsigned long pvr;
+
+	bd = *bdp;
+
+	bd = &bdinfo;
+	*bdp = bd;
+	bd->bi_baudrate = 9600;
+	bd->bi_memsize = 256 * 1024 * 1024;	/* just a guess */
+
+	cp = (void*)SBC82xx_MACADDR_NVRAM_SCC1;
+	memcpy(bd->bi_enetaddr, cp, 6);
+
+	/* can busfreq be calculated? */
+	pvr = mfspr(PVR);
+	if ((pvr & 0xffff0000) == 0x80820000) {
+		bd->bi_busfreq = 100000000;
+		clk_8280(bd);
+	} else {
+		bd->bi_busfreq = 66000000;
+		clk_8260(bd);
+	}
+
+}
+#endif /* SBC82xx */
 
 #if defined(CONFIG_EST8260) || defined(CONFIG_TQM8260)
 void
diff -Nru a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c
--- a/arch/ppc/kernel/cputable.c	2004-06-08 21:28:52 -07:00
+++ b/arch/ppc/kernel/cputable.c	2004-06-08 21:28:52 -07:00
@@ -350,6 +350,14 @@
 	32, 32,
 	__setup_cpu_603
     },
+    {	/* 8280 is a G2_LE (603e core, plus some) */
+	0x7fff0000, 0x00820000, "8280",
+	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
+	CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS,
+	COMMON_PPC,
+	32, 32,
+	__setup_cpu_603
+    },
     {	/* default match, we assume split I/D cache & TB (non-601)... */
     	0x00000000, 0x00000000, "(generic PPC)",
 	CPU_FTR_COMMON |
diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
--- a/arch/ppc/platforms/Makefile	2004-06-08 21:28:52 -07:00
+++ b/arch/ppc/platforms/Makefile	2004-06-08 21:28:52 -07:00
@@ -45,6 +45,7 @@
 obj-$(CONFIG_PRPMC750)		+= prpmc750.o
 obj-$(CONFIG_PRPMC800)		+= prpmc800.o
 obj-$(CONFIG_SANDPOINT)		+= sandpoint.o
+obj-$(CONFIG_SBC82xx)		+= sbc82xx.o
 obj-$(CONFIG_SPRUCE)		+= spruce.o
 
 ifeq ($(CONFIG_SMP),y)
diff -Nru a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/sbc82xx.c	2004-06-08 21:28:52 -07:00
@@ -0,0 +1,113 @@
+/*
+ * arch/ppc/platforms/sbc82xx.c
+ *
+ * SBC82XX platform support
+ *
+ * Author: Guy Streeter <streeter@redhat.com>
+ *
+ * Derived from: est8260_setup.c by Allen Curtis, ONZ
+ *
+ * Copyright 2004 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/config.h>
+#include <linux/seq_file.h>
+#include <linux/stddef.h>
+
+#include <asm/mpc8260.h>
+#include <asm/machdep.h>
+#include <asm/io.h>
+#include <asm/todc.h>
+#include <asm/immap_8260.h>
+
+static void (*callback_setup_arch)(void);
+
+extern unsigned char __res[sizeof(bd_t)];
+
+extern void m8260_init(unsigned long r3, unsigned long r4,
+	unsigned long r5, unsigned long r6, unsigned long r7);
+
+extern void (*late_time_init)(void);
+
+static int
+sbc82xx_show_cpuinfo(struct seq_file *m)
+{
+	bd_t	*binfo = (bd_t *)__res;
+
+	seq_printf(m, "vendor\t\t: Wind River\n"
+		      "machine\t\t: SBC PowerQUICC II\n"
+		      "\n"
+		      "mem size\t\t: 0x%08lx\n"
+		      "console baud\t\t: %ld\n"
+		      "\n",
+		      binfo->bi_memsize,
+		      binfo->bi_baudrate);
+	return 0;
+}
+
+static void __init
+sbc82xx_setup_arch(void)
+{
+	printk("SBC PowerQUICC II Port\n");
+	callback_setup_arch();
+}
+
+TODC_ALLOC();
+
+/*
+ * Timer init happens before mem_init but after paging init, so we cannot
+ * directly use ioremap() at that time.
+ * late_time_init() is call after paging init.
+ */
+#ifdef CONFIG_GEN_RTC
+static void sbc82xx_time_init(void)
+{
+	volatile memctl8260_t *mc = &immr->im_memctl;
+	TODC_INIT(TODC_TYPE_MK48T59, 0, 0, SBC82xx_TODC_NVRAM_ADDR, 0);
+
+	/* Set up CS11 for RTC chip */
+	mc->memc_br11=0;
+	mc->memc_or11=0xffff0836;
+	mc->memc_br11=0x80000801;
+
+	todc_info->nvram_data =
+		(unsigned int)ioremap(todc_info->nvram_data, 0x2000);
+	BUG_ON(!todc_info->nvram_data);
+	ppc_md.get_rtc_time	= todc_get_rtc_time;
+	ppc_md.set_rtc_time	= todc_set_rtc_time;
+	ppc_md.nvram_read_val	= todc_direct_read_val;
+	ppc_md.nvram_write_val	= todc_direct_write_val;
+	todc_time_init();
+}
+#endif /* CONFIG_GEN_RTC */
+
+void __init
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+	      unsigned long r6, unsigned long r7)
+{
+	/* Generic 8260 platform initialization */
+	m8260_init(r3, r4, r5, r6, r7);
+
+	/* u-boot may be using one of the FCC Ethernet devices.
+	   Use the MAC address to the SCC. */
+	__res[offsetof(bd_t, bi_enetaddr[5])] &= ~3;
+
+	/* Anything special for this platform */
+	ppc_md.show_cpuinfo	= sbc82xx_show_cpuinfo;
+
+	callback_setup_arch	= ppc_md.setup_arch;
+	ppc_md.setup_arch	= sbc82xx_setup_arch;
+#ifdef CONFIG_GEN_RTC
+	ppc_md.time_init        = NULL;
+	ppc_md.get_rtc_time     = NULL;
+	ppc_md.set_rtc_time     = NULL;
+	ppc_md.nvram_read_val   = NULL;
+	ppc_md.nvram_write_val  = NULL;
+	late_time_init		= sbc82xx_time_init;
+#endif /* CONFIG_GEN_RTC */
+}
diff -Nru a/arch/ppc/platforms/sbc82xx.h b/arch/ppc/platforms/sbc82xx.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/platforms/sbc82xx.h	2004-06-08 21:28:52 -07:00
@@ -0,0 +1,24 @@
+/* Board information for the SBCPowerQUICCII, which should be generic for
+ * all 8260 boards.  The IMMR is now given to us so the hard define
+ * will soon be removed.  All of the clock values are computed from
+ * the configuration SCMR and the Power-On-Reset word.
+ */
+
+#ifndef __PPC_SBC82xx_H__
+#define __PPC_SBC82xx_H__
+
+#include <asm/ppcboot.h>
+
+#define IMAP_ADDR			0xf0000000
+#define CPM_MAP_ADDR			0xf0000000
+
+#define SBC82xx_TODC_NVRAM_ADDR		0x80000000
+
+#define SBC82xx_MACADDR_NVRAM_FCC1	0x220000c9	/* JP6B */
+#define SBC82xx_MACADDR_NVRAM_SCC1	0x220000cf	/* JP6A */
+#define SBC82xx_MACADDR_NVRAM_FCC2	0x220000d5	/* JP7A */
+#define SBC82xx_MACADDR_NVRAM_FCC3	0x220000db	/* JP7B */
+
+#define BOOTROM_RESTART_ADDR      ((uint)0x40000104)
+
+#endif /* __PPC_SBC82xx_H__ */
diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
--- a/arch/ppc/syslib/Makefile	2004-06-08 21:28:52 -07:00
+++ b/arch/ppc/syslib/Makefile	2004-06-08 21:28:52 -07:00
@@ -63,6 +63,7 @@
 obj-$(CONFIG_HARRIER)		+= harrier.o
 obj-$(CONFIG_PRPMC800)		+= open_pic.o indirect_pci.o pci_auto.o
 obj-$(CONFIG_SANDPOINT)		+= i8259.o open_pic.o pci_auto.o todc_time.o
+obj-$(CONFIG_SBC82xx)		+= todc_time.o
 obj-$(CONFIG_SPRUCE)		+= cpc700_pic.o indirect_pci.o pci_auto.o \
 				   todc_time.o
 obj-$(CONFIG_8260)		+= m8260_setup.o ppc8260_pic.o
diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
--- a/arch/ppc64/kernel/smp.c	2004-06-08 21:28:52 -07:00
+++ b/arch/ppc64/kernel/smp.c	2004-06-08 21:28:52 -07:00
@@ -390,8 +390,7 @@
 	}
 
 	/* Fixup atomic count: it exited inside IRQ handler. */
-	((struct task_struct *)paca[lcpu].xCurrent)->thread_info->preempt_count
-		= 0;
+	paca[lcpu].xCurrent->thread_info->preempt_count	= 0;
 	/* Fixup SLB round-robin so next segment (kernel) goes in segment 0 */
 	paca[lcpu].xStab_data.next_round_robin = 0;
 
@@ -817,7 +816,7 @@
 	init_idle(p, cpu);
 	unhash_process(p);
 
-	paca[cpu].xCurrent = (u64)p;
+	paca[cpu].xCurrent = p;
 	current_set[cpu] = p->thread_info;
 }
 
@@ -869,7 +868,7 @@
 	/* cpu_possible is set up in prom.c */
 	cpu_set(boot_cpuid, cpu_online_map);
 
-	paca[boot_cpuid].xCurrent = (u64)current;
+	paca[boot_cpuid].xCurrent = current;
 	current_set[boot_cpuid] = current->thread_info;
 }
 
diff -Nru a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c
--- a/arch/ppc64/kernel/traps.c	2004-06-08 21:28:52 -07:00
+++ b/arch/ppc64/kernel/traps.c	2004-06-08 21:28:52 -07:00
@@ -466,6 +466,18 @@
 	_exception(SIGTRAP, &info, regs);	
 }
 
+/*
+ * After we have successfully emulated an instruction, we have to
+ * check if the instruction was being single-stepped, and if so,
+ * pretend we got a single-step exception.  This was pointed out
+ * by Kumar Gala.  -- paulus
+ */
+static inline void emulate_single_step(struct pt_regs *regs)
+{
+	if (regs->msr & MSR_SE)
+		SingleStepException(regs);
+}
+
 static void dummy_perf(struct pt_regs *regs)
 {
 }
@@ -487,10 +499,8 @@
 	fixed = fix_alignment(regs);
 
 	if (fixed == 1) {
-		if (!user_mode(regs))
-			PPCDBG(PPCDBG_ALIGNFIXUP, "fix alignment at %lx\n",
-			       regs->nip);
 		regs->nip += 4;	/* skip over emulated instruction */
+		emulate_single_step(regs);
 		return;
 	}
 
diff -Nru a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c
--- a/drivers/media/dvb/frontends/tda1004x.c	2004-06-08 21:28:52 -07:00
+++ b/drivers/media/dvb/frontends/tda1004x.c	2004-06-08 21:28:52 -07:00
@@ -190,6 +190,7 @@
 static struct fwinfo tda10046h_fwinfo[] = { {.file_size = 286720,.fw_offset = 0x3c4f9,.fw_size = 24479} };
 static int tda10046h_fwinfo_count = sizeof(tda10046h_fwinfo) / sizeof(struct fwinfo);
 
+static int errno;
 
 
 static int tda1004x_write_byte(struct dvb_i2c_bus *i2c, struct tda1004x_state *tda_state, int reg, int data)
diff -Nru a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
--- a/drivers/mtd/maps/Kconfig	2004-06-08 21:28:52 -07:00
+++ b/drivers/mtd/maps/Kconfig	2004-06-08 21:28:52 -07:00
@@ -489,5 +489,13 @@
 	help
 	  Map driver to support image based filesystems for uClinux.
 
+config MTD_WRSBC8260
+	tristate "Map driver for WindRiver PowerQUICC II MPC82xx board"
+	depends on MTD_PARTITIONS && SBC82xx
+	help
+	  Map driver for WindRiver PowerQUICC II MPC82xx board. Drives
+	  all three flash regions on CS0, CS1 and CS6 if they are configured
+	  correctly by the boot loader.
+
 endmenu
 
diff -Nru a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
--- a/drivers/mtd/maps/Makefile	2004-06-08 21:28:52 -07:00
+++ b/drivers/mtd/maps/Makefile	2004-06-08 21:28:52 -07:00
@@ -56,3 +56,4 @@
 obj-$(CONFIG_MTD_ARCTIC)	+= arctic-mtd.o
 obj-$(CONFIG_MTD_H720X)		+= h720x-flash.o
 obj-$(CONFIG_MTD_IXP4XX)	+= ixp4xx.o
+obj-$(CONFIG_MTD_WRSBC8260)	+= wr_sbc82xx_flash.o
diff -Nru a/drivers/mtd/maps/wr_sbc82xx_flash.c b/drivers/mtd/maps/wr_sbc82xx_flash.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/drivers/mtd/maps/wr_sbc82xx_flash.c	2004-06-08 21:28:52 -07:00
@@ -0,0 +1,167 @@
+/*
+ * $Id: wr_sbc82xx_flash.c,v 1.1 2004/06/07 10:21:32 dwmw2 Exp $
+ *
+ * Map for flash chips on Wind River PowerQUICC II SBC82xx board.
+ *
+ * Copyright (C) 2004 Red Hat, Inc.
+ *
+ * Author: David Woodhouse <dwmw2@infradead.org>
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <asm/io.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/config.h>
+#include <linux/mtd/partitions.h>
+
+#include <asm/immap_8260.h>
+
+static struct mtd_info *sbcmtd[3];
+static struct mtd_partition *sbcmtd_parts[3];
+
+struct map_info sbc82xx_flash_map[3] = {
+	{.name = "Boot flash"},
+	{.name = "Alternate boot flash"},
+	{.name = "User flash"}
+};
+
+static struct mtd_partition smallflash_parts[] = {
+	{
+		.name =		"space",
+		.size =		0x100000,
+		.offset =	0,
+	}, {
+		.name =		"bootloader",
+		.size =		MTDPART_SIZ_FULL,
+		.offset =	MTDPART_OFS_APPEND,
+	}
+};
+
+static struct mtd_partition bigflash_parts[] = {
+	{
+		.name =		"bootloader",
+		.size =		0x80000,
+		.offset =	0,
+	}, {
+		.name =		"file system",
+		.size =		MTDPART_SIZ_FULL,
+		.offset =	MTDPART_OFS_APPEND,
+	}
+};
+
+static const char *part_probes[] __initdata = {"cmdlinepart", "RedBoot", NULL};
+
+int __init init_sbc82xx_flash(void)
+{
+	volatile  memctl8260_t *mc = &immr->im_memctl;
+	int bigflash;
+	int i;
+
+	/* First, register the boot flash, whichever we're booting from */
+	if ((mc->memc_br0 & 0x00001800) == 0x00001800) {
+		bigflash = 0;
+	} else if ((mc->memc_br0 & 0x00001800) == 0x00000800) {
+		bigflash = 1;
+	} else {
+		printk(KERN_WARNING "Bus Controller register BR0 is %08x. Cannot determine flash configuration\n", mc->memc_br0);
+		return 1;
+	}
+
+	/* Set parameters for the big flash chip (CS6 or CS0) */
+	sbc82xx_flash_map[bigflash].buswidth = 4;
+	sbc82xx_flash_map[bigflash].size = 0x4000000;
+
+	/* Set parameters for the small flash chip (CS0 or CS6) */
+	sbc82xx_flash_map[!bigflash].buswidth = 1;
+	sbc82xx_flash_map[!bigflash].size = 0x200000;
+
+	/* Set parameters for the user flash chip (CS1) */
+	sbc82xx_flash_map[2].buswidth = 4;
+	sbc82xx_flash_map[2].size = 0x4000000;
+
+	sbc82xx_flash_map[0].phys = mc->memc_br0 & 0xffff8000;
+	sbc82xx_flash_map[1].phys = mc->memc_br6 & 0xffff8000;
+	sbc82xx_flash_map[2].phys = mc->memc_br1 & 0xffff8000;
+
+	for (i=0; i<3; i++) {
+		int8_t flashcs[3] = { 0, 6, 1 };
+		int nr_parts;
+
+		printk(KERN_NOTICE "PowerQUICC II %s (%ld MiB on CS%d",
+		       sbc82xx_flash_map[i].name, sbc82xx_flash_map[i].size >> 20, flashcs[i]);
+		if (!sbc82xx_flash_map[i].phys) {
+			/* We know it can't be at zero. */
+			printk("): disabled by bootloader.\n");
+			continue;
+		}
+		printk(" at %08lx)\n",  sbc82xx_flash_map[i].phys);
+
+		sbc82xx_flash_map[i].virt = (unsigned long)ioremap(sbc82xx_flash_map[i].phys, sbc82xx_flash_map[i].size);
+
+		if (!sbc82xx_flash_map[i].virt) {
+			printk("Failed to ioremap\n");
+			continue;
+		}
+
+		simple_map_init(&sbc82xx_flash_map[i]);
+
+		sbcmtd[i] = do_map_probe("cfi_probe", &sbc82xx_flash_map[i]);
+
+		if (!sbcmtd[i])
+			continue;
+
+		sbcmtd[i]->owner = THIS_MODULE;
+
+		nr_parts = parse_mtd_partitions(sbcmtd[i], part_probes,
+						&sbcmtd_parts[i], 0);
+		if (nr_parts > 0) {
+			add_mtd_partitions (sbcmtd[i], sbcmtd_parts[i], nr_parts);
+			continue;
+		}
+
+		/* No partitioning detected. Use default */
+		if (i == 2) {
+			add_mtd_device(sbcmtd[i]);
+		} else if (i == bigflash) {
+			add_mtd_partitions (sbcmtd[i], bigflash_parts, ARRAY_SIZE(bigflash_parts));
+		} else {
+			add_mtd_partitions (sbcmtd[i], smallflash_parts, ARRAY_SIZE(smallflash_parts));
+		}
+	}
+	return 0;
+}
+
+static void __exit cleanup_sbc82xx_flash(void)
+{
+	int i;
+
+	for (i=0; i<3; i++) {
+		if (!sbcmtd[i])
+			continue;
+
+		if (i<2 || sbcmtd_parts[i])
+			del_mtd_partitions(sbcmtd[i]);
+		else
+			del_mtd_device(sbcmtd[i]);
+			
+		kfree(sbcmtd_parts[i]);
+		map_destroy(sbcmtd[i]);
+		
+		iounmap((void *)sbc82xx_flash_map[i].virt);
+		sbc82xx_flash_map[i].virt = 0;
+	}
+}
+
+module_init(init_sbc82xx_flash);
+module_exit(cleanup_sbc82xx_flash);
+
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
+MODULE_DESCRIPTION("Flash map driver for WindRiver PowerQUICC II");
diff -Nru a/drivers/net/3c527.c b/drivers/net/3c527.c
--- a/drivers/net/3c527.c	2004-06-08 21:28:52 -07:00
+++ b/drivers/net/3c527.c	2004-06-08 21:28:52 -07:00
@@ -287,6 +287,7 @@
 			
 		}
 	}
+	free_netdev(dev);
 	return ERR_PTR(-ENODEV);
 }
 
diff -Nru a/drivers/net/at1700.c b/drivers/net/at1700.c
--- a/drivers/net/at1700.c	2004-06-08 21:28:52 -07:00
+++ b/drivers/net/at1700.c	2004-06-08 21:28:52 -07:00
@@ -242,7 +242,7 @@
 {
 #ifdef CONFIG_MCA	
 	struct net_local *lp = netdev_priv(dev);
-	if (lp->mca_slot)
+	if (lp->mca_slot >= 0)
 		mca_mark_as_unused(lp->mca_slot);
 #endif	
 	free_irq(dev->irq, NULL);
@@ -444,11 +444,11 @@
 					break;
 			}
 			if (i == 8) {
-				goto err_out;
+				goto err_mca;
 			}
 		} else {
 			if (fmv18x_probe_list[inb(ioaddr + IOCONFIG) & 0x07] != ioaddr)
-				goto err_out;
+				goto err_mca;
 			irq = fmv_irqmap[(inb(ioaddr + IOCONFIG)>>6) & 0x03];
 		}
 	}
@@ -546,11 +546,16 @@
 	if (ret) {
 		printk ("  AT1700 at %#3x is unusable due to a conflict on"
 				"IRQ %d.\n", ioaddr, irq);
-		goto err_out;
+		goto err_mca;
 	}
 
 	return 0;
 
+err_mca:
+#ifdef CONFIG_MCA
+	if (slot >= 0)
+		mca_mark_as_unused(slot);
+#endif
 err_out:
 #ifndef CONFIG_X86_PC9800
 	release_region(ioaddr, AT1700_IO_EXTENT);
diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
--- a/drivers/net/e1000/e1000_main.c	2004-06-08 21:28:52 -07:00
+++ b/drivers/net/e1000/e1000_main.c	2004-06-08 21:28:52 -07:00
@@ -52,7 +52,7 @@
 
 char e1000_driver_name[] = "e1000";
 char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
-char e1000_driver_version[] = "5.2.52-k2";
+char e1000_driver_version[] = "5.2.52-k4";
 char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation.";
 
 /* e1000_pci_tbl - PCI Device ID Table
@@ -2143,6 +2143,7 @@
 	if(work_done < work_to_do || !netif_running(netdev)) {
 		netif_rx_complete(netdev);
 		e1000_irq_enable(adapter);
+		return 0;
 	}
 
 	return (work_done >= work_to_do);
diff -Nru a/drivers/net/epic100.c b/drivers/net/epic100.c
--- a/drivers/net/epic100.c	2004-06-08 21:28:52 -07:00
+++ b/drivers/net/epic100.c	2004-06-08 21:28:52 -07:00
@@ -66,12 +66,15 @@
 	LK1.1.14 (Kryzsztof Halasa):
 	* fix spurious bad initializations
 	* pound phy a la SMSC's app note on the subject
+	
+	AC1.1.14ac
+	* fix power up/down for ethtool that broke in 1.11
 
 */
 
 #define DRV_NAME        "epic100"
-#define DRV_VERSION     "1.11+LK1.1.14"
-#define DRV_RELDATE     "Aug 4, 2002"
+#define DRV_VERSION     "1.11+LK1.1.14+AC1.1.14"
+#define DRV_RELDATE     "June 2, 2004"
 
 /* The user-configurable values.
    These may be modified when a driver module is loaded.*/
@@ -1424,6 +1427,27 @@
 	debug = value;
 }
 
+static int ethtool_begin(struct net_device *dev)
+{
+	unsigned long ioaddr = dev->base_addr;
+	/* power-up, if interface is down */
+	if (! netif_running(dev)) {
+		outl(0x0200, ioaddr + GENCTL);
+		outl((inl(ioaddr + NVCTL) & ~0x003C) | 0x4800, ioaddr + NVCTL);
+	}
+	return 0;
+}
+
+static void ethtool_complete(struct net_device *dev)
+{
+	unsigned long ioaddr = dev->base_addr;
+	/* power-down, if interface is down */
+	if (! netif_running(dev)) {
+		outl(0x0008, ioaddr + GENCTL);
+		outl((inl(ioaddr + NVCTL) & ~0x483C) | 0x0000, ioaddr + NVCTL);
+	}
+}
+
 static struct ethtool_ops netdev_ethtool_ops = {
 	.get_drvinfo		= netdev_get_drvinfo,
 	.get_settings		= netdev_get_settings,
@@ -1434,6 +1458,8 @@
 	.set_msglevel		= netdev_set_msglevel,
 	.get_sg			= ethtool_op_get_sg,
 	.get_tx_csum		= ethtool_op_get_tx_csum,
+	.begin			= ethtool_begin,
+	.complete		= ethtool_complete
 };
 
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
diff -Nru a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c
--- a/drivers/net/tulip/interrupt.c	2004-06-08 21:28:52 -07:00
+++ b/drivers/net/tulip/interrupt.c	2004-06-08 21:28:52 -07:00
@@ -133,6 +133,10 @@
 			   tp->rx_ring[entry].status);
 
        do {
+		if (inl(dev->base_addr + CSR5) == 0xffffffff) {
+			printk(KERN_DEBUG " In tulip_poll(), hardware disappeared.\n");
+			break;
+		}
                /* Acknowledge current RX interrupt sources. */
                outl((RxIntr | RxNoBuf), dev->base_addr + CSR5);
  
diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c	2004-06-08 21:28:52 -07:00
+++ b/drivers/usb/core/devio.c	2004-06-08 21:28:52 -07:00
@@ -719,7 +719,7 @@
 
 static int proc_resetdevice(struct dev_state *ps)
 {
-	return usb_reset_device(ps->dev);
+	return __usb_reset_device(ps->dev);
 
 }
 
diff -Nru a/drivers/usb/media/Kconfig b/drivers/usb/media/Kconfig
--- a/drivers/usb/media/Kconfig	2004-06-08 21:28:52 -07:00
+++ b/drivers/usb/media/Kconfig	2004-06-08 21:28:52 -07:00
@@ -108,7 +108,7 @@
 
 config USB_PWC
 	tristate "USB Philips Cameras"
-	depends on USB && VIDEO_DEV && BROKEN
+	depends on USB && VIDEO_DEV
 	---help---
 	  Say Y or M here if you want to use one of these Philips & OEM
           webcams:
diff -Nru a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c
--- a/drivers/usb/media/pwc-if.c	2004-06-08 21:28:52 -07:00
+++ b/drivers/usb/media/pwc-if.c	2004-06-08 21:28:52 -07:00
@@ -129,7 +129,6 @@
 
 static int pwc_video_open(struct inode *inode, struct file *file);
 static int pwc_video_close(struct inode *inode, struct file *file);
-static int pwc_video_release(struct video_device *);			  
 static ssize_t pwc_video_read(struct file *file, char *buf,
 			  size_t count, loff_t *ppos);
 static unsigned int pwc_video_poll(struct file *file, poll_table *wait);
@@ -1121,12 +1120,6 @@
 	return 0;
 }
 
-static int pwc_video_release(struct video_device *vfd)
-{
-	Trace(TRACE_OPEN, "pwc_video_release() called. Now what?\n");
-}
-		
-
 /*
  *	FIXME: what about two parallel reads ????
  *      ANSWER: Not supported. You can't open the device more than once,
@@ -1855,7 +1848,7 @@
 		}
 	}
 
-	pdev->vdev.release = pwc_video_release;
+	pdev->vdev.release = video_device_release;
 	i = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, video_nr);
 	if (i < 0) {
 		Err("Failed to register as video device (%d).\n", i);
diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
--- a/drivers/usb/serial/cyberjack.c	2004-06-08 21:28:52 -07:00
+++ b/drivers/usb/serial/cyberjack.c	2004-06-08 21:28:52 -07:00
@@ -109,7 +109,7 @@
 	short		rdtodo;		/* Bytes still to read */
 	unsigned char	wrbuf[5*64];	/* Buffer for collecting data to write */
 	short		wrfilled;	/* Overall data size we already got */
-	short		wrsent;		/* Data akready sent */
+	short		wrsent;		/* Data already sent */
 };
 
 /* do some startup allocations not currently performed by usb_serial_probe() */
@@ -159,8 +159,6 @@
 
 	dbg("%s - usb_clear_halt", __FUNCTION__ );
 	usb_clear_halt(port->serial->dev, port->write_urb->pipe);
-	usb_clear_halt(port->serial->dev, port->read_urb->pipe);
-	usb_clear_halt(port->serial->dev, port->interrupt_in_urb->pipe);
 
 	/* force low_latency on so that our tty_push actually forces
 	 * the data through, otherwise it is scheduled, and with high
@@ -212,7 +210,6 @@
 	unsigned long flags;
 	int result;
 	int wrexpected;
-	unsigned char localbuf[CYBERJACK_LOCAL_BUF_SIZE];	/* Buffer for collecting data to write */
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
 	dbg("%s - from_user %d", __FUNCTION__, from_user);
@@ -229,28 +226,22 @@
 
 	spin_lock_irqsave(&priv->lock, flags);
 
-	if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ||
-		(count>sizeof(localbuf)) ) {
-		/* To much data  for buffer. Reset buffer. */
+	if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
+		/* To much data for buffer. Reset buffer. */
 		priv->wrfilled=0;
 		spin_unlock_irqrestore(&priv->lock, flags);
 		return (0);
 	}
 
-	spin_unlock_irqrestore(&priv->lock, flags);
-
 	/* Copy data */
 	if (from_user) {
-		if (copy_from_user(localbuf, buf, count)) {
+		if (copy_from_user(priv->wrbuf+priv->wrfilled, buf, count)) {
+			spin_unlock_irqrestore(&priv->lock, flags);
 			return -EFAULT;
 		}
 	} else {
-		memcpy (localbuf, buf, count);
+		memcpy (priv->wrbuf+priv->wrfilled, buf, count);
 	}  
-
-	spin_lock_irqsave(&priv->lock, flags);
-
-	memcpy (priv->wrbuf+priv->wrfilled, localbuf, count);
 
 	usb_serial_debug_data (__FILE__, __FUNCTION__, count,
 		priv->wrbuf+priv->wrfilled);
diff -Nru a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h
--- a/include/asm-ppc/mpc8260.h	2004-06-08 21:28:52 -07:00
+++ b/include/asm-ppc/mpc8260.h	2004-06-08 21:28:52 -07:00
@@ -16,6 +16,10 @@
 #include <platforms/est8260.h>
 #endif
 
+#ifdef CONFIG_SBC82xx
+#include <platforms/sbc82xx.h>
+#endif
+
 #ifdef CONFIG_SBS8260
 #include <platforms/sbs8260.h>
 #endif
diff -Nru a/include/asm-ppc64/current.h b/include/asm-ppc64/current.h
--- a/include/asm-ppc64/current.h	2004-06-08 21:28:52 -07:00
+++ b/include/asm-ppc64/current.h	2004-06-08 21:28:52 -07:00
@@ -8,13 +8,11 @@
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version
  * 2 of the License, or (at your option) any later version.
- *
- * Use r13 for current since the ppc64 ABI reserves it - Anton
  */
 
 #include <asm/thread_info.h>
 
-#define get_current()   ((struct task_struct *)(get_paca()->xCurrent))
+#define get_current()   (get_paca()->xCurrent)
 #define current         get_current()
 
 #endif /* !(_PPC64_CURRENT_H) */
diff -Nru a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h
--- a/include/asm-ppc64/paca.h	2004-06-08 21:28:52 -07:00
+++ b/include/asm-ppc64/paca.h	2004-06-08 21:28:52 -07:00
@@ -37,6 +37,8 @@
 register struct paca_struct *local_paca asm("r13");
 #define get_paca()	local_paca
 
+struct task_struct;
+
 /*============================================================================
  * Name_______:	paca
  *
@@ -59,7 +61,7 @@
  */
 	struct ItLpPaca *xLpPacaPtr;	/* Pointer to LpPaca for PLIC		0x00 */
 	struct ItLpRegSave *xLpRegSavePtr; /* Pointer to LpRegSave for PLIC	0x08 */
-	u64 xCurrent;  		        /* Pointer to current			0x10 */
+	struct task_struct *xCurrent;	/* Pointer to current			0x10 */
 	/* Note: the spinlock functions in arch/ppc64/lib/locks.c load lock_token and
 	   xPacaIndex with a single lwz instruction, using the constant offset 24.
 	   If you move either field, fix the spinlocks and rwlocks. */
diff -Nru a/include/linux/ethtool.h b/include/linux/ethtool.h
--- a/include/linux/ethtool.h	2004-06-08 21:28:52 -07:00
+++ b/include/linux/ethtool.h	2004-06-08 21:28:52 -07:00
@@ -351,6 +351,8 @@
 	int	(*phys_id)(struct net_device *, u32);
 	int	(*get_stats_count)(struct net_device *);
 	void	(*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
+	int	(*begin)(struct net_device *);
+	void	(*complete)(struct net_device *);
 };
 
 /* CMDs currently supported */
diff -Nru a/include/linux/netfilter_arp.h b/include/linux/netfilter_arp.h
--- a/include/linux/netfilter_arp.h	2004-06-08 21:28:52 -07:00
+++ b/include/linux/netfilter_arp.h	2004-06-08 21:28:52 -07:00
@@ -17,5 +17,4 @@
 #define NF_ARP_FORWARD	2
 #define NF_ARP_NUMHOOKS	3
 
-static DECLARE_MUTEX(arpt_mutex);
 #endif /* __LINUX_ARP_NETFILTER_H */
diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h
--- a/include/linux/tcp.h	2004-06-08 21:28:52 -07:00
+++ b/include/linux/tcp.h	2004-06-08 21:28:52 -07:00
@@ -183,6 +183,9 @@
 	__u32	tcpi_snd_cwnd;
 	__u32	tcpi_advmss;
 	__u32	tcpi_reordering;
+
+	__u32	tcpi_rcv_rtt;
+	__u32	tcpi_rcv_space;
 };
 
 #ifdef __KERNEL__
@@ -351,11 +354,11 @@
 	__u8	urg_mode;	/* In urgent mode		*/
 	__u32	snd_up;		/* Urgent pointer		*/
 
-	/* The syn_wait_lock is necessary only to avoid tcp_get_info having
+	/* The syn_wait_lock is necessary only to avoid proc interface having
 	 * to grab the main lock sock while browsing the listening hash
 	 * (otherwise it's deadlock prone).
-	 * This lock is acquired in read mode only from tcp_get_info() and
-	 * it's acquired in write mode _only_ from code that is actively
+	 * This lock is acquired in read mode only from listening_get_next()
+	 * and it's acquired in write mode _only_ from code that is actively
 	 * changing the syn_wait_queue. All readers that are holding
 	 * the master sock lock don't need to grab this lock in read mode
 	 * too as the syn_wait_queue writes are always protected from
diff -Nru a/include/linux/usb.h b/include/linux/usb.h
--- a/include/linux/usb.h	2004-06-08 21:28:52 -07:00
+++ b/include/linux/usb.h	2004-06-08 21:28:52 -07:00
@@ -334,6 +334,7 @@
 
 /* mostly for devices emulating SCSI over USB */
 extern int usb_reset_device(struct usb_device *dev);
+extern int __usb_reset_device(struct usb_device *dev);
 
 extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
 
diff -Nru a/lib/rwsem.c b/lib/rwsem.c
--- a/lib/rwsem.c	2004-06-08 21:28:52 -07:00
+++ b/lib/rwsem.c	2004-06-08 21:28:52 -07:00
@@ -29,15 +29,15 @@
 
 /*
  * handle the lock being released whilst there are processes blocked on it that can now run
- * - if we come here, then:
- *   - the 'active part' of the count (&0x0000ffff) reached zero but has been re-incremented
+ * - if we come here from up_xxxx(), then:
+ *   - the 'active part' of the count (&0x0000ffff) had reached zero (but may have changed)
  *   - the 'waiting part' of the count (&0xffff0000) is negative (and will still be so)
  *   - there must be someone on the queue
  * - the spinlock must be held by the caller
  * - woken process blocks are discarded from the list after having task zeroed
- * - writers are only woken if wakewrite is non-zero
+ * - writers are only woken if downgrading is false
  */
-static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int wakewrite)
+static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int downgrading)
 {
 	struct rwsem_waiter *waiter;
 	struct task_struct *tsk;
@@ -46,10 +46,12 @@
 
 	rwsemtrace(sem,"Entering __rwsem_do_wake");
 
-	if (!wakewrite)
+	if (downgrading)
 		goto dont_wake_writers;
 
-	/* only wake someone up if we can transition the active part of the count from 0 -> 1 */
+	/* if we came through an up_xxxx() call, we only only wake someone up
+	 * if we can transition the active part of the count from 0 -> 1
+	 */
  try_again:
 	oldcount = rwsem_atomic_update(RWSEM_ACTIVE_BIAS,sem) - RWSEM_ACTIVE_BIAS;
 	if (oldcount & RWSEM_ACTIVE_MASK)
@@ -78,9 +80,10 @@
 	if (waiter->flags & RWSEM_WAITING_FOR_WRITE)
 		goto out;
 
-	/* grant an infinite number of read locks to the readers at the front of the queue
-	 * - note we increment the 'active part' of the count by the number of readers (less one
-	 *   for the activity decrement we've already done) before waking any processes up
+	/* grant an infinite number of read locks to the readers at the front
+	 * of the queue
+	 * - note we increment the 'active part' of the count by the number of
+	 *   readers before waking any processes up
 	 */
  readers_only:
 	woken = 0;
@@ -95,8 +98,10 @@
 	} while (waiter->flags & RWSEM_WAITING_FOR_READ);
 
 	loop = woken;
-	woken *= RWSEM_ACTIVE_BIAS-RWSEM_WAITING_BIAS;
-	woken -= RWSEM_ACTIVE_BIAS;
+	woken *= RWSEM_ACTIVE_BIAS - RWSEM_WAITING_BIAS;
+	if (!downgrading)
+		woken -= RWSEM_ACTIVE_BIAS; /* we'd already done one increment
+					     * earlier */
 	rwsem_atomic_add(woken,sem);
 
 	next = sem->wait_list.next;
@@ -150,7 +155,7 @@
 	 * - it might even be this process, since the waker takes a more active part
 	 */
 	if (!(count & RWSEM_ACTIVE_MASK))
-		sem = __rwsem_do_wake(sem,1);
+		sem = __rwsem_do_wake(sem, 0);
 
 	spin_unlock(&sem->wait_lock);
 
@@ -201,7 +206,7 @@
 
 /*
  * handle waking up a waiter on the semaphore
- * - up_read has decremented the active part of the count if we come here
+ * - up_read/up_write has decremented the active part of the count if we come here
  */
 struct rw_semaphore fastcall *rwsem_wake(struct rw_semaphore *sem)
 {
@@ -211,7 +216,7 @@
 
 	/* do nothing if list empty */
 	if (!list_empty(&sem->wait_list))
-		sem = __rwsem_do_wake(sem,1);
+		sem = __rwsem_do_wake(sem, 0);
 
 	spin_unlock(&sem->wait_lock);
 
@@ -233,7 +238,7 @@
 
 	/* do nothing if list empty */
 	if (!list_empty(&sem->wait_list))
-		sem = __rwsem_do_wake(sem,0);
+		sem = __rwsem_do_wake(sem, 1);
 
 	spin_unlock(&sem->wait_lock);
 
diff -Nru a/net/core/ethtool.c b/net/core/ethtool.c
--- a/net/core/ethtool.c	2004-06-08 21:28:52 -07:00
+++ b/net/core/ethtool.c	2004-06-08 21:28:52 -07:00
@@ -652,6 +652,7 @@
 	struct net_device *dev = __dev_get_by_name(ifr->ifr_name);
 	void __user *useraddr = ifr->ifr_data;
 	u32 ethcmd;
+	int rc;
 
 	/*
 	 * XXX: This can be pushed down into the ethtool_* handlers that
@@ -669,70 +670,109 @@
 	if (copy_from_user(&ethcmd, useraddr, sizeof (ethcmd)))
 		return -EFAULT;
 
+	if(dev->ethtool_ops->begin)
+		if ((rc = dev->ethtool_ops->begin(dev)) < 0)
+			return rc;
+
 	switch (ethcmd) {
 	case ETHTOOL_GSET:
-		return ethtool_get_settings(dev, useraddr);
+		rc = ethtool_get_settings(dev, useraddr);
+		break;
 	case ETHTOOL_SSET:
-		return ethtool_set_settings(dev, useraddr);
+		rc = ethtool_set_settings(dev, useraddr);
+		break;
 	case ETHTOOL_GDRVINFO:
-		return ethtool_get_drvinfo(dev, useraddr);
+		rc = ethtool_get_drvinfo(dev, useraddr);
+
+		break;
 	case ETHTOOL_GREGS:
-		return ethtool_get_regs(dev, useraddr);
+		rc = ethtool_get_regs(dev, useraddr);
+		break;
 	case ETHTOOL_GWOL:
-		return ethtool_get_wol(dev, useraddr);
+		rc = ethtool_get_wol(dev, useraddr);
+		break;
 	case ETHTOOL_SWOL:
-		return ethtool_set_wol(dev, useraddr);
+		rc = ethtool_set_wol(dev, useraddr);
+		break;
 	case ETHTOOL_GMSGLVL:
-		return ethtool_get_msglevel(dev, useraddr);
+		rc = ethtool_get_msglevel(dev, useraddr);
+		break;
 	case ETHTOOL_SMSGLVL:
-		return ethtool_set_msglevel(dev, useraddr);
+		rc = ethtool_set_msglevel(dev, useraddr);
+		break;
 	case ETHTOOL_NWAY_RST:
-		return ethtool_nway_reset(dev);
+		rc = ethtool_nway_reset(dev);
+		break;
 	case ETHTOOL_GLINK:
-		return ethtool_get_link(dev, useraddr);
+		rc = ethtool_get_link(dev, useraddr);
+		break;
 	case ETHTOOL_GEEPROM:
-		return ethtool_get_eeprom(dev, useraddr);
+		rc = ethtool_get_eeprom(dev, useraddr);
+		break;
 	case ETHTOOL_SEEPROM:
-		return ethtool_set_eeprom(dev, useraddr);
+		rc = ethtool_set_eeprom(dev, useraddr);
+		break;
 	case ETHTOOL_GCOALESCE:
-		return ethtool_get_coalesce(dev, useraddr);
+		rc = ethtool_get_coalesce(dev, useraddr);
+		break;
 	case ETHTOOL_SCOALESCE:
-		return ethtool_set_coalesce(dev, useraddr);
+		rc = ethtool_set_coalesce(dev, useraddr);
+		break;
 	case ETHTOOL_GRINGPARAM:
-		return ethtool_get_ringparam(dev, useraddr);
+		rc = ethtool_get_ringparam(dev, useraddr);
+		break;
 	case ETHTOOL_SRINGPARAM:
-		return ethtool_set_ringparam(dev, useraddr);
+		rc = ethtool_set_ringparam(dev, useraddr);
+		break;
 	case ETHTOOL_GPAUSEPARAM:
-		return ethtool_get_pauseparam(dev, useraddr);
+		rc = ethtool_get_pauseparam(dev, useraddr);
+		break;
 	case ETHTOOL_SPAUSEPARAM:
-		return ethtool_set_pauseparam(dev, useraddr);
+		rc = ethtool_set_pauseparam(dev, useraddr);
+		break;
 	case ETHTOOL_GRXCSUM:
-		return ethtool_get_rx_csum(dev, useraddr);
+		rc = ethtool_get_rx_csum(dev, useraddr);
+		break;
 	case ETHTOOL_SRXCSUM:
-		return ethtool_set_rx_csum(dev, useraddr);
+		rc = ethtool_set_rx_csum(dev, useraddr);
+		break;
 	case ETHTOOL_GTXCSUM:
-		return ethtool_get_tx_csum(dev, useraddr);
+		rc = ethtool_get_tx_csum(dev, useraddr);
+		break;
 	case ETHTOOL_STXCSUM:
-		return ethtool_set_tx_csum(dev, useraddr);
+		rc = ethtool_set_tx_csum(dev, useraddr);
+		break;
 	case ETHTOOL_GSG:
-		return ethtool_get_sg(dev, useraddr);
+		rc = ethtool_get_sg(dev, useraddr);
+		break;
 	case ETHTOOL_SSG:
-		return ethtool_set_sg(dev, useraddr);
+		rc = ethtool_set_sg(dev, useraddr);
+		break;
 	case ETHTOOL_GTSO:
-		return ethtool_get_tso(dev, useraddr);
+		rc = ethtool_get_tso(dev, useraddr);
+		break;
 	case ETHTOOL_STSO:
-		return ethtool_set_tso(dev, useraddr);
+		rc = ethtool_set_tso(dev, useraddr);
+		break;
 	case ETHTOOL_TEST:
-		return ethtool_self_test(dev, useraddr);
+		rc = ethtool_self_test(dev, useraddr);
+		break;
 	case ETHTOOL_GSTRINGS:
-		return ethtool_get_strings(dev, useraddr);
+		rc = ethtool_get_strings(dev, useraddr);
+		break;
 	case ETHTOOL_PHYS_ID:
-		return ethtool_phys_id(dev, useraddr);
+		rc = ethtool_phys_id(dev, useraddr);
+		break;
 	case ETHTOOL_GSTATS:
-		return ethtool_get_stats(dev, useraddr);
+		rc = ethtool_get_stats(dev, useraddr);
+		break;
 	default:
-		return -EOPNOTSUPP;
+		rc =  -EOPNOTSUPP;
 	}
+	
+	if(dev->ethtool_ops->complete)
+		dev->ethtool_ops->complete(dev);
+	return rc;
 
  ioctl:
 	if (dev->do_ioctl)
diff -Nru a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
--- a/net/ipv4/netfilter/arp_tables.c	2004-06-08 21:28:52 -07:00
+++ b/net/ipv4/netfilter/arp_tables.c	2004-06-08 21:28:52 -07:00
@@ -62,6 +62,8 @@
 #include <linux/netfilter_ipv4/lockhelp.h>
 #include <linux/netfilter_ipv4/listhelp.h>
 
+static DECLARE_MUTEX(arpt_mutex);
+
 struct arpt_table_info {
 	unsigned int size;
 	unsigned int number;
diff -Nru a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
--- a/net/ipv4/tcp_diag.c	2004-06-08 21:28:52 -07:00
+++ b/net/ipv4/tcp_diag.c	2004-06-08 21:28:52 -07:00
@@ -91,6 +91,9 @@
 	info->tcpi_snd_cwnd = tp->snd_cwnd;
 	info->tcpi_advmss = tp->advmss;
 	info->tcpi_reordering = tp->reordering;
+
+	info->tcpi_rcv_rtt = ((1000000*tp->rcv_rtt_est.rtt)/HZ)>>3;
+	info->tcpi_rcv_space = tp->rcvq_space.space;
 }
 
 static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,
