http://linux.bkbits.net/linux-2.5 zach@vmware.com[torvalds]|ChangeSet|20041026231839|53923 zach # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/26 16:18:39-07:00 zach@vmware.com # [PATCH] faster signal handling on x86 # # Optimize away the unconditional write to debug registers on signal delivery # path. This is already done on x86_64. # # We only need to write to dr7 if there is a breakpoint to re-enable, and # MOVDR is a serializing instruction, which is expensive. Getting rid of # it gets a 33% faster signal delivery path (at least on Xeon - I didn't # test other CPUs, so your gain may vary). # # [ Editors note: it's likely only that slow on Netburst. Serializing is # not that expensive, but it is likely that writing to %db7 invalidates # the trace cache, which explains why it's so slow on Xeon - it's not # just the op itself, it has to re-populate the cache all the time. # --- Linus ] # # # Measured delta TSC for three paths on a 2.4GHz Xeon. # # 1) With unconditional write to dr7 : 800-1000 cycles # 2) With conditional write to dr7 : 84-112 cycles # 3) With unlikely write to dr7 : 84 cycles # # Performance test using divzero microbenchmark (3 million divide by zeros): # # With unconditional write: # 7.445 real / 6.136 system # 7.529 real / 6.482 system # 7.541 real / 5.974 system # 7.546 real / 6.217 system # 7.445 real / 6.167 system # # With unlikely write: # 5.779 real / 4.518 system # 5.783 real / 4.591 system # 5.552 real / 4.569 system # 5.790 real / 4.528 system # 5.554 real / 4.382 system # # That's about a 33% speedup - more than I expected; apparently getting rid # of the serializing instruction makes the do_signal path much faster. # # Zachary Amsden (zach@vmware.com) # # arch/i386/kernel/signal.c # 2004/10/26 14:30:54-07:00 zach@vmware.com +3 -1 # faster signal handling on x86 # # ChangeSet # 2004/10/26 09:09:37-07:00 torvalds@ppc970.osdl.org # Merge bk://gkernel.bkbits.net/net-drivers-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # net/core/dev.c # 2004/10/26 09:09:33-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # include/linux/netdevice.h # 2004/10/26 09:09:33-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/10/26 08:22:01-07:00 akpm@osdl.org # [PATCH] revert- sys_setaltroot # # We decided to do this a different way. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/syscalls.h # 2004/10/24 02:47:46-07:00 akpm@osdl.org +0 -1 # revert- sys_setaltroot # # include/asm-sparc64/unistd.h # 2004/10/24 02:47:46-07:00 akpm@osdl.org +1 -1 # revert- sys_setaltroot # # include/asm-ia64/unistd.h # 2004/10/24 02:47:46-07:00 akpm@osdl.org +0 -1 # revert- sys_setaltroot # # include/asm-i386/unistd.h # 2004/10/24 03:32:46-07:00 akpm@osdl.org +1 -1 # revert- sys_setaltroot # # fs/namei.c # 2004/10/24 03:32:35-07:00 akpm@osdl.org +5 -57 # revert- sys_setaltroot # # arch/sparc64/kernel/systbls.S # 2004/10/24 02:47:46-07:00 akpm@osdl.org +2 -2 # revert- sys_setaltroot # # arch/ia64/kernel/entry.S # 2004/10/24 02:47:46-07:00 akpm@osdl.org +1 -1 # revert- sys_setaltroot # # arch/i386/kernel/entry.S # 2004/10/24 03:32:48-07:00 akpm@osdl.org +1 -1 # revert- sys_setaltroot # # ChangeSet # 2004/10/26 08:02:35-07:00 roland@redhat.com # [PATCH] Wake up signalled tasks when exiting ptrace # # In general it is not safe to do any non-ptrace wakeup of a thread in # TASK_TRACED, because the waking thread could race with a ptrace call # that could be doing things like mucking directly with its kernel stack. # # AFAIK noone has established that whatever clobberation ptrace can do to # a running thread is safe even if it will never return to user mode, so # we can't allow this even for SIGKILL. # # What we _can_ safely do is make a thread switching out of TASK_TRACED # resume rather than sitting in TASK_STOPPED if it has a pending SIGKILL # or SIGCONT. The following patch does this. # # This should be sufficient for the shutdown case. When killing all # processes, if the tracer gets killed first, the tracee goes into # TASK_STOPPED and will be woken and killed by the SIGKILL (same as # before). If the tracee gets killed first, it gets a pending SIGKILL and # doesn't wake up immediately--but, now, when the tracer gets killed, the # tracee will then wake up to die. # # This will also fix the (same) situations that can arise now where you # have used gdb (or whatever ptrace caller), killed -9 the gdb and the # process being debugged, but still have to kill -CONT the process before # it goes away (now it should just go away either the first time or when # you kill gdb). # # Signed-off-by: Roland McGrath # Signed-off-by: Linus Torvalds # # kernel/ptrace.c # 2004/10/25 21:13:16-07:00 roland@redhat.com +14 -0 # Wake up signalled tasks when exiting ptrace # # ChangeSet # 2004/10/26 08:02:20-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Some sparse fixes # # This is a batch of sparse fixes for things in arch/ppc64/* and # include/asm-ppc64/* # # More to come of course... # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/udbg.h # 2004/10/25 23:52:29-07:00 benh@kernel.crashing.org +3 -1 # ppc64: Some sparse fixes # # include/asm-ppc64/io.h # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Some sparse fixes # # arch/ppc64/mm/init.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +3 -3 # ppc64: Some sparse fixes # # arch/ppc64/kernel/xics.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +21 -18 # ppc64: Some sparse fixes # # arch/ppc64/kernel/vecemu.c # 2004/10/25 23:42:56-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Some sparse fixes # # arch/ppc64/kernel/udbg.c # 2004/10/25 23:51:33-07:00 benh@kernel.crashing.org +46 -46 # ppc64: Some sparse fixes # # arch/ppc64/kernel/rtasd.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Some sparse fixes # # arch/ppc64/kernel/proc_ppc64.c # 2004/10/25 23:36:24-07:00 benh@kernel.crashing.org +22 -11 # ppc64: Some sparse fixes # # arch/ppc64/kernel/pci.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +2 -2 # ppc64: Some sparse fixes # # arch/ppc64/kernel/pSeries_pci.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +8 -8 # ppc64: Some sparse fixes # # arch/ppc64/kernel/nvram.c # 2004/10/25 23:16:16-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Some sparse fixes # # arch/ppc64/kernel/lparcfg.c # 2004/10/25 23:42:05-07:00 benh@kernel.crashing.org +5 -5 # ppc64: Some sparse fixes # # ChangeSet # 2004/10/26 08:02:03-07:00 benh@kernel.crashing.org # [PATCH] 8250: Fix empty port registration # # My latest 8250 patch prevented registration of "empty" ports (ports that # have a 0 iobase in the static table). Unfortunately, some archs seem to rely # on this, and so broke. This patch reverts that part of the patch. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # drivers/serial/8250.c # 2004/10/25 05:05:26-07:00 benh@kernel.crashing.org +0 -7 # 8250: Fix empty port registration # # ChangeSet # 2004/10/26 07:53:34-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Add new "Maple" platform support # # This adds support for the Maple 970FX Eval Board. It adds the basic # arch support. For the Maple to be fully functional, it needs a couple # more patches to be applied for IDE and Ethernet that are currently # pending with the respective maintainers of those subsystems. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/maple_time.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +226 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/maple_setup.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +243 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/maple_pci.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +528 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/configs/maple_defconfig # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +921 -0 # ppc64: Add new "Maple" platform support # # include/asm-ppc64/processor.h # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +1 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/udbg.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +29 -3 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/setup.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +8 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/prom_init.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +2 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/misc.S # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +2 -2 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/maple_time.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/maple_time.c # # arch/ppc64/kernel/maple_setup.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/maple_setup.c # # arch/ppc64/kernel/maple_pci.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/maple_pci.c # # arch/ppc64/kernel/idle.c # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +5 -3 # ppc64: Add new "Maple" platform support # # arch/ppc64/kernel/Makefile # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +3 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/configs/maple_defconfig # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/configs/maple_defconfig # # arch/ppc64/Makefile # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +2 -0 # ppc64: Add new "Maple" platform support # # arch/ppc64/Kconfig # 2004/10/25 19:24:06-07:00 benh@kernel.crashing.org +15 -0 # ppc64: Add new "Maple" platform support # # ChangeSet # 2004/10/26 07:31:50-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix g5-only build # # The iommu_free_table() patch broke g5 only build by adding back some # incestuous relationship between generic code and pSeries code. # # This wraps this in #ifdef as a quick fix until the original author of # the patch comes up with a better solution. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/iommu.h # 2004/10/26 00:19:17-07:00 benh@kernel.crashing.org +8 -0 # ppc64: Fix g5-only build # # arch/ppc64/kernel/prom.c # 2004/10/26 00:22:28-07:00 benh@kernel.crashing.org +5 -0 # ppc64: Fix g5-only build # # ChangeSet # 2004/10/26 07:31:36-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix new mpic driver on some POWER3 # # On machines using the "ISU" mecanism for the MPIC, the new driver didn't properly # calculate the new interrupt count when an ISU was added. That would cause later on # failure to request interrupts in the offending range. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/mpic.c # 2004/10/25 21:36:00-07:00 benh@kernel.crashing.org +4 -2 # ppc64: Fix new mpic driver on some POWER3 # # ChangeSet # 2004/10/26 07:31:24-07:00 benh@kernel.crashing.org # [PATCH] ppc64: PCI ignores empty phb regions # # The ppc64 PCI code, when parsing the OF tree, may end up getting empty # regions in addition to the "normal" ones for the PHB (some pSeries OF # device-tree contains weird "ranges" properties). These are harmless but # do trigger some annoying warnings during boot, so let's ignore them. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pci.c # 2004/10/25 21:18:54-07:00 benh@kernel.crashing.org +2 -0 # ppc64: PCI ignores empty phb regions # # ChangeSet # 2004/10/26 03:42:24-04:00 jgarzik@pobox.com # [libata] return ENOTTY rather than EOPNOTSUPP for unknown-ioctl # # drivers/scsi/libata-scsi.c # 2004/10/26 03:42:18-04:00 jgarzik@pobox.com +1 -1 # [libata] return ENOTTY rather than EOPNOTSUPP for unknown-ioctl # # ChangeSet # 2004/10/26 01:20:52-04:00 arjan@infradead.org # [PATCH] remove NET_HW_FLOWCONTROL # # CONFIG_NET_HW_FLOWCONTROL is entirely unused now, and superceded by NAPI in # practice, so remove the dead code # # Signed-off-by: Arjan van de Ven # Signed-off-by: Jeff Garzik # # net/core/dev.c # 2004/10/25 16:14:10-04:00 arjan@infradead.org +2 -91 # remove NET_HW_FLOWCONTROL # # net/Kconfig # 2004/10/25 16:14:23-04:00 arjan@infradead.org +0 -18 # remove NET_HW_FLOWCONTROL # # include/linux/netdevice.h # 2004/10/25 16:08:54-04:00 arjan@infradead.org +0 -2 # remove NET_HW_FLOWCONTROL # # ChangeSet # 2004/10/25 21:28:00-07:00 davem@nuts.davemloft.net # Merge bk://bk.skbuff.net:20610/linux-2.6-inet6-20041026/ # into nuts.davemloft.net:/disk1/BK/net-2.6 # # net/ipv6/route.c # 2004/10/25 21:27:49-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # include/net/ip6_route.h # 2004/10/25 21:27:49-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/10/26 13:11:47+09:00 yoshfuji@linux-ipv6.org # [IPV6] kill a warning when building without CONFIG_SYSCTL. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/10/26 13:11:35+09:00 yoshfuji@linux-ipv6.org +2 -1 # [IPV6] kill a warning when building without CONFIG_SYSCTL. # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/25 21:11:03-07:00 benh@kernel.crashing.org # [PATCH] ppc64: don't include # # This patch fixes a couple of places where the ppc64 iSeries code would # #include . The only "system" include I consider acceptable is # provided by gcc. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pacaData.c # 2004/10/25 15:43:35-07:00 benh@kernel.crashing.org +2 -3 # ppc64: don't include # # arch/ppc64/kernel/LparData.c # 2004/10/25 15:44:56-07:00 benh@kernel.crashing.org +2 -3 # ppc64: don't include # # ChangeSet # 2004/10/25 21:10:51-07:00 benh@kernel.crashing.org # [PATCH] Remove bogus definition of local chrp_int_ack_special in pSeries_setup.c. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/25 20:09:10-07:00 benh@kernel.crashing.org +1 -3 # Remove bogus definition of local chrp_int_ack_special in pSeries_setup.c. # # ChangeSet # 2004/10/25 20:57:45-07:00 herbert@gondor.apana.org.au # [TCP]: Handle real partial-ACKs of TSO frames correctly. # # Actually, I think we've caught your crash now. If that code path # is triggering at all, then it'll trigger with TSO packets too. If # we get a truly partial ack on a TSO packet, then tcp_tso_acked will # not trim it off. So we will fall through to this last-ditch trim # call, which doesn't update packets_out. # # There are two solutions to this problem. I've taken the simpler # approach for now. We simply trim off the partial bits in tcp_tso_acked # and live with the fact that the packet counters may differ from # what's on the netwrok by one. # # Later on we can 'fix' this by remembering where the original TSO # packet started from, perhaps in skb->h or somewhere. Dave, is this # worth it? # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/10/25 20:57:25-07:00 herbert@gondor.apana.org.au +1 -1 # [TCP]: Handle real partial-ACKs of TSO frames correctly. # # Actually, I think we've caught your crash now. If that code path # is triggering at all, then it'll trigger with TSO packets too. If # we get a truly partial ack on a TSO packet, then tcp_tso_acked will # not trim it off. So we will fall through to this last-ditch trim # call, which doesn't update packets_out. # # There are two solutions to this problem. I've taken the simpler # approach for now. We simply trim off the partial bits in tcp_tso_acked # and live with the fact that the packet counters may differ from # what's on the netwrok by one. # # Later on we can 'fix' this by remembering where the original TSO # packet started from, perhaps in skb->h or somewhere. Dave, is this # worth it? # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2004/10/25 20:57:25-07:00 herbert@gondor.apana.org.au +6 -12 # [TCP]: Handle real partial-ACKs of TSO frames correctly. # # Actually, I think we've caught your crash now. If that code path # is triggering at all, then it'll trigger with TSO packets too. If # we get a truly partial ack on a TSO packet, then tcp_tso_acked will # not trim it off. So we will fall through to this last-ditch trim # call, which doesn't update packets_out. # # There are two solutions to this problem. I've taken the simpler # approach for now. We simply trim off the partial bits in tcp_tso_acked # and live with the fact that the packet counters may differ from # what's on the netwrok by one. # # Later on we can 'fix' this by remembering where the original TSO # packet started from, perhaps in skb->h or somewhere. Dave, is this # worth it? # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/26 12:55:56+09:00 yoshfuji@linux-ipv6.org # [IPV6] NDISC: update neighbor cache entry by RS. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/ndisc.c # 2004/10/26 12:55:42+09:00 yoshfuji@linux-ipv6.org +62 -0 # [IPV6] NDISC: update neighbor cache entry by RS. # # Signed-off-by: Hideaki YOSHIFUJI # # include/net/ndisc.h # 2004/10/26 12:55:42+09:00 yoshfuji@linux-ipv6.org +5 -0 # [IPV6] NDISC: update neighbor cache entry by RS. # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/26 12:54:58+09:00 yoshfuji@linux-ipv6.org # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/route.c # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +2 -5 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/ndisc.c # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +2 -2 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +5 -18 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # include/net/ip6_route.h # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +1 -1 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # include/net/addrconf.h # 2004/10/26 12:54:27+09:00 yoshfuji@linux-ipv6.org +1 -2 # [IPV6] simplify functions related to RTF_ALLONLINK. # # Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and # rt6_purge_dflt_routers(). # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/26 12:54:41+09:00 yoshfuji@linux-ipv6.org # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/route.c # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +2 -5 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/ndisc.c # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +1 -1 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/ip6_fib.c # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +1 -1 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/addrconf.c # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +1 -1 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # include/linux/ipv6_route.h # 2004/10/26 12:54:23+09:00 yoshfuji@linux-ipv6.org +2 -1 # [IPV6] Remove codes related to RTF_ALLONLINK. # # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/26 12:51:07+09:00 Brian.Haley@hp.com # [IPV6] Lookup appropriate destination when sending TCPv6 with routing header. # # Signed-off-by: Brian Haley # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/tcp_ipv6.c # 2004/10/26 12:50:56+09:00 Brian.Haley@hp.com +6 -0 # [IPV6] Lookup appropriate destination when sending TCPv6 with routing header. # # Signed-off-by: Brian Haley # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/10/25 20:49:06-07:00 akpm@osdl.org # [CRYPTO]: aes-586-asm: small optimizations # # From: Denis Vlasenko # # - recode back-to-back fwd_rnd() pairs to avoid two register moves. # # - ditto for inv_rnd(). # # - optimize out lea 0(%ebp),%ebp # # - remove two stray insns # # # size aes-i586-asm.o.org aes-i586-asm.o # text data bss dec hex filename # 5971 0 0 5971 1753 aes-i586-asm.o.org # 5905 0 0 5905 1711 aes-i586-asm.o # # Overall, patch does not add and does not modify any insns, only removes a # handful of them. However, speed difference is way below noise level. # # Run-tested with tcrypt module. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # arch/i386/crypto/aes-i586-asm.S # 2004/10/25 20:48:46-07:00 akpm@osdl.org +103 -65 # [CRYPTO]: aes-586-asm: small optimizations # # From: Denis Vlasenko # # - recode back-to-back fwd_rnd() pairs to avoid two register moves. # # - ditto for inv_rnd(). # # - optimize out lea 0(%ebp),%ebp # # - remove two stray insns # # # size aes-i586-asm.o.org aes-i586-asm.o # text data bss dec hex filename # 5971 0 0 5971 1753 aes-i586-asm.o.org # 5905 0 0 5905 1711 aes-i586-asm.o # # Overall, patch does not add and does not modify any insns, only removes a # handful of them. However, speed difference is way below noise level. # # Run-tested with tcrypt module. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:48:25-07:00 akpm@osdl.org # [CRYPTO]: aes-586-asm: formatting changes # # From: Denis Vlasenko # # - Macro parameters renamed for clarity. # # - Inaccurate comments fixed. # # - ebp register usage de-obfuscated (this is needed for next patch). # # No real code changes. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # arch/i386/crypto/aes-i586-asm.S # 2004/10/25 20:48:06-07:00 akpm@osdl.org +115 -118 # [CRYPTO]: aes-586-asm: formatting changes # # From: Denis Vlasenko # # - Macro parameters renamed for clarity. # # - Inaccurate comments fixed. # # - ebp register usage de-obfuscated (this is needed for next patch). # # No real code changes. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:47:38-07:00 akpm@osdl.org # [CRYPTO]: reduce sha512_transform() stack usage, speedup # # Patch moves large temporary u64 W[80] from stack to ctx struct: # # * reduces stack usage by 640 bytes # * saves one 640-byte memset() per sha512_transform() # (we still do it after *all* iterations are done) # * quite unexpectedly saves 1.6k of code on i386 # because stack offsets now fit into 8bits # and many stack addressing insns got 3 bytes smaller: # # # size sha512.o.org sha512.o # text data bss dec hex filename # 8281 372 0 8653 21cd sha512.o.org # 6649 372 0 7021 1b6d sha512.o # # # objdump -d sha512.o.org | cut -b9- >sha512.d.org # # objdump -d sha512.o | cut -b9- >sha512.d # # diff -u sha512.d.org sha512.d # [snip] # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # crypto/sha512.c # 2004/10/25 20:47:19-07:00 akpm@osdl.org +7 -5 # [CRYPTO]: reduce sha512_transform() stack usage, speedup # # Patch moves large temporary u64 W[80] from stack to ctx struct: # # * reduces stack usage by 640 bytes # * saves one 640-byte memset() per sha512_transform() # (we still do it after *all* iterations are done) # * quite unexpectedly saves 1.6k of code on i386 # because stack offsets now fit into 8bits # and many stack addressing insns got 3 bytes smaller: # # # size sha512.o.org sha512.o # text data bss dec hex filename # 8281 372 0 8653 21cd sha512.o.org # 6649 372 0 7021 1b6d sha512.o # # # objdump -d sha512.o.org | cut -b9- >sha512.d.org # # objdump -d sha512.o | cut -b9- >sha512.d # # diff -u sha512.d.org sha512.d # [snip] # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:46:17-07:00 akpm@osdl.org # [CRYPTO]: small sha512 cleanup # # Looks like open-coded be_to_cpu. GCC produces rather poor code for this. # be_to_cpu produces asm()s which are ~4 times shorter. # # Compile-tested only. # # I am not sure whether input can be 64bit-unaligned. # If it indeed can be, replace: # # ((u64*)(input))[I] -> get_unaligned( ((u64*)(input))+I ) # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # crypto/sha512.c # 2004/10/25 20:45:58-07:00 akpm@osdl.org +2 -17 # [CRYPTO]: small sha512 cleanup # # Looks like open-coded be_to_cpu. GCC produces rather poor code for this. # be_to_cpu produces asm()s which are ~4 times shorter. # # Compile-tested only. # # I am not sure whether input can be 64bit-unaligned. # If it indeed can be, replace: # # ((u64*)(input))[I] -> get_unaligned( ((u64*)(input))+I ) # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:45:35-07:00 akpm@osdl.org # [CRYPTO]: small sha256 cleanup # # Looks like open-coded be_to_cpu. GCC produces rather poor code for this. # be_to_cpu produces asm()s which are ~4 times shorter. # # Compile-tested only. # # I am not sure whether input can be 32bit-unaligned. # If it indeed can be, replace: # # ((u32*)(input))[I] -> get_unaligned( ((u32*)(input))+I ) # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # crypto/sha256.c # 2004/10/25 20:45:16-07:00 akpm@osdl.org +1 -9 # [CRYPTO]: small sha256 cleanup # # Looks like open-coded be_to_cpu. GCC produces rather poor code for this. # be_to_cpu produces asm()s which are ~4 times shorter. # # Compile-tested only. # # I am not sure whether input can be 32bit-unaligned. # If it indeed can be, replace: # # ((u32*)(input))[I] -> get_unaligned( ((u32*)(input))+I ) # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 23:42:58-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/janitor # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/tulip/tulip_core.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/slip.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/sis900.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/ns83820.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/3c59x.c # 2004/10/25 23:42:55-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 23:41:18-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/misc # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/e1000/e1000_main.c # 2004/10/25 23:41:15-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 20:31:50-07:00 davem@nuts.davemloft.net # Merge bk://212.42.230.204/nf-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # net/ipv6/netfilter/ip6_tables.c # 2004/10/25 20:31:40-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/10/25 20:29:14-07:00 hch@lst.de # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # net/socket.c # 2004/10/25 20:28:54-07:00 hch@lst.de +1 -3 # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # net/core/sock.c # 2004/10/25 20:28:54-07:00 hch@lst.de +9 -17 # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # include/net/sock.h # 2004/10/25 20:28:54-07:00 hch@lst.de +0 -2 # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # include/linux/net.h # 2004/10/25 20:28:54-07:00 hch@lst.de +0 -1 # [NET]: Remove dead socket layer exports. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:26:28-07:00 hch@lst.de # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -5 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_ipv4.c # 2004/10/25 20:26:08-07:00 hch@lst.de +2 -3 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -1 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/tcp.c # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -1 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv4/af_inet.c # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -2 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # include/net/tcp.h # 2004/10/25 20:26:08-07:00 hch@lst.de +0 -1 # [TCP]: Remove dead exports. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:25:51-07:00 hch@lst.de # [IPV6]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/ipv6/ipv6_syms.c # 2004/10/25 20:25:32-07:00 hch@lst.de +0 -4 # [IPV6]: Remove dead exports. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:24:58-07:00 torvalds@ppc970.osdl.org # Fix UP non-preempt build for kernel lock changes. # # Duh. I had tested every "interesting" combination of SMP and PREEMPT, # but the _trivial_ one was broken ;) # # include/linux/smp_lock.h # 2004/10/25 20:24:52-07:00 torvalds@ppc970.osdl.org +1 -1 # Fix UP non-preempt build for kernel lock changes. # # Duh. I had tested every "interesting" combination of SMP and PREEMPT, # but the _trivial_ one was broken ;) # # ChangeSet # 2004/10/25 20:24:06-07:00 hch@lst.de # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/xfrm/xfrm_state.c # 2004/10/25 20:23:46-07:00 hch@lst.de +6 -16 # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2004/10/25 20:23:46-07:00 hch@lst.de +6 -3 # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # net/xfrm/xfrm_export.c # 2004/10/25 20:23:46-07:00 hch@lst.de +0 -8 # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2004/10/25 20:23:46-07:00 hch@lst.de +0 -7 # [XFRM]: Remove dead exports. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:22:11-07:00 hch@lst.de # [ATM]: Mark vcc_remove_socket static # # Signed-off-by: David S. Miller # # net/atm/common.c # 2004/10/25 20:21:51-07:00 hch@lst.de +1 -2 # [ATM]: Mark vcc_remove_socket static # # Signed-off-by: David S. Miller # # include/linux/atmdev.h # 2004/10/25 20:21:51-07:00 hch@lst.de +0 -1 # [ATM]: Mark vcc_remove_socket static # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:20:56-07:00 pcaulfie@redhat.com # [DECNET]: Connect hang bugfix # # This patch fixes a bug in the DECnet connect that seems to have been in 2.6 for # a while now. # # If a connection is rejected by a remote host (eg invalid access control, no # such object etc) the Linux end hangs in connect() because it is only waiting for # the socket to go into RUN state. # # This patch sets the ECONNREFUSED error state on the socket when the connection # is rejected to that the connect() exits it's wait loop and returns the error to # the user. # # Signed-off-by: David S. Miller # # net/decnet/dn_nsp_in.c # 2004/10/25 20:20:37-07:00 pcaulfie@redhat.com +1 -0 # [DECNET]: Connect hang bugfix # # This patch fixes a bug in the DECnet connect that seems to have been in 2.6 for # a while now. # # If a connection is rejected by a remote host (eg invalid access control, no # such object etc) the Linux end hangs in connect() because it is only waiting for # the socket to go into RUN state. # # This patch sets the ECONNREFUSED error state on the socket when the connection # is rejected to that the connect() exits it's wait loop and returns the error to # the user. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:10:46-07:00 tgraf@suug.ch # [PKT_SCHED]: Rename TCQ_F_INGRES to TCQ_F_INGRESS. # # This typo annoyned me several times by not showing up in greps. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/sch_api.c # 2004/10/25 20:10:27-07:00 tgraf@suug.ch +3 -3 # [PKT_SCHED]: Rename TCQ_F_INGRES to TCQ_F_INGRESS. # # This typo annoyned me several times by not showing up in greps. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # include/net/pkt_sched.h # 2004/10/25 20:10:27-07:00 tgraf@suug.ch +1 -1 # [PKT_SCHED]: Rename TCQ_F_INGRES to TCQ_F_INGRESS. # # This typo annoyned me several times by not showing up in greps. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:09:20-07:00 ehrhardt@mathematik.uni-ulm.de # [IPV4]: Do not try to unhash null-netdev nexthops. # # Signed-off-by: Christian Ehrhardt # Signed-off-by: David S. Miller # # net/ipv4/fib_semantics.c # 2004/10/25 20:09:01-07:00 ehrhardt@mathematik.uni-ulm.de +2 -0 # [IPV4]: Do not try to unhash null-netdev nexthops. # # Signed-off-by: Christian Ehrhardt # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:07:30-07:00 chas@cmf.nrl.navy.mil # [ATM]: [horizon] eliminate pci_find_device() # # Signed-off-by: David S. Miller # # drivers/atm/horizon.h # 2004/10/25 20:07:11-07:00 chas@cmf.nrl.navy.mil +1 -1 # [ATM]: [horizon] eliminate pci_find_device() # # Signed-off-by: David S. Miller # # drivers/atm/horizon.c # 2004/10/25 20:07:11-07:00 chas@cmf.nrl.navy.mil +156 -176 # [ATM]: [horizon] eliminate pci_find_device() # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:06:33-07:00 linville@tuxdriver.com # [VLAN]: Add MODULE_VERSION # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # net/8021q/vlan.c # 2004/10/25 20:06:13-07:00 linville@tuxdriver.com +6 -4 # [VLAN]: Add MODULE_VERSION # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:05:55-07:00 linville@tuxdriver.com # [BONDING]: Add MODULE_VERSION # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # drivers/net/bonding/bond_main.c # 2004/10/25 20:05:36-07:00 linville@tuxdriver.com +1 -0 # [BONDING]: Add MODULE_VERSION # # Signed-off-by: John W. Linville # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 20:04:33-07:00 arnouten@bzzt.net # [TCP]: Add /proc/net/tcp{,6} layout documentation. # # Signed-off-by: David S. Miller # # Documentation/networking/proc_net_tcp.txt # 2004/10/25 20:04:00-07:00 arnouten@bzzt.net +47 -0 # [TCP]: Add /proc/net/tcp{,6} layout documentation. # # Documentation/networking/proc_net_tcp.txt # 2004/10/25 20:04:00-07:00 arnouten@bzzt.net +0 -0 # BitKeeper file /disk1/BK/net-2.6/Documentation/networking/proc_net_tcp.txt # # ChangeSet # 2004/10/25 19:47:47-07:00 suresh.krishnan@ericsson.ca # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # net/ipv6/udp.c # 2004/10/25 19:47:26-07:00 suresh.krishnan@ericsson.ca +1 -1 # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # net/ipv6/raw.c # 2004/10/25 19:47:26-07:00 suresh.krishnan@ericsson.ca +1 -1 # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # net/ipv4/udp.c # 2004/10/25 19:47:26-07:00 suresh.krishnan@ericsson.ca +1 -1 # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # net/ipv4/raw.c # 2004/10/25 19:47:26-07:00 suresh.krishnan@ericsson.ca +1 -1 # [NET]: Address family not supported for sendmsg() # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 18:42:30-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Cleanup console detection # # This removes some leftover code that was in #if 0 in the console # autodetect code. # # It also adds passing of the default serial speed as console options when # it is available from Open Firmware. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/setup.c # 2004/10/25 18:18:06-07:00 benh@kernel.crashing.org +17 -20 # ppc64: Cleanup console detection # # ChangeSet # 2004/10/25 18:42:17-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Improve PCI config accessors # # This improves the config space access routines on G5, by adding a # generic helper function to locate the pci_controller structure (to be # used by an upcoming new platform too) and cleaning up the pmac routines. # # It includes the fix to skip devices that aren't present in the OF tree # that is necessary for newer G5 desktop models. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pci-bridge.h # 2004/10/25 17:38:39-07:00 benh@kernel.crashing.org +17 -0 # ppc64: Improve PCI config accessors # # arch/ppc64/kernel/pmac_pci.c # 2004/10/25 17:38:39-07:00 benh@kernel.crashing.org +53 -65 # ppc64: Improve PCI config accessors # # arch/ppc64/kernel/pmac.h # 2004/10/25 17:38:39-07:00 benh@kernel.crashing.org +0 -1 # ppc64: Improve PCI config accessors # # ChangeSet # 2004/10/25 18:40:55-07:00 benh@kernel.crashing.org # [PATCH] ppc64: annotate remaining IO accessors # # This patch adds proper __iomem annotations to the remaning IO macros on # ppc64, and removes now useless casts from eeh.h. This fixes the sparse # warnings in mpic.c among others. # # I need to do an equivalent things for ppc32 (though I think viro did # some of it already) and fix users. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pci-bridge.h # 2004/10/25 16:04:25-07:00 benh@kernel.crashing.org +3 -3 # ppc64: annotate remaining IO accessors # # include/asm-ppc64/io.h # 2004/10/25 16:12:57-07:00 benh@kernel.crashing.org +14 -14 # ppc64: annotate remaining IO accessors # # include/asm-ppc64/eeh.h # 2004/10/25 16:17:38-07:00 benh@kernel.crashing.org +85 -72 # ppc64: annotate remaining IO accessors # # ChangeSet # 2004/10/25 18:28:03-07:00 akpm@osdl.org # [PATCH] ide_pio_sector() kmap fix # # kunmap_atomic() takes a kernel-virtual address, not a pageframe address. # For the hundredth time. # # We really should get typechecking happening there.. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/ide/ide-taskfile.c # 2004/10/25 08:54:48-07:00 akpm@osdl.org +1 -1 # ide_pio_sector() kmap fix # # ChangeSet # 2004/10/25 18:25:55-07:00 bfg-kernel@blenning.no # [PATCH] firmware spelling errors # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/scsi/megaraid.c # 2004/10/25 13:06:50-07:00 bfg-kernel@blenning.no +1 -1 # firmware spelling errors # # drivers/net/wan/cosa.c # 2004/10/25 13:06:50-07:00 bfg-kernel@blenning.no +1 -1 # firmware spelling errors # # drivers/base/Kconfig # 2004/10/25 13:06:50-07:00 bfg-kernel@blenning.no +1 -1 # firmware spelling errors # # drivers/atm/fore200e.h # 2004/10/25 13:06:50-07:00 bfg-kernel@blenning.no +1 -1 # firmware spelling errors # # ChangeSet # 2004/10/25 18:25:43-07:00 petero2@telia.com # [PATCH] Fix incorrect kunmap_atomic in pktcdvd # # The pktcdvd driver uses kunmap_atomic() incorrectly. The function is # supposed to take an address as the first parameter, but the pktcdvd driver # passed a page pointer. Thanks to Douglas Gilbert and Jens Axboe for # discovering this. # # Signed-off-by: Peter Osterlund # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/pktcdvd.c # 2004/10/25 13:06:50-07:00 petero2@telia.com +2 -2 # Fix incorrect kunmap_atomic in pktcdvd # # ChangeSet # 2004/10/25 18:25:31-07:00 jack@suse.cz # [PATCH] Quota warnings somewhat broken # # Fix end of lines in quota messages. # # Signed-off-by: Jan Kara # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/dquot.c # 2004/10/25 13:06:50-07:00 jack@suse.cz +6 -6 # Quota warnings somewhat broken # # ChangeSet # 2004/10/25 18:25:18-07:00 edwardsg@sgi.com # [PATCH] increase max LOG_BUF_SHIFT value # # We've run into problems at 512p with the kernel log buffer wrapping and # overwriting some of the early boot output. This is with a # CONFIG_LOG_BUF_SHIFT value of 20 (1MB). The patch below just bumps the max # possible setting to 21 (2MB). # # Signed-off-by: Greg Edwards # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/Kconfig # 2004/10/25 13:06:50-07:00 edwardsg@sgi.com +1 -1 # increase max LOG_BUF_SHIFT value # # ChangeSet # 2004/10/25 18:25:06-07:00 colin@colino.net # [PATCH] clean up therm_adt746x # # This patch cleans therm_adt746x a bit: lines at maximum 80 chars width, # dispatches the big function in three little ones. # # Functionality not changed. # # Signed-off-by: Colin Leroy # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/therm_adt746x.c # 2004/10/25 13:06:50-07:00 colin@colino.net +143 -103 # clean up therm_adt746x # # ChangeSet # 2004/10/25 18:24:54-07:00 bjorn.helgaas@hp.com # [PATCH] PCDP: call acpi_register_gsi() with arguments in correct order # # PCDP: call acpi_register_gsi() with arguments in correct order # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/firmware/pcdp.c # 2004/10/25 13:06:50-07:00 bjorn.helgaas@hp.com +2 -2 # PCDP: call acpi_register_gsi() with arguments in correct order # # ChangeSet # 2004/10/25 18:24:41-07:00 bunk@stusta.de # [PATCH] ISDN hisax_fcpcipnp.c: kill unused variable # # drivers/isdn/hisax/hisax_fcpcipnp.c: In function `hisax_fcpcipnp_init': # drivers/isdn/hisax/hisax_fcpcipnp.c:999: warning: unused variable `pci_nr_found' # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hisax/hisax_fcpcipnp.c # 2004/10/25 13:06:49-07:00 bunk@stusta.de +1 -1 # ISDN hisax_fcpcipnp.c: kill unused variable # # ChangeSet # 2004/10/25 18:24:29-07:00 bunk@stusta.de # [PATCH] CREDITS update # # Adrian sent me a check for $100. # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # CREDITS # 2004/10/25 13:06:49-07:00 bunk@stusta.de +8 -0 # CREDITS update # # ChangeSet # 2004/10/25 18:24:17-07:00 margitsw@t-online.de # [PATCH] Add prism54 to MAINTAINERS # # Add prism54 to MAINTAINERS # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/10/25 13:06:49-07:00 margitsw@t-online.de +7 -0 # Add prism54 to MAINTAINERS # # ChangeSet # 2004/10/25 18:24:02-07:00 yanmin.zhang@intel.com # [PATCH] hugetlb_get_unmapped_area fix # # hugetlb_get_unmapped_area() fails to find an unmapped area while unmapped # area is huge. That's because hugetlb_get_unmapped_area just searches # forward from mm->free_area_cache. If reaching TASK_SIZE, it does not go # back to TASK_UNMAPPED_BASE, just returns -ENOMEM. # # 1) Add a specific hugetlb_get_unmapped_area on i386. # 2) Generic hugetlb_get_unmapped_area is also fixed. # # Signed-off-by: Zhang Yanmin # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/page.h # 2004/10/25 13:06:49-07:00 yanmin.zhang@intel.com +1 -0 # hugetlb_get_unmapped_area fix # # fs/hugetlbfs/inode.c # 2004/10/25 13:06:49-07:00 yanmin.zhang@intel.com +16 -2 # hugetlb_get_unmapped_area fix # # arch/i386/mm/hugetlbpage.c # 2004/10/25 13:06:49-07:00 yanmin.zhang@intel.com +140 -0 # hugetlb_get_unmapped_area fix # # ChangeSet # 2004/10/25 18:23:50-07:00 jbarnes@engr.sgi.com # [PATCH] I/O space write barrier # # On some platforms (e.g. SGI Challenge, Origin, and Altix machines), writes # to I/O space aren't ordered coming from different CPUs. For the most part, # this isn't a problem since drivers generally spinlock around code that does # writeX calls, but if the last operation a driver does before it releases a # lock is a write and some other CPU takes the lock and immediately does a # write, it's possible the second CPU's write could arrive before the # first's. # # This patch adds a mmiowb() call to deal with this sort of situation, and # adds some documentation describing I/O ordering issues to # deviceiobook.tmpl. The idea is to mirror the regular, cacheable memory # barrier operation, wmb. Example of the problem this new macro solves: # # CPU A: spin_lock_irqsave(&dev_lock, flags) # CPU A: ... # CPU A: writel(newval, ring_ptr); # CPU A: spin_unlock_irqrestore(&dev_lock, flags) # ... # CPU B: spin_lock_irqsave(&dev_lock, flags) # CPU B: writel(newval2, ring_ptr); # CPU B: ... # CPU B: spin_unlock_irqrestore(&dev_lock, flags) # # In this case, newval2 could be written to ring_ptr before newval. Fixing # it is easy though: # # CPU A: spin_lock_irqsave(&dev_lock, flags) # CPU A: ... # CPU A: writel(newval, ring_ptr); # CPU A: mmiowb(); /* ensure no other writes beat us to the device */ # CPU A: spin_unlock_irqrestore(&dev_lock, flags) # ... # CPU B: spin_lock_irqsave(&dev_lock, flags) # CPU B: writel(newval2, ring_ptr); # CPU B: ... # CPU B: mmiowb(); # CPU B: spin_unlock_irqrestore(&dev_lock, flags) # # Note that this doesn't address a related case where the driver may want to # actually make a given write get to the device before proceeding. This # should be dealt with by immediately reading a register from the card that # has no side effects. According to the PCI spec, that will guarantee that # all writes have arrived before being sent to the target bus. If no such # register is available (in the case of card resets perhaps), reading from # config space is sufficient (though it may return all ones if the card isn't # responding to read cycles). I've tried to describe how mmiowb() differs # from PCI posted write flushing in the patch to deviceiobook.tmpl. # # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-v850/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-sparc64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-sparc/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-sh64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +5 -0 # I/O space write barrier # # include/asm-sh/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-s390/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-ppc64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-ppc/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-parisc/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-mips/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +4 -0 # I/O space write barrier # # include/asm-m68knommu/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-m68k/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +1 -0 # I/O space write barrier # # include/asm-m32r/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +5 -0 # I/O space write barrier # # include/asm-ia64/sn/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +4 -4 # I/O space write barrier # # include/asm-ia64/machvec_sn2.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-ia64/machvec_init.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +1 -0 # I/O space write barrier # # include/asm-ia64/machvec.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +7 -0 # I/O space write barrier # # include/asm-ia64/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +16 -0 # I/O space write barrier # # include/asm-i386/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-h8300/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-cris/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-arm26/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-arm/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # include/asm-alpha/io.h # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +2 -0 # I/O space write barrier # # arch/ia64/sn/kernel/iomv.c # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +5 -8 # I/O space write barrier # # Documentation/DocBook/deviceiobook.tmpl # 2004/10/25 13:06:49-07:00 jbarnes@engr.sgi.com +67 -4 # I/O space write barrier # # ChangeSet # 2004/10/25 18:23:36-07:00 paulkf@microgate.com # [PATCH] serial send_break duration fix # # Fix tty_io.c send_break() to assert break for proper duration. If driver # break_ctl() changes task state, then break may end prematurely. USB serial # driver break_ctl() sends a URB, changing task state to TASK_RUNNING. # # Signed-off-by: Paul Fulghum # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/tty_io.c # 2004/10/25 13:06:49-07:00 paulkf@microgate.com +3 -3 # serial send_break duration fix # # ChangeSet # 2004/10/25 18:23:23-07:00 jim.houston@ccur.com # [PATCH] idr_remove safety checking # # idr_remove() should fail gracefully and warn if the id being removed is not # valid. # # The attached patch should do the job without additional overhead. # # With the existing code, removing an id which was not allocated could remove # a valid id which shares the same lowest layer of the radix tree. # # I ran a kernel with this patch but have not done any tests to force # a failure. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # lib/idr.c # 2004/10/25 13:06:49-07:00 jim.houston@ccur.com +12 -3 # idr_remove safety checking # # ChangeSet # 2004/10/25 18:23:11-07:00 hch@lst.de # [PATCH] use generic_file_open in udf # # Let's try to reduce the number of hand-crafted LFS checks # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/udf/file.c # 2004/10/25 13:06:49-07:00 hch@lst.de +1 -21 # use generic_file_open in udf # # ChangeSet # 2004/10/25 18:22:59-07:00 nickpiggin@yahoo.com.au # [PATCH] vm: unreclaimable pages debugginf # # Add zone->all_unreclaiable to the sysrq-M and omm-killing diagnostic output. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/10/25 13:06:48-07:00 nickpiggin@yahoo.com.au +5 -1 # vm: unreclaimable pages debugginf # # ChangeSet # 2004/10/25 18:22:46-07:00 clameter@sgi.com # [PATCH] Posix layer <-> clock driver API fix # # This is needed for an mmtimer driver update that we are currently working # on. The mmtimer driver provides CLOCK_SGI_CYCLE via clock_gettime and # clock_settime. # # With this api fix one will be able to use timer_create, timer_settime and # friends from userspace to schedule and receive signals via timer interrupts # of mmtimer. # # Changelog # * Clean up timer api for drivers that use register_posix_clock. Drivers # will then be able to use posix timers to schedule interrupts. # * Change API for posix_clocks[].timer_create to only pass one pointer # to a k_itimer structure that is now allocated and managed by the # posix layer in the same way as for the other posix timer # functions. # * Isolate a posix_timer_event(timr) function in posix-timers.c that may # be called by the interrupt routine of a timer to signal that the # scheduled event has taken place. # # Signed-off-by: Christoph Lameter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/posix-timers.c # 2004/10/25 13:06:48-07:00 clameter@sgi.com +34 -55 # Posix layer <-> clock driver API fix # # include/linux/posix-timers.h # 2004/10/25 13:06:48-07:00 clameter@sgi.com +5 -6 # Posix layer <-> clock driver API fix # # ChangeSet # 2004/10/25 18:22:34-07:00 zippel@linux-m68k.org # [PATCH] hfs: export type/creator via xattr # # This exports the hfs type/creator info via xattr. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfs/attr.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +121 -0 # hfs: export type/creator via xattr # # fs/hfsplus/ioctl.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +106 -0 # hfs: export type/creator via xattr # # fs/hfsplus/inode.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +3 -0 # hfs: export type/creator via xattr # # fs/hfsplus/hfsplus_fs.h # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +5 -0 # hfs: export type/creator via xattr # # fs/hfs/inode.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +3 -0 # hfs: export type/creator via xattr # # fs/hfs/hfs_fs.h # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +7 -0 # hfs: export type/creator via xattr # # fs/hfs/attr.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/fs/hfs/attr.c # # fs/hfs/Makefile # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +1 -1 # hfs: export type/creator via xattr # # ChangeSet # 2004/10/25 18:22:21-07:00 zippel@linux-m68k.org # [PATCH] hfs: write back resource info directly # # Write back the information for a dirty resource inode directly and not via the # main inode, as at the time the latter is written the former might already be # gone. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +14 -10 # hfs: write back resource info directly # # fs/hfs/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +14 -11 # hfs: write back resource info directly # # ChangeSet # 2004/10/25 18:22:09-07:00 zippel@linux-m68k.org # [PATCH] hfs: read correct dir time # # Fix a small typo and read the correct time for a dir. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfs/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +1 -1 # hfs: read correct dir time # # ChangeSet # 2004/10/25 18:21:55-07:00 zippel@linux-m68k.org # [PATCH] hfs: manage correct block count # # Manage the fs block count with a separate variable and keep a correct i_blocks # for e.g. correct du output. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +6 -3 # hfs: manage correct block count # # fs/hfsplus/hfsplus_fs.h # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +1 -0 # hfs: manage correct block count # # fs/hfsplus/extents.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +6 -4 # hfs: manage correct block count # # fs/hfsplus/btree.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +5 -3 # hfs: manage correct block count # # fs/hfs/inode.c # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +6 -3 # hfs: manage correct block count # # fs/hfs/hfs_fs.h # 2004/10/25 13:18:30-07:00 zippel@linux-m68k.org +1 -0 # hfs: manage correct block count # # fs/hfs/extent.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +6 -4 # hfs: manage correct block count # # fs/hfs/btree.c # 2004/10/25 13:06:48-07:00 zippel@linux-m68k.org +5 -3 # hfs: manage correct block count # # ChangeSet # 2004/10/25 18:21:43-07:00 zippel@linux-m68k.org # [PATCH] hfs: relax dirty check # # hfs has two dirty bits, but currently OS X uses only one of them, so match its # behaviour, so that a uncleanly unmounted disk can be mounted r/w again, after # it has been checked. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/super.c # 2004/10/25 13:06:47-07:00 zippel@linux-m68k.org +2 -4 # hfs: relax dirty check # # fs/hfs/super.c # 2004/10/25 13:06:47-07:00 zippel@linux-m68k.org +1 -2 # hfs: relax dirty check # # fs/hfs/mdb.c # 2004/10/25 13:06:47-07:00 zippel@linux-m68k.org +4 -4 # hfs: relax dirty check # # ChangeSet # 2004/10/25 18:21:31-07:00 zippel@linux-m68k.org # [PATCH] hfs: update key after rename # # After a file has been renamed, the cached search key must be updated. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfs/dir.c # 2004/10/25 13:06:47-07:00 zippel@linux-m68k.org +3 -0 # hfs: update key after rename # # ChangeSet # 2004/10/25 18:21:18-07:00 jbarnes@engr.sgi.com # [PATCH] mmtimer sparse fixes # # Small patch to add __iomem annotations to mmtimer.c. # # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/mmtimer.c # 2004/10/25 13:06:47-07:00 jbarnes@engr.sgi.com +5 -5 # mmtimer sparse fixes # # ChangeSet # 2004/10/25 18:21:06-07:00 suresh.b.siddha@intel.com # [PATCH] intel irqbalance quirk cleanup # # - Remove the call to quirk_intel_irqbalance() from quirk_pciehp_msi(). # # - Move the x86(/x86_64)-specific quirk_intel_irqbalance() into x86 quirks.c # due to its dependency on # # - Mark it __init rather than __devinit, since it calls __init functions. # # Signed-off-by: Suresh Siddha # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/quirks.c # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +49 -0 # intel irqbalance quirk cleanup # # drivers/pci/quirks.c # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +0 -47 # intel irqbalance quirk cleanup # # arch/x86_64/kernel/Makefile # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +2 -1 # intel irqbalance quirk cleanup # # arch/i386/kernel/quirks.c # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/i386/kernel/quirks.c # # arch/i386/kernel/Makefile # 2004/10/25 13:06:47-07:00 suresh.b.siddha@intel.com +1 -1 # intel irqbalance quirk cleanup # # ChangeSet # 2004/10/25 18:20:53-07:00 sds@epoch.ncsc.mil # [PATCH] Add DAC check for setxattr(security.selinux) # # This patch against 2.6.9 adds a DAC ownership check to the existing MAC # permission checks when setting the security.selinux attribute via setxattr. # In the past, the MAC permission checks were viewed as sufficient for # controlling relabeling operations, but experience in the Fedora SELinux # integration has shown that a DAC check is also appropriate here, # particularly under targeted policy. # # Signed-off-by: Stephen Smalley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/hooks.c # 2004/10/25 13:06:47-07:00 sds@epoch.ncsc.mil +3 -0 # Add DAC check for setxattr(security.selinux) # # ChangeSet # 2004/10/25 21:20:44-04:00 akpm@osdl.org # [PATCH] e1000 module_param build fix # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # ChangeSet # 2004/10/25 18:20:41-07:00 rddunlap@osdl.org # [PATCH] __init dependencies: ignore __param # # Ignore __param section references; they aren't discarded. # # Error: ./drivers/mtd/devices/phram.o __param refers to 0000000000000010 R_X86_64_64 .init.text+0x0000000000000013 # Error: ./drivers/scsi/dc395x.o __param refers to 0000000000000020 R_X86_64_64 .init.data+0x0000000000000064 # Error: ./drivers/usb/gadget/ether.o __param refers to 0000000000000048 R_X86_64_64 .init.data+0x0000000000000020 # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/e1000/e1000_param.c # 2004/10/24 05:47:51-04:00 akpm@osdl.org +1 -1 # e1000-module_param-fix # # scripts/reference_init.pl # 2004/10/25 13:06:47-07:00 rddunlap@osdl.org +1 -0 # __init dependencies: ignore __param # # ChangeSet # 2004/10/25 18:20:28-07:00 axboe@suse.de # [PATCH] fix bad segment coalescing in blk_recalc_rq_segments() # # blk_recalc_rq_segments forgots to take ->max_segment_size into account and # gladly merges segments bigger than we can support, thus underestimating the # number of segments needed to fill it. # # Signed-off-by: Jens Axboe # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/ll_rw_blk.c # 2004/10/25 13:06:47-07:00 axboe@suse.de +19 -5 # fix bad segment coalescing in blk_recalc_rq_segments() # # ChangeSet # 2004/10/25 18:20:16-07:00 rusty@rustcorp.com.au # [PATCH] Eliminate init_module and cleanup_module from Documentation # # In 2.2, you used to just be able to call functions "init_module" and # "cleanup_module" and they'd be magically called. # # These days you should use module_init(myinit)/module_exit(myexit) and avoid # #ifdef MODULE. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/sound/oss/README.modules # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +3 -2 # Eliminate init_module and cleanup_module from Documentation # # Documentation/s390/s390dbf.txt # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +12 -6 # Eliminate init_module and cleanup_module from Documentation # # Documentation/i2c/writing-clients # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +7 -21 # Eliminate init_module and cleanup_module from Documentation # # Documentation/DocBook/videobook.tmpl # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +8 -6 # Eliminate init_module and cleanup_module from Documentation # # Documentation/DocBook/mousedrivers.tmpl # 2004/10/25 13:06:47-07:00 rusty@rustcorp.com.au +8 -13 # Eliminate init_module and cleanup_module from Documentation # # ChangeSet # 2004/10/25 18:20:03-07:00 rusty@rustcorp.com.au # [PATCH] boot parameters: quoting of environment variables revisited # # As noticed by Joey Hess (and thanks for Christoph for forwarding it). Also # requirements from Werner Almesberger. # # If someone passes 'foo="some value"' the param engine removes the quotes # and hands 'foo' and 'some value'. The __setup() parameters expect a single # string, and so we try to regenerate it from the two parts. Finally, we try # to place it as an environment variable. # # Werner wants quotes stripped out of the environment variable. It makes # sense to do that for __setup, too (so it sees 'foo=some value'), since # __setup functions don't usually handle quotes. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/main.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +9 -2 # boot parameters: quoting of environment variables revisited # # ChangeSet # 2004/10/25 18:19:51-07:00 rusty@rustcorp.com.au # [PATCH] Builtin Module Parameters in sysfs too # # Currently, only module parameters in loaded modules are exported in # /sys/modules/, while those of "modules" built into the kernel can be set by # the kernel command line, but not read or set via sysfs. # # - move module parameters from /sys/modules/$(module_name)/$(parameter_name) to # /sys/modules/$(module_name)/parameters/$(parameter_name) # # - remove dummy kernel_param for exporting refcnt, add "struct module *"-based # attribute instead # # - also export module paramters for "modules" which are built into the kernel, # so parameters are always accessible at # /sys/modules/$(KBUILD_MODNAME)/$(parameter_name) # # Signed-off-by: Rusty Russell (modified) # Signed-off-by: Dominik Brodowski # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/params.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +391 -0 # Builtin Module Parameters in sysfs too # # kernel/module.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +29 -105 # Builtin Module Parameters in sysfs too # # include/linux/moduleparam.h # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +11 -0 # Builtin Module Parameters in sysfs too # # include/linux/module.h # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +18 -20 # Builtin Module Parameters in sysfs too # # ChangeSet # 2004/10/25 18:19:39-07:00 rusty@rustcorp.com.au # [PATCH] Fix for MODULE_PARM obsolete # # There is no __attribute_unused__: use __attribute__((__unused__)). # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/module.h # 2004/10/25 13:18:33-07:00 rusty@rustcorp.com.au +2 -2 # Fix for MODULE_PARM obsolete # # ChangeSet # 2004/10/25 18:19:27-07:00 rusty@rustcorp.com.au # [PATCH] Remove MODULE_PARM from arch/i386 # # This patch removes MODULE_PARM for everything under arch/i386. Currently # only APM. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/apm.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +9 -9 # Remove MODULE_PARM from arch/i386 # # ChangeSet # 2004/10/25 18:19:14-07:00 rusty@rustcorp.com.au # [PATCH] Remove MODULE_PARM from i386 defconfig. # # This cleans up defconfig for i386. Not much work. This patch removes # MODULE_PARM for everything made by "defconfig" on x86. There are only a # few left. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/s2io.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +8 -8 # Remove MODULE_PARM from i386 defconfig. # # drivers/net/8139too.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +4 -4 # Remove MODULE_PARM from i386 defconfig. # # drivers/ide/ide-cd.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +1 -1 # Remove MODULE_PARM from i386 defconfig. # # drivers/char/lp.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +2 -2 # Remove MODULE_PARM from i386 defconfig. # # drivers/cdrom/cdrom.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +6 -6 # Remove MODULE_PARM from i386 defconfig. # # drivers/acpi/thermal.c # 2004/10/25 13:06:46-07:00 rusty@rustcorp.com.au +1 -1 # Remove MODULE_PARM from i386 defconfig. # # ChangeSet # 2004/10/25 18:19:02-07:00 rusty@rustcorp.com.au # [PATCH] MODULE_PARM must die: make it warn first. # # This patch adds a warning whenever MODULE_PARM is used. Successive # patches change them over to module_param. Help appreciated! # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/module.h # 2004/10/25 13:18:33-07:00 rusty@rustcorp.com.au +4 -2 # MODULE_PARM must die: make it warn first. # # ChangeSet # 2004/10/25 18:18:49-07:00 roland@redhat.com # [PATCH] session leader tty disassociation fix # # The session leader should disassociate from its controlling terminal and # send SIGHUP signals only when the whole session leader process dies. # Currently, this gets done when any thread in that process dies, which is # wrong. This patch fixes it. # # Signed-off-by: Roland McGrath # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/exit.c # 2004/10/25 13:06:46-07:00 roland@redhat.com +4 -2 # session leader tty disassociation fix # # ChangeSet # 2004/10/25 18:18:37-07:00 roland@redhat.com # [PATCH] acct: report single record for multithreaded process # # This patch changes process accounting to write just one record for a # process with many NPTL threads, rather than one record for each thread. No # record is written until the last thread exits. The process's record shows # the cumulative time of all the threads that ever lived in that process # (thread group). This seems like the clearly right thing and I assume it is # what anyone using process accounting really would like to see. # # There is a race condition between multiple threads exiting at the same time # to decide which one should write the accounting record. I couldn't think # of anything clever using existing bookkeeping that would get this right, so # I added another counter for this. (There may be some potential to clean up # existing places that figure out how many non-zombie threads are in the # group, now that this count is available.) # # Signed-off-by: Roland McGrath # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/10/25 13:06:45-07:00 roland@redhat.com +2 -0 # acct: report single record for multithreaded process # # kernel/exit.c # 2004/10/25 13:18:33-07:00 roland@redhat.com +2 -1 # acct: report single record for multithreaded process # # kernel/acct.c # 2004/10/25 13:06:45-07:00 roland@redhat.com +12 -6 # acct: report single record for multithreaded process # # include/linux/sched.h # 2004/10/25 13:06:45-07:00 roland@redhat.com +1 -0 # acct: report single record for multithreaded process # # ChangeSet # 2004/10/25 18:18:25-07:00 jim.hague@acm.org # [PATCH] pm2fb: Colour palette fixes # # - Hardware CLUT only needs setting on pseudocolor. # - Pseudo palette values need to be 32bit wide for cfb_*(). # # Signed-off-by: Jim Hague # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/pm2fb.c # 2004/10/25 13:06:45-07:00 jim.hague@acm.org +3 -6 # pm2fb: Colour palette fixes # # ChangeSet # 2004/10/25 18:18:13-07:00 jim.hague@acm.org # [PATCH] pm2fb: Blanking fixes # # - Current blanking code forces +ve (h|v)sync. Correct, match 2.4 # behaviour, and introduce VESA constants for clarity. # # Signed-off-by: Jim Hague # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/pm2fb.c # 2004/10/25 13:18:34-07:00 jim.hague@acm.org +14 -12 # pm2fb: Blanking fixes # # ChangeSet # 2004/10/25 18:18:00-07:00 adaplas@hotpop.com # [PATCH] fbdev: S3 Savage Framebuffer Driver # # S3 Savage Frambuffer Driver for the following chipsets: # # Savage 3D # Savage MX # Savage 4 # Savage 2000 # ProSavage # SuperSavage # # This is based from the driver written by: # Denis Oliver Kropp # Sven Neumann # # Initial Porting to 2.6 done by: # Mika Pruikkonen # # Added the following: # - Console acceleration support (imageblit, fillrect, copyarea) - # Configurable # - DDC2/I2C support for (ProSavage DDR-K, Savage 4 and Prosavage PM only - # Configurable # - 8, 16, 32 bits per pixel # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/savage/savagefb_accel.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +135 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/savagefb.h # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +354 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/savagefb.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +2281 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/savagefb-i2c.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +257 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/Makefile # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +8 -0 # fbdev: S3 Savage Framebuffer Driver # # include/linux/fb.h # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +15 -0 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/savage/savagefb_accel.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/savagefb_accel.c # # drivers/video/savage/savagefb.h # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/savagefb.h # # drivers/video/savage/savagefb.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/savagefb.c # # drivers/video/savage/savagefb-i2c.c # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/savagefb-i2c.c # # drivers/video/savage/Makefile # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/savage/Makefile # # drivers/video/Makefile # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +2 -1 # fbdev: S3 Savage Framebuffer Driver # # drivers/video/Kconfig # 2004/10/25 13:06:41-07:00 adaplas@hotpop.com +36 -0 # fbdev: S3 Savage Framebuffer Driver # # ChangeSet # 2004/10/25 18:17:47-07:00 adaplas@hotpop.com # [PATCH] fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G integrated # graphics chips. # Port from kernel 2.4 + some modifications and cleanup : # - Fix HW accel on 845G # - Use of agpgart for fb memory reservation # - Add mtrr support # # Signed-off-by: Sylvain Meyer # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/intelfb/intelfbhw.h # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +565 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfbhw.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +1749 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfbdrv.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +77 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfbdrv.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +1625 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfb.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +294 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/builtinmodes.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +222 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/Makefile # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +8 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # include/linux/fb.h # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +1 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/intelfb/intelfbhw.h # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfbhw.h # # drivers/video/intelfb/intelfbhw.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfbhw.c # # drivers/video/intelfb/intelfbdrv.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfbdrv.h # # drivers/video/intelfb/intelfbdrv.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfbdrv.c # # drivers/video/intelfb/intelfb.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/intelfb.h # # drivers/video/intelfb/builtinmodes.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/builtinmodes.c # # drivers/video/intelfb/Makefile # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/video/intelfb/Makefile # # drivers/video/Makefile # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +3 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/video/Kconfig # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +21 -0 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # drivers/Makefile # 2004/10/25 12:56:30-07:00 adaplas@hotpop.com +2 -1 # fbdev: Intel 830M/845G/852GM/855GM/865G framebuffer driver port # # ChangeSet # 2004/10/25 18:17:34-07:00 adaplas@hotpop.com # [PATCH] fbdev: Cleanup rivafb cursor implementation # # remove/modify all references to info->cursor # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/riva/rivafb.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +1 -0 # fbdev: Cleanup rivafb cursor implementation # # drivers/video/riva/fbdev.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +26 -29 # fbdev: Cleanup rivafb cursor implementation # # ChangeSet # 2004/10/25 18:17:22-07:00 adaplas@hotpop.com # [PATCH] fbdev: Clean up i810fb cursor implementation # # remove/modify all references to info->cursor # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/i810/i810_main.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +14 -26 # fbdev: Clean up i810fb cursor implementation # # ChangeSet # 2004/10/25 18:17:10-07:00 adaplas@hotpop.com # [PATCH] fbdev: Clean up softcursor implementation # # - use struct fb_pixmap pixmap instead of struct fb_pixmap sprite. The # softcursor uses fb_imageblit which also uses pixmap. # # - remove/change all references to info->cursor # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/softcursor.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +23 -49 # fbdev: Clean up softcursor implementation # # ChangeSet # 2004/10/25 18:16:57-07:00 adaplas@hotpop.com # [PATCH] fbdev: Clean up of fbcon/fbdev cursor interface # # The current cursor interface is confusing. Some fields are taken from the # cursor structure in struct fb_info (enable, mask, rop fields) and the rest are # taken from the passed cursor structure. These lead to a lot of confusion, # making it hard for developers to write their own implementation. # # Also, the cursor code has several 'short-circuits', occassionally leading to # undefined cursor behavior. # # These are the changes brought about by the patch: # # - Removed struct fb_cursor and related fields from struct fb_info, and # instead, placed them in a struct not visible to fbdev. # # - The struct fb_cursor passed to fb_cursor() will _always_ contain valid # data with various bitflags indicating which fields have changed # # - The struct fb_pixmap sprite in struct fb_info is used only by drivers with # hardware cursor implementation. Initializing and allocating memory for this # structure is not needed. Remove initialization and memory allocation. # # - The FBIO_CURSOR ioctl is broken (because fb_cursor() is broken). For now, # remove fb_cursor code and make the FBIO_CURSOR ioctl always return -ENODEV. # # - The flag FB_CUR_SETCUR is changed to FB_CUR_SETIMAGE, indicating that the # cursor sprite has changed. The image change is now checked by fbcon so # drivers will not unnecessarily load the sprite image everytime. This causes # hardware cursors to flicker, especially in rivafb. # # - Remove fb_load_cursor_image(). This is unused, and should not be # implemented generically. # # - Documented the usage of the cursor interface in skeletonfb.c # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/fb.h # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +1 -6 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/skeletonfb.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +33 -11 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/fbmem.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +1 -129 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/console/fbcon.h # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +4 -0 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/console/fbcon.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +14 -6 # fbdev: Clean up of fbcon/fbdev cursor interface # # drivers/video/console/bitblit.c # 2004/10/25 12:56:29-07:00 adaplas@hotpop.com +101 -85 # fbdev: Clean up of fbcon/fbdev cursor interface # # ChangeSet # 2004/10/25 18:16:44-07:00 adaplas@hotpop.com # [PATCH] fbdev: Various mach64 changes # # Alexander Kern # [PATCH] port Daniel Mantione 2.4 driver to 2.6 # [PATCH] add more pci_id number # [PATCH] add accelerated imgblit # [PATCH] revert SDRAM_MAGIC_PLL to old behaviour # [PATCH] do a "from BIOS" initialisation only by __i386__ # # Arnaud FONTAINE # [PATCH atyfb] correction for 3D Rage Mobility L # # Geert Uytterhoeven # [PATCH atyfb] Atari Atyfb fixes # [PATCH atyfb] Atyfb on Mach64 GX or Atari # [PATCH 468] m68k sparse floating point # # James Simmons # [PATCH add] port to framebuffer_alloc api # # Nicolas Souchu # [PATCH] I do not found a copy, but it was incorporated too # # Ville Syrjälä # [PATCH] fix pan with doublescan # [PATCH] another double scan fix # [PATCH] disable linear aperture register access # [PATCH] Memory type correction # [PATCH] atyfb (2.6): Fix mmio_start # [PATCH] atyfb (2.6): Fix mem_refresh_rate for Mobility # [PATCH] atyfb (2.6): Add RGB565 support # [PATCH] atyfb: Blank LCD by turning off backlight voltage # [PATCH] atyfb: Rage LT LCD register access # [PATCH] atyfb: vblank irq support # [PATCH] atyfb: MTRR support # # # Antonino Daplas # remove/modify all references to info->cursor # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/video/mach64.h # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +285 -66 # fbdev: Various mach64 changes # # drivers/video/aty/xlinit.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +34 -34 # fbdev: Various mach64 changes # # drivers/video/aty/mach64_gx.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +10 -10 # fbdev: Various mach64 changes # # drivers/video/aty/mach64_cursor.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +139 -158 # fbdev: Various mach64 changes # # drivers/video/aty/mach64_ct.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +535 -198 # fbdev: Various mach64 changes # # drivers/video/aty/mach64_accel.c # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +192 -20 # fbdev: Various mach64 changes # # drivers/video/aty/atyfb_base.c # 2004/10/25 12:59:19-07:00 adaplas@hotpop.com +2320 -1265 # fbdev: Various mach64 changes # # drivers/video/aty/atyfb.h # 2004/10/25 12:50:25-07:00 adaplas@hotpop.com +143 -62 # fbdev: Various mach64 changes # # drivers/video/aty/ati_ids.h # 2004/10/25 12:50:24-07:00 adaplas@hotpop.com +1 -0 # fbdev: Various mach64 changes # # drivers/video/Kconfig # 2004/10/25 13:18:34-07:00 adaplas@hotpop.com +13 -6 # fbdev: Various mach64 changes # # ChangeSet # 2004/10/25 18:16:32-07:00 adaplas@hotpop.com # [PATCH] fbdev: Remove inter_module_get/put from i810fb # # The function inter_module_get/put is to be deprecated. Remove. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/i810/i810_main.c # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +24 -33 # fbdev: Remove inter_module_get/put from i810fb # # drivers/video/i810/i810.h # 2004/10/25 12:47:57-07:00 adaplas@hotpop.com +0 -1 # fbdev: Remove inter_module_get/put from i810fb # # ChangeSet # 2004/10/25 18:16:19-07:00 adaplas@hotpop.com # [PATCH] fbdev: Reduce pixmap memory allocation size # # - Reduce pixmap size allocated by fbmem, i810fb and rivafb from 16-64K to # 8K. This size is sufficient that a single putcs call can be accomodated by # a single imageblit # # - Replace NR_FB_DRIVERS with FB_MAX # # - Trivial code, Kconfig and Documentation cleanup # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/riva/fbdev.c # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +3 -3 # fbdev: Reduce pixmap memory allocation size # # drivers/video/i810/i810_main.c # 2004/10/25 13:18:36-07:00 adaplas@hotpop.com +3 -3 # fbdev: Reduce pixmap memory allocation size # # drivers/video/fbmem.c # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +4 -5 # fbdev: Reduce pixmap memory allocation size # # drivers/video/console/fbcon.c # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +6 -6 # fbdev: Reduce pixmap memory allocation size # # drivers/video/Kconfig # 2004/10/25 13:18:35-07:00 adaplas@hotpop.com +3 -3 # fbdev: Reduce pixmap memory allocation size # # ChangeSet # 2004/10/25 18:16:06-07:00 werner@almesberger.net # [PATCH] update CREDITS entry of Werner Almesberger # # This patch updates my entry. (Long overdue ...) # # Signed-off-by: Werner Almesberger # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # CREDITS # 2004/10/25 13:18:28-07:00 werner@almesberger.net +4 -6 # update CREDITS entry of Werner Almesberger # # ChangeSet # 2004/10/25 18:15:53-07:00 agk@redhat.com # [PATCH] device-mapper trivial: duplicate kfree in error path # # Remove duplicate kfree in dm_register_target error path. # # Signed-Off-By: Alasdair G Kergon # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-target.c # 2004/10/25 12:47:57-07:00 agk@redhat.com +2 -3 # device-mapper trivial: duplicate kfree in error path # # ChangeSet # 2004/10/25 18:15:41-07:00 agk@redhat.com # [PATCH] device-mapper trivial: stray semi-colon # # Remove stray semicolon. # # Signed-Off-By: Alasdair G Kergon # From: Lars Marowsky-Bree # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm.c # 2004/10/25 12:47:57-07:00 agk@redhat.com +1 -1 # device-mapper trivial: stray semi-colon # # ChangeSet # 2004/10/25 18:15:29-07:00 agk@redhat.com # [PATCH] device-mapper: dm-crypt: new IV mode ESSIV # # This patch adds a new IV mode ''encrypted sector|salt IV'' described in # http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/472 # # To use ESSIV, set the ivmode (using the new syntax) to "essiv:". # "hash" should be a valid cryptoapi hash. # # This, for example, is a valid dm-target line: # # 0 200 crypt aes-cbc-essiv:sha256 00000000000000000000000000000000 0 /dev/loop/5 0 # # Signed-Off-By: Alasdair G Kergon # Signed-Off-By: Christophe Saout # Signed-Off-By: Fruhwirth Clemens # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-crypt.c # 2004/10/25 12:47:56-07:00 agk@redhat.com +111 -3 # device-mapper: dm-crypt: new IV mode ESSIV # # ChangeSet # 2004/10/25 18:15:17-07:00 agk@redhat.com # [PATCH] device-mapper: dm-crypt generator extension # # Create crypt_iv_operations structure with generator method and move the # plain iv generator into this structure. Optionally accept an extended # syntax: -- # # This also makes it ready to support chaining modes other than CBC # mode, such as CMC (not implemented in cryptoapi yet), # The problems outlined by Adam J. Richter in # http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/454 # would be fixed by switching to CMC chaining mode. # # Example of a valid target line: # 0 200 crypt aes-cbc-plain 00000000000000000000000000000000 0 /dev/loop/5 0 # # Signed-Off-By: Alasdair G Kergon # Signed-Off-By: Christophe Saout # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-crypt.c # 2004/10/25 13:18:37-07:00 agk@redhat.com +112 -37 # device-mapper: dm-crypt generator extension # # ChangeSet # 2004/10/25 18:15:05-07:00 agk@redhat.com # [PATCH] device-mapper: dm-crypt tidy-ups # # Small dm-crypt tidy-ups: # - Use unsigned consistently # - Simplify crypt_iv_plain memset # - Use DMEMIT macro # # Signed-Off-By: Alasdair G Kergon # Signed-Off-By: Christophe Saout # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/dm-crypt.c # 2004/10/25 13:18:37-07:00 agk@redhat.com +31 -34 # device-mapper: dm-crypt tidy-ups # # ChangeSet # 2004/10/25 18:14:52-07:00 alex.kiernan@gmail.com # [PATCH] UFS: solaris compatibility fix # # Fix handling of device inodes on Solaris x86 filesystems, add support for # large dev_t against Solaris UFS filesystems. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ufs/util.h # 2004/10/25 12:47:56-07:00 alex.kiernan@gmail.com +2 -0 # UFS: solaris compatibility fix # # fs/ufs/util.c # 2004/10/25 12:47:56-07:00 alex.kiernan@gmail.com +53 -0 # UFS: solaris compatibility fix # # fs/ufs/namei.c # 2004/10/25 12:47:56-07:00 alex.kiernan@gmail.com +2 -2 # UFS: solaris compatibility fix # # fs/ufs/inode.c # 2004/10/25 12:47:56-07:00 alex.kiernan@gmail.com +2 -2 # UFS: solaris compatibility fix # # ChangeSet # 2004/10/25 18:14:40-07:00 marcelo.tosatti@cyclades.com # [PATCH] Change pagevec counters back to unsigned long and cacheline align # # Change pagevec "nr" and "cold" back to "unsigned long", because <4 byte # accesses can be slow on architectures < Pentium III (additional "data16" # operand on instruction). # # This still honours the cacheline alignment, making the size of "pagevec" # structure a power of two (either 64 or 128 bytes). # # Haven't been able to see any significant change on performance on my # limited testing. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/pagevec.h # 2004/10/25 12:47:56-07:00 marcelo.tosatti@cyclades.com +4 -3 # Change pagevec counters back to unsigned long and cacheline align # # ChangeSet # 2004/10/25 18:14:27-07:00 Peter_Pregler@email.com # [PATCH] cpia.c rmmod deadlock fix # # Newer versions of module-init-tools do some locking now which leads to a # dead-lock if cpia.c does a request_module("cpia_usb/pp"). The attached # patch against 2.6.8 removes the request_module. The problem is actually # the same as is documented in debian bug #259056 which was caused by alsa # autoloading some oss-modules. So I guess there might be more places in the # kernel where this new locking in the module-init-tools might lead to # dead-locks. # # Signed-off-by: Peter Pregler # Acked-by: Gerd Knorr # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/cpia.c # 2004/10/25 12:47:55-07:00 Peter_Pregler@email.com +1 -10 # cpia.c rmmod deadlock fix # # ChangeSet # 2004/10/25 18:14:15-07:00 vandrove@vc.cvut.cz # [PATCH] Weak symbols in modules and versioned symbols # # Weak symbol may be unavailable in kernel, but if it is available, its # signature should be same as was at the build time. If we do not attach # signatures to weak symbols, kernel is tainted when such module is loaded. # # vmmon: no version for "sys_ioctl" found: kernel tainted. # # I also believe that it is safer to add & check signatures here - module # wants either sys_ioctl with right signature, or no sys_ioctl at all, not # sys_ioctl with different signature (which signals that there is some # misbuild occuring). # # Signed-off-by: Petr Vandrovec # Signed-off-by: Rusty Russell (forwarded) # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # scripts/mod/modpost.c # 2004/10/25 12:47:56-07:00 vandrove@vc.cvut.cz +9 -5 # Weak symbols in modules and versioned symbols # # ChangeSet # 2004/10/25 18:14:02-07:00 jmorris@redhat.com # [PATCH] Add d_alloc_name() to libfs # # This patch consolidates several occurrences of duplicated code into a new # libfs function d_alloc_name(). # # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/10/25 21:14:01-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/e1000-2 # # drivers/net/e1000/e1000_main.c # 2004/10/25 21:13:57-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/e1000/e1000.h # 2004/10/25 21:13:57-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # security/selinux/selinuxfs.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +3 -14 # Add d_alloc_name() to libfs # # net/sunrpc/rpc_pipe.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +1 -5 # Add d_alloc_name() to libfs # # include/linux/fs.h # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +1 -0 # Add d_alloc_name() to libfs # # fs/libfs.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +2 -5 # Add d_alloc_name() to libfs # # fs/dcache.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +10 -0 # Add d_alloc_name() to libfs # # drivers/usb/gadget/inode.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +1 -5 # Add d_alloc_name() to libfs # # drivers/oprofile/oprofilefs.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +4 -10 # Add d_alloc_name() to libfs # # drivers/misc/ibmasm/ibmasmfs.c # 2004/10/25 12:47:55-07:00 jmorris@redhat.com +2 -11 # Add d_alloc_name() to libfs # # ChangeSet # 2004/10/25 18:13:49-07:00 cmm@us.ibm.com # [PATCH] ext2: discard preallocation in last iput # # Currently the ext2 preallocation is discarded on every iput() (via # ext2_put_inode()). We should only discard the preallocation on the last # iput() (via ext2_clear_inode()). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ext2/super.c # 2004/10/25 12:47:55-07:00 cmm@us.ibm.com +4 -6 # ext2: discard preallocation in last iput # # fs/ext2/inode.c # 2004/10/25 12:47:55-07:00 cmm@us.ibm.com +0 -13 # ext2: discard preallocation in last iput # # fs/ext2/ext2.h # 2004/10/25 12:47:55-07:00 cmm@us.ibm.com +0 -1 # ext2: discard preallocation in last iput # # ChangeSet # 2004/10/25 18:13:38-07:00 neilb@cse.unsw.edu.au # [PATCH] md: fixes to make version-1 superblocks work in md driver # # Add some missing data_offset additions and some le_to_cpu convertions and fix # a few other little mistakes. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/raid/md_p.h # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +2 -2 # md: fixes to make version-1 superblocks work in md driver # # include/linux/raid/md.h # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +1 -1 # md: fixes to make version-1 superblocks work in md driver # # drivers/md/raid10.c # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +1 -0 # md: fixes to make version-1 superblocks work in md driver # # drivers/md/multipath.c # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +2 -0 # md: fixes to make version-1 superblocks work in md driver # # drivers/md/md.c # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +11 -20 # md: fixes to make version-1 superblocks work in md driver # # ChangeSet # 2004/10/25 18:13:26-07:00 neilb@cse.unsw.edu.au # [PATCH] md: fix typos in md and raid10 # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid10.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +1 -1 # md: fix typos in md and raid10 # # drivers/md/md.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +2 -2 # md: fix typos in md and raid10 # # ChangeSet # 2004/10/25 18:13:13-07:00 neilb@cse.unsw.edu.au # [PATCH] md: don't hold lock on md devices while waiting for them to finish resync. # # If one md array is waiting for another to finish resyncing, then it holds a # reference to the array, so the array cannot be stopped. With this patch, we # drop the reference before waiting. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/md.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +36 -17 # md: don't hold lock on md devices while waiting for them to finish resync. # # ChangeSet # 2004/10/25 18:13:01-07:00 neilb@cse.unsw.edu.au # [PATCH] md: discard calc_sb_csum_common in favour of csum_fold # # csum_fold should always have been used on the result of csum_partial. # calc_sb_csum_common therefore isn't needed. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/md.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +1 -26 # md: discard calc_sb_csum_common in favour of csum_fold # # ChangeSet # 2004/10/25 18:12:49-07:00 neilb@cse.unsw.edu.au # [PATCH] md: make read retry use a new bio in raid1 and raid10 # # When retrying a read request, we need to "Reset" the bio. It is easiest to # get this right if we discard the bio we have and re-clone it. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid10.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +6 -7 # md: make read retry use a new bio in raid1 and raid10 # # drivers/md/raid1.c # 2004/10/25 12:47:55-07:00 neilb@cse.unsw.edu.au +5 -1 # md: make read retry use a new bio in raid1 and raid10 # # ChangeSet # 2004/10/25 18:12:36-07:00 neilb@cse.unsw.edu.au # [PATCH] md: modify locking when accessing subdevices in md # # Each md personality keeps a list of devices that are currently active in the # array (mdk_rdev_t). As these can potentially be removed at any time, some # locking is needed when accessing entries in the list. Currently this involves # a spinlock, but all the spinlocking this imposed in unplug_slaves bothered me. # # So, I have changed it to use rcu locking. This is more appropriate as objects # are removed only very rarely, and there is no cost in waiting a little while # for a remove to succeed. # # Also, all changes to the list of devices are performed by the per-array thread # (calling md_check_recovery) and so are completely single threaded, so no # locking between writers is needed at all. # # Finally, devices are never added or removed while resync is happening, so # resync doesn't need to worry about locking at all. # # So with this patch, the spinlocking is replaced with rcu read locking and # synchronize_kernel. The rcu_read_lock is held while dereferencing a possible # device, and the nr_pending count is atomically incremented if the device is to # be held outside of the rcu_read_lock. # # When removing a device, if the nr_pending count appears to be zero, we set the # list entry to NULL and call synchronize_kernel(). If the count is still zero # after this, we have a safe removal. If it is non-zero, then someone has just # started using it so we put the pointer back and fail the removal. When the # new user finally drops it's reference, that will cause the per-array thread to # wake up again and retry the removal. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid6main.c # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +29 -23 # md: modify locking when accessing subdevices in md # # drivers/md/raid5.c # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +28 -23 # md: modify locking when accessing subdevices in md # # drivers/md/raid10.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +33 -29 # md: modify locking when accessing subdevices in md # # drivers/md/raid1.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +32 -29 # md: modify locking when accessing subdevices in md # # drivers/md/multipath.c # 2004/10/25 13:18:38-07:00 neilb@cse.unsw.edu.au +30 -21 # md: modify locking when accessing subdevices in md # # ChangeSet # 2004/10/25 18:12:24-07:00 neilb@cse.unsw.edu.au # [PATCH] md: fix two little bugs in raid10 # # These can cause resync to spin when there is a faulty drive. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid10.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +2 -1 # md: fix two little bugs in raid10 # # ChangeSet # 2004/10/25 18:12:11-07:00 neilb@cse.unsw.edu.au # [PATCH] md: make sure md always uses rdev_dec_pending properly # # The ->nr_pending counted should always be decremented with rdev_dec_pending, # as this need to do things when the count hits zero. There were a few places # where it was being decremented directly. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid6main.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +1 -1 # md: make sure md always uses rdev_dec_pending properly # # drivers/md/raid5.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +1 -1 # md: make sure md always uses rdev_dec_pending properly # # drivers/md/raid10.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +2 -2 # md: make sure md always uses rdev_dec_pending properly # # drivers/md/raid1.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +2 -2 # md: make sure md always uses rdev_dec_pending properly # # drivers/md/multipath.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +1 -1 # md: make sure md always uses rdev_dec_pending properly # # ChangeSet # 2004/10/25 18:11:59-07:00 neilb@cse.unsw.edu.au # [PATCH] md: rationalise unplug functions in md # # There are currently subtle differences in the different personalities # concerning when subdevices are unplugged (faulty? nr_pending?). This patch # makes them sll uniform. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid6main.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +2 -2 # md: rationalise unplug functions in md # # drivers/md/raid5.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +2 -2 # md: rationalise unplug functions in md # # drivers/md/raid10.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +1 -1 # md: rationalise unplug functions in md # # drivers/md/raid1.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +1 -1 # md: rationalise unplug functions in md # # drivers/md/multipath.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +1 -1 # md: rationalise unplug functions in md # # ChangeSet # 2004/10/25 18:11:47-07:00 neilb@cse.unsw.edu.au # [PATCH] md: rationalise issue_flush function in md personalities # # The functions are all subtly different. This patch makes them all much the # same. In particular, EOPNOTSUPP gets returned by all is appropriate. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid6main.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +6 -16 # md: rationalise issue_flush function in md personalities # # drivers/md/raid5.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +6 -16 # md: rationalise issue_flush function in md personalities # # drivers/md/raid10.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +6 -6 # md: rationalise issue_flush function in md personalities # # drivers/md/raid1.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +6 -6 # md: rationalise issue_flush function in md personalities # # drivers/md/raid0.c # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +4 -8 # md: rationalise issue_flush function in md personalities # # drivers/md/multipath.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +5 -8 # md: rationalise issue_flush function in md personalities # # drivers/md/linear.c # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +4 -7 # md: rationalise issue_flush function in md personalities # # ChangeSet # 2004/10/25 18:11:34-07:00 neilb@cse.unsw.edu.au # [PATCH] md: make retry_list non-global in raid1 and multipath # # Both raid1 and multipath have a "retry_list" which is global, so all raid1 # arrays (for example) us the same list. This is rather ugly, and it is simple # enough to make it per-array, so this patch does that. # # It also changes to multipath code to use list.h lists instead of # roll-your-own. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/raid/raid1.h # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +1 -0 # md: make retry_list non-global in raid1 and multipath # # include/linux/raid/multipath.h # 2004/10/25 12:47:54-07:00 neilb@cse.unsw.edu.au +2 -1 # md: make retry_list non-global in raid1 and multipath # # drivers/md/raid1.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +9 -9 # md: make retry_list non-global in raid1 and multipath # # drivers/md/multipath.c # 2004/10/25 13:18:40-07:00 neilb@cse.unsw.edu.au +12 -16 # md: make retry_list non-global in raid1 and multipath # # ChangeSet # 2004/10/25 18:11:22-07:00 neilb@cse.unsw.edu.au # [PATCH] md: remove md_flush_all # # Following are 7 patches for md # # They all grew out of a desire to redo the locking in unplug_slave. Getting # and dropping a spinlock so often for very little gain (it would be nearly # impossible to lose the relevant race) really bothered me. # # I finally figured that I could reply it with rcu locking which is very light # wait, and quite up to the task. # # One the way I found an number of inconsistencies that needed cleaning up and # even a few bugs to fix. The first 6 patches deal with these inconsistencies # and bugs. The last redoes the locking for adding/removing/accessing devices # within md personalities. # # # This patch: # # md_flush_all() isn't needed as each personality defines its own # issue_flush_fn. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/md.c # 2004/10/25 13:18:39-07:00 neilb@cse.unsw.edu.au +0 -33 # md: remove md_flush_all # # ChangeSet # 2004/10/25 18:11:09-07:00 dvhltc@us.ibm.com # [PATCH] sched: active_load_balance fixes # # The following patch against the latest mm fixes several problems with # active_load_balance(). # # Rather than starting with the highest allowable domain (SD_LOAD_BALANCE is # still set) and depending on the order of the cpu groups, we start at the # lowest domain and work up until we find a suitable CPU or run out of # options (SD_LOAD_BALANCE is no longer set). This is a more robust approach # as it is more explicit and not subject to the construction order of the cpu # groups. # # We move the test for busiest_rq->nr_running <=1 into the domain loop so we # don't continue to try and move tasks when there are none left to move. # This new logic (testing for nr_running in the domain loop) should make the # busiest_rq==target_rq condition really impossible, so we have replaced the # graceful continue on fail with a BUG_ON. (Bjorn Helgaas, please confirm) # # We eliminate the exclusion of the busiest_cpu's group from the pool of # available groups to push to as it is the ideal group to push to, even if # not very likely to be available. Note that by removing the test for # group==busy_group and allowing it to also be tested for suitability, the # running time is nearly the same. # # We no longer force the destination CPU to be in a group of completely idle # CPUs, nor to be the last in that group. # # Signed-off-by: Darren Hart # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/25 12:47:53-07:00 dvhltc@us.ibm.com +72 -57 # sched: active_load_balance fixes # # ChangeSet # 2004/10/25 18:10:57-07:00 amgta@yacht.ocn.ne.jp # [PATCH] schedstat: fix schedule() statistics # # The number of times schedule() left the processor idle in the # /proc/schedstat (runqueue.sched_goidle) seems to be wrong. # # The schedule() statistics should satisfy the equation: # sched_cnt == sched_noswitch + sched_switch + sched_goidle # # (http://eaglet.rain.com/rick/linux/schedstat/v10/format-10.html) # # The below patch fix this, and I have confirmed to be fixed with: # # grep ^cpu /proc/schedstat | awk '{print $6+$7+$9, $8}' # # Acked-by: Ingo Molnar # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/25 13:18:41-07:00 amgta@yacht.ocn.ne.jp +2 -1 # schedstat: fix schedule() statistics # # ChangeSet # 2004/10/25 18:10:44-07:00 hawkes@oss.sgi.com # [PATCH] sched: improved load_balance() tolerance for pinned tasks # # A large number of processes that are pinned to a single CPU results in # every other CPU's load_balance() seeing this overloaded CPU as "busiest", # yet move_tasks() never finds a task to pull-migrate. This condition occurs # during module unload, but can also occur as a denial-of-service using # sys_sched_setaffinity(). Several hundred CPUs performing this fruitless # load_balance() will livelock on the busiest CPU's runqueue lock. A smaller # number of CPUs will livelock if the pinned task count gets high. This # simple patch remedies the more common first problem: after a move_tasks() # failure to migrate anything, the balance_interval increments. Using a # simple increment, vs. the more dramatic doubling of the balance_interval, # is conservative and yet also effective. # # Signed-off-by: John Hawkes # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/25 13:18:41-07:00 hawkes@oss.sgi.com +12 -4 # sched: improved load_balance() tolerance for pinned tasks # # ChangeSet # 2004/10/25 18:10:32-07:00 jbarnes@engr.sgi.com # [PATCH] sched: small load balance fix # # Small bug fix for domains that don't load balance (like those that only # balance on exec for example). # # Signed-off-by: John Hawkes # Signed-off-by: Jesse Barnes # Acked-by: Nick Piggin # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/25 13:18:41-07:00 jbarnes@engr.sgi.com +1 -2 # sched: small load balance fix # # ChangeSet # 2004/10/25 18:10:20-07:00 schwidefsky@de.ibm.com # [PATCH] s390: network driver # # From: Frank Pavlic # From: Thomas Spatzier # # s390 network driver changes: # - ctc/iucv: Use DECLARE_PER_CPU instead of extern DEFINE_PER_CPU. # - lcs: Always set channel state to CH_STATE_INIT when stopping channels. # - qeth: vlan fixes. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/net/qeth_main.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +117 -124 # s390: network driver # # drivers/s390/net/qeth.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -3 # s390: network driver # # drivers/s390/net/lcs.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +4 -4 # s390: network driver # # drivers/s390/net/iucv.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -1 # s390: network driver # # drivers/s390/net/ctcdbug.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +3 -3 # s390: network driver # # ChangeSet # 2004/10/25 18:10:07-07:00 schwidefsky@de.ibm.com # [PATCH] s390: qdio changes # # From: Utz Bacher # # qdio changes: # - Rename iqdio_is_inbound_q_done to tiqdio_is_inbound_q_done to # keep function naming consistent. # - Allocate qdio structures below 2GB. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/cio/qdio.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +8 -8 # s390: qdio changes # # ChangeSet # 2004/10/25 18:09:55-07:00 schwidefsky@de.ibm.com # [PATCH] s390: debug feature system control # # From: Christian Borntraeger # # Debug feature changes: # - Add system control to stop the debug feature. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-s390/debug.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +2 -0 # s390: debug feature system control # # arch/s390/kernel/traps.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +5 -2 # s390: debug feature system control # # arch/s390/kernel/debug.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +76 -1 # s390: debug feature system control # # Documentation/s390/s390dbf.txt # 2004/10/25 13:18:32-07:00 schwidefsky@de.ibm.com +37 -0 # s390: debug feature system control # # ChangeSet # 2004/10/25 18:09:42-07:00 schwidefsky@de.ibm.com # [PATCH] s390: dcss segments cleanup # # From: Carsten Otte # From: Gerald Schaefer # # Cleanup segment load/unload infrastructure. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/10/25 21:09:39-04:00 akpm@osdl.org # [PATCH] ne2k-pci pci build fix # # Fix for updated pci_{save,restore}_state() # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # include/asm-s390/extmem.h # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +16 -5 # s390: dcss segments cleanup # # drivers/s390/char/monreader.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +60 -2 # s390: dcss segments cleanup # # drivers/s390/block/dcssblk.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +71 -48 # s390: dcss segments cleanup # # arch/s390/mm/extmem.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +367 -408 # s390: dcss segments cleanup # # drivers/net/ne2k-pci.c # 2004/10/24 06:28:57-04:00 akpm@osdl.org +2 -2 # ne2k-pci pci build fix # # ChangeSet # 2004/10/25 18:09:30-07:00 schwidefsky@de.ibm.com # [PATCH] s390: core changes # # s390 core changes: # - Load pid to cr4 on context switch. # - Correct and check buffer length of cpcmd. Fix cpcmd inline assembly. # - Add missing cc clobber to do_softirq insline assembly. # - Regenerate default configuration. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/kernel/irq.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -1 # s390: core changes # # arch/s390/kernel/entry64.S # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -0 # s390: core changes # # arch/s390/kernel/entry.S # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +1 -0 # s390: core changes # # arch/s390/kernel/cpcmd.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +12 -11 # s390: core changes # # arch/s390/kernel/asm-offsets.c # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +2 -0 # s390: core changes # # arch/s390/defconfig # 2004/10/25 12:47:52-07:00 schwidefsky@de.ibm.com +11 -2 # s390: core changes # # ChangeSet # 2004/10/25 18:09:17-07:00 schwidefsky@de.ibm.com # [PATCH] s390: sacf local root exploit (CAN-2004-0887) # # s390 core changes: # - Force user process back to home space mode in space switch event # exception handler. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/kernel/traps.c # 2004/10/25 13:18:42-07:00 schwidefsky@de.ibm.com +16 -1 # s390: sacf local root exploit (CAN-2004-0887) # # ChangeSet # 2004/10/25 18:09:05-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: add conf INITRAMFS_SOURCE # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/Kconfig_block # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +27 -0 # uml: add conf INITRAMFS_SOURCE # # ChangeSet # 2004/10/25 18:08:53-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: unused label # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/process_kern.c # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +0 -1 # uml: unused label # # ChangeSet # 2004/10/25 18:08:41-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: resync LDS script for SMP changes # # Add a couple entries to the linker script which are needed for SMP to link. # (From Yan Burman) # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/uml.lds.S # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: resync LDS script for SMP changes # # arch/um/kernel/dyn.lds.S # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: resync LDS script for SMP changes # # ChangeSet # 2004/10/25 18:08:28-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Kconfig and defconfig updates. # # - Make CONFIG_SMP depend on TT mode. Since SMP does not work in SKAS mode # (it's still a TODO), add the dependency in the Kconfig. Also mark CONFIG_SMP # as experimental. # - Workaround kconfig warning: just for now (we wait for a "CONFIG_VIRTUAL_OS" # to exclude physical hardware) create the CONFIG_INPUT option (fixed to N), # to avoid complaints from make *config ARCH=um about it being undefined. # - Mark HPPFS as broken and needing updates. # - Update defconfig, both for new kernel options and for changes in the actual # config. For instance, enable module support by default. # - Update help text for some items and add a help to some other ones. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/defconfig # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +38 -117 # uml: Kconfig and defconfig updates. # # arch/um/Kconfig # 2004/10/25 12:47:51-07:00 blaisorblade_spam@yahoo.it +40 -10 # uml: Kconfig and defconfig updates. # # ChangeSet # 2004/10/25 18:08:16-07:00 bunk@stusta.de # [PATCH] small SOFTWARE_SUSPEND help text fixes # # Some small fixes for the SOFTWARE_SUSPEND help text. # # Signed-off-by: Adrian Bunk # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/Kconfig # 2004/10/25 12:47:51-07:00 bunk@stusta.de +2 -1 # small SOFTWARE_SUSPEND help text fixes # # ChangeSet # 2004/10/25 18:08:03-07:00 pavel@ucw.cz # [PATCH] power/disk.c: small fixups # # power_down may never ever fail, so it does not really need to return # anything. Kill obsolete code and fixup old comments. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/disk.c # 2004/10/25 12:47:51-07:00 pavel@ucw.cz +5 -14 # power/disk.c: small fixups # # ChangeSet # 2004/10/25 18:07:51-07:00 paulus@samba.org # [PATCH] ppc64: __ioremap_explicit() criterion change # # This patch is from John Rose . # # The function __ioremap_explicit() misses a possible (obscure) case when # reserving the imalloc area for the new region. This can result in the # unexpected DLPAR-add failure for an I/O slot. The failure will be # characterized by a kernel message resembling "could not obtain imalloc area # for ea 0x..." Here's an explanation: # # At boot time, imalloc regions are created for the ranges of all PHBs. Upon # removal of a child slot for one of these PHBs, the imalloc region is split # so that the region for the child slot can be removed. # # A GFW testcase revealed the following scenario. A PHB is remapped at boot # for virtual address range A through C. At boot, the partition owns a slot # that spans from A to B. This slot is DLPAR-removed, leaving an imalloc # region from B to C. At this point, the user DLPAR adds an EADS slot that # was not present at boot, but is a child of the PHB. The new slot happens # to have a range that directly matches the leftover PHB range, from B to C. # The existing code does not expect this, so the operation fails. # # Signed-off-by: John Rose # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/init.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +2 -1 # ppc64: __ioremap_explicit() criterion change # # ChangeSet # 2004/10/25 18:07:39-07:00 paulus@samba.org # [PATCH] ppc64: create iommu_free_table() # # This patch is from John Rose . # # The patch below creates iommu_free_table(). Iommu tables are not currently # freed in PPC64. This could cause a memory leak for DLPAR of an EADS slot. # The function verifies that there are no outstanding TCE entries for the # range of the table before freeing it. I added a call to iommu_free_table() # to the code that dynamically removes a device node. This should be fairly # symmetrical with the table allocation, which happens during dynamic # addition of a device node. # # Signed-off-by: John Rose # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/iommu.h # 2004/10/25 12:47:51-07:00 paulus@samba.org +3 -0 # ppc64: create iommu_free_table() # # arch/ppc64/kernel/prom.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +3 -0 # ppc64: create iommu_free_table() # # arch/ppc64/kernel/pSeries_iommu.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +32 -0 # ppc64: create iommu_free_table() # # ChangeSet # 2004/10/25 18:07:26-07:00 paulus@samba.org # [PATCH] ppc64: crash during firmware flash update # # This patch is from Linas Vepstas . # # Race conditions during system shutdown after a firmware flash can sometimes # lead to an invalid pointer deref (deref to freed memory). This patch fixes # this. In addition, it makes sure that the proc entries created by the # firmware flash module are removed when the module is unloaded. # # Signed-off-by: Linas Vepstas # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/rtas_flash.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +3 -1 # ppc64: crash during firmware flash update # # ChangeSet # 2004/10/25 18:07:14-07:00 paulus@samba.org # [PATCH] ppc64: provide notifier list for EEH slot isolations # # When the EEH (enhanced i/o error handling) hardware on pSeries detects # various kinds of PCI errors, it immediately freezes and isolates the slot # of the offending PCI card. We get to know about that by noticing that # reads from the device return all-1s, and then we have to do a firmware call # to find out whether the all-1s value was due to a slot isolation. # # This patch adds a notifier so that other parts of the system (e.g. the RPA # PCI hotplug driver) can know that a slot isolation event has occurred and # take whatever recovery action is appropriate. The notifier is called in a # workqueue function, although the read from the device that noticed the # all-1s value may have been at interrupt level. As a precaution, if we keep # trying to read from the device at interrupt level, and do 1000 reads # without the workqueue getting a chance to run, we panic, on the grounds # that we presumably have a badly-written driver which will spin forever in # its interrupt routine, e.g. waiting for a bit in a device register to go # to 0. # # This patch is based on an earlier patch by Linas Vepstas . # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/eeh.h # 2004/10/25 12:47:50-07:00 paulus@samba.org +26 -2 # ppc64: provide notifier list for EEH slot isolations # # arch/ppc64/kernel/eeh.c # 2004/10/25 12:47:50-07:00 paulus@samba.org +224 -52 # ppc64: provide notifier list for EEH slot isolations # # ChangeSet # 2004/10/25 18:07:02-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: xmon sparse cleanups # # This patch removes many sparse warnings from the xmon code. Mostly K&R # function declarations and 0-instead-of-NULLs. There are still a whole # bunch of warnings in xmon/ppc-opc.c, which is a copy of a file from # binutils. # # Signed-off-by: David Gibson # Acked-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/xmon/xmon.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +13 -15 # ppc64: xmon sparse cleanups # # arch/ppc64/xmon/start.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: xmon sparse cleanups # # ChangeSet # 2004/10/25 18:06:50-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: trivial sparse cleanups # # This patch squashes a handful of assorted sparse warnings in the ppc64 # code. Should be pretty much trivial and self explanatory. # # Signed-off-by: David Gibson # Acked-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/hugetlbpage.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: trivial sparse cleanups # # arch/ppc64/mm/hash_utils.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: trivial sparse cleanups # # arch/ppc64/kernel/setup.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: trivial sparse cleanups # # arch/ppc64/kernel/nvram.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +2 -2 # ppc64: trivial sparse cleanups # # ChangeSet # 2004/10/25 18:06:37-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: don't build virtual IO drivers for PowerMac # # Only compile vio.c on iSeries and pSeries, since other PPC64 platforms # (PowerMac) don't use virtual IO. The resulting #ifdefs in dma.c are kind # of ugly, but at least contained, and I can't see a nicer way of doing it # for the time being. # # Signed-off-by: David Gibson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/dma.c # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +20 -0 # ppc64: don't build virtual IO drivers for PowerMac # # arch/ppc64/kernel/Makefile # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +2 -1 # ppc64: don't build virtual IO drivers for PowerMac # # arch/ppc64/Kconfig # 2004/10/25 12:47:50-07:00 david@gibson.dropbear.id.au +5 -0 # ppc64: don't build virtual IO drivers for PowerMac # # ChangeSet # 2004/10/25 18:06:25-07:00 trini@kernel.crashing.org # [PATCH] ppc32: Fix building for Motorola Sandpoint with O= # # Since we directly -include $(clear_L2_L3) when needed, we need to point to # the full path of it. # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/boot/simple/Makefile # 2004/10/25 12:47:49-07:00 trini@kernel.crashing.org +1 -1 # ppc32: Fix building for Motorola Sandpoint with O= # # ChangeSet # 2004/10/25 18:06:13-07:00 chrisw@osdl.org # [PATCH] lsm: remove net related includes from security.h # # With this we're back to the times when changing skbuff.h only triggers # rebuild of _net_ related stuff 8) # # This uncovered a bug in rmap.h, that was not including mm.h to get the # definition of struct vm_area_struct, working by luck. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: Chris Wright # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/commoncap.c # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +17 -0 # lsm: remove net related includes from security.h # # include/linux/security.h # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +7 -18 # lsm: remove net related includes from security.h # # include/linux/rmap.h # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +1 -0 # lsm: remove net related includes from security.h # # ChangeSet # 2004/10/25 18:06:00-07:00 chrisw@osdl.org # [PATCH] lsm: fix send_sigurg mediation # # Stephen Smalley notes that send_sigurg isn't mediated by LSM in the same # manner as send_sigio. Patch below is a slight modification of Stephen's # original patch. It moves the security_file_send_sigiotask() hook into the # sigio_perm(). The hook's fd and reason arguments are replaced with the # signum. sigio_perm() and it's callers are updated to pass the signum # through to the hook. In send_sigio case, the signum is simply fown->signum # or SIGIO when signum is 0, however in send_sigurg the kernel doesn't use # fown->signum, it always sends SIGURG. # # From: Stephen Smalley # Signed-off-by: Chris Wright # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/hooks.c # 2004/10/25 13:18:32-07:00 chrisw@osdl.org +3 -4 # lsm: fix send_sigurg mediation # # security/dummy.c # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +1 -2 # lsm: fix send_sigurg mediation # # include/linux/security.h # 2004/10/25 13:18:46-07:00 chrisw@osdl.org +10 -12 # lsm: fix send_sigurg mediation # # fs/fcntl.c # 2004/10/25 12:47:50-07:00 chrisw@osdl.org +7 -9 # lsm: fix send_sigurg mediation # # ChangeSet # 2004/10/25 18:05:47-07:00 rddunlap@osdl.org # [PATCH] checkstack: add x86_64 arch. support # # Add support for x86_64 arch. to 'make checkstack' (checkstack.pl). # # Signed-off-by: Randy Dunlap # Acked-by: Jrn Engel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # scripts/checkstack.pl # 2004/10/25 12:47:49-07:00 rddunlap@osdl.org +3 -0 # checkstack: add x86_64 arch. support # # ChangeSet # 2004/10/25 18:05:35-07:00 nickpiggin@yahoo.com.au # [PATCH] mm: help zone padding # # Uses the zero length array which seems to be quite abundant throughout the # tree to reduce the size of the zone padding to zero. # # 1536 before, 1152 afterwards for me. # # Also try to be a bit smarter about getting commonly accessed fields # together, which surely can't be worse than before. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/mmzone.h # 2004/10/25 12:47:49-07:00 nickpiggin@yahoo.com.au +19 -18 # mm: help zone padding # # ChangeSet # 2004/10/25 18:05:23-07:00 akpm@osdl.org # [PATCH] msnd.c build fix # # sound/oss/msnd.c: In function `msnd_enable_irq': # sound/oss/msnd.c:278: warning: implicit declaration of function `enable_irq' # sound/oss/msnd.c: In function `msnd_disable_irq': # sound/oss/msnd.c:307: warning: implicit declaration of function `disable_irq' # # sound/oss/msnd.c:323: `msnd_get_num_devs' undeclared here (not in a function) # sound/oss/msnd.c:323: initializer element is not constant # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # sound/oss/msnd.c # 2004/10/25 12:47:49-07:00 akpm@osdl.org +2 -0 # msnd.c build fix # # ChangeSet # 2004/10/25 18:05:11-07:00 dhowells@redhat.com # [PATCH] Shift key-related error codes up and insert ECANCELED # # This patch shifts the key-related error codes up by one and inserts an # ECANCELED error code where not already defined. It seems that has been # defined in glibc without passing it back to the kernel:-/ # # Signed-Off-By: David Howells # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-sparc64/errno.h # 2004/10/25 12:47:49-07:00 dhowells@redhat.com +5 -4 # Shift key-related error codes up and insert ECANCELED # # include/asm-sparc/errno.h # 2004/10/25 12:47:49-07:00 dhowells@redhat.com +5 -4 # Shift key-related error codes up and insert ECANCELED # # include/asm-generic/errno.h # 2004/10/25 12:47:49-07:00 dhowells@redhat.com +5 -4 # Shift key-related error codes up and insert ECANCELED # # include/asm-alpha/errno.h # 2004/10/25 12:47:49-07:00 dhowells@redhat.com +5 -4 # Shift key-related error codes up and insert ECANCELED # # ChangeSet # 2004/10/25 18:04:58-07:00 juhl-lkml@dif.dk # [PATCH] ds_ioctl.c usercopy check # # Patch adds a check of the return value and returns -EFAULT if # __copy_to_user fails. # # Signed-off-by: Jesper Juhl # Acked-by: Russell King # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pcmcia/ds.c # 2004/10/25 12:47:48-07:00 juhl-lkml@dif.dk +5 -1 # ds_ioctl.c usercopy check # # ChangeSet # 2004/10/25 18:04:46-07:00 akpm@osdl.org # [PATCH] revert "ppc: fix build with o=output_dir" # # This was the wrong fix - back it out and try again later. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/boot/lib/Makefile # 2004/10/25 12:47:48-07:00 akpm@osdl.org +1 -7 # revert "ppc: fix build with o=output_dir" # # ChangeSet # 2004/10/25 21:04:34-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/misc # # net/irda/irlan/irlan_client.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tulip/xircom_cb.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tulip/de4x5.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tulip/de2104x.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tokenring/olympic.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/smc91x.h # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/pcnet32.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/ns83820.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/mac8390.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/ixgb/ixgb_main.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/hamradio/hdlcdrv.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/e1000/e1000_main.c # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/Kconfig # 2004/10/25 21:04:30-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 16:21:14-07:00 andrea@novell.com # [NET]: Accept should return ENFILE not EMFILE. # # Signed-off-by: David S. Miller # # net/socket.c # 2004/10/25 16:20:43-07:00 andrea@novell.com +1 -1 # [NET]: Accept should return ENFILE not EMFILE. # # ChangeSet # 2004/10/25 16:10:45-07:00 herbert@gondor.apana.org.au # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_output.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -4 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/route.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +5 -6 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ip6_output.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +9 -12 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_output.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -4 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/route.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -3 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_ECN.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_standalone.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_fw_compat.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -5 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/decnet/dn_route.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -8 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/dst.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -2 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +12 -12 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/bridge/br_netfilter.c # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -2 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/ipv6.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/ip6_route.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/ip.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -2 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/dst.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +2 -2 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/linux/netdevice.h # 2004/10/25 16:10:25-07:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Give skb_checksum_help() an skb_buff * again # # Since skb_checksum_help has been using pskb_expand_head for a while # now without any ill effects, I thought it would be a good idea to # remove the double pointers from it and its callers. # # This is what the following patch does. The only 'rider' bit is the # removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding # assignment was only added because the following function oopsed so # there is no point in doing BUG_ON. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 16:05:16-07:00 laforge@netfilter.org # [NETFILTER]: fix ipt_ULOG bogus error messages # # Please apply the fix below, it addresses some bogus error messages # ('error during NLMSG_PUT') that were printed because of a wrong # calculation of the 'len' parameter to NLMSG_PUT(). # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_ULOG.c # 2004/10/25 16:04:57-07:00 laforge@netfilter.org +4 -2 # [NETFILTER]: fix ipt_ULOG bogus error messages # # Please apply the fix below, it addresses some bogus error messages # ('error during NLMSG_PUT') that were printed because of a wrong # calculation of the 'len' parameter to NLMSG_PUT(). # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 15:48:28-07:00 davem@nuts.davemloft.net # [NETFILTER]: ip_ct_attach decl got removed by accident. # # Signed-off-by: David S. Miller # # include/linux/netfilter.h # 2004/10/25 15:47:56-07:00 davem@nuts.davemloft.net +2 -0 # [NETFILTER]: ip_ct_attach decl got removed by accident. # # ChangeSet # 2004/10/25 15:43:30-07:00 hch@lst.de # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # net/ipv6/netfilter/ip6_tables.c # 2004/10/25 15:43:11-07:00 hch@lst.de +1 -2 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_tables.c # 2004/10/25 15:43:11-07:00 hch@lst.de +1 -2 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # net/ipv4/netfilter/arp_tables.c # 2004/10/25 15:43:11-07:00 hch@lst.de +1 -2 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # include/linux/netfilter_ipv4/ip_tables.h # 2004/10/25 15:43:11-07:00 hch@lst.de +0 -5 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # include/linux/netfilter.h # 2004/10/25 15:43:11-07:00 hch@lst.de +0 -8 # [NETFILTER]: Make *_find_target_lock routines static. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 15:38:06-07:00 bdschuym@pandora.be # [EBTABLES]: Add wildcard support for interface matching. # # Due to an old braindead decision, ebtables doesn't yet support the # wildcard '+' for matching interface names. The following patch removes # this nuissance and is backwards compatible. # # Signed-off-by: David S. Miller # # net/bridge/netfilter/ebtables.c # 2004/10/25 15:37:34-07:00 bdschuym@pandora.be +7 -1 # [EBTABLES]: Add wildcard support for interface matching. # # Due to an old braindead decision, ebtables doesn't yet support the # wildcard '+' for matching interface names. The following patch removes # this nuissance and is backwards compatible. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/25 15:21:01-07:00 torvalds@ppc970.osdl.org # Allow BKL re-acquire to fail, causing us to re-schedule. # # This allows for low-latency BKL contention even with # preemption. Previously, since preemption is disabled # over context switches, re-acquiring the kernel lock when # resuming a process would be non-preemtible. # # lib/kernel_lock.c # 2004/10/25 15:20:55-07:00 torvalds@ppc970.osdl.org +34 -10 # Allow BKL re-acquire to fail, causing us to re-schedule. # # This allows for low-latency BKL contention even with # preemption. Previously, since preemption is disabled # over context switches, re-acquiring the kernel lock when # resuming a process would be non-preemtible. # # kernel/sched.c # 2004/10/25 15:20:55-07:00 torvalds@ppc970.osdl.org +5 -2 # Allow BKL re-acquire to fail, causing us to re-schedule. # # This allows for low-latency BKL contention even with # preemption. Previously, since preemption is disabled # over context switches, re-acquiring the kernel lock when # resuming a process would be non-preemtible. # # include/linux/smp_lock.h # 2004/10/25 15:20:55-07:00 torvalds@ppc970.osdl.org +19 -5 # Allow BKL re-acquire to fail, causing us to re-schedule. # # This allows for low-latency BKL contention even with # preemption. Previously, since preemption is disabled # over context switches, re-acquiring the kernel lock when # resuming a process would be non-preemtible. # # ChangeSet # 2004/10/25 10:24:04-07:00 hannal@us.ibm.com # [PATCH] add 'for_each_pci_dev()' helper macro # # Jeff already mistakenly sent in a user of this macro, so we should # probably add the macro itself too. # # Signed-off-by: Hanna Linder # Signed-off-by: Linus Torvalds # # include/linux/pci.h # 2004/10/05 15:56:26-07:00 hannal@us.ibm.com +1 -0 # add 'for_each_pci_dev()' helper macro # # ChangeSet # 2004/10/25 09:20:09-07:00 torvalds@ppc970.osdl.org # ppc64: make G5 setup compile again # # The stop_self thing is accessed unconditionally from pSeries_setup.c # # arch/ppc64/kernel/rtas.c # 2004/10/25 09:20:03-07:00 torvalds@ppc970.osdl.org +0 -2 # ppc64: make G5 setup compile again # # The stop_self thing is accessed unconditionally from pSeries_setup.c # # ChangeSet # 2004/10/25 08:24:40-07:00 mingo@redhat.com # [PATCH] Avoid small irq preemption recursion window # # This will get rid of the stack recursion possibility that can occur if # an IRQ happens to hit the IRQ return path right after we've reset # preempt_count() to 0 and are about to disable interrupts again. # Trivially fixed by just moving the preempt count update to inside the # interrupt disable. # # This makes the current PREEMPT_ACTIVE method fully work for IRQ # recursions. # # arch/i386/kernel/entry.S # 2004/10/24 17:00:00-07:00 mingo@redhat.com +1 -1 # Avoid small irq preemption recursion window # # ChangeSet # 2004/10/25 08:10:39-07:00 linux@dominikbrodowski.de # [PATCH] Fix PCMCIA duplicate pc_debug names # # Avoid naming confusion concerning "pc_debug" which is widely used by drivers # be renaming the PCMCIA "driver services" variant to ds_pc_debug. The module # parameter stays the same, thanks to module_param_named(). # # Signed-off-by: Dominik Brodowski # Signed-off-by: Linus Torvalds # # drivers/pcmcia/ds.c # 2004/10/22 13:32:11-07:00 linux@dominikbrodowski.de +3 -3 # Fix PCMCIA duplicate pc_debug names # # drivers/pcmcia/bulkmem.c # 2004/10/22 13:33:05-07:00 linux@dominikbrodowski.de +2 -2 # Fix PCMCIA duplicate pc_debug names # # ChangeSet # 2004/10/25 08:03:24-07:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/davem/net-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # drivers/video/aty/atyfb_base.c # 2004/10/25 08:03:20-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/10/25 03:37:14-04:00 jgarzik@pobox.com # Cset exclude: elf@buici.com|ChangeSet|20040920183610|08290 # # Revert smc91x driver changeset, since this is already covered by other # smc91x updates already upstream. # # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.h # 2004/10/25 03:37:12-04:00 jgarzik@pobox.com +0 -0 # Exclude # # ChangeSet # 2004/10/25 03:34:39-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/set-config # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/wireless/netwave_cs.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/wan/lmc/lmc_main.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/sk_mca.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/ibmlana.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/media/dvb/dvb-core/dvb_net.c # 2004/10/25 03:34:36-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 03:33:45-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/defxx # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/defxx.c # 2004/10/25 03:33:42-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 03:30:48-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/acenic # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/acenic.c # 2004/10/25 03:30:45-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/25 03:27:44-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/e100 # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/e100.c # 2004/10/25 03:27:41-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/24 21:44:39-07:00 geert@linux-m68k.org # [PATCH] Atyfb: kill assignment warnings on Atari due to __iomem # # Signed-off-by: Linus Torvalds # # drivers/video/aty/atyfb_base.c # 2004/10/24 03:59:07-07:00 geert@linux-m68k.org +3 -3 # Atyfb: kill assignment warnings on Atari due to __iomem # # ChangeSet # 2004/10/24 21:44:26-07:00 geert@linux-m68k.org # [PATCH] SCx200_ACB depends on PCI # # SCx200_ACB is a PCI driver and thus should depend on PCI # # Signed-off-by: Linus Torvalds # # drivers/i2c/busses/Kconfig # 2004/10/24 03:50:17-07:00 geert@linux-m68k.org +1 -1 # SCx200_ACB depends on PCI # # ChangeSet # 2004/10/24 21:44:14-07:00 geert@linux-m68k.org # [PATCH] Cyclades assignment warning # # Remove unneeded cast that causes a warning (cy_isa_addresses is an array # of unsigned ints). # # Signed-off-by: Linus Torvalds # # drivers/char/cyclades.c # 2004/10/24 03:47:52-07:00 geert@linux-m68k.org +1 -1 # Cyclades assignment warning # # ChangeSet # 2004/10/24 21:44:02-07:00 geert@linux-m68k.org # [PATCH] NTFS: missing #include # # fs/ntfs/compress.c calls v{malloc,free}() without including # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # fs/ntfs/compress.c # 2004/10/24 02:58:41-07:00 geert@linux-m68k.org +1 -0 # NTFS: missing #include # # ChangeSet # 2004/10/24 21:43:49-07:00 bgerst@quark.didntduck.org # [PATCH] mem leak in tty_io.c # # The recent patch to clean up user accesses introduced a memory leak. If # write_buf is reallocated, the old buffer isn't freed. Also, since kfree # can take nulls, I removed the if from the other kfree. # # Signed-off-by: Linus Torvalds # # drivers/char/tty_io.c # 2004/10/22 07:36:11-07:00 bgerst@quark.didntduck.org +2 -2 # mem leak in tty_io.c # # ChangeSet # 2004/10/24 21:09:41-07:00 benh@kernel.crashing.org # [PATCH] ppc64: remove unused cruft from prom.h # # This patch removes some bogus struct definitions from prom.h that aren't # used anymore after the other pending ppc64 patches have been applied. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/prom.h # 2004/10/24 18:55:43-07:00 benh@kernel.crashing.org +0 -27 # ppc64: remove unused cruft from prom.h # # ChangeSet # 2004/10/24 21:09:28-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Some cleanups of prom_init.c # # This patch does a few cleanups of arch/ppc64/kernel/prom_init.c, making # the RTAS instanciation code more readable & more robust, fixing a bug # in the code bringing in additional CPUs (would work with IBM firmware, # but not with another firmware of an upcoming platform), plus remove some # old commented out cruft left-over from the big cleanup. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom_init.c # 2004/10/24 18:51:05-07:00 benh@kernel.crashing.org +41 -38 # ppc64: Some cleanups of prom_init.c # # ChangeSet # 2004/10/24 21:09:16-07:00 benh@kernel.crashing.org # [PATCH] ppc64: cleanup/split SMP code # # Splits arch/ppc64/kernel/smp.c into 3 different files, smp.c, pSeries_smp.c and # iSeries_smp.c, thus removing most of the #define mess in those files and making # it easier to add a new platform. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/smp.h # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +9 -3 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/pSeries_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +393 -0 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/iSeries_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +151 -0 # ppc64: cleanup/split SMP code # # include/asm-ppc64/machdep.h # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +2 -0 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +16 -452 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/setup.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +7 -0 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/pmac_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +19 -13 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/pSeries_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/pSeries_smp.c # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +15 -0 # ppc64: cleanup/split SMP code # # arch/ppc64/kernel/iSeries_smp.c # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/iSeries_smp.c # # arch/ppc64/kernel/Makefile # 2004/10/24 18:29:39-07:00 benh@kernel.crashing.org +2 -0 # ppc64: cleanup/split SMP code # # ChangeSet # 2004/10/24 21:09:03-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Rework PCI <-> OF node matching # # This patch reworks the code that deals with matching PCI devices # with Open Firmware device nodes. This code made several incorrect # assumptions and can be simplified significantly. The main functional # difference now is that PHBs are no longer special cased, but that # shouldn't cause any specific problem. # # It also fixes a problem where u3_iommu.c wouldn't work for PCI # devices that lacked a matching OF device node. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/u3_iommu.c # 2004/10/24 18:12:22-07:00 benh@kernel.crashing.org +6 -0 # ppc64: Rework PCI <-> OF node matching # # arch/ppc64/kernel/pci_dn.c # 2004/10/24 18:15:30-07:00 benh@kernel.crashing.org +34 -53 # ppc64: Rework PCI <-> OF node matching # # ChangeSet # 2004/10/24 21:08:51-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Some small pci fixes # # This patch fixes a few issues in the ppc64 pci code, notably some # incorrect parsing of Open Firmware "ranges" when setting up host # bridge resources that would cause a problem with some future # platforms, a default mapping of the ISA IOs if the OF "isa" node # lacks a "ranges" property, and a safeguard in pci_scan_all_fns() # in case a pci<->OF node mapping cannot be established. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pci.c # 2004/10/24 18:04:50-07:00 benh@kernel.crashing.org +9 -5 # ppc64: Some small pci fixes # # ChangeSet # 2004/10/24 21:08:39-07:00 benh@kernel.crashing.org # [PATCH] ppc64: cleanups of ppc64 pci.c # # This patch applies on top of previously posted "ppc64: Move PCI IO mapping # from pSeries_pci.c to pci.c". # # It does cosmetic cleanups & add some debug macros to pci.c without actually # changing any functionality. Further patches against ppc64 pci.c that I'll # post will be against a file already patched with this one. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pci.c # 2004/10/24 17:36:51-07:00 benh@kernel.crashing.org +31 -19 # ppc64: cleanups of ppc64 pci.c # # ChangeSet # 2004/10/24 21:08:24-07:00 benh@kernel.crashing.org # [PATCH] ppc64: clean up existence-check of legacy ISAdevices # # My previous patch exposed the internals of the ppc_md. data structure # to drivers, which wasn't nice, this new patch cleans that up. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/machdep.h # 2004/10/23 00:41:21-07:00 benh@kernel.crashing.org +3 -0 # ppc64: clean up existence-check of legacy ISAdevices # # include/asm-ppc64/io.h # 2004/10/23 00:37:07-07:00 benh@kernel.crashing.org +5 -1 # ppc64: clean up existence-check of legacy ISAdevices # # include/asm-ppc64/floppy.h # 2004/10/22 20:22:20-07:00 benh@kernel.crashing.org +1 -0 # ppc64: clean up existence-check of legacy ISAdevices # # drivers/input/serio/i8042-io.h # 2004/10/23 00:00:53-07:00 benh@kernel.crashing.org +9 -2 # ppc64: clean up existence-check of legacy ISAdevices # # drivers/block/floppy.c # 2004/10/23 00:04:20-07:00 benh@kernel.crashing.org +7 -0 # ppc64: clean up existence-check of legacy ISAdevices # # arch/ppc64/kernel/setup.c # 2004/10/23 00:09:58-07:00 benh@kernel.crashing.org +8 -0 # ppc64: clean up existence-check of legacy ISAdevices # # arch/ppc64/kernel/pmac_setup.c # 2004/10/22 20:22:20-07:00 benh@kernel.crashing.org +10 -0 # ppc64: clean up existence-check of legacy ISAdevices # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/22 20:22:20-07:00 benh@kernel.crashing.org +26 -0 # ppc64: clean up existence-check of legacy ISAdevices # # arch/ppc64/kernel/pSeries_pci.c # 2004/10/22 20:22:20-07:00 benh@kernel.crashing.org +0 -13 # ppc64: clean up existence-check of legacy ISAdevices # # ChangeSet # 2004/10/24 21:08:12-07:00 benh@kernel.crashing.org # [PATCH] ppc64: properly build list of legacy serial ports from OF # # This patch adds a ppc64 implementation of the routine providing # the list of default 8250 serial ports. It provides a empty list # by default unless the platform code fills it, and it provides # a generic function for user by Open Firmware based machines which # fills the list based on serial ports found in the OF device-tree. # # It depends on the previous patch adding the generic support for # this to the 8250 driver. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/udbg.h # 2004/10/22 18:43:59-07:00 benh@kernel.crashing.org +1 -1 # ppc64: properly build list of legacy serial ports from OF # # include/asm-ppc64/serial.h # 2004/10/22 18:43:59-07:00 benh@kernel.crashing.org +6 -106 # ppc64: properly build list of legacy serial ports from OF # # arch/ppc64/kernel/udbg.c # 2004/10/22 18:43:59-07:00 benh@kernel.crashing.org +15 -2 # ppc64: properly build list of legacy serial ports from OF # # arch/ppc64/kernel/setup.c # 2004/10/22 19:30:58-07:00 benh@kernel.crashing.org +182 -0 # ppc64: properly build list of legacy serial ports from OF # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/22 18:43:59-07:00 benh@kernel.crashing.org +5 -71 # ppc64: properly build list of legacy serial ports from OF # # ChangeSet # 2004/10/24 21:08:00-07:00 benh@kernel.crashing.org # [PATCH] 8250: Let arch provide the list of leagacy ports # # This patch adds an optional callback for the 8250 driver to request the # list of legacy port via a function call instead of relying on a #define # of an array. # # This finally allows to fix the problem of platforms like ppc and ppc64 # for which the same kernel can boot machines with and without a 8250, and # is necessary to properly deal with a new platform coming to ppc64 which # has a 8250 but with different irq numbers. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/linux/8250.h # 2004/10/22 16:03:31-07:00 benh@kernel.crashing.org +0 -0 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/serial_cs.c # 2004/10/22 16:06:40-07:00 benh@kernel.crashing.org +1 -2 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/au1x00_uart.c # 2004/10/22 16:06:15-07:00 benh@kernel.crashing.org +1 -1 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/8250_pnp.c # 2004/10/22 16:05:53-07:00 benh@kernel.crashing.org +1 -2 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/8250_pci.c # 2004/10/22 16:33:40-07:00 benh@kernel.crashing.org +2 -2 # 8250: Let arch provide the list of leagacy ports # # drivers/serial/8250.c # 2004/10/22 16:31:26-07:00 benh@kernel.crashing.org +30 -12 # 8250: Let arch provide the list of leagacy ports # # ChangeSet # 2004/10/24 21:03:45-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Rewrite the openpic driver # # This patch replaces the open_pic IRQ controller driver with a new # version rewritten from scratch, called "mpic" (this is the name of # IBM's open_pic implementation and also the only one actually used # on any platform). # # It is smaller, hopefully more readable, supports the various variants # of the cell in a single driver (open_pic_u3.c is gone), and adds # optional support for the workaround of U3 mpic beeing used along with # IO-APICs on HyperTransport (the eval board will uses that, among # others). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/mpic.h # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +267 -0 # # arch/ppc64/kernel/mpic.c # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +859 -0 # # include/asm-ppc64/smp.h # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +4 -0 # ppc64: Rewrite the openpic driver # # include/asm-ppc64/irq.h # 2004/10/22 18:44:19-07:00 benh@kernel.crashing.org +13 -0 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/xics.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +1 -1 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/smp.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +19 -15 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/prom_init.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +0 -1 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/prom.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +4 -4 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/pmac_smp.c # 2004/10/22 18:47:24-07:00 benh@kernel.crashing.org +7 -7 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/pmac_setup.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +23 -48 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/pSeries_setup.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +80 -22 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/pSeries_pci.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +4 -3 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/mpic.h # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/mpic.h # # arch/ppc64/kernel/mpic.c # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/mpic.c # # arch/ppc64/kernel/i8259.h # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +2 -2 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/i8259.c # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +17 -3 # ppc64: Rewrite the openpic driver # # arch/ppc64/kernel/Makefile # 2004/10/22 18:44:03-07:00 benh@kernel.crashing.org +3 -3 # ppc64: Rewrite the openpic driver # # BitKeeper/deleted/.del-open_pic_u3.c~d4b087c3ee7ad834 # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # Delete: arch/ppc64/kernel/open_pic_u3.c # # BitKeeper/deleted/.del-open_pic.h~3394270b8d4236a7 # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # Delete: arch/ppc64/kernel/open_pic.h # # BitKeeper/deleted/.del-open_pic.c~be95ffa1bf03a15a # 2004/10/24 21:03:38-07:00 benh@kernel.crashing.org +0 -0 # Delete: arch/ppc64/kernel/open_pic.c # # BitKeeper/deleted/.del-open_pic_defs.h~e0e1008090653957 # 2004/10/24 21:03:37-07:00 benh@kernel.crashing.org +0 -0 # Delete: arch/ppc64/kernel/open_pic_defs.h # # ChangeSet # 2004/10/24 21:03:26-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix pSeries secondary CPU setup # # This patch fixes the setup of the secondary CPU(s) on pSeries, # on non-LPAR platforms, especially with 970 CPUs, we need to copy # some of the HID registers from CPU0 to the other ones as soon as # they reach the early asm code. The PowerMac SMP entry did it # already, but not the pSeries one. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/smp.c # 2004/10/19 00:19:36-07:00 benh@kernel.crashing.org +0 -3 # ppc64: Fix pSeries secondary CPU setup # # arch/ppc64/kernel/head.S # 2004/10/19 00:18:43-07:00 benh@kernel.crashing.org +28 -20 # ppc64: Fix pSeries secondary CPU setup # # arch/ppc64/kernel/cpu_setup_power4.S # 2004/10/19 00:37:12-07:00 benh@kernel.crashing.org +9 -0 # ppc64: Fix pSeries secondary CPU setup # # ChangeSet # 2004/10/24 17:40:16-07:00 benh@kernel.crashing.org # [PATCH] ppc64: Move PCI IO mapping from pSeries_pci.c to pci.c # # This patch moves some of the routines responsible for dealing # with the mapping of PCI host bridges IO space from pSeries to # the generic ppc64 pci code. PowerMac doesn't use it currently, # but a new platform will soon. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pci-bridge.h # 2004/10/24 17:30:23-07:00 benh@kernel.crashing.org +2 -0 # ppc64: Move PCI IO mapping from pSeries_pci.c to pci.c # # arch/ppc64/kernel/pci.c # 2004/10/24 17:28:50-07:00 benh@kernel.crashing.org +90 -0 # ppc64: Move PCI IO mapping from pSeries_pci.c to pci.c # # arch/ppc64/kernel/pSeries_pci.c # 2004/10/24 17:28:40-07:00 benh@kernel.crashing.org +0 -86 # ppc64: Move PCI IO mapping from pSeries_pci.c to pci.c # # ChangeSet # 2004/10/24 17:36:12-07:00 benh@kernel.crashing.org # [PATCH] Fix msleep to sleep _at_least_ the requested amount # # Makes sure msleep() sleeps at least the amount provided, since # schedule_timeout() doesn't guarantee a full jiffy. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # kernel/timer.c # 2004/10/22 16:16:10-07:00 benh@kernel.crashing.org +2 -2 # Fix msleep to sleep _at_least_ the requested amount # # ChangeSet # 2004/10/24 16:44:07-07:00 torvalds@evo.osdl.org # Fix broken intel8x0.c ALSA "merge" # # The file didn't compile, and the ALSA CVS tree # had dropped the bitfield signedness fixes. # # sound/pci/intel8x0.c # 2004/10/24 16:43:57-07:00 torvalds@evo.osdl.org +12 -11 # Fix broken intel8x0.c ALSA "merge" # # The file didn't compile, and the ALSA CVS tree # had dropped the bitfield signedness fixes. # # ChangeSet # 2004/10/24 16:24:27-07:00 torvalds@ppc970.osdl.org # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # lib/kernel_lock.c # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +102 -0 # # lib/kernel_lock.c # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/lib/kernel_lock.c # # lib/Makefile # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +1 -0 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # kernel/sched.c # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +0 -15 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # init/Kconfig # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +5 -0 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # include/linux/spinlock.h # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +2 -2 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # include/linux/smp_lock.h # 2004/10/24 16:24:20-07:00 torvalds@ppc970.osdl.org +16 -42 # Un-inline the big kernel lock. # # Now that spinlocks are uninlined, it is silly to keep the # BKL inlined. And this should make it a lot easier for people # to play around with variations on the locking (ie Ingo's # semaphores etc). # # ChangeSet # 2004/10/25 01:11:17+02:00 pablo@eurodev.net # [NETFILTER]: fix stats in __ip_conntrack_confirm # # net_rx_softirq can preempt the calling process while incrementing the stats. # I think that we can fix this moving both CONNTRACK_STAT_INC to the locked # section. # # Signed-off-by: Pablo Neira Ayuso # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/10/25 01:11:10+02:00 pablo@eurodev.net +3 -2 # [NETFILTER]: fix stats in __ip_conntrack_confirm # # net_rx_softirq can preempt the calling process while incrementing the stats. # I think that we can fix this moving both CONNTRACK_STAT_INC to the locked # section. # # Signed-off-by: Pablo Neira Ayuso # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/25 00:46:55+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Introduce skb_header_pointer() to hbh match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_hbh.c # 2004/10/25 00:46:48+02:00 yasuyuki.kozakai@toshiba.co.jp +30 -20 # [NETFILTER]: Introduce skb_header_pointer() to hbh match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/25 00:45:22+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Introduce skb_header_pointer() to dst match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_dst.c # 2004/10/25 00:45:16+02:00 yasuyuki.kozakai@toshiba.co.jp +30 -20 # [NETFILTER]: Introduce skb_header_pointer() to dst match # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/25 00:43:08+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Fix multiple bugs in hbh match # # This patch fixes the following bugs in ip6t_hbh.c. # - The cast of the pointer to the next IPv6 extension header is wrong. # - hdrlen may underflow. # - (u16)*optdesc causes to alignment problem. # - The calculation of the offset to next option is wrong. In the case # that the type isn't 0, it should be "Opt Data Len" field + 2 # (see RFC2460). # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_hbh.c # 2004/10/25 00:43:01+02:00 yasuyuki.kozakai@toshiba.co.jp +38 -36 # [NETFILTER]: Fix multiple bugs in hbh match # # This patch fixes the following bugs in ip6t_hbh.c. # - The cast of the pointer to the next IPv6 extension header is wrong. # - hdrlen may underflow. # - (u16)*optdesc causes to alignment problem. # - The calculation of the offset to next option is wrong. In the case # that the type isn't 0, it should be "Opt Data Len" field + 2 # (see RFC2460). # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/25 00:39:13+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Fix multiple bugs in dst match # # This patch fixes the following bugs in ip6t_dst.c. # # - ".me = THIS_MODULE" is missing # - The cast of the pointer to the next IPv6 extension header is wrong. # - hdrlen may underflow. # - (u16)*optdesc causes to alignment problem. # - The calculation of the offset to next option is wrong. In the case # that the type isn't 0, it should be "Opt Data Len" field + 2 # (see RFC2460). # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_dst.c # 2004/10/25 00:39:07+02:00 yasuyuki.kozakai@toshiba.co.jp +39 -37 # [NETFILTER]: Fix multiple bugs in dst match # # This patch fixes the following bugs in ip6t_dst.c. # # - ".me = THIS_MODULE" is missing # - The cast of the pointer to the next IPv6 extension header is wrong. # - hdrlen may underflow. # - (u16)*optdesc causes to alignment problem. # - The calculation of the offset to next option is wrong. In the case # that the type isn't 0, it should be "Opt Data Len" field + 2 # (see RFC2460). # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/24 15:20:06-07:00 adaplas@hotpop.com # [PATCH] fbdev: Fix software blanking code # # The code in fbmem.c:fb_blank() is broken. For drivers without an fb_blank # hook, an FBIO_BLANK ioctl will produce wrong colors or will segfault. # # Signed-off-by: Antonino Daplas # Signed-off-by: Linus Torvalds # # drivers/video/fbmem.c # 2004/10/24 14:45:24-07:00 adaplas@hotpop.com +5 -3 # fbdev: Fix software blanking code # # ChangeSet # 2004/10/24 13:34:51-07:00 torvalds@ppc970.osdl.org # Annotate the trivial unconditional lock/unlock functions on SMP. # # This does _not_ handle the conditional ones (lock_kernel and the # trylock variants), so there will be a fair number of context # error warnings with this. However, the warnings are disabled by # default in sparse - you have to use "-Wcontext" to see them. # # include/linux/spinlock.h # 2004/10/24 13:34:44-07:00 torvalds@ppc970.osdl.org +31 -25 # Annotate the trivial unconditional lock/unlock functions on SMP. # # This does _not_ handle the conditional ones (lock_kernel and the # trylock variants), so there will be a fair number of context # error warnings with this. However, the warnings are disabled by # default in sparse - you have to use "-Wcontext" to see them. # # ChangeSet # 2004/10/24 13:33:07-07:00 torvalds@ppc970.osdl.org # Start supporting lock context annotations. # # This just sets up the portability defines. # # include/linux/compiler.h # 2004/10/24 13:33:00-07:00 torvalds@ppc970.osdl.org +8 -0 # Start supporting lock context annotations. # # This just sets up the portability defines. # # ChangeSet # 2004/10/24 12:21:08-07:00 rth@twiddle.net # [PATCH] Add __ioremap # # I hadn't realized this was supposed to be an official interface. # Or maybe it's not, but the fb drivers all use it. Anyway... # # include/asm-alpha/io.h # 2004/10/23 11:04:06-07:00 rth@twiddle.net +6 -0 # Add __ioremap # # ChangeSet # 2004/10/24 12:20:55-07:00 ink@jurassic.park.msu.ru # [PATCH] alpha: bootp fixes # # - redefine "printk" as "srm_printk" for bootstrappers; # - fix stack corruption problem with bootp/bootpz loaders and older # SRM consoles. # # arch/alpha/boot/misc.c # 2004/10/24 11:31:29-07:00 ink@jurassic.park.msu.ru +0 -12 # alpha: bootp fixes # # arch/alpha/boot/head.S # 2004/10/24 11:30:59-07:00 ink@jurassic.park.msu.ru +21 -0 # alpha: bootp fixes # # arch/alpha/boot/bootpz.c # 2004/10/24 11:30:59-07:00 ink@jurassic.park.msu.ru +14 -11 # alpha: bootp fixes # # arch/alpha/boot/bootp.c # 2004/10/24 11:30:59-07:00 ink@jurassic.park.msu.ru +12 -7 # alpha: bootp fixes # # arch/alpha/boot/bootloader.lds # 2004/10/24 11:30:59-07:00 ink@jurassic.park.msu.ru +1 -0 # alpha: bootp fixes # # ChangeSet # 2004/10/24 12:20:41-07:00 ink@jurassic.park.msu.ru # [PATCH] alpha: fix CIA IO # # The high order bits of the input address should be cleared only after # IO type and base are determined. # # include/asm-alpha/core_cia.h # 2004/10/24 09:52:42-07:00 ink@jurassic.park.msu.ru +6 -6 # alpha: fix CIA IO # # ChangeSet # 2004/10/24 12:20:28-07:00 ink@jurassic.park.msu.ru # [PATCH] alpha: fix sparse warnings # # - add missing "__user" annotations in csum_partial_copy.c; # - make io_remap_page_range more readable and fix a warning. # # include/asm-alpha/pgtable.h # 2004/10/24 11:10:55-07:00 ink@jurassic.park.msu.ru +6 -2 # alpha: fix sparse warnings # # arch/alpha/lib/csum_partial_copy.c # 2004/10/24 10:25:20-07:00 ink@jurassic.park.msu.ru +4 -2 # alpha: fix sparse warnings # # ChangeSet # 2004/10/24 16:16:40+02:00 tgraf@suug.ch # [NETFILTER]: Fix warning in CONNMARK # # Signed-off-by: Thomas Graf # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ipt_CONNMARK.c # 2004/10/24 16:16:34+02:00 tgraf@suug.ch +1 -1 # [NETFILTER]: Fix warning in CONNMARK # # Signed-off-by: Thomas Graf # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/24 16:11:28+02:00 kaber@coreworks.de # Merge coreworks.de:/home/kaber/src/bk-repos/net-2.6 # into coreworks.de:/home/kaber/src/nf/nf-2.6 # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/10/24 16:11:24+02:00 kaber@coreworks.de +0 -0 # Auto merged # # ChangeSet # 2004/10/23 23:19:19+02:00 bzolnier@trik.(none) # [ide] slc90e66: kill /proc/ide/slc90e66 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/slc90e66.c # 2004/10/23 23:18:50+02:00 bzolnier@trik.(none) +1 -110 # [ide] slc90e66: kill /proc/ide/slc90e66 # # ChangeSet # 2004/10/23 23:16:57+02:00 bzolnier@trik.(none) # [ide] serverworks: kill /proc/ide/svwks # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/serverworks.h # 2004/10/23 23:16:37+02:00 bzolnier@trik.(none) +0 -2 # [ide] serverworks: kill /proc/ide/svwks # # drivers/ide/pci/serverworks.c # 2004/10/23 23:16:37+02:00 bzolnier@trik.(none) +0 -168 # [ide] serverworks: kill /proc/ide/svwks # # ChangeSet # 2004/10/23 23:13:46+02:00 bzolnier@trik.(none) # [ide] sc1200: kill /proc/ide/sc1200 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/sc1200.c # 2004/10/23 23:13:25+02:00 bzolnier@trik.(none) +0 -65 # [ide] sc1200: kill /proc/ide/sc1200 # # ChangeSet # 2004/10/23 23:08:13+02:00 bzolnier@trik.(none) # [ide] piix: kill /proc/ide/piix # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/piix.h # 2004/10/23 23:07:58+02:00 bzolnier@trik.(none) +0 -4 # [ide] piix: kill /proc/ide/piix # # drivers/ide/pci/piix.c # 2004/10/23 23:07:58+02:00 bzolnier@trik.(none) +0 -167 # [ide] piix: kill /proc/ide/piix # # ChangeSet # 2004/10/23 23:05:06+02:00 bzolnier@trik.(none) # [ide] pdc202xx_old: kill /proc/ide/pdc202xx # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/pdc202xx_old.h # 2004/10/23 23:04:45+02:00 bzolnier@trik.(none) +0 -37 # [ide] pdc202xx_old: kill /proc/ide/pdc202xx # # drivers/ide/pci/pdc202xx_old.c # 2004/10/23 23:04:45+02:00 bzolnier@trik.(none) +3 -127 # [ide] pdc202xx_old: kill /proc/ide/pdc202xx # # ChangeSet # 2004/10/23 22:56:34+02:00 bzolnier@trik.(none) # [ide] pdc202xx_new: kill /proc/ide/pdcnew # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/pdc202xx_new.h # 2004/10/23 22:56:18+02:00 bzolnier@trik.(none) +0 -2 # [ide] pdc202xx_new: kill /proc/ide/pdcnew # # drivers/ide/pci/pdc202xx_new.c # 2004/10/23 22:56:18+02:00 bzolnier@trik.(none) +0 -64 # [ide] pdc202xx_new: kill /proc/ide/pdcnew # # ChangeSet # 2004/10/23 22:54:07+02:00 bzolnier@trik.(none) # [ide] hpt366: kill /proc/ide/hpt366 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/hpt366.h # 2004/10/23 22:53:46+02:00 bzolnier@trik.(none) +0 -2 # [ide] hpt366: kill /proc/ide/hpt366 # # drivers/ide/pci/hpt366.c # 2004/10/23 22:53:46+02:00 bzolnier@trik.(none) +1 -71 # [ide] hpt366: kill /proc/ide/hpt366 # # ChangeSet # 2004/10/23 22:51:31+02:00 bzolnier@trik.(none) # [ide] cs5530: kill /proc/ide/cs5530 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/cs5530.c # 2004/10/23 22:51:16+02:00 bzolnier@trik.(none) +0 -58 # [ide] cs5530: kill /proc/ide/cs5530 # # ChangeSet # 2004/10/23 22:49:23+02:00 bzolnier@trik.(none) # [ide] cs5520: kill /proc/ide/cs5520 # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/cs5520.c # 2004/10/23 22:48:59+02:00 bzolnier@trik.(none) +5 -69 # [ide] cs5520: kill /proc/ide/cs5520 # # ChangeSet # 2004/10/23 22:46:33+02:00 bzolnier@trik.(none) # [ide] atiixp: kill /proc/ide/atiixp # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/atiixp.c # 2004/10/23 22:46:12+02:00 bzolnier@trik.(none) +0 -118 # [ide] atiixp: kill /proc/ide/atiixp # # ChangeSet # 2004/10/23 22:43:33+02:00 bzolnier@trik.(none) # [ide] aec62xx: kill /proc/ide/aec62xx # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/aec62xx.h # 2004/10/23 22:43:19+02:00 bzolnier@trik.(none) +0 -2 # [ide] aec62xx: kill /proc/ide/aec62xx # # drivers/ide/pci/aec62xx.c # 2004/10/23 22:43:19+02:00 bzolnier@trik.(none) +2 -108 # [ide] aec62xx: kill /proc/ide/aec62xx # # ChangeSet # 2004/10/23 10:07:23-07:00 roland@redhat.com # [PATCH] fix core-dump return code # # While looking at the signal.c coredumping BUG_ON race, I noticed a bug # (not directly related) in do_coredump. It was setting the "core dumped" # flag even when the format dumping hook failed (e.g. for memory # allocation failures). # # Signed-off-by: Linus Torvalds # # fs/exec.c # 2004/10/22 21:23:42-07:00 roland@redhat.com +2 -1 # fix core-dump return code # # ChangeSet # 2004/10/23 10:07:11-07:00 roland@redhat.com # [PATCH] Fix ptrace problem # # This is indeed a new bug, and it is not architecture-specific. In my # recent changes to close some race conditions, I overlooked the case of a # process using PTRACE_ATTACH on its own children. The new PT_ATTACHED flag # does not really mean "PTRACE_ATTACH was used", it means "PTRACE_ATTACH is # changing the ->parent link". # # This fixes the problem that Stephane Eranian program demonstrates. # # Signed-off-by: Roland McGrath # Signed-off-by: Linus Torvalds # # kernel/ptrace.c # 2004/10/22 21:43:20-07:00 roland@redhat.com +2 -1 # Fix ptrace problem # # ChangeSet # 2004/10/23 10:06:59-07:00 roland@redhat.com # [PATCH] Invalid BUG_ONs in signal.c # # Oh, duh. The race is obvious. Sorry for the confusion there. # # The BUG_ON's were useful for debugging, since they trigger on a lot of # errors, but they _also_ trigger on some unlikely (but valid) races. # # So just remove them - just fall through to the regular exit code after # core-dumping (which does everything right). # # Signed-off-by: Linus Torvalds # # kernel/signal.c # 2004/10/22 21:23:31-07:00 roland@redhat.com +8 -14 # Invalid BUG_ONs in signal.c # # ChangeSet # 2004/10/23 19:01:21+02:00 perex@suse.cz # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # # # Signed-off-by: Jaroslav Kysela # # sound/pci/rme96.c # 2004/10/23 11:12:56+02:00 perex@suse.cz +3 -4 # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # D:2004/10/23 17:12:56 # C:Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # F:pci/intel8x0.c:1.173->1.174 # F:pci/rme96.c:1.45->1.46 # F:pci/ice1712/ice1724.c:1.46->1.47 # F:pci/nm256/nm256.c:1.53->1.54 # L: # Signed-off-by: Jaroslav Kysela # # sound/pci/nm256/nm256.c # 2004/10/23 11:12:56+02:00 perex@suse.cz +1 -2 # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # D:2004/10/23 17:12:56 # C:Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # F:pci/intel8x0.c:1.173->1.174 # F:pci/rme96.c:1.45->1.46 # F:pci/ice1712/ice1724.c:1.46->1.47 # F:pci/nm256/nm256.c:1.53->1.54 # L: # Signed-off-by: Jaroslav Kysela # # sound/pci/intel8x0.c # 2004/10/23 11:12:56+02:00 perex@suse.cz +1 -2 # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # D:2004/10/23 17:12:56 # C:Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # F:pci/intel8x0.c:1.173->1.174 # F:pci/rme96.c:1.45->1.46 # F:pci/ice1712/ice1724.c:1.46->1.47 # F:pci/nm256/nm256.c:1.53->1.54 # L: # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/ice1724.c # 2004/10/23 11:12:56+02:00 perex@suse.cz +4 -5 # [ALSA] boot_devs removal - module_param_array() accepts NULL now # # D:2004/10/23 17:12:56 # C:Intel8x0 driver,RME96 driver,ICE1724 driver,NM256 driver # F:pci/intel8x0.c:1.173->1.174 # F:pci/rme96.c:1.45->1.46 # F:pci/ice1712/ice1724.c:1.46->1.47 # F:pci/nm256/nm256.c:1.53->1.54 # L: # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/10/23 09:49:57-07:00 chrisw@osdl.org # [PATCH] delay rq_lock acquisition in setscheduler # # Doing access control checks with rq_lock held can cause deadlock when # audit messages are created (via printk or audit infrastructure) which # trigger a wakeup and deadlock, as noted by both SELinux and SubDomain # folks. This patch will let the security checks happen w/out lock held, # then re-sample the p->policy in case it was raced. # # Originally from John Johansen , reworked by me. # AFAIK, this version drew no objections from Ingo or Andrea. # # From: John Johansen # Acked-by: Ingo Molnar # Signed-off-by: Chris Wright # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/10/21 09:41:23-07:00 chrisw@osdl.org +17 -16 # delay rq_lock acquisition in setscheduler # # ChangeSet # 2004/10/23 10:31:03+02:00 perex@suse.cz # Merge # # sound/pci/nm256/nm256.c # 2004/10/23 10:30:38+02:00 perex@suse.cz +1 -0 # SCCS merged # # sound/pci/intel8x0.c # 2004/10/23 10:29:06+02:00 perex@suse.cz +5 -2 # SCCS merged # # sound/parisc/harmony.c # 2004/10/23 10:26:42+02:00 perex@suse.cz +0 -9 # SCCS merged # # sound/parisc/Kconfig # 2004/10/23 10:26:24+02:00 perex@suse.cz +0 -3 # SCCS merged # # sound/usb/usx2y/usbusx2y.c # 2004/10/23 07:45:34+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/usb/usbaudio.c # 2004/10/23 07:45:34+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/rme9652/rme9652.c # 2004/10/23 07:45:33+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/rme9652/hdsp.c # 2004/10/23 07:45:33+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/mixart/mixart.c # 2004/10/23 07:45:33+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/korg1212/korg1212.c # 2004/10/23 07:45:32+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/ice1712/ice1724.c # 2004/10/23 07:45:32+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/ice1712/ice1712.c # 2004/10/23 07:45:32+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/via82xx.c # 2004/10/23 07:45:31+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/rme96.c # 2004/10/23 07:45:31+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/au88x0/au88x0.c # 2004/10/23 07:45:31+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/rme32.c # 2004/10/23 07:45:30+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/intel8x0m.c # 2004/10/23 07:45:30+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/es1968.c # 2004/10/23 07:45:29+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/ens1370.c # 2004/10/23 07:45:29+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/cs4281.c # 2004/10/23 07:45:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/bt87x.c # 2004/10/23 07:45:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/atiixp_modem.c # 2004/10/23 07:45:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/atiixp.c # 2004/10/23 07:45:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/isa/es18xx.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/drivers/dummy.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/seq/seq.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/oss/pcm_oss.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/memalloc.c # 2004/10/23 07:45:27+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/10/22 18:04:49-07:00 david-b@pacbell.net # [PATCH] Missed usb devices on boot # # This marks sets change_bits to all ones when bringing up a hub, since # not all hubs seem to send change events for devices that were plugged in # when the hub was reset. # # David Miller confirms this fixes his boot-time lost keyboard/mouse # problem # # drivers/usb/core/hub.c # 2004/10/22 01:56:46-07:00 david-b@pacbell.net +1 -0 # Missed usb devices on boot # # ChangeSet # 2004/10/22 16:07:33-07:00 davem@nuts.davemloft.net # [ATY]: Fix build on sparc after viro sparse changes. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/22 16:07:19-07:00 greg@kroah.com # Merge kroah.com:/home/greg/linux/BK/bleed-2.6 # into kroah.com:/home/greg/linux/BK/usb-2.6 # # drivers/usb/serial/console.c # 2004/10/22 16:07:14-07:00 greg@kroah.com +0 -2 # Auto merged # # drivers/video/aty/atyfb_base.c # 2004/10/22 16:07:03-07:00 davem@nuts.davemloft.net +4 -2 # [ATY]: Fix build on sparc after viro sparse changes. # # ChangeSet # 2004/10/22 15:54:52-07:00 david-b@pacbell.net # [PATCH] USB ehci: minor debug cleanups # # This updates debug messages, declaring that labels can be constant strings # and changing some old-school dbg() calls to driver model dev_dbg(). # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-sched.c # 2004/10/22 08:03:19-07:00 david-b@pacbell.net +7 -6 # USB ehci: minor debug cleanups # # drivers/usb/host/ehci-dbg.c # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +9 -8 # USB ehci: minor debug cleanups # # ChangeSet # 2004/10/22 15:54:23-07:00 david-b@pacbell.net # [PATCH] USB ehci: handle earlier endpoint_disable() # # The recent patch to scrub out ep0 state earlier (to get rid of some of # the enumeration problems that started with about 2.6.6) requires EHCI # to handle endpoint_disable() calls in a slightly different context. # # This makes those calls work when an endpoint's QH may still be on the # async schedule, rather than already unlinked. (The QH stays on the async # schedule for a few milliseconds after it's empty, since it's routine to # issue another request almost immediately.) # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-hcd.c # 2004/10/22 14:11:55-07:00 david-b@pacbell.net +37 -23 # USB ehci: handle earlier endpoint_disable() # # ChangeSet # 2004/10/22 15:53:58-07:00 david-b@pacbell.net # [PATCH] USB ehci: minor pci tweaks # # This has minor PCI tweaks for the EHCI driver: # # - If the (nonfunctional) AMD 8111 controller shows up, ignore it. # (Patch from Matt Dharm, with minor coding style tweaks). # # - Delete some code that interprets an EHCI capability code; it # should be a PCI capability instead. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-hcd.c # 2004/10/22 14:11:55-07:00 david-b@pacbell.net +11 -6 # USB ehci: minor pci tweaks # # ChangeSet # 2004/10/22 15:43:17-07:00 greg@kroah.com # hotplug: prevent skips in sequence number from happening # # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/10/22 15:42:52-07:00 greg@kroah.com +9 -8 # hotplug: prevent skips in sequence number from happening # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/22 15:25:42-07:00 davem@nuts.davemloft.net # [NETFILTER]: Fix ipt_hashlimit build with NETFILTER_DEBUG enabled. # # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_hashlimit.c # 2004/10/22 15:25:10-07:00 davem@nuts.davemloft.net +9 -12 # [NETFILTER]: Fix ipt_hashlimit build with NETFILTER_DEBUG enabled. # # ChangeSet # 2004/10/22 15:01:24-07:00 tgraf@suug.ch # [PKT_SCHED]: u32: Remove unused hgenerator field in tc_u_hnode. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/cls_u32.c # 2004/10/22 15:01:02-07:00 tgraf@suug.ch +0 -1 # [PKT_SCHED]: u32: Remove unused hgenerator field in tc_u_hnode. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/22 14:59:07-07:00 shemminger@osdl.org # [PKT_SCHED]: netem: use timer to handle packets not rescheduling # # Change the behaviour of netem's delayed packets queue to make it work better # with TBF and other rate control disciplines. # # Now, packets are put in the delayed queue and held there until the next timer interval, # then moved to the underlying qdisc. qlen is set to match the available packets in # the underlying discipline (and not count those waiting). Previously, netem would perturb # the rate control disciplines because of rescheduling and moving packets in # the dequeue handler. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/sched/sch_netem.c # 2004/10/22 14:58:48-07:00 shemminger@osdl.org +29 -19 # [PKT_SCHED]: netem: use timer to handle packets not rescheduling # # Change the behaviour of netem's delayed packets queue to make it work better # with TBF and other rate control disciplines. # # Now, packets are put in the delayed queue and held there until the next timer interval, # then moved to the underlying qdisc. qlen is set to match the available packets in # the underlying discipline (and not count those waiting). Previously, netem would perturb # the rate control disciplines because of rescheduling and moving packets in # the dequeue handler. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/22 14:56:35-07:00 herbert@gondor.apana.org.au # [TCP]: Only re-set TSO size for packet which was TSO to begin with. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/10/22 14:56:16-07:00 herbert@gondor.apana.org.au +2 -1 # [TCP]: Only re-set TSO size for packet which was TSO to begin with. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/10/22 14:30:22-07:00 akpm@osdl.org # [PATCH] kobject_uevent warning fix # # lib/kobject_uevent.c:39: warning: `action_to_string' defined but not used # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/10/18 21:47:24-07:00 akpm@osdl.org +2 -0 # kobject_uevent warning fix # # ChangeSet # 2004/10/22 14:29:57-07:00 akpm@osdl.org # [PATCH] remove cpu_run_sbin_hotplug() # # From: Keshavamurthy Anil S # # Remove cpu_run_sbin_hotplug() - use kobject_hotplug() instead. # # Signed-off-by: Anil S Keshavamurthy # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/10/18 21:45:44-07:00 akpm@osdl.org +2 -0 # remove cpu_run_sbin_hotplug() # # kernel/cpu.c # 2004/10/18 21:45:44-07:00 akpm@osdl.org +0 -35 # remove cpu_run_sbin_hotplug() # # include/linux/kobject_uevent.h # 2004/10/18 21:45:44-07:00 akpm@osdl.org +1 -0 # remove cpu_run_sbin_hotplug() # # drivers/base/cpu.c # 2004/10/18 21:45:44-07:00 akpm@osdl.org +2 -0 # remove cpu_run_sbin_hotplug() # # ChangeSet # 2004/10/22 14:29:19-07:00 akpm@osdl.org # [PATCH] kobject_hotplug: permit no hotplug_ops # # Make kobject_hotplug() work even if the kobject's kset doesn't implement any # hotplug_ops. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # lib/kobject_uevent.c # 2004/10/18 21:47:24-07:00 akpm@osdl.org +12 -7 # kobject_hotplug: permit no hotplug_ops # # ChangeSet # 2004/10/22 14:01:16-07:00 shemminger@osdl.org # [PATCH] avoid problems with kobject_set_name and name with % # # kobject_set_name takes a printf style argument list. There are many # callers that pass only one string, if this string contained a '%' character # than bad things would happen. The fix is simple. # # Signed-off-by: Stephen Hemminger # Signed-off-by: Greg Kroah-Hartman # # kernel/module.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # fs/sysfs/dir.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # drivers/pci/hotplug/pci_hotplug_core.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # drivers/firmware/efivars.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # drivers/base/core.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +1 -1 # avoid problems with kobject_set_name and name with % # # drivers/base/class.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +2 -2 # avoid problems with kobject_set_name and name with % # # drivers/base/bus.c # 2004/10/08 11:32:52-07:00 shemminger@osdl.org +2 -2 # avoid problems with kobject_set_name and name with % # # ChangeSet # 2004/10/22 13:55:29-07:00 shemminger@osdl.org # [PATCH] cdev: protect against buggy drivers # # Here is a better fix (thanks Greg) that allows long names for character # device objects. # # Signed-off-by: Stephen Hemminger # Signed-off-by: Greg Kroah-Hartman # # fs/char_dev.c # 2004/10/08 11:14:29-07:00 shemminger@osdl.org +2 -2 # cdev: protect against buggy drivers # # ChangeSet # 2004/10/22 13:37:30-07:00 greg@kroah.com # Merge kroah.com:/home/greg/linux/BK/bleed-2.6 # into kroah.com:/home/greg/linux/BK/driver-2.6 # # lib/Makefile # 2004/10/22 13:37:23-07:00 greg@kroah.com +0 -0 # Auto merged # # ChangeSet # 2004/10/22 11:08:47-07:00 oliver@neukum.org # [PATCH] kaweth: no need for packed # # there was an uneeded packed attribute for a data structure. # # Signed-off-by: Oliver Neukum # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2004/10/21 16:18:11-07:00 oliver@neukum.org +1 -1 # kaweth: no need for packed # # ChangeSet # 2004/10/22 11:08:25-07:00 oliver@neukum.org # [PATCH] kaweth: full conversion to usb_unlink_urb # # kaweth used its own synchronisation superseded by usb_unlink_urb(). # # Signed-off-by: Oliver Neukum # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2004/10/21 15:41:12-07:00 oliver@neukum.org +3 -10 # kaweth: full conversion to usb_unlink_urb # # ChangeSet # 2004/10/22 11:08:03-07:00 david-b@pacbell.net # [PATCH] USB input Kconfig updates # # This tweaks the USB input driver support, notably fixing a botched # dependency that makes all the USB drivers appear strangely in Kconfig. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/input/Kconfig # 2004/10/21 08:19:30-07:00 david-b@pacbell.net +5 -6 # USB input Kconfig updates # # ChangeSet # 2004/10/22 11:07:37-07:00 bunk@stusta.de # [PATCH] USB: fix usb/serial/console.c compile error # # The following compile error seems to come from Linus' tree: # # # <-- snip --> # # ... # CC drivers/usb/serial/bus.o # CC drivers/usb/serial/console.o # drivers/usb/serial/console.c: In function `usb_console_write': # drivers/usb/serial/console.c:221: warning: passing arg 3 of pointer to function makes integer from pointer without a cast # drivers/usb/serial/console.c:221: error: too many arguments to function # drivers/usb/serial/console.c:223: warning: passing arg 3 of `usb_serial_generic_write' makes integer from pointer without a cast # drivers/usb/serial/console.c:223: error: too many arguments to function `usb_serial_generic_write' # make[3]: *** [drivers/usb/serial/console.o] Error 1 # # <-- snip --> # # # This was caused by the changed "write" in usb_serial_device_type. # # # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/console.c # 2004/10/22 06:12:59-07:00 bunk@stusta.de +2 -2 # USB: fix usb/serial/console.c compile error # # ChangeSet # 2004/10/22 11:07:15-07:00 stern@rowland.harvard.edu # [PATCH] USB device init: implement the Windows scheme # # This patch implements the Windows scheme for USB device initialization. # It also incorporates the change recently posted by David to scrub the # endpoint state following a SET-ADDRESS. Other noteworthy changes: # # There are two new module parameters to control whether the # old scheme or the new one is used first and whether the other # scheme is tried if the first one fails. Default settings are # to use the new scheme only. # # hub_set_address() returns 0 immediately if the device is already # in the USB_STATE_ADDRESS state. # # On the first attempt to read the device descriptor the code # uses a short 1-second timeout. This ought to help prevent # full-speed devices with an 8- or 16-byte maxpacket from # slowing the procedure down by NAKing the unexpectedly early # status stage of the transfer. # # For debugging, the ep0 maxpacket value is printed. It might # be a good idea to validate it rather than just believing the # device -- although I haven't heard of any device providing # an incorrect value other than 0. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/urb.c # 2004/10/21 08:00:16-07:00 stern@rowland.harvard.edu +4 -5 # USB device init: implement the Windows scheme # # drivers/usb/core/hub.c # 2004/10/21 14:48:17-07:00 stern@rowland.harvard.edu +135 -38 # USB device init: implement the Windows scheme # # ChangeSet # 2004/10/22 11:06:49-07:00 janitor@sternwelten.at # [PATCH] USB: dabusb: replace schedule_timeout() with msleep_interruptible() # # Description: Use msleep_interruptible() instead of schedule_timeout() # so that the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/dabusb.c # 2004/10/20 17:41:59-07:00 janitor@sternwelten.at +1 -2 # USB: dabusb: replace schedule_timeout() with msleep_interruptible() # # ChangeSet # 2004/10/22 11:06:26-07:00 janitor@sternwelten.at # [PATCH] USB: tiglusb: replace schedule_timeout() with msleep_interruptible() # # Description: Use msleep_interruptible() instead of schedule_timeout() to # guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/tiglusb.c # 2004/10/20 17:42:00-07:00 janitor@sternwelten.at +1 -2 # USB: tiglusb: replace schedule_timeout() with msleep_interruptible() # # ChangeSet # 2004/10/22 19:18:21+02:00 bzolnier@trik.(none) # [ide] kill /proc/ide/ide?/config # # * writes to PCI config space are non-functional since 2.4.21 # * reads of full PCI config space are allowed for normal users # * I'm not aware of any applications using this interface # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-proc.c # 2004/10/22 19:17:03+02:00 bzolnier@trik.(none) +0 -257 # [ide] kill /proc/ide/ide?/config # # ChangeSet # 2004/10/22 19:10:29+02:00 bzolnier@trik.(none) # [ide] kill ide_hwif_t->ide_dma_verbose # # * make __ide_dma_verbose() void and drop "__" prefix # * ide_dma_verbose() is always available now # * use it instead of ide_hwif_t->ide_dma_verbose # * sgiioc4.c version reported wrong mode # * icside.c version repeated info given by ->ide_dma_check() # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +2 -2 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ppc/pmac.c # 2004/10/22 18:12:34+02:00 bzolnier@trik.(none) +0 -1 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/pci/siimage.c # 2004/10/22 18:12:34+02:00 bzolnier@trik.(none) +0 -7 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/pci/sgiioc4.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +0 -12 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ide.c # 2004/10/22 18:12:34+02:00 bzolnier@trik.(none) +0 -1 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ide-dma.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +12 -14 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ide-disk.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +1 -1 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/ide-cd.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +2 -3 # [ide] kill ide_hwif_t->ide_dma_verbose # # drivers/ide/arm/icside.c # 2004/10/22 18:12:35+02:00 bzolnier@trik.(none) +0 -9 # [ide] kill ide_hwif_t->ide_dma_verbose # # ChangeSet # 2004/10/22 19:06:43+02:00 bzolnier@trik.(none) # [ide] ide-scsi: simplify+speedup DMA support # # * add hwif->sg_mapped flag # * add idescsi_map_sg() converting scsi_cmd->sg into # hwif->sg_table (this removes need for rq->bio) # * remove code (de)allocating rq->bio # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/22 01:46:25+02:00 bzolnier@trik.(none) +1 -0 # [ide] ide-scsi: simplify+speedup DMA support # # drivers/scsi/ide-scsi.c # 2004/10/22 01:46:25+02:00 bzolnier@trik.(none) +49 -92 # [ide] ide-scsi: simplify+speedup DMA support # # drivers/ide/ide-io.c # 2004/10/22 01:46:25+02:00 bzolnier@trik.(none) +9 -3 # [ide] ide-scsi: simplify+speedup DMA support # # ChangeSet # 2004/10/22 19:04:21+02:00 bzolnier@trik.(none) # [ide] kill ide_raw_build_sglist() # # ide_build_sglist() can be now used for REQ_DRIVE_TASKFILE requests. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2004/10/22 19:03:55+02:00 bzolnier@trik.(none) +0 -1 # [ide] kill ide_raw_build_sglist() # # drivers/ide/ppc/pmac.c # 2004/10/22 19:03:55+02:00 bzolnier@trik.(none) +2 -5 # [ide] kill ide_raw_build_sglist() # # drivers/ide/pci/sgiioc4.c # 2004/10/22 19:03:55+02:00 bzolnier@trik.(none) +1 -4 # [ide] kill ide_raw_build_sglist() # # drivers/ide/ide-dma.c # 2004/10/22 19:03:55+02:00 bzolnier@trik.(none) +4 -35 # [ide] kill ide_raw_build_sglist() # # ChangeSet # 2004/10/22 18:51:08+02:00 bzolnier@trik.(none) # [ide] use ide_map_sg() # # * make Etrax ide.c, icside.c and ide-dma.c use ide_map_sg() # * use one sg for REQ_DRIVE_TASKFILE requests in ide-dma.c # (no reason for 128 sectors per sg limit) # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-dma.c # 2004/10/22 18:50:48+02:00 bzolnier@trik.(none) +7 -23 # [ide] use ide_map_sg() # # drivers/ide/arm/icside.c # 2004/10/22 18:50:48+02:00 bzolnier@trik.(none) +7 -22 # [ide] use ide_map_sg() # # arch/cris/arch-v10/drivers/ide.c # 2004/10/22 18:50:48+02:00 bzolnier@trik.(none) +2 -8 # [ide] use ide_map_sg() # # ChangeSet # 2004/10/22 18:20:30+02:00 bzolnier@trik.(none) # [ide] pmac: kill pmac_ide_[raw_]build_sglist() # # Just use ide_dma_[raw_]build_sglist() from ide-dma.c. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ppc/pmac.c # 2004/10/22 18:20:10+02:00 bzolnier@trik.(none) +2 -52 # [ide] pmac: kill pmac_ide_[raw_]build_sglist() # # ChangeSet # 2004/10/21 18:47:50-04:00 hannal@us.ibm.com # [PATCH] hw_random.c: replace pci_find_device # # As pci_find_device is going away I've replaced it with pci_get_device. # for_each_pci_dev is a macro wrapper around pci_get_device. # If someone with this hardware could test it I would appreciate it. # # Thanks. # # Hanna Linder # IBM Linux Technology Center # # Signed-off-by: Hanna Linder # Signed-off-by: Jeff Garzik # # drivers/char/hw_random.c # 2004/10/20 17:52:42-04:00 hannal@us.ibm.com +1 -1 # hw_random.c: replace pci_find_device # # ChangeSet # 2004/10/21 15:38:41-07:00 sri@us.ibm.com # [SCTP] Fix HEARTBEAT_ACKs being sent to wrong dest. ip address in a # multi-homing scenario after a failback. # # Signed-off-by: Jorge Hernandez-Herrero # Signed-off-by: Sridhar Samudrala # # net/sctp/outqueue.c # 2004/10/21 15:38:30-07:00 sri@us.ibm.com +12 -3 # [SCTP] Fix HEARTBEAT_ACKs being sent to wrong dest. ip address in a # multi-homing scenario after a failback. # # ChangeSet # 2004/10/21 15:32:54-07:00 sri@us.ibm.com # [SCTP] When an address is deleted, update any transports that are caching it as a source adddress. # # Signed-off-by: Sridhar Samudrala # # net/sctp/sm_make_chunk.c # 2004/10/21 15:32:42-07:00 sri@us.ibm.com +8 -0 # [SCTP] When an address is deleted, update any transports that are caching it as a source adddress. # # ChangeSet # 2004/10/21 15:28:41-07:00 sri@us.ibm.com # [SCTP] Update cwnd/ssthresh as per the sctpimpguide modifications. # # Signed-off-by: Sridhar Samudrala # # net/sctp/transport.c # 2004/10/21 15:28:29-07:00 sri@us.ibm.com +14 -13 # [SCTP] Update cwnd/ssthresh as per the sctpimpguide modifications. # # net/sctp/associola.c # 2004/10/21 15:28:29-07:00 sri@us.ibm.com +4 -3 # [SCTP] Update cwnd/ssthresh as per the sctpimpguide modifications. # # ChangeSet # 2004/10/21 15:21:31-07:00 sri@us.ibm.com # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # Signed-off-by: Sridhar Samudrala # # net/sctp/ulpevent.c # 2004/10/21 15:21:19-07:00 sri@us.ibm.com +36 -2 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # net/sctp/socket.c # 2004/10/21 15:21:18-07:00 sri@us.ibm.com +47 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # net/sctp/sm_statefuns.c # 2004/10/21 15:21:18-07:00 sri@us.ibm.com +59 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # net/sctp/sm_make_chunk.c # 2004/10/21 15:21:17-07:00 sri@us.ibm.com +23 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # include/net/sctp/ulpevent.h # 2004/10/21 15:21:17-07:00 sri@us.ibm.com +3 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # include/net/sctp/structs.h # 2004/10/21 15:21:17-07:00 sri@us.ibm.com +6 -0 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # include/linux/sctp.h # 2004/10/21 15:21:16-07:00 sri@us.ibm.com +5 -1 # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # ChangeSet # 2004/10/21 15:18:18-07:00 sri@us.ibm.com # [SCTP] Change sctp_assoc_t to a sized type(s32). # # Signed-off-by: Sridhar Samudrala # # net/sctp/socket.c # 2004/10/21 15:18:06-07:00 sri@us.ibm.com +1 -1 # [SCTP] Change sctp_assoc_t to a sized type(s32). # # net/sctp/associola.c # 2004/10/21 15:18:06-07:00 sri@us.ibm.com +3 -3 # [SCTP] Change sctp_assoc_t to a sized type(s32). # # include/net/sctp/user.h # 2004/10/21 15:18:06-07:00 sri@us.ibm.com +1 -1 # [SCTP] Change sctp_assoc_t to a sized type(s32). # # include/net/sctp/sctp.h # 2004/10/21 15:18:05-07:00 sri@us.ibm.com +1 -1 # [SCTP] Change sctp_assoc_t to a sized type(s32). # # ChangeSet # 2004/10/21 13:31:40-07:00 stern@rowland.harvard.edu # [PATCH] USB file-storage gadget: clean up endian issues # # This patch adds the __le16 data types to the file-storage gadget and # removes some erroneous conversions to little-endian order. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/file_storage.c # 2004/10/20 07:25:24-07:00 stern@rowland.harvard.edu +15 -15 # USB file-storage gadget: clean up endian issues # # ChangeSet # 2004/10/21 13:29:33-07:00 david-b@pacbell.net # [PATCH] USB: net2280 compile fixes # # Fix some compiler warnings that came up with net2280 on processors with # 64bit dma_addr-t ... one of them would have been a bug on big-endian CPUs. # (Thanks to Randy Dunlap for reporting these.) # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/net2280.h # 2004/10/15 13:26:59-07:00 david-b@pacbell.net +4 -4 # USB: net2280 compile fixes # # drivers/usb/gadget/net2280.c # 2004/10/15 13:34:35-07:00 david-b@pacbell.net +6 -3 # USB: net2280 compile fixes # # ChangeSet # 2004/10/21 13:29:21-07:00 david-b@pacbell.net # [PATCH] USB: omap_udc updates # # This is a collection of updates to the OMAP UDC driver. # # - OMAP-1510 support, including DMA (the DMA controller isn't quite # the same as on newer chips) but not double buffering. # # - Some PIO work: # # * fix some races that showed up on OMAP-1510 # # * tracking down annoying PIO-OUT lossage and making double buffering # start to behave (needed as fallback if all DMA channels are in use). # # - DMA-IN works on both 1510 and 16xx # # Plus minor cleanups. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/omap_udc.h # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +4 -2 # USB: omap_udc updates # # drivers/usb/gadget/omap_udc.c # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +245 -90 # USB: omap_udc updates # # ChangeSet # 2004/10/21 13:29:07-07:00 david-b@pacbell.net # [PATCH] USB: ohci module param for broken bios # # This patch provides a way to work around especially broken BIOS/SMM # implementations which claim they support the OS-handoff handshake # but actually don't. It's confirmed that this resolves some OSDL bug # (ID isn't handy just now). # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-hcd.c # 2004/10/12 06:24:03-07:00 david-b@pacbell.net +6 -1 # USB: ohci module param for broken bios # # ChangeSet # 2004/10/21 13:28:54-07:00 david-b@pacbell.net # [PATCH] USB: usb error code docs # # This has various updates to the USB error code documentation that I've # had floating around. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # Documentation/usb/error-codes.txt # 2004/10/21 11:17:34-07:00 david-b@pacbell.net +28 -15 # USB: usb error code docs # # ChangeSet # 2004/10/21 13:28:41-07:00 david-b@pacbell.net # [PATCH] USB: usb/hcd kconfig updates # # This updates the dependencies of the HCDs and host-side USB so that: # # - Options for PCI-only HCDs (UHCI and, for now, EHCI) only appear # systems that actually have PCI. # # - Adding non-PCI bus glue support for another OHCI adapter doesn't # need involve changing the main USB Kconfig anymore. # # - Minor tweaks to the OMAP support, so OMAP 17xx and 24xx don't need # additional Kconfig changes and so the H3/17xx gets the ISP1301 too. # # This still tries to hide host-side USB config options on systems that # don't offer USB. While currently convenient, that's a losing proposition # in the long term: host controllers on chips like SL811 and TD243 can be # put onto any custom board. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/Kconfig # 2004/10/21 10:36:59-07:00 david-b@pacbell.net +22 -4 # USB: usb/hcd kconfig updates # # drivers/usb/Kconfig # 2004/10/21 10:13:54-07:00 david-b@pacbell.net +1 -1 # USB: usb/hcd kconfig updates # # ChangeSet # 2004/10/21 13:28:29-07:00 david-b@pacbell.net # [PATCH] USB: goku_udc sparse updates # # This is a bunch of "sparse" fixes for goku_udc. One of these might be # an issue on some systems for code that explicitly halts IN endpoints # (like file_storage) if normal memory access doesn't work for PCI. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/goku_udc.h # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +4 -4 # USB: goku_udc sparse updates # # drivers/usb/gadget/goku_udc.c # 2004/10/21 09:19:33-07:00 david-b@pacbell.net +76 -73 # USB: goku_udc sparse updates # # ChangeSet # 2004/10/21 12:51:05-07:00 greg@kroah.com # Merge gregkh@kernel.bkbits.net:linux/usb-2.6 # into kroah.com:/home/greg/linux/BK/usb-2.6 # # drivers/usb/serial/visor.c # 2004/10/21 12:51:02-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/usb/serial/usb-serial.c # 2004/10/21 12:51:02-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/usb/serial/pl2303.c # 2004/10/21 12:51:02-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/usb/serial/cyberjack.c # 2004/10/21 12:51:02-07:00 greg@kroah.com +0 -0 # Auto merged # # ChangeSet # 2004/10/20 16:49:07-07:00 stern@rowland.harvard.edu # [PATCH] USB Gadget: Use proper BCD values # # This updates an earlier patch that added bcdDevice values for a new # USB peripheral controller. The values weren't valid BCD numbers. # # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/zero.c # 2004/10/20 07:01:08-07:00 stern@rowland.harvard.edu +1 -1 # USB Gadget: Use proper BCD values # # drivers/usb/gadget/file_storage.c # 2004/10/20 07:00:56-07:00 stern@rowland.harvard.edu +1 -1 # USB Gadget: Use proper BCD values # # drivers/usb/gadget/ether.c # 2004/10/20 07:01:03-07:00 stern@rowland.harvard.edu +1 -1 # USB Gadget: Use proper BCD values # # ChangeSet # 2004/10/20 16:37:46-07:00 shemminger@osdl.org # [PATCH] USB kaweth: use alloc_etherdev to allocate device private data - fix # # Goof found by compile warning. # # # From: Stephen Hemminger # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2004/10/19 15:07:25-07:00 shemminger@osdl.org +1 -1 # USB kaweth: use alloc_etherdev to allocate device private data - fix # # ChangeSet # 2004/10/20 16:37:27-07:00 david-b@pacbell.net # [PATCH] USB: usbnet patch (new ax8817x device) # # This patch enables usage of another USB2 100BASE-T adapter. # http://www.corega.co.jp/product/list/lanadp/feusb2tx.htm # # From: Naoki Shibata # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/usbnet.c # 2004/10/20 16:30:29-07:00 david-b@pacbell.net +4 -0 # USB: usbnet patch (new ax8817x device) # # ChangeSet # 2004/10/20 16:37:08-07:00 dale@farnsworth.org # [PATCH] USB: USB fixes for non-cache-coherent processors # # I posted this before, but didn't see any discussion. # # This patch fixes a couple of places where the usb subsystem # DMAs to/from local (stack) variables. This doesn't work on # non-cache-coherent processors. I'm testing on PPC 4xx systems. # # Signed-off-by: Dale Farnsworth # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/message.c # 2004/10/01 12:16:40-07:00 dale@farnsworth.org +13 -3 # USB: USB fixes for non-cache-coherent processors # # drivers/usb/class/audio.c # 2004/10/01 12:16:40-07:00 dale@farnsworth.org +11 -2 # USB: USB fixes for non-cache-coherent processors # # ChangeSet # 2004/10/20 16:36:50-07:00 stern@rowland.harvard.edu # [PATCH] UHCI: No bandwidth reclamation during enumeration # # A few devices prefer not to have full-speed bandwidth reclamation turned # on while they are being enumerated. In particular this seems to be true # for the USB Bluetooth adapters built in to some laptop models (used for # remote keyboards). This patch alters the UHCI driver so that control URBs # for devices still in the USB_STATE_DEFAULT state will be placed on the # low-speed queue rather than the full-speed queue. Since the low-speed # queue isn't subject to bandwidth reclamation the devices will work # properly. The negative impact on other devices is minimal; the process of # device initialization will be slowed down by a few milliseconds. # # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hcd.c # 2004/10/14 10:25:46-07:00 stern@rowland.harvard.edu +6 -2 # UHCI: No bandwidth reclamation during enumeration # # ChangeSet # 2004/10/20 16:36:31-07:00 shemminger@osdl.org # [PATCH] usbnet: use alloc_etherdev to allocate private data # # In order for network device lifetime stuff to work properly, it is necessary # for devices to allocate private data as part of alloc_etherdev. # Also, netdev_priv() is improvement over dereferencing netdev->priv # # Signed-off-by: Stephen Hemminger # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/usbnet.c # 2004/10/19 09:44:03-07:00 shemminger@osdl.org +31 -35 # usbnet: use alloc_etherdev to allocate private data # # ChangeSet # 2004/10/20 16:36:12-07:00 shemminger@osdl.org # [PATCH] kaweth: use alloc_etherdev to allocate device private # # Change other usb network driver to use alloc_etherdev to allocate the # private data structure. And use netdev_priv to find it. # # Signed-off-by: Stephen Hemminger # Signed-off-by: Oliver Neukum # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2004/10/19 10:39:56-07:00 shemminger@osdl.org +47 -72 # kaweth: use alloc_etherdev to allocate device private # # ChangeSet # 2004/10/20 16:14:25-07:00 david-b@pacbell.net # [PATCH] USB: usb suspend support for hid-core # # Basic HID driver support for USB suspend/resume. At least one keyboard # works OK as a remote wakeup source ... unless you write the sysfs # power/state attribute using that USB keyboard, in which case the input # subsystem reports an endless stream of newlines! :) # # Someone still needs to implement some configurable timer to support the # "suspend idle mice/keyboards/..." policy for devices that can issue # wakeup events. In conjunction with autosuspend policies in hub and # HCD (UHCI) code, that could allegedly save 2W of power by enabling the # C3 state on Centrino laptops that use USB mice. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/input/hid-core.c # 2004/10/01 12:12:41-07:00 david-b@pacbell.net +27 -0 # USB: usb suspend support for hid-core # # ChangeSet # 2004/10/20 16:14:05-07:00 david-b@pacbell.net # [PATCH] USB: usb hub descriptor fetch needs retries # # Some of the recent changes to change how descriptors are read have managed # to confuse one USB keyboard. It recovers OK with a few retries though. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hub.c # 2004/10/01 10:18:19-07:00 david-b@pacbell.net +11 -3 # USB: usb hub descriptor fetch needs retries # # ChangeSet # 2004/10/20 16:13:46-07:00 lkml@lievin.net # [PATCH] USB: tiglusb.c: add direct USB support on some new TI handhelds # # I have extended my driver to add support of the embedded USB port provided by # some new Texas Instruments' handhelds. Things are the same except for the # maximum packet size. # # Description: add support of the USB port embedded on some new TI handhelds (TI84+ and TI89 Titanium). # # Thanks, Romain. # # Signed-off-by: Romain Lievin # Signed-off-by: Greg Kroah-Hartman # # include/linux/ticable.h # 2004/09/26 06:25:53-07:00 lkml@lievin.net +2 -0 # USB: tiglusb.c: add direct USB support on some new TI handhelds # # drivers/usb/misc/tiglusb.h # 2004/09/26 06:27:17-07:00 lkml@lievin.net +2 -6 # USB: tiglusb.c: add direct USB support on some new TI handhelds # # drivers/usb/misc/tiglusb.c # 2004/09/26 06:39:34-07:00 lkml@lievin.net +42 -16 # USB: tiglusb.c: add direct USB support on some new TI handhelds # # Documentation/usb/silverlink.txt # 2004/09/26 06:16:15-07:00 lkml@lievin.net +4 -2 # USB: tiglusb.c: add direct USB support on some new TI handhelds # # ChangeSet # 2004/10/20 16:13:25-07:00 lcapitulino@conectiva.com.br # [PATCH] USB: Module version info for Belkin_sa. # # Add module version information for usb/serial/belkin_sa.c. # # # Signed-off-by: Luiz Capitulino # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/belkin_sa.c # 2004/09/25 13:27:57-07:00 lcapitulino@conectiva.com.br +1 -0 # USB: Module version info for Belkin_sa. # # ChangeSet # 2004/10/20 16:13:07-07:00 lcapitulino@conectiva.com.br # [PATCH] USB: Module version info for PL2303. # # Add module version information for usb/serial/pl2303.c. # # # Signed-off-by: Luiz Capitulino # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/pl2303.c # 2004/09/25 13:16:56-07:00 lcapitulino@conectiva.com.br +1 -0 # USB: Module version info for PL2303. # # ChangeSet # 2004/10/20 16:12:48-07:00 lcapitulino@conectiva.com.br # [PATCH] USB: Module version info for CyberJack. # # Add module version information for drivers/usb/serial/cyberjack.c. # # # Signed-off-by: Luiz Capitulino # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/cyberjack.c # 2004/09/27 17:51:53-07:00 lcapitulino@conectiva.com.br +1 -0 # USB: Module version info for CyberJack. # # ChangeSet # 2004/10/20 16:12:29-07:00 zaitcev@redhat.com # [PATCH] USB: usblp BKL removal # # the appended patch is not in yet, what gives? I sent it to Marcelo with # an understanding that it would be in Linus tree any day now. It was a couple # of months ago. It's not just BKL witchhunt either. I remember that it fixed # an oops, although I do not remember the precise scenario by now (it had # something to do with a race between ->release and ->disconnect). # # # From: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/class/usblp.c # 2004/10/04 17:15:43-07:00 zaitcev@redhat.com +8 -8 # USB: usblp BKL removal # # ChangeSet # 2004/10/20 16:12:08-07:00 rco3@2005dauphin.org # [PATCH] USB: PL2303 - PharosGPS patch # # This patch adds recognition/support for the PharosGPS puck, as included with # Microsoft's Streets and Trips package. The device has an inline # USB-to-serial converter which functions as a PL2303 but with different # VENDOR_ID and PRODUCT_ID, and so the PL2303 driver is modified to recognize # this additional device. # # Signed-off by: Robert C. Olsen, III [pl2303@2005dauphin.org] # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/pl2303.h # 2004/10/01 06:53:56-07:00 rco3@2005dauphin.org +3 -0 # USB: PL2303 - PharosGPS patch # # drivers/usb/serial/pl2303.c # 2004/10/01 06:50:59-07:00 rco3@2005dauphin.org +1 -0 # USB: PL2303 - PharosGPS patch # # ChangeSet # 2004/10/20 16:11:49-07:00 philippe.bertin@pandora.be # [PATCH] USB: Superfluous statement in usb.c # # drivers/usb/core/usb.c # 2004/10/06 12:46:34-07:00 philippe.bertin@pandora.be +0 -2 # USB: Superfluous statement in usb.c # # ChangeSet # 2004/10/20 16:11:28-07:00 luca.risolia@studio.unibo.it # [PATCH] USB: W996[87]CF driver updates # # Small W996[87]CF documentation updates. # # Signed-off-by: Luca Risolia # # drivers/usb/media/w9968cf.h # 2004/10/08 06:03:21-07:00 luca.risolia@studio.unibo.it +1 -1 # USB: W996[87]CF driver updates # # MAINTAINERS # 2004/10/08 06:04:18-07:00 luca.risolia@studio.unibo.it +2 -2 # USB: W996[87]CF driver updates # # Documentation/usb/w9968cf.txt # 2004/10/08 06:19:58-07:00 luca.risolia@studio.unibo.it +27 -24 # USB: W996[87]CF driver updates # # ChangeSet # 2004/10/20 16:11:09-07:00 stern@rowland.harvard.edu # [PATCH] usbcore: drop reference to bus on allocation error # # A recent patch introduced this reference counting leak. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # # ===== drivers/usb/core/usb.c 1.293 vs edited ===== # # drivers/usb/core/usb.c # 2004/10/08 10:05:23-07:00 stern@rowland.harvard.edu +1 -0 # usbcore: drop reference to bus on allocation error # # ChangeSet # 2004/10/20 16:10:49-07:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: Fix queuecommand() for disconnected devices # # Following the recommendation of James Bottomley (of SCSI fame), this patch # changes the queuecommand() routine so that when a command is received for a # disconnected device, instead of accepting the command and then ignoring it, # we fail the command immediately with DID_NO_CONNECT. # # This fixes a timeout-abort-oops sequence that would occur when the # higher-level drivers (mostly the CD driver) try to queue a SYNCHRONIZE # CACHE command during scsi_remove_host(). # # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # # ===== drivers/usb/storage/scsiglue.c 1.84 vs edited ===== # # drivers/usb/storage/scsiglue.c # 2004/09/30 13:07:33-07:00 mdharm-usb@one-eyed-alien.net +10 -3 # USB Storage: Fix queuecommand() for disconnected devices # # ChangeSet # 2004/10/20 15:38:19-07:00 greg@kroah.com # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # lib/kobject.c # 2004/10/20 15:38:09-07:00 greg@kroah.com +1 -3 # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # lib/Makefile # 2004/10/20 15:38:09-07:00 greg@kroah.com +5 -1 # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # lib/Kconfig.debug # 2004/10/20 15:38:09-07:00 greg@kroah.com +7 -0 # kobject: add CONFIG_DEBUG_KOBJECT # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:33:03-07:00 greg@kroah.com # USB: fix DoS in the visor driver by rate limiting sends. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/visor.c # 2004/10/20 15:32:53-07:00 greg@kroah.com +69 -12 # USB: fix DoS in the visor driver by rate limiting sends. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:32:01-07:00 greg@kroah.com # USB: fix build error in the USB core if CONFIG_PROCFS is disabled # # Signed-off-by: Greg Kroah-Hartman # # include/linux/proc_fs.h # 2004/10/20 15:31:50-07:00 greg@kroah.com +1 -0 # USB: fix build error in the USB core if CONFIG_PROCFS is disabled # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:31:02-07:00 greg@kroah.com # USB: remove unneeded checks in the usb-serial core. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/usb-serial.c # 2004/10/20 15:30:52-07:00 greg@kroah.com +12 -24 # USB: remove unneeded checks in the usb-serial core. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:30:06-07:00 greg@kroah.com # USB: add phidgetkit driver. # # originally written by Sean Young but with LED additions and # cleanups from me. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/phidgetkit.c # 2004/10/20 15:29:55-07:00 greg@kroah.com +581 -0 # # drivers/usb/misc/phidgetkit.c # 2004/10/20 15:29:55-07:00 greg@kroah.com +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/misc/phidgetkit.c # # drivers/usb/misc/Makefile # 2004/10/20 15:29:55-07:00 greg@kroah.com +2 -1 # USB: add phidgetkit driver. # # originally written by Sean Young but with LED additions and # cleanups from me. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/Kconfig # 2004/10/20 15:29:55-07:00 greg@kroah.com +10 -0 # USB: add phidgetkit driver. # # originally written by Sean Young but with LED additions and # cleanups from me. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 15:28:22-07:00 greg@kroah.com # USB: update devices.txt with the proper USB minor number information. # # Signed-off-by: Greg Kroah-Hartman # # Documentation/devices.txt # 2004/10/20 15:28:12-07:00 greg@kroah.com +17 -6 # USB: update devices.txt with the proper USB minor number information. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/10/20 21:36:17+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_frag.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_frag.c # 2004/10/20 21:35:34+02:00 yasuyuki.kozakai@toshiba.co.jp +31 -29 # [NETFILTER]: Enable ip6t_frag.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/20 21:33:37+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_multiport.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_multiport.c # 2004/10/20 21:33:00+02:00 yasuyuki.kozakai@toshiba.co.jp +18 -13 # [NETFILTER]: Enable ip6t_multiport.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/20 21:27:38+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_rt.c to work without skb_linearize() # # Signed-off-by: Patrick McHardy # Signed-off-by: Yasuyuki KOZAKAI # # net/ipv6/netfilter/ip6t_rt.c # 2004/10/20 21:26:53+02:00 yasuyuki.kozakai@toshiba.co.jp +59 -62 # [NETFILTER]: Enable ip6t_rt.c to work without skb_linearize() # # Signed-off-by: Patrick McHardy # Signed-off-by: Yasuyuki KOZAKAI # # ChangeSet # 2004/10/20 20:45:50+02:00 kaber@coreworks.de # Merge coreworks.de:/home/kaber/src/nf/nf-post-2.6.9 # into coreworks.de:/home/kaber/src/nf/nf-2.6 # # net/ipv6/netfilter/ip6t_rt.c # 2004/10/20 20:45:30+02:00 kaber@coreworks.de +0 -0 # Auto merged # # net/ipv6/netfilter/ip6t_multiport.c # 2004/10/20 20:45:30+02:00 kaber@coreworks.de +0 -0 # Auto merged # # net/ipv6/netfilter/ip6t_frag.c # 2004/10/20 20:45:30+02:00 kaber@coreworks.de +0 -0 # Auto merged # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/10/20 20:45:30+02:00 kaber@coreworks.de +0 -0 # Auto merged # # ChangeSet # 2004/10/20 20:33:06+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # sound/core/init.c # 2004/10/20 20:32:42+02:00 perex@suse.cz +0 -1 # Auto merged # # ChangeSet # 2004/10/20 20:27:59+02:00 kaber@coreworks.de # [NETFILTER]: Select source address for gateway in MASQUERADE # # Suggested by Herbert Xu # # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ipt_MASQUERADE.c # 2004/10/20 20:26:59+02:00 kaber@coreworks.de +3 -1 # [NETFILTER]: Select source address for gateway in MASQUERADE # # Suggested by Herbert Xu # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/20 14:14:29+02:00 perex@suse.cz # [ALSA] Fix non-blocking write in ALSA OSS emulation # # ALSA<-OSS emulation # write() calls in non-blocking mode eat the written data and never # return -EAGAIN. The attached patch fixes the problem. # # Signed-off-by: Benjamin Otte # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_oss.c # 2004/10/18 10:42:06+02:00 perex@suse.cz +6 -6 # [ALSA] Fix non-blocking write in ALSA OSS emulation # # D:2004/10/18 16:42:06 # C:ALSA<-OSS emulation # F:core/oss/pcm_oss.c:1.78->1.79 # L:write() calls in non-blocking mode eat the written data and never # L:return -EAGAIN. The attached patch fixes the problem. # Signed-off-by: Benjamin Otte # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:13:41+02:00 perex@suse.cz # [ALSA] PCM boundary fix in 32bit compat layer # # IOCTL32 emulation # PCM boundary size is fixed within the 32bit value range when HW_PARAMS # ioctl is called in 32bit mode. # Also, with this patch, the conversion functions are inlined. # # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/pcm32.c # 2004/10/18 09:55:51+02:00 perex@suse.cz +64 -4 # [ALSA] PCM boundary fix in 32bit compat layer # # D:2004/10/18 15:55:51 # C:IOCTL32 emulation # F:core/ioctl32/hwdep32.c:1.8->1.9 # F:core/ioctl32/ioctl32.c:1.22->1.23 # F:core/ioctl32/ioctl32.h:1.15->1.16 # F:core/ioctl32/pcm32.c:1.21->1.22 # L:PCM boundary size is fixed within the 32bit value range when HW_PARAMS # L:ioctl is called in 32bit mode. # L:Also, with this patch, the conversion functions are inlined. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/ioctl32.h # 2004/10/18 09:55:51+02:00 perex@suse.cz +2 -2 # [ALSA] PCM boundary fix in 32bit compat layer # # D:2004/10/18 15:55:51 # C:IOCTL32 emulation # F:core/ioctl32/hwdep32.c:1.8->1.9 # F:core/ioctl32/ioctl32.c:1.22->1.23 # F:core/ioctl32/ioctl32.h:1.15->1.16 # F:core/ioctl32/pcm32.c:1.21->1.22 # L:PCM boundary size is fixed within the 32bit value range when HW_PARAMS # L:ioctl is called in 32bit mode. # L:Also, with this patch, the conversion functions are inlined. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/ioctl32.c # 2004/10/18 09:55:51+02:00 perex@suse.cz +3 -3 # [ALSA] PCM boundary fix in 32bit compat layer # # D:2004/10/18 15:55:51 # C:IOCTL32 emulation # F:core/ioctl32/hwdep32.c:1.8->1.9 # F:core/ioctl32/ioctl32.c:1.22->1.23 # F:core/ioctl32/ioctl32.h:1.15->1.16 # F:core/ioctl32/pcm32.c:1.21->1.22 # L:PCM boundary size is fixed within the 32bit value range when HW_PARAMS # L:ioctl is called in 32bit mode. # L:Also, with this patch, the conversion functions are inlined. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/hwdep32.c # 2004/10/18 09:55:51+02:00 perex@suse.cz +1 -1 # [ALSA] PCM boundary fix in 32bit compat layer # # D:2004/10/18 15:55:51 # C:IOCTL32 emulation # F:core/ioctl32/hwdep32.c:1.8->1.9 # F:core/ioctl32/ioctl32.c:1.22->1.23 # F:core/ioctl32/ioctl32.h:1.15->1.16 # F:core/ioctl32/pcm32.c:1.21->1.22 # L:PCM boundary size is fixed within the 32bit value range when HW_PARAMS # L:ioctl is called in 32bit mode. # L:Also, with this patch, the conversion functions are inlined. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:12:54+02:00 perex@suse.cz # [ALSA] Add VIA8237 driver type # # VIA82xx driver # VIA8237 and later chips are handled as a different type from VIA8233, # since they don't support the AC97 slot mapping any more. # The alsa-lib will resolve the 5.1 remapping for them. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/10/18 09:54:00+02:00 perex@suse.cz +4 -0 # [ALSA] Add VIA8237 driver type # # D:2004/10/18 15:54:00 # C:VIA82xx driver # F:pci/via82xx.c:1.124->1.125 # L:VIA8237 and later chips are handled as a different type from VIA8233, # L:since they don't support the AC97 slot mapping any more. # L:The alsa-lib will resolve the 5.1 remapping for them. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:12:07+02:00 perex@suse.cz # [ALSA] Exclude uneeded code when ! CONFIG_PROC_FS # # PCM Midlevel,AC97 Codec Core # From Michal Rokos # # I tried to compile without procfs support and I got few 'unused code' # warnings. # # This patch fixes it. # # Tested by compilation only. (With CONFIG_PROC_FS on and off) # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_local.h # 2004/10/18 08:01:40+02:00 perex@suse.cz +7 -0 # [ALSA] Exclude uneeded code when ! CONFIG_PROC_FS # # D:2004/10/18 14:01:40 # C:PCM Midlevel,AC97 Codec Core # F:core/pcm.c:1.46->1.47 # F:pci/ac97/Makefile:1.14->1.15 # F:pci/ac97/ac97_local.h:1.7->1.8 # L:From Michal Rokos # L: # L:I tried to compile without procfs support and I got few 'unused code' # L:warnings. # L: # L:This patch fixes it. # L: # L:Tested by compilation only. (With CONFIG_PROC_FS on and off) # Signed-off-by: Takashi Iwai # # sound/pci/ac97/Makefile # 2004/10/18 08:01:40+02:00 perex@suse.cz +6 -1 # [ALSA] Exclude uneeded code when ! CONFIG_PROC_FS # # D:2004/10/18 14:01:40 # C:PCM Midlevel,AC97 Codec Core # F:core/pcm.c:1.46->1.47 # F:pci/ac97/Makefile:1.14->1.15 # F:pci/ac97/ac97_local.h:1.7->1.8 # L:From Michal Rokos # L: # L:I tried to compile without procfs support and I got few 'unused code' # L:warnings. # L: # L:This patch fixes it. # L: # L:Tested by compilation only. (With CONFIG_PROC_FS on and off) # Signed-off-by: Takashi Iwai # # sound/core/pcm.c # 2004/10/18 08:01:40+02:00 perex@suse.cz +2 -1 # [ALSA] Exclude uneeded code when ! CONFIG_PROC_FS # # D:2004/10/18 14:01:40 # C:PCM Midlevel,AC97 Codec Core # F:core/pcm.c:1.46->1.47 # F:pci/ac97/Makefile:1.14->1.15 # F:pci/ac97/ac97_local.h:1.7->1.8 # L:From Michal Rokos # L: # L:I tried to compile without procfs support and I got few 'unused code' # L:warnings. # L: # L:This patch fixes it. # L: # L:Tested by compilation only. (With CONFIG_PROC_FS on and off) # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:11:20+02:00 perex@suse.cz # [ALSA] Fix AC97_EXTENDED_STATUS initialial value # # AC97 Codec Core # Fixed a bug to write an invalid initial value of AC97_EXTENDED_STATUS. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/10/13 04:26:12+02:00 perex@suse.cz +5 -2 # [ALSA] Fix AC97_EXTENDED_STATUS initialial value # # D:2004/10/13 10:26:12 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.151->1.152 # L:Fixed a bug to write an invalid initial value of AC97_EXTENDED_STATUS. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:10:33+02:00 perex@suse.cz # [ALSA] Fixed SPDIF on CS4298 # # AC97 Codec Core # Fixed SPDIF support on CS4298 AC97 chip. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/10/13 04:22:48+02:00 perex@suse.cz +1 -1 # [ALSA] Fixed SPDIF on CS4298 # # D:2004/10/13 10:22:48 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.150->1.151 # L:Fixed SPDIF support on CS4298 AC97 chip. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:09:47+02:00 perex@suse.cz # [ALSA] fix build in !KMOD case (sequencer) # # ALSA sequencer # seq_device.c needs to pull in the snd_seq_autoload_lock()/unlock() # defines from seq_kernel.h in the !KMOD case. # # Signed-off-by: Ingo Molnar # Signed-off-by: Jaroslav Kysela # # sound/core/seq/seq_device.c # 2004/10/12 01:17:43+02:00 perex@suse.cz +1 -0 # [ALSA] fix build in !KMOD case (sequencer) # # D:2004/10/12 07:17:43 # C:ALSA sequencer # F:core/seq/seq_device.c:1.17->1.18 # L:seq_device.c needs to pull in the snd_seq_autoload_lock()/unlock() # L:defines from seq_kernel.h in the !KMOD case. # Signed-off-by: Ingo Molnar # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/10/20 14:09:00+02:00 perex@suse.cz # [ALSA] RME9632 precise_ptr fix # # RME HDSP driver # Correct hardware position mask to mask correctly when buffer is not # maximum size. # # Signed-off-by: Ed Wildgoose # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/10/11 05:28:09+02:00 perex@suse.cz +1 -3 # [ALSA] RME9632 precise_ptr fix # # D:2004/10/11 11:28:09 # C:RME HDSP driver # F:pci/rme9652/hdsp.c:1.71->1.72 # L:Correct hardware position mask to mask correctly when buffer is not # L:maximum size. # Signed-off-by: Ed Wildgoose # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:08:13+02:00 perex@suse.cz # [ALSA] Misc. volume fixes # # ICE1712 driver # - Added mute function to Master/Front/Rear/Side/LFE/CEnter # - Master volume is artificially made in software # - Added PCM volume control (basically what was the master volume) # - Front/Read/Side/LFE/Center is now logarithmic (and computed as * / ) # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.h # 2004/10/11 05:15:49+02:00 perex@suse.cz +5 -1 # [ALSA] Misc. volume fixes # # D:2004/10/11 11:15:49 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.21->1.22 # F:pci/ice1712/ice1712.h:1.25->1.26 # L: - Added mute function to Master/Front/Rear/Side/LFE/CEnter # L: - Master volume is artificially made in software # L: - Added PCM volume control (basically what was the master volume) # L: - Front/Read/Side/LFE/Center is now logarithmic (and computed as * / ) # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/10/11 05:15:49+02:00 perex@suse.cz +295 -77 # [ALSA] Misc. volume fixes # # D:2004/10/11 11:15:49 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.21->1.22 # F:pci/ice1712/ice1712.h:1.25->1.26 # L: - Added mute function to Master/Front/Rear/Side/LFE/CEnter # L: - Master volume is artificially made in software # L: - Added PCM volume control (basically what was the master volume) # L: - Front/Read/Side/LFE/Center is now logarithmic (and computed as * / ) # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:07:27+02:00 perex@suse.cz # [ALSA] Add routing/volume of ADAT I/O on EWS88D # # ICE1712 driver # The routing/volume control of ADAT I/O on EWS88D is added. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ews.c # 2004/10/11 05:08:07+02:00 perex@suse.cz +4 -1 # [ALSA] Add routing/volume of ADAT I/O on EWS88D # # D:2004/10/11 11:08:07 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.20->1.21 # L:The routing/volume control of ADAT I/O on EWS88D is added. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 14:04:46+02:00 perex@suse.cz # [ALSA] fixing a two-rme32-in-one-machine bug # # RME32 driver # - fixing the dev counter in snd_rme32_probe(). The patch can enable a second # rme32 card # # Signed-off-by: Martin Langer # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/10/07 07:58:41+02:00 perex@suse.cz +5 -7 # [ALSA] fixing a two-rme32-in-one-machine bug # # RME32 driver # - fixing the dev counter in snd_rme32_probe(). The patch can enable a second # rme32 card now. # # Signed-off-by: Martin Langer # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/20 00:47:18-04:00 ganesh.venkatesan@intel.com # [PATCH] ixgb: Configuration and user guide update # # Signed-off-by: Ganesh Venkatesan # # drivers/net/Kconfig # 2004/10/07 18:52:27-04:00 ganesh.venkatesan@intel.com +2 -8 # ixgb: Configuration and user guide update # # Documentation/networking/ixgb.txt # 2004/10/07 18:51:47-04:00 ganesh.venkatesan@intel.com +12 -25 # ixgb: Configuration and user guide update # # ChangeSet # 2004/10/20 00:47:07-04:00 ganesh.venkatesan@intel.com # [PATCH] e100: Configuration and user guide update # # Signed-off-by: Ganesh Venkatesan # # drivers/net/Kconfig # 2004/10/07 18:52:27-04:00 ganesh.venkatesan@intel.com +5 -54 # e100: Configuration and user guide update # # Documentation/networking/e100.txt # 2004/10/07 18:51:33-04:00 ganesh.venkatesan@intel.com +127 -11 # e100: Configuration and user guide update # # ChangeSet # 2004/10/20 00:46:56-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: Configuration and user guide update # # Signed-off-by: Ganesh Venkatesan # # drivers/net/Kconfig # 2004/10/07 18:52:27-04:00 ganesh.venkatesan@intel.com +2 -23 # e1000: Configuration and user guide update # # Documentation/networking/e1000.txt # 2004/10/07 18:51:15-04:00 ganesh.venkatesan@intel.com +154 -65 # e1000: Configuration and user guide update # # ChangeSet # 2004/10/20 00:44:45-04:00 ganesh.venkatesan@intel.com # [PATCH] e100: Driver version number update # # Signed-off-by: Ganesh Venkatesan # # drivers/net/e100.c # 2004/10/15 15:27:01-04:00 ganesh.venkatesan@intel.com +1 -1 # e100: Driver version number update # # ChangeSet # 2004/10/20 00:44:35-04:00 ganesh.venkatesan@intel.com # [PATCH] e100: Fix set ringparam for ethtool returning error code on bad input # # Signed-off-by: Ganesh Venkatesan # # drivers/net/e100.c # 2004/10/15 15:27:01-04:00 ganesh.venkatesan@intel.com +3 -0 # e100: Fix set ringparam for ethtool returning error # # ChangeSet # 2004/10/20 00:44:25-04:00 ganesh.venkatesan@intel.com # [PATCH] e100: Fix loss of connectivity to BMC when interface # is brought down. # # Signed-off-by: Ganesh Venkatesan # # drivers/net/e100.c # 2004/10/15 15:27:01-04:00 ganesh.venkatesan@intel.com +0 -10 # e100: Fix loss of connectivity to BMC when interface # # ChangeSet # 2004/10/20 00:41:25-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/e100 # # drivers/net/e100.c # 2004/10/20 00:41:22-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/19 15:49:43+02:00 kaber@coreworks.de # [NETFILTER]: Convert ip6t_physdev match function to new argument order # # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_physdev.c # 2004/10/19 15:49:12+02:00 kaber@coreworks.de +1 -2 # [NETFILTER]: Convert ip6t_physdev match function to new argument order # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:21:00+02:00 kaber@coreworks.de # [NETFILTER]: ip6t_esp.c whitespace cleanup # # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_esp.c # 2004/10/19 02:20:32+02:00 kaber@coreworks.de +36 -38 # [NETFILTER]: ip6t_esp.c whitespace cleanup # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:19:33+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_esp.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_esp.c # 2004/10/19 02:19:06+02:00 yasuyuki.kozakai@toshiba.co.jp +12 -10 # [NETFILTER]: Enable ip6t_esp.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:18:14+02:00 kaber@coreworks.de # [NETFILTER]: Introduce tabs to ip6t_ah.c # # Fix horrible indentation, not a single tab in the file. # # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ah.c # 2004/10/19 02:17:48+02:00 kaber@coreworks.de +130 -134 # [NETFILTER]: Introduce tabs to ip6t_ah.c # # Fix horrible indentation, not a single tab in the file. # # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:16:42+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_ah.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ah.c # 2004/10/19 02:16:15+02:00 yasuyuki.kozakai@toshiba.co.jp +9 -7 # [NETFILTER]: Enable ip6t_ah.c to work without skb_linearize() # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:15:21+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: Enable ip6t_LOG.c to work without skb_linearize() # # This patch enables ip6t_LOG.c to work without skb_linearize(). # # I changed a large part of this file. At first, ip6_nexthdr() is deleted # to prevent multiple call of skb_header_pointer() at dump_packet() and # ip6_nexthdr(). # # And the following bugs are fixed. The first bug is fixed by introducing # skb_header_pointer(), then I didn't separate patches. # # - No check with skb->len. Then invalid memory access may occur. # # - If packet is fragmented and it's not first fragment, nonexistent # extension headers is tried to parse. # # - All headers which aren't TCP/UDP/ICMPv6 are treated as IPv6 # extension header. # # - The encrypted data after ESP is tried to parse. # # - ntohl() for ID in Fragment header is missing. # # - If doff*4 of TCP header is less than sizeof(struct tcphdr), # TCP options are tried to parse. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_LOG.c # 2004/10/19 02:14:54+02:00 yasuyuki.kozakai@toshiba.co.jp +178 -99 # [NETFILTER]: Enable ip6t_LOG.c to work without skb_linearize() # # This patch enables ip6t_LOG.c to work without skb_linearize(). # # I changed a large part of this file. At first, ip6_nexthdr() is deleted # to prevent multiple call of skb_header_pointer() at dump_packet() and # ip6_nexthdr(). # # And the following bugs are fixed. The first bug is fixed by introducing # skb_header_pointer(), then I didn't separate patches. # # - No check with skb->len. Then invalid memory access may occur. # # - If packet is fragmented and it's not first fragment, nonexistent # extension headers is tried to parse. # # - All headers which aren't TCP/UDP/ICMPv6 are treated as IPv6 # extension header. # # - The encrypted data after ESP is tried to parse. # # - ntohl() for ID in Fragment header is missing. # # - If doff*4 of TCP header is less than sizeof(struct tcphdr), # TCP options are tried to parse. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:13:27+02:00 yasuyuki.kozakai@toshiba.co.jp # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_rt.c # 2004/10/19 02:13:00+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_owner.c # 2004/10/19 02:13:00+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_multiport.c # 2004/10/19 02:13:00+02:00 yasuyuki.kozakai@toshiba.co.jp +3 -4 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_mark.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_mac.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_limit.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_length.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ipv6header.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_hl.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -1 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_hbh.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_frag.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_eui64.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_esp.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_dst.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_ah.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -2 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_MARK.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -1 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6t_LOG.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +1 -1 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # net/ipv6/netfilter/ip6_tables.c # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +122 -132 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # include/linux/netfilter_ipv6/ip6_tables.h # 2004/10/19 02:12:59+02:00 yasuyuki.kozakai@toshiba.co.jp +8 -4 # [NETFILTER]: prearation of removing skb_linearize() # # This patch uses skb_header_pointer() so that packets can be parsed even though # skb_linearize() doesn't exist. But this patch doesn't remove skb_linearize() # yet. We can remove it after changing all match/target modules. # # Moreover ... # - I deleted the optimization not to parse IPv6 extension header # many time from previous patch. I'll send the patch to do this # separately. # - fixed the bug that "offset" argument of match functions are always 0. # - deleted "hdr" and "datalen" argument and added "protoff" argument # to match functions. "protoff" means the offset to Layer 4 protocol # header. # - the argument order of target function is changed likely IPv4 modules. # This prevents user from meeting kernel panic when they use old # match modules. # - changed {tcp,udp,icmp6}_match(). These functions became very similar # to codes in ip_tables.c again. # # Signed-off-by: Yasuyuki KOZAKAI # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:08:50+02:00 rusty@rustcorp.com.au # [NETFILTER]: Change MASQUERADE to Use Device Address Directly # # Instead of doing a dubious route lookup, just use the first IP address # of the (dynamic) interface. Also, reset assured bit so after masq # connections can be cleaned up if memory pressure. # # Signed-off-by: Rusty Russell # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ipt_MASQUERADE.c # 2004/10/19 02:08:24+02:00 rusty@rustcorp.com.au +18 -29 # [NETFILTER]: Change MASQUERADE to Use Device Address Directly # # Instead of doing a dubious route lookup, just use the first IP address # of the (dynamic) interface. Also, reset assured bit so after masq # connections can be cleaned up if memory pressure. # # Signed-off-by: Rusty Russell # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/19 02:06:42+02:00 pablo@eurodev.net # [NETFILTER]: Clean up ip_conntrack stats # # Signed-off-by: Pablo Neira # Signed-off-by: Patrick McHardy # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/10/19 02:06:14+02:00 pablo@eurodev.net +2 -4 # [NETFILTER]: Clean up ip_conntrack stats # # Signed-off-by: Pablo Neira # Signed-off-by: Patrick McHardy # # ChangeSet # 2004/10/15 19:54:22-04:00 rddunlap@osdl.org # [PATCH] skfp: remove assignment expression in conditional (sparse)(v2) # # Fix sparse warning: # drivers/net/skfp/hwmtm.c:1904:20: warning: assignment expression in # conditional # # Signed-off-by: Randy Dunlap # # drivers/net/skfp/hwmtm.c # 2004/10/15 17:47:42-04:00 rddunlap@osdl.org +2 -1 # skfp: remove assignment expression in conditional (sparse)(v2) # # ChangeSet # 2004/10/15 19:53:37-04:00 shemminger@osdl.org # [PATCH] slip: use netdev_priv # # Replace dev->priv with netdev_priv(dev) # # Signed-off-by: Stephen Hemminger # # drivers/net/slip.c # 2004/10/15 15:35:54-04:00 shemminger@osdl.org +16 -18 # slip: use netdev_priv # # ChangeSet # 2004/10/15 19:53:24-04:00 shemminger@osdl.org # [PATCH] slip: use module_param # # Replace MODULE_PARM with module_param (also make slip_maxdev static). # # Signed-off-by: Stephen Hemminger # # drivers/net/slip.c # 2004/10/15 15:34:30-04:00 shemminger@osdl.org +3 -2 # slip: use module_param # # ChangeSet # 2004/10/15 19:44:57-04:00 shemminger@osdl.org # [PATCH] dummy: use netdev_priv # # Can use netdev_priv in dummy device. # # Signed-off-by: Stephen Hemminger # # drivers/net/dummy.c # 2004/10/15 17:25:11-04:00 shemminger@osdl.org +2 -2 # dummy: use netdev_priv # # ChangeSet # 2004/10/15 19:44:44-04:00 shemminger@osdl.org # [PATCH] eql: use netdev_priv # # Use netdev_priv where possible. # # Signed-off-by: Stephen Hemminger # # drivers/net/eql.c # 2004/10/15 17:26:15-04:00 shemminger@osdl.org +13 -13 # eql: use netdev_priv # # ChangeSet # 2004/10/15 19:43:15-04:00 shemminger@osdl.org # [PATCH] ns83820: use module_param # # Replace MODULE_PARM with module_param # # Signed-off-by: Stephen Hemminger # # drivers/net/ns83820.c # 2004/10/15 18:05:25-04:00 shemminger@osdl.org +5 -4 # ns83820: use module_param # # ChangeSet # 2004/10/15 19:13:34-04:00 jgarzik@pobox.com # Merge pobox.com:/spare/repo/linux-2.6 # into pobox.com:/spare/repo/netdev-2.6/janitor # # drivers/net/3c59x.c # 2004/10/15 19:13:31-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/10/15 15:31:42-04:00 bunk@stusta.de # [PATCH] net/tokenring/olympic.c: remove unused variable # # Recent changes in Linus' tree removed all uses of a variable, resulteing # in the following warning: # # <-- snip --> # # ... # CC drivers/net/tokenring/olympic.o # drivers/net/tokenring/olympic.c: In function `olympic_arb_cmd': # drivers/net/tokenring/olympic.c:1404: warning: unused variable `i' # ... # # <-- snip --> # # # The following patch removes this unused variable: # # # Signed-off-by: Adrian Bunk # # drivers/net/tokenring/olympic.c # 2004/10/07 16:53:15-04:00 bunk@stusta.de +0 -1 # net/tokenring/olympic.c: remove unused variable # # ChangeSet # 2004/10/15 15:27:16-04:00 linville@tuxdriver.com # [PATCH] 3c59x: style change in vortex_ethtool_ops declaration # # Style change suggested during patch review. # # Signed-off-by: John W. Linville # # drivers/net/3c59x.c # 2004/10/14 20:00:00-04:00 linville@tuxdriver.com +1 -1 # 3c59x: style change in vortex_ethtool_ops declaration # # ChangeSet # 2004/10/15 15:25:41-04:00 rddunlap@osdl.org # [PATCH] pcnet32: use unsigned 1-bit fields # # drivers/net/pcnet32.c # 2004/10/10 18:23:08-04:00 rddunlap@osdl.org +3 -3 # pcnet32: use unsigned 1-bit fields # # ChangeSet # 2004/10/15 12:47:59-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: white space corrections # # drivers/net/e1000/e1000_ethtool.c # 2004/10/07 16:59:53-04:00 ganesh.venkatesan@intel.com +0 -1 # e1000: white space corrections # # ChangeSet # 2004/10/15 12:47:46-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: driver version update # # drivers/net/e1000/e1000_main.c # 2004/10/07 16:59:54-04:00 ganesh.venkatesan@intel.com +1 -1 # e1000: driver version update # # ChangeSet # 2004/10/15 12:47:32-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: fix set ringparam for ethtool returning error code on bad input # # drivers/net/e1000/e1000_ethtool.c # 2004/10/07 16:59:53-04:00 ganesh.venkatesan@intel.com +3 -0 # e1000: fix set ringparam for ethtool returning error # # ChangeSet # 2004/10/15 12:47:19-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: remove unused function e1000_enable_mng_pass_thru # # drivers/net/e1000/e1000_hw.c # 2004/10/07 16:59:53-04:00 ganesh.venkatesan@intel.com +0 -25 # e1000: remove unused function e1000_enable_mng_pass_thru # # ChangeSet # 2004/10/15 12:47:06-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000: modified ethtool_set_pauseparam to use e1000_setup_link # for flow control settings for fiber serdes link # # drivers/net/e1000/e1000_ethtool.c # 2004/10/07 16:59:53-04:00 ganesh.venkatesan@intel.com +2 -1 # e1000: modified ethtool_set_pauseparam to use # # ChangeSet # 2004/10/14 09:10:57-04:00 pekon@fi.muni.cz # [PATCH] PATCH: netpoll with xircom_cb # # I have a headless computer with xircom pcmcia card and needed netconsole # on it. After looking around in other drivers I concocted this patch. It # survived light testing. I have no documentation for the hw, so it maybe # totally bogus. # # drivers/net/tulip/xircom_cb.c # 2004/10/13 21:54:34-04:00 pekon@fi.muni.cz +14 -0 # PATCH: netpoll with xircom_cb # # ChangeSet # 2004/10/07 14:06:21+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-sound # into suse.cz:/home/perex/bk/linux-sound/work # # sound/pci/intel8x0.c # 2004/10/07 14:06:00+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/seq_kernel.h # 2004/10/07 14:05:59+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/pcm.h # 2004/10/07 14:05:59+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/10/07 13:16:37+02:00 perex@suse.cz # Merge # # sound/pci/intel8x0.c # 2004/10/07 13:16:21+02:00 perex@suse.cz +9 -7 # SCCS merged # # include/sound/pcm.h # 2004/10/07 13:06:21+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/10/07 12:34:36+02:00 perex@suse.cz # [ALSA] Fix the detection of secondary codec # # CS46xx driver # Fixed the detection of secondary codec. # # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/10/06 05:25:53+02:00 perex@suse.cz +1 -2 # [ALSA] Fix the detection of secondary codec # # D:2004/10/06 11:25:53 # C:CS46xx driver # F:pci/cs46xx/cs46xx_lib.c:1.86->1.87 # L:Fixed the detection of secondary codec. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:33:47+02:00 perex@suse.cz # [ALSA] Fix Aureon CCS init sequence # # ICE1712 driver # - Fix Aureon 5.1 Sky GPIO write mask bits # - Fix 192kHz bit # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/10/06 05:19:28+02:00 perex@suse.cz +6 -6 # [ALSA] Fix Aureon CCS init sequence # # D:2004/10/06 11:19:28 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.20->1.21 # L:- Fix Aureon 5.1 Sky GPIO write mask bits # L:- Fix 192kHz bit # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:32:59+02:00 perex@suse.cz # [ALSA] Fix compilation (sync with parisc tree) # # PARISC Harmony driver # Sync with parisc tree - fix compilations, module description fixes. # # Signed-off-by: Takashi Iwai # # sound/parisc/harmony.c # 2004/10/06 05:12:12+02:00 perex@suse.cz +9 -6 # [ALSA] Fix compilation (sync with parisc tree) # # D:2004/10/06 11:12:12 # C:PARISC Harmony driver # F:parisc/harmony.c:1.17->1.18 # L:Sync with parisc tree - fix compilations, module description fixes. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:32:11+02:00 perex@suse.cz # [ALSA] Fix ac97 codec reset and clean up # # CS46xx driver # - Fixed AC97 codec RESET for duel codecs (only for CONFIG_SND_CS46XX_NEW_DSP) # - Clean up the codec detection routine # # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/10/06 04:55:22+02:00 perex@suse.cz +49 -74 # [ALSA] Fix ac97 codec reset and clean up # # D:2004/10/06 10:55:22 # C:CS46xx driver # F:pci/cs46xx/cs46xx_lib.c:1.85->1.86 # L:- Fixed AC97 codec RESET for duel codecs (only for CONFIG_SND_CS46XX_NEW_DSP) # L:- Clean up the codec detection routine # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:31:18+02:00 perex@suse.cz # [ALSA] Added dxs quirk for QDI Kudoz 7X/600-6AL # # VIA82xx driver # Added the default dxs_support entry for QDI Kudoz 7X/600-6AL. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/10/05 12:19:28+02:00 perex@suse.cz +1 -0 # [ALSA] Added dxs quirk for QDI Kudoz 7X/600-6AL # # D:2004/10/05 18:19:28 # C:VIA82xx driver # F:pci/via82xx.c:1.123->1.124 # L:Added the default dxs_support entry for QDI Kudoz 7X/600-6AL. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:30:20+02:00 perex@suse.cz # [ALSA] Fix typo # # ALSA sequencer # Fixed a typo for snd_seq_autoload_lock() in the last change # (only for the case without CONFIG_KMOD). # # Signed-off-by: Takashi Iwai # # include/sound/seq_kernel.h # 2004/10/05 05:07:41+02:00 perex@suse.cz +1 -1 # [ALSA] Fix typo # # D:2004/10/05 11:07:41 # C:ALSA sequencer # F:include/seq_kernel.h:1.12->1.13 # L:Fixed a typo for snd_seq_autoload_lock() in the last change # L:(only for the case without CONFIG_KMOD). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:29:22+02:00 perex@suse.cz # [ALSA] Add KERN_ERR to error messages # # ALSA Core # Added KERN_ERR prefix to error messages in snd_assert() and # snd_runtime_check() macros. # # Signed-off-by: Takashi Iwai # # include/sound/core.h # 2004/10/04 10:41:01+02:00 perex@suse.cz +2 -2 # [ALSA] Add KERN_ERR to error messages # # D:2004/10/04 16:41:01 # C:ALSA Core # F:include/core.h:1.58->1.59 # L:Added KERN_ERR prefix to error messages in snd_assert() and # L:snd_runtime_check() macros. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:28:22+02:00 perex@suse.cz # [ALSA] Fix pci_restore_state() # # ALSA Core # Fixed pci_save_state() call with the new API. # # Signed-off-by: Takashi Iwai # # sound/core/init.c # 2004/10/04 10:40:12+02:00 perex@suse.cz +1 -1 # [ALSA] Fix pci_restore_state() # # D:2004/10/04 16:40:12 # C:ALSA Core # F:core/init.c:1.48->1.49 # L:Fixed pci_save_state() call with the new API. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:27:21+02:00 perex@suse.cz # [ALSA] Fix dead blocking during module_init() # # ALSA sequencer,ALSA<-OSS sequencer # Fixed the auto-loading of modules during module_init(). # # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_midi.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +2 -0 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_dummy.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +5 -1 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_device.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +30 -1 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_clientmgr.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +1 -6 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq.c # 2004/10/04 05:33:23+02:00 perex@suse.cz +10 -12 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss.c # 2004/10/04 05:33:24+02:00 perex@suse.cz +9 -5 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # include/sound/seq_kernel.h # 2004/10/04 05:33:24+02:00 perex@suse.cz +8 -0 # [ALSA] Fix dead blocking during module_init() # # D:2004/10/04 11:33:23 # C:ALSA sequencer,ALSA<-OSS sequencer # F:core/seq/seq.c:1.15->1.16 # F:core/seq/seq_clientmgr.c:1.37->1.38 # F:core/seq/seq_device.c:1.16->1.17 # F:core/seq/seq_dummy.c:1.14->1.15 # F:core/seq/seq_midi.c:1.23->1.24 # F:core/seq/oss/seq_oss.c:1.16->1.17 # F:include/seq_kernel.h:1.11->1.12 # L:Fixed the auto-loading of modules during module_init(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:26:16+02:00 perex@suse.cz # [ALSA] Clean up bitmap # # EMU10K1/EMU10K2 driver # Clean up the declaration of bitmap with DECLARE_BITMAP(). # # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2004/10/01 10:16:50+02:00 perex@suse.cz +3 -3 # [ALSA] Clean up bitmap # # D:2004/10/01 16:16:50 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.46->1.47 # L:Clean up the declaration of bitmap with DECLARE_BITMAP(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:25:41+02:00 perex@suse.cz # [ALSA] fix snd_opl3_init documentation # # Documentation # # # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/10/01 08:43:42+02:00 perex@suse.cz +1 -1 # [ALSA] fix snd_opl3_init documentation # # D:2004/10/01 14:43:42 # C:Documentation # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.41->1.42 # L: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:25:09+02:00 perex@suse.cz # [ALSA] fix description of SPSA=3 in the proc file # # AC97 Codec Core # # # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_proc.c # 2004/10/01 08:42:22+02:00 perex@suse.cz +1 -1 # [ALSA] fix description of SPSA=3 in the proc file # # D:2004/10/01 14:42:22 # C:AC97 Codec Core # F:pci/ac97/ac97_proc.c:1.11->1.12 # L: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:24:37+02:00 perex@suse.cz # [ALSA] fix DAC slot assignment # # AC97 Codec Core # write the DAC slot assignment bits to the extended ID register # where they belong instead of overwriting the SPSA bits in the # extended status register # # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_pcm.c # 2004/10/01 08:41:04+02:00 perex@suse.cz +2 -2 # [ALSA] fix DAC slot assignment # # D:2004/10/01 14:41:04 # C:AC97 Codec Core # F:pci/ac97/ac97_pcm.c:1.17->1.18 # L:write the DAC slot assignment bits to the extended ID register # L:where they belong instead of overwriting the SPSA bits in the # L:extended status register # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:24:06+02:00 perex@suse.cz # [ALSA] Fix / clean up OPL3 for CS4281 # # Documentation,OPL3,CS4281 driver # Moved cs4281-specific code into cs4281 driver from opl3. # The ugly type-casting is removed now. # # The opl3 instance can be created via snd_opl3_new() (followed by # snd_opl3_init()) to allow the driver to set its own command and # private_data/private_free. # # snd_opl3_create() is kept for compatibility as it was. # # Signed-off-by: Takashi Iwai # # sound/pci/cs4281.c # 2004/09/30 11:48:43+02:00 perex@suse.cz +29 -4 # [ALSA] Fix / clean up OPL3 for CS4281 # # D:2004/09/30 17:48:43 # C:Documentation,OPL3,CS4281 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.40->1.41 # F:drivers/opl3/opl3_lib.c:1.22->1.23 # F:include/opl3.h:1.11->1.12 # F:pci/cs4281.c:1.64->1.65 # L:Moved cs4281-specific code into cs4281 driver from opl3. # L:The ugly type-casting is removed now. # L: # L:The opl3 instance can be created via snd_opl3_new() (followed by # L:snd_opl3_init()) to allow the driver to set its own command and # L:private_data/private_free. # L: # L:snd_opl3_create() is kept for compatibility as it was. # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_lib.c # 2004/09/30 11:48:43+02:00 perex@suse.cz +70 -68 # [ALSA] Fix / clean up OPL3 for CS4281 # # D:2004/09/30 17:48:43 # C:Documentation,OPL3,CS4281 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.40->1.41 # F:drivers/opl3/opl3_lib.c:1.22->1.23 # F:include/opl3.h:1.11->1.12 # F:pci/cs4281.c:1.64->1.65 # L:Moved cs4281-specific code into cs4281 driver from opl3. # L:The ugly type-casting is removed now. # L: # L:The opl3 instance can be created via snd_opl3_new() (followed by # L:snd_opl3_init()) to allow the driver to set its own command and # L:private_data/private_free. # L: # L:snd_opl3_create() is kept for compatibility as it was. # Signed-off-by: Takashi Iwai # # include/sound/opl3.h # 2004/09/30 11:48:43+02:00 perex@suse.cz +5 -0 # [ALSA] Fix / clean up OPL3 for CS4281 # # D:2004/09/30 17:48:43 # C:Documentation,OPL3,CS4281 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.40->1.41 # F:drivers/opl3/opl3_lib.c:1.22->1.23 # F:include/opl3.h:1.11->1.12 # F:pci/cs4281.c:1.64->1.65 # L:Moved cs4281-specific code into cs4281 driver from opl3. # L:The ugly type-casting is removed now. # L: # L:The opl3 instance can be created via snd_opl3_new() (followed by # L:snd_opl3_init()) to allow the driver to set its own command and # L:private_data/private_free. # L: # L:snd_opl3_create() is kept for compatibility as it was. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/09/30 11:48:43+02:00 perex@suse.cz +33 -1 # [ALSA] Fix / clean up OPL3 for CS4281 # # D:2004/09/30 17:48:43 # C:Documentation,OPL3,CS4281 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.40->1.41 # F:drivers/opl3/opl3_lib.c:1.22->1.23 # F:include/opl3.h:1.11->1.12 # F:pci/cs4281.c:1.64->1.65 # L:Moved cs4281-specific code into cs4281 driver from opl3. # L:The ugly type-casting is removed now. # L: # L:The opl3 instance can be created via snd_opl3_new() (followed by # L:snd_opl3_init()) to allow the driver to set its own command and # L:private_data/private_free. # L: # L:snd_opl3_create() is kept for compatibility as it was. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:23:34+02:00 perex@suse.cz # ALSA CVS update # USB generic driver # add Edirol UA-25 support # # Signed-off-by: Clemens Ladisch # # sound/usb/usbquirks.h # 2004/09/30 05:11:25+02:00 perex@suse.cz +34 -3 # ALSA CVS update # D:2004/09/30 11:11:25 # C:USB generic driver # F:usb/usbaudio.c:1.109->1.110 # F:usb/usbaudio.h:1.34->1.35 # F:usb/usbquirks.h:1.37->1.38 # L:add Edirol UA-25 support # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.h # 2004/09/30 05:11:25+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/09/30 11:11:25 # C:USB generic driver # F:usb/usbaudio.c:1.109->1.110 # F:usb/usbaudio.h:1.34->1.35 # F:usb/usbquirks.h:1.37->1.38 # L:add Edirol UA-25 support # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.c # 2004/09/30 05:11:25+02:00 perex@suse.cz +26 -10 # ALSA CVS update # D:2004/09/30 11:11:25 # C:USB generic driver # F:usb/usbaudio.c:1.109->1.110 # F:usb/usbaudio.h:1.34->1.35 # F:usb/usbquirks.h:1.37->1.38 # L:add Edirol UA-25 support # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:23:01+02:00 perex@suse.cz # [ALSA] Fix AC3 playback on SB Live # # EMU10K1/EMU10K2 driver # Fix the AC3 playback on SB Live! # (Audigy has been working fine.) # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/09/30 05:06:53+02:00 perex@suse.cz +1 -1 # [ALSA] Fix AC3 playback on SB Live # # D:2004/09/30 11:06:53 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.32->1.33 # L:Fix the AC3 playback on SB Live! # L:(Audigy has been working fine.) # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:22:30+02:00 perex@suse.cz # [ALSA] Fix AC97 master mute # # ICE1712 driver # Instead of muting the AC97 chip and thus eliminating the possibility of recording, # muting is done by setting front playback to DAC only instead of DAC+AUX. # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/09/29 10:55:44+02:00 perex@suse.cz +39 -3 # [ALSA] Fix AC97 master mute # # D:2004/09/29 16:55:44 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.19->1.20 # L:Instead of muting the AC97 chip and thus eliminating the possibility of recording, # L:muting is done by setting front playback to DAC only instead of DAC+AUX. # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:21:33+02:00 perex@suse.cz # [ALSA] Fix SPDIF support on ICH4/5/6 # # Intel8x0 driver # Fixed SPDIF support on ICH4/5/6. The driver name of these chipsets # is set as 'ICH4' to tell from the older ICHs. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/29 10:46:41+02:00 perex@suse.cz +11 -0 # [ALSA] Fix SPDIF support on ICH4/5/6 # # D:2004/09/29 16:46:41 # C:Intel8x0 driver # F:pci/intel8x0.c:1.171->1.172 # L:Fixed SPDIF support on ICH4/5/6. The driver name of these chipsets # L:is set as 'ICH4' to tell from the older ICHs. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:20:47+02:00 perex@suse.cz # [ALSA] Add (experimental) CM9761 support # # AC97 Codec Core # CM9761 support patch is added. # At least, SPDIF and 4.0 output seems working. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_patch.h # 2004/09/29 10:45:52+02:00 perex@suse.cz +1 -0 # [ALSA] Add (experimental) CM9761 support # # D:2004/09/29 16:45:52 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.149->1.150 # F:pci/ac97/ac97_id.h:1.9->1.10 # F:pci/ac97/ac97_patch.c:1.57->1.58 # F:pci/ac97/ac97_patch.h:1.16->1.17 # L:CM9761 support patch is added. # L:At least, SPDIF and 4.0 output seems working. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_patch.c # 2004/09/29 10:45:52+02:00 perex@suse.cz +134 -0 # [ALSA] Add (experimental) CM9761 support # # D:2004/09/29 16:45:52 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.149->1.150 # F:pci/ac97/ac97_id.h:1.9->1.10 # F:pci/ac97/ac97_patch.c:1.57->1.58 # F:pci/ac97/ac97_patch.h:1.16->1.17 # L:CM9761 support patch is added. # L:At least, SPDIF and 4.0 output seems working. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_id.h # 2004/09/29 10:45:52+02:00 perex@suse.cz +3 -0 # [ALSA] Add (experimental) CM9761 support # # D:2004/09/29 16:45:52 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.149->1.150 # F:pci/ac97/ac97_id.h:1.9->1.10 # F:pci/ac97/ac97_patch.c:1.57->1.58 # F:pci/ac97/ac97_patch.h:1.16->1.17 # L:CM9761 support patch is added. # L:At least, SPDIF and 4.0 output seems working. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/09/29 10:45:52+02:00 perex@suse.cz +3 -0 # [ALSA] Add (experimental) CM9761 support # # D:2004/09/29 16:45:52 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.149->1.150 # F:pci/ac97/ac97_id.h:1.9->1.10 # F:pci/ac97/ac97_patch.c:1.57->1.58 # F:pci/ac97/ac97_patch.h:1.16->1.17 # L:CM9761 support patch is added. # L:At least, SPDIF and 4.0 output seems working. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:19:58+02:00 perex@suse.cz # [ALSA] add overclocking option for the analog input # # PCI drivers,BT87x driver # adds CONFIG_SND_BT87X_OVERCLOCK to enable sample rates # up to 1792000 Hz when recording from the analog input # # Signed-off-by: Clemens Ladisch # # sound/pci/bt87x.c # 2004/09/29 08:33:18+02:00 perex@suse.cz +14 -6 # [ALSA] add overclocking option for the analog input # # D:2004/09/29 14:33:18 # C:PCI drivers,BT87x driver # F:pci/Kconfig:1.34->1.35 # F:pci/bt87x.c:1.13->1.14 # L:adds CONFIG_SND_BT87X_OVERCLOCK to enable sample rates # L:up to 1792000 Hz when recording from the analog input # Signed-off-by: Clemens Ladisch # # sound/pci/Kconfig # 2004/09/29 08:33:18+02:00 perex@suse.cz +10 -0 # [ALSA] add overclocking option for the analog input # # D:2004/09/29 14:33:18 # C:PCI drivers,BT87x driver # F:pci/Kconfig:1.34->1.35 # F:pci/bt87x.c:1.13->1.14 # L:adds CONFIG_SND_BT87X_OVERCLOCK to enable sample rates # L:up to 1792000 Hz when recording from the analog input # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/10/07 12:19:13+02:00 perex@suse.cz # [ALSA] Add reset_workaround module option # # Documentation,NM256 driver # - The workaround for some laptops like Dell Latitude LS can be # specified via reset_workaround module option, too. # - The check of reset_workaround is merged into the quirk table. # - The spinlock in AC97 reset callback is removed. # # Signed-off-by: Takashi Iwai # # sound/pci/nm256/nm256.c # 2004/09/28 11:44:03+02:00 perex@suse.cz +20 -20 # [ALSA] Add reset_workaround module option # # D:2004/09/28 17:44:02 # C:Documentation,NM256 driver # F:Documentation/ALSA-Configuration.txt:1.52->1.53 # F:pci/nm256/nm256.c:1.51->1.52 # L:- The workaround for some laptops like Dell Latitude LS can be # L: specified via reset_workaround module option, too. # L:- The check of reset_workaround is merged into the quirk table. # L:- The spinlock in AC97 reset callback is removed. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/09/28 11:44:02+02:00 perex@suse.cz +6 -0 # [ALSA] Add reset_workaround module option # # D:2004/09/28 17:44:02 # C:Documentation,NM256 driver # F:Documentation/ALSA-Configuration.txt:1.52->1.53 # F:pci/nm256/nm256.c:1.51->1.52 # L:- The workaround for some laptops like Dell Latitude LS can be # L: specified via reset_workaround module option, too. # L:- The check of reset_workaround is merged into the quirk table. # L:- The spinlock in AC97 reset callback is removed. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:18:24+02:00 perex@suse.cz # [ALSA] Adds AC'97 support to Aureon cards. # # ICE1712 driver # This patch adds support of the STAC9744 chip located on Aureon cards, # enabling volume control for analogue input channels. # It also adds the posibility of listening to both the analogue inputs # and the digital audio. # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.h # 2004/09/27 09:45:22+02:00 perex@suse.cz +2 -0 # [ALSA] Adds AC'97 support to Aureon cards. # # D:2004/09/27 15:45:22 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.18->1.19 # F:pci/ice1712/aureon.h:1.4->1.5 # F:pci/ice1712/ice1712.h:1.24->1.25 # L:This patch adds support of the STAC9744 chip located on Aureon cards, # L:enabling volume control for analogue input channels. # L:It also adds the posibility of listening to both the analogue inputs # L:and the digital audio. # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.h # 2004/09/27 09:45:22+02:00 perex@suse.cz +5 -0 # [ALSA] Adds AC'97 support to Aureon cards. # # D:2004/09/27 15:45:22 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.18->1.19 # F:pci/ice1712/aureon.h:1.4->1.5 # F:pci/ice1712/ice1712.h:1.24->1.25 # L:This patch adds support of the STAC9744 chip located on Aureon cards, # L:enabling volume control for analogue input channels. # L:It also adds the posibility of listening to both the analogue inputs # L:and the digital audio. # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/09/27 09:45:22+02:00 perex@suse.cz +333 -5 # [ALSA] Adds AC'97 support to Aureon cards. # # D:2004/09/27 15:45:22 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.18->1.19 # F:pci/ice1712/aureon.h:1.4->1.5 # F:pci/ice1712/ice1712.h:1.24->1.25 # L:This patch adds support of the STAC9744 chip located on Aureon cards, # L:enabling volume control for analogue input channels. # L:It also adds the posibility of listening to both the analogue inputs # L:and the digital audio. # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:17:32+02:00 perex@suse.cz # [ALSA] Clean up ice1712 chip struct # # ICE1712 driver # Clean up of ice1712 chip struct. The board-specific data are moved # to spec union. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.h # 2004/09/27 09:44:14+02:00 perex@suse.cz +13 -5 # [ALSA] Clean up ice1712 chip struct # # D:2004/09/27 15:44:14 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.19->1.20 # F:pci/ice1712/hoontech.c:1.7->1.8 # F:pci/ice1712/ice1712.h:1.23->1.24 # L:Clean up of ice1712 chip struct. The board-specific data are moved # L:to spec union. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/hoontech.c # 2004/09/27 09:44:14+02:00 perex@suse.cz +82 -82 # [ALSA] Clean up ice1712 chip struct # # D:2004/09/27 15:44:14 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.19->1.20 # F:pci/ice1712/hoontech.c:1.7->1.8 # F:pci/ice1712/ice1712.h:1.23->1.24 # L:Clean up of ice1712 chip struct. The board-specific data are moved # L:to spec union. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ews.c # 2004/09/27 09:44:14+02:00 perex@suse.cz +32 -22 # [ALSA] Clean up ice1712 chip struct # # D:2004/09/27 15:44:14 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.19->1.20 # F:pci/ice1712/hoontech.c:1.7->1.8 # F:pci/ice1712/ice1712.h:1.23->1.24 # L:Clean up of ice1712 chip struct. The board-specific data are moved # L:to spec union. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:16:41+02:00 perex@suse.cz # [ALSA] Fix peakmeter ioctl on big-endian # # RME HDSP driver # Fixed the data transfer of peakmeter ioctl on big-endian architectures. # # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/09/27 08:00:11+02:00 perex@suse.cz +66 -53 # [ALSA] Fix peakmeter ioctl on big-endian # # D:2004/09/27 14:00:11 # C:RME HDSP driver # F:pci/rme9652/hdsp.c:1.70->1.71 # L:Fixed the data transfer of peakmeter ioctl on big-endian architectures. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:15:56+02:00 perex@suse.cz # [ALSA] Replace with usb_kill_urb() # # USB generic driver # Use usb_kill_urb() instead of deprecated usb_unlink_urb() for sync'ed URBs. # # Signed-off-by: Takashi Iwai # # sound/usb/usbaudio.c # 2004/09/24 10:50:48+02:00 perex@suse.cz +8 -8 # [ALSA] Replace with usb_kill_urb() # # D:2004/09/24 16:50:48 # C:USB generic driver # F:usb/usbaudio.c:1.108->1.109 # L:Use usb_kill_urb() instead of deprecated usb_unlink_urb() for sync'ed URBs. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 12:15:03+02:00 perex@suse.cz # [ALSA] snd-usb-usx2y 0.7.3 # # USB generic driver,USB USX2Y # Use usb_kill_urb() instead of deprecated usb_unlink_urb() # # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usbusx2yaudio.c # 2004/09/24 10:50:04+02:00 perex@suse.cz +17 -19 # [ALSA] snd-usb-usx2y 0.7.3 # # D:2004/09/24 16:50:04 # C:USB generic driver,USB USX2Y # F:usb/usbmidi.c:1.33->1.34 # F:usb/usx2y/usbusx2y.c:1.2->1.3 # F:usb/usx2y/usbusx2yaudio.c:1.3->1.4 # L:Use usb_kill_urb() instead of deprecated usb_unlink_urb() # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usbusx2y.c # 2004/09/24 10:50:04+02:00 perex@suse.cz +7 -3 # [ALSA] snd-usb-usx2y 0.7.3 # # D:2004/09/24 16:50:04 # C:USB generic driver,USB USX2Y # F:usb/usbmidi.c:1.33->1.34 # F:usb/usx2y/usbusx2y.c:1.2->1.3 # F:usb/usx2y/usbusx2yaudio.c:1.3->1.4 # L:Use usb_kill_urb() instead of deprecated usb_unlink_urb() # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # sound/usb/usbmidi.c # 2004/09/24 10:50:04+02:00 perex@suse.cz +3 -3 # [ALSA] snd-usb-usx2y 0.7.3 # # D:2004/09/24 16:50:04 # C:USB generic driver,USB USX2Y # F:usb/usbmidi.c:1.33->1.34 # F:usb/usx2y/usbusx2y.c:1.2->1.3 # F:usb/usx2y/usbusx2yaudio.c:1.3->1.4 # L:Use usb_kill_urb() instead of deprecated usb_unlink_urb() # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:56:30+02:00 perex@suse.cz # [ALSA] Fix drain/drop of linked PCM streams # # PCM Midlevel # This patch fixes the dead-locking of linked PCM streams when # drain/drop is called. The counter field is added to pcm group # struct to handle link/unlink more easily. # # When the PCM streams are linked, start/drain/drop are operated # to all linked streams. The drain will wait until draining of all # linked streams are finished. # # The XRUN triggers stopping of all linked streams and changes the # state of all of them to XRUN even if only one of them is actually # in XRUN. # # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2004/09/24 09:25:02+02:00 perex@suse.cz +320 -314 # [ALSA] Fix drain/drop of linked PCM streams # # D:2004/09/24 15:25:02 # C:PCM Midlevel # F:core/pcm_lib.c:1.57->1.58 # F:core/pcm_native.c:1.106->1.107 # F:include/pcm.h:1.48->1.49 # L:This patch fixes the dead-locking of linked PCM streams when # L:drain/drop is called. The counter field is added to pcm group # L:struct to handle link/unlink more easily. # L: # L:When the PCM streams are linked, start/drain/drop are operated # L:to all linked streams. The drain will wait until draining of all # L:linked streams are finished. # L: # L:The XRUN triggers stopping of all linked streams and changes the # L:state of all of them to XRUN even if only one of them is actually # L:in XRUN. # Signed-off-by: Takashi Iwai # # sound/core/pcm_lib.c # 2004/09/24 09:25:02+02:00 perex@suse.cz +1 -1 # [ALSA] Fix drain/drop of linked PCM streams # # D:2004/09/24 15:25:02 # C:PCM Midlevel # F:core/pcm_lib.c:1.57->1.58 # F:core/pcm_native.c:1.106->1.107 # F:include/pcm.h:1.48->1.49 # L:This patch fixes the dead-locking of linked PCM streams when # L:drain/drop is called. The counter field is added to pcm group # L:struct to handle link/unlink more easily. # L: # L:When the PCM streams are linked, start/drain/drop are operated # L:to all linked streams. The drain will wait until draining of all # L:linked streams are finished. # L: # L:The XRUN triggers stopping of all linked streams and changes the # L:state of all of them to XRUN even if only one of them is actually # L:in XRUN. # Signed-off-by: Takashi Iwai # # include/sound/pcm.h # 2004/09/24 09:25:03+02:00 perex@suse.cz +2 -0 # [ALSA] Fix drain/drop of linked PCM streams # # D:2004/09/24 15:25:02 # C:PCM Midlevel # F:core/pcm_lib.c:1.57->1.58 # F:core/pcm_native.c:1.106->1.107 # F:include/pcm.h:1.48->1.49 # L:This patch fixes the dead-locking of linked PCM streams when # L:drain/drop is called. The counter field is added to pcm group # L:struct to handle link/unlink more easily. # L: # L:When the PCM streams are linked, start/drain/drop are operated # L:to all linked streams. The drain will wait until draining of all # L:linked streams are finished. # L: # L:The XRUN triggers stopping of all linked streams and changes the # L:state of all of them to XRUN even if only one of them is actually # L:in XRUN. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:55:58+02:00 perex@suse.cz # [ALSA] Aureon S/PDIF input fixes # # ICE1712 driver # GPIO directions changed # * GPIO>22 not configured as they do not exist # * GPIO22 set to output (CS8415A CS pin) # * GPIO21 set to input. (SPI MISO pin) # # Init sequence of CS8415A changed: # * SWCLK is set to 1 (OMCK output to RMCK pin) # * MUX2:0 is set to 001 (S/PDIF input on RXP1) # * SODEL is set to 1 (MSB of SDOUT data occurs if the second OSCLK period after the OLRCK edge) # * SOLRPOL is set to 1 (SDOUT data is for the right channel with OLRCK is high) # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/09/24 07:42:05+02:00 perex@suse.cz +2 -2 # [ALSA] Aureon S/PDIF input fixes # # D:2004/09/24 13:42:05 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.17->1.18 # L:GPIO directions changed # L: * GPIO>22 not configured as they do not exist # L: * GPIO22 set to output (CS8415A CS pin) # L: * GPIO21 set to input. (SPI MISO pin) # L: # L:Init sequence of CS8415A changed: # L: * SWCLK is set to 1 (OMCK output to RMCK pin) # L: * MUX2:0 is set to 001 (S/PDIF input on RXP1) # L: * SODEL is set to 1 (MSB of SDOUT data occurs if the second OSCLK period after the OLRCK edge) # L: * SOLRPOL is set to 1 (SDOUT data is for the right channel with OLRCK is high) # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:55:16+02:00 perex@suse.cz # [ALSA] Aureon S/PDIF input fixes # # ICE1712 driver # Fix GPIO pin directions and use RXP1 instead of RXP0 as S/PDIF source on CS8415A # # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/09/24 07:28:44+02:00 perex@suse.cz +5 -5 # [ALSA] Aureon S/PDIF input fixes # # D:2004/09/24 13:28:44 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.16->1.17 # L:Fix GPIO pin directions and use RXP1 instead of RXP0 as S/PDIF source on CS8415A # Signed-off-by: Peter Christensen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:54:31+02:00 perex@suse.cz # [ALSA] Fix DXS entry for GA-7VAX # # VIA82xx driver # From: 1 1 # # I have tested my MB GA-7VAX and want to say you that you should use # VIA_DXS_ENABLE instead VIA_DXS_NO_VRA. On the maximum volume output level # with VIA_DXS_NO_VRA there is abnormal loud noise, and with VIA_DXS_ENABLE # there are much less noises. And I have detected unused code section. # # Signed-off-by: Andrew Morton # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/09/24 05:08:02+02:00 perex@suse.cz +1 -7 # [ALSA] Fix DXS entry for GA-7VAX # # D:2004/09/24 11:08:02 # C:VIA82xx driver # F:pci/via82xx.c:1.122->1.123 # L:From: 1 1 # L: # L:I have tested my MB GA-7VAX and want to say you that you should use # L:VIA_DXS_ENABLE instead VIA_DXS_NO_VRA. On the maximum volume output level # L:with VIA_DXS_NO_VRA there is abnormal loud noise, and with VIA_DXS_ENABLE # L:there are much less noises. And I have detected unused code section. # Signed-off-by: Andrew Morton # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:53:30+02:00 perex@suse.cz # [ALSA] Fix HDSP meter ioctl # # RME HDSP driver # Fixes and clean up of GET_PEAK_RMS ioctl. # # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/09/23 05:05:29+02:00 perex@suse.cz +122 -98 # [ALSA] Fix HDSP meter ioctl # # D:2004/09/23 11:05:29 # C:RME HDSP driver # F:pci/rme9652/hdsp.c:1.69->1.70 # L:Fixes and clean up of GET_PEAK_RMS ioctl. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:52:15+02:00 perex@suse.cz # [ALSA] more au88x0 eq cleanups # # au88x0 driver # cleanup au88x0 equalizer code by factoring out a sign_invert function # that ensures all negative integers become positive. # # Signed-off-by: Jeff Muizelaar # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0_eq.c # 2004/09/22 11:11:17+02:00 perex@suse.cz +25 -51 # [ALSA] more au88x0 eq cleanups # # D:2004/09/22 17:11:17 # C:au88x0 driver # F:pci/au88x0/au88x0_eq.c:1.4->1.5 # L:cleanup au88x0 equalizer code by factoring out a sign_invert function # L:that ensures all negative integers become positive. # Signed-off-by: Jeff Muizelaar # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/07 11:51:16+02:00 perex@suse.cz # [ALSA] Fix the variable types in struct # # RME HDSP driver # The variable types are declared explicitly like u32 and u64 # to avoid ambiguity. # # Signed-off-by: Takashi Iwai # # include/sound/hdsp.h # 2004/09/22 10:20:44+02:00 perex@suse.cz +6 -6 # [ALSA] Fix the variable types in struct # # D:2004/09/22 16:20:44 # C:RME HDSP driver # F:include/hdsp.h:1.6->1.7 # L:The variable types are declared explicitly like u32 and u64 # L:to avoid ambiguity. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/10/06 23:44:56-04:00 akpm@osdl.org # [PATCH] fix acenic hotplug # # From: Anton Blanchard # # Now that the acenic has been converted to the hotplug API a number of uses # of __init and __initdata have to be changed to __devinit and __devinitdata. # # Acked-by: Jes Sorensen # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # # drivers/net/acenic_firmware.h # 2004/10/05 02:28:48-04:00 akpm@osdl.org +1 -1 # fix acenic hotplug # # drivers/net/acenic.c # 2004/10/05 02:30:43-04:00 akpm@osdl.org +10 -10 # fix acenic hotplug # # ChangeSet # 2004/10/04 17:17:08-04:00 nhorman@redhat.com # [PATCH] ns83820: add vlan tag hardware acceleration support # # I was poking about in the National Semi 83820 driver, and I happened to notice that the chip supports vlan tag add/strip assist in hardware, but the driver wasn't making use of it. This patch adds in the driver support to use the vlan tag add/remove hardware, and enables the drivers use of the kernel vlan hwaccel interface. # # Signed-off-by: Neil Horman # # drivers/net/ns83820.c # 2004/10/01 09:29:04-04:00 nhorman@redhat.com +106 -6 # ns83820: add vlan tag hardware acceleration support # # ChangeSet # 2004/10/04 16:51:14-04:00 sfeldma@pobox.com # [PATCH] janitor: net/tulip: pci_find_device to pci_dev_present # # Replace pci_find_device with pci_dev_present. Compile tested. # # Signed-off-by: Scott Feldman # # drivers/net/tulip/tulip_core.c # 2004/10/03 01:01:22-04:00 sfeldma@pobox.com +12 -9 # janitor: net/tulip: pci_find_device to pci_dev_present # # ChangeSet # 2004/10/04 16:51:01-04:00 sfeldma@pobox.com # [PATCH] janitor: net/sis900: pci_find_device to pci_get_device # # Replace pci_find_device with pci_get_device/pci_dev_put to plug # race with pci_find_device. Compile tested. # # Signed-off-by: Scott Feldman # # drivers/net/sis900.c # 2004/10/03 00:29:07-04:00 sfeldma@pobox.com +10 -8 # janitor: net/sis900: pci_find_device to pci_get_device # # ChangeSet # 2004/10/01 00:22:45-04:00 jesse.brandeburg@intel.com # [PATCH] e100: whitespace and DPRINTKS # # This is a short patch to add a couple of new DPRINTKS and fix some # whitespace issues. # # Signed-off-by: Jesse Brandeburg # # drivers/net/e100.c # 2004/09/22 14:55:01-04:00 jesse.brandeburg@intel.com +6 -3 # e100: whitespace and DPRINTKS # # ChangeSet # 2004/10/01 00:22:32-04:00 jesse.brandeburg@intel.com # [PATCH] e100: fix NAPI race with watchdog # # While polling in NAPI mode, we were occassionally getting interrupts # re-enabled by the watchdog trying to generate a software interrupt. Fix # is to add a spinlock around that shared hardware register to allow a # read-modify-write operation. This was nasty nasty. I don't like the # spinlock in the hot path but i see no other way. Comments are welcome. # Updates the driver version as well. # # Signed-off-by: Jesse Brandeburg # # drivers/net/e100.c # 2004/09/22 14:49:05-04:00 jesse.brandeburg@intel.com +16 -3 # e100: fix NAPI race with watchdog # # ChangeSet # 2004/10/01 00:20:57-04:00 jesse.brandeburg@intel.com # [PATCH] ixgb: fix endianness issue for tx cleanup # # This patch fixes tx cleanup so that it works correctly on big endian # machines. # This time I remembered to update the version string. # # Signed-off-by: Jesse Brandeburg # # drivers/net/ixgb/ixgb_main.c # 2004/09/22 15:01:42-04:00 jesse.brandeburg@intel.com +2 -2 # RESEND ixgb: fix endianness issue for tx cleanup # # ChangeSet # 2004/10/01 00:18:59-04:00 nacc@us.ibm.com # [PATCH] net/de2104x: replace schedule_timeout() with msleep() # # Any comments would be appreciated. # # Description: Use msleep() instead of schedule_timeout() # to guarantee the task delays as expected. # # Signed-off-by: Nishanth Aravamudan # # drivers/net/tulip/de2104x.c # 2004/09/15 12:38:42-04:00 nacc@us.ibm.com +1 -2 # net/de2104x: replace schedule_timeout() with msleep() # # ChangeSet # 2004/10/01 00:14:33-04:00 akpm@osdl.org # [PATCH] e1000 sparc64 dma_mapping build fix # # drivers/net/e1000/e1000_main.c: In function `e1000_probe': # drivers/net/e1000/e1000_main.c:389: error: `DMA_64BIT_MASK' undeclared (first use in this function) # drivers/net/e1000/e1000_main.c:389: error: (Each undeclared identifier is reported only once # drivers/net/e1000/e1000_main.c:389: error: for each function it appears in.) # drivers/net/e1000/e1000_main.c:392: error: `DMA_32BIT_MASK' undeclared (first use in this function) # # Signed-off-by: Andrew Morton # # drivers/net/e1000/e1000.h # 2004/09/21 02:38:09-04:00 akpm@osdl.org +1 -0 # e1000 sparc64 dma_mapping build fix # # ChangeSet # 2004/10/01 00:13:59-04:00 akpm@osdl.org # [PATCH] igxb speedup # # The interrupt routine will call both those functions even if the first doesn't # have any work to do. # # Signed-off-by: Andrew Morton # # drivers/net/ixgb/ixgb_main.c # 2004/08/30 03:50:40-04:00 akpm@osdl.org +5 -1 # igxb speedup # # ChangeSet # 2004/09/30 23:29:15-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 update -- fix MODULE_PARM, module_param, module_param_array # # drivers/net/e1000/e1000_param.c # 2004/09/21 00:54:34-04:00 ganesh.venkatesan@intel.com +104 -63 # e1000 update -- fix MODULE_PARM, module_param, # # drivers/net/e1000/e1000.h # 2004/09/21 00:54:33-04:00 ganesh.venkatesan@intel.com +0 -1 # e1000 update -- fix MODULE_PARM, module_param, # # drivers/net/Kconfig # 2004/09/17 11:39:00-04:00 akpm@osdl.org +12 -12 # via-velocity Kconfig fix # # ChangeSet # 2004/09/30 19:33:53-04:00 jgarzik@pobox.com # Merge pobox.com:/spare/repo/linux-2.6 # into pobox.com:/spare/repo/netdev-2.6/misc # # drivers/net/Kconfig # 2004/09/30 19:33:49-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/09/22 12:28:46+02:00 perex@suse.cz # [ALSA] don't stop capture on errors # # BT87x driver # don't stop capture on errors because there's too much broken hardware out there # # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 12:28:15+02:00 perex@suse.cz # [ALSA] remove 'Rawmidi' part from sequencer port names # # ALSA sequencer # # # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 11:25:08+02:00 perex@suse.cz # Merge # # ChangeSet # 2004/09/22 10:06:58+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # sound/pci/bt87x.c # 2004/09/22 03:53:26+02:00 perex@suse.cz +2 -3 # [ALSA] don't stop capture on errors # # D:2004/09/22 09:53:26 # C:BT87x driver # F:pci/bt87x.c:1.12->1.13 # L:don't stop capture on errors because there's too much broken hardware out there # Signed-off-by: Clemens Ladisch # # sound/core/seq/seq_midi.c # 2004/09/22 02:16:27+02:00 perex@suse.cz +1 -1 # [ALSA] remove 'Rawmidi' part from sequencer port names # # D:2004/09/22 08:16:27 # C:ALSA sequencer # F:core/seq/seq_midi.c:1.22->1.23 # L: # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/22 11:24:55+02:00 perex@suse.cz +0 -8 # SCCS merged # # sound/pci/atiixp_modem.c # 2004/09/22 11:23:23+02:00 perex@suse.cz +0 -3 # SCCS merged # # sound/pci/atiixp.c # 2004/09/22 11:23:14+02:00 perex@suse.cz +0 -3 # SCCS merged # # sound/pci/intel8x0.c # 2004/09/22 10:06:47+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/09/22 09:55:28+02:00 perex@suse.cz # [ALSA] use card-specific driver name # # au88x0 driver # use CARD_NAME_SHORT as driver name to allow different configuration file aliases in alsa-lib # # Signed-off-by: Clemens Ladisch # # sound/pci/au88x0/au88x0.c # 2004/09/22 02:11:15+02:00 perex@suse.cz +1 -1 # [ALSA] use card-specific driver name # # D:2004/09/22 08:11:15 # C:au88x0 driver # F:pci/au88x0/au88x0.c:1.12->1.13 # L:use CARD_NAME_SHORT as driver name to allow different configuration file aliases in alsa-lib # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:55:06+02:00 perex@suse.cz # [ALSA] Fix SPDIF rate setting for old ICHs # # Intel8x0 driver # Force to set SPDIF rate when PCMOUT is used on ICH[1-3]. # ICH4, NFORCE and ALI uses a separate DMA for SPDIF. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/21 08:15:27+02:00 perex@suse.cz +12 -12 # [ALSA] Fix SPDIF rate setting for old ICHs # # D:2004/09/21 14:15:27 # C:Intel8x0 driver # F:pci/intel8x0.c:1.170->1.171 # L:Force to set SPDIF rate when PCMOUT is used on ICH[1-3]. # L:ICH4, NFORCE and ALI uses a separate DMA for SPDIF. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:54:42+02:00 perex@suse.cz # [ALSA] [hdsp] Fix for 64bit architectures # # RME HDSP driver # Fixed the loading of firmware data and the handling of meter mmap # on 64bit architectures. # # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/09/21 05:32:27+02:00 perex@suse.cz +3 -3 # [ALSA] [hdsp] Fix for 64bit architectures # # D:2004/09/21 11:32:27 # C:RME HDSP driver # F:include/hdsp.h:1.5->1.6 # F:pci/rme9652/hdsp.c:1.68->1.69 # L:Fixed the loading of firmware data and the handling of meter mmap # L:on 64bit architectures. # Signed-off-by: Takashi Iwai # # include/sound/hdsp.h # 2004/09/21 05:32:27+02:00 perex@suse.cz +1 -1 # [ALSA] [hdsp] Fix for 64bit architectures # # D:2004/09/21 11:32:27 # C:RME HDSP driver # F:include/hdsp.h:1.5->1.6 # F:pci/rme9652/hdsp.c:1.68->1.69 # L:Fixed the loading of firmware data and the handling of meter mmap # L:on 64bit architectures. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:54:19+02:00 perex@suse.cz # [ALSA] rme32 segfault fix # # RME32 driver # - disables buffer prefill in halfduplex mode, which fixes segmentation fault # of rme32 for playback in halfduplex mode # # Signed-Off-By: Martin Langer # # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/09/20 05:10:47+02:00 perex@suse.cz +1 -1 # [ALSA] rme32 segfault fix # # D:2004/09/20 11:10:47 # C:RME32 driver # F:pci/rme32.c:1.46->1.47 # L:- disables buffer prefill in halfduplex mode, which fixes segmentation fault # L: of rme32 for playback in halfduplex mode # L: # L:Signed-Off-By: Martin Langer # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:53:57+02:00 perex@suse.cz # [ALSA] Added support of Mediastation # # ICE1712 driver # The support for Lionstracs Mediastation is added. # The model name is 'mediastation'. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/delta.h # 2004/09/17 12:38:26+02:00 perex@suse.cz +3 -1 # [ALSA] Added support of Mediastation # # D:2004/09/17 18:38:26 # C:ICE1712 driver # F:pci/ice1712/delta.c:1.18->1.19 # F:pci/ice1712/delta.h:1.6->1.7 # L:The support for Lionstracs Mediastation is added. # L:The model name is 'mediastation'. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/delta.c # 2004/09/17 12:38:26+02:00 perex@suse.cz +13 -0 # [ALSA] Added support of Mediastation # # D:2004/09/17 18:38:26 # C:ICE1712 driver # F:pci/ice1712/delta.c:1.18->1.19 # F:pci/ice1712/delta.h:1.6->1.7 # L:The support for Lionstracs Mediastation is added. # L:The model name is 'mediastation'. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:53:32+02:00 perex@suse.cz # [ALSA] Fix iomem variable type # # Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # RME9652 driver,PPC Tumbler driver # The type of iomem variables is changed to void __iomem *. # # Signed-off-by: Takashi Iwai # # sound/ppc/tumbler.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +3 -3 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/ymfpci/ymfpci_main.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +2 -2 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/rme9652.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +29 -29 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/rme96.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +8 -6 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +10 -10 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/nm256/nm256.c # 2004/09/16 13:40:26+02:00 perex@suse.cz +17 -17 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.h # 2004/09/16 13:40:25+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +3 -3 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +34 -33 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +10 -10 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +10 -10 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/dsp_spos_scb_lib.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +2 -2 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/dsp_spos.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/09/16 13:40:25+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/cs4281.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +8 -8 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0.h # 2004/09/16 13:40:24+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/09/16 13:40:24+02:00 perex@suse.cz +5 -5 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_lib.c # 2004/09/16 13:40:23+02:00 perex@suse.cz +4 -4 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/drivers/mpu401/mpu401_uart.c # 2004/09/16 13:40:23+02:00 perex@suse.cz +2 -2 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # sound/core/memory.c # 2004/09/16 13:40:23+02:00 perex@suse.cz +4 -4 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # include/sound/ymfpci.h # 2004/09/16 13:40:24+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # include/sound/cs46xx.h # 2004/09/16 13:40:24+02:00 perex@suse.cz +1 -1 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # include/sound/core.h # 2004/09/16 13:40:24+02:00 perex@suse.cz +2 -2 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/09/16 13:40:23+02:00 perex@suse.cz +3 -4 # [ALSA] Fix iomem variable type # # D:2004/09/16 19:40:23 # C:Documentation,ALSA Core,MPU401 UART,OPL3,CS46xx driver,YMFPCI driver # C:ATIIXP driver,ATIIXP-modem driver,CS4281 driver,Intel8x0 driver # C:Intel8x0-modem driver,RME32 driver,RME96 driver,au88x0 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,PPC Tumbler driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.39->1.40 # F:core/memory.c:1.31->1.32 # F:drivers/mpu401/mpu401_uart.c:1.31->1.32 # F:drivers/opl3/opl3_lib.c:1.21->1.22 # F:include/core.h:1.57->1.58 # F:include/cs46xx.h:1.21->1.22 # F:include/ymfpci.h:1.16->1.17 # F:pci/atiixp.c:1.23->1.24 # F:pci/atiixp_modem.c:1.7->1.8 # F:pci/cs4281.c:1.63->1.64 # F:pci/intel8x0.c:1.169->1.170 # F:pci/intel8x0m.c:1.20->1.21 # F:pci/rme32.c:1.45->1.46 # F:pci/rme96.c:1.43->1.44 # F:pci/au88x0/au88x0.c:1.11->1.12 # F:pci/au88x0/au88x0.h:1.7->1.8 # F:pci/cs46xx/cs46xx_lib.c:1.84->1.85 # F:pci/cs46xx/dsp_spos.c:1.26->1.27 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.24->1.25 # F:pci/korg1212/korg1212.c:1.48->1.49 # F:pci/mixart/mixart.c:1.17->1.18 # F:pci/mixart/mixart.h:1.5->1.6 # F:pci/nm256/nm256.c:1.50->1.51 # F:pci/rme9652/hdsp.c:1.67->1.68 # F:pci/rme9652/rme9652.c:1.52->1.53 # F:pci/ymfpci/ymfpci_main.c:1.57->1.58 # F:ppc/tumbler.c:1.33->1.34 # L:The type of iomem variables is changed to void __iomem *. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:53:03+02:00 perex@suse.cz # [ALSA] Fix auto-loading of sequencer modules # # ALSA sequencer # Allow auto-loading of sequencer modules except for module init time # (which may cause blocking). # # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_clientmgr.c # 2004/09/16 13:35:29+02:00 perex@suse.cz +5 -3 # [ALSA] Fix auto-loading of sequencer modules # # D:2004/09/16 19:35:29 # C:ALSA sequencer # F:core/seq/seq.c:1.14->1.15 # F:core/seq/seq_clientmgr.c:1.36->1.37 # L:Allow auto-loading of sequencer modules except for module init time # L:(which may cause blocking). # Signed-off-by: Takashi Iwai # # sound/core/seq/seq.c # 2004/09/16 13:35:29+02:00 perex@suse.cz +4 -0 # [ALSA] Fix auto-loading of sequencer modules # # D:2004/09/16 19:35:29 # C:ALSA sequencer # F:core/seq/seq.c:1.14->1.15 # F:core/seq/seq_clientmgr.c:1.36->1.37 # L:Allow auto-loading of sequencer modules except for module init time # L:(which may cause blocking). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:52:41+02:00 perex@suse.cz # [ALSA] Fixed the obsolete description in comments # # IOCTL32 emulation # # # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/ioctl32.h # 2004/09/16 07:27:18+02:00 perex@suse.cz +1 -1 # [ALSA] Fixed the obsolete description in comments # # D:2004/09/16 13:27:18 # C:IOCTL32 emulation # F:core/ioctl32/ioctl32.h:1.14->1.15 # L: # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:52:19+02:00 perex@suse.cz # [ALSA] Improved clock measurement # # Intel8x0 driver # Improved the clock measurement routine to allow the longer sleep time. # Now it invokes schedule_timeout() instead of a long mdelay(). # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/16 07:26:16+02:00 perex@suse.cz +5 -6 # [ALSA] Improved clock measurement # # D:2004/09/16 13:26:16 # C:Intel8x0 driver # F:pci/intel8x0.c:1.168->1.169 # L:Improved the clock measurement routine to allow the longer sleep time. # L:Now it invokes schedule_timeout() instead of a long mdelay(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:51:57+02:00 perex@suse.cz # [ALSA] Remove delay() to improve latency # # ES1968 driver # - Removed mdelay() in ac97 codec handling. # - Improved the clock measurement routine to allow the longer sleep time. # Now it invokes schedule_timeout() instead of a long mdelay(). # # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2004/09/16 07:25:25+02:00 perex@suse.cz +28 -20 # [ALSA] Remove delay() to improve latency # # D:2004/09/16 13:25:25 # C:ES1968 driver # F:pci/es1968.c:1.75->1.76 # L:- Removed mdelay() in ac97 codec handling. # L:- Improved the clock measurement routine to allow the longer sleep time. # L: Now it invokes schedule_timeout() instead of a long mdelay(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:51:34+02:00 perex@suse.cz # [ALSA] Support for capture of 16,32,64 channels on emu10k1 device 2 # # EMU10K1/EMU10K2 driver # This patch changes default constraint on 'EFX voices mask' control and # allow capture of 1, 2, 4, 8, 16, 32, 64 channels instead of 1, 2, 4, 8. # # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/09/16 05:36:44+02:00 perex@suse.cz +8 -1 # [ALSA] Support for capture of 16,32,64 channels on emu10k1 device 2 # # D:2004/09/16 11:36:44 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.31->1.32 # L:This patch changes default constraint on 'EFX voices mask' control and # L:allow capture of 1, 2, 4, 8, 16, 32, 64 channels instead of 1, 2, 4, 8. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:35:51+02:00 perex@suse.cz # [ALSA] Fixes for PCM/control 32bit emulation # # PCM Midlevel,IOCTL32 emulation # - Size mismatch of control element struct due to packed attribute # is removed. # - A typo in PCM syncptr definition is fixed. # - Suppress the mmap of PCM status/control records on 32bit emulation # mode since the record size doesn't match. # # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2004/09/15 04:30:08+02:00 perex@suse.cz +5 -0 # [ALSA] Fixes for PCM/control 32bit emulation # # D:2004/09/15 10:30:08 # C:PCM Midlevel,IOCTL32 emulation # F:core/pcm_native.c:1.105->1.106 # F:core/ioctl32/ioctl32.c:1.21->1.22 # F:core/ioctl32/pcm32.c:1.20->1.21 # F:include/pcm.h:1.47->1.48 # L:- Size mismatch of control element struct due to packed attribute # L: is removed. # L:- A typo in PCM syncptr definition is fixed. # L:- Suppress the mmap of PCM status/control records on 32bit emulation # L: mode since the record size doesn't match. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/pcm32.c # 2004/09/15 04:30:08+02:00 perex@suse.cz +27 -2 # [ALSA] Fixes for PCM/control 32bit emulation # # D:2004/09/15 10:30:08 # C:PCM Midlevel,IOCTL32 emulation # F:core/pcm_native.c:1.105->1.106 # F:core/ioctl32/ioctl32.c:1.21->1.22 # F:core/ioctl32/pcm32.c:1.20->1.21 # F:include/pcm.h:1.47->1.48 # L:- Size mismatch of control element struct due to packed attribute # L: is removed. # L:- A typo in PCM syncptr definition is fixed. # L:- Suppress the mmap of PCM status/control records on 32bit emulation # L: mode since the record size doesn't match. # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/ioctl32.c # 2004/09/15 04:30:08+02:00 perex@suse.cz +1 -1 # [ALSA] Fixes for PCM/control 32bit emulation # # D:2004/09/15 10:30:08 # C:PCM Midlevel,IOCTL32 emulation # F:core/pcm_native.c:1.105->1.106 # F:core/ioctl32/ioctl32.c:1.21->1.22 # F:core/ioctl32/pcm32.c:1.20->1.21 # F:include/pcm.h:1.47->1.48 # L:- Size mismatch of control element struct due to packed attribute # L: is removed. # L:- A typo in PCM syncptr definition is fixed. # L:- Suppress the mmap of PCM status/control records on 32bit emulation # L: mode since the record size doesn't match. # Signed-off-by: Takashi Iwai # # include/sound/pcm.h # 2004/09/15 04:30:08+02:00 perex@suse.cz +2 -0 # [ALSA] Fixes for PCM/control 32bit emulation # # D:2004/09/15 10:30:08 # C:PCM Midlevel,IOCTL32 emulation # F:core/pcm_native.c:1.105->1.106 # F:core/ioctl32/ioctl32.c:1.21->1.22 # F:core/ioctl32/pcm32.c:1.20->1.21 # F:include/pcm.h:1.47->1.48 # L:- Size mismatch of control element struct due to packed attribute # L: is removed. # L:- A typo in PCM syncptr definition is fixed. # L:- Suppress the mmap of PCM status/control records on 32bit emulation # L: mode since the record size doesn't match. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:35:27+02:00 perex@suse.cz # [ALSA] fix ALI M5451 description # # PCI drivers # modify ali5451 and intel8x0 help texts to better distinguish # between M5451 and M5455 AC97 controllers # # Signed-off-by: Clemens Ladisch # # sound/pci/Kconfig # 2004/09/13 07:53:25+02:00 perex@suse.cz +8 -4 # [ALSA] fix ALI M5451 description # # D:2004/09/13 13:53:25 # C:PCI drivers # F:pci/Kconfig:1.33->1.34 # L:modify ali5451 and intel8x0 help texts to better distinguish # L:between M5451 and M5455 AC97 controllers # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:35:05+02:00 perex@suse.cz # [ALSA] remove 'ALSA' from Kconfig USB menu name # # USB # make ISA, PCI and USB device look the same in {q,x,menu}config # # Signed-off-by: Thierry Vignaud # Signed-off-by: Clemens Ladisch # # sound/usb/Kconfig # 2004/09/13 05:53:20+02:00 perex@suse.cz +1 -1 # [ALSA] remove 'ALSA' from Kconfig USB menu name # # D:2004/09/13 11:53:20 # C:USB # F:usb/Kconfig:1.6->1.7 # L:make ISA, PCI and USB device look the same in {q,x,menu}config # Signed-off-by: Thierry Vignaud # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:34:41+02:00 perex@suse.cz # [ALSA] enhance Kconfig help texts # # ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # USB # add module names and references to other documentation files # add more help for generic options # # Signed-off-by: Clemens Ladisch # # sound/usb/Kconfig # 2004/09/13 02:15:00+02:00 perex@suse.cz +9 -2 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/ppc/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +5 -0 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/pcmcia/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +15 -3 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/pci/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +200 -63 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/parisc/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +4 -1 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/isa/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +141 -48 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/drivers/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +38 -10 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/core/Kconfig # 2004/09/13 02:14:59+02:00 perex@suse.cz +57 -18 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # sound/arm/Kconfig # 2004/09/13 02:14:58+02:00 perex@suse.cz +6 -3 # [ALSA] enhance Kconfig help texts # # D:2004/09/13 08:14:58 # C:ARM,ALSA Core,Generic drivers,ISA,PARISC,PCI drivers,PCMCIA Kconfig,PPC # C:USB # F:arm/Kconfig:1.2->1.3 # F:core/Kconfig:1.5->1.6 # F:drivers/Kconfig:1.6->1.7 # F:isa/Kconfig:1.13->1.14 # F:parisc/Kconfig:1.2->1.3 # F:pci/Kconfig:1.32->1.33 # F:pcmcia/Kconfig:1.7->1.8 # F:ppc/Kconfig:1.4->1.5 # F:usb/Kconfig:1.5->1.6 # L:add module names and references to other documentation files # L:add more help for generic options # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:34:18+02:00 perex@suse.cz # [ALSA] adjust intel8x0 joystick documentation # # Documentation # # # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/Joystick.txt # 2004/09/13 01:56:22+02:00 perex@suse.cz +4 -6 # [ALSA] adjust intel8x0 joystick documentation # # D:2004/09/13 07:56:22 # C:Documentation # F:Documentation/Joystick.txt:1.3->1.4 # L: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:33:57+02:00 perex@suse.cz # [ALSA] show codec name in card description # # AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # Include the AC97 codec name in the card longname of # motherboard controllers. # (to enhance the chance of getting useful bug reports :) # # Signed-off-by: Clemens Ladisch # # sound/pci/via82xx.c # 2004/09/10 09:19:29+02:00 perex@suse.cz +3 -2 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/10 09:19:29+02:00 perex@suse.cz +3 -2 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # sound/pci/atiixp.c # 2004/09/10 09:19:29+02:00 perex@suse.cz +4 -2 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_codec.c # 2004/09/10 09:19:29+02:00 perex@suse.cz +17 -0 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # include/sound/ac97_codec.h # 2004/09/10 09:19:28+02:00 perex@suse.cz +1 -0 # [ALSA] show codec name in card description # # D:2004/09/10 15:19:28 # C:AC97 Codec Core,ATIIXP driver,Intel8x0 driver,VIA82xx driver # F:include/ac97_codec.h:1.55->1.56 # F:pci/atiixp.c:1.22->1.23 # F:pci/intel8x0.c:1.167->1.168 # F:pci/via82xx.c:1.121->1.122 # F:pci/ac97/ac97_codec.c:1.148->1.149 # L:Include the AC97 codec name in the card longname of # L:motherboard controllers. # L:(to enhance the chance of getting useful bug reports :) # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:33:34+02:00 perex@suse.cz # [ALSA] Fix driver name for nforce and clean-up # # Intel8x0-modem driver # Driver name is always ICH-MODEM as defined in alsa-lib config. # Cosmetic cleanups: unused include files, MODULE_DEVICE update. # # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/09/08 10:23:50+02:00 perex@suse.cz +8 -13 # [ALSA] Fix driver name for nforce and clean-up # # D:2004/09/08 16:23:50 # C:Intel8x0-modem driver # F:pci/intel8x0m.c:1.19->1.20 # L:Driver name is always ICH-MODEM as defined in alsa-lib config. # L:Cosmetic cleanups: unused include files, MODULE_DEVICE update. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/22 09:33:11+02:00 perex@suse.cz # [ALSA] Added missing header file for AudioTrak Prodigy 192 cards # # ICE1712 driver # # # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/stac946x.h # 2004/09/22 09:09:18+02:00 perex@suse.cz +25 -0 # [ALSA] Added missing header file for AudioTrak Prodigy 192 cards # # D:2004/09/08 12:28:25 # C:ICE1712 driver # F:pci/ice1712/stac946x.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/stac946x.h # 2004/09/22 09:09:18+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/stac946x.h # # ChangeSet # 2004/09/22 09:32:47+02:00 perex@suse.cz # [ALSA] copy_to_user() return value checking in snd_seq_read() # # ALSA sequencer # Here's a patch that ensures the copy_to_user() return value gets checked # and acted upon if it is != 0 (that is, if we failed to copy all data) in # snd_seq_read(). # # Signed-off-by: Jesper Juhl # Signed-off-by: Jaroslav Kysela # # sound/core/seq/seq_clientmgr.c # 2004/09/07 14:22:28+02:00 perex@suse.cz +4 -1 # [ALSA] copy_to_user() return value checking in snd_seq_read() # # D:2004/09/07 20:22:28 # C:ALSA sequencer # F:core/seq/seq_clientmgr.c:1.35->1.36 # L:Here's a patch that ensures the copy_to_user() return value gets checked # L:and acted upon if it is != 0 (that is, if we failed to copy all data) in # L:snd_seq_read(). # Signed-off-by: Jesper Juhl # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/09/22 09:32:20+02:00 perex@suse.cz # [ALSA] [ac97 core] added AC97_SCAP_DETECT_BY_VENDOR flag # # AC97 Codec Core,Intel8x0 driver # This patch adds a AC97_SCAP_DETECT_BY_VENDOR flag for Xbox. If the flag # is set, the AC97 codec is detected only by reading of a reasonable # vendor ID. It seems that Xbox has accessible only vendor/device ID # registers for reading. Also, a new xbox parameter for snd-intel8x0 # has been introduced to let user force this behaviour. # # Signed-off-by: Jaroslav Kysela # # sound/pci/intel8x0.c # 2004/09/07 10:58:24+02:00 perex@suse.cz +8 -0 # [ALSA] [ac97 core] added AC97_SCAP_DETECT_BY_VENDOR flag # # D:2004/09/07 16:58:24 # C:AC97 Codec Core,Intel8x0 driver # F:include/ac97_codec.h:1.54->1.55 # F:pci/intel8x0.c:1.166->1.167 # F:pci/ac97/ac97_codec.c:1.147->1.148 # L:This patch adds a AC97_SCAP_DETECT_BY_VENDOR flag for Xbox. If the flag # L:is set, the AC97 codec is detected only by reading of a reasonable # L:vendor ID. It seems that Xbox has accessible only vendor/device ID # L:registers for reading. Also, a new xbox parameter for snd-intel8x0 # L:has been introduced to let user force this behaviour. # Signed-off-by: Jaroslav Kysela # # sound/pci/ac97/ac97_codec.c # 2004/09/07 10:58:24+02:00 perex@suse.cz +18 -10 # [ALSA] [ac97 core] added AC97_SCAP_DETECT_BY_VENDOR flag # # D:2004/09/07 16:58:24 # C:AC97 Codec Core,Intel8x0 driver # F:include/ac97_codec.h:1.54->1.55 # F:pci/intel8x0.c:1.166->1.167 # F:pci/ac97/ac97_codec.c:1.147->1.148 # L:This patch adds a AC97_SCAP_DETECT_BY_VENDOR flag for Xbox. If the flag # L:is set, the AC97 codec is detected only by reading of a reasonable # L:vendor ID. It seems that Xbox has accessible only vendor/device ID # L:registers for reading. Also, a new xbox parameter for snd-intel8x0 # L:has been introduced to let user force this behaviour. # Signed-off-by: Jaroslav Kysela # # include/sound/ac97_codec.h # 2004/09/07 10:58:24+02:00 perex@suse.cz +1 -0 # [ALSA] [ac97 core] added AC97_SCAP_DETECT_BY_VENDOR flag # # D:2004/09/07 16:58:24 # C:AC97 Codec Core,Intel8x0 driver # F:include/ac97_codec.h:1.54->1.55 # F:pci/intel8x0.c:1.166->1.167 # F:pci/ac97/ac97_codec.c:1.147->1.148 # L:This patch adds a AC97_SCAP_DETECT_BY_VENDOR flag for Xbox. If the flag # L:is set, the AC97 codec is detected only by reading of a reasonable # L:vendor ID. It seems that Xbox has accessible only vendor/device ID # L:registers for reading. Also, a new xbox parameter for snd-intel8x0 # L:has been introduced to let user force this behaviour. # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/09/22 09:30:18+02:00 perex@suse.cz # [ALSA] mark snd_card_dummy_new_mixer() as static # # Generic drivers # # # Signed-off-by: Jaroslav Kysela # # sound/drivers/dummy.c # 2004/09/07 10:52:40+02:00 perex@suse.cz +1 -1 # [ALSA] mark snd_card_dummy_new_mixer() as static # # D:2004/09/07 16:52:40 # C:Generic drivers # F:drivers/dummy.c:1.32->1.33 # L: # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/09/22 09:29:41+02:00 perex@suse.cz # [ALSA] add UA-1000 sample rate detection # # USB generic driver # Instead of assuming 48 kHz, the driver now detects # the current sample rate setting. # # Signed-off-by: Clemens Ladisch # # sound/usb/usbquirks.h # 2004/09/07 10:09:08+02:00 perex@suse.cz +2 -28 # [ALSA] add UA-1000 sample rate detection # # D:2004/09/07 16:09:08 # C:USB generic driver # F:usb/usbaudio.c:1.107->1.108 # F:usb/usbaudio.h:1.33->1.34 # F:usb/usbquirks.h:1.36->1.37 # L:Instead of assuming 48 kHz, the driver now detects # L:the current sample rate setting. # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.h # 2004/09/07 10:09:08+02:00 perex@suse.cz +2 -1 # [ALSA] add UA-1000 sample rate detection # # D:2004/09/07 16:09:08 # C:USB generic driver # F:usb/usbaudio.c:1.107->1.108 # F:usb/usbaudio.h:1.33->1.34 # F:usb/usbquirks.h:1.36->1.37 # L:Instead of assuming 48 kHz, the driver now detects # L:the current sample rate setting. # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.c # 2004/09/07 10:09:08+02:00 perex@suse.cz +52 -0 # [ALSA] add UA-1000 sample rate detection # # D:2004/09/07 16:09:08 # C:USB generic driver # F:usb/usbaudio.c:1.107->1.108 # F:usb/usbaudio.h:1.33->1.34 # F:usb/usbquirks.h:1.36->1.37 # L:Instead of assuming 48 kHz, the driver now detects # L:the current sample rate setting. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/22 09:29:10+02:00 perex@suse.cz # [ALSA] Added support for AudioTrak Prodigy 192 cards # # ICE1712 driver,ICE1724 driver # # # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/prodigy192.h # 2004/09/22 09:08:13+02:00 perex@suse.cz +11 -0 # [ALSA] Added support for AudioTrak Prodigy 192 cards # # D:2004/09/07 16:02:49 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.13->1.14 # F:pci/ice1712/ice1724.c:1.44->1.45 # F:pci/ice1712/prodigy192.c:INITIAL->1.1 # F:pci/ice1712/prodigy192.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/prodigy192.h # 2004/09/22 09:08:13+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/prodigy192.h # # sound/pci/ice1712/ice1724.c # 2004/09/07 10:02:49+02:00 perex@suse.cz +3 -0 # [ALSA] Added support for AudioTrak Prodigy 192 cards # # D:2004/09/07 16:02:49 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.13->1.14 # F:pci/ice1712/ice1724.c:1.44->1.45 # F:pci/ice1712/prodigy192.c:INITIAL->1.1 # F:pci/ice1712/prodigy192.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/Makefile # 2004/09/07 10:02:49+02:00 perex@suse.cz +1 -1 # [ALSA] Added support for AudioTrak Prodigy 192 cards # # D:2004/09/07 16:02:49 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.13->1.14 # F:pci/ice1712/ice1724.c:1.44->1.45 # F:pci/ice1712/prodigy192.c:INITIAL->1.1 # F:pci/ice1712/prodigy192.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/prodigy192.c # 2004/09/22 09:08:08+02:00 perex@suse.cz +524 -0 # [ALSA] Added support for AudioTrak Prodigy 192 cards # # D:2004/09/07 16:02:49 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.13->1.14 # F:pci/ice1712/ice1724.c:1.44->1.45 # F:pci/ice1712/prodigy192.c:INITIAL->1.1 # F:pci/ice1712/prodigy192.h:INITIAL->1.1 # L: # Signed-off-by: Kouichi ONO # Signed-off-by: Jaroslav Kysela # # sound/pci/ice1712/prodigy192.c # 2004/09/22 09:08:08+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/prodigy192.c # # ChangeSet # 2004/09/22 09:28:40+02:00 perex@suse.cz # [ALSA] Fix the OSS PCM emulation - O_NONBLOCK write # # ALSA<-OSS emulation # This patch fixes the OSS PCM write() in O_NONBLOCK mode. # The previous code had not returned partial written bytes. # # Signed-off-by: Jaroslav Kysela # # sound/core/oss/pcm_oss.c # 2004/09/07 09:17:48+02:00 perex@suse.cz +9 -1 # [ALSA] Fix the OSS PCM emulation - O_NONBLOCK write # # D:2004/09/07 15:17:48 # C:ALSA<-OSS emulation # F:core/oss/pcm_oss.c:1.77->1.78 # L:This patch fixes the OSS PCM write() in O_NONBLOCK mode. # L:The previous code had not returned partial written bytes. # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/09/20 15:29:26-04:00 jgarzik@pobox.com # Merge # # drivers/net/smc91x.h # 2004/09/20 15:29:25-04:00 jgarzik@pobox.com +0 -0 # SCCS merged # # drivers/net/Kconfig # 2004/09/20 15:28:07-04:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2004/09/20 15:17:45-04:00 ralf@linux-mips.org # [PATCH] Stop queue on close in hdlcdrv # # The stop method of a driver should ensure queueing is stopped ... # # drivers/net/hamradio/hdlcdrv.c # 2004/05/04 07:47:17-04:00 ralf@linux-mips.org +2 -0 # Stop queue on close in hdlcdrv # # ChangeSet # 2004/09/20 14:44:20-04:00 romieu@fr.zoreil.com # [PATCH] via-velocity: wrong module name in Kconfig documentation # # Copy/paste abuse. # # drivers/net/Kconfig # 2004/08/14 06:11:16-04:00 romieu@fr.zoreil.com +1 -1 # via-velocity: wrong module name in Kconfig documentation # # ChangeSet # 2004/09/20 14:34:45-04:00 pavel@ucw.cz # [PATCH] swsuspend for ne2k-pci cards # # Author: Éric Brunet # # drivers/net/ne2k-pci.c # 2004/08/21 06:24:27-04:00 pavel@ucw.cz +31 -0 # PATCH: swsuspend for ne2k-pci cards # # ChangeSet # 2004/09/20 14:03:45-04:00 shemminger@osdl.org # [PATCH] (4/4) acenic - don't spin forever in hard_start_xmit # # If driver is stuck due to ring full and hardware or link error, don't spin # forever in the hard_start_xmit routine. # # Signed-off-by: Stephen Hemminger # # drivers/net/acenic.c # 2004/09/20 13:47:22-04:00 shemminger@osdl.org +11 -3 # (4/4) acenic - don't spin forever in hard_start_xmit # # ChangeSet # 2004/09/20 14:03:34-04:00 shemminger@osdl.org # [PATCH] (3/4) acenic - __iomem warnings cleanup # # This cleans all the compile warnings and most of the sparse warnings # for the acenic driver relating to io memory space. # Remaining warnings are because tx_ring can be either in i/o or not # depending on the version of the card. # Not tested on old TIGON card. # # Signed-off-by: Stephen Hemminger # # drivers/net/acenic.h # 2004/09/20 13:47:00-04:00 shemminger@osdl.org +4 -4 # (3/4) acenic - __iomem warnings cleanup # # drivers/net/acenic.c # 2004/09/20 13:47:00-04:00 shemminger@osdl.org +57 -80 # (3/4) acenic - __iomem warnings cleanup # # ChangeSet # 2004/09/20 14:03:22-04:00 shemminger@osdl.org # [PATCH] (2/4) acenic - eliminate MAX_SKB_FRAGS #if # # Since MAX_SKB_FRAGS is defined in both 2.4 and 2.6, it makes sense # to eliminate this old #if code. # # Signed-off-by: Stephen Hemminger # # drivers/net/acenic.h # 2004/09/20 13:46:46-04:00 shemminger@osdl.org +0 -11 # (2/4) acenic - eliminate MAX_SKB_FRAGS #if # # drivers/net/acenic.c # 2004/09/20 13:46:46-04:00 shemminger@osdl.org +2 -8 # (2/4) acenic - eliminate MAX_SKB_FRAGS #if # # ChangeSet # 2004/09/20 14:03:11-04:00 shemminger@osdl.org # [PATCH] (1/4) acenic - use netdev_priv # # Trivial, use netdev_priv # # Signed-off-by: Stephen Hemminger # # drivers/net/acenic.h # 2004/09/20 13:46:22-04:00 shemminger@osdl.org +2 -2 # (1/4) acenic - use netdev_priv # # drivers/net/acenic.c # 2004/09/20 13:46:22-04:00 shemminger@osdl.org +1 -1 # (1/4) acenic - use netdev_priv # # ChangeSet # 2004/09/17 10:37:55-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - Ethtool -- 82545 do not support WoL # # drivers/net/e1000/e1000_ethtool.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +2 -0 # e1000 - Ethtool -- 82545 do not support WoL # # ChangeSet # 2004/09/17 10:37:43-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - Polarity reversal workaround for 10F/10H links # # drivers/net/e1000/e1000_osdep.h # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +6 -0 # e1000 - Polarity reversal workaround for 10F/10H links # # drivers/net/e1000/e1000_hw.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +115 -0 # e1000 - Polarity reversal workaround for 10F/10H links # # ChangeSet # 2004/09/17 10:37:32-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - Fix VLAN filter setup errors (while running on PPC) # # drivers/net/e1000/e1000_main.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +4 -4 # e1000 - Fix VLAN filter setup errors (while running on PPC) # # ChangeSet # 2004/09/17 10:37:20-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 Check value returned by from pci_enable_device # # drivers/net/e1000/e1000_main.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +2 -2 # e1000 Check value returned by from pci_enable_device # # drivers/net/e1000/e1000_ethtool.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +2 -2 # e1000 Check value returned by from pci_enable_device # # ChangeSet # 2004/09/17 10:37:08-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - Removed support for advanced TCO features # # drivers/net/e1000/e1000_main.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +2 -9 # e1000 - Removed support for advanced TCO features # # ChangeSet # 2004/09/17 10:36:56-04:00 ganesh.venkatesan@intel.com # [PATCH] e1000 - use pci_device_name for syslog messages till # registering netdevice. # # drivers/net/e1000/e1000_main.c # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +5 -11 # e1000 - use pci_device_name for syslog messages till # registering netdevice. # # drivers/net/e1000/e1000.h # 2004/09/09 14:17:12-04:00 ganesh.venkatesan@intel.com +0 -2 # e1000 - use pci_device_name for syslog messages till # registering netdevice. # # ChangeSet # 2004/09/17 10:26:28-04:00 ganesh.venkatesan@intel.com # [PATCH] e100 driver version number update # # drivers/net/e100.c # 2004/09/09 17:51:32-04:00 ganesh.venkatesan@intel.com +2 -2 # e100 driver version number update # # ChangeSet # 2004/09/17 10:26:17-04:00 ganesh.venkatesan@intel.com # [PATCH] e100 - use NET_IP_ALIGN to set rx data buffer alignment # # drivers/net/e100.c # 2004/09/09 17:51:32-04:00 ganesh.venkatesan@intel.com +2 -4 # e100 - use NET_IP_ALIGN to set rx data buffer alignment # # ChangeSet # 2004/09/17 10:26:04-04:00 ganesh.venkatesan@intel.com # [PATCH] e100 - Use pci_device_name for syslog messages till registering netdevice # # drivers/net/e100.c # 2004/09/09 17:51:32-04:00 ganesh.venkatesan@intel.com +2 -0 # e100 - Use pci_device_name for syslog messages till registering netdevice # # ChangeSet # 2004/09/16 20:21:15-04:00 akpm@osdl.org # [PATCH] add missing pci_disable_device for e1000 # # From: Kenji Kaneshige # # This patch adds pci_disable_device() into e1000_remove(). # # If your driver decides to stop using the device, it should call # pci_disable_device() to deallocate any IRQ resources, disable PCI # bus-mastering, etc. # # Signed-off-by: Kenji Kaneshige # Signed-off-by: Andrew Morton # # drivers/net/e1000/e1000_main.c # 2004/09/13 02:03:20-04:00 akpm@osdl.org +2 -0 # add missing pci_disable_device for e1000 # # ChangeSet # 2004/09/06 20:33:07+02:00 perex@suse.cz # [ALSA] [emu10k1] Audigy DSP support # # EMU10K1/EMU10K2 driver # This patch will add better support for Audigy DSP. More gpr, # instruction and tram. It will break binary compatibility for app # which use emu10k1 hwdep. # # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emuproc.c # 2004/09/06 10:05:19+02:00 perex@suse.cz +19 -11 # [ALSA] [emu10k1] Audigy DSP support # # D:2004/09/06 16:05:18 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.45->1.46 # F:pci/emu10k1/emufx.c:1.58->1.59 # F:pci/emu10k1/emuproc.c:1.20->1.21 # L:This patch will add better support for Audigy DSP. More gpr, # L:instruction and tram. It will break binary compatibility for app # L:which use emu10k1 hwdep. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2004/09/06 10:05:18+02:00 perex@suse.cz +25 -17 # [ALSA] [emu10k1] Audigy DSP support # # D:2004/09/06 16:05:18 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.45->1.46 # F:pci/emu10k1/emufx.c:1.58->1.59 # F:pci/emu10k1/emuproc.c:1.20->1.21 # L:This patch will add better support for Audigy DSP. More gpr, # L:instruction and tram. It will break binary compatibility for app # L:which use emu10k1 hwdep. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2004/09/06 10:05:18+02:00 perex@suse.cz +37 -24 # [ALSA] [emu10k1] Audigy DSP support # # D:2004/09/06 16:05:18 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.45->1.46 # F:pci/emu10k1/emufx.c:1.58->1.59 # F:pci/emu10k1/emuproc.c:1.20->1.21 # L:This patch will add better support for Audigy DSP. More gpr, # L:instruction and tram. It will break binary compatibility for app # L:which use emu10k1 hwdep. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:25:33+02:00 perex@suse.cz # [ALSA] Added Compaq Evo W4000 quirk # # Intel8x0 driver # Added an AC97 quirk entry for Compaq Evo W4000. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/06 07:51:11+02:00 perex@suse.cz +6 -0 # [ALSA] Added Compaq Evo W4000 quirk # # D:2004/09/06 13:51:11 # C:Intel8x0 driver # F:pci/intel8x0.c:1.165->1.166 # L:Added an AC97 quirk entry for Compaq Evo W4000. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:24:49+02:00 perex@suse.cz # [ALSA] detect errors reported by the hardware # # BT87x driver # stop the PCM if the hardware reports FIFO/PCI errors # # Signed-off-by: Clemens Ladisch # # sound/pci/bt87x.c # 2004/09/06 03:10:32+02:00 perex@suse.cz +3 -2 # [ALSA] detect errors reported by the hardware # # D:2004/09/06 09:10:32 # C:BT87x driver # F:pci/bt87x.c:1.11->1.12 # L:stop the PCM if the hardware reports FIFO/PCI errors # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:24:04+02:00 perex@suse.cz # [ALSA] inverted EAPD support # # Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # Since there are more than one (broken) implementation of EAPD bit # on ac97 chips, the new scaps bit is added for the inverted EAPD. # Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # snd_ac97_tune_hardware(). # # The ac97 quirk entry for Sony S1XP is added to turn this on. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/09/03 09:21:14+02:00 perex@suse.cz +6 -0 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/09/03 09:21:24+02:00 perex@suse.cz +2 -12 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/09/03 09:21:14+02:00 perex@suse.cz +30 -6 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # include/sound/ac97_codec.h # 2004/09/03 09:21:14+02:00 perex@suse.cz +2 -0 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/09/03 09:21:13+02:00 perex@suse.cz +1 -0 # [ALSA] inverted EAPD support # # D:2004/09/03 15:21:13 # C:Documentation,AC97 Codec Core,Intel8x0 driver,CS46xx driver # F:Documentation/ALSA-Configuration.txt:1.51->1.52 # F:include/ac97_codec.h:1.53->1.54 # F:pci/intel8x0.c:1.164->1.165 # F:pci/ac97/ac97_codec.c:1.146->1.147 # F:pci/cs46xx/cs46xx_lib.c:1.83->1.84 # L:Since there are more than one (broken) implementation of EAPD bit # L:on ac97 chips, the new scaps bit is added for the inverted EAPD. # L:Also, AC97_TUNE_INV_EAPD is used to tune this behavior later by # L:snd_ac97_tune_hardware(). # L: # L:The ac97 quirk entry for Sony S1XP is added to turn this on. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:23:17+02:00 perex@suse.cz # [ALSA] ac97 quirk entry for Soltek SL-75DRV5 # # VIA82xx driver # Added an ac97 quirk entry for Soltek SL-75DRV5. # Since the PCI subsystem id is identical with ASRock K7VT2, codec_id is # used additionally to tell between them. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/09/03 09:17:29+02:00 perex@suse.cz +7 -0 # [ALSA] ac97 quirk entry for Soltek SL-75DRV5 # # D:2004/09/03 15:17:29 # C:VIA82xx driver # F:pci/via82xx.c:1.120->1.121 # L:Added an ac97 quirk entry for Soltek SL-75DRV5. # L:Since the PCI subsystem id is identical with ASRock K7VT2, codec_id is # L:used additionally to tell between them. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:22:32+02:00 perex@suse.cz # [ALSA] [ac97] Check ac97 codec id in quirk table # # AC97 Codec Core # Added codec_id field to ac97_quirk struct so that the devices with # the same PCI subsystem IDs but with different AC97 chips can be # distinguished properly. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/09/03 09:15:35+02:00 perex@suse.cz +2 -0 # [ALSA] [ac97] Check ac97 codec id in quirk table # # D:2004/09/03 15:15:35 # C:AC97 Codec Core # F:include/ac97_codec.h:1.52->1.53 # F:pci/ac97/ac97_codec.c:1.145->1.146 # L:Added codec_id field to ac97_quirk struct so that the devices with # L:the same PCI subsystem IDs but with different AC97 chips can be # L:distinguished properly. # Signed-off-by: Takashi Iwai # # include/sound/ac97_codec.h # 2004/09/03 09:15:35+02:00 perex@suse.cz +1 -0 # [ALSA] [ac97] Check ac97 codec id in quirk table # # D:2004/09/03 15:15:35 # C:AC97 Codec Core # F:include/ac97_codec.h:1.52->1.53 # F:pci/ac97/ac97_codec.c:1.145->1.146 # L:Added codec_id field to ac97_quirk struct so that the devices with # L:the same PCI subsystem IDs but with different AC97 chips can be # L:distinguished properly. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:21:46+02:00 perex@suse.cz # [ALSA] [ac97] Added VIA shared type. # # AC97 Codec Core,VIA82xx driver # Added a new shared type AC97_SHARED_TYPE_VIA for via82xx southbridge # to share codecs between audio and modem drivers. # # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/09/03 08:50:25+02:00 perex@suse.cz +1 -0 # [ALSA] [ac97] Added VIA shared type. # # D:2004/09/03 14:50:25 # C:AC97 Codec Core,VIA82xx driver # F:include/ac97_codec.h:1.51->1.52 # F:pci/via82xx.c:1.119->1.120 # L:Added a new shared type AC97_SHARED_TYPE_VIA for via82xx southbridge # L:to share codecs between audio and modem drivers. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # include/sound/ac97_codec.h # 2004/09/03 08:50:25+02:00 perex@suse.cz +1 -0 # [ALSA] [ac97] Added VIA shared type. # # D:2004/09/03 14:50:25 # C:AC97 Codec Core,VIA82xx driver # F:include/ac97_codec.h:1.51->1.52 # F:pci/via82xx.c:1.119->1.120 # L:Added a new shared type AC97_SHARED_TYPE_VIA for via82xx southbridge # L:to share codecs between audio and modem drivers. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:21:03+02:00 perex@suse.cz # [ALSA] add mixer quirk for LineX FM Transmitter # # USB generic driver # The LineX FM Transmitter needs a mixer quirk entry # to ignore control errors. # # Signed-off-by: Lonnie Mendez # Signed-off-by: Clemens Ladisch # # sound/usb/usbmixer_maps.c # 2004/09/03 07:33:11+02:00 perex@suse.cz +9 -0 # [ALSA] add mixer quirk for LineX FM Transmitter # # D:2004/09/03 13:33:11 # C:USB generic driver # F:usb/usbmixer_maps.c:1.7->1.8 # L:The LineX FM Transmitter needs a mixer quirk entry # L:to ignore control errors. # Signed-off-by: Lonnie Mendez # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:20:18+02:00 perex@suse.cz # [ALSA] remove gameport/MIDI support # # Documentation,PCI drivers,Intel8x0 driver # snd-intel8x0's gameport/MIDI code has quite a few problems: the port # addresses cannot be detected reliably (or not at all with newer LPC # bridge devices), joystick port address 0x208 isn't supported, the MIDI # interrupt isn't detected, PnP isn't supported, changing the port # addresses in the LPC bridge configuration doesn't affect the devices # in the Super-I/O chip connected to the LPC bus, and registering this # driver for the LPC bridge PCI device prevents other drivers using the # LPC's PCI id from loading later. # # All these problems can be cured by removing the offending code and # using the proper modules for these devices (ns558/snd-mpu401) instead. # # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/03 05:32:02+02:00 perex@suse.cz +0 -146 # [ALSA] remove gameport/MIDI support # # D:2004/09/03 11:32:02 # C:Documentation,PCI drivers,Intel8x0 driver # F:Documentation/ALSA-Configuration.txt:1.50->1.51 # F:pci/Kconfig:1.31->1.32 # F:pci/intel8x0.c:1.163->1.164 # L:snd-intel8x0's gameport/MIDI code has quite a few problems: the port # L:addresses cannot be detected reliably (or not at all with newer LPC # L:bridge devices), joystick port address 0x208 isn't supported, the MIDI # L:interrupt isn't detected, PnP isn't supported, changing the port # L:addresses in the LPC bridge configuration doesn't affect the devices # L:in the Super-I/O chip connected to the LPC bus, and registering this # L:driver for the LPC bridge PCI device prevents other drivers using the # L:LPC's PCI id from loading later. # L: # L:All these problems can be cured by removing the offending code and # L:using the proper modules for these devices (ns558/snd-mpu401) instead. # Signed-off-by: Clemens Ladisch # # sound/pci/Kconfig # 2004/09/03 05:32:02+02:00 perex@suse.cz +0 -1 # [ALSA] remove gameport/MIDI support # # D:2004/09/03 11:32:02 # C:Documentation,PCI drivers,Intel8x0 driver # F:Documentation/ALSA-Configuration.txt:1.50->1.51 # F:pci/Kconfig:1.31->1.32 # F:pci/intel8x0.c:1.163->1.164 # L:snd-intel8x0's gameport/MIDI code has quite a few problems: the port # L:addresses cannot be detected reliably (or not at all with newer LPC # L:bridge devices), joystick port address 0x208 isn't supported, the MIDI # L:interrupt isn't detected, PnP isn't supported, changing the port # L:addresses in the LPC bridge configuration doesn't affect the devices # L:in the Super-I/O chip connected to the LPC bus, and registering this # L:driver for the LPC bridge PCI device prevents other drivers using the # L:LPC's PCI id from loading later. # L: # L:All these problems can be cured by removing the offending code and # L:using the proper modules for these devices (ns558/snd-mpu401) instead. # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/09/03 05:32:02+02:00 perex@suse.cz +3 -4 # [ALSA] remove gameport/MIDI support # # D:2004/09/03 11:32:02 # C:Documentation,PCI drivers,Intel8x0 driver # F:Documentation/ALSA-Configuration.txt:1.50->1.51 # F:pci/Kconfig:1.31->1.32 # F:pci/intel8x0.c:1.163->1.164 # L:snd-intel8x0's gameport/MIDI code has quite a few problems: the port # L:addresses cannot be detected reliably (or not at all with newer LPC # L:bridge devices), joystick port address 0x208 isn't supported, the MIDI # L:interrupt isn't detected, PnP isn't supported, changing the port # L:addresses in the LPC bridge configuration doesn't affect the devices # L:in the Super-I/O chip connected to the LPC bus, and registering this # L:driver for the LPC bridge PCI device prevents other drivers using the # L:LPC's PCI id from loading later. # L: # L:All these problems can be cured by removing the offending code and # L:using the proper modules for these devices (ns558/snd-mpu401) instead. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:19:32+02:00 perex@suse.cz # [ALSA] add AC97 quirk for Fujitsu-Siemens E4010 # # Intel8x0 driver # # # Signed-off-by: # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/02 06:59:21+02:00 perex@suse.cz +6 -0 # [ALSA] add AC97 quirk for Fujitsu-Siemens E4010 # # D:2004/09/02 12:59:21 # C:Intel8x0 driver # F:pci/intel8x0.c:1.162->1.163 # L: # Signed-off-by: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:18:46+02:00 perex@suse.cz # [ALSA] Fix latency in ens1371 driver # # ENS1370/1+ driver # The high latency in prepare callback of ens1371 driver is fixed. # The *_rate_set() functions are moved outside of spinlock, and # cond_resched() is inserted in the busy probing loop. # # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2004/09/01 14:27:33+02:00 perex@suse.cz +18 -6 # [ALSA] Fix latency in ens1371 driver # # D:2004/09/01 20:27:33 # C:ENS1370/1+ driver # F:pci/ens1370.c:1.68->1.69 # L:The high latency in prepare callback of ens1371 driver is fixed. # L:The *_rate_set() functions are moved outside of spinlock, and # L:cond_resched() is inserted in the busy probing loop. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:18:03+02:00 perex@suse.cz # [ALSA] suppress auto-loading of modules in module_init(). # # ALSA sequencer # The auto-loading of sequencer modules is suppressed in module_init(). # The recent module-init-tools may cause blocking. # # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_clientmgr.c # 2004/09/01 14:25:27+02:00 perex@suse.cz +4 -1 # [ALSA] suppress auto-loading of modules in module_init(). # # D:2004/09/01 20:25:27 # C:ALSA sequencer # F:core/seq/seq_clientmgr.c:1.34->1.35 # L:The auto-loading of sequencer modules is suppressed in module_init(). # L:The recent module-init-tools may cause blocking. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:17:20+02:00 perex@suse.cz # [ALSA] add missing ifdef for disabling MIDI # # Intel8x0 driver # # # Signed-off-by: # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/01 02:41:19+02:00 perex@suse.cz +2 -0 # [ALSA] add missing ifdef for disabling MIDI # # D:2004/09/01 08:41:19 # C:Intel8x0 driver # F:pci/intel8x0.c:1.161->1.162 # L: # Signed-off-by: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:16:34+02:00 perex@suse.cz # [ALSA] AC97 96 kHz sample rate support # # Documentation,AC97 Codec Core,Intel8x0 driver # # # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/09/01 02:30:56+02:00 perex@suse.cz +26 -11 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_proc.c # 2004/09/01 02:30:57+02:00 perex@suse.cz +4 -0 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_pcm.c # 2004/09/01 02:30:57+02:00 perex@suse.cz +120 -34 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_codec.c # 2004/09/01 02:30:57+02:00 perex@suse.cz +31 -1 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # include/sound/ac97_codec.h # 2004/09/01 02:30:56+02:00 perex@suse.cz +10 -1 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/09/01 02:30:56+02:00 perex@suse.cz +2 -2 # [ALSA] AC97 96 kHz sample rate support # # D:2004/09/01 08:30:56 # C:Documentation,AC97 Codec Core,Intel8x0 driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.38->1.39 # F:include/ac97_codec.h:1.50->1.51 # F:pci/intel8x0.c:1.160->1.161 # F:pci/ac97/ac97_codec.c:1.144->1.145 # F:pci/ac97/ac97_pcm.c:1.16->1.17 # F:pci/ac97/ac97_proc.c:1.10->1.11 # L: # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/09/06 20:15:40+02:00 perex@suse.cz # [ALSA] Korg1212 misc fixes # # KORG1212 driver # The DSP firmware download timeout has been increased; # Some concurrent device settings has been fixed (I have shameless copied # some code from RME9652); and # One debug message was fixed. # # Signed-off-by: Haroldo Gamal # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/08/31 04:50:15+02:00 perex@suse.cz +59 -9 # [ALSA] Korg1212 misc fixes # # D:2004/08/31 10:50:15 # C:KORG1212 driver # F:pci/korg1212/korg1212.c:1.47->1.48 # L:The DSP firmware download timeout has been increased; # L:Some concurrent device settings has been fixed (I have shameless copied # L:some code from RME9652); and # L:One debug message was fixed. # Signed-off-by: Haroldo Gamal # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:14:51+02:00 perex@suse.cz # [ALSA] Enable __GFP_NOWARN as default for buffer allocation # # Memalloc module # __GFP_NOWARN is enabled for DMA buffer allocation regardless of # its size. The DMA buffer allocation is not a critical task. # # Signed-off-by: Takashi Iwai # # sound/core/memalloc.c # 2004/08/31 04:49:23+02:00 perex@suse.cz +3 -4 # [ALSA] Enable __GFP_NOWARN as default for buffer allocation # # D:2004/08/31 10:49:23 # C:Memalloc module # F:core/memalloc.c:1.37->1.38 # L:__GFP_NOWARN is enabled for DMA buffer allocation regardless of # L:its size. The DMA buffer allocation is not a critical task. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:14:05+02:00 perex@suse.cz # [ALSA] Added __GFP_NORETRY to avoid OOM-killer # # Memalloc module # __GFP_NORETRY is added to the DMA buffer allocator to avoid triggering # OOM-killer. # # Signed-off-by: Takashi Iwai # # sound/core/memalloc.c # 2004/08/30 12:39:22+02:00 perex@suse.cz +1 -0 # [ALSA] Added __GFP_NORETRY to avoid OOM-killer # # D:2004/08/30 18:39:22 # C:Memalloc module # F:core/memalloc.c:1.36->1.37 # L:__GFP_NORETRY is added to the DMA buffer allocator to avoid triggering # L:OOM-killer. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:13:09+02:00 perex@suse.cz # ALSA CVS update # ES18xx driver # Fixed a bug in setting the filter register. # # A fix from the kernel OSS driver. The original report/patch is from # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=204147 # # Signed-off-by: Takashi Iwai # # sound/isa/es18xx.c # 2004/08/26 10:57:47+02:00 perex@suse.cz +5 -0 # ALSA CVS update # D:2004/08/26 16:57:47 # C:ES18xx driver # F:isa/es18xx.c:1.48->1.49 # L:Fixed a bug in setting the filter register. # L: # L:A fix from the kernel OSS driver. The original report/patch is from # L:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=204147 # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:12:22+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver # Allow the private EEPROM image for evaluation boards # # The driver may have a private EEPROM image instead of reading # from the board (as well as ice1724 does). It'll be helpful for # test boards. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.c # 2004/08/26 10:55:43+02:00 perex@suse.cz +39 -19 # ALSA CVS update # D:2004/08/26 16:55:43 # C:ICE1712 driver # F:pci/ice1712/ice1712.c:1.61->1.62 # L:Allow the private EEPROM image for evaluation boards # L: # L:The driver may have a private EEPROM image instead of reading # L:from the board (as well as ice1724 does). It'll be helpful for # L:test boards. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/09/06 20:11:34+02:00 perex@suse.cz # ALSA CVS update # ENS1370/1+ driver # Fixed AC3-passthru on ens1371/1373 boards. # # SRC is bypassed when the sample rate is 48k, so that the non-audio # signal won't be broken. The other sample rates still need SRC. # # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2004/08/26 10:53:55+02:00 perex@suse.cz +7 -0 # ALSA CVS update # D:2004/08/26 16:53:55 # C:ENS1370/1+ driver # F:pci/ens1370.c:1.67->1.68 # L:Fixed AC3-passthru on ens1371/1373 boards. # L: # L:SRC is bypassed when the sample rate is 48k, so that the non-audio # L:signal won't be broken. The other sample rates still need SRC. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/29 16:37:18-04:00 jgarzik@pobox.com # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/wireless/netwave_cs.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -12 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/wan/lmc/lmc_main.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -9 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/sk_mca.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -9 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/meth.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -26 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/net/ibmlana.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -9 # [netdev] Remove no-op in-driver implementations of ->set_config() # # drivers/media/dvb/dvb-core/dvb_net.c # 2004/08/29 16:37:11-04:00 jgarzik@pobox.com +0 -9 # [netdev] Remove no-op in-driver implementations of ->set_config() # # ChangeSet # 2004/08/28 19:25:49-04:00 olh@suse.de # [PATCH] remove old version check from mac8390 # # This 'netdevice' define will end up in the 'tags' file. # Its not used, so just remove it. # # drivers/net/mac8390.c # 2004/08/21 11:45:12-04:00 olh@suse.de +0 -4 # remove old version check from mac8390 # # ChangeSet # 2004/08/28 19:00:51-04:00 akpm@osdl.org # [PATCH] de4x5 warning fix # # Ugh. # # drivers/net/tulip/de4x5.c: In function `mii_get_phy': # drivers/net/tulip/de4x5.c:5092: warning: operation on `i' may be undefined # # Signed-off-by: Andrew Morton # # drivers/net/tulip/de4x5.c # 2004/08/26 03:24:25-04:00 akpm@osdl.org +1 -1 # de4x5 warning fix # # ChangeSet # 2004/08/28 18:53:53-04:00 akpm@osdl.org # [PATCH] sparse: fix warnings in net/irda/* # # From: "Mika Kukkonen" # # CHECK net/irda/irlan/irlan_client.c # net/irda/irlan/irlan_client.c:237:14: warning: assignment expression in # conditional # # Signed-off-by: Andrew Morton # # net/irda/irlan/irlan_client.c # 2004/08/27 02:30:32-04:00 akpm@osdl.org +1 -1 # sparse: fix warnings in net/irda/* # # ChangeSet # 2004/08/28 18:52:23-04:00 akpm@osdl.org # [PATCH] defxx device name fixes # # From: "Maciej W. Rozycki" # # This is a fix for the "fddi%d" device name reported literally due to the # switch from init_fddidev() to alloc_fddidev(). Plus related updates to # module information. Applies on top of the 2.4.27-defxx-sync2681 or # 2.6.8.1-defxx-misc patches, respectively. Please apply. # # Signed-off-by: Maciej W. Rozycki # Signed-off-by: Andrew Morton # # drivers/net/defxx.c # 2004/08/24 22:18:36-04:00 akpm@osdl.org +68 -68 # defxx device name fixes # # ChangeSet # 2004/08/28 18:52:12-04:00 akpm@osdl.org # [PATCH] defxx trivial updates # # From: "Maciej W. Rozycki" # # Here are a few obvious clean-ups I did to the driver. # # Signed-off-by: Maciej W. Rozycki # Signed-off-by: Andrew Morton # # drivers/net/defxx.h # 2004/08/24 22:18:36-04:00 akpm@osdl.org +1 -1 # defxx trivial updates # # drivers/net/defxx.c # 2004/08/24 22:18:36-04:00 akpm@osdl.org +5 -5 # defxx trivial updates # diff -Nru a/CREDITS b/CREDITS --- a/CREDITS 2004-10-26 18:25:18 -07:00 +++ b/CREDITS 2004-10-26 18:25:18 -07:00 @@ -46,13 +46,11 @@ S: United Kingdom N: Werner Almesberger -E: werner.almesberger@epfl.ch +E: werner@almesberger.net +W: http://www.almesberger.net/ D: dosfs, LILO, some fd features, ATM, various other hacks here and there -S: Ecole Polytechnique Federale de Lausanne -S: DSC ICA -S: INN (Ecublens) -S: CH-1015 Lausanne -S: Switzerland +S: Buenos Aires +S: Argentina N: Tim Alpaerts E: tim_alpaerts@toyota-motor-europe.com @@ -495,6 +493,14 @@ N: Matthias Bruestle E: m@mbsks.franken.de D: REINER SCT cyberJack pinpad/e-com USB chipcard reader driver +S: Germany + +N: Adrian Bunk +E: bunk@stusta.de +P: 1024D/4F12B400 B29C E71E FE19 6755 5C8A 84D4 99FC EA98 4F12 B400 +D: misc kernel hacking and testing +S: Grasmeierstrasse 11 +S: 80805 Muenchen S: Germany N: Ray Burr diff -Nru a/Documentation/DocBook/deviceiobook.tmpl b/Documentation/DocBook/deviceiobook.tmpl --- a/Documentation/DocBook/deviceiobook.tmpl 2004-10-26 18:25:18 -07:00 +++ b/Documentation/DocBook/deviceiobook.tmpl 2004-10-26 18:25:18 -07:00 @@ -147,8 +147,7 @@ compiler is not permitted to reorder the I/O sequence. When the ordering can be compiler optimised, you can use __readb and friends to indicate the relaxed ordering. Use - this with care. The rmb provides a read memory - barrier. The wmb provides a write memory barrier. + this with care. @@ -159,10 +158,72 @@ asynchronously. A driver author must issue a read from the same device to ensure that writes have occurred in the specific cases the author cares. This kind of property cannot be hidden from driver - writers in the API. + writers in the API. In some cases, the read used to flush the device + may be expected to fail (if the card is resetting, for example). In + that case, the read should be done from config space, which is + guaranteed to soft-fail if the card doesn't respond. + The following is an example of flushing a write to a device when + the driver would like to ensure the write's effects are visible prior + to continuing execution. + + + +static inline void +qla1280_disable_intrs(struct scsi_qla_host *ha) +{ + struct device_reg *reg; + + reg = ha->iobase; + /* disable risc and host interrupts */ + WRT_REG_WORD(&reg->ictrl, 0); + /* + * The following read will ensure that the above write + * has been received by the device before we return from this + * function. + */ + RD_REG_WORD(&reg->ictrl); + ha->flags.ints_enabled = 0; +} + + + + In addition to write posting, on some large multiprocessing systems + (e.g. SGI Challenge, Origin and Altix machines) posted writes won't + be strongly ordered coming from different CPUs. Thus it's important + to properly protect parts of your driver that do memory-mapped writes + with locks and use the mmiowb to make sure they + arrive in the order intended. + + + + Generally, one should use mmiowb prior to + releasing a spinlock that protects regions using writeb + or similar functions that aren't surrounded by + readb calls, which will ensure ordering and flushing. The + following example (again from qla1280.c) illustrates its use. + + + + sp->flags |= SRB_SENT; + ha->actthreads++; + WRT_REG_WORD(&reg->mailbox4, ha->req_ring_index); + + /* + * A Memory Mapped I/O Write Barrier is needed to ensure that this write + * of the request queue in register is ordered ahead of writes issued + * after this one by other CPUs. Access to the register is protected + * by the host_lock. Without the mmiowb, however, it is possible for + * this CPU to release the host lock, another CPU acquire the host lock, + * and write to the request queue in, and have the second write make it + * to the chip first. + */ + mmiowb(); /* posted write ordering */ + + + PCI ordering rules also guarantee that PIO read responses arrive after any outstanding DMA writes on that bus, since for some devices the result of a readb call may signal to the @@ -171,7 +232,9 @@ readb call has no relation to any previous DMA writes performed by the device. The driver can use readb_relaxed for these cases, although only - some platforms will honor the relaxed semantics. + some platforms will honor the relaxed semantics. Using the relaxed + read functions will provide significant performance benefits on + platforms that support it. diff -Nru a/Documentation/DocBook/mousedrivers.tmpl b/Documentation/DocBook/mousedrivers.tmpl --- a/Documentation/DocBook/mousedrivers.tmpl 2004-10-26 18:25:18 -07:00 +++ b/Documentation/DocBook/mousedrivers.tmpl 2004-10-26 18:25:18 -07:00 @@ -200,38 +200,33 @@ Next, in order to be able to use and test our code we need to add some - module code to support it. This too is fairly simple: + startup and shutdown code to support it. This too is fairly simple: -#ifdef MODULE - -int init_module(void) +static int init(void) { if(ourmouse_init()<0) return -ENODEV: return 0; } -void cleanup_module(void) +static void cleanup(void) { misc_deregister(&our_mouse); free_region(OURMOUSE_BASE, 3); } - - -#endif +module_init(init); +module_exit(cleanup); - The module code provides the normal two functions. The - init_module function is called when the module is - loaded. In our case it simply calls the initialising function we wrote + The module_init macro sets the function to call when the module is inserted (or at boot if the module were built into the kernel). In our case it is init, which simply calls the initialising function we wrote and returns an error if this fails. This ensures the module will only be loaded if it was successfully set up. - The cleanup_module function is called when the - module is unloaded. We give the miscellaneous device entry back, and + The module_exit macro sets the function to call when the + module is unloaded: if this is not set, the module cannot be unloaded. We give the miscellaneous device entry back, and then free our I/O resources. If we didn't free the I/O resources then the next time the module loaded it would think someone else had its I/O space. diff -Nru a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl --- a/Documentation/DocBook/videobook.tmpl 2004-10-26 18:25:19 -07:00 +++ b/Documentation/DocBook/videobook.tmpl 2004-10-26 18:25:19 -07:00 @@ -731,13 +731,14 @@ static int io = -1; +#endif MODULE_AUTHOR("Alan Cox"); MODULE_DESCRIPTION("A driver for an imaginary radio card."); -MODULE_PARM(io, "i"); +module_param(io, int, 0444); MODULE_PARM_DESC(io, "I/O address of the card."); -int init_module(void) +static int __init init(void) { if(io==-1) { @@ -748,25 +749,26 @@ return myradio_init(NULL); } -void cleanup_module(void) +static void __exit cleanup(void) { video_unregister_device(&my_radio); release_region(io, MY_IO_SIZE); } -#endif +module_init(init); +module_exit(cleanup); In this example we set the IO base by default if the driver is compiled into - the kernel where you cannot pass a parameter. For the module we require the + the kernel: you can still set it using "my_radio.irq" if this file is called my_radio.c. For the module we require the user sets the parameter. We set io to a nonsense port (-1) so that we can tell if the user supplied an io parameter or not. We use MODULE_ defines to give an author for the card driver and a description. We also use them to declare that io is an integer and it is the - address of the card. + address of the card, and can be read by anyone from sysfs. The clean-up routine unregisters the video_device we registered, and frees diff -Nru a/Documentation/devices.txt b/Documentation/devices.txt --- a/Documentation/devices.txt 2004-10-26 18:25:17 -07:00 +++ b/Documentation/devices.txt 2004-10-26 18:25:17 -07:00 @@ -2546,12 +2546,7 @@ 0 = /dev/usb/lp0 First USB printer ... 15 = /dev/usb/lp15 16th USB printer - 16 = /dev/usb/mouse0 First USB mouse - ... - 31 = /dev/usb/mouse15 16th USB mouse - 32 = /dev/usb/ez0 First USB firmware loader - ... - 47 = /dev/usb/ez15 16th USB firmware loader + 32 = /dev/usb/mdc800 MDC800 USB camera 48 = /dev/usb/scanner0 First USB scanner ... 63 = /dev/usb/scanner15 16th USB scanner @@ -2559,6 +2554,22 @@ 65 = /dev/usb/usblcd USBLCD Interface (info@usblcd.de) 66 = /dev/usb/cpad0 Synaptics cPad (mouse/LCD) + 96 = /dev/usb/hiddev0 1st USB HID device + ... + 111 = /dev/usb/hiddev15 16th USB HID device + 112 = /dev/usb/auer0 1st auerswald ISDN device + ... + 127 = /dev/usb/auer15 16th auerswald ISDN device + 128 = /dev/usb/brlvgr0 First Braille Voyager device + ... + 131 = /dev/usb/brlvgr3 Fourth Braille Voyager device + 144 = /dev/usb/lcd USB LCD device + 160 = /dev/usb/legousbtower0 1st USB Legotower device + ... + 175 = /dev/usb/legousbtower15 16th USB Legotower device + 240 = /dev/usb/dabusb0 First daubusb device + ... + 243 = /dev/usb/dabusb3 Fourth dabusb device 181 char Conrad Electronic parallel port radio clocks 0 = /dev/pcfclock0 First Conrad radio clock diff -Nru a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients --- a/Documentation/i2c/writing-clients 2004-10-26 18:25:17 -07:00 +++ b/Documentation/i2c/writing-clients 2004-10-26 18:25:17 -07:00 @@ -571,7 +571,7 @@ have to be cleaned up! */ static int __initdata foo_initialized = 0; - int __init foo_init(void) + static int __init foo_init(void) { int res; printk("foo version %s (%s)\n",FOO_VERSION,FOO_DATE); @@ -585,41 +585,27 @@ return 0; } - int __init foo_cleanup(void) + void foo_cleanup(void) { - int res; if (foo_initialized == 1) { if ((res = i2c_del_driver(&foo_driver))) { printk("foo: Driver registration failed, module not removed.\n"); - return res; + return; } foo_initialized --; } - return 0; } - #ifdef MODULE - /* Substitute your own name and email address */ MODULE_AUTHOR("Frodo Looijaard " MODULE_DESCRIPTION("Driver for Barf Inc. Foo I2C devices"); - int init_module(void) - { - return foo_init(); - } - - int cleanup_module(void) - { - return foo_cleanup(); - } - - #endif /* def MODULE */ + module_init(foo_init); + module_exit(foo_cleanup); Note that some functions are marked by `__init', and some data structures -by `__init_data'. If this driver is compiled as part of the kernel (instead -of as a module), those functions and structures can be removed after -kernel booting is completed. +by `__init_data'. Hose functions and structures can be removed after +kernel booting (or module loading) is completed. Command function ================ diff -Nru a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt --- a/Documentation/networking/e100.txt 2004-10-26 18:25:18 -07:00 +++ b/Documentation/networking/e100.txt 2004-10-26 18:25:18 -07:00 @@ -1,14 +1,16 @@ Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters ============================================================== -March 15, 2004 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter +- Driver Configuration Parameters +- Additional Configurations - Support @@ -16,26 +18,140 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of -Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based -systems. +Adapters, version 3.2.x. This driver includes support for Itanium(TM)2 and +EM64T systems. -Supported Adapters -================== - -To verify that your adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel PRO/100 network driver for Linux, see: +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp +Driver Configuration Parameters +=============================== + +The default value for each parameter is generally the recommended setting, +unless otherwise noted. + +Rx Descriptors: Number of receive descriptors. A receive descriptor is a data + structure that describes a receive buffer and its attributes to the network + controller. The data in the descriptor is used by the controller to write + data from the controller to host memory. In the 3.0.x driver the valid + range for this parameter is 64-256. The default value is 64. This parameter + can be changed using the command + + ethtool -G eth? rx n, where n is the number of desired rx descriptors. + +Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a + data structure that describes a transmit buffer and its attributes to the + network controller. The data in the descriptor is used by the controller to + read data from the host memory to the controller. In the 3.0.x driver the + valid range for this parameter is 64-256. The default value is 64. This + parameter can be changed using the command + + ethtool -G eth? tx n, where n is the number of desired tx descriptors. + +Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by + default. Ethtool can be used as follows to force speed/duplex. + + ethtool -s eth? autoneg off speed {10|100} duplex {full|half} + + NOTE: setting the speed/duplex to incorrect values will cause the link to + fail. + +Event Log Message Level: The driver uses the message level flag to log events + to syslog. The message level can be set at driver load time. It can also be + set using the command + + ethtool -s eth? msglvl n + +Additional Configurations +========================= + + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/100 Family of + Adapters is e100. + + As an example, if you install the e100 driver for two PRO/100 adapters + (eth0 and eth1), add the following to modules.conf: + + alias eth0 e100 + alias eth1 e100 + + Viewing Link Messages + --------------------- + In order to see link messages and other Intel driver information on your + console, you must set the dmesg level up to six. This can be done by + entering the following on the command line before loading the e100 driver: + + dmesg -n 8 + + If you wish to see all messages issued by the driver, including debug + messages, set the dmesg level to eight. + + NOTE: This setting is not saved across reboots. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found at: + http://sf.net/projects/gkernel. + + After ethtool is installed, ethtool-copy.h must be copied and renamed to + ethtool.h in your kernel source tree at /include/linux. + Backup the original ethtool.h as needed before copying. The driver then + must be recompiled in order to take advantage of the latest ethtool + features. + + NOTE: This driver uses mii support from the kernel. As a result, when + there is no link, ethtool will report speed/duplex to be 10/half. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + WoL is provided through the Ethtool* utility. Ethtool is included with Red + Hat* 8.0. For other Linux distributions, download and install Ethtool from + the following website: http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the Ethtool man + page. + + WoL will be enabled on the system during the next shut down or reboot. For + this driver version, in order to enable WoL, the e100 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e100 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. Support ======= diff -Nru a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt --- a/Documentation/networking/e1000.txt 2004-10-26 18:25:18 -07:00 +++ b/Documentation/networking/e1000.txt 2004-10-26 18:25:18 -07:00 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters =============================================================== -January 8, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Speed and Duplex Configuration - Additional Configurations @@ -20,63 +20,29 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family -of Adapters, version 5.0.x. This driver includes support for -Itanium(TM)-based systems. +of Adapters, version 5.x.x. This driver includes support for Itanium(TM)2 +and EM64T systems. +For questions related to hardware requirements, refer to the documentation +supplied with your Intel PRO/1000 adapter. All hardware requirements listed +apply to use with Linux. Native VLANs are now available with supported kernels. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, 717037-xxx - - 82543 PRO/1000 F Server Adapter 738640-xxx, A38888-xxx - - 82543 PRO/1000 T Server Adapter A19845-xxx, A33948-xxx - - 82544 PRO/1000 XT Server Adapter A51580-xxx - - 82544 PRO/1000 XF Server Adapter A50484-xxx - - 82544 PRO/1000 T Desktop Adapter A62947-xxx - - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 C91016-xxx - - 82545 PRO/1000 MT Server Adapter A92165-xxx - - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - - 82545 PRO/1000 MF Server Adapter A91622-xxx - - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - - -To verify your Intel adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel network drivers for Linux, refer to the following +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp - Command Line Parameters ======================= @@ -92,27 +58,39 @@ insmod e1000 TxDescriptors=80,128 -loads the e1000 driver with 80 TX resources for the first adapter and 128 TX -resources for the second adapter. +loads the e1000 driver with 80 TX descriptors for the first adapter and 128 TX +descriptors for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - -For more information about the AutoNeg, Duplex, and Speed parameters, see the -"Speed and Duplex Configuration" section in this document. +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. + + NOTES: For more information about the AutoNeg, Duplex, and Speed + parameters, see the "Speed and Duplex Configuration" section in + this document. + + For more information about the InterruptThrottleRate, RxIntDelay, + TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay parameters, see the + application note at: + http://www.intel.com/design/network/applnots/ap450.htm + A descriptor describes a data buffer and attributes related to the + data buffer. This information is accessed by the hardware. AutoNeg (adapters using copper connections only) Valid Range: 0x01-0x0F, 0x20-0x2F Default Value: 0x2F This parameter is a bit mask that specifies which speed and duplex settings the board advertises. When this parameter is used, the Speed and - Duplex parameters must not be specified. + Duplex parameters must not be specified. + NOTE: Refer to the Speed and Duplex section of this readme for more + information on the AutoNeg parameter. Duplex (adapters using copper connections only) Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full) Default Value: 0 - Defines the direction in which data is allowed to flow. Can by either one + Defines the direction in which data is allowed to flow. Can be either one or two-directional. If both Duplex and the link partner are set to auto- negotiate, the board auto-detects the correct duplex. If the link partner is forced (either full or half), Duplex defaults to half-duplex. @@ -125,22 +103,46 @@ InterruptThrottleRate Valid Range: 100-100000 (0=off, 1=dynamic) -Default Value: 1 +Default Value: 8000 This value represents the maximum number of interrupts per second the controller generates. InterruptThrottleRate is another setting used in interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust InterruptThrottleRate based on the current traffic load. +Un-supported Adapters: InterruptThrottleRate is NOT supported by 82542, 82543 + or 82544-based adapters. NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and RxAbsIntDelay parameters. In other words, minimizing the receive and/or transmit absolute delays does not force the controller to generate more interrupts than what the Interrupt Throttle Rate allows. + CAUTION: If you are using the Intel PRO/1000 CT Network Connection + (controller 82547), setting InterruptThrottleRate to a value + greater than 75,000, may hang (stop transmitting) adapters under + certain network conditions. If this occurs a NETDEV WATCHDOG + message is logged in the system event log. In addition, the + controller is automatically reset, restoring the network + connection. To eliminate the potential for the hang, ensure + that InterruptThrottleRate is set no greater than 75,000 and is + not set to 0. + NOTE: When e1000 is loaded with default settings and multiple adapters are + in use simultaneously, the CPU utilization may increase non-linearly. + In order to limit the CPU utilization without impacting the overall + throughput, we recommend that you load the driver as follows: + + insmod e1000.o InterruptThrottleRate=3000,3000,3000 + + This sets the InterruptThrottleRate to 3000 interrupts/sec for the + first, second, and third instances of the driver. The range of 2000 to + 3000 interrupts per second works on a majority of systems and is a + good starting point, but the optimal value will be platform-specific. + If CPU utilization is not a concern, use RX_POLLING (NAPI) and default + driver settings. RxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters -Default Value: 80 + 80-4096 for all other supported adapters +Default Value: 256 This value is the number of receive descriptors allocated by the driver. Increasing this value allows the driver to buffer more incoming packets. Each descriptor is 16 bytes. A receive buffer is also allocated for each @@ -149,6 +151,9 @@ NOTE: MTU designates the frame size. It only needs to be set for Jumbo Frames. + NOTE: Depending on the available system resources, the request for a + higher number of receive descriptors may be denied. In this case, + use a lower number. RxIntDelay Valid Range: 0-65535 (0=off) @@ -168,11 +173,11 @@ restoring the network connection. To eliminate the potential for the hang ensure that RxIntDelay is set to 0. -RxAbsIntDelay (82540, 82545, and 82546-based adapters only) +RxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 128 This value, in units of 1.024 microseconds, limits the delay in which a - transmit interrupt is generated. Useful only if RxIntDelay is non-zero, + receive interrupt is generated. Useful only if RxIntDelay is non-zero, this value ensures that an interrupt is generated after the initial packet is received within the set amount of time. Proper tuning, along with RxIntDelay, may improve traffic throughput in specific network @@ -188,12 +193,16 @@ TxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters + 80-4096 for all other supported adapters Default Value: 256 This value is the number of transmit descriptors allocated by the driver. Increasing this value allows the driver to queue more transmits. Each descriptor is 16 bytes. + NOTE: Depending on the available system resources, the request for a + higher number of transmit descriptors may be denied. In this case, + use a lower number. + TxIntDelay Valid Range: 0-65535 (0=off) Default Value: 64 @@ -203,7 +212,7 @@ system is reporting dropped transmits, this value may be set too high causing the driver to run out of available transmit descriptors. -TxAbsIntDelay (82540, 82545, and 82546-based adapters only) +TxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 64 This value, in units of 1.024 microseconds, limits the delay in which a @@ -219,7 +228,6 @@ A value of '1' indicates that the driver should enable IP checksum offload for received packets (both UDP and TCP) to the adapter hardware. - Speed and Duplex Configuration ============================== @@ -251,6 +259,10 @@ Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10 Duplex Full Full Half Full Half +For example to limit the negotiated speed/duplex on the interface to 10 Mbps +Half or Full duplex, set AutoNeg to 0x02: + insmod e1000 AutoNeg=0x02 + Note that setting AutoNeg does not guarantee that the board will link at the highest specified speed or duplex mode, but the board will link at the highest possible speed/duplex of the link partner IF the link partner is also @@ -261,6 +273,38 @@ Additional Configurations ========================= + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/1000 Family of + Adapters is e1000. + + As an example, if you install the e1000 driver for two PRO/1000 adapters + (eth0 and eth1) and set the speed and duplex to 10full and 100half, add the + following to modules.conf: + + alias eth0 e1000 + alias eth1 e1000 + options e1000 Speed=10,100 Duplex=2,1 + + Viewing Link Messages + --------------------- + + Link messages will not be displayed to the console if the distribution is + restricting system messages. In order to see network driver link messages on + your console, set dmesg to eight by entering the following: + + dmesg -n 8 + + NOTE: This setting is not saved across reboots. + Jumbo Frames ------------ @@ -278,6 +322,51 @@ 10 or 100 Mbps may result in poor performance or loss of link. + NOTE: MTU designates the frame size. To enable Jumbo Frames, increase the + MTU size on the interface beyond 1500. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found from + http://sf.net/projects/gkernel. After ethtool is installed, + ethtool-copy.h must be copied and renamed to ethtool.h in your kernel + source tree at /include/linux. Backup the original + ethtool.h as needed before copying. The driver then must be recompiled + in order to take advantage of the latest ethtool features. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + + WoL is configured through the Ethtool* utility. Ethtool is included with + all versions of Red Hat after Red Hat 7.2. For other Linux distributions, + download and install Ethtool from the following website: + http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the website listed + above. + + WoL will be enabled on the system during the next shut down or reboot. + For this driver version, in order to enable WoL, the e1000 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. + + Known Issues ============ @@ -285,9 +374,9 @@ ------------------------------- Memory allocation failures have been observed on Linux systems with 64 MB - of RAM or less that are running Jumbo Frames. If you are using Jumbo - Frames, your system may require more than the advertised minimum - requirement of 64 MB of system memory. + of RAM or less that are running Jumbo Frames. If you are using Jumbo Frames, + your system may require more than the advertised minimum requirement of 64 MB + of system memory. Support diff -Nru a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt --- a/Documentation/networking/ixgb.txt 2004-10-26 18:25:18 -07:00 +++ b/Documentation/networking/ixgb.txt 2004-10-26 18:25:18 -07:00 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters ================================================================ -January 06, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Improving Performance - Support @@ -18,36 +18,23 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family -of Adapters, version 1.0.x. This driver is intended for 2.4.x kernels; it is -known to build properly on 2.4.x kernels through 2.4.18. Intel focused -testing on Intel architectures running kernels 2.4.18. This driver includes -support for Itanium(TM)-based systems. +of Adapters, version 1.0.x. This driver includes support for Itanium(TM)2 and +EM64T systems. For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/10GbE adapter. All hardware requirements listed apply to use with Linux. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - +Identifying Your Adapter +======================== To verify your Intel adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +A12345-001. -For more information on how to identify your adapter, go to the Adapter & -Driver ID Guide at: +Use the above information and the Adapter & Driver ID Guide at: - http://support.intel.com/support/network/adapter/pro100/21397.htm + http://support.intel.com/support/network/adapter/pro100/21397.htm For the latest Intel network drivers for Linux, go to: @@ -72,8 +59,9 @@ resources for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. FlowControl Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) @@ -124,7 +112,6 @@ A value of '1' indicates that the driver should enable IP checksum offload for transmitted packets (both UDP and TCP) to the adapter hardware. - Improving Performance ===================== diff -Nru a/Documentation/networking/proc_net_tcp.txt b/Documentation/networking/proc_net_tcp.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/networking/proc_net_tcp.txt 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,47 @@ +This document describes the interfaces /proc/net/tcp and /proc/net/tcp6. + +These /proc interfaces provide information about currently active TCP +connections, and are implemented by tcp_get_info() in net/ipv4/tcp_ipv4.c and +tcp6_get_info() in net/ipv6/tcp_ipv6.c, respectively. + +It will first list all listening TCP sockets, and next list all established +TCP connections. A typical entry of /proc/net/tcp would look like this (split +up into 3 parts because of the length of the line): + + 46: 010310AC:9C4C 030310AC:1770 01 + | | | | | |--> connection state + | | | | |------> remote TCP port number + | | | |-------------> remote IPv4 address + | | |--------------------> local TCP port number + | |---------------------------> local IPv4 address + |----------------------------------> number of entry + + 00000150:00000000 01:00000019 00000000 + | | | | |--> number of unrecovered RTO timeouts + | | | |----------> number of jiffies until timer expires + | | |----------------> timer_active (see below) + | |----------------------> receive-queue + |-------------------------------> transmit-queue + + 1000 0 54165785 4 cd1e6040 25 4 27 3 -1 + | | | | | | | | | |--> slow start size threshold, + | | | | | | | | | or -1 if the treshold + | | | | | | | | | is >= 0xFFFF + | | | | | | | | |----> sending congestion window + | | | | | | | |-------> (ack.quick<<1)|ack.pingpong + | | | | | | |---------> Predicted tick of soft clock + | | | | | | (delayed ACK control data) + | | | | | |------------> retransmit timeout + | | | | |------------------> location of socket in memory + | | | |-----------------------> socket reference count + | | |-----------------------------> inode + | |----------------------------------> unanswered 0-window probes + |---------------------------------------------> uid + +timer_active: + 0 no timer is pending + 1 retransmit-timer is pending + 2 another timer (e.g. delayed ack or keepalive) is pending + 3 this is a socket in TIME_WAIT state. Not all fields will contain + data (or even exist) + 4 zero window probe timer is pending diff -Nru a/Documentation/s390/s390dbf.txt b/Documentation/s390/s390dbf.txt --- a/Documentation/s390/s390dbf.txt 2004-10-26 18:25:18 -07:00 +++ b/Documentation/s390/s390dbf.txt 2004-10-26 18:25:18 -07:00 @@ -78,6 +78,23 @@ > echo "-" > /proc/s390dbf/dasd/level +It is also possible to deactivate the debug feature globally for every +debug log. You can change the behavior using 2 sysctl parameters in +/proc/sys/s390dbf: +There are currently 2 possible triggers, which stop the debug feature +globally. The first possbility is to use the "debug_active" sysctl. If +set to 1 the debug feature is running. If "debug_active" is set to 0 the +debug feature is turned off. +The second trigger which stops the debug feature is an kernel oops. +That prevents the debug feature from overwriting debug information that +happened before the oops. After an oops you can reactivate the debug feature +by piping 1 to /proc/sys/s390dbf/debug_active. Nevertheless, its not +suggested to use an oopsed kernel in an production environment. +If you want to disallow the deactivation of the debug feature, you can use +the "debug_stoppable" sysctl. If you set "debug_stoppable" to 0 the debug +feature cannot be stopped. If the debug feature is already stopped, it +will stay deactivated. + Kernel Interfaces: ------------------ @@ -115,6 +132,17 @@ Return Value: none Description: Sets new actual debug level if new_level is valid. + +--------------------------------------------------------------------------- ++void debug_stop_all(void); + +Parameter: none + +Return Value: none + +Description: stops the debug feature if stopping is allowed. Currently + used in case of a kernel oops. + --------------------------------------------------------------------------- debug_entry_t* debug_event (debug_info_t* id, int level, void* data, int length); @@ -271,12 +299,12 @@ * hex_ascii- + raw-view Example */ -#include +#include #include static debug_info_t* debug_info; -int init_module(void) +static int init(void) { /* register 4 debug areas with one page each and 4 byte data field */ @@ -291,23 +319,26 @@ return 0; } -void cleanup_module(void) +static void cleanup(void) { debug_unregister (debug_info); } +module_init(init); +module_exit(cleanup); + --------------------------------------------------------------------------- /* * sprintf-view Example */ -#include +#include #include static debug_info_t* debug_info; -int init_module(void) +static int init(void) { /* register 4 debug areas with one page each and data field for */ /* format string pointer + 2 varargs (= 3 * sizeof(long)) */ @@ -321,11 +352,14 @@ return 0; } -void cleanup_module(void) +static void cleanup(void) { debug_unregister (debug_info); } +module_init(init); +module_exit(cleanup); + ProcFS Interface @@ -376,6 +410,15 @@ 2. Flush all debug areas: > echo "-" > /proc/s390dbf/dasd/flush + +Stooping the debug feature +-------------------------- +Example: + +1. Check if stopping is allowed +> cat /proc/sys/s390dbf/debug_stoppable +2. Stop debug feature +> echo 0 > /proc/sys/s390dbf/debug_active lcrash Interface ---------------- diff -Nru a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt --- a/Documentation/sound/alsa/ALSA-Configuration.txt 2004-10-26 18:25:17 -07:00 +++ b/Documentation/sound/alsa/ALSA-Configuration.txt 2004-10-26 18:25:17 -07:00 @@ -661,8 +661,6 @@ * ALi m5455 ac97_clock - AC'97 codec clock base (0 = auto-detect) - joystick - Enable joystick (default off) - mpu_port - MPU401 port # (0 = disabled, 0x330,0x300) ac97_quirk - AC'97 workaround for strange hardware (-1 = default) -1 = default, don't override 0 = disable @@ -670,6 +668,7 @@ 2 = swap headphone and master controls 3 = for AD1985, turn on OMS bit and use headphone 4 = for ALC65x, turn on the jack sense mode + 5 = inverted EAPD implementation buggy_irq - Enable workaround for buggy interrupts on some motherboards (default off) @@ -679,8 +678,9 @@ if you still encounter too fast playback, specify the clock explicitly via the module option "ac97_clock=41194". - The joystick and MPU-401 are supported only certain hardwares. - MPU401 is experimental, It doesn't work perfectly. + Joystick/MIDI ports are not supported by this driver. If your + motherboard has these devices, use the ns558 or snd-mpu401 + modules, respectively. The ac97_quirk option is used to enable/override the workaround for specific devices. Some hardware have swapped output pins @@ -809,6 +809,7 @@ buffer_top - specify buffer top address use_cache - 0 or 1 (disabled by default) vaio_hack - alias buffer_top=0x25a800 + reset_workaround - enable AC97 RESET workaround for some laptops Module supports autoprobe and multiple chips (max 8). @@ -833,6 +834,11 @@ other drivers, e.g. snd-cs4232 or snd-opl3sa2. Some has ISA-PnP but some doesn't have ISA PnP. You'll need to speicfy isapnp=0 and proper hardware parameters in the case without ISA PnP. + + Note: some laptops need a workaround for AC97 RESET. For the + known hardware like Dell Latitude LS and Sony PCG-F305, this + workaround is enabled automatically. For other laptops with a + hard freeze, you can try reset_workaround=1 option. Note: This driver is really crappy. It's a porting from the OSS driver, which is a result of black-magic reverse engineering. diff -Nru a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 2004-10-26 18:25:17 -07:00 +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 2004-10-26 18:25:17 -07:00 @@ -1479,7 +1479,7 @@ struct snd_mychip { .... unsigned long iobase_phys; - unsigned long iobase_virt; + void __iomem *iobase_virt; }; ]]> @@ -1495,8 +1495,7 @@ return err; } chip->iobase_phys = pci_resource_start(pci, 0); - chip->iobase_virt = (unsigned long) - ioremap_nocache(chip->iobase_phys, + chip->iobase_virt = ioremap_nocache(chip->iobase_phys, pci_resource_len(pci, 0)); ]]> @@ -1511,7 +1510,7 @@ { .... if (chip->iobase_virt) - iounmap((void *)chip->iobase_virt); + iounmap(chip->iobase_virt); .... pci_release_regions(chip->pci); .... @@ -4060,8 +4059,8 @@ Also, there is a function to change the sample rate (of a certain register such as - AC97_PCM_FRONT_DAC_RATE) when VRA is - supported by the codec: + AC97_PCM_FRONT_DAC_RATE) when VRA or + DRA is supported by the codec: snd_ac97_set_rate(). @@ -4341,7 +4340,39 @@ - If this function returns successfully with 0, then create a + When the accessing to the hardware requires special method + instead of the standard I/O access, you can create opl3 instance + separately with snd_opl3_new(). + + + + + + + + + + Then set command, + private_data and + private_free for the private + access function, the private data and the destructor. + The l_port and r_port are not necessarily set. Only the + command must be set properly. You can retrieve the data + from opl3->private_data field. + + + + After creating the opl3 instance via snd_opl3_new(), + call snd_opl3_init() to initialize the chip to the + proper state. Note that snd_opl3_create() always + calls it internally. + + + + If the opl3 instance is created successfully, then create a hwdep device for this opl3. diff -Nru a/Documentation/sound/alsa/Joystick.txt b/Documentation/sound/alsa/Joystick.txt --- a/Documentation/sound/alsa/Joystick.txt 2004-10-26 18:25:18 -07:00 +++ b/Documentation/sound/alsa/Joystick.txt 2004-10-26 18:25:18 -07:00 @@ -49,17 +49,15 @@ cs46xx N/A N/A es1938 N/A N/A es1968 joystick 0 = disable (default), 1 = enable - intel8x0(*1)joystick 0 = disable (default), 1 = enable sonicvibes N/A N/A trident N/A N/A - via82xx(*2) joystick 0 = disable (default), 1 = enable + via82xx(*1) joystick 0 = disable (default), 1 = enable ymfpci joystick_port 0 = disable (default), 1 = auto-detect, - manual: 0x201, 0x202, 0x204, 0x205(*3) + manual: 0x201, 0x202, 0x204, 0x205(*2) --------------------------------------------------------------------------- - *1) not all chips support joystick - *2) VIA686A/B only - *3) With YMF744/754 chips, the port address can be chosen arbitrarily + *1) VIA686A/B only + *2) With YMF744/754 chips, the port address can be chosen arbitrarily The following drivers don't support gameport natively, but there are additional modules. Load the corresponding module to add the gameport diff -Nru a/Documentation/sound/oss/README.modules b/Documentation/sound/oss/README.modules --- a/Documentation/sound/oss/README.modules 2004-10-26 18:25:18 -07:00 +++ b/Documentation/sound/oss/README.modules 2004-10-26 18:25:18 -07:00 @@ -59,8 +59,9 @@ uart401.o # Used by sb, maybe other cards Whichever card you have, try feeding it the options that would be the -default if you were making the driver wired, not as modules. You can look -at the init_module() code for the card to see what args are expected. +default if you were making the driver wired, not as modules. You can +look at function referred to by module_init() for the card to see what +args are expected. Note that at present there is no way to configure the io, irq and other parameters for the modular drivers as one does for the wired drivers.. One diff -Nru a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt --- a/Documentation/usb/error-codes.txt 2004-10-26 18:25:17 -07:00 +++ b/Documentation/usb/error-codes.txt 2004-10-26 18:25:17 -07:00 @@ -1,11 +1,12 @@ -Revised: 2002-Feb-09. +Revised: 2004-Oct-21 This is the documentation of (hopefully) all possible error codes (and their interpretation) that can be returned from usbcore. Some of them are returned by the Host Controller Drivers (HCDs), which device drivers only see through usbcore. As a rule, all the HCDs should -behave the same except for transfer speed dependent behaviors. +behave the same except for transfer speed dependent behaviors and the +way certain faults are reported. ************************************************************************** @@ -26,29 +27,35 @@ of urb. (treat as a host controller bug.) -EINVAL a) Invalid transfer type specified (or not supported) - b) Invalid interrupt interval (0<=n<256) - c) more than one interrupt packet requested + b) Invalid or unsupported periodic transfer interval + c) ISO: attempted to change transfer interval d) ISO: number_of_packets is < 0 + e) various other cases -EAGAIN a) specified ISO start frame too early b) (using ISO-ASAP) too much scheduled for the future wait some time and try again. --EFBIG too much ISO frames requested (currently uhci>900) +-EFBIG Host controller driver can't schedule that many ISO frames. -EPIPE Specified endpoint is stalled. For non-control endpoints, reset this status with usb_clear_halt(). --EMSGSIZE endpoint message size is zero, do interface/alternate setting +-EMSGSIZE (a) endpoint maxpacket size is zero; it is not usable + in the current interface altsetting. + (b) ISO packet is biger than endpoint maxpacket + (c) requested data transfer size is invalid (negative) --ENOSPC The host controller's bandwidth is already consumed and - this request would push it past its allowed limit. +-ENOSPC This request would overcommit the usb bandwidth reserved + for periodic transfers (interrupt, isochronous). --ESHUTDOWN The host controller has been disabled due to some +-ESHUTDOWN The device or host controller has been disabled due to some problem that could not be worked around. -EPERM Submission failed because urb->reject was set. +-EHOSTUNREACH URB was rejected because the device is suspended. + ************************************************************************** * Error codes returned by in urb->status * @@ -71,14 +78,14 @@ -EINPROGRESS URB still pending, no results yet (That is, if drivers see this it's a bug.) --EPROTO (*) a) bitstuff error +-EPROTO (*, **) a) bitstuff error b) no response packet received within the prescribed bus turn-around time c) unknown USB error --EILSEQ (*) CRC mismatch +-EILSEQ (*, **) CRC mismatch --EPIPE Endpoint stalled. For non-control endpoints, +-EPIPE (**) Endpoint stalled. For non-control endpoints, reset this status with usb_clear_halt(). -ECOMM During an IN transfer, the host controller @@ -97,7 +104,7 @@ specified buffer, and URB_SHORT_NOT_OK was set in urb->transfer_flags. --ETIMEDOUT transfer timed out, NAK +-ETIMEDOUT (**) transfer timed out, NAK -ENODEV Device was removed. Often preceded by a burst of other errors, since the hub driver does't detect @@ -110,12 +117,18 @@ -ECONNRESET URB was asynchronously unlinked by usb_unlink_urb --ESHUTDOWN The host controller has been disabled due to some - problem that could not be worked around. +-ESHUTDOWN The device or host controller has been disabled due + to some problem that could not be worked around, + such as a physical disconnect. (*) Error codes like -EPROTO, -EILSEQ and -EOVERFLOW normally indicate hardware problems such as bad devices (including firmware) or cables. + +(**) This is also one of several codes that different kinds of host +controller use to to indicate a transfer has failed because of device +disconnect. In the interval before the hub driver starts disconnect +processing, devices may receive such fault reports for every request. diff -Nru a/Documentation/usb/silverlink.txt b/Documentation/usb/silverlink.txt --- a/Documentation/usb/silverlink.txt 2004-10-26 18:25:17 -07:00 +++ b/Documentation/usb/silverlink.txt 2004-10-26 18:25:17 -07:00 @@ -1,5 +1,6 @@ ------------------------------------------------------------------------- Readme for Linux device driver for the Texas Instruments SilverLink cable +and direct USB cable provided by some TI's handhelds. ------------------------------------------------------------------------- Author: Romain Liévin & Julien Blache @@ -9,7 +10,8 @@ This is a driver for the TI-GRAPH LINK USB (aka SilverLink) cable, a cable designed by TI for connecting their TI8x/9x calculators to a computer -(PC or Mac usually). +(PC or Mac usually). It has been extended to support the USB port offered by +some latest TI handhelds (TI84+ and TI89 Titanium). If you need more information, please visit the 'SilverLink drivers' homepage at the above URL. @@ -73,4 +75,4 @@ CREDITS: The code is based on dabusb.c, printer.c and scanner.c ! -The driver has been developed independently of Texas Instruments. +The driver has been developed independently of Texas Instruments Inc. diff -Nru a/Documentation/usb/w9968cf.txt b/Documentation/usb/w9968cf.txt --- a/Documentation/usb/w9968cf.txt 2004-10-26 18:25:18 -07:00 +++ b/Documentation/usb/w9968cf.txt 2004-10-26 18:25:18 -07:00 @@ -8,26 +8,30 @@ Index ===== -1. Copyright -2. License -3. Overview -4. Supported devices -5. Module dependencies -6. Module loading -7. Module paramaters -8. Contact information -9. Credits +1. Copyright +2. Disclaimer +3. License +4. Overview +5. Supported devices +6. Module dependencies +7. Module loading +8. Module paramaters +9. Contact information +10. Credits 1. Copyright ============ Copyright (C) 2002-2004 by Luca Risolia + +2. Disclaimer +============= Winbond is a trademark of Winbond Electronics Corporation. -This driver is not sponsored or developed by Winbond. +This software is not sponsored or developed by Winbond. -2. License +3. License ========== 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 @@ -44,7 +48,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -3. Overview +4. Overview =========== This driver supports the video streaming capabilities of the devices mounting Winbond W9967CF and Winbond W9968CF JPEG USB Dual Mode Camera Chips. OV681 @@ -57,7 +61,7 @@ every time an application tries to open a recognized device, "w9968cf" checks the presence of the "w9968cf-vpp" module and loads it automatically by default. -Please keep in mind that official kernels do NOT include the second module for +Please keep in mind that official kernels do not include the second module for performance purposes. However it is always recommended to download and install the latest and complete release of the driver, replacing the existing one, if present: it will be still even possible not to load the "w9968cf-vpp" module at @@ -65,7 +69,7 @@ the official Linux 2.4 kernels is the writeable /proc filesystem interface. The latest and full-featured version of the W996[87]CF driver can be found at: -http://go.lamarinapunto.com/ . Please refer to the documentation included in +http://www.linux-projects.org. Please refer to the documentation included in that package, if you are going to use it. Up to 32 cameras can be handled at the same time. They can be connected and @@ -83,7 +87,7 @@ compiled with the automatic module loading option). -4. Supported devices +5. Supported devices ==================== At the moment, known W996[87]CF and OV681 based devices are: - Aroma Digi Pen VGA Dual Mode ADG-5000 (unknown image sensor) @@ -99,11 +103,9 @@ If you know any other W996[87]CF or OV681 based cameras, please contact me. -The list above does NOT imply that all those devices work with this driver: up +The list above does not imply that all those devices work with this driver: up until now only webcams that have an image sensor supported by the "ovcamchip" -module work. -For a list of supported image sensors, please visit the author's homepage on -this module: http://alpha.dyndns.org/ov511/ +module work. Kernel messages will always tell you whether this is case. Possible external microcontrollers of those webcams are not supported: this means that still images cannot be downloaded from the device memory. @@ -113,7 +115,7 @@ additional testing and full support, would be much appreciated. -5. Module dependencies +6. Module dependencies ====================== For it to work properly, the driver needs kernel support for Video4Linux, USB and I2C, and the "ovcamchip" module for the image sensor. Make sure you are not @@ -157,7 +159,7 @@ CONFIG_USB_W9968CF=m -6. Module loading +7. Module loading ================= To use the driver, it is necessary to load the "w9968cf" module into memory after every other module required. @@ -166,6 +168,7 @@ [root@localhost home]# modprobe usbcore [root@localhost home]# modprobe i2c-core + [root@localhost home]# modprobe videodev [root@localhost home]# modprobe w9968cf At this point the pertinent devices should be recognized: "dmesg" can be used @@ -181,7 +184,7 @@ [root@locahost home]# modinfo w9968cf -7. Module parameters +8. Module parameters ==================== Module parameters are listed below: ------------------------------------------------------------------------------- @@ -452,7 +455,7 @@ ------------------------------------------------------------------------------- -8. Contact information +9. Contact information ====================== I may be contacted by e-mail at . @@ -461,7 +464,7 @@ is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'. -9. Credits +10. Credits ========== The development would not have proceed much further without having looked at the source code of other drivers and without the help of several persons; in diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS 2004-10-26 18:25:18 -07:00 +++ b/MAINTAINERS 2004-10-26 18:25:18 -07:00 @@ -1760,6 +1760,13 @@ W: ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel S: Supported +PRISM54 WIRELESS DRIVER +P: Prism54 Development Team +M: prism54-private@prism54.org +L: netdev@oss.sgi.com +W: http://prism54.org +S: Maintained + PROMISE DC4030 CACHING DISK CONTROLLER DRIVER P: Peter Denison M: promise@pnd-pc.demon.co.uk @@ -2371,7 +2378,7 @@ P: Luca Risolia M: luca.risolia@studio.unibo.it L: linux-usb-devel@lists.sourceforge.net -W: http://go.lamarinapunto.com +W: http://www.linux-projects.org S: Maintained USB SUBSYSTEM @@ -2399,7 +2406,7 @@ P: Luca Risolia M: luca.risolia@studio.unibo.it L: linux-usb-devel@lists.sourceforge.net -W: http://go.lamarinapunto.com +W: http://www.linux-projects.org S: Maintained USER-MODE LINUX diff -Nru a/arch/alpha/boot/bootloader.lds b/arch/alpha/boot/bootloader.lds --- a/arch/alpha/boot/bootloader.lds 2004-10-26 18:25:18 -07:00 +++ b/arch/alpha/boot/bootloader.lds 2004-10-26 18:25:18 -07:00 @@ -1,5 +1,6 @@ OUTPUT_FORMAT("elf64-alpha") ENTRY(__start) +printk = srm_printk; SECTIONS { . = 0x20000000; diff -Nru a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c --- a/arch/alpha/boot/bootp.c 2004-10-26 18:25:18 -07:00 +++ b/arch/alpha/boot/bootp.c 2004-10-26 18:25:18 -07:00 @@ -26,6 +26,8 @@ struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa, unsigned long *vptb); +extern void move_stack(unsigned long new_stack); + struct hwrpb_struct *hwrpb = INIT_HWRPB; static struct pcb_struct pcb_va[1]; @@ -118,12 +120,10 @@ runkernel(void) { __asm__ __volatile__( - "bis %1,%1,$30\n\t" "bis %0,%0,$27\n\t" "jmp ($27)" : /* no outputs: it doesn't even return */ - : "r" (START_ADDR), - "r" (PAGE_SIZE + INIT_STACK)); + : "r" (START_ADDR)); } extern char _end; @@ -147,9 +147,7 @@ */ static long nbytes; static char envval[256] __attribute__((aligned(8))); -#ifdef INITRD_IMAGE_SIZE static unsigned long initrd_start; -#endif srm_printk("Linux/AXP bootp loader for Linux " UTS_RELEASE "\n"); if (INIT_HWRPB->pagesize != 8192) { @@ -164,12 +162,19 @@ } pal_init(); -#ifdef INITRD_IMAGE_SIZE /* The initrd must be page-aligned. See below for the cause of the magic number 5. */ - initrd_start = ((START_ADDR + 5*KERNEL_SIZE) | (PAGE_SIZE-1)) + 1; + initrd_start = ((START_ADDR + 5*KERNEL_SIZE + PAGE_SIZE) | + (PAGE_SIZE-1)) + 1; +#ifdef INITRD_IMAGE_SIZE srm_printk("Initrd positioned at %#lx\n", initrd_start); #endif + + /* + * Move the stack to a safe place to ensure it won't be + * overwritten by kernel image. + */ + move_stack(initrd_start - PAGE_SIZE); nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval)); if (nbytes < 0 || nbytes >= sizeof(envval)) { diff -Nru a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c --- a/arch/alpha/boot/bootpz.c 2004-10-26 18:25:17 -07:00 +++ b/arch/alpha/boot/bootpz.c 2004-10-26 18:25:17 -07:00 @@ -41,9 +41,6 @@ #undef DEBUG_ADDRESSES #undef DEBUG_LAST_STEPS -#define DEBUG_SP(x) \ - {register long sp asm("30"); srm_printk("%s (sp=%lx)\n", x, sp);} - extern unsigned long switch_to_osf_pal(unsigned long nr, struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa, unsigned long *vptb); @@ -51,6 +48,8 @@ extern int decompress_kernel(void* destination, void *source, size_t ksize, size_t kzsize); +extern void move_stack(unsigned long new_stack); + struct hwrpb_struct *hwrpb = INIT_HWRPB; static struct pcb_struct pcb_va[1]; @@ -163,12 +162,10 @@ runkernel(void) { __asm__ __volatile__( - "bis %1,%1,$30\n\t" "bis %0,%0,$27\n\t" "jmp ($27)" : /* no outputs: it doesn't even return */ - : "r" (START_ADDR), - "r" (PAGE_SIZE + INIT_STACK)); + : "r" (START_ADDR)); } /* Must record the SP (it is virtual) on entry, so we can make sure @@ -253,7 +250,9 @@ for "bootmem" anyway. */ #define K_COPY_IMAGE_START NEXT_PAGE(K_KERNEL_IMAGE_END) -#define K_INITRD_START NEXT_PAGE(K_COPY_IMAGE_START + KERNEL_SIZE) +/* Reserve one page below INITRD for the new stack. */ +#define K_INITRD_START \ + NEXT_PAGE(K_COPY_IMAGE_START + KERNEL_SIZE + PAGE_SIZE) #define K_COPY_IMAGE_END \ (K_INITRD_START + REAL_INITRD_SIZE + MALLOC_AREA_SIZE) #define K_COPY_IMAGE_SIZE \ @@ -419,8 +418,7 @@ initrd_image_start, INITRD_IMAGE_SIZE); #endif - memcpy((void *)initrd_image_start, - (void *)V_INITRD_START, + memcpy((void *)initrd_image_start, (void *)V_INITRD_START, INITRD_IMAGE_SIZE); #endif /* INITRD_IMAGE_SIZE */ @@ -436,9 +434,14 @@ K_KERNEL_IMAGE_START, (unsigned)KERNEL_SIZE); #endif + /* + * Move the stack to a safe place to ensure it won't be + * overwritten by kernel image. + */ + move_stack(initrd_image_start - PAGE_SIZE); + memcpy((void *)K_KERNEL_IMAGE_START, - (void *)uncompressed_image_start, - KERNEL_SIZE); + (void *)uncompressed_image_start, KERNEL_SIZE); } /* Clear the zero page, then move the argument list in. */ diff -Nru a/arch/alpha/boot/head.S b/arch/alpha/boot/head.S --- a/arch/alpha/boot/head.S 2004-10-26 18:25:19 -07:00 +++ b/arch/alpha/boot/head.S 2004-10-26 18:25:19 -07:00 @@ -100,3 +100,24 @@ .prologue 0 call_pal PAL_halt .end halt + +/* $16 - new stack page */ + .align 3 + .globl move_stack + .ent move_stack +move_stack: + .prologue 0 + lda $0, 0x1fff($31) + and $0, $30, $1 /* Stack offset */ + or $1, $16, $16 /* New stack pointer */ + mov $30, $1 + mov $16, $2 +1: ldq $3, 0($1) /* Move the stack */ + addq $1, 8, $1 + stq $3, 0($2) + and $0, $1, $4 + addq $2, 8, $2 + bne $4, 1b + mov $16, $30 + ret ($26) + .end move_stack diff -Nru a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c --- a/arch/alpha/boot/misc.c 2004-10-26 18:25:17 -07:00 +++ b/arch/alpha/boot/misc.c 2004-10-26 18:25:17 -07:00 @@ -205,15 +205,3 @@ /* puts(" done, booting the kernel.\n"); */ return output_ptr; } - -/* dummy-up printk */ -asmlinkage int printk(const char *fmt, ...) -{ - va_list args; - long ret; - - va_start(args, fmt); - ret = srm_printk(fmt, args); - va_end(args); - return ret; -} diff -Nru a/arch/alpha/lib/csum_partial_copy.c b/arch/alpha/lib/csum_partial_copy.c --- a/arch/alpha/lib/csum_partial_copy.c 2004-10-26 18:25:18 -07:00 +++ b/arch/alpha/lib/csum_partial_copy.c 2004-10-26 18:25:18 -07:00 @@ -251,7 +251,8 @@ * look at this too closely, you'll go blind. */ static inline unsigned long -csum_partial_cfu_unaligned(const unsigned long * src, unsigned long * dst, +csum_partial_cfu_unaligned(const unsigned long __user * src, + unsigned long * dst, unsigned long soff, unsigned long doff, long len, unsigned long checksum, unsigned long partial_dest, @@ -383,7 +384,8 @@ } unsigned int -csum_partial_copy_nocheck(const char *src, char *dst, int len, unsigned int sum) +csum_partial_copy_nocheck(const char __user *src, char *dst, int len, + unsigned int sum) { return do_csum_partial_copy_from_user(src, dst, len, sum, NULL); } diff -Nru a/arch/cris/arch-v10/drivers/ide.c b/arch/cris/arch-v10/drivers/ide.c --- a/arch/cris/arch-v10/drivers/ide.c 2004-10-26 18:25:18 -07:00 +++ b/arch/cris/arch-v10/drivers/ide.c 2004-10-26 18:25:18 -07:00 @@ -656,15 +656,9 @@ ata_tot_size = 0; - if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) { - sg_init_one(&sg[0], rq->buffer, rq->nr_sectors * SECTOR_SIZE); - hwif->sg_nents = i = 1; - } - else - { - hwif->sg_nents = i = blk_rq_map_sg(drive->queue, rq, hwif->sg_table); - } + ide_map_sg(drive, rq); + i = hwif->sg_nents; while(i) { /* diff -Nru a/arch/i386/crypto/aes-i586-asm.S b/arch/i386/crypto/aes-i586-asm.S --- a/arch/i386/crypto/aes-i586-asm.S 2004-10-26 18:25:18 -07:00 +++ b/arch/i386/crypto/aes-i586-asm.S 2004-10-26 18:25:18 -07:00 @@ -61,7 +61,6 @@ #define r3 edx #define r4 esi #define r5 edi -#define r6 ebp #define eaxl al #define eaxh ah @@ -84,60 +83,63 @@ // output registers r0, r1, r4 or r5. // Parameters: +// table table base address // %1 out_state[0] // %2 out_state[1] // %3 out_state[2] // %4 out_state[3] -// %5 table base address -// %6 input register for the round (destroyed) -// %7 scratch register for the round - -#define do_col(a1, a2, a3, a4, a5, a6, a7) \ - movzx %l(a6),%a7; \ - xor a5(,%a7,4),%a1; \ - movzx %h(a6),%a7; \ - shr $16,%a6; \ - xor a5+tlen(,%a7,4),%a2; \ - movzx %l(a6),%a7; \ - movzx %h(a6),%a6; \ - xor a5+2*tlen(,%a7,4),%a3; \ - xor a5+3*tlen(,%a6,4),%a4; +// idx input register for the round (destroyed) +// tmp scratch register for the round +// sched key schedule + +#define do_col(table, a1,a2,a3,a4, idx, tmp) \ + movzx %l(idx),%tmp; \ + xor table(,%tmp,4),%a1; \ + movzx %h(idx),%tmp; \ + shr $16,%idx; \ + xor table+tlen(,%tmp,4),%a2; \ + movzx %l(idx),%tmp; \ + movzx %h(idx),%idx; \ + xor table+2*tlen(,%tmp,4),%a3; \ + xor table+3*tlen(,%idx,4),%a4; // initialise output registers from the key schedule - -#define do_fcol(a1, a2, a3, a4, a5, a6, a7, a8) \ - mov 0 a8,%a1; \ - movzx %l(a6),%a7; \ - mov 12 a8,%a2; \ - xor a5(,%a7,4),%a1; \ - mov 4 a8,%a4; \ - movzx %h(a6),%a7; \ - shr $16,%a6; \ - xor a5+tlen(,%a7,4),%a2; \ - movzx %l(a6),%a7; \ - movzx %h(a6),%a6; \ - xor a5+3*tlen(,%a6,4),%a4; \ - mov %a3,%a6; \ - mov 8 a8,%a3; \ - xor a5+2*tlen(,%a7,4),%a3; +// NB1: original value of a3 is in idx on exit +// NB2: original values of a1,a2,a4 aren't used +#define do_fcol(table, a1,a2,a3,a4, idx, tmp, sched) \ + mov 0 sched,%a1; \ + movzx %l(idx),%tmp; \ + mov 12 sched,%a2; \ + xor table(,%tmp,4),%a1; \ + mov 4 sched,%a4; \ + movzx %h(idx),%tmp; \ + shr $16,%idx; \ + xor table+tlen(,%tmp,4),%a2; \ + movzx %l(idx),%tmp; \ + movzx %h(idx),%idx; \ + xor table+3*tlen(,%idx,4),%a4; \ + mov %a3,%idx; \ + mov 8 sched,%a3; \ + xor table+2*tlen(,%tmp,4),%a3; // initialise output registers from the key schedule - -#define do_icol(a1, a2, a3, a4, a5, a6, a7, a8) \ - mov 0 a8,%a1; \ - movzx %l(a6),%a7; \ - mov 4 a8,%a2; \ - xor a5(,%a7,4),%a1; \ - mov 12 a8,%a4; \ - movzx %h(a6),%a7; \ - shr $16,%a6; \ - xor a5+tlen(,%a7,4),%a2; \ - movzx %l(a6),%a7; \ - movzx %h(a6),%a6; \ - xor a5+3*tlen(,%a6,4),%a4; \ - mov %a3,%a6; \ - mov 8 a8,%a3; \ - xor a5+2*tlen(,%a7,4),%a3; +// NB1: original value of a3 is in idx on exit +// NB2: original values of a1,a2,a4 aren't used +#define do_icol(table, a1,a2,a3,a4, idx, tmp, sched) \ + mov 0 sched,%a1; \ + movzx %l(idx),%tmp; \ + mov 4 sched,%a2; \ + xor table(,%tmp,4),%a1; \ + mov 12 sched,%a4; \ + movzx %h(idx),%tmp; \ + shr $16,%idx; \ + xor table+tlen(,%tmp,4),%a2; \ + movzx %l(idx),%tmp; \ + movzx %h(idx),%idx; \ + xor table+3*tlen(,%idx,4),%a4; \ + mov %a3,%idx; \ + mov 8 sched,%a3; \ + xor table+2*tlen(,%tmp,4),%a3; // original Gladman had conditional saves to MMX regs. @@ -147,44 +149,75 @@ #define restore(a1, a2) \ mov 4*a2(%esp),%a1 -// This macro performs a forward encryption cycle. It is entered with -// the first previous round column values in r0, r1, r4 and r5 and -// exits with the final values in the same registers, using the MMX -// registers mm0-mm1 or the stack for temporary storage - -// mov current column values into the MMX registers -#define fwd_rnd(arg, table) \ - /* mov current column values into the MMX registers */ \ - mov %r0,%r2; \ - save (0,r1); \ - save (1,r5); \ - \ - /* compute new column values */ \ - do_fcol(r0,r5,r4,r1,table, r2,r3, arg); \ - do_col (r4,r1,r0,r5,table, r2,r3); \ - restore(r2,0); \ - do_col (r1,r0,r5,r4,table, r2,r3); \ - restore(r2,1); \ - do_col (r5,r4,r1,r0,table, r2,r3); - -// This macro performs an inverse encryption cycle. It is entered with -// the first previous round column values in r0, r1, r4 and r5 and -// exits with the final values in the same registers, using the MMX -// registers mm0-mm1 or the stack for temporary storage - -#define inv_rnd(arg, table) \ - /* mov current column values into the MMX registers */ \ - mov %r0,%r2; \ - save (0,r1); \ - save (1,r5); \ - \ - /* compute new column values */ \ - do_icol(r0,r1,r4,r5, table, r2,r3, arg); \ - do_col (r4,r5,r0,r1, table, r2,r3); \ - restore(r2,0); \ - do_col (r1,r4,r5,r0, table, r2,r3); \ - restore(r2,1); \ - do_col (r5,r0,r1,r4, table, r2,r3); +// These macros perform a forward encryption cycle. They are entered with +// the first previous round column values in r0,r1,r4,r5 and +// exit with the final values in the same registers, using stack +// for temporary storage. + +// round column values +// on entry: r0,r1,r4,r5 +// on exit: r2,r1,r4,r5 +#define fwd_rnd1(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_fcol(table, r2,r5,r4,r1, r0,r3, arg); /* idx=r0 */ \ + do_col (table, r4,r1,r2,r5, r0,r3); /* idx=r4 */ \ + restore(r0,0); \ + do_col (table, r1,r2,r5,r4, r0,r3); /* idx=r1 */ \ + restore(r0,1); \ + do_col (table, r5,r4,r1,r2, r0,r3); /* idx=r5 */ + +// round column values +// on entry: r2,r1,r4,r5 +// on exit: r0,r1,r4,r5 +#define fwd_rnd2(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_fcol(table, r0,r5,r4,r1, r2,r3, arg); /* idx=r2 */ \ + do_col (table, r4,r1,r0,r5, r2,r3); /* idx=r4 */ \ + restore(r2,0); \ + do_col (table, r1,r0,r5,r4, r2,r3); /* idx=r1 */ \ + restore(r2,1); \ + do_col (table, r5,r4,r1,r0, r2,r3); /* idx=r5 */ + +// These macros performs an inverse encryption cycle. They are entered with +// the first previous round column values in r0,r1,r4,r5 and +// exit with the final values in the same registers, using stack +// for temporary storage + +// round column values +// on entry: r0,r1,r4,r5 +// on exit: r2,r1,r4,r5 +#define inv_rnd1(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_icol(table, r2,r1,r4,r5, r0,r3, arg); /* idx=r0 */ \ + do_col (table, r4,r5,r2,r1, r0,r3); /* idx=r4 */ \ + restore(r0,0); \ + do_col (table, r1,r4,r5,r2, r0,r3); /* idx=r1 */ \ + restore(r0,1); \ + do_col (table, r5,r2,r1,r4, r0,r3); /* idx=r5 */ + +// round column values +// on entry: r2,r1,r4,r5 +// on exit: r0,r1,r4,r5 +#define inv_rnd2(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_icol(table, r0,r1,r4,r5, r2,r3, arg); /* idx=r2 */ \ + do_col (table, r4,r5,r0,r1, r2,r3); /* idx=r4 */ \ + restore(r2,0); \ + do_col (table, r1,r4,r5,r0, r2,r3); /* idx=r1 */ \ + restore(r2,1); \ + do_col (table, r5,r0,r1,r4, r2,r3); /* idx=r5 */ // AES (Rijndael) Encryption Subroutine @@ -198,7 +231,6 @@ aes_enc_blk: push %ebp mov ctx(%esp),%ebp // pointer to context - xor %eax,%eax // CAUTION: the order and the values used in these assigns // rely on the register mappings @@ -208,7 +240,9 @@ push %esi mov nrnd(%ebp),%r3 // number of rounds push %edi - lea ekey(%ebp),%r6 // key pointer +#if ekey != 0 + lea ekey(%ebp),%ebp // key pointer +#endif // input four columns and xor in first round key @@ -216,47 +250,47 @@ mov 4(%r2),%r1 mov 8(%r2),%r4 mov 12(%r2),%r5 - xor (%r6),%r0 - xor 4(%r6),%r1 - xor 8(%r6),%r4 - xor 12(%r6),%r5 + xor (%ebp),%r0 + xor 4(%ebp),%r1 + xor 8(%ebp),%r4 + xor 12(%ebp),%r5 sub $8,%esp // space for register saves on stack - add $16,%r6 // increment to next round key + add $16,%ebp // increment to next round key sub $10,%r3 je 4f // 10 rounds for 128-bit key - add $32,%r6 + add $32,%ebp sub $2,%r3 je 3f // 12 rounds for 128-bit key - add $32,%r6 + add $32,%ebp -2: fwd_rnd( -64(%r6) ,ft_tab) // 14 rounds for 128-bit key - fwd_rnd( -48(%r6) ,ft_tab) -3: fwd_rnd( -32(%r6) ,ft_tab) // 12 rounds for 128-bit key - fwd_rnd( -16(%r6) ,ft_tab) -4: fwd_rnd( (%r6) ,ft_tab) // 10 rounds for 128-bit key - fwd_rnd( +16(%r6) ,ft_tab) - fwd_rnd( +32(%r6) ,ft_tab) - fwd_rnd( +48(%r6) ,ft_tab) - fwd_rnd( +64(%r6) ,ft_tab) - fwd_rnd( +80(%r6) ,ft_tab) - fwd_rnd( +96(%r6) ,ft_tab) - fwd_rnd(+112(%r6) ,ft_tab) - fwd_rnd(+128(%r6) ,ft_tab) - fwd_rnd(+144(%r6) ,fl_tab) // last round uses a different table +2: fwd_rnd1( -64(%ebp) ,ft_tab) // 14 rounds for 128-bit key + fwd_rnd2( -48(%ebp) ,ft_tab) +3: fwd_rnd1( -32(%ebp) ,ft_tab) // 12 rounds for 128-bit key + fwd_rnd2( -16(%ebp) ,ft_tab) +4: fwd_rnd1( (%ebp) ,ft_tab) // 10 rounds for 128-bit key + fwd_rnd2( +16(%ebp) ,ft_tab) + fwd_rnd1( +32(%ebp) ,ft_tab) + fwd_rnd2( +48(%ebp) ,ft_tab) + fwd_rnd1( +64(%ebp) ,ft_tab) + fwd_rnd2( +80(%ebp) ,ft_tab) + fwd_rnd1( +96(%ebp) ,ft_tab) + fwd_rnd2(+112(%ebp) ,ft_tab) + fwd_rnd1(+128(%ebp) ,ft_tab) + fwd_rnd2(+144(%ebp) ,fl_tab) // last round uses a different table // move final values to the output array. CAUTION: the // order of these assigns rely on the register mappings add $8,%esp - mov out_blk+12(%esp),%r6 - mov %r5,12(%r6) + mov out_blk+12(%esp),%ebp + mov %r5,12(%ebp) pop %edi - mov %r4,8(%r6) + mov %r4,8(%ebp) pop %esi - mov %r1,4(%r6) + mov %r1,4(%ebp) pop %ebx - mov %r0,(%r6) + mov %r0,(%ebp) pop %ebp mov $1,%eax ret @@ -273,7 +307,6 @@ aes_dec_blk: push %ebp mov ctx(%esp),%ebp // pointer to context - xor %eax,%eax // CAUTION: the order and the values used in these assigns // rely on the register mappings @@ -283,10 +316,12 @@ push %esi mov nrnd(%ebp),%r3 // number of rounds push %edi - lea dkey(%ebp),%r6 // key pointer +#if dkey != 0 + lea dkey(%ebp),%ebp // key pointer +#endif mov %r3,%r0 shl $4,%r0 - add %r0,%r6 + add %r0,%ebp // input four columns and xor in first round key @@ -294,47 +329,47 @@ mov 4(%r2),%r1 mov 8(%r2),%r4 mov 12(%r2),%r5 - xor (%r6),%r0 - xor 4(%r6),%r1 - xor 8(%r6),%r4 - xor 12(%r6),%r5 + xor (%ebp),%r0 + xor 4(%ebp),%r1 + xor 8(%ebp),%r4 + xor 12(%ebp),%r5 - sub $8,%esp // space for register saves on stack - sub $16,%r6 // increment to next round key + sub $8,%esp // space for register saves on stack + sub $16,%ebp // increment to next round key sub $10,%r3 je 4f // 10 rounds for 128-bit key - sub $32,%r6 + sub $32,%ebp sub $2,%r3 je 3f // 12 rounds for 128-bit key - sub $32,%r6 + sub $32,%ebp -2: inv_rnd( +64(%r6), it_tab) // 14 rounds for 128-bit key - inv_rnd( +48(%r6), it_tab) -3: inv_rnd( +32(%r6), it_tab) // 12 rounds for 128-bit key - inv_rnd( +16(%r6), it_tab) -4: inv_rnd( (%r6), it_tab) // 10 rounds for 128-bit key - inv_rnd( -16(%r6), it_tab) - inv_rnd( -32(%r6), it_tab) - inv_rnd( -48(%r6), it_tab) - inv_rnd( -64(%r6), it_tab) - inv_rnd( -80(%r6), it_tab) - inv_rnd( -96(%r6), it_tab) - inv_rnd(-112(%r6), it_tab) - inv_rnd(-128(%r6), it_tab) - inv_rnd(-144(%r6), il_tab) // last round uses a different table +2: inv_rnd1( +64(%ebp), it_tab) // 14 rounds for 128-bit key + inv_rnd2( +48(%ebp), it_tab) +3: inv_rnd1( +32(%ebp), it_tab) // 12 rounds for 128-bit key + inv_rnd2( +16(%ebp), it_tab) +4: inv_rnd1( (%ebp), it_tab) // 10 rounds for 128-bit key + inv_rnd2( -16(%ebp), it_tab) + inv_rnd1( -32(%ebp), it_tab) + inv_rnd2( -48(%ebp), it_tab) + inv_rnd1( -64(%ebp), it_tab) + inv_rnd2( -80(%ebp), it_tab) + inv_rnd1( -96(%ebp), it_tab) + inv_rnd2(-112(%ebp), it_tab) + inv_rnd1(-128(%ebp), it_tab) + inv_rnd2(-144(%ebp), il_tab) // last round uses a different table // move final values to the output array. CAUTION: the // order of these assigns rely on the register mappings add $8,%esp - mov out_blk+12(%esp),%r6 - mov %r5,12(%r6) + mov out_blk+12(%esp),%ebp + mov %r5,12(%ebp) pop %edi - mov %r4,8(%r6) + mov %r4,8(%ebp) pop %esi - mov %r1,4(%r6) + mov %r1,4(%ebp) pop %ebx - mov %r0,(%r6) + mov %r0,(%ebp) pop %ebp mov $1,%eax ret diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile --- a/arch/i386/kernel/Makefile 2004-10-26 18:25:17 -07:00 +++ b/arch/i386/kernel/Makefile 2004-10-26 18:25:17 -07:00 @@ -7,7 +7,7 @@ obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \ pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ - doublefault.o + doublefault.o quirks.o obj-y += cpu/ obj-y += timers/ diff -Nru a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c --- a/arch/i386/kernel/apm.c 2004-10-26 18:25:17 -07:00 +++ b/arch/i386/kernel/apm.c 2004-10-26 18:25:17 -07:00 @@ -2393,27 +2393,27 @@ MODULE_AUTHOR("Stephen Rothwell"); MODULE_DESCRIPTION("Advanced Power Management"); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Enable debug mode"); -MODULE_PARM(power_off, "i"); +module_param(power_off, bool, 0444); MODULE_PARM_DESC(power_off, "Enable power off"); -MODULE_PARM(bounce_interval, "i"); +module_param(bounce_interval, int, 0444); MODULE_PARM_DESC(bounce_interval, "Set the number of ticks to ignore suspend bounces"); -MODULE_PARM(allow_ints, "i"); +module_param(allow_ints, bool, 0444); MODULE_PARM_DESC(allow_ints, "Allow interrupts during BIOS calls"); -MODULE_PARM(broken_psr, "i"); +module_param(broken_psr, bool, 0444); MODULE_PARM_DESC(broken_psr, "BIOS has a broken GetPowerStatus call"); -MODULE_PARM(realmode_power_off, "i"); +module_param(realmode_power_off, bool, 0444); MODULE_PARM_DESC(realmode_power_off, "Switch to real mode before powering off"); -MODULE_PARM(idle_threshold, "i"); +module_param(idle_threshold, int, 0444); MODULE_PARM_DESC(idle_threshold, "System idle percentage above which to make APM BIOS idle calls"); -MODULE_PARM(idle_period, "i"); +module_param(idle_period, int, 0444); MODULE_PARM_DESC(idle_period, "Period (in sec/100) over which to caculate the idle percentage"); -MODULE_PARM(smp, "i"); +module_param(smp, bool, 0444); MODULE_PARM_DESC(smp, "Set this to enable APM use on an SMP platform. Use with caution on older systems"); MODULE_ALIAS_MISCDEV(APM_MINOR_DEV); diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S 2004-10-26 18:25:17 -07:00 +++ b/arch/i386/kernel/entry.S 2004-10-26 18:25:17 -07:00 @@ -187,8 +187,8 @@ movl $PREEMPT_ACTIVE,TI_preempt_count(%ebp) sti call schedule - movl $0,TI_preempt_count(%ebp) cli + movl $0,TI_preempt_count(%ebp) jmp need_resched #endif @@ -867,7 +867,7 @@ .long sys_mq_getsetattr .long sys_ni_syscall /* reserved for kexec */ .long sys_waitid - .long sys_setaltroot /* 285 */ + .long sys_ni_syscall /* 285 */ /* available */ .long sys_add_key .long sys_request_key .long sys_keyctl diff -Nru a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/i386/kernel/quirks.c 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,49 @@ +/* + * This file contains work-arounds for x86 and x86_64 platform bugs. + */ +#include +#include + +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) + +void __init quirk_intel_irqbalance(struct pci_dev *dev) +{ + u8 config, rev; + u32 word; + + /* BIOS may enable hardware IRQ balancing for + * E7520/E7320/E7525(revision ID 0x9 and below) + * based platforms. + * Disable SW irqbalance/affinity on those platforms. + */ + pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); + if (rev > 0x9) + return; + + printk(KERN_INFO "Intel E7520/7320/7525 detected."); + + /* enable access to config space*/ + pci_read_config_byte(dev, 0xf4, &config); + config |= 0x2; + pci_write_config_byte(dev, 0xf4, config); + + /* read xTPR register */ + raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); + + if (!(word & (1 << 13))) { + printk(KERN_INFO "Disabling irq balancing and affinity\n"); +#ifdef CONFIG_IRQBALANCE + irqbalance_disable(""); +#endif + noirqdebug_setup(""); + no_irq_affinity = 1; + } + + config &= ~0x2; + /* disable access to config space*/ + pci_write_config_byte(dev, 0xf4, config); +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_intel_irqbalance); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SMCH, quirk_intel_irqbalance); +#endif diff -Nru a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c --- a/arch/i386/kernel/signal.c 2004-10-26 18:25:18 -07:00 +++ b/arch/i386/kernel/signal.c 2004-10-26 18:25:18 -07:00 @@ -600,7 +600,9 @@ * have been cleared if the watchpoint triggered * inside the kernel. */ - __asm__("movl %0,%%db7" : : "r" (current->thread.debugreg[7])); + if (unlikely(current->thread.debugreg[7])) { + __asm__("movl %0,%%db7" : : "r" (current->thread.debugreg[7])); + } /* Whee! Actually deliver the signal. */ handle_signal(signr, &info, &ka, oldset, regs); diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c --- a/arch/i386/mm/hugetlbpage.c 2004-10-26 18:25:18 -07:00 +++ b/arch/i386/mm/hugetlbpage.c 2004-10-26 18:25:18 -07:00 @@ -282,3 +282,143 @@ spin_unlock(&mm->page_table_lock); return ret; } + +/* x86_64 also uses this file */ + +#ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA +static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file, + unsigned long addr, unsigned long len, + unsigned long pgoff, unsigned long flags) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma; + unsigned long start_addr; + + start_addr = mm->free_area_cache; + +full_search: + addr = ALIGN(start_addr, HPAGE_SIZE); + + for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { + /* At this point: (!vma || addr < vma->vm_end). */ + if (TASK_SIZE - len < addr) { + /* + * Start a new search - just in case we missed + * some holes. + */ + if (start_addr != TASK_UNMAPPED_BASE) { + start_addr = TASK_UNMAPPED_BASE; + goto full_search; + } + return -ENOMEM; + } + if (!vma || addr + len <= vma->vm_start) { + mm->free_area_cache = addr + len; + return addr; + } + addr = ALIGN(vma->vm_end, HPAGE_SIZE); + } +} + +static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file, + unsigned long addr0, unsigned long len, + unsigned long pgoff, unsigned long flags) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma, *prev_vma; + unsigned long base = mm->mmap_base, addr = addr0; + int first_time = 1; + + /* don't allow allocations above current base */ + if (mm->free_area_cache > base) + mm->free_area_cache = base; + +try_again: + /* make sure it can fit in the remaining address space */ + if (mm->free_area_cache < len) + goto fail; + + /* either no address requested or cant fit in requested address hole */ + addr = (mm->free_area_cache - len) & HPAGE_MASK; + do { + /* + * Lookup failure means no vma is above this address, + * i.e. return with success: + */ + if (!(vma = find_vma_prev(mm, addr, &prev_vma))) + return addr; + + /* + * new region fits between prev_vma->vm_end and + * vma->vm_start, use it: + */ + if (addr + len <= vma->vm_start && + (!prev_vma || (addr >= prev_vma->vm_end))) + /* remember the address as a hint for next time */ + return (mm->free_area_cache = addr); + else + /* pull free_area_cache down to the first hole */ + if (mm->free_area_cache == vma->vm_end) + mm->free_area_cache = vma->vm_start; + + /* try just below the current vma->vm_start */ + addr = (vma->vm_start - len) & HPAGE_MASK; + } while (len <= vma->vm_start); + +fail: + /* + * if hint left us with no space for the requested + * mapping then try again: + */ + if (first_time) { + mm->free_area_cache = base; + first_time = 0; + goto try_again; + } + /* + * A failed mmap() very likely causes application failure, + * so fall back to the bottom-up function here. This scenario + * can happen with large stack limits and large mmap() + * allocations. + */ + mm->free_area_cache = TASK_UNMAPPED_BASE; + addr = hugetlb_get_unmapped_area_bottomup(file, addr0, + len, pgoff, flags); + + /* + * Restore the topdown base: + */ + mm->free_area_cache = base; + + return addr; +} + +unsigned long +hugetlb_get_unmapped_area(struct file *file, unsigned long addr, + unsigned long len, unsigned long pgoff, unsigned long flags) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma; + + if (len & ~HPAGE_MASK) + return -EINVAL; + if (len > TASK_SIZE) + return -ENOMEM; + + if (addr) { + addr = ALIGN(addr, HPAGE_SIZE); + vma = find_vma(mm, addr); + if (TASK_SIZE - len >= addr && + (!vma || addr + len <= vma->vm_start)) + return addr; + } + if (mm->get_unmapped_area == arch_get_unmapped_area) + return hugetlb_get_unmapped_area_bottomup(file, addr, len, + pgoff, flags); + else + return hugetlb_get_unmapped_area_topdown(file, addr, len, + pgoff, flags); +} + +#endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/ + diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S --- a/arch/ia64/kernel/entry.S 2004-10-26 18:25:17 -07:00 +++ b/arch/ia64/kernel/entry.S 2004-10-26 18:25:17 -07:00 @@ -1527,7 +1527,7 @@ data8 sys_mq_getsetattr data8 sys_ni_syscall // reserved for kexec_load data8 sys_ni_syscall - data8 sys_setaltroot // 1270 + data8 sys_ni_syscall // 1270 data8 sys_ni_syscall data8 sys_ni_syscall data8 sys_ni_syscall diff -Nru a/arch/ia64/sn/kernel/iomv.c b/arch/ia64/sn/kernel/iomv.c --- a/arch/ia64/sn/kernel/iomv.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ia64/sn/kernel/iomv.c 2004-10-26 18:25:18 -07:00 @@ -54,19 +54,16 @@ EXPORT_SYMBOL(sn_io_addr); /** - * sn_mmiob - I/O space memory barrier + * __sn_mmiowb - I/O space memory barrier * - * Acts as a memory mapped I/O barrier for platforms that queue writes to - * I/O space. This ensures that subsequent writes to I/O space arrive after - * all previous writes. For most ia64 platforms, this is a simple - * 'mf.a' instruction. For other platforms, mmiob() may have to read - * a chipset register to ensure ordering. + * See include/asm-ia64/io.h and Documentation/DocBook/deviceiobook.tmpl + * for details. * * On SN2, we wait for the PIO_WRITE_STATUS SHub register to clear. * See PV 871084 for details about the WAR about zero value. * */ -void sn_mmiob(void) +void __sn_mmiowb(void) { while ((((volatile unsigned long)(*pda->pio_write_status_addr)) & SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK) != @@ -74,4 +71,4 @@ cpu_relax(); } -EXPORT_SYMBOL(sn_mmiob); +EXPORT_SYMBOL(__sn_mmiowb); diff -Nru a/arch/ppc/boot/lib/Makefile b/arch/ppc/boot/lib/Makefile --- a/arch/ppc/boot/lib/Makefile 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc/boot/lib/Makefile 2004-10-26 18:25:18 -07:00 @@ -4,13 +4,7 @@ CFLAGS_kbd.o += -Idrivers/char -ZLIB_DIR := ../../../../lib/zlib_inflate/ - -lib-y := $(addprefix $(ZLIB_DIR), \ +lib-y := $(addprefix ../../../../lib/zlib_inflate/, \ infblock.o infcodes.o inffast.o inflate.o inftrees.o infutil.o) lib-y += div64.o lib-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o - -ifneq ($(KBUILD_SRC),) -_make_zlib_dir := $(shell [ -d $(obj)/$(ZLIB_DIR) ] || mkdir -p $(obj)/$(ZLIB_DIR) ) -endif diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile --- a/arch/ppc/boot/simple/Makefile 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc/boot/simple/Makefile 2004-10-26 18:25:17 -07:00 @@ -41,7 +41,7 @@ # if present on 'classic' PPC. cacheflag-y := -DCLEAR_CACHES="" # This file will flush / disable the L2, and L3 if present. -clear_L2_L3 := $(boot)/simple/clear.S +clear_L2_L3 := $(srctree)/$(boot)/simple/clear.S # # See arch/ppc/kconfig and arch/ppc/platforms/Kconfig diff -Nru a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig --- a/arch/ppc64/Kconfig 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/Kconfig 2004-10-26 18:25:18 -07:00 @@ -80,6 +80,16 @@ select ADB_PMU select U3_DART +config PPC_MAPLE + depends on PPC_MULTIPLATFORM + bool " Maple 970FX Evaluation Board" + select U3_DART + select MPIC_BROKEN_U3 + default n + help + This option enables support for the Maple 970FX Evaluation Board. + For more informations, refer to http://www.970eval.com + config PPC bool default y @@ -110,10 +120,20 @@ processors, that is, which share physical processors between two or more partitions. +config IBMVIO + depends on PPC_PSERIES || PPC_ISERIES + bool + default y + config U3_DART bool depends on PPC_MULTIPLATFORM default n + +config MPIC_BROKEN_U3 + bool + depends on PPC_MAPLE + default y config PPC_PMAC64 bool diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile --- a/arch/ppc64/Makefile 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/Makefile 2004-10-26 18:25:17 -07:00 @@ -55,11 +55,13 @@ boot := arch/ppc64/boot boottarget-$(CONFIG_PPC_PSERIES) := zImage zImage.initrd +boottarget-$(CONFIG_PPC_MAPLE) := zImage zImage.initrd boottarget-$(CONFIG_PPC_ISERIES) := vmlinux.sminitrd vmlinux.initrd vmlinux.sm $(boottarget-y): vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ bootimage-$(CONFIG_PPC_PSERIES) := zImage +bootimage-$(CONFIG_PPC_MAPLE) := zImage bootimage-$(CONFIG_PPC_ISERIES) := vmlinux BOOTIMAGE := $(bootimage-y) install: vmlinux diff -Nru a/arch/ppc64/configs/maple_defconfig b/arch/ppc64/configs/maple_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/configs/maple_defconfig 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,921 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.9 +# Wed Oct 20 15:39:14 2004 +# +CONFIG_64BIT=y +CONFIG_MMU=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_HAVE_DEC_LOCK=y +CONFIG_EARLY_PRINTK=y +CONFIG_COMPAT=y +CONFIG_FRAME_POINTER=y +CONFIG_FORCE_MAX_ZONEORDER=13 + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=17 +# CONFIG_HOTPLUG is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +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_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y +CONFIG_STOP_MACHINE=y +CONFIG_SYSVIPC_COMPAT=y + +# +# Platform support +# +# CONFIG_PPC_ISERIES is not set +CONFIG_PPC_MULTIPLATFORM=y +# CONFIG_PPC_PSERIES is not set +# CONFIG_PPC_PMAC is not set +CONFIG_PPC_MAPLE=y +CONFIG_PPC=y +CONFIG_PPC64=y +CONFIG_PPC_OF=y +# CONFIG_ALTIVEC is not set +CONFIG_U3_DART=y +CONFIG_MPIC_BROKEN_U3=y +CONFIG_BOOTX_TEXT=y +CONFIG_POWER4_ONLY=y +CONFIG_IOMMU_VMERGE=y +CONFIG_SMP=y +# CONFIG_IRQ_ALL_CPUS is not set +CONFIG_NR_CPUS=2 +# CONFIG_SCHED_SMT is not set +# CONFIG_PREEMPT is not set + +# +# General setup +# +CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y +CONFIG_PROC_DEVICETREE=y +# CONFIG_CMDLINE_BOOL is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# 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_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +# CONFIG_BLK_DEV_INITRD is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +CONFIG_IDE_TASK_IOCTL=y +CONFIG_IDE_TASKFILE_IO=y + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_IDEPCI=y +CONFIG_IDEPCI_SHARE_IRQ=y +# CONFIG_BLK_DEV_OFFBOARD is not set +CONFIG_BLK_DEV_GENERIC=y +# CONFIG_BLK_DEV_OPTI621 is not set +# CONFIG_BLK_DEV_SL82C105 is not set +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +CONFIG_IDEDMA_PCI_AUTO=y +# CONFIG_IDEDMA_ONLYDISK is not set +# CONFIG_BLK_DEV_AEC62XX is not set +# CONFIG_BLK_DEV_ALI15X3 is not set +CONFIG_BLK_DEV_AMD74XX=y +# CONFIG_BLK_DEV_CMD64X is not set +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5520 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +# CONFIG_BLK_DEV_HPT366 is not set +# CONFIG_BLK_DEV_SC1200 is not set +# CONFIG_BLK_DEV_PIIX is not set +# CONFIG_BLK_DEV_NS87415 is not set +# CONFIG_BLK_DEV_PDC202XX_OLD is not set +# CONFIG_BLK_DEV_PDC202XX_NEW is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIIMAGE is not set +# 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_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Macintosh device drivers +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# 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 is not set +# 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 is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL 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 +# CONFIG_NET_CLS_ROUTE 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 +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +CONFIG_AMD8111_ETH=y +# CONFIG_AMD8111E_NAPI is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1600 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# 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 +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_PMACZILOG is not set +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC 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_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +CONFIG_I2C_ALGOBIT=y +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +CONFIG_I2C_AMD8111=y +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_I810 is not set +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PROSAVAGE is not set +# CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set +# CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_SPLIT_ISO=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_UHCI_HCD=y + +# +# USB Device Class drivers +# +# CONFIG_USB_BLUETOOTH_TTY is not set +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_STORAGE is not set + +# +# USB Human Interface Devices (HID) +# +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_HID_FF is not set +# CONFIG_USB_HIDDEV is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + +# +# USB Network adaptors +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +CONFIG_USB_PEGASUS=y +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=y +# CONFIG_USB_SERIAL_CONSOLE is not set +CONFIG_USB_SERIAL_GENERIC=y +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_EMPEG is not set +# CONFIG_USB_SERIAL_FTDI_SIO is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +CONFIG_USB_SERIAL_KEYSPAN=y +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OMNINET is not set +CONFIG_USB_EZUSB=y + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_TEST is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS_XATTR=y +# CONFIG_DEVPTS_FS_SECURITY is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +# CONFIG_EXPORTFS is not set +CONFIG_SUNRPC=y +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 + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf-8" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_SLAB=y +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_STACKOVERFLOW=y +CONFIG_DEBUG_STACK_USAGE=y +CONFIG_DEBUGGER=y +CONFIG_XMON=y +CONFIG_XMON_DEFAULT=y +# CONFIG_PPCDBG is not set +# CONFIG_IRQSTACKS is not set +# CONFIG_SCHEDSTATS is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +# CONFIG_CRYPTO_HMAC 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_DES=y +# 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_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Library routines +# +CONFIG_CRC_CCITT=y +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/ppc64/kernel/LparData.c b/arch/ppc64/kernel/LparData.c --- a/arch/ppc64/kernel/LparData.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/LparData.c 2004-10-26 18:25:17 -07:00 @@ -6,9 +6,8 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include -#include -#include +#include +#include #include #include #include diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile --- a/arch/ppc64/kernel/Makefile 2004-10-26 18:25:19 -07:00 +++ b/arch/ppc64/kernel/Makefile 2004-10-26 18:25:19 -07:00 @@ -11,7 +11,7 @@ udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \ ptrace32.o signal32.o rtc.o init_task.o \ lmb.o cputable.o cpu_setup_power4.o idle_power4.o \ - iommu.o sysfs.o vio.o + iommu.o sysfs.o obj-$(CONFIG_PPC_OF) += of_device.o @@ -28,7 +28,7 @@ mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \ iSeries_iommu.o -obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o open_pic.o i8259.o prom_init.o prom.o +obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o prom.o mpic.o obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \ eeh.o pSeries_nvram.o rtasd.o ras.o \ @@ -45,14 +45,20 @@ obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o obj-$(CONFIG_BOOTX_TEXT) += btext.o obj-$(CONFIG_HVCS) += hvcserver.o +obj-$(CONFIG_IBMVIO) += vio.o obj-$(CONFIG_PPC_PMAC) += pmac_setup.o pmac_feature.o pmac_pci.o \ - pmac_time.o pmac_nvram.o pmac_low_i2c.o \ - open_pic_u3.o + pmac_time.o pmac_nvram.o pmac_low_i2c.o + +obj-$(CONFIG_PPC_MAPLE) += maple_setup.o maple_pci.o maple_time.o + obj-$(CONFIG_U3_DART) += u3_iommu.o ifdef CONFIG_SMP obj-$(CONFIG_PPC_PMAC) += pmac_smp.o smp-tbsync.o +obj-$(CONFIG_PPC_ISERIES) += iSeries_smp.o +obj-$(CONFIG_PPC_PSERIES) += pSeries_smp.o +obj-$(CONFIG_PPC_MAPLE) += smp-tbsync.o endif obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o diff -Nru a/arch/ppc64/kernel/cpu_setup_power4.S b/arch/ppc64/kernel/cpu_setup_power4.S --- a/arch/ppc64/kernel/cpu_setup_power4.S 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/cpu_setup_power4.S 2004-10-26 18:25:17 -07:00 @@ -156,6 +156,15 @@ cror 4*cr0+eq,4*cr0+eq,4*cr1+eq bne 1f + /* Before accessing memory, we make sure rm_ci is clear */ + li r0,0 + mfspr r3,SPRN_HID4 + rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */ + sync + mtspr SPRN_HID4,r3 + isync + sync + /* Clear interrupt prefix */ li r0,0 sync diff -Nru a/arch/ppc64/kernel/dma.c b/arch/ppc64/kernel/dma.c --- a/arch/ppc64/kernel/dma.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/dma.c 2004-10-26 18:25:17 -07:00 @@ -17,8 +17,10 @@ { if (dev->bus == &pci_bus_type) return pci_dma_supported(to_pci_dev(dev), mask); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_dma_supported(to_vio_dev(dev), mask); +#endif /* CONFIG_IBMVIO */ BUG(); return 0; } @@ -28,8 +30,10 @@ { if (dev->bus == &pci_bus_type) return pci_set_dma_mask(to_pci_dev(dev), dma_mask); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_set_dma_mask(to_vio_dev(dev), dma_mask); +#endif /* CONFIG_IBMVIO */ BUG(); return 0; } @@ -40,8 +44,10 @@ { if (dev->bus == &pci_bus_type) return pci_alloc_consistent(to_pci_dev(dev), size, dma_handle); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_alloc_consistent(to_vio_dev(dev), size, dma_handle); +#endif /* CONFIG_IBMVIO */ BUG(); return NULL; } @@ -52,8 +58,10 @@ { if (dev->bus == &pci_bus_type) pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle); +#ifdef CONFIG_IBMVIO else if (dev->bus == &vio_bus_type) vio_free_consistent(to_vio_dev(dev), size, cpu_addr, dma_handle); +#endif /* CONFIG_IBMVIO */ else BUG(); } @@ -64,8 +72,10 @@ { if (dev->bus == &pci_bus_type) return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_map_single(to_vio_dev(dev), cpu_addr, size, direction); +#endif /* CONFIG_IBMVIO */ BUG(); return (dma_addr_t)0; } @@ -76,8 +86,10 @@ { if (dev->bus == &pci_bus_type) pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction); +#ifdef CONFIG_IBMVIO else if (dev->bus == &vio_bus_type) vio_unmap_single(to_vio_dev(dev), dma_addr, size, direction); +#endif /* CONFIG_IBMVIO */ else BUG(); } @@ -89,8 +101,10 @@ { if (dev->bus == &pci_bus_type) return pci_map_page(to_pci_dev(dev), page, offset, size, (int)direction); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_map_page(to_vio_dev(dev), page, offset, size, direction); +#endif /* CONFIG_IBMVIO */ BUG(); return (dma_addr_t)0; } @@ -101,8 +115,10 @@ { if (dev->bus == &pci_bus_type) pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction); +#ifdef CONFIG_IBMVIO else if (dev->bus == &vio_bus_type) vio_unmap_page(to_vio_dev(dev), dma_address, size, direction); +#endif /* CONFIG_IBMVIO */ else BUG(); } @@ -113,8 +129,10 @@ { if (dev->bus == &pci_bus_type) return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); +#ifdef CONFIG_IBMVIO if (dev->bus == &vio_bus_type) return vio_map_sg(to_vio_dev(dev), sg, nents, direction); +#endif /* CONFIG_IBMVIO */ BUG(); return 0; } @@ -125,8 +143,10 @@ { if (dev->bus == &pci_bus_type) pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction); +#ifdef CONFIG_IBMVIO else if (dev->bus == &vio_bus_type) vio_unmap_sg(to_vio_dev(dev), sg, nhwentries, direction); +#endif /* CONFIG_IBMVIO */ else BUG(); } diff -Nru a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c --- a/arch/ppc64/kernel/eeh.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/eeh.c 2004-10-26 18:25:18 -07:00 @@ -17,29 +17,79 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include +#include +#include +#include #include #include -#include -#include #include -#include #include -#include -#include -#include +#include +#include #include #include -#include #include +#include #include "pci.h" #undef DEBUG +/** Overview: + * EEH, or "Extended Error Handling" is a PCI bridge technology for + * dealing with PCI bus errors that can't be dealt with within the + * usual PCI framework, except by check-stopping the CPU. Systems + * that are designed for high-availability/reliability cannot afford + * to crash due to a "mere" PCI error, thus the need for EEH. + * An EEH-capable bridge operates by converting a detected error + * into a "slot freeze", taking the PCI adapter off-line, making + * the slot behave, from the OS'es point of view, as if the slot + * were "empty": all reads return 0xff's and all writes are silently + * ignored. EEH slot isolation events can be triggered by parity + * errors on the address or data busses (e.g. during posted writes), + * which in turn might be caused by dust, vibration, humidity, + * radioactivity or plain-old failed hardware. + * + * Note, however, that one of the leading causes of EEH slot + * freeze events are buggy device drivers, buggy device microcode, + * or buggy device hardware. This is because any attempt by the + * device to bus-master data to a memory address that is not + * assigned to the device will trigger a slot freeze. (The idea + * is to prevent devices-gone-wild from corrupting system memory). + * Buggy hardware/drivers will have a miserable time co-existing + * with EEH. + * + * Ideally, a PCI device driver, when suspecting that an isolation + * event has occured (e.g. by reading 0xff's), will then ask EEH + * whether this is the case, and then take appropriate steps to + * reset the PCI slot, the PCI device, and then resume operations. + * However, until that day, the checking is done here, with the + * eeh_check_failure() routine embedded in the MMIO macros. If + * the slot is found to be isolated, an "EEH Event" is synthesized + * and sent out for processing. + */ + +/** Bus Unit ID macros; get low and hi 32-bits of the 64-bit BUID */ #define BUID_HI(buid) ((buid) >> 32) #define BUID_LO(buid) ((buid) & 0xffffffff) -#define CONFIG_ADDR(busno, devfn) \ - (((((busno) & 0xff) << 8) | ((devfn) & 0xf8)) << 8) + +/* EEH event workqueue setup. */ +static spinlock_t eeh_eventlist_lock = SPIN_LOCK_UNLOCKED; +LIST_HEAD(eeh_eventlist); +static void eeh_event_handler(void *); +DECLARE_WORK(eeh_event_wq, eeh_event_handler, NULL); + +static struct notifier_block *eeh_notifier_chain; + +/* + * If a device driver keeps reading an MMIO register in an interrupt + * handler after a slot isolation event has occurred, we assume it + * is broken and panic. This sets the threshold for how many read + * attempts we allow before panicking. + */ +#define EEH_MAX_FAILS 1000 +static atomic_t eeh_fail_count; /* RTAS tokens */ static int ibm_set_eeh_option; @@ -58,13 +108,15 @@ static DEFINE_PER_CPU(unsigned long, total_mmio_ffs); static DEFINE_PER_CPU(unsigned long, false_positives); static DEFINE_PER_CPU(unsigned long, ignored_failures); +static DEFINE_PER_CPU(unsigned long, slot_resets); /** * The pci address cache subsystem. This subsystem places * PCI device address resources into a red-black tree, sorted * according to the address range, so that given only an i/o * address, the corresponding PCI device can be **quickly** - * found. + * found. It is safe to perform an address lookup in an interrupt + * context; this ability is an important feature. * * Currently, the only customer of this code is the EEH subsystem; * thus, this code has been somewhat tailored to suit EEH better. @@ -333,6 +385,94 @@ #endif } +/* --------------------------------------------------------------- */ +/* Above lies the PCI Address Cache. Below lies the EEH event infrastructure */ + +/** + * eeh_register_notifier - Register to find out about EEH events. + * @nb: notifier block to callback on events + */ +int eeh_register_notifier(struct notifier_block *nb) +{ + return notifier_chain_register(&eeh_notifier_chain, nb); +} + +/** + * eeh_unregister_notifier - Unregister to an EEH event notifier. + * @nb: notifier block to callback on events + */ +int eeh_unregister_notifier(struct notifier_block *nb) +{ + return notifier_chain_unregister(&eeh_notifier_chain, nb); +} + +/** + * eeh_panic - call panic() for an eeh event that cannot be handled. + * The philosophy of this routine is that it is better to panic and + * halt the OS than it is to risk possible data corruption by + * oblivious device drivers that don't know better. + * + * @dev pci device that had an eeh event + * @reset_state current reset state of the device slot + */ +static void eeh_panic(struct pci_dev *dev, int reset_state) +{ + /* + * XXX We should create a separate sysctl for this. + * + * Since the panic_on_oops sysctl is used to halt the system + * in light of potential corruption, we can use it here. + */ + if (panic_on_oops) + panic("EEH: MMIO failure (%d) on device:%s %s\n", reset_state, + pci_name(dev), pci_pretty_name(dev)); + else { + __get_cpu_var(ignored_failures)++; + printk(KERN_INFO "EEH: Ignored MMIO failure (%d) on device:%s %s\n", + reset_state, pci_name(dev), pci_pretty_name(dev)); + } +} + +/** + * eeh_event_handler - dispatch EEH events. The detection of a frozen + * slot can occur inside an interrupt, where it can be hard to do + * anything about it. The goal of this routine is to pull these + * detection events out of the context of the interrupt handler, and + * re-dispatch them for processing at a later time in a normal context. + * + * @dummy - unused + */ +static void eeh_event_handler(void *dummy) +{ + unsigned long flags; + struct eeh_event *event; + + while (1) { + spin_lock_irqsave(&eeh_eventlist_lock, flags); + event = NULL; + if (!list_empty(&eeh_eventlist)) { + event = list_entry(eeh_eventlist.next, struct eeh_event, list); + list_del(&event->list); + } + spin_unlock_irqrestore(&eeh_eventlist_lock, flags); + if (event == NULL) + break; + + printk(KERN_INFO "EEH: MMIO failure (%d), notifiying device " + "%s %s\n", event->reset_state, + pci_name(event->dev), pci_pretty_name(event->dev)); + + atomic_set(&eeh_fail_count, 0); + notifier_call_chain (&eeh_notifier_chain, + EEH_NOTIFY_FREEZE, event); + + __get_cpu_var(slot_resets)++; + + pci_dev_put(event->dev); + kfree(event); + } +} + /** * eeh_token_to_phys - convert EEH address token to phys address * @token i/o token, should be address in the form 0xE.... @@ -357,11 +497,11 @@ * * Check for an EEH failure for the given device node. Call this * routine if the result of a read was all 0xff's and you want to - * find out if this is due to an EEH slot freeze event. This routine + * find out if this is due to an EEH slot freeze. This routine * will query firmware for the EEH status. * * Returns 0 if there has not been an EEH error; otherwise returns - * an error code. + * a non-zero value and queues up a solt isolation event notification. * * It is safe to call this routine in an interrupt context. */ @@ -370,6 +510,8 @@ int ret; int rets[2]; unsigned long flags; + int rc, reset_state; + struct eeh_event *event; __get_cpu_var(total_mmio_ffs)++; @@ -390,6 +532,24 @@ } /* + * If we already have a pending isolation event for this + * slot, we know it's bad already, we don't need to check... + */ + if (dn->eeh_mode & EEH_MODE_ISOLATED) { + atomic_inc(&eeh_fail_count); + if (atomic_read(&eeh_fail_count) >= EEH_MAX_FAILS) { + /* re-read the slot reset state */ + rets[0] = -1; + rtas_call(ibm_read_slot_reset_state, 3, 3, rets, + dn->eeh_config_addr, + BUID_HI(dn->phb->buid), + BUID_LO(dn->phb->buid)); + eeh_panic(dev, rets[0]); + } + return 0; + } + + /* * Now test for an EEH failure. This is VERY expensive. * Note that the eeh_config_addr may be a parent device * in the case of a device behind a bridge, or it may be @@ -400,47 +560,54 @@ dn->eeh_config_addr, BUID_HI(dn->phb->buid), BUID_LO(dn->phb->buid)); - if (ret == 0 && rets[1] == 1 && (rets[0] == 2 || rets[0] == 4)) { - int log_event; - - spin_lock_irqsave(&slot_errbuf_lock, flags); - memset(slot_errbuf, 0, eeh_error_buf_size); - - log_event = rtas_call(ibm_slot_error_detail, - 8, 1, NULL, dn->eeh_config_addr, - BUID_HI(dn->phb->buid), - BUID_LO(dn->phb->buid), NULL, 0, - virt_to_phys(slot_errbuf), - eeh_error_buf_size, - 1 /* Temporary Error */); - - if (log_event == 0) - log_error(slot_errbuf, ERR_TYPE_RTAS_LOG, - 1 /* Fatal */); - - spin_unlock_irqrestore(&slot_errbuf_lock, flags); - - printk(KERN_INFO "EEH: MMIO failure (%d) on device: %s %s\n", - rets[0], dn->name, dn->full_name); - WARN_ON(1); - - /* - * XXX We should create a separate sysctl for this. - * - * Since the panic_on_oops sysctl is used to halt - * the system in light of potential corruption, we - * can use it here. - */ - if (panic_on_oops) { - panic("EEH: MMIO failure (%d) on device: %s %s\n", - rets[0], dn->name, dn->full_name); - } else { - __get_cpu_var(ignored_failures)++; - } - } else { + if (!(ret == 0 && rets[1] == 1 && (rets[0] == 2 || rets[0] == 4))) { __get_cpu_var(false_positives)++; + return 0; } + /* prevent repeated reports of this failure */ + dn->eeh_mode |= EEH_MODE_ISOLATED; + + reset_state = rets[0]; + + spin_lock_irqsave(&slot_errbuf_lock, flags); + memset(slot_errbuf, 0, eeh_error_buf_size); + + rc = rtas_call(ibm_slot_error_detail, + 8, 1, NULL, dn->eeh_config_addr, + BUID_HI(dn->phb->buid), + BUID_LO(dn->phb->buid), NULL, 0, + virt_to_phys(slot_errbuf), + eeh_error_buf_size, + 1 /* Temporary Error */); + + if (rc == 0) + log_error(slot_errbuf, ERR_TYPE_RTAS_LOG, 0); + spin_unlock_irqrestore(&slot_errbuf_lock, flags); + + printk(KERN_INFO "EEH: MMIO failure (%d) on device: %s %s\n", + rets[0], dn->name, dn->full_name); + event = kmalloc(sizeof(*event), GFP_ATOMIC); + if (event == NULL) { + eeh_panic(dev, reset_state); + return 1; + } + + event->dev = dev; + event->dn = dn; + event->reset_state = reset_state; + + /* We may or may not be called in an interrupt context */ + spin_lock_irqsave(&eeh_eventlist_lock, flags); + list_add(&event->list, &eeh_eventlist); + spin_unlock_irqrestore(&eeh_eventlist_lock, flags); + + /* Most EEH events are due to device driver bugs. Having + * a stack trace will help the device-driver authors figure + * out what happened. So print that out. */ + dump_stack(); + schedule_work(&eeh_event_wq); + return 0; } @@ -701,11 +868,13 @@ { unsigned int cpu; unsigned long ffs = 0, positives = 0, failures = 0; + unsigned long resets = 0; for_each_cpu(cpu) { ffs += per_cpu(total_mmio_ffs, cpu); positives += per_cpu(false_positives, cpu); failures += per_cpu(ignored_failures, cpu); + resets += per_cpu(slot_resets, cpu); } if (0 == eeh_subsystem_enabled) { @@ -715,8 +884,11 @@ seq_printf(m, "EEH Subsystem is enabled\n"); seq_printf(m, "eeh_total_mmio_ffs=%ld\n" "eeh_false_positives=%ld\n" - "eeh_ignored_failures=%ld\n", - ffs, positives, failures); + "eeh_ignored_failures=%ld\n" + "eeh_slot_resets=%ld\n" + "eeh_fail_count=%d\n", + ffs, positives, failures, resets, + eeh_fail_count.counter); } return 0; diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S --- a/arch/ppc64/kernel/head.S 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/head.S 2004-10-26 18:25:18 -07:00 @@ -1195,18 +1195,20 @@ * At entry, r3 = this processor's number (in Linux terms, not hardware). */ _GLOBAL(pseries_secondary_smp_init) + mr r24,r3 + /* turn on 64-bit mode */ bl .enable_64b_mode isync - /* Set up a paca value for this processor. */ - LOADADDR(r24, paca) /* Get base vaddr of paca array */ - mulli r13,r3,PACA_SIZE /* Calculate vaddr of right paca */ - add r13,r13,r24 /* for this processor. */ + /* Copy some CPU settings from CPU 0 */ + bl .__restore_cpu_setup + /* Set up a paca value for this processor. */ + LOADADDR(r5, paca) /* Get base vaddr of paca array */ + mulli r13,r24,PACA_SIZE /* Calculate vaddr of right paca */ + add r13,r13,r5 /* for this processor. */ mtspr SPRG3,r13 /* Save vaddr of paca in SPRG3 */ - mr r24,r3 /* __secondary_start needs cpu# */ - 1: HMT_LOW lbz r23,PACAPROCSTART(r13) /* Test if this processor should */ @@ -1886,19 +1888,6 @@ 91: #endif -#ifdef CONFIG_SMP - /* All secondary cpus are now spinning on a common - * spinloop, release them all now so they can start - * to spin on their individual paca spinloops. - * For non SMP kernels, the secondary cpus never - * get out of the common spinloop. - */ - li r3,1 - LOADADDR(r5,__secondary_hold_spinloop) - tophys(r4,r5) - std r3,0(r4) -#endif - /* The following gets the stack and TOC set up with the regs */ /* pointing to the real addr of the kernel stack. This is */ /* all done to support the C function call below which sets */ @@ -1913,7 +1902,7 @@ li r0,0 stdu r0,-STACK_FRAME_OVERHEAD(r1) - /* set up the TOC (physical address) */ + /* set up the TOC (physical address) */ LOADADDR(r2,__toc_start) addi r2,r2,0x4000 addi r2,r2,0x4000 @@ -1925,6 +1914,25 @@ sub r4,r4,r26 mr r5,r26 bl .identify_cpu + + /* Save some low level config HIDs of CPU0 to be copied to + * other CPUs later on, or used for suspend/resume + */ + bl .__save_cpu_setup + sync + +#ifdef CONFIG_SMP + /* All secondary cpus are now spinning on a common + * spinloop, release them all now so they can start + * to spin on their individual paca spinloops. + * For non SMP kernels, the secondary cpus never + * get out of the common spinloop. + */ + li r3,1 + LOADADDR(r5,__secondary_hold_spinloop) + tophys(r4,r5) + std r3,0(r4) +#endif /* Setup a valid physical PACA pointer in SPRG3 for early_setup * note that boot_cpuid can always be 0 nowadays since there is diff -Nru a/arch/ppc64/kernel/i8259.c b/arch/ppc64/kernel/i8259.c --- a/arch/ppc64/kernel/i8259.c 2004-10-26 18:25:19 -07:00 +++ b/arch/ppc64/kernel/i8259.c 2004-10-26 18:25:19 -07:00 @@ -23,7 +23,8 @@ static spinlock_t i8259_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; -int i8259_pic_irq_offset; +static int i8259_pic_irq_offset; +static int i8259_present; int i8259_irq(int cpu) { @@ -140,11 +141,13 @@ NULL }; -void __init i8259_init(void) +void __init i8259_init(int offset) { unsigned long flags; spin_lock_irqsave(&i8259_lock, flags); + i8259_pic_irq_offset = offset; + i8259_present = 1; /* init master interrupt controller */ outb(0x11, 0x20); /* Start init sequence */ outb(0x00, 0x21); /* Vector base */ @@ -160,7 +163,18 @@ outb(cached_A1, 0xA1); outb(cached_21, 0x21); spin_unlock_irqrestore(&i8259_lock, flags); + +} + +static int i8259_request_cascade(void) +{ + if (!i8259_present) + return -ENODEV; + request_irq( i8259_pic_irq_offset + 2, no_action, SA_INTERRUPT, "82c59 secondary cascade", NULL ); - + + return 0; } + +arch_initcall(i8259_request_cascade); diff -Nru a/arch/ppc64/kernel/i8259.h b/arch/ppc64/kernel/i8259.h --- a/arch/ppc64/kernel/i8259.h 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/i8259.h 2004-10-26 18:25:17 -07:00 @@ -11,7 +11,7 @@ extern struct hw_interrupt_type i8259_pic; -void i8259_init(void); -int i8259_irq(int); +extern void i8259_init(int offset); +extern int i8259_irq(int); #endif /* _PPC_KERNEL_i8259_H */ diff -Nru a/arch/ppc64/kernel/iSeries_smp.c b/arch/ppc64/kernel/iSeries_smp.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/iSeries_smp.c 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,151 @@ +/* + * SMP support for iSeries machines. + * + * Dave Engebretsen, Peter Bergner, and + * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com + * + * Plus various changes from other IBM teams... + * + * 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. + */ + +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static unsigned long iSeries_smp_message[NR_CPUS]; + +void iSeries_smp_message_recv( struct pt_regs * regs ) +{ + int cpu = smp_processor_id(); + int msg; + + if ( num_online_cpus() < 2 ) + return; + + for ( msg = 0; msg < 4; ++msg ) + if ( test_and_clear_bit( msg, &iSeries_smp_message[cpu] ) ) + smp_message_recv( msg, regs ); +} + +static inline void smp_iSeries_do_message(int cpu, int msg) +{ + set_bit(msg, &iSeries_smp_message[cpu]); + HvCall_sendIPI(&(paca[cpu])); +} + +static void smp_iSeries_message_pass(int target, int msg) +{ + int i; + + if (target < NR_CPUS) + smp_iSeries_do_message(target, msg); + else { + for_each_online_cpu(i) { + if (target == MSG_ALL_BUT_SELF + && i == smp_processor_id()) + continue; + smp_iSeries_do_message(i, msg); + } + } +} + +static int smp_iSeries_numProcs(void) +{ + unsigned np, i; + + np = 0; + for (i=0; i < NR_CPUS; ++i) { + if (paca[i].lppaca.xDynProcStatus < 2) { + cpu_set(i, cpu_possible_map); + cpu_set(i, cpu_present_map); + ++np; + } + } + return np; +} + +static int smp_iSeries_probe(void) +{ + unsigned i; + unsigned np = 0; + + for (i=0; i < NR_CPUS; ++i) { + if (paca[i].lppaca.xDynProcStatus < 2) { + /*paca[i].active = 1;*/ + ++np; + } + } + + return np; +} + +static void smp_iSeries_kick_cpu(int nr) +{ + BUG_ON(nr < 0 || nr >= NR_CPUS); + + /* Verify that our partition has a processor nr */ + if (paca[nr].lppaca.xDynProcStatus >= 2) + return; + + /* The processor is currently spinning, waiting + * for the cpu_start field to become non-zero + * After we set cpu_start, the processor will + * continue on to secondary_start in iSeries_head.S + */ + paca[nr].cpu_start = 1; +} + +static void __devinit smp_iSeries_setup_cpu(int nr) +{ +} + +static struct smp_ops_t iSeries_smp_ops = { + .message_pass = smp_iSeries_message_pass, + .probe = smp_iSeries_probe, + .kick_cpu = smp_iSeries_kick_cpu, + .setup_cpu = smp_iSeries_setup_cpu, +}; + +/* This is called very early. */ +void __init smp_init_iSeries(void) +{ + smp_ops = &iSeries_smp_ops; + systemcfg->processorCount = smp_iSeries_numProcs(); +} + diff -Nru a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c --- a/arch/ppc64/kernel/idle.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/idle.c 2004-10-26 18:25:18 -07:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -363,12 +364,13 @@ } } #endif /* CONFIG_PPC_PSERIES */ -#ifdef CONFIG_PPC_PMAC - if (systemcfg->platform == PLATFORM_POWERMAC) { +#ifndef CONFIG_PPC_ISERIES + if (systemcfg->platform == PLATFORM_POWERMAC || + systemcfg->platform == PLATFORM_MAPLE) { printk(KERN_INFO "Using native/NAP idle loop\n"); idle_loop = native_idle; } -#endif /* CONFIG_PPC_PMAC */ +#endif /* CONFIG_PPC_ISERIES */ return 1; } diff -Nru a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c --- a/arch/ppc64/kernel/lparcfg.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/lparcfg.c 2004-10-26 18:25:17 -07:00 @@ -192,7 +192,7 @@ * is coming, but at this time is still problematic, so for now this * function will return 0. */ -static unsigned long get_purr() +static unsigned long get_purr(void) { unsigned long sum_purr = 0; return sum_purr; @@ -524,10 +524,10 @@ } struct file_operations lparcfg_fops = { - owner:THIS_MODULE, - read:seq_read, - open:lparcfg_open, - release:single_release, + .owner = THIS_MODULE, + .read = seq_read, + .open = lparcfg_open, + .release = single_release, }; int __init lparcfg_init(void) diff -Nru a/arch/ppc64/kernel/maple_pci.c b/arch/ppc64/kernel/maple_pci.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/maple_pci.c 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,528 @@ +/* + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), + * IBM Corp. + * + * 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. + */ + +#define DEBUG + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "pci.h" + +#ifdef DEBUG +#define DBG(x...) printk(x) +#else +#define DBG(x...) +#endif + +extern int pci_probe_only; +extern int pci_read_irq_line(struct pci_dev *pci_dev); + +static struct pci_controller *u3_agp, *u3_ht; + +static int __init fixup_one_level_bus_range(struct device_node *node, int higher) +{ + for (; node != 0;node = node->sibling) { + int * bus_range; + unsigned int *class_code; + int len; + + /* For PCI<->PCI bridges or CardBus bridges, we go down */ + class_code = (unsigned int *) get_property(node, "class-code", NULL); + if (!class_code || ((*class_code >> 8) != PCI_CLASS_BRIDGE_PCI && + (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) + continue; + bus_range = (int *) get_property(node, "bus-range", &len); + if (bus_range != NULL && len > 2 * sizeof(int)) { + if (bus_range[1] > higher) + higher = bus_range[1]; + } + higher = fixup_one_level_bus_range(node->child, higher); + } + return higher; +} + +/* This routine fixes the "bus-range" property of all bridges in the + * system since they tend to have their "last" member wrong on macs + * + * Note that the bus numbers manipulated here are OF bus numbers, they + * are not Linux bus numbers. + */ +static void __init fixup_bus_range(struct device_node *bridge) +{ + int * bus_range; + int len; + + /* Lookup the "bus-range" property for the hose */ + bus_range = (int *) get_property(bridge, "bus-range", &len); + if (bus_range == NULL || len < 2 * sizeof(int)) { + printk(KERN_WARNING "Can't get bus-range for %s\n", + bridge->full_name); + return; + } + bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]); +} + + +#define U3_AGP_CFA0(devfn, off) \ + ((1 << (unsigned long)PCI_SLOT(dev_fn)) \ + | (((unsigned long)PCI_FUNC(dev_fn)) << 8) \ + | (((unsigned long)(off)) & 0xFCUL)) + +#define U3_AGP_CFA1(bus, devfn, off) \ + ((((unsigned long)(bus)) << 16) \ + |(((unsigned long)(devfn)) << 8) \ + |(((unsigned long)(off)) & 0xFCUL) \ + |1UL) + +static unsigned long u3_agp_cfg_access(struct pci_controller* hose, + u8 bus, u8 dev_fn, u8 offset) +{ + unsigned int caddr; + + if (bus == hose->first_busno) { + if (dev_fn < (11 << 3)) + return 0; + caddr = U3_AGP_CFA0(dev_fn, offset); + } else + caddr = U3_AGP_CFA1(bus, dev_fn, offset); + + /* Uninorth will return garbage if we don't read back the value ! */ + do { + out_le32(hose->cfg_addr, caddr); + } while (in_le32(hose->cfg_addr) != caddr); + + offset &= 0x07; + return ((unsigned long)hose->cfg_data) + offset; +} + +static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 *val) +{ + struct pci_controller *hose; + unsigned long addr; + + hose = pci_bus_to_host(bus); + if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); + if (!addr) + return PCIBIOS_DEVICE_NOT_FOUND; + /* + * Note: the caller has already checked that offset is + * suitably aligned and that len is 1, 2 or 4. + */ + switch (len) { + case 1: + *val = in_8((u8 *)addr); + break; + case 2: + *val = in_le16((u16 *)addr); + break; + default: + *val = in_le32((u32 *)addr); + break; + } + return PCIBIOS_SUCCESSFUL; +} + +static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 val) +{ + struct pci_controller *hose; + unsigned long addr; + + hose = pci_bus_to_host(bus); + if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); + if (!addr) + return PCIBIOS_DEVICE_NOT_FOUND; + /* + * Note: the caller has already checked that offset is + * suitably aligned and that len is 1, 2 or 4. + */ + switch (len) { + case 1: + out_8((u8 *)addr, val); + (void) in_8((u8 *)addr); + break; + case 2: + out_le16((u16 *)addr, val); + (void) in_le16((u16 *)addr); + break; + default: + out_le32((u32 *)addr, val); + (void) in_le32((u32 *)addr); + break; + } + return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops u3_agp_pci_ops = +{ + u3_agp_read_config, + u3_agp_write_config +}; + + +#define U3_HT_CFA0(devfn, off) \ + ((((unsigned long)devfn) << 8) | offset) +#define U3_HT_CFA1(bus, devfn, off) \ + (U3_HT_CFA0(devfn, off) \ + + (((unsigned long)bus) << 16) \ + + 0x01000000UL) + +static unsigned long u3_ht_cfg_access(struct pci_controller* hose, + u8 bus, u8 devfn, u8 offset) +{ + if (bus == hose->first_busno) { + if (PCI_SLOT(devfn) == 0) + return 0; + return ((unsigned long)hose->cfg_data) + U3_HT_CFA0(devfn, offset); + } else + return ((unsigned long)hose->cfg_data) + U3_HT_CFA1(bus, devfn, offset); +} + +static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 *val) +{ + struct pci_controller *hose; + unsigned long addr; + + hose = pci_bus_to_host(bus); + if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); + if (!addr) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* + * Note: the caller has already checked that offset is + * suitably aligned and that len is 1, 2 or 4. + */ + switch (len) { + case 1: + *val = in_8((u8 *)addr); + break; + case 2: + *val = in_le16((u16 *)addr); + break; + default: + *val = in_le32((u32 *)addr); + break; + } + return PCIBIOS_SUCCESSFUL; +} + +static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 val) +{ + struct pci_controller *hose; + unsigned long addr; + + hose = pci_bus_to_host(bus); + if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); + if (!addr) + return PCIBIOS_DEVICE_NOT_FOUND; + /* + * Note: the caller has already checked that offset is + * suitably aligned and that len is 1, 2 or 4. + */ + switch (len) { + case 1: + out_8((u8 *)addr, val); + (void) in_8((u8 *)addr); + break; + case 2: + out_le16((u16 *)addr, val); + (void) in_le16((u16 *)addr); + break; + default: + out_le32((u32 *)addr, val); + (void) in_le32((u32 *)addr); + break; + } + return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops u3_ht_pci_ops = +{ + u3_ht_read_config, + u3_ht_write_config +}; + +static void __init setup_u3_agp(struct pci_controller* hose) +{ + /* On G5, we move AGP up to high bus number so we don't need + * to reassign bus numbers for HT. If we ever have P2P bridges + * on AGP, we'll have to move pci_assign_all_busses to the + * pci_controller structure so we enable it for AGP and not for + * HT childs. + * We hard code the address because of the different size of + * the reg address cell, we shall fix that by killing struct + * reg_property and using some accessor functions instead + */ + hose->first_busno = 0xf0; + hose->last_busno = 0xff; + hose->ops = &u3_agp_pci_ops; + hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000); + hose->cfg_data = ioremap(0xf0000000 + 0xc00000, 0x1000); + + u3_agp = hose; +} + +static void __init setup_u3_ht(struct pci_controller* hose) +{ + hose->ops = &u3_ht_pci_ops; + + /* We hard code the address because of the different size of + * the reg address cell, we shall fix that by killing struct + * reg_property and using some accessor functions instead + */ + hose->cfg_data = (volatile unsigned char *)ioremap(0xf2000000, 0x02000000); + + hose->first_busno = 0; + hose->last_busno = 0xef; + + u3_ht = hose; +} + +static int __init add_bridge(struct device_node *dev) +{ + int len; + struct pci_controller *hose; + char* disp_name; + int *bus_range; + int primary = 1; + struct property *of_prop; + + DBG("Adding PCI host bridge %s\n", dev->full_name); + + bus_range = (int *) get_property(dev, "bus-range", &len); + if (bus_range == NULL || len < 2 * sizeof(int)) { + printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", + dev->full_name); + } + + hose = pci_alloc_pci_controller(phb_type_apple); + if (!hose) + return -ENOMEM; + hose->arch_data = dev; + hose->first_busno = bus_range ? bus_range[0] : 0; + hose->last_busno = bus_range ? bus_range[1] : 0xff; + + of_prop = (struct property *)alloc_bootmem(sizeof(struct property) + + sizeof(hose->global_number)); + if (of_prop) { + memset(of_prop, 0, sizeof(struct property)); + of_prop->name = "linux,pci-domain"; + of_prop->length = sizeof(hose->global_number); + of_prop->value = (unsigned char *)&of_prop[1]; + memcpy(of_prop->value, &hose->global_number, sizeof(hose->global_number)); + prom_add_property(dev, of_prop); + } + + disp_name = NULL; + if (device_is_compatible(dev, "u3-agp")) { + setup_u3_agp(hose); + disp_name = "U3-AGP"; + primary = 0; + } else if (device_is_compatible(dev, "u3-ht")) { + setup_u3_ht(hose); + disp_name = "U3-HT"; + primary = 1; + } + printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n", + disp_name, hose->first_busno, hose->last_busno); + + /* Interpret the "ranges" property */ + /* This also maps the I/O region and sets isa_io/mem_base */ + pci_process_bridge_OF_ranges(hose, dev); + pci_setup_phb_io(hose, primary); + + /* Fixup "bus-range" OF property */ + fixup_bus_range(dev); + + return 0; +} + + +void __init maple_pcibios_fixup(void) +{ + struct pci_dev *dev = NULL; + + DBG(" -> maple_pcibios_fixup\n"); + + while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) + pci_read_irq_line(dev); + + /* Do the mapping of the IO space */ + phbs_remap_io(); + + /* Fixup the pci_bus sysdata pointers */ + pci_fix_bus_sysdata(); + + /* Setup the iommu */ + iommu_setup_u3(); + + DBG(" <- maple_pcibios_fixup\n"); +} + +static void __init maple_fixup_phb_resources(void) +{ + struct pci_controller *hose, *tmp; + + list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { + unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; + hose->io_resource.start += offset; + hose->io_resource.end += offset; + printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n", + hose->global_number, + hose->io_resource.start, hose->io_resource.end); + } +} + +void __init maple_pci_init(void) +{ + struct device_node *np, *root; + struct device_node *ht = NULL; + + /* Probe root PCI hosts, that is on U3 the AGP host and the + * HyperTransport host. That one is actually "kept" around + * and actually added last as it's resource management relies + * on the AGP resources to have been setup first + */ + root = of_find_node_by_path("/"); + if (root == NULL) { + printk(KERN_CRIT "maple_find_bridges: can't find root of device tree\n"); + return; + } + for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) { + if (np->name == NULL) + continue; + if (strcmp(np->name, "pci") == 0) { + if (add_bridge(np) == 0) + of_node_get(np); + } + if (strcmp(np->name, "ht") == 0) { + of_node_get(np); + ht = np; + } + } + of_node_put(root); + + /* Now setup the HyperTransport host if we found any + */ + if (ht && add_bridge(ht) != 0) + of_node_put(ht); + + /* Fixup the IO resources on our host bridges as the common code + * does it only for childs of the host bridges + */ + maple_fixup_phb_resources(); + + /* Setup the linkage between OF nodes and PHBs */ + pci_devs_phb_init(); + + /* Fixup the PCI<->OF mapping for U3 AGP due to bus renumbering. We + * assume there is no P2P bridge on the AGP bus, which should be a + * safe assumptions hopefully. + */ + if (u3_agp) { + struct device_node *np = u3_agp->arch_data; + np->busno = 0xf0; + for (np = np->child; np; np = np->sibling) + np->busno = 0xf0; + } + + /* Tell pci.c to use the common resource allocation mecanism */ + pci_probe_only = 0; + + /* Allow all IO */ + io_page_mask = -1; +} + +int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel) +{ + struct device_node *np; + int irq = channel ? 15 : 14; + + if (pdev->vendor != PCI_VENDOR_ID_AMD || + pdev->device != PCI_DEVICE_ID_AMD_8111_IDE) + return irq; + + np = pci_device_to_OF_node(pdev); + if (np == NULL) + return irq; + if (np->n_intrs < 2) + return irq; + return np->intrs[channel & 0x1].line; +} + +/* XXX: To remove once all firmwares are ok */ +static void fixup_maple_ide(struct pci_dev* dev) +{ +#if 0 /* Enable this to enable IDE port 0 */ + { + u8 v; + + pci_read_config_byte(dev, 0x40, &v); + v |= 2; + pci_write_config_byte(dev, 0x40, v); + } +#endif +#if 0 /* fix bus master base */ + pci_write_config_dword(dev, 0x20, 0xcc01); + printk("old ide resource: %lx -> %lx \n", + dev->resource[4].start, dev->resource[4].end); + dev->resource[4].start = 0xcc00; + dev->resource[4].end = 0xcc10; +#endif +#if 1 /* Enable this to fixup IDE sense/polarity of irqs in IO-APICs */ + { + struct pci_dev *apicdev; + u32 v; + + apicdev = pci_get_slot (dev->bus, PCI_DEVFN(5,0)); + if (apicdev == NULL) + printk("IDE Fixup IRQ: Can't find IO-APIC !\n"); + else { + pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*14); + pci_read_config_dword(apicdev, 0xf4, &v); + v &= ~0x00000022; + pci_write_config_dword(apicdev, 0xf4, v); + pci_write_config_byte(apicdev, 0xf2, 0x10 + 2*15); + pci_read_config_dword(apicdev, 0xf4, &v); + v &= ~0x00000022; + pci_write_config_dword(apicdev, 0xf4, v); + pci_dev_put(apicdev); + } + } +#endif +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE, + fixup_maple_ide); diff -Nru a/arch/ppc64/kernel/maple_setup.c b/arch/ppc64/kernel/maple_setup.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/maple_setup.c 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,243 @@ +/* + * arch/ppc64/kernel/maple_setup.c + * + * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), + * IBM Corp. + * + * 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. + * + */ + +#define DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mpic.h" + +#ifdef DEBUG +#define DBG(fmt...) udbg_printf(fmt) +#else +#define DBG(fmt...) +#endif + +extern int maple_set_rtc_time(struct rtc_time *tm); +extern void maple_get_rtc_time(struct rtc_time *tm); +extern void maple_get_boot_time(struct rtc_time *tm); +extern void maple_calibrate_decr(void); +extern void maple_pci_init(void); +extern void maple_pcibios_fixup(void); +extern int maple_pci_get_legacy_ide_irq(struct pci_dev *dev, int channel); +extern void generic_find_legacy_serial_ports(unsigned int *default_speed); + + +static void maple_restart(char *cmd) +{ +} + +static void maple_power_off(void) +{ +} + +static void maple_halt(void) +{ +} + +#ifdef CONFIG_SMP +struct smp_ops_t maple_smp_ops = { + .probe = smp_mpic_probe, + .message_pass = smp_mpic_message_pass, + .kick_cpu = smp_generic_kick_cpu, + .setup_cpu = smp_mpic_setup_cpu, + .give_timebase = smp_generic_give_timebase, + .take_timebase = smp_generic_take_timebase, +}; +#endif /* CONFIG_SMP */ + +void __init maple_setup_arch(void) +{ + /* init to some ~sane value until calibrate_delay() runs */ + loops_per_jiffy = 50000000; + + /* Setup SMP callback */ +#ifdef CONFIG_SMP + smp_ops = &maple_smp_ops; +#endif + /* Setup the PCI DMA to "direct" by default. May be overriden + * by iommu later on + */ + pci_dma_init_direct(); + + /* Lookup PCI hosts */ + maple_pci_init(); + +#ifdef CONFIG_DUMMY_CONSOLE + conswitchp = &dummy_con; +#endif +} + +/* + * Early initialization. + */ +static void __init maple_init_early(void) +{ + unsigned int default_speed; + + DBG(" -> maple_init_early\n"); + + /* Initialize hash table, from now on, we can take hash faults + * and call ioremap + */ + hpte_init_native(); + + /* Find the serial port */ + generic_find_legacy_serial_ports(&default_speed); + + DBG("naca->serialPortAddr: %lx\n", (long)naca->serialPortAddr); + + if (naca->serialPortAddr) { + void *comport; + /* Map the uart for udbg. */ + comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE); + udbg_init_uart(comport, default_speed); + + ppc_md.udbg_putc = udbg_putc; + ppc_md.udbg_getc = udbg_getc; + ppc_md.udbg_getc_poll = udbg_getc_poll; + DBG("Hello World !\n"); + } + + /* Setup interrupt mapping options */ + naca->interrupt_controller = IC_OPEN_PIC; + + DBG(" <- maple_init_early\n"); +} + + +static __init void maple_init_IRQ(void) +{ + struct device_node *root; + unsigned int *opprop; + unsigned long opic_addr; + struct mpic *mpic; + unsigned char senses[128]; + int n; + + DBG(" -> maple_init_IRQ\n"); + + /* XXX: Non standard, replace that with a proper openpic/mpic node + * in the device-tree. Find the Open PIC if present */ + root = of_find_node_by_path("/"); + opprop = (unsigned int *) get_property(root, + "platform-open-pic", NULL); + if (opprop == 0) + panic("OpenPIC not found !\n"); + + n = prom_n_addr_cells(root); + for (opic_addr = 0; n > 0; --n) + opic_addr = (opic_addr << 32) + *opprop++; + of_node_put(root); + + /* Obtain sense values from device-tree */ + prom_get_irq_senses(senses, 0, 128); + + mpic = mpic_alloc(opic_addr, + MPIC_PRIMARY | MPIC_BIG_ENDIAN | + MPIC_BROKEN_U3 | MPIC_WANTS_RESET, + 0, 0, 128, 128, senses, 128, "U3-MPIC"); + BUG_ON(mpic == NULL); + mpic_init(mpic); + + DBG(" <- maple_init_IRQ\n"); +} + +static void __init maple_progress(char *s, unsigned short hex) +{ + printk("*** %04x : %s\n", hex, s ? s : ""); +} + + +/* + * Called very early, MMU is off, device-tree isn't unflattened + */ +static int __init maple_probe(int platform) +{ + if (platform != PLATFORM_MAPLE) + return 0; + /* + * On U3, the DART (iommu) must be allocated now since it + * has an impact on htab_initialize (due to the large page it + * occupies having to be broken up so the DART itself is not + * part of the cacheable linar mapping + */ + alloc_u3_dart_table(); + + return 1; +} + +struct machdep_calls __initdata maple_md = { + .probe = maple_probe, + .setup_arch = maple_setup_arch, + .init_early = maple_init_early, + .init_IRQ = maple_init_IRQ, + .get_irq = mpic_get_irq, + .pcibios_fixup = maple_pcibios_fixup, +#if 0 + .pci_get_legacy_ide_irq = maple_pci_get_legacy_ide_irq, +#endif + .restart = maple_restart, + .power_off = maple_power_off, + .halt = maple_halt, + .get_boot_time = maple_get_boot_time, + .set_rtc_time = maple_set_rtc_time, + .get_rtc_time = maple_get_rtc_time, + .calibrate_decr = maple_calibrate_decr, + .progress = maple_progress, +}; diff -Nru a/arch/ppc64/kernel/maple_time.c b/arch/ppc64/kernel/maple_time.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/maple_time.c 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,226 @@ +/* + * arch/ppc64/kernel/maple_time.c + * + * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), + * IBM Corp. + * + * 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. + * + */ + +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef DEBUG +#define DBG(x...) printk(x) +#else +#define DBG(x...) +#endif + +extern void setup_default_decr(void); +extern void GregorianDay(struct rtc_time * tm); + +extern unsigned long ppc_tb_freq; +extern unsigned long ppc_proc_freq; +static int maple_rtc_addr; + +static int maple_clock_read(int addr) +{ + outb_p(addr, maple_rtc_addr); + return inb_p(maple_rtc_addr+1); +} + +static void maple_clock_write(unsigned long val, int addr) +{ + outb_p(addr, maple_rtc_addr); + outb_p(val, maple_rtc_addr+1); +} + +void maple_get_rtc_time(struct rtc_time *tm) +{ + int uip, i; + + /* The Linux interpretation of the CMOS clock register contents: + * When the Update-In-Progress (UIP) flag goes from 1 to 0, the + * RTC registers show the second which has precisely just started. + * Let's hope other operating systems interpret the RTC the same way. + */ + + /* Since the UIP flag is set for about 2.2 ms and the clock + * is typically written with a precision of 1 jiffy, trying + * to obtain a precision better than a few milliseconds is + * an illusion. Only consistency is interesting, this also + * allows to use the routine for /dev/rtc without a potential + * 1 second kernel busy loop triggered by any reader of /dev/rtc. + */ + + for (i = 0; i<1000000; i++) { + uip = maple_clock_read(RTC_FREQ_SELECT); + tm->tm_sec = maple_clock_read(RTC_SECONDS); + tm->tm_min = maple_clock_read(RTC_MINUTES); + tm->tm_hour = maple_clock_read(RTC_HOURS); + tm->tm_mday = maple_clock_read(RTC_DAY_OF_MONTH); + tm->tm_mon = maple_clock_read(RTC_MONTH); + tm->tm_year = maple_clock_read(RTC_YEAR); + uip |= maple_clock_read(RTC_FREQ_SELECT); + if ((uip & RTC_UIP)==0) + break; + } + + if (!(maple_clock_read(RTC_CONTROL) & RTC_DM_BINARY) + || RTC_ALWAYS_BCD) { + BCD_TO_BIN(tm->tm_sec); + BCD_TO_BIN(tm->tm_min); + BCD_TO_BIN(tm->tm_hour); + BCD_TO_BIN(tm->tm_mday); + BCD_TO_BIN(tm->tm_mon); + BCD_TO_BIN(tm->tm_year); + } + if ((tm->tm_year + 1900) < 1970) + tm->tm_year += 100; + + GregorianDay(tm); +} + +int maple_set_rtc_time(struct rtc_time *tm) +{ + unsigned char save_control, save_freq_select; + int sec, min, hour, mon, mday, year; + + spin_lock(&rtc_lock); + + save_control = maple_clock_read(RTC_CONTROL); /* tell the clock it's being set */ + + maple_clock_write((save_control|RTC_SET), RTC_CONTROL); + + save_freq_select = maple_clock_read(RTC_FREQ_SELECT); /* stop and reset prescaler */ + + maple_clock_write((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); + + sec = tm->tm_sec; + min = tm->tm_min; + hour = tm->tm_hour; + mon = tm->tm_mon; + mday = tm->tm_mday; + year = tm->tm_year; + + if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { + BIN_TO_BCD(sec); + BIN_TO_BCD(min); + BIN_TO_BCD(hour); + BIN_TO_BCD(mon); + BIN_TO_BCD(mday); + BIN_TO_BCD(year); + } + maple_clock_write(sec, RTC_SECONDS); + maple_clock_write(min, RTC_MINUTES); + maple_clock_write(hour, RTC_HOURS); + maple_clock_write(mon, RTC_MONTH); + maple_clock_write(mday, RTC_DAY_OF_MONTH); + maple_clock_write(year, RTC_YEAR); + + /* The following flags have to be released exactly in this order, + * otherwise the DS12887 (popular MC146818A clone with integrated + * battery and quartz) will not reset the oscillator and will not + * update precisely 500 ms later. You won't find this mentioned in + * the Dallas Semiconductor data sheets, but who believes data + * sheets anyway ... -- Markus Kuhn + */ + maple_clock_write(save_control, RTC_CONTROL); + maple_clock_write(save_freq_select, RTC_FREQ_SELECT); + + spin_unlock(&rtc_lock); + + return 0; +} + +void __init maple_get_boot_time(struct rtc_time *tm) +{ + struct device_node *rtcs; + + rtcs = find_compatible_devices("rtc", "pnpPNP,b00"); + if (rtcs && rtcs->addrs) { + maple_rtc_addr = rtcs->addrs[0].address; + printk(KERN_INFO "Maple: Found RTC at 0x%x\n", maple_rtc_addr); + } else { + maple_rtc_addr = RTC_PORT(0); /* legacy address */ + printk(KERN_INFO "Maple: No device node for RTC, assuming " + "legacy address (0x%x)\n", maple_rtc_addr); + } + + maple_get_rtc_time(tm); +} + +/* XXX FIXME: Some sane defaults: 125 MHz timebase, 1GHz processor */ +#define DEFAULT_TB_FREQ 125000000UL +#define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) + +void __init maple_calibrate_decr(void) +{ + struct device_node *cpu; + struct div_result divres; + unsigned int *fp = NULL; + + /* + * The cpu node should have a timebase-frequency property + * to tell us the rate at which the decrementer counts. + */ + cpu = of_find_node_by_type(NULL, "cpu"); + + ppc_tb_freq = DEFAULT_TB_FREQ; + if (cpu != 0) + fp = (unsigned int *)get_property(cpu, "timebase-frequency", NULL); + if (fp != NULL) + ppc_tb_freq = *fp; + else + printk(KERN_ERR "WARNING: Estimating decrementer frequency (not found)\n"); + fp = NULL; + ppc_proc_freq = DEFAULT_PROC_FREQ; + if (cpu != 0) + fp = (unsigned int *)get_property(cpu, "clock-frequency", NULL); + if (fp != NULL) + ppc_proc_freq = *fp; + else + printk(KERN_ERR "WARNING: Estimating processor frequency (not found)\n"); + + of_node_put(cpu); + + printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", + ppc_tb_freq/1000000, ppc_tb_freq%1000000); + printk(KERN_INFO "time_init: processor frequency = %lu.%.6lu MHz\n", + ppc_proc_freq/1000000, ppc_proc_freq%1000000); + + tb_ticks_per_jiffy = ppc_tb_freq / HZ; + tb_ticks_per_sec = tb_ticks_per_jiffy * HZ; + tb_ticks_per_usec = ppc_tb_freq / 1000000; + tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); + div128_by_32(1024*1024, 0, tb_ticks_per_sec, &divres); + tb_to_xs = divres.result_low; + + setup_default_decr(); +} diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S --- a/arch/ppc64/kernel/misc.S 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/misc.S 2004-10-26 18:25:18 -07:00 @@ -591,7 +591,7 @@ isync b 1b -#ifdef CONFIG_PPC_PMAC +#if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) /* * Do an IO access in real mode */ @@ -653,7 +653,7 @@ sync isync blr -#endif /* CONFIG_PPC_PMAC */ +#endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */ /* * Create a kernel thread diff -Nru a/arch/ppc64/kernel/mpic.c b/arch/ppc64/kernel/mpic.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/mpic.c 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,861 @@ +/* + * arch/ppc64/kernel/mpic.c + * + * Driver for interrupt controllers following the OpenPIC standard, the + * common implementation beeing IBM's MPIC. This driver also can deal + * with various broken implementations of this HW. + * + * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + */ + +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "mpic.h" + +#ifdef DEBUG +#define DBG(fmt...) printk(fmt) +#else +#define DBG(fmt...) +#endif + +static struct mpic *mpics; +static struct mpic *mpic_primary; +static spinlock_t mpic_lock = SPIN_LOCK_UNLOCKED; + + +/* + * Register accessor functions + */ + + +static inline u32 _mpic_read(unsigned int be, volatile u32 __iomem *base, + unsigned int reg) +{ + if (be) + return in_be32(base + (reg >> 2)); + else + return in_le32(base + (reg >> 2)); +} + +static inline void _mpic_write(unsigned int be, volatile u32 __iomem *base, + unsigned int reg, u32 value) +{ + if (be) + out_be32(base + (reg >> 2), value); + else + out_le32(base + (reg >> 2), value); +} + +static inline u32 _mpic_ipi_read(struct mpic *mpic, unsigned int ipi) +{ + unsigned int be = (mpic->flags & MPIC_BIG_ENDIAN) != 0; + unsigned int offset = MPIC_GREG_IPI_VECTOR_PRI_0 + (ipi * 0x10); + + if (mpic->flags & MPIC_BROKEN_IPI) + be = !be; + return _mpic_read(be, mpic->gregs, offset); +} + +static inline void _mpic_ipi_write(struct mpic *mpic, unsigned int ipi, u32 value) +{ + unsigned int offset = MPIC_GREG_IPI_VECTOR_PRI_0 + (ipi * 0x10); + + _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->gregs, offset, value); +} + +static inline u32 _mpic_cpu_read(struct mpic *mpic, unsigned int reg) +{ + unsigned int cpu = 0; + + if (mpic->flags & MPIC_PRIMARY) + cpu = hard_smp_processor_id(); + + return _mpic_read(mpic->flags & MPIC_BIG_ENDIAN, mpic->cpuregs[cpu], reg); +} + +static inline void _mpic_cpu_write(struct mpic *mpic, unsigned int reg, u32 value) +{ + unsigned int cpu = 0; + + if (mpic->flags & MPIC_PRIMARY) + cpu = hard_smp_processor_id(); + + _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->cpuregs[cpu], reg, value); +} + +static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, unsigned int reg) +{ + unsigned int isu = src_no >> mpic->isu_shift; + unsigned int idx = src_no & mpic->isu_mask; + + return _mpic_read(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu], + reg + (idx * MPIC_IRQ_STRIDE)); +} + +static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, + unsigned int reg, u32 value) +{ + unsigned int isu = src_no >> mpic->isu_shift; + unsigned int idx = src_no & mpic->isu_mask; + + _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu], + reg + (idx * MPIC_IRQ_STRIDE), value); +} + +#define mpic_read(b,r) _mpic_read(mpic->flags & MPIC_BIG_ENDIAN,(b),(r)) +#define mpic_write(b,r,v) _mpic_write(mpic->flags & MPIC_BIG_ENDIAN,(b),(r),(v)) +#define mpic_ipi_read(i) _mpic_ipi_read(mpic,(i)) +#define mpic_ipi_write(i,v) _mpic_ipi_write(mpic,(i),(v)) +#define mpic_cpu_read(i) _mpic_cpu_read(mpic,(i)) +#define mpic_cpu_write(i,v) _mpic_cpu_write(mpic,(i),(v)) +#define mpic_irq_read(s,r) _mpic_irq_read(mpic,(s),(r)) +#define mpic_irq_write(s,r,v) _mpic_irq_write(mpic,(s),(r),(v)) + + +/* + * Low level utility functions + */ + + + +/* Check if we have one of those nice broken MPICs with a flipped endian on + * reads from IPI registers + */ +static void __init mpic_test_broken_ipi(struct mpic *mpic) +{ + u32 r; + + mpic_write(mpic->gregs, MPIC_GREG_IPI_VECTOR_PRI_0, MPIC_VECPRI_MASK); + r = mpic_read(mpic->gregs, MPIC_GREG_IPI_VECTOR_PRI_0); + + if (r == le32_to_cpu(MPIC_VECPRI_MASK)) { + printk(KERN_INFO "mpic: Detected reversed IPI registers\n"); + mpic->flags |= MPIC_BROKEN_IPI; + } +} + +#ifdef CONFIG_MPIC_BROKEN_U3 + +/* Test if an interrupt is sourced from HyperTransport (used on broken U3s) + * to force the edge setting on the MPIC and do the ack workaround. + */ +static inline int mpic_is_ht_interrupt(struct mpic *mpic, unsigned int source_no) +{ + if (source_no >= 128 || !mpic->fixups) + return 0; + return mpic->fixups[source_no].base != NULL; +} + +static inline void mpic_apic_end_irq(struct mpic *mpic, unsigned int source_no) +{ + struct mpic_irq_fixup *fixup = &mpic->fixups[source_no]; + u32 tmp; + + spin_lock(&mpic->fixup_lock); + writeb(0x11 + 2 * fixup->irq, fixup->base); + tmp = readl(fixup->base + 2); + writel(tmp | 0x80000000ul, fixup->base + 2); + /* config writes shouldn't be posted but let's be safe ... */ + (void)readl(fixup->base + 2); + spin_unlock(&mpic->fixup_lock); +} + + +static void __init mpic_amd8111_read_irq(struct mpic *mpic, u8 __iomem *devbase) +{ + int i, irq; + u32 tmp; + + printk(KERN_INFO "mpic: - Workarounds on AMD 8111 @ %p\n", devbase); + + for (i=0; i < 24; i++) { + writeb(0x10 + 2*i, devbase + 0xf2); + tmp = readl(devbase + 0xf4); + if ((tmp & 0x1) || !(tmp & 0x20)) + continue; + irq = (tmp >> 16) & 0xff; + mpic->fixups[irq].irq = i; + mpic->fixups[irq].base = devbase + 0xf2; + } +} + +static void __init mpic_amd8131_read_irq(struct mpic *mpic, u8 __iomem *devbase) +{ + int i, irq; + u32 tmp; + + printk(KERN_INFO "mpic: - Workarounds on AMD 8131 @ %p\n", devbase); + + for (i=0; i < 4; i++) { + writeb(0x10 + 2*i, devbase + 0xba); + tmp = readl(devbase + 0xbc); + if ((tmp & 0x1) || !(tmp & 0x20)) + continue; + irq = (tmp >> 16) & 0xff; + mpic->fixups[irq].irq = i; + mpic->fixups[irq].base = devbase + 0xba; + } +} + +static void __init mpic_scan_ioapics(struct mpic *mpic) +{ + unsigned int devfn; + u8 __iomem *cfgspace; + + printk(KERN_INFO "mpic: Setting up IO-APICs workarounds for U3\n"); + + /* Allocate fixups array */ + mpic->fixups = alloc_bootmem(128 * sizeof(struct mpic_irq_fixup)); + BUG_ON(mpic->fixups == NULL); + memset(mpic->fixups, 0, 128 * sizeof(struct mpic_irq_fixup)); + + /* Init spinlock */ + spin_lock_init(&mpic->fixup_lock); + + /* Map u3 config space. We assume all IO-APICs are on the primary bus + * and slot will never be above "0xf" so we only need to map 32k + */ + cfgspace = (unsigned char __iomem *)ioremap(0xf2000000, 0x8000); + BUG_ON(cfgspace == NULL); + + /* Now we scan all slots. We do a very quick scan, we read the header type, + * vendor ID and device ID only, that's plenty enough + */ + for (devfn = 0; devfn < PCI_DEVFN(0x10,0); devfn ++) { + u8 __iomem *devbase = cfgspace + (devfn << 8); + u8 hdr_type = readb(devbase + PCI_HEADER_TYPE); + u32 l = readl(devbase + PCI_VENDOR_ID); + u16 vendor_id, device_id; + int multifunc = 0; + + DBG("devfn %x, l: %x\n", devfn, l); + + /* If no device, skip */ + if (l == 0xffffffff || l == 0x00000000 || + l == 0x0000ffff || l == 0xffff0000) + goto next; + + /* Check if it's a multifunction device (only really used + * to function 0 though + */ + multifunc = !!(hdr_type & 0x80); + vendor_id = l & 0xffff; + device_id = (l >> 16) & 0xffff; + + /* If a known device, go to fixup setup code */ + if (vendor_id == PCI_VENDOR_ID_AMD && device_id == 0x7460) + mpic_amd8111_read_irq(mpic, devbase); + if (vendor_id == PCI_VENDOR_ID_AMD && device_id == 0x7450) + mpic_amd8131_read_irq(mpic, devbase); + next: + /* next device, if function 0 */ + if ((PCI_FUNC(devfn) == 0) && !multifunc) + devfn += 7; + } +} + +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + +/* Find an mpic associated with a given linux interrupt */ +static struct mpic *mpic_find(unsigned int irq, unsigned int *is_ipi) +{ + struct mpic *mpic = mpics; + + while(mpic) { + /* search IPIs first since they may override the main interrupts */ + if (irq >= mpic->ipi_offset && irq < (mpic->ipi_offset + 4)) { + if (is_ipi) + *is_ipi = 1; + return mpic; + } + if (irq >= mpic->irq_offset && + irq < (mpic->irq_offset + mpic->irq_count)) { + if (is_ipi) + *is_ipi = 0; + return mpic; + } + mpic = mpic -> next; + } + return NULL; +} + +/* Convert a cpu mask from logical to physical cpu numbers. */ +static inline u32 mpic_physmask(u32 cpumask) +{ + int i; + u32 mask = 0; + + for (i = 0; i < NR_CPUS; ++i, cpumask >>= 1) + mask |= (cpumask & 1) << get_hard_smp_processor_id(i); + return mask; +} + +#ifdef CONFIG_SMP +/* Get the mpic structure from the IPI number */ +static inline struct mpic * mpic_from_ipi(unsigned int ipi) +{ + return container_of(irq_desc[ipi].handler, struct mpic, hc_ipi); +} +#endif + +/* Get the mpic structure from the irq number */ +static inline struct mpic * mpic_from_irq(unsigned int irq) +{ + return container_of(irq_desc[irq].handler, struct mpic, hc_irq); +} + +/* Send an EOI */ +static inline void mpic_eoi(struct mpic *mpic) +{ + mpic_cpu_write(MPIC_CPU_EOI, 0); + (void)mpic_cpu_read(MPIC_CPU_WHOAMI); +} + +#ifdef CONFIG_SMP +static irqreturn_t mpic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) +{ + struct mpic *mpic = dev_id; + + smp_message_recv(irq - mpic->ipi_offset, regs); + return IRQ_HANDLED; +} +#endif /* CONFIG_SMP */ + +/* + * Linux descriptor level callbacks + */ + + +static void mpic_enable_irq(unsigned int irq) +{ + unsigned int loops = 100000; + struct mpic *mpic = mpic_from_irq(irq); + unsigned int src = irq - mpic->irq_offset; + + DBG("%s: enable_irq: %d (src %d)\n", mpic->name, irq, src); + + mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, + mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & ~MPIC_VECPRI_MASK); + + /* make sure mask gets to controller before we return to user */ + do { + if (!loops--) { + printk(KERN_ERR "mpic_enable_irq timeout\n"); + break; + } + } while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK); +} + +static void mpic_disable_irq(unsigned int irq) +{ + unsigned int loops = 100000; + struct mpic *mpic = mpic_from_irq(irq); + unsigned int src = irq - mpic->irq_offset; + + DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src); + + mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, + mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) | MPIC_VECPRI_MASK); + + /* make sure mask gets to controller before we return to user */ + do { + if (!loops--) { + printk(KERN_ERR "mpic_enable_irq timeout\n"); + break; + } + } while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK)); +} + +static void mpic_end_irq(unsigned int irq) +{ + struct mpic *mpic = mpic_from_irq(irq); + + DBG("%s: end_irq: %d\n", mpic->name, irq); + + /* We always EOI on end_irq() even for edge interrupts since that + * should only lower the priority, the MPIC should have properly + * latched another edge interrupt coming in anyway + */ + +#ifdef CONFIG_MPIC_BROKEN_U3 + if (mpic->flags & MPIC_BROKEN_U3) { + unsigned int src = irq - mpic->irq_offset; + if (mpic_is_ht_interrupt(mpic, src)) + mpic_apic_end_irq(mpic, src); + } +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + mpic_eoi(mpic); +} + +#ifdef CONFIG_SMP + +static void mpic_enable_ipi(unsigned int irq) +{ + struct mpic *mpic = mpic_from_ipi(irq); + unsigned int src = irq - mpic->ipi_offset; + + DBG("%s: enable_ipi: %d (ipi %d)\n", mpic->name, irq, src); + mpic_ipi_write(src, mpic_ipi_read(src) & ~MPIC_VECPRI_MASK); +} + +static void mpic_disable_ipi(unsigned int irq) +{ + /* NEVER disable an IPI... that's just plain wrong! */ +} + +static void mpic_end_ipi(unsigned int irq) +{ + struct mpic *mpic = mpic_from_ipi(irq); + + /* + * IPIs are marked IRQ_PER_CPU. This has the side effect of + * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from + * applying to them. We EOI them late to avoid re-entering. + * We mark IPI's with SA_INTERRUPT as they must run with + * irqs disabled. + */ + mpic_eoi(mpic); +} + +#endif /* CONFIG_SMP */ + +static void mpic_set_affinity(unsigned int irq, cpumask_t cpumask) +{ + struct mpic *mpic = mpic_from_irq(irq); + + cpumask_t tmp; + + cpus_and(tmp, cpumask, cpu_online_map); + + mpic_irq_write(irq - mpic->irq_offset, MPIC_IRQ_DESTINATION, + mpic_physmask(cpus_addr(tmp)[0])); +} + + +/* + * Exported functions + */ + + +struct mpic * __init mpic_alloc(unsigned long phys_addr, + unsigned int flags, + unsigned int isu_size, + unsigned int irq_offset, + unsigned int irq_count, + unsigned int ipi_offset, + unsigned char *senses, + unsigned int senses_count, + const char *name) +{ + struct mpic *mpic; + u32 reg; + const char *vers; + int i; + + mpic = (struct mpic *)alloc_bootmem(sizeof(struct mpic)); + if (mpic == NULL) + return NULL; + + memset(mpic, 0, sizeof(struct mpic)); + mpic->name = name; + + mpic->hc_irq.typename = name; + mpic->hc_irq.enable = mpic_enable_irq; + mpic->hc_irq.disable = mpic_disable_irq; + mpic->hc_irq.end = mpic_end_irq; + if (flags & MPIC_PRIMARY) + mpic->hc_irq.set_affinity = mpic_set_affinity; +#ifdef CONFIG_SMP + mpic->hc_ipi.typename = name; + mpic->hc_ipi.enable = mpic_enable_ipi; + mpic->hc_ipi.disable = mpic_disable_ipi; + mpic->hc_ipi.end = mpic_end_ipi; +#endif /* CONFIG_SMP */ + + mpic->flags = flags; + mpic->isu_size = isu_size; + mpic->irq_offset = irq_offset; + mpic->irq_count = irq_count; + mpic->ipi_offset = ipi_offset; + mpic->num_sources = 0; /* so far */ + mpic->senses = senses; + mpic->senses_count = senses_count; + + /* Map the global registers */ + mpic->gregs = ioremap(phys_addr + MPIC_GREG_BASE, 0x1000); + mpic->tmregs = mpic->gregs + (MPIC_TIMER_BASE >> 2); + BUG_ON(mpic->gregs == NULL); + + /* Reset */ + if (flags & MPIC_WANTS_RESET) { + mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0, + mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) + | MPIC_GREG_GCONF_RESET); + while( mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) + & MPIC_GREG_GCONF_RESET) + mb(); + } + + /* Read feature register, calculate num CPUs and, for non-ISU + * MPICs, num sources as well. On ISU MPICs, sources are counted + * as ISUs are added + */ + reg = mpic_read(mpic->gregs, MPIC_GREG_FEATURE_0); + mpic->num_cpus = ((reg & MPIC_GREG_FEATURE_LAST_CPU_MASK) + >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1; + if (isu_size == 0) + mpic->num_sources = ((reg & MPIC_GREG_FEATURE_LAST_SRC_MASK) + >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT) + 1; + + /* Map the per-CPU registers */ + for (i = 0; i < mpic->num_cpus; i++) { + mpic->cpuregs[i] = ioremap(phys_addr + MPIC_CPU_BASE + + i * MPIC_CPU_STRIDE, 0x1000); + BUG_ON(mpic->cpuregs[i] == NULL); + } + + /* Initialize main ISU if none provided */ + if (mpic->isu_size == 0) { + mpic->isu_size = mpic->num_sources; + mpic->isus[0] = ioremap(phys_addr + MPIC_IRQ_BASE, + MPIC_IRQ_STRIDE * mpic->isu_size); + BUG_ON(mpic->isus[0] == NULL); + } + mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1); + mpic->isu_mask = (1 << mpic->isu_shift) - 1; + + /* Display version */ + switch (reg & MPIC_GREG_FEATURE_VERSION_MASK) { + case 1: + vers = "1.0"; + break; + case 2: + vers = "1.2"; + break; + case 3: + vers = "1.3"; + break; + default: + vers = ""; + break; + } + printk(KERN_INFO "mpic: Setting up MPIC \"%s\" version %s at %lx, max %d CPUs\n", + name, vers, phys_addr, mpic->num_cpus); + printk(KERN_INFO "mpic: ISU size: %d, shift: %d, mask: %x\n", mpic->isu_size, + mpic->isu_shift, mpic->isu_mask); + + mpic->next = mpics; + mpics = mpic; + + if (flags & MPIC_PRIMARY) + mpic_primary = mpic; + + return mpic; +} + +void __init mpic_assign_isu(struct mpic *mpic, unsigned int isu_num, + unsigned long phys_addr) +{ + unsigned int isu_first = isu_num * mpic->isu_size; + + BUG_ON(isu_num >= MPIC_MAX_ISU); + + mpic->isus[isu_num] = ioremap(phys_addr, MPIC_IRQ_STRIDE * mpic->isu_size); + if ((isu_first + mpic->isu_size) > mpic->num_sources) + mpic->num_sources = isu_first + mpic->isu_size; +} + +void __init mpic_setup_cascade(unsigned int irq, mpic_cascade_t handler, + void *data) +{ + struct mpic *mpic = mpic_find(irq, NULL); + unsigned long flags; + + /* Synchronization here is a bit dodgy, so don't try to replace cascade + * interrupts on the fly too often ... but normally it's set up at boot. + */ + spin_lock_irqsave(&mpic_lock, flags); + if (mpic->cascade) + mpic_disable_irq(mpic->cascade_vec + mpic->irq_offset); + mpic->cascade = NULL; + wmb(); + mpic->cascade_vec = irq - mpic->irq_offset; + mpic->cascade_data = data; + wmb(); + mpic->cascade = handler; + mpic_enable_irq(irq); + spin_unlock_irqrestore(&mpic_lock, flags); +} + +void __init mpic_init(struct mpic *mpic) +{ + int i; + + BUG_ON(mpic->num_sources == 0); + + printk(KERN_INFO "mpic: Initializing for %d sources\n", mpic->num_sources); + + /* Set current processor priority to max */ + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0xf); + + /* Initialize timers: just disable them all */ + for (i = 0; i < 4; i++) { + mpic_write(mpic->tmregs, + i * MPIC_TIMER_STRIDE + MPIC_TIMER_DESTINATION, 0); + mpic_write(mpic->tmregs, + i * MPIC_TIMER_STRIDE + MPIC_TIMER_VECTOR_PRI, + MPIC_VECPRI_MASK | + (MPIC_VEC_TIMER_0 + i)); + } + + /* Initialize IPIs to our reserved vectors and mark them disabled for now */ + mpic_test_broken_ipi(mpic); + for (i = 0; i < 4; i++) { + mpic_ipi_write(i, + MPIC_VECPRI_MASK | + (10 << MPIC_VECPRI_PRIORITY_SHIFT) | + (MPIC_VEC_IPI_0 + i)); +#ifdef CONFIG_SMP + if (!(mpic->flags & MPIC_PRIMARY)) + continue; + irq_desc[mpic->ipi_offset+i].status |= IRQ_PER_CPU; + irq_desc[mpic->ipi_offset+i].handler = &mpic->hc_ipi; + +#endif /* CONFIG_SMP */ + } + + /* Initialize interrupt sources */ + if (mpic->irq_count == 0) + mpic->irq_count = mpic->num_sources; + +#ifdef CONFIG_MPIC_BROKEN_U3 + /* Do the ioapic fixups on U3 broken mpic */ + DBG("MPIC flags: %x\n", mpic->flags); + if ((mpic->flags & MPIC_BROKEN_U3) && (mpic->flags & MPIC_PRIMARY)) + mpic_scan_ioapics(mpic); +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + for (i = 0; i < mpic->num_sources; i++) { + /* start with vector = source number, and masked */ + u32 vecpri = MPIC_VECPRI_MASK | i | (8 << MPIC_VECPRI_PRIORITY_SHIFT); + int level = 0; + + /* if it's an IPI, we skip it */ + if ((mpic->irq_offset + i) >= (mpic->ipi_offset + i) && + (mpic->irq_offset + i) < (mpic->ipi_offset + i + 4)) + continue; + + /* do senses munging */ + if (mpic->senses && i < mpic->senses_count) { + if (mpic->senses[i] & IRQ_SENSE_LEVEL) + vecpri |= MPIC_VECPRI_SENSE_LEVEL; + if (mpic->senses[i] & IRQ_POLARITY_POSITIVE) + vecpri |= MPIC_VECPRI_POLARITY_POSITIVE; + } else + vecpri |= MPIC_VECPRI_SENSE_LEVEL; + + /* remember if it was a level interrupts */ + level = (vecpri & MPIC_VECPRI_SENSE_LEVEL); + + /* deal with broken U3 */ + if (mpic->flags & MPIC_BROKEN_U3) { +#ifdef CONFIG_MPIC_BROKEN_U3 + if (mpic_is_ht_interrupt(mpic, i)) { + vecpri &= ~(MPIC_VECPRI_SENSE_MASK | + MPIC_VECPRI_POLARITY_MASK); + vecpri |= MPIC_VECPRI_POLARITY_POSITIVE; + } +#else + printk(KERN_ERR "mpic: BROKEN_U3 set, but CONFIG doesn't match\n"); +#endif + } + + DBG("setup source %d, vecpri: %08x, level: %d\n", i, vecpri, + (level != 0)); + + /* init hw */ + mpic_irq_write(i, MPIC_IRQ_VECTOR_PRI, vecpri); + mpic_irq_write(i, MPIC_IRQ_DESTINATION, + 1 << get_hard_smp_processor_id(boot_cpuid)); + + /* init linux descriptors */ + if (i < mpic->irq_count) { + irq_desc[mpic->irq_offset+i].status = level ? IRQ_LEVEL : 0; + irq_desc[mpic->irq_offset+i].handler = &mpic->hc_irq; + } + } + + /* Init spurrious vector */ + mpic_write(mpic->gregs, MPIC_GREG_SPURIOUS, MPIC_VEC_SPURRIOUS); + + /* Disable 8259 passthrough */ + mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0, + mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) + | MPIC_GREG_GCONF_8259_PTHROU_DIS); + + /* Set current processor priority to 0 */ + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0); +} + + + +void mpic_irq_set_priority(unsigned int irq, unsigned int pri) +{ + int is_ipi; + struct mpic *mpic = mpic_find(irq, &is_ipi); + unsigned long flags; + u32 reg; + + spin_lock_irqsave(&mpic_lock, flags); + if (is_ipi) { + reg = mpic_ipi_read(irq - mpic->ipi_offset) & MPIC_VECPRI_PRIORITY_MASK; + mpic_ipi_write(irq - mpic->ipi_offset, + reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); + } else { + reg = mpic_irq_read(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI) + & MPIC_VECPRI_PRIORITY_MASK; + mpic_irq_write(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI, + reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); + } + spin_unlock_irqrestore(&mpic_lock, flags); +} + +unsigned int mpic_irq_get_priority(unsigned int irq) +{ + int is_ipi; + struct mpic *mpic = mpic_find(irq, &is_ipi); + unsigned long flags; + u32 reg; + + spin_lock_irqsave(&mpic_lock, flags); + if (is_ipi) + reg = mpic_ipi_read(irq - mpic->ipi_offset); + else + reg = mpic_irq_read(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI); + spin_unlock_irqrestore(&mpic_lock, flags); + return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT; +} + +void mpic_setup_this_cpu(void) +{ +#ifdef CONFIG_SMP + struct mpic *mpic = mpic_primary; + unsigned long flags; +#ifdef CONFIG_IRQ_ALL_CPUS + u32 msk = 1 << hard_smp_processor_id(); + unsigned int i; +#endif + + BUG_ON(mpic == NULL); + + DBG("%s: setup_this_cpu(%d)\n", mpic->name, hard_smp_processor_id()); + + spin_lock_irqsave(&mpic_lock, flags); + +#ifdef CONFIG_IRQ_ALL_CPUS + /* let the mpic know we want intrs. default affinity is 0xffffffff + * until changed via /proc. That's how it's done on x86. If we want + * it differently, then we should make sure we also change the default + * values of irq_affinity in irq.c. + */ + for (i = 0; i < mpic->num_sources ; i++) + mpic_irq_write(i, MPIC_IRQ_DESTINATION, + mpic_irq_read(i, MPIC_IRQ_DESTINATION) | msk); +#endif /* CONFIG_IRQ_ALL_CPUS */ + + /* Set current processor priority to 0 */ + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0); + + spin_unlock_irqrestore(&mpic_lock, flags); +#endif /* CONFIG_SMP */ +} + +void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask) +{ + struct mpic *mpic = mpic_primary; + + BUG_ON(mpic == NULL); + + DBG("%s: send_ipi(ipi_no: %d)\n", mpic->name, ipi_no); + + mpic_cpu_write(MPIC_CPU_IPI_DISPATCH_0 + ipi_no * 0x10, + mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0])); +} + +int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs) +{ + u32 irq; + + irq = mpic_cpu_read(MPIC_CPU_INTACK) & MPIC_VECPRI_VECTOR_MASK; + DBG("%s: get_one_irq(): %d\n", mpic->name, irq); + + if (mpic->cascade && irq == mpic->cascade_vec) { + DBG("%s: cascading ...\n", mpic->name); + irq = mpic->cascade(regs, mpic->cascade_data); + mpic_eoi(mpic); + return irq; + } + if (unlikely(irq == MPIC_VEC_SPURRIOUS)) + return -1; + if (irq < MPIC_VEC_IPI_0) + return irq + mpic->irq_offset; + DBG("%s: ipi %d !\n", mpic->name, irq - MPIC_VEC_IPI_0); + return irq - MPIC_VEC_IPI_0 + mpic->ipi_offset; +} + +int mpic_get_irq(struct pt_regs *regs) +{ + struct mpic *mpic = mpic_primary; + + BUG_ON(mpic == NULL); + + return mpic_get_one_irq(mpic, regs); +} + + +#ifdef CONFIG_SMP +void mpic_request_ipis(void) +{ + struct mpic *mpic = mpic_primary; + + BUG_ON(mpic == NULL); + + printk("requesting IPIs ... \n"); + + /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ + request_irq(mpic->ipi_offset+0, mpic_ipi_action, SA_INTERRUPT, + "IPI0 (call function)", mpic); + request_irq(mpic->ipi_offset+1, mpic_ipi_action, SA_INTERRUPT, + "IPI1 (reschedule)", mpic); + request_irq(mpic->ipi_offset+2, mpic_ipi_action, SA_INTERRUPT, + "IPI2 (unused)", mpic); + request_irq(mpic->ipi_offset+3, mpic_ipi_action, SA_INTERRUPT, + "IPI3 (debugger break)", mpic); + + printk("IPIs requested... \n"); +} +#endif /* CONFIG_SMP */ diff -Nru a/arch/ppc64/kernel/mpic.h b/arch/ppc64/kernel/mpic.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/mpic.h 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,267 @@ +#include + +/* + * Global registers + */ + +#define MPIC_GREG_BASE 0x01000 + +#define MPIC_GREG_FEATURE_0 0x00000 +#define MPIC_GREG_FEATURE_LAST_SRC_MASK 0x07ff0000 +#define MPIC_GREG_FEATURE_LAST_SRC_SHIFT 16 +#define MPIC_GREG_FEATURE_LAST_CPU_MASK 0x00001f00 +#define MPIC_GREG_FEATURE_LAST_CPU_SHIFT 8 +#define MPIC_GREG_FEATURE_VERSION_MASK 0xff +#define MPIC_GREG_FEATURE_1 0x00010 +#define MPIC_GREG_GLOBAL_CONF_0 0x00020 +#define MPIC_GREG_GCONF_RESET 0x80000000 +#define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000 +#define MPIC_GREG_GCONF_BASE_MASK 0x000fffff +#define MPIC_GREG_GLOBAL_CONF_1 0x00030 +#define MPIC_GREG_VENDOR_0 0x00040 +#define MPIC_GREG_VENDOR_1 0x00050 +#define MPIC_GREG_VENDOR_2 0x00060 +#define MPIC_GREG_VENDOR_3 0x00070 +#define MPIC_GREG_VENDOR_ID 0x00080 +#define MPIC_GREG_VENDOR_ID_STEPPING_MASK 0x00ff0000 +#define MPIC_GREG_VENDOR_ID_STEPPING_SHIFT 16 +#define MPIC_GREG_VENDOR_ID_DEVICE_ID_MASK 0x0000ff00 +#define MPIC_GREG_VENDOR_ID_DEVICE_ID_SHIFT 8 +#define MPIC_GREG_VENDOR_ID_VENDOR_ID_MASK 0x000000ff +#define MPIC_GREG_PROCESSOR_INIT 0x00090 +#define MPIC_GREG_IPI_VECTOR_PRI_0 0x000a0 +#define MPIC_GREG_IPI_VECTOR_PRI_1 0x000b0 +#define MPIC_GREG_IPI_VECTOR_PRI_2 0x000c0 +#define MPIC_GREG_IPI_VECTOR_PRI_3 0x000d0 +#define MPIC_GREG_SPURIOUS 0x000e0 +#define MPIC_GREG_TIMER_FREQ 0x000f0 + +/* + * + * Timer registers + */ +#define MPIC_TIMER_BASE 0x01100 +#define MPIC_TIMER_STRIDE 0x40 + +#define MPIC_TIMER_CURRENT_CNT 0x00000 +#define MPIC_TIMER_BASE_CNT 0x00010 +#define MPIC_TIMER_VECTOR_PRI 0x00020 +#define MPIC_TIMER_DESTINATION 0x00030 + +/* + * Per-Processor registers + */ + +#define MPIC_CPU_THISBASE 0x00000 +#define MPIC_CPU_BASE 0x20000 +#define MPIC_CPU_STRIDE 0x01000 + +#define MPIC_CPU_IPI_DISPATCH_0 0x00040 +#define MPIC_CPU_IPI_DISPATCH_1 0x00050 +#define MPIC_CPU_IPI_DISPATCH_2 0x00060 +#define MPIC_CPU_IPI_DISPATCH_3 0x00070 +#define MPIC_CPU_CURRENT_TASK_PRI 0x00080 +#define MPIC_CPU_TASKPRI_MASK 0x0000000f +#define MPIC_CPU_WHOAMI 0x00090 +#define MPIC_CPU_WHOAMI_MASK 0x0000001f +#define MPIC_CPU_INTACK 0x000a0 +#define MPIC_CPU_EOI 0x000b0 + +/* + * Per-source registers + */ + +#define MPIC_IRQ_BASE 0x10000 +#define MPIC_IRQ_STRIDE 0x00020 +#define MPIC_IRQ_VECTOR_PRI 0x00000 +#define MPIC_VECPRI_MASK 0x80000000 +#define MPIC_VECPRI_ACTIVITY 0x40000000 /* Read Only */ +#define MPIC_VECPRI_PRIORITY_MASK 0x000f0000 +#define MPIC_VECPRI_PRIORITY_SHIFT 16 +#define MPIC_VECPRI_VECTOR_MASK 0x000007ff +#define MPIC_VECPRI_POLARITY_POSITIVE 0x00800000 +#define MPIC_VECPRI_POLARITY_NEGATIVE 0x00000000 +#define MPIC_VECPRI_POLARITY_MASK 0x00800000 +#define MPIC_VECPRI_SENSE_LEVEL 0x00400000 +#define MPIC_VECPRI_SENSE_EDGE 0x00000000 +#define MPIC_VECPRI_SENSE_MASK 0x00400000 +#define MPIC_IRQ_DESTINATION 0x00010 + +#define MPIC_MAX_IRQ_SOURCES 2048 +#define MPIC_MAX_CPUS 32 +#define MPIC_MAX_ISU 32 + +/* + * Special vector numbers (internal use only) + */ +#define MPIC_VEC_SPURRIOUS 255 +#define MPIC_VEC_IPI_3 254 +#define MPIC_VEC_IPI_2 253 +#define MPIC_VEC_IPI_1 252 +#define MPIC_VEC_IPI_0 251 + +/* unused */ +#define MPIC_VEC_TIMER_3 250 +#define MPIC_VEC_TIMER_2 249 +#define MPIC_VEC_TIMER_1 248 +#define MPIC_VEC_TIMER_0 247 + +/* Type definition of the cascade handler */ +typedef int (*mpic_cascade_t)(struct pt_regs *regs, void *data); + +#ifdef CONFIG_MPIC_BROKEN_U3 +/* Fixup table entry */ +struct mpic_irq_fixup +{ + u8 __iomem *base; + unsigned int irq; +}; +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + +/* The instance data of a given MPIC */ +struct mpic +{ + /* The "linux" controller struct */ + hw_irq_controller hc_irq; +#ifdef CONFIG_SMP + hw_irq_controller hc_ipi; +#endif + const char *name; + /* Flags */ + unsigned int flags; + /* How many irq sources in a given ISU */ + unsigned int isu_size; + unsigned int isu_shift; + unsigned int isu_mask; + /* Offset of irq vector numbers */ + unsigned int irq_offset; + unsigned int irq_count; + /* Offset of ipi vector numbers */ + unsigned int ipi_offset; + /* Number of sources */ + unsigned int num_sources; + /* Number of CPUs */ + unsigned int num_cpus; + /* cascade handler */ + mpic_cascade_t cascade; + void *cascade_data; + unsigned int cascade_vec; + /* senses array */ + unsigned char *senses; + unsigned int senses_count; + +#ifdef CONFIG_MPIC_BROKEN_U3 + /* The fixup table */ + struct mpic_irq_fixup *fixups; + spinlock_t fixup_lock; +#endif + + /* The various ioremap'ed bases */ + volatile u32 __iomem *gregs; + volatile u32 __iomem *tmregs; + volatile u32 __iomem *cpuregs[MPIC_MAX_CPUS]; + volatile u32 __iomem *isus[MPIC_MAX_ISU]; + + /* link */ + struct mpic *next; +}; + +/* This is the primary controller, only that one has IPIs and + * has afinity control. A non-primary MPIC always uses CPU0 + * registers only + */ +#define MPIC_PRIMARY 0x00000001 +/* Set this for a big-endian MPIC */ +#define MPIC_BIG_ENDIAN 0x00000002 +/* Broken U3 MPIC */ +#define MPIC_BROKEN_U3 0x00000004 +/* Broken IPI registers (autodetected) */ +#define MPIC_BROKEN_IPI 0x00000008 +/* MPIC wants a reset */ +#define MPIC_WANTS_RESET 0x00000010 + +/* Allocate the controller structure and setup the linux irq descs + * for the range if interrupts passed in. No HW initialization is + * actually performed. + * + * @phys_addr: physial base address of the MPIC + * @flags: flags, see constants above + * @isu_size: number of interrupts in an ISU. Use 0 to use a + * standard ISU-less setup (aka powermac) + * @irq_offset: first irq number to assign to this mpic + * @irq_count: number of irqs to use with this mpic IRQ sources. Pass 0 + * to match the number of sources + * @ipi_offset: first irq number to assign to this mpic IPI sources, + * used only on primary mpic + * @senses: array of sense values + * @senses_num: number of entries in the array + * + * Note about the sense array. If none is passed, all interrupts are + * setup to be level negative unless MPIC_BROKEN_U3 is set in which + * case they are edge positive (and the array is ignored anyway). + * The values in the array start at the first source of the MPIC, + * that is senses[0] correspond to linux irq "irq_offset". + */ +extern struct mpic *mpic_alloc(unsigned long phys_addr, + unsigned int flags, + unsigned int isu_size, + unsigned int irq_offset, + unsigned int irq_count, + unsigned int ipi_offset, + unsigned char *senses, + unsigned int senses_num, + const char *name); + +/* Assign ISUs, to call before mpic_init() + * + * @mpic: controller structure as returned by mpic_alloc() + * @isu_num: ISU number + * @phys_addr: physical address of the ISU + */ +extern void mpic_assign_isu(struct mpic *mpic, unsigned int isu_num, + unsigned long phys_addr); + +/* Initialize the controller. After this has been called, none of the above + * should be called again for this mpic + */ +extern void mpic_init(struct mpic *mpic); + +/* Setup a cascade. Currently, only one cascade is supported this + * way, though you can always do a normal request_irq() and add + * other cascades this way. You should call this _after_ having + * added all the ISUs + * + * @irq_no: "linux" irq number of the cascade (that is offset'ed vector) + * @handler: cascade handler function + */ +extern void mpic_setup_cascade(unsigned int irq_no, mpic_cascade_t hanlder, + void *data); + +/* + * All of the following functions must only be used after the + * ISUs have been assigned and the controller fully initialized + * with mpic_init() + */ + + +/* Change/Read the priority of an interrupt. Default is 8 for irqs and + * 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the + * IPI number is then the offset'ed (linux irq number mapped to the IPI) + */ +extern void mpic_irq_set_priority(unsigned int irq, unsigned int pri); +extern unsigned int mpic_irq_get_priority(unsigned int irq); + +/* Setup a non-boot CPU */ +extern void mpic_setup_this_cpu(void); + +/* Request IPIs on primary mpic */ +extern void mpic_request_ipis(void); + +/* Send an IPI (non offseted number 0..3) */ +extern void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask); + +/* Fetch interrupt from a given mpic */ +extern int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs); +/* This one gets to the primary mpic */ +extern int mpic_get_irq(struct pt_regs *regs); diff -Nru a/arch/ppc64/kernel/nvram.c b/arch/ppc64/kernel/nvram.c --- a/arch/ppc64/kernel/nvram.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/nvram.c 2004-10-26 18:25:17 -07:00 @@ -77,7 +77,7 @@ } -static ssize_t dev_nvram_read(struct file *file, char *buf, +static ssize_t dev_nvram_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { ssize_t len; @@ -117,7 +117,7 @@ } -static ssize_t dev_nvram_write(struct file *file, const char *buf, +static ssize_t dev_nvram_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { ssize_t len; @@ -711,7 +711,7 @@ /* This doesn't actually zero anything, but it sets the event_logged * word to tell that this event is safely in syslog. */ -int nvram_clear_error_log() +int nvram_clear_error_log(void) { loff_t tmp_index; int clear_word = ERR_FLAG_ALREADY_LOGGED; diff -Nru a/arch/ppc64/kernel/open_pic.c b/arch/ppc64/kernel/open_pic.c --- a/arch/ppc64/kernel/open_pic.c 2004-10-26 18:25:18 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,886 +0,0 @@ -/* - * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling - * - * Copyright (C) 1997 Geert Uytterhoeven - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "open_pic.h" -#include "open_pic_defs.h" -#include "i8259.h" -#include - -void* OpenPIC_Addr; -static volatile struct OpenPIC *OpenPIC = NULL; -u_int OpenPIC_NumInitSenses __initdata = 0; -u_char *OpenPIC_InitSenses __initdata = NULL; - -/* - * Local (static) OpenPIC Operations - */ - - -/* Global Operations */ -static void openpic_reset(void); -static void openpic_enable_8259_pass_through(void); -static void openpic_disable_8259_pass_through(void); -static u_int openpic_irq(void); -static void openpic_eoi(void); -static u_int openpic_get_priority(void); -static void openpic_set_priority(u_int pri); -static u_int openpic_get_spurious(void); -static void openpic_set_spurious(u_int vector); - -#ifdef CONFIG_SMP -/* Interprocessor Interrupts */ -static void openpic_initipi(u_int ipi, u_int pri, u_int vector); -static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, - struct pt_regs *regs); -#endif - -/* Timer Interrupts */ -static void openpic_inittimer(u_int timer, u_int pri, u_int vector); -static void openpic_maptimer(u_int timer, u_int cpumask); - -/* Interrupt Sources */ -static void openpic_enable_irq(u_int irq); -static void openpic_disable_irq(u_int irq); -static void openpic_initirq(u_int irq, u_int pri, u_int vector, int polarity, - int is_level); -static void openpic_mapirq(u_int irq, u_int cpumask); - -static void find_ISUs(void); - -static u_int NumProcessors; -static u_int NumSources; -static int NumISUs; -static int open_pic_irq_offset; -static volatile unsigned char* chrp_int_ack_special; - -OpenPIC_SourcePtr ISU[OPENPIC_MAX_ISU]; - -static void openpic_end_irq(unsigned int irq_nr); -static void openpic_set_affinity(unsigned int irq_nr, cpumask_t cpumask); - -struct hw_interrupt_type open_pic = { - " OpenPIC ", - NULL, - NULL, - openpic_enable_irq, - openpic_disable_irq, - NULL, - openpic_end_irq, - openpic_set_affinity -}; - -#ifdef CONFIG_SMP -static void openpic_end_ipi(unsigned int irq_nr); -static void openpic_enable_ipi(unsigned int irq_nr); -static void openpic_disable_ipi(unsigned int irq_nr); - -struct hw_interrupt_type open_pic_ipi = { - " OpenPIC ", - NULL, - NULL, - openpic_enable_ipi, - openpic_disable_ipi, - NULL, - openpic_end_ipi, - NULL -}; -#endif /* CONFIG_SMP */ - -unsigned int openpic_vec_ipi; -unsigned int openpic_vec_timer; -unsigned int openpic_vec_spurious; - -/* - * Accesses to the current processor's openpic registers - */ -#ifdef CONFIG_SMP -#define THIS_CPU Processor[cpu] -#define DECL_THIS_CPU int cpu = hard_smp_processor_id() -#define CHECK_THIS_CPU check_arg_cpu(cpu) -#else -#define THIS_CPU Processor[hard_smp_processor_id()] -#define DECL_THIS_CPU -#define CHECK_THIS_CPU -#endif /* CONFIG_SMP */ - -#if 0 -#define check_arg_ipi(ipi) \ - if (ipi < 0 || ipi >= OPENPIC_NUM_IPI) \ - printk(KERN_ERR "open_pic.c:%d: invalid ipi %d\n", __LINE__, ipi); -#define check_arg_timer(timer) \ - if (timer < 0 || timer >= OPENPIC_NUM_TIMERS) \ - printk(KERN_ERR "open_pic.c:%d: invalid timer %d\n", __LINE__, timer); -#define check_arg_vec(vec) \ - if (vec < 0 || vec >= OPENPIC_NUM_VECTORS) \ - printk(KERN_ERR "open_pic.c:%d: invalid vector %d\n", __LINE__, vec); -#define check_arg_pri(pri) \ - if (pri < 0 || pri >= OPENPIC_NUM_PRI) \ - printk(KERN_ERR "open_pic.c:%d: invalid priority %d\n", __LINE__, pri); -/* - * Print out a backtrace if it's out of range, since if it's larger than NR_IRQ's - * data has probably been corrupted and we're going to panic or deadlock later - * anyway --Troy - */ -#define check_arg_irq(irq) \ - if (irq < open_pic_irq_offset || irq >= (NumSources+open_pic_irq_offset)){ \ - printk(KERN_ERR "open_pic.c:%d: invalid irq %d\n", __LINE__, irq); \ - dump_stack(); } -#define check_arg_cpu(cpu) \ - if (cpu < 0 || cpu >= OPENPIC_MAX_PROCESSORS){ \ - printk(KERN_ERR "open_pic.c:%d: invalid cpu %d\n", __LINE__, cpu); \ - dump_stack(); } -#else -#define check_arg_ipi(ipi) do {} while (0) -#define check_arg_timer(timer) do {} while (0) -#define check_arg_vec(vec) do {} while (0) -#define check_arg_pri(pri) do {} while (0) -#define check_arg_irq(irq) do {} while (0) -#define check_arg_cpu(cpu) do {} while (0) -#endif - -#define GET_ISU(source) ISU[(source) >> 4][(source) & 0xf] - -void __init pSeries_init_openpic(void) -{ - struct device_node *np; - int i; - unsigned int *addrp; - unsigned char* chrp_int_ack_special = NULL; - unsigned char init_senses[NR_IRQS - NUM_ISA_INTERRUPTS]; - int nmi_irq = -1; -#if defined(CONFIG_VT) && defined(CONFIG_ADB_KEYBOARD) && defined(XMON) - struct device_node *kbd; -#endif - - if (!(np = of_find_node_by_name(NULL, "pci")) - || !(addrp = (unsigned int *) - get_property(np, "8259-interrupt-acknowledge", NULL))) - printk(KERN_ERR "Cannot find pci to get ack address\n"); - else - chrp_int_ack_special = (unsigned char *) - __ioremap(addrp[prom_n_addr_cells(np)-1], 1, _PAGE_NO_CACHE); - /* hydra still sets OpenPIC_InitSenses to a static set of values */ - if (OpenPIC_InitSenses == NULL) { - prom_get_irq_senses(init_senses, NUM_ISA_INTERRUPTS, NR_IRQS); - OpenPIC_InitSenses = init_senses; - OpenPIC_NumInitSenses = NR_IRQS - NUM_ISA_INTERRUPTS; - } - openpic_init(1, NUM_ISA_INTERRUPTS, chrp_int_ack_special, nmi_irq); - for (i = 0; i < NUM_ISA_INTERRUPTS; i++) - irq_desc[i].handler = &i8259_pic; - of_node_put(np); -} - -static inline u_int openpic_read(volatile u_int *addr) -{ - u_int val; - - val = in_le32(addr); - return val; -} - -static inline void openpic_write(volatile u_int *addr, u_int val) -{ - out_le32(addr, val); -} - -static inline u_int openpic_readfield(volatile u_int *addr, u_int mask) -{ - u_int val = openpic_read(addr); - return val & mask; -} - -static inline void openpic_writefield(volatile u_int *addr, u_int mask, - u_int field) -{ - u_int val = openpic_read(addr); - openpic_write(addr, (val & ~mask) | (field & mask)); -} - -static inline void openpic_clearfield(volatile u_int *addr, u_int mask) -{ - openpic_writefield(addr, mask, 0); -} - -static inline void openpic_setfield(volatile u_int *addr, u_int mask) -{ - openpic_writefield(addr, mask, mask); -} - -static void openpic_safe_writefield(volatile u_int *addr, u_int mask, - u_int field) -{ - unsigned int loops = 100000; - - openpic_setfield(addr, OPENPIC_MASK); - while (openpic_read(addr) & OPENPIC_ACTIVITY) { - if (!loops--) { - printk(KERN_ERR "openpic_safe_writefield timeout\n"); - break; - } - } - openpic_writefield(addr, mask | OPENPIC_MASK, field | OPENPIC_MASK); -} - -#ifdef CONFIG_SMP - -static int broken_ipi_registers; - -static u_int openpic_read_IPI(volatile u_int* addr) -{ - u_int val = 0; - - if (broken_ipi_registers) - /* yes this is right ... bug, feature, you decide! -- tgall */ - val = in_be32(addr); - else - val = in_le32(addr); - - return val; -} - -static void openpic_test_broken_IPI(void) -{ - u_int t; - - openpic_write(&OpenPIC->Global.IPI_Vector_Priority(0), OPENPIC_MASK); - t = openpic_read(&OpenPIC->Global.IPI_Vector_Priority(0)); - if (t == le32_to_cpu(OPENPIC_MASK)) { - printk(KERN_INFO "OpenPIC reversed IPI registers detected\n"); - broken_ipi_registers = 1; - } -} - -/* because of the power3 be / le above, this is needed */ -static inline void openpic_writefield_IPI(volatile u_int* addr, u_int mask, u_int field) -{ - u_int val = openpic_read_IPI(addr); - openpic_write(addr, (val & ~mask) | (field & mask)); -} - -static inline void openpic_clearfield_IPI(volatile u_int *addr, u_int mask) -{ - openpic_writefield_IPI(addr, mask, 0); -} - -static inline void openpic_setfield_IPI(volatile u_int *addr, u_int mask) -{ - openpic_writefield_IPI(addr, mask, mask); -} - -static void openpic_safe_writefield_IPI(volatile u_int *addr, u_int mask, u_int field) -{ - unsigned int loops = 100000; - - openpic_setfield_IPI(addr, OPENPIC_MASK); - - /* wait until it's not in use */ - /* BenH: Is this code really enough ? I would rather check the result - * and eventually retry ... - */ - while(openpic_read_IPI(addr) & OPENPIC_ACTIVITY) { - if (!loops--) { - printk(KERN_ERR "openpic_safe_writefield timeout\n"); - break; - } - } - - openpic_writefield_IPI(addr, mask, field | OPENPIC_MASK); -} -#endif /* CONFIG_SMP */ - -void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack, - int programmer_switch_irq) -{ - u_int t, i; - u_int timerfreq; - const char *version; - - if (!OpenPIC_Addr) { - printk(KERN_INFO "No OpenPIC found !\n"); - return; - } - OpenPIC = (volatile struct OpenPIC *)OpenPIC_Addr; - - ppc64_boot_msg(0x20, "OpenPic Init"); - - t = openpic_read(&OpenPIC->Global.Feature_Reporting0); - switch (t & OPENPIC_FEATURE_VERSION_MASK) { - case 1: - version = "1.0"; - break; - case 2: - version = "1.2"; - break; - case 3: - version = "1.3"; - break; - default: - version = "?"; - break; - } - NumProcessors = ((t & OPENPIC_FEATURE_LAST_PROCESSOR_MASK) >> - OPENPIC_FEATURE_LAST_PROCESSOR_SHIFT) + 1; - NumSources = ((t & OPENPIC_FEATURE_LAST_SOURCE_MASK) >> - OPENPIC_FEATURE_LAST_SOURCE_SHIFT) + 1; - printk(KERN_INFO "OpenPIC Version %s (%d CPUs and %d IRQ sources) at %p\n", - version, NumProcessors, NumSources, OpenPIC); - timerfreq = openpic_read(&OpenPIC->Global.Timer_Frequency); - if (timerfreq) - printk(KERN_INFO "OpenPIC timer frequency is %d.%06d MHz\n", - timerfreq / 1000000, timerfreq % 1000000); - - if (!main_pic) - return; - - open_pic_irq_offset = offset; - chrp_int_ack_special = (volatile unsigned char*)chrp_ack; - - find_ISUs(); - - /* Initialize timer interrupts */ - for (i = 0; i < OPENPIC_NUM_TIMERS; i++) { - /* Disabled, Priority 0 */ - openpic_inittimer(i, 0, openpic_vec_timer+i); - /* No processor */ - openpic_maptimer(i, 0); - } - -#ifdef CONFIG_SMP - /* Initialize IPI interrupts */ - openpic_test_broken_IPI(); - for (i = 0; i < OPENPIC_NUM_IPI; i++) { - /* Disabled, Priority 10..13 */ - openpic_initipi(i, 10+i, openpic_vec_ipi+i); - /* IPIs are per-CPU */ - irq_desc[openpic_vec_ipi+i].status |= IRQ_PER_CPU; - irq_desc[openpic_vec_ipi+i].handler = &open_pic_ipi; - } -#endif - - /* Initialize external interrupts */ - openpic_set_priority(0xf); - - /* SIOint (8259 cascade) is special */ - if (offset) { - openpic_initirq(0, 8, offset, 1, 1); - openpic_mapirq(0, 1 << get_hard_smp_processor_id(boot_cpuid)); - } - - /* Init all external sources */ - for (i = 0; i < NumSources; i++) { - int pri, sense; - - /* skip cascade if any */ - if (offset && i == 0) - continue; - /* the bootloader may have left it enabled (bad !) */ - openpic_disable_irq(i+offset); - - pri = (i == programmer_switch_irq)? 9: 8; - sense = (i < OpenPIC_NumInitSenses)? OpenPIC_InitSenses[i]: 1; - if (sense) - irq_desc[i+offset].status = IRQ_LEVEL; - - /* Enabled, Priority 8 or 9 */ - openpic_initirq(i, pri, i+offset, !sense, sense); - /* Processor 0 */ - openpic_mapirq(i, 1 << get_hard_smp_processor_id(boot_cpuid)); - } - - /* Init descriptors */ - for (i = offset; i < NumSources + offset; i++) - irq_desc[i].handler = &open_pic; - - /* Initialize the spurious interrupt */ - openpic_set_spurious(openpic_vec_spurious); - - openpic_set_priority(0); - openpic_disable_8259_pass_through(); - - ppc64_boot_msg(0x25, "OpenPic Done"); -} - -/* - * We cant do this in init_IRQ because we need the memory subsystem up for - * request_irq() - */ -static int __init openpic_setup_i8259(void) -{ - if (systemcfg->platform == PLATFORM_POWERMAC) - return 0; - - if (naca->interrupt_controller == IC_OPEN_PIC) { - /* Initialize the cascade */ - if (request_irq(NUM_ISA_INTERRUPTS, no_action, SA_INTERRUPT, - "82c59 cascade", NULL)) - printk(KERN_ERR "Unable to get OpenPIC IRQ 0 for cascade\n"); - i8259_init(); - } - - return 0; -} -arch_initcall(openpic_setup_i8259); - -void openpic_setup_ISU(int isu_num, unsigned long addr) -{ - if (isu_num >= OPENPIC_MAX_ISU) - return; - ISU[isu_num] = (OpenPIC_SourcePtr) __ioremap(addr, 0x400, _PAGE_NO_CACHE); - if (isu_num >= NumISUs) - NumISUs = isu_num + 1; -} - -void find_ISUs(void) -{ - /* For PowerMac, setup ISUs on base openpic */ - if (systemcfg->platform == PLATFORM_POWERMAC) { - int i; - for (i=0; i<128; i+=0x10) { - ISU[i>>4] = &((struct OpenPIC *)OpenPIC_Addr)->Source[i]; - NumISUs++; - } - } - /* Use /interrupt-controller/reg and - * /interrupt-controller/interrupt-ranges from OF device tree - * the ISU array is setup in chrp_pci.c in ibm_add_bridges - * as a result - * -- tgall - */ - - /* basically each ISU is a bus, and this assumes that - * open_pic_isu_count interrupts per bus are possible - * ISU == Interrupt Source - * - * On G5, we keep the original NumSources provided by the controller, - * it's below 128, so we have room to stuff the IPIs and timers like darwin - * does. We put the spurrious vector up at 0xff though. - */ - if (systemcfg->platform == PLATFORM_POWERMAC) { - openpic_vec_ipi = NumSources; - openpic_vec_timer = openpic_vec_ipi + 4; - openpic_vec_spurious = 0xff; - } else { - NumSources = NumISUs * 0x10; - - openpic_vec_ipi = NumSources + open_pic_irq_offset; - openpic_vec_timer = openpic_vec_ipi + OPENPIC_NUM_IPI; - openpic_vec_spurious = openpic_vec_timer + OPENPIC_NUM_TIMERS; - } -} - -static inline void openpic_reset(void) -{ - openpic_setfield(&OpenPIC->Global.Global_Configuration0, - OPENPIC_CONFIG_RESET); -} - -static inline void openpic_enable_8259_pass_through(void) -{ - openpic_clearfield(&OpenPIC->Global.Global_Configuration0, - OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE); -} - -static void openpic_disable_8259_pass_through(void) -{ - openpic_setfield(&OpenPIC->Global.Global_Configuration0, - OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE); -} - -/* - * Find out the current interrupt - */ -static u_int openpic_irq(void) -{ - u_int vec; - DECL_THIS_CPU; - - CHECK_THIS_CPU; - vec = openpic_readfield(&OpenPIC->THIS_CPU.Interrupt_Acknowledge, - OPENPIC_VECTOR_MASK); - return vec; -} - -static void openpic_eoi(void) -{ - DECL_THIS_CPU; - - CHECK_THIS_CPU; - openpic_write(&OpenPIC->THIS_CPU.EOI, 0); - /* Handle PCI write posting */ - (void)openpic_read(&OpenPIC->THIS_CPU.EOI); -} - - -static inline u_int openpic_get_priority(void) -{ - DECL_THIS_CPU; - - CHECK_THIS_CPU; - return openpic_readfield(&OpenPIC->THIS_CPU.Current_Task_Priority, - OPENPIC_CURRENT_TASK_PRIORITY_MASK); -} - -static void openpic_set_priority(u_int pri) -{ - DECL_THIS_CPU; - - CHECK_THIS_CPU; - check_arg_pri(pri); - openpic_writefield(&OpenPIC->THIS_CPU.Current_Task_Priority, - OPENPIC_CURRENT_TASK_PRIORITY_MASK, pri); -} - -/* - * Get/set the spurious vector - */ -static inline u_int openpic_get_spurious(void) -{ - return openpic_readfield(&OpenPIC->Global.Spurious_Vector, - OPENPIC_VECTOR_MASK); -} - -static void openpic_set_spurious(u_int vec) -{ - check_arg_vec(vec); - openpic_writefield(&OpenPIC->Global.Spurious_Vector, OPENPIC_VECTOR_MASK, - vec); -} - -/* - * Convert a cpu mask from logical to physical cpu numbers. - */ -static inline u32 physmask(u32 cpumask) -{ - int i; - u32 mask = 0; - - for (i = 0; i < NR_CPUS; ++i, cpumask >>= 1) - mask |= (cpumask & 1) << get_hard_smp_processor_id(i); - return mask; -} - -void openpic_init_processor(u_int cpumask) -{ - openpic_write(&OpenPIC->Global.Processor_Initialization, - physmask(cpumask & cpus_addr(cpu_online_map)[0])); -} - -#ifdef CONFIG_SMP -/* - * Initialize an interprocessor interrupt (and disable it) - * - * ipi: OpenPIC interprocessor interrupt number - * pri: interrupt source priority - * vec: the vector it will produce - */ -static void __init openpic_initipi(u_int ipi, u_int pri, u_int vec) -{ - check_arg_ipi(ipi); - check_arg_pri(pri); - check_arg_vec(vec); - openpic_safe_writefield_IPI(&OpenPIC->Global.IPI_Vector_Priority(ipi), - OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK, - (pri << OPENPIC_PRIORITY_SHIFT) | vec); -} - -/* - * Send an IPI to one or more CPUs - * - * Externally called, however, it takes an IPI number (0...OPENPIC_NUM_IPI) - * and not a system-wide interrupt number - */ -void openpic_cause_IPI(u_int ipi, u_int cpumask) -{ - DECL_THIS_CPU; - - CHECK_THIS_CPU; - check_arg_ipi(ipi); - openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi), - physmask(cpumask & cpus_addr(cpu_online_map)[0])); -} - -void openpic_request_IPIs(void) -{ - int i; - - /* - * Make sure this matches what is defined in smp.c for - * smp_message_{pass|recv}() or what shows up in - * /proc/interrupts will be wrong!!! --Troy */ - - if (OpenPIC == NULL) - return; - - /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ - request_irq(openpic_vec_ipi, openpic_ipi_action, SA_INTERRUPT, - "IPI0 (call function)", NULL); - request_irq(openpic_vec_ipi+1, openpic_ipi_action, SA_INTERRUPT, - "IPI1 (reschedule)", NULL); - request_irq(openpic_vec_ipi+2, openpic_ipi_action, SA_INTERRUPT, - "IPI2 (unused)", NULL); - request_irq(openpic_vec_ipi+3, openpic_ipi_action, SA_INTERRUPT, - "IPI3 (debugger break)", NULL); - - for ( i = 0; i < OPENPIC_NUM_IPI ; i++ ) - openpic_enable_ipi(openpic_vec_ipi+i); -} - -/* - * Do per-cpu setup for SMP systems. - * - * Get IPI's working and start taking interrupts. - * -- Cort - */ -static spinlock_t openpic_setup_lock __devinitdata = SPIN_LOCK_UNLOCKED; - -void __devinit do_openpic_setup_cpu(void) -{ -#ifdef CONFIG_IRQ_ALL_CPUS - int i; - u32 msk = 1 << hard_smp_processor_id(); -#endif - - spin_lock(&openpic_setup_lock); - -#ifdef CONFIG_IRQ_ALL_CPUS - /* let the openpic know we want intrs. default affinity - * is 0xffffffff until changed via /proc - * That's how it's done on x86. If we want it differently, then - * we should make sure we also change the default values of irq_affinity - * in irq.c. - */ - for (i = 0; i < NumSources ; i++) - openpic_mapirq(i, openpic_read(&GET_ISU(i).Destination) | msk); -#endif /* CONFIG_IRQ_ALL_CPUS */ - openpic_set_priority(0); - - spin_unlock(&openpic_setup_lock); -} -#endif /* CONFIG_SMP */ - -/* - * Initialize a timer interrupt (and disable it) - * - * timer: OpenPIC timer number - * pri: interrupt source priority - * vec: the vector it will produce - */ -static void __init openpic_inittimer(u_int timer, u_int pri, u_int vec) -{ - check_arg_timer(timer); - check_arg_pri(pri); - check_arg_vec(vec); - openpic_safe_writefield(&OpenPIC->Global.Timer[timer].Vector_Priority, - OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK, - (pri << OPENPIC_PRIORITY_SHIFT) | vec); -} - -/* - * Map a timer interrupt to one or more CPUs - */ -static void __init openpic_maptimer(u_int timer, u_int cpumask) -{ - check_arg_timer(timer); - openpic_write(&OpenPIC->Global.Timer[timer].Destination, - physmask(cpumask & cpus_addr(cpu_online_map)[0])); -} - - -/* - * - * All functions below take an offset'ed irq argument - * - */ - - -/* - * Enable/disable an external interrupt source - * - * Externally called, irq is an offseted system-wide interrupt number - */ -static void openpic_enable_irq(u_int irq) -{ - unsigned int loops = 100000; - check_arg_irq(irq); - - openpic_clearfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, OPENPIC_MASK); - /* make sure mask gets to controller before we return to user */ - do { - if (!loops--) { - printk(KERN_ERR "openpic_enable_irq timeout\n"); - break; - } - - mb(); /* sync is probably useless here */ - } while(openpic_readfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, - OPENPIC_MASK)); -} - -static void openpic_disable_irq(u_int irq) -{ - u32 vp; - unsigned int loops = 100000; - - check_arg_irq(irq); - - openpic_setfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, OPENPIC_MASK); - /* make sure mask gets to controller before we return to user */ - do { - if (!loops--) { - printk(KERN_ERR "openpic_disable_irq timeout\n"); - break; - } - - mb(); /* sync is probably useless here */ - vp = openpic_readfield(&GET_ISU(irq - open_pic_irq_offset).Vector_Priority, - OPENPIC_MASK | OPENPIC_ACTIVITY); - } while((vp & OPENPIC_ACTIVITY) && !(vp & OPENPIC_MASK)); -} - -#ifdef CONFIG_SMP -/* - * Enable/disable an IPI interrupt source - * - * Externally called, irq is an offseted system-wide interrupt number - */ -void openpic_enable_ipi(u_int irq) -{ - irq -= openpic_vec_ipi; - check_arg_ipi(irq); - openpic_clearfield_IPI(&OpenPIC->Global.IPI_Vector_Priority(irq), OPENPIC_MASK); - -} -void openpic_disable_ipi(u_int irq) -{ - /* NEVER disable an IPI... that's just plain wrong! */ -} - -#endif - -/* - * Initialize an interrupt source (and disable it!) - * - * irq: OpenPIC interrupt number - * pri: interrupt source priority - * vec: the vector it will produce - * pol: polarity (1 for positive, 0 for negative) - * sense: 1 for level, 0 for edge - */ -static void openpic_initirq(u_int irq, u_int pri, u_int vec, int pol, int sense) -{ - openpic_safe_writefield(&GET_ISU(irq).Vector_Priority, - OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK | - OPENPIC_SENSE_MASK | OPENPIC_POLARITY_MASK, - (pri << OPENPIC_PRIORITY_SHIFT) | vec | - (pol ? OPENPIC_POLARITY_POSITIVE : - OPENPIC_POLARITY_NEGATIVE) | - (sense ? OPENPIC_SENSE_LEVEL : OPENPIC_SENSE_EDGE)); -} - -/* - * Map an interrupt source to one or more CPUs - */ -static void openpic_mapirq(u_int irq, u_int physmask) -{ - openpic_write(&GET_ISU(irq).Destination, physmask); -} - -/* - * Set the sense for an interrupt source (and disable it!) - * - * sense: 1 for level, 0 for edge - */ -#if 0 /* not used */ -static void openpic_set_sense(u_int irq, int sense) -{ - openpic_safe_writefield(&GET_ISU(irq).Vector_Priority, - OPENPIC_SENSE_LEVEL, - (sense ? OPENPIC_SENSE_LEVEL : 0)); -} - -static int openpic_get_sense(u_int irq) -{ - return openpic_readfield(&GET_ISU(irq).Vector_Priority, - OPENPIC_SENSE_LEVEL) != 0; -} -#endif - -static void openpic_end_irq(unsigned int irq_nr) -{ - openpic_eoi(); -} - -static void openpic_set_affinity(unsigned int irq_nr, cpumask_t cpumask) -{ - cpumask_t tmp; - - cpus_and(tmp, cpumask, cpu_online_map); - openpic_mapirq(irq_nr - open_pic_irq_offset, physmask(cpus_addr(tmp)[0])); -} - -#ifdef CONFIG_SMP -static void openpic_end_ipi(unsigned int irq_nr) -{ - /* - * IPIs are marked IRQ_PER_CPU. This has the side effect of - * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from - * applying to them. We EOI them late to avoid re-entering. - * We mark IPI's with SA_INTERRUPT as they must run with - * irqs disabled. - */ - openpic_eoi(); -} - -static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, - struct pt_regs *regs) -{ - smp_message_recv(cpl-openpic_vec_ipi, regs); - return IRQ_HANDLED; -} - -#endif /* CONFIG_SMP */ - -int openpic_get_irq(struct pt_regs *regs) -{ - extern int i8259_irq(int cpu); - - int irq = openpic_irq(); - - if (open_pic_irq_offset && irq == open_pic_irq_offset) { - /* - * This magic address generates a PCI IACK cycle. - */ - if ( chrp_int_ack_special ) - irq = *chrp_int_ack_special; - else - irq = i8259_irq( smp_processor_id() ); - openpic_eoi(); - } - if (irq == openpic_vec_spurious) - irq = -1; - return irq; -} diff -Nru a/arch/ppc64/kernel/open_pic.h b/arch/ppc64/kernel/open_pic.h --- a/arch/ppc64/kernel/open_pic.h 2004-10-26 18:25:17 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,42 +0,0 @@ -/* - * arch/ppc/kernel/open_pic.h -- OpenPIC Interrupt Handling - * - * Copyright (C) 1997 Geert Uytterhoeven - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - * - */ - -#ifndef _PPC64_KERNEL_OPEN_PIC_H -#define _PPC64_KERNEL_OPEN_PIC_H - -#include -#include -#include - -#define OPENPIC_SIZE 0x40000 - -/* OpenPIC IRQ controller structure */ -extern struct hw_interrupt_type open_pic; - -/* OpenPIC IPI controller structure */ -#ifdef CONFIG_SMP -extern struct hw_interrupt_type open_pic_ipi; -#endif /* CONFIG_SMP */ - -extern u_int OpenPIC_NumInitSenses; -extern u_char *OpenPIC_InitSenses; -extern void* OpenPIC_Addr; - -/* Exported functions */ -extern void openpic_init(int, int, unsigned char *, int); -extern void openpic_request_IPIs(void); -extern void do_openpic_setup_cpu(void); -extern int openpic_get_irq(struct pt_regs *regs); -extern void openpic_init_processor(u_int cpumask); -extern void openpic_setup_ISU(int isu_num, unsigned long addr); -extern void openpic_cause_IPI(u_int ipi, u_int cpumask); - -#endif /* _PPC64_KERNEL_OPEN_PIC_H */ diff -Nru a/arch/ppc64/kernel/open_pic_defs.h b/arch/ppc64/kernel/open_pic_defs.h --- a/arch/ppc64/kernel/open_pic_defs.h 2004-10-26 18:25:18 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,283 +0,0 @@ -/* - * linux/openpic.h -- OpenPIC definitions - * - * Copyright (C) 1997 Geert Uytterhoeven - * - * This file is based on the following documentation: - * - * The Open Programmable Interrupt Controller (PIC) - * Register Interface Specification Revision 1.2 - * - * Issue Date: October 1995 - * - * Issued jointly by Advanced Micro Devices and Cyrix Corporation - * - * AMD is a registered trademark of Advanced Micro Devices, Inc. - * Copyright (C) 1995, Advanced Micro Devices, Inc. and Cyrix, Inc. - * All Rights Reserved. - * - * To receive a copy of this documentation, send an email to openpic@amd.com. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#ifndef _LINUX_OPENPIC_H -#define _LINUX_OPENPIC_H - -#ifdef __KERNEL__ - -#include - -/* - * OpenPIC supports up to 2048 interrupt sources and up to 32 processors - */ - -#define OPENPIC_MAX_SOURCES 2048 -#define OPENPIC_MAX_PROCESSORS 32 -#define OPENPIC_MAX_ISU 32 - -#define OPENPIC_NUM_TIMERS 4 -#define OPENPIC_NUM_IPI 4 -#define OPENPIC_NUM_PRI 16 -#define OPENPIC_NUM_VECTORS OPENPIC_MAX_SOURCES - -/* - * OpenPIC Registers are 32 bits and aligned on 128 bit boundaries - */ - -typedef struct _OpenPIC_Reg { - u_int Reg; /* Little endian! */ - char Pad[0xc]; -} OpenPIC_Reg; - - -/* - * Per Processor Registers - */ - -typedef struct _OpenPIC_Processor { - /* - * Private Shadow Registers (for SLiC backwards compatibility) - */ - u_int IPI0_Dispatch_Shadow; /* Write Only */ - char Pad1[0x4]; - u_int IPI0_Vector_Priority_Shadow; /* Read/Write */ - char Pad2[0x34]; - /* - * Interprocessor Interrupt Command Ports - */ - OpenPIC_Reg _IPI_Dispatch[OPENPIC_NUM_IPI]; /* Write Only */ - /* - * Current Task Priority Register - */ - OpenPIC_Reg _Current_Task_Priority; /* Read/Write */ - char Pad3[0x10]; - /* - * Interrupt Acknowledge Register - */ - OpenPIC_Reg _Interrupt_Acknowledge; /* Read Only */ - /* - * End of Interrupt (EOI) Register - */ - OpenPIC_Reg _EOI; /* Read/Write */ - char Pad5[0xf40]; -} OpenPIC_Processor; - - - /* - * Timer Registers - */ - -typedef struct _OpenPIC_Timer { - OpenPIC_Reg _Current_Count; /* Read Only */ - OpenPIC_Reg _Base_Count; /* Read/Write */ - OpenPIC_Reg _Vector_Priority; /* Read/Write */ - OpenPIC_Reg _Destination; /* Read/Write */ -} OpenPIC_Timer; - - - /* - * Global Registers - */ - -typedef struct _OpenPIC_Global { - /* - * Feature Reporting Registers - */ - OpenPIC_Reg _Feature_Reporting0; /* Read Only */ - OpenPIC_Reg _Feature_Reporting1; /* Future Expansion */ - /* - * Global Configuration Registers - */ - OpenPIC_Reg _Global_Configuration0; /* Read/Write */ - OpenPIC_Reg _Global_Configuration1; /* Future Expansion */ - /* - * Vendor Specific Registers - */ - OpenPIC_Reg _Vendor_Specific[4]; - /* - * Vendor Identification Register - */ - OpenPIC_Reg _Vendor_Identification; /* Read Only */ - /* - * Processor Initialization Register - */ - OpenPIC_Reg _Processor_Initialization; /* Read/Write */ - /* - * IPI Vector/Priority Registers - */ - OpenPIC_Reg _IPI_Vector_Priority[OPENPIC_NUM_IPI]; /* Read/Write */ - /* - * Spurious Vector Register - */ - OpenPIC_Reg _Spurious_Vector; /* Read/Write */ - /* - * Global Timer Registers - */ - OpenPIC_Reg _Timer_Frequency; /* Read/Write */ - OpenPIC_Timer Timer[OPENPIC_NUM_TIMERS]; - char Pad1[0xee00]; -} OpenPIC_Global; - - - /* - * Interrupt Source Registers - */ - -typedef struct _OpenPIC_Source { - OpenPIC_Reg _Vector_Priority; /* Read/Write */ - OpenPIC_Reg _Destination; /* Read/Write */ -} OpenPIC_Source, *OpenPIC_SourcePtr; - - - /* - * OpenPIC Register Map - */ - -struct OpenPIC { - char Pad1[0x1000]; - /* - * Global Registers - */ - OpenPIC_Global Global; - /* - * Interrupt Source Configuration Registers - */ - OpenPIC_Source Source[OPENPIC_MAX_SOURCES]; - /* - * Per Processor Registers - */ - OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS]; -}; - - -/* - * Current Task Priority Register - */ - -#define OPENPIC_CURRENT_TASK_PRIORITY_MASK 0x0000000f - -/* - * Who Am I Register - */ - -#define OPENPIC_WHO_AM_I_ID_MASK 0x0000001f - -/* - * Feature Reporting Register 0 - */ - -#define OPENPIC_FEATURE_LAST_SOURCE_MASK 0x07ff0000 -#define OPENPIC_FEATURE_LAST_SOURCE_SHIFT 16 -#define OPENPIC_FEATURE_LAST_PROCESSOR_MASK 0x00001f00 -#define OPENPIC_FEATURE_LAST_PROCESSOR_SHIFT 8 -#define OPENPIC_FEATURE_VERSION_MASK 0x000000ff - -/* - * Global Configuration Register 0 - */ - -#define OPENPIC_CONFIG_RESET 0x80000000 -#define OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE 0x20000000 -#define OPENPIC_CONFIG_BASE_MASK 0x000fffff - -/* - * Vendor Identification Register - */ - -#define OPENPIC_VENDOR_ID_STEPPING_MASK 0x00ff0000 -#define OPENPIC_VENDOR_ID_STEPPING_SHIFT 16 -#define OPENPIC_VENDOR_ID_DEVICE_ID_MASK 0x0000ff00 -#define OPENPIC_VENDOR_ID_DEVICE_ID_SHIFT 8 -#define OPENPIC_VENDOR_ID_VENDOR_ID_MASK 0x000000ff - -/* - * Vector/Priority Registers - */ - -#define OPENPIC_MASK 0x80000000 -#define OPENPIC_ACTIVITY 0x40000000 /* Read Only */ -#define OPENPIC_PRIORITY_MASK 0x000f0000 -#define OPENPIC_PRIORITY_SHIFT 16 -#define OPENPIC_VECTOR_MASK 0x000007ff - - -/* - * Interrupt Source Registers - */ - -#define OPENPIC_POLARITY_POSITIVE 0x00800000 -#define OPENPIC_POLARITY_NEGATIVE 0x00000000 -#define OPENPIC_POLARITY_MASK 0x00800000 -#define OPENPIC_SENSE_LEVEL 0x00400000 -#define OPENPIC_SENSE_EDGE 0x00000000 -#define OPENPIC_SENSE_MASK 0x00400000 - - -/* - * Timer Registers - */ - -#define OPENPIC_COUNT_MASK 0x7fffffff -#define OPENPIC_TIMER_TOGGLE 0x80000000 -#define OPENPIC_TIMER_COUNT_INHIBIT 0x80000000 - - -/* - * Aliases to make life simpler - */ - -/* Per Processor Registers */ -#define IPI_Dispatch(i) _IPI_Dispatch[i].Reg -#define Current_Task_Priority _Current_Task_Priority.Reg -#define Interrupt_Acknowledge _Interrupt_Acknowledge.Reg -#define EOI _EOI.Reg - -/* Global Registers */ -#define Feature_Reporting0 _Feature_Reporting0.Reg -#define Feature_Reporting1 _Feature_Reporting1.Reg -#define Global_Configuration0 _Global_Configuration0.Reg -#define Global_Configuration1 _Global_Configuration1.Reg -#define Vendor_Specific(i) _Vendor_Specific[i].Reg -#define Vendor_Identification _Vendor_Identification.Reg -#define Processor_Initialization _Processor_Initialization.Reg -#define IPI_Vector_Priority(i) _IPI_Vector_Priority[i].Reg -#define Spurious_Vector _Spurious_Vector.Reg -#define Timer_Frequency _Timer_Frequency.Reg - -/* Timer Registers */ -#define Current_Count _Current_Count.Reg -#define Base_Count _Base_Count.Reg -#define Vector_Priority _Vector_Priority.Reg -#define Destination _Destination.Reg - -/* Interrupt Source Registers */ -#define Vector_Priority _Vector_Priority.Reg -#define Destination _Destination.Reg - - -#endif /* __KERNEL__ */ - -#endif /* _LINUX_OPENPIC_H */ diff -Nru a/arch/ppc64/kernel/open_pic_u3.c b/arch/ppc64/kernel/open_pic_u3.c --- a/arch/ppc64/kernel/open_pic_u3.c 2004-10-26 18:25:17 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,348 +0,0 @@ -/* - * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling - * - * Copyright (C) 1997 Geert Uytterhoeven - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "open_pic.h" -#include "open_pic_defs.h" - -void* OpenPIC2_Addr; -static volatile struct OpenPIC *OpenPIC2 = NULL; - -extern u_int OpenPIC_NumInitSenses; -extern u_char *OpenPIC_InitSenses; - -static u_int NumSources; -static int NumISUs; -static int open_pic2_irq_offset; - -static OpenPIC_SourcePtr ISU2[OPENPIC_MAX_ISU]; - -unsigned int openpic2_vec_spurious; - -/* - * Accesses to the current processor's openpic registers - * U3 secondary openpic has only one output - */ -#define THIS_CPU Processor[0] -#define DECL_THIS_CPU -#define CHECK_THIS_CPU - -#define GET_ISU(source) ISU2[(source) >> 4][(source) & 0xf] - -static inline u_int openpic2_read(volatile u_int *addr) -{ - u_int val; - - val = in_be32(addr); - return val; -} - -static inline void openpic2_write(volatile u_int *addr, u_int val) -{ - out_be32(addr, val); -} - -static inline u_int openpic2_readfield(volatile u_int *addr, u_int mask) -{ - u_int val = openpic2_read(addr); - return val & mask; -} - -static inline void openpic2_writefield(volatile u_int *addr, u_int mask, - u_int field) -{ - u_int val = openpic2_read(addr); - openpic2_write(addr, (val & ~mask) | (field & mask)); -} - -static inline void openpic2_clearfield(volatile u_int *addr, u_int mask) -{ - openpic2_writefield(addr, mask, 0); -} - -static inline void openpic2_setfield(volatile u_int *addr, u_int mask) -{ - openpic2_writefield(addr, mask, mask); -} - -static void openpic2_safe_writefield(volatile u_int *addr, u_int mask, - u_int field) -{ - unsigned int loops = 100000; - - openpic2_setfield(addr, OPENPIC_MASK); - while (openpic2_read(addr) & OPENPIC_ACTIVITY) { - if (!loops--) { - printk(KERN_ERR "openpic2_safe_writefield timeout\n"); - break; - } - } - openpic2_writefield(addr, mask | OPENPIC_MASK, field | OPENPIC_MASK); -} - - -static inline void openpic2_reset(void) -{ - openpic2_setfield(&OpenPIC2->Global.Global_Configuration0, - OPENPIC_CONFIG_RESET); -} - -static void openpic2_disable_8259_pass_through(void) -{ - openpic2_setfield(&OpenPIC2->Global.Global_Configuration0, - OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE); -} - -/* - * Find out the current interrupt - */ -static u_int openpic2_irq(void) -{ - u_int vec; - DECL_THIS_CPU; - CHECK_THIS_CPU; - vec = openpic2_readfield(&OpenPIC2->THIS_CPU.Interrupt_Acknowledge, - OPENPIC_VECTOR_MASK); - return vec; -} - -static void openpic2_eoi(void) -{ - DECL_THIS_CPU; - CHECK_THIS_CPU; - openpic2_write(&OpenPIC2->THIS_CPU.EOI, 0); - /* Handle PCI write posting */ - (void)openpic2_read(&OpenPIC2->THIS_CPU.EOI); -} - - -static inline u_int openpic2_get_priority(void) -{ - DECL_THIS_CPU; - CHECK_THIS_CPU; - return openpic2_readfield(&OpenPIC2->THIS_CPU.Current_Task_Priority, - OPENPIC_CURRENT_TASK_PRIORITY_MASK); -} - -static void openpic2_set_priority(u_int pri) -{ - DECL_THIS_CPU; - CHECK_THIS_CPU; - openpic2_writefield(&OpenPIC2->THIS_CPU.Current_Task_Priority, - OPENPIC_CURRENT_TASK_PRIORITY_MASK, pri); -} - -/* - * Get/set the spurious vector - */ -static inline u_int openpic2_get_spurious(void) -{ - return openpic2_readfield(&OpenPIC2->Global.Spurious_Vector, - OPENPIC_VECTOR_MASK); -} - -static void openpic2_set_spurious(u_int vec) -{ - openpic2_writefield(&OpenPIC2->Global.Spurious_Vector, OPENPIC_VECTOR_MASK, - vec); -} - -/* - * Enable/disable an external interrupt source - * - * Externally called, irq is an offseted system-wide interrupt number - */ -static void openpic2_enable_irq(u_int irq) -{ - unsigned int loops = 100000; - - openpic2_clearfield(&GET_ISU(irq - open_pic2_irq_offset).Vector_Priority, OPENPIC_MASK); - /* make sure mask gets to controller before we return to user */ - do { - if (!loops--) { - printk(KERN_ERR "openpic_enable_irq timeout\n"); - break; - } - - mb(); /* sync is probably useless here */ - } while(openpic2_readfield(&GET_ISU(irq - open_pic2_irq_offset).Vector_Priority, - OPENPIC_MASK)); -} - -static void openpic2_disable_irq(u_int irq) -{ - u32 vp; - unsigned int loops = 100000; - - openpic2_setfield(&GET_ISU(irq - open_pic2_irq_offset).Vector_Priority, - OPENPIC_MASK); - /* make sure mask gets to controller before we return to user */ - do { - if (!loops--) { - printk(KERN_ERR "openpic_disable_irq timeout\n"); - break; - } - - mb(); /* sync is probably useless here */ - vp = openpic2_readfield(&GET_ISU(irq - open_pic2_irq_offset).Vector_Priority, - OPENPIC_MASK | OPENPIC_ACTIVITY); - } while((vp & OPENPIC_ACTIVITY) && !(vp & OPENPIC_MASK)); -} - -/* - * Initialize an interrupt source (and disable it!) - * - * irq: OpenPIC interrupt number - * pri: interrupt source priority - * vec: the vector it will produce - * pol: polarity (1 for positive, 0 for negative) - * sense: 1 for level, 0 for edge - */ -static void openpic2_initirq(u_int irq, u_int pri, u_int vec, int pol, int sense) -{ - openpic2_safe_writefield(&GET_ISU(irq).Vector_Priority, - OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK | - OPENPIC_SENSE_MASK | OPENPIC_POLARITY_MASK, - (pri << OPENPIC_PRIORITY_SHIFT) | vec | - (pol ? OPENPIC_POLARITY_POSITIVE : - OPENPIC_POLARITY_NEGATIVE) | - (sense ? OPENPIC_SENSE_LEVEL : OPENPIC_SENSE_EDGE)); -} - -/* - * Map an interrupt source to one or more CPUs - */ -static void openpic2_mapirq(u_int irq, u_int physmask) -{ - openpic2_write(&GET_ISU(irq).Destination, physmask); -} - -/* - * Set the sense for an interrupt source (and disable it!) - * - * sense: 1 for level, 0 for edge - */ -static inline void openpic2_set_sense(u_int irq, int sense) -{ - openpic2_safe_writefield(&GET_ISU(irq).Vector_Priority, - OPENPIC_SENSE_LEVEL, - (sense ? OPENPIC_SENSE_LEVEL : 0)); -} - -static void openpic2_end_irq(unsigned int irq_nr) -{ - openpic2_eoi(); -} - -int openpic2_get_irq(struct pt_regs *regs) -{ - int irq = openpic2_irq(); - - if (irq == openpic2_vec_spurious) - return -1; - return irq + open_pic2_irq_offset; -} - -struct hw_interrupt_type open_pic2 = { - " OpenPIC2 ", - NULL, - NULL, - openpic2_enable_irq, - openpic2_disable_irq, - NULL, - openpic2_end_irq, -}; - -void __init openpic2_init(int offset) -{ - u_int t, i; - const char *version; - - if (!OpenPIC2_Addr) { - printk(KERN_INFO "No OpenPIC2 found !\n"); - return; - } - OpenPIC2 = (volatile struct OpenPIC *)OpenPIC2_Addr; - - ppc64_boot_msg(0x20, "OpenPic U3 Init"); - - t = openpic2_read(&OpenPIC2->Global.Feature_Reporting0); - switch (t & OPENPIC_FEATURE_VERSION_MASK) { - case 1: - version = "1.0"; - break; - case 2: - version = "1.2"; - break; - case 3: - version = "1.3"; - break; - default: - version = "?"; - break; - } - printk(KERN_INFO "OpenPIC (U3) Version %s\n", version); - - open_pic2_irq_offset = offset; - - for (i=0; i<128; i+=0x10) { - ISU2[i>>4] = &((struct OpenPIC *)OpenPIC2_Addr)->Source[i]; - NumISUs++; - } - NumSources = NumISUs * 0x10; - openpic2_vec_spurious = NumSources; - - openpic2_set_priority(0xf); - - /* Init all external sources */ - for (i = 0; i < NumSources; i++) { - int pri, sense; - - /* the bootloader may have left it enabled (bad !) */ - openpic2_disable_irq(i+offset); - - pri = 8; - sense = (i < OpenPIC_NumInitSenses) ? OpenPIC_InitSenses[i]: 1; - if (sense) - irq_desc[i+offset].status = IRQ_LEVEL; - - /* Enabled, Priority 8 or 9 */ - openpic2_initirq(i, pri, i, !sense, sense); - /* Processor 0 */ - openpic2_mapirq(i, 0x1); - } - - /* Init descriptors */ - for (i = offset; i < NumSources + offset; i++) - irq_desc[i].handler = &open_pic2; - - /* Initialize the spurious interrupt */ - openpic2_set_spurious(openpic2_vec_spurious); - - openpic2_set_priority(0); - openpic2_disable_8259_pass_through(); - - ppc64_boot_msg(0x25, "OpenPic U3 Done"); -} diff -Nru a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c --- a/arch/ppc64/kernel/pSeries_iommu.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/pSeries_iommu.c 2004-10-26 18:25:17 -07:00 @@ -412,6 +412,38 @@ dn->iommu_table = iommu_init_table(tbl); } +void iommu_free_table(struct device_node *dn) +{ + struct iommu_table *tbl = dn->iommu_table; + unsigned long bitmap_sz, i; + unsigned int order; + + if (!tbl || !tbl->it_map) { + printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__, + dn->full_name); + return; + } + + /* verify that table contains no entries */ + /* it_mapsize is in entries, and we're examining 64 at a time */ + for (i = 0; i < (tbl->it_mapsize/64); i++) { + if (tbl->it_map[i] != 0) { + printk(KERN_WARNING "%s: Unexpected TCEs for %s\n", + __FUNCTION__, dn->full_name); + break; + } + } + + /* calculate bitmap size in bytes */ + bitmap_sz = (tbl->it_mapsize + 7) / 8; + + /* free bitmap */ + order = get_order(bitmap_sz); + free_pages((unsigned long) tbl->it_map, order); + + /* free table */ + kfree(tbl); +} void iommu_setup_pSeries(void) { diff -Nru a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c --- a/arch/ppc64/kernel/pSeries_pci.c 2004-10-26 18:25:19 -07:00 +++ b/arch/ppc64/kernel/pSeries_pci.c 2004-10-26 18:25:19 -07:00 @@ -42,7 +42,7 @@ #include #include -#include "open_pic.h" +#include "mpic.h" #include "pci.h" /* RTAS tokens */ @@ -54,6 +54,7 @@ static int s7a_workaround; extern unsigned long pci_probe_only; +extern struct mpic *pSeries_mpic; static int rtas_read_config(struct device_node *dn, int where, int size, u32 *val) { @@ -153,8 +154,8 @@ static void python_countermeasures(unsigned long addr) { - void *chip_regs; - volatile u32 *tmp, i; + void __iomem *chip_regs; + volatile u32 val; /* Python's register file is 1 MB in size. */ chip_regs = ioremap(addr & ~(0xfffffUL), 0x100000); @@ -166,17 +167,17 @@ #define PRG_CL_RESET_VALID 0x00010000 - tmp = (u32 *)((unsigned long)chip_regs + 0xf6030); - - if (*tmp & PRG_CL_RESET_VALID) { + val = in_be32(chip_regs + 0xf6030); + if (val & PRG_CL_RESET_VALID) { printk(KERN_INFO "Python workaround: "); - *tmp &= ~PRG_CL_RESET_VALID; + val &= ~PRG_CL_RESET_VALID; + out_be32(chip_regs + 0xf6030, val); /* * We must read it back for changes to * take effect */ - i = *tmp; - printk("reg0: %x\n", i); + val = in_be32(chip_regs + 0xf6030); + printk("reg0: %x\n", val); } iounmap(chip_regs); @@ -399,9 +400,9 @@ pci_process_bridge_OF_ranges(phb, node); pci_setup_phb_io(phb, index == 0); - if (naca->interrupt_controller == IC_OPEN_PIC) { + if (naca->interrupt_controller == IC_OPEN_PIC && pSeries_mpic) { int addr = root_size_cells * (index + 2) - 1; - openpic_setup_ISU(index, opprop[addr]); + mpic_assign_isu(pSeries_mpic, index, opprop[addr]); } index++; @@ -481,92 +482,6 @@ } } -static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys, - unsigned long *start_virt, unsigned long *size) -{ - struct pci_controller *hose = PCI_GET_PHB_PTR(bus); - struct pci_bus_region region; - struct resource *res; - - if (bus->self) { - res = bus->resource[0]; - pcibios_resource_to_bus(bus->self, ®ion, res); - *start_phys = hose->io_base_phys + region.start; - *start_virt = (unsigned long) hose->io_base_virt + - region.start; - if (region.end > region.start) - *size = region.end - region.start + 1; - else { - printk("%s(): unexpected region 0x%lx->0x%lx\n", - __FUNCTION__, region.start, region.end); - return 1; - } - - } else { - /* Root Bus */ - res = &hose->io_resource; - *start_phys = hose->io_base_phys; - *start_virt = (unsigned long) hose->io_base_virt; - if (res->end > res->start) - *size = res->end - res->start + 1; - else { - printk("%s(): unexpected region 0x%lx->0x%lx\n", - __FUNCTION__, res->start, res->end); - return 1; - } - } - - return 0; -} - -int unmap_bus_range(struct pci_bus *bus) -{ - unsigned long start_phys; - unsigned long start_virt; - unsigned long size; - - if (!bus) { - printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); - return 1; - } - - if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) - return 1; - if (iounmap_explicit((void *) start_virt, size)) - return 1; - - return 0; -} -EXPORT_SYMBOL(unmap_bus_range); - -int remap_bus_range(struct pci_bus *bus) -{ - unsigned long start_phys; - unsigned long start_virt; - unsigned long size; - - if (!bus) { - printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); - return 1; - } - - if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) - return 1; - if (__ioremap_explicit(start_phys, start_virt, size, _PAGE_NO_CACHE)) - return 1; - - return 0; -} -EXPORT_SYMBOL(remap_bus_range); - -static void phbs_remap_io(void) -{ - struct pci_controller *hose, *tmp; - - list_for_each_entry_safe(hose, tmp, &hose_list, list_node) - remap_bus_range(hose->bus); -} - /* RPA-specific bits for removing PHBs */ int pcibios_remove_root_bus(struct pci_controller *phb) { @@ -619,25 +534,12 @@ static void __init pSeries_request_regions(void) { - struct device_node *i8042; - request_region(0x20,0x20,"pic1"); request_region(0xa0,0x20,"pic2"); request_region(0x00,0x20,"dma1"); request_region(0x40,0x20,"timer"); request_region(0x80,0x10,"dma page reg"); request_region(0xc0,0x20,"dma2"); - -#define I8042_DATA_REG 0x60 - - /* - * Some machines have an unterminated i8042 so check the device - * tree and reserve the region if it does not appear. Later on - * the i8042 code will try and reserve this region and fail. - */ - if (!(i8042 = of_find_node_by_type(NULL, "8042"))) - request_region(I8042_DATA_REG, 16, "reserved (no i8042)"); - of_node_put(i8042); } void __init pSeries_final_fixup(void) diff -Nru a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c --- a/arch/ppc64/kernel/pSeries_setup.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/pSeries_setup.c 2004-10-26 18:25:17 -07:00 @@ -61,19 +61,18 @@ #include #include "i8259.h" -#include "open_pic.h" #include #include #include +#include "mpic.h" + #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) #else #define DBG(fmt...) #endif -extern void pSeries_init_openpic(void); - extern void find_and_init_phbs(void); extern void pSeries_final_fixup(void); @@ -82,6 +81,8 @@ extern int pSeries_set_rtc_time(struct rtc_time *rtc_time); extern void find_udbg_vterm(void); extern void SystemReset_FWNMI(void), MachineCheck_FWNMI(void); /* from head.S */ +extern void generic_find_legacy_serial_ports(unsigned int *default_speed); + int fwnmi_active; /* TRUE if an FWNMI handler is present */ unsigned long virtPython0Facilities = 0; // python0 facility area (memory mapped io) (64-bit format) VIRTUAL address. @@ -91,6 +92,9 @@ extern unsigned long ppc_proc_freq; extern unsigned long ppc_tb_freq; +static volatile void __iomem * chrp_int_ack_special; +struct mpic *pSeries_mpic; + void pSeries_get_cpuinfo(struct seq_file *m) { struct device_node *root; @@ -120,15 +124,84 @@ fwnmi_active = 1; } -static void __init pSeries_setup_arch(void) +static int pSeries_irq_cascade(struct pt_regs *regs, void *data) +{ + if (chrp_int_ack_special) + return readb(chrp_int_ack_special); + else + return i8259_irq(smp_processor_id()); +} + +static void __init pSeries_init_mpic(void) +{ + unsigned int *addrp; + struct device_node *np; + int i; + + /* All ISUs are setup, complete initialization */ + mpic_init(pSeries_mpic); + + /* Check what kind of cascade ACK we have */ + if (!(np = of_find_node_by_name(NULL, "pci")) + || !(addrp = (unsigned int *) + get_property(np, "8259-interrupt-acknowledge", NULL))) + printk(KERN_ERR "Cannot find pci to get ack address\n"); + else + chrp_int_ack_special = ioremap(addrp[prom_n_addr_cells(np)-1], 1); + of_node_put(np); + + /* Setup the legacy interrupts & controller */ + for (i = 0; i < NUM_ISA_INTERRUPTS; i++) + irq_desc[i].handler = &i8259_pic; + i8259_init(0); + + /* Hook cascade to mpic */ + mpic_setup_cascade(NUM_ISA_INTERRUPTS, pSeries_irq_cascade, NULL); +} + +static void __init pSeries_setup_mpic(void) { - struct device_node *root; unsigned int *opprop; + unsigned long openpic_addr = 0; + unsigned char senses[NR_IRQS - NUM_ISA_INTERRUPTS]; + struct device_node *root; + int irq_count; + + /* Find the Open PIC if present */ + root = of_find_node_by_path("/"); + opprop = (unsigned int *) get_property(root, "platform-open-pic", NULL); + if (opprop != 0) { + int n = prom_n_addr_cells(root); + + for (openpic_addr = 0; n > 0; --n) + openpic_addr = (openpic_addr << 32) + *opprop++; + printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); + } + of_node_put(root); + + BUG_ON(openpic_addr == 0); + + /* Get the sense values from OF */ + prom_get_irq_senses(senses, NUM_ISA_INTERRUPTS, NR_IRQS); + + /* Setup the openpic driver */ + irq_count = NR_IRQS - NUM_ISA_INTERRUPTS - 4; /* leave room for IPIs */ + pSeries_mpic = mpic_alloc(openpic_addr, MPIC_PRIMARY, + 16, 16, irq_count, /* isu size, irq offset, irq count */ + NR_IRQS - 4, /* ipi offset */ + senses, irq_count, /* sense & sense size */ + " MPIC "); +} +static void __init pSeries_setup_arch(void) +{ /* Fixup ppc_md depending on the type of interrupt controller */ if (naca->interrupt_controller == IC_OPEN_PIC) { - ppc_md.init_IRQ = pSeries_init_openpic; - ppc_md.get_irq = openpic_get_irq; + ppc_md.init_IRQ = pSeries_init_mpic; + ppc_md.get_irq = mpic_get_irq; + /* Allocate the mpic now, so that find_and_init_phbs() can + * fill the ISUs */ + pSeries_setup_mpic(); } else { ppc_md.init_IRQ = xics_init_IRQ; ppc_md.get_irq = xics_get_irq; @@ -156,21 +229,6 @@ eeh_init(); find_and_init_phbs(); - /* Find the Open PIC if present */ - root = of_find_node_by_path("/"); - opprop = (unsigned int *) get_property(root, - "platform-open-pic", NULL); - if (opprop != 0) { - int n = prom_n_addr_cells(root); - unsigned long openpic; - - for (openpic = 0; n > 0; --n) - openpic = (openpic << 32) + *opprop++; - printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic); - OpenPIC_Addr = __ioremap(openpic, 0x40000, _PAGE_NO_CACHE); - } - of_node_put(root); - #ifdef CONFIG_DUMMY_CONSOLE conswitchp = &dummy_con; #endif @@ -189,75 +247,6 @@ arch_initcall(pSeries_init_panel); - -void __init pSeries_find_serial_port(void) -{ - struct device_node *np; - unsigned long encode_phys_size = 32; - u32 *sizeprop; - - struct isa_reg_property { - u32 space; - u32 address; - u32 size; - }; - struct pci_reg_property { - struct pci_address addr; - u32 size_hi; - u32 size_lo; - }; - - DBG(" -> pSeries_find_serial_port()\n"); - - naca->serialPortAddr = 0; - - np = of_find_node_by_path("/"); - if (!np) - return; - sizeprop = (u32 *)get_property(np, "#size-cells", NULL); - if (sizeprop != NULL) - encode_phys_size = (*sizeprop) << 5; - - for (np = NULL; (np = of_find_node_by_type(np, "serial"));) { - struct device_node *isa, *pci; - struct isa_reg_property *reg; - union pci_range *rangesp; - char *typep; - - typep = (char *)get_property(np, "ibm,aix-loc", NULL); - if ((typep == NULL) || (typep && strcmp(typep, "S1"))) - continue; - - reg = (struct isa_reg_property *)get_property(np, "reg", NULL); - - isa = of_get_parent(np); - if (!isa) { - DBG("no isa parent found\n"); - break; - } - pci = of_get_parent(isa); - if (!pci) { - DBG("no pci parent found\n"); - break; - } - - rangesp = (union pci_range *)get_property(pci, "ranges", NULL); - - if ( encode_phys_size == 32 ) - naca->serialPortAddr = rangesp->pci32.phys+reg->address; - else { - naca->serialPortAddr = - ((((unsigned long)rangesp->pci64.phys_hi) << 32) - | - (rangesp->pci64.phys_lo)) + reg->address; - } - break; - } - - DBG(" <- pSeries_find_serial_port()\n"); -} - - /* Build up the firmware_features bitmask field * using contents of device-tree/ibm,hypertas-functions. * Ultimately this functionality may be moved into prom.c prom_init(). @@ -330,6 +319,20 @@ } } +static void pSeries_cpu_die(void) +{ + local_irq_disable(); + /* Some hardware requires clearing the CPPR, while other hardware does not + * it is safe either way + */ + pSeriesLP_cppr_info(0, 0); + rtas_stop_self(); + /* Should never get here... */ + BUG(); + for(;;); +} + + /* * Early initialization. Relocation is on but do not reference unbolted pages */ @@ -337,6 +340,7 @@ { void *comport; int iommu_off = 0; + unsigned int default_speed; DBG(" -> pSeries_init_early()\n"); @@ -350,14 +354,14 @@ get_property(of_chosen, "linux,iommu-off", NULL)); } - pSeries_find_serial_port(); + generic_find_legacy_serial_ports(&default_speed); if (systemcfg->platform & PLATFORM_LPAR) find_udbg_vterm(); else if (naca->serialPortAddr) { /* Map the uart for udbg. */ comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE); - udbg_init_uart(comport); + udbg_init_uart(comport, default_speed); ppc_md.udbg_putc = udbg_putc; ppc_md.udbg_getc = udbg_getc; @@ -542,6 +546,31 @@ setup_default_decr(); } +static int pSeries_check_legacy_ioport(unsigned int baseport) +{ + struct device_node *np; + +#define I8042_DATA_REG 0x60 +#define FDC_BASE 0x3f0 + + + switch(baseport) { + case I8042_DATA_REG: + np = of_find_node_by_type(NULL, "8042"); + if (np == NULL) + return -ENODEV; + of_node_put(np); + break; + case FDC_BASE: + np = of_find_node_by_type(NULL, "fdc"); + if (np == NULL) + return -ENODEV; + of_node_put(np); + break; + } + return 0; +} + /* * Called very early, MMU is off, device-tree isn't unflattened */ @@ -571,9 +600,11 @@ .power_off = rtas_power_off, .halt = rtas_halt, .panic = rtas_os_term, + .cpu_die = pSeries_cpu_die, .get_boot_time = pSeries_get_boot_time, .get_rtc_time = pSeries_get_rtc_time, .set_rtc_time = pSeries_set_rtc_time, .calibrate_decr = pSeries_calibrate_decr, .progress = pSeries_progress, + .check_legacy_ioport = pSeries_check_legacy_ioport, }; diff -Nru a/arch/ppc64/kernel/pSeries_smp.c b/arch/ppc64/kernel/pSeries_smp.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/pSeries_smp.c 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,393 @@ +/* + * SMP support for pSeries machines. + * + * Dave Engebretsen, Peter Bergner, and + * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com + * + * Plus various changes from other IBM teams... + * + * 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. + */ + +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mpic.h" + +#ifdef DEBUG +#define DBG(fmt...) udbg_printf(fmt) +#else +#define DBG(fmt...) +#endif + +extern void pseries_secondary_smp_init(unsigned long); + +static void vpa_init(int cpu) +{ + unsigned long flags, pcpu = get_hard_smp_processor_id(cpu); + + /* Register the Virtual Processor Area (VPA) */ + flags = 1UL << (63 - 18); + register_vpa(flags, pcpu, __pa((unsigned long)&(paca[cpu].lppaca))); +} + + +/* Get state of physical CPU. + * Return codes: + * 0 - The processor is in the RTAS stopped state + * 1 - stop-self is in progress + * 2 - The processor is not in the RTAS stopped state + * -1 - Hardware Error + * -2 - Hardware Busy, Try again later. + */ +static int query_cpu_stopped(unsigned int pcpu) +{ + int cpu_status; + int status, qcss_tok; + + qcss_tok = rtas_token("query-cpu-stopped-state"); + if (qcss_tok == RTAS_UNKNOWN_SERVICE) + return -1; + status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu); + if (status != 0) { + printk(KERN_ERR + "RTAS query-cpu-stopped-state failed: %i\n", status); + return status; + } + + return cpu_status; +} + + +#ifdef CONFIG_HOTPLUG_CPU + +int __cpu_disable(void) +{ + /* FIXME: go put this in a header somewhere */ + extern void xics_migrate_irqs_away(void); + + systemcfg->processorCount--; + + /*fix boot_cpuid here*/ + if (smp_processor_id() == boot_cpuid) + boot_cpuid = any_online_cpu(cpu_online_map); + + /* FIXME: abstract this to not be platform specific later on */ + xics_migrate_irqs_away(); + return 0; +} + +void __cpu_die(unsigned int cpu) +{ + int tries; + int cpu_status; + unsigned int pcpu = get_hard_smp_processor_id(cpu); + + for (tries = 0; tries < 25; tries++) { + cpu_status = query_cpu_stopped(pcpu); + if (cpu_status == 0 || cpu_status == -1) + break; + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ/5); + } + if (cpu_status != 0) { + printk("Querying DEAD? cpu %i (%i) shows %i\n", + cpu, pcpu, cpu_status); + } + + /* Isolation and deallocation are definatly done by + * drslot_chrp_cpu. If they were not they would be + * done here. Change isolate state to Isolate and + * change allocation-state to Unusable. + */ + paca[cpu].cpu_start = 0; +} + +/* Search all cpu device nodes for an offline logical cpu. If a + * device node has a "ibm,my-drc-index" property (meaning this is an + * LPAR), paranoid-check whether we own the cpu. For each "thread" + * of a cpu, if it is offline and has the same hw index as before, + * grab that in preference. + */ +static unsigned int find_physical_cpu_to_start(unsigned int old_hwindex) +{ + struct device_node *np = NULL; + unsigned int best = -1U; + + while ((np = of_find_node_by_type(np, "cpu"))) { + int nr_threads, len; + u32 *index = (u32 *)get_property(np, "ibm,my-drc-index", NULL); + u32 *tid = (u32 *) + get_property(np, "ibm,ppc-interrupt-server#s", &len); + + if (!tid) + tid = (u32 *)get_property(np, "reg", &len); + + if (!tid) + continue; + + /* If there is a drc-index, make sure that we own + * the cpu. + */ + if (index) { + int state; + int rc = rtas_get_sensor(9003, *index, &state); + if (rc != 0 || state != 1) + continue; + } + + nr_threads = len / sizeof(u32); + + while (nr_threads--) { + if (0 == query_cpu_stopped(tid[nr_threads])) { + best = tid[nr_threads]; + if (best == old_hwindex) + goto out; + } + } + } +out: + of_node_put(np); + return best; +} + +/** + * smp_startup_cpu() - start the given cpu + * + * At boot time, there is nothing to do. At run-time, call RTAS with + * the appropriate start location, if the cpu is in the RTAS stopped + * state. + * + * Returns: + * 0 - failure + * 1 - success + */ +static inline int __devinit smp_startup_cpu(unsigned int lcpu) +{ + int status; + unsigned long start_here = __pa((u32)*((unsigned long *) + pseries_secondary_smp_init)); + unsigned int pcpu; + + /* At boot time the cpus are already spinning in hold + * loops, so nothing to do. */ + if (system_state < SYSTEM_RUNNING) + return 1; + + pcpu = find_physical_cpu_to_start(get_hard_smp_processor_id(lcpu)); + if (pcpu == -1U) { + printk(KERN_INFO "No more cpus available, failing\n"); + return 0; + } + + /* Fixup atomic count: it exited inside IRQ handler. */ + paca[lcpu].__current->thread_info->preempt_count = 0; + + /* At boot this is done in prom.c. */ + paca[lcpu].hw_cpu_id = pcpu; + + status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL, + pcpu, start_here, lcpu); + if (status != 0) { + printk(KERN_ERR "start-cpu failed: %i\n", status); + return 0; + } + return 1; +} +#else /* ... CONFIG_HOTPLUG_CPU */ +static inline int __devinit smp_startup_cpu(unsigned int lcpu) +{ + return 1; +} +#endif /* CONFIG_HOTPLUG_CPU */ + +static inline void smp_xics_do_message(int cpu, int msg) +{ + set_bit(msg, &xics_ipi_message[cpu].value); + mb(); + xics_cause_IPI(cpu); +} + +static void smp_xics_message_pass(int target, int msg) +{ + unsigned int i; + + if (target < NR_CPUS) { + smp_xics_do_message(target, msg); + } else { + for_each_online_cpu(i) { + if (target == MSG_ALL_BUT_SELF + && i == smp_processor_id()) + continue; + smp_xics_do_message(i, msg); + } + } +} + +extern void xics_request_IPIs(void); + +static int __init smp_xics_probe(void) +{ + xics_request_IPIs(); + + return cpus_weight(cpu_possible_map); +} + +static void __devinit smp_xics_setup_cpu(int cpu) +{ + if (cpu != boot_cpuid) + xics_setup_cpu(); +} + +static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED; +static unsigned long timebase = 0; + +static void __devinit pSeries_give_timebase(void) +{ + spin_lock(&timebase_lock); + rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL); + timebase = get_tb(); + spin_unlock(&timebase_lock); + + while (timebase) + barrier(); + rtas_call(rtas_token("thaw-time-base"), 0, 1, NULL); +} + +static void __devinit pSeries_take_timebase(void) +{ + while (!timebase) + barrier(); + spin_lock(&timebase_lock); + set_tb(timebase >> 32, timebase & 0xffffffff); + timebase = 0; + spin_unlock(&timebase_lock); +} + +static void __devinit pSeries_late_setup_cpu(int cpu) +{ + extern unsigned int default_distrib_server; + + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { + vpa_init(cpu); + } + +#ifdef CONFIG_IRQ_ALL_CPUS + /* Put the calling processor into the GIQ. This is really only + * necessary from a secondary thread as the OF start-cpu interface + * performs this function for us on primary threads. + */ + /* TODO: 9005 is #defined in rtas-proc.c -- move to a header */ + rtas_set_indicator(9005, default_distrib_server, 1); +#endif +} + + +void __devinit smp_pSeries_kick_cpu(int nr) +{ + BUG_ON(nr < 0 || nr >= NR_CPUS); + + if (!smp_startup_cpu(nr)) + return; + + /* + * The processor is currently spinning, waiting for the + * cpu_start field to become non-zero After we set cpu_start, + * the processor will continue on to secondary_start + */ + paca[nr].cpu_start = 1; +} + +static struct smp_ops_t pSeries_mpic_smp_ops = { + .message_pass = smp_mpic_message_pass, + .probe = smp_mpic_probe, + .kick_cpu = smp_pSeries_kick_cpu, + .setup_cpu = smp_mpic_setup_cpu, + .late_setup_cpu = pSeries_late_setup_cpu, +}; + +static struct smp_ops_t pSeries_xics_smp_ops = { + .message_pass = smp_xics_message_pass, + .probe = smp_xics_probe, + .kick_cpu = smp_pSeries_kick_cpu, + .setup_cpu = smp_xics_setup_cpu, + .late_setup_cpu = pSeries_late_setup_cpu, +}; + +/* This is called very early */ +void __init smp_init_pSeries(void) +{ + int ret, i; + + DBG(" -> smp_init_pSeries()\n"); + + if (naca->interrupt_controller == IC_OPEN_PIC) + smp_ops = &pSeries_mpic_smp_ops; + else + smp_ops = &pSeries_xics_smp_ops; + + /* Start secondary threads on SMT systems; primary threads + * are already in the running state. + */ + for_each_present_cpu(i) { + if (query_cpu_stopped(get_hard_smp_processor_id(i)) == 0) { + printk("%16.16x : starting thread\n", i); + DBG("%16.16x : starting thread\n", i); + rtas_call(rtas_token("start-cpu"), 3, 1, &ret, + get_hard_smp_processor_id(i), + __pa((u32)*((unsigned long *) + pseries_secondary_smp_init)), + i); + } + } + + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) + vpa_init(boot_cpuid); + + /* Non-lpar has additional take/give timebase */ + if (systemcfg->platform == PLATFORM_PSERIES) { + smp_ops->give_timebase = pSeries_give_timebase; + smp_ops->take_timebase = pSeries_take_timebase; + } + + + DBG(" <- smp_init_pSeries()\n"); +} + diff -Nru a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c --- a/arch/ppc64/kernel/pacaData.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/pacaData.c 2004-10-26 18:25:18 -07:00 @@ -7,13 +7,12 @@ * 2 of the License, or (at your option) any later version. */ -#include -#include -#include #include +#include #include #include #include +#include #include #include diff -Nru a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c --- a/arch/ppc64/kernel/pci.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/pci.c 2004-10-26 18:25:18 -07:00 @@ -11,6 +11,8 @@ * 2 of the License, or (at your option) any later version. */ +#undef DEBUG + #include #include #include @@ -39,6 +41,12 @@ #include "pci.h" +#ifdef DEBUG +#define DBG(fmt...) udbg_printf(fmt) +#else +#define DBG(fmt...) +#endif + unsigned long pci_probe_only = 1; unsigned long pci_assign_all_buses = 0; @@ -106,11 +114,11 @@ dev->resource[i].flags &= ~IORESOURCE_IO; } } -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, fixup_windbond_82c105); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, + fixup_windbond_82c105); -void -pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, - struct resource *res) +void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, + struct resource *res) { unsigned long offset = 0; struct pci_controller *hose = PCI_GET_PHB_PTR(dev); @@ -215,8 +223,7 @@ /* * Allocate pci_controller(phb) initialized common variables. */ -struct pci_controller * __init -pci_alloc_pci_controller(enum phb_types controller_type) +struct pci_controller * __init pci_alloc_pci_controller(enum phb_types controller_type) { struct pci_controller *hose; @@ -246,8 +253,7 @@ /* * Dymnamically allocate pci_controller(phb), initialize common variables. */ -struct pci_controller * -pci_alloc_phb_dynamic(enum phb_types controller_type) +struct pci_controller * pci_alloc_phb_dynamic(enum phb_types controller_type) { struct pci_controller *hose; @@ -430,9 +436,9 @@ * * Returns negative error code on failure, zero on success. */ -static __inline__ int -__pci_mmap_make_offset(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state) +static __inline__ int __pci_mmap_make_offset(struct pci_dev *dev, + struct vm_area_struct *vma, + enum pci_mmap_state mmap_state) { struct pci_controller *hose = PCI_GET_PHB_PTR(dev); unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; @@ -487,9 +493,9 @@ * Set vm_flags of VMA, as appropriate for this architecture, for a pci device * mapping. */ -static __inline__ void -__pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state) +static __inline__ void __pci_mmap_set_flags(struct pci_dev *dev, + struct vm_area_struct *vma, + enum pci_mmap_state mmap_state) { vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; } @@ -498,9 +504,10 @@ * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci * device mapping. */ -static __inline__ void -__pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state, int write_combine) +static __inline__ void __pci_mmap_set_pgprot(struct pci_dev *dev, + struct vm_area_struct *vma, + enum pci_mmap_state mmap_state, + int write_combine) { long prot = pgprot_val(vma->vm_page_prot); @@ -569,7 +576,7 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, unsigned long phb_io_base_phys, - void * phb_io_base_virt) + void __iomem * phb_io_base_virt) { struct isa_range *range; unsigned long pci_addr; @@ -578,9 +585,11 @@ int rlen = 0; range = (struct isa_range *) get_property(isa_node, "ranges", &rlen); - if (rlen < sizeof(struct isa_range)) { - printk(KERN_ERR "unexpected isa range size: %s\n", - __FUNCTION__); + if (range == NULL || (rlen < sizeof(struct isa_range))) { + printk(KERN_ERR "no ISA ranges or unexpected isa range size," + "mapping 64k\n"); + __ioremap_explicit(phb_io_base_phys, (unsigned long)phb_io_base_virt, + 0x10000, _PAGE_NO_CACHE); return; } @@ -613,7 +622,7 @@ } void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, - struct device_node *dev) + struct device_node *dev) { unsigned int *ranges; unsigned long size; @@ -645,8 +654,9 @@ cpu_phys_addr = cpu_phys_addr << 32 | ranges[4]; size = (unsigned long)ranges[na+3] << 32 | ranges[na+4]; - - switch (ranges[0] >> 24) { + if (size == 0) + continue; + switch ((ranges[0] >> 24) & 0x3) { case 1: /* I/O space */ hose->io_base_phys = cpu_phys_addr; hose->pci_io_size = size; @@ -654,6 +664,8 @@ res = &hose->io_resource; res->flags = IORESOURCE_IO; res->start = pci_addr; + DBG("phb%d: IO 0x%lx -> 0x%lx\n", hose->global_number, + res->start, res->start + size - 1); break; case 2: /* memory space */ memno = 0; @@ -666,6 +678,8 @@ res = &hose->mem_resources[memno]; res->flags = IORESOURCE_MEM; res->start = cpu_phys_addr; + DBG("phb%d: MEM 0x%lx -> 0x%lx\n", hose->global_number, + res->start, res->start + size - 1); } break; } @@ -729,6 +743,96 @@ res->end += io_virt_offset; } + +static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys, + unsigned long *start_virt, unsigned long *size) +{ + struct pci_controller *hose = PCI_GET_PHB_PTR(bus); + struct pci_bus_region region; + struct resource *res; + + if (bus->self) { + res = bus->resource[0]; + pcibios_resource_to_bus(bus->self, ®ion, res); + *start_phys = hose->io_base_phys + region.start; + *start_virt = (unsigned long) hose->io_base_virt + + region.start; + if (region.end > region.start) + *size = region.end - region.start + 1; + else { + printk("%s(): unexpected region 0x%lx->0x%lx\n", + __FUNCTION__, region.start, region.end); + return 1; + } + + } else { + /* Root Bus */ + res = &hose->io_resource; + *start_phys = hose->io_base_phys; + *start_virt = (unsigned long) hose->io_base_virt; + if (res->end > res->start) + *size = res->end - res->start + 1; + else { + printk("%s(): unexpected region 0x%lx->0x%lx\n", + __FUNCTION__, res->start, res->end); + return 1; + } + } + + return 0; +} + +int unmap_bus_range(struct pci_bus *bus) +{ + unsigned long start_phys; + unsigned long start_virt; + unsigned long size; + + if (!bus) { + printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); + return 1; + } + + if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) + return 1; + if (iounmap_explicit((void __iomem *) start_virt, size)) + return 1; + + return 0; +} +EXPORT_SYMBOL(unmap_bus_range); + +int remap_bus_range(struct pci_bus *bus) +{ + unsigned long start_phys; + unsigned long start_virt; + unsigned long size; + + if (!bus) { + printk(KERN_ERR "%s() expected bus\n", __FUNCTION__); + return 1; + } + + + if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) + return 1; + printk("mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size); + if (__ioremap_explicit(start_phys, start_virt, size, _PAGE_NO_CACHE)) + return 1; + + return 0; +} +EXPORT_SYMBOL(remap_bus_range); + +void phbs_remap_io(void) +{ + struct pci_controller *hose, *tmp; + + list_for_each_entry_safe(hose, tmp, &hose_list, list_node) + remap_bus_range(hose->bus); +} + + /*********************************************************************** * pci_find_hose_for_OF_device * @@ -761,6 +865,9 @@ else busdn = bus->sysdata; /* must be a phb */ + if (busdn == NULL) + return 0; + /* * Check to see if there is any of the 8 functions are in the * device tree. If they are then we need to scan all the @@ -783,7 +890,8 @@ for (i = 0; i < PCI_NUM_RESOURCES; i++) { if (dev->resource[i].flags & IORESOURCE_IO) { - unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; + unsigned long offset = (unsigned long)hose->io_base_virt + - pci_io_base; unsigned long start, end, mask; start = dev->resource[i].start += offset; diff -Nru a/arch/ppc64/kernel/pci_dn.c b/arch/ppc64/kernel/pci_dn.c --- a/arch/ppc64/kernel/pci_dn.c 2004-10-26 18:25:19 -07:00 +++ b/arch/ppc64/kernel/pci_dn.c 2004-10-26 18:25:19 -07:00 @@ -46,29 +46,13 @@ { struct pci_controller *phb = data; u32 *regs; - char *device_type = get_property(dn, "device_type", NULL); - char *model; dn->phb = phb; - if (device_type && (strcmp(device_type, "pci") == 0) && - (get_property(dn, "class-code", NULL) == 0)) { - /* special case for PHB's. Sigh. */ - regs = (u32 *)get_property(dn, "bus-range", NULL); - dn->busno = regs[0]; - - model = (char *)get_property(dn, "model", NULL); - - if (strstr(model, "U3")) - dn->devfn = -1; - else - dn->devfn = 0; /* assumption */ - } else { - regs = (u32 *)get_property(dn, "reg", NULL); - if (regs) { - /* First register entry is addr (00BBSS00) */ - dn->busno = (regs[0] >> 16) & 0xff; - dn->devfn = (regs[0] >> 8) & 0xff; - } + regs = (u32 *)get_property(dn, "reg", NULL); + if (regs) { + /* First register entry is addr (00BBSS00) */ + dn->busno = (regs[0] >> 16) & 0xff; + dn->devfn = (regs[0] >> 8) & 0xff; } return NULL; } @@ -97,20 +81,25 @@ struct device_node *dn, *nextdn; void *ret; - if (pre && ((ret = pre(start, data)) != NULL)) - return ret; + /* We started with a phb, iterate all childs */ for (dn = start->child; dn; dn = nextdn) { + u32 *classp, class; + nextdn = NULL; - if (get_property(dn, "class-code", NULL)) { - if (pre && ((ret = pre(dn, data)) != NULL)) - return ret; - if (dn->child) - /* Depth first...do children */ - nextdn = dn->child; - else if (dn->sibling) - /* ok, try next sibling instead. */ - nextdn = dn->sibling; - } + classp = (u32 *)get_property(dn, "class-code", NULL); + class = classp ? *classp : 0; + + if (pre && ((ret = pre(dn, data)) != NULL)) + return ret; + + /* If we are a PCI bridge, go down */ + if (dn->child && ((class >> 8) == PCI_CLASS_BRIDGE_PCI || + (class >> 8) == PCI_CLASS_BRIDGE_CARDBUS)) + /* Depth first...do children */ + nextdn = dn->child; + else if (dn->sibling) + /* ok, try next sibling instead. */ + nextdn = dn->sibling; if (!nextdn) { /* Walk up to next valid sibling. */ do { @@ -124,26 +113,16 @@ return NULL; } -/* - * Same as traverse_pci_devices except this does it for all phbs. - */ -static void *traverse_all_pci_devices(traverse_func pre) +void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) { - struct pci_controller *phb, *tmp; - void *ret; + struct device_node * dn = (struct device_node *) phb->arch_data; - list_for_each_entry_safe(phb, tmp, &hose_list, list_node) - if ((ret = traverse_pci_devices(phb->arch_data, pre, phb)) - != NULL) - return ret; - return NULL; -} + /* PHB nodes themselves must not match */ + dn->devfn = dn->busno = -1; + dn->phb = phb; -void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) -{ /* Update dn->phb ptrs for new phb and children devices */ - traverse_pci_devices((struct device_node *)phb->arch_data, - update_dn_pci_info, phb); + traverse_pci_devices(dn, update_dn_pci_info, phb); } /* @@ -154,6 +133,7 @@ { int busno = ((unsigned long)data >> 8) & 0xff; int devfn = ((unsigned long)data) & 0xff; + return ((devfn == dn->devfn) && (busno == dn->busno)) ? dn : NULL; } @@ -180,10 +160,8 @@ phb_dn = phb->arch_data; dn = traverse_pci_devices(phb_dn, is_devfn_node, (void *)searchval); - if (dn) { + if (dn) dev->sysdata = dn; - /* ToDo: call some device init hook here */ - } return dn; } EXPORT_SYMBOL(fetch_dev_dn); @@ -195,8 +173,11 @@ */ void __init pci_devs_phb_init(void) { + struct pci_controller *phb, *tmp; + /* This must be done first so the device nodes have valid pci info! */ - traverse_all_pci_devices(update_dn_pci_info); + list_for_each_entry_safe(phb, tmp, &hose_list, list_node) + pci_devs_phb_init_dynamic(phb); } diff -Nru a/arch/ppc64/kernel/pmac.h b/arch/ppc64/kernel/pmac.h --- a/arch/ppc64/kernel/pmac.h 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/pmac.h 2004-10-26 18:25:18 -07:00 @@ -18,7 +18,6 @@ extern void pmac_pcibios_fixup(void); extern void pmac_pci_init(void); extern void pmac_setup_pci_dma(void); -extern void fixup_k2_sata(struct pci_dev* dev); extern void pmac_check_ht_link(void); extern void pmac_setup_smp(void); diff -Nru a/arch/ppc64/kernel/pmac_pci.c b/arch/ppc64/kernel/pmac_pci.c --- a/arch/ppc64/kernel/pmac_pci.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/pmac_pci.c 2004-10-26 18:25:18 -07:00 @@ -46,7 +46,6 @@ * assuming we won't have both UniNorth and Bandit */ static int has_uninorth; static struct pci_controller *u3_agp; -u8 pci_cache_line_size; struct pci_dev *k2_skiplist[2]; static int __init fixup_one_level_bus_range(struct device_node *node, int higher) @@ -150,16 +149,9 @@ int offset, int len, u32 *val) { struct pci_controller *hose; - struct device_node *busdn; unsigned long addr; - if (bus->self) - busdn = pci_device_to_OF_node(bus->self); - else - busdn = bus->sysdata; /* must be a phb */ - if (busdn == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - hose = busdn->phb; + hose = pci_bus_to_host(bus); if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; @@ -188,16 +180,9 @@ int offset, int len, u32 val) { struct pci_controller *hose; - struct device_node *busdn; unsigned long addr; - if (bus->self) - busdn = pci_device_to_OF_node(bus->self); - else - busdn = bus->sysdata; /* must be a phb */ - if (busdn == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - hose = busdn->phb; + hose = pci_bus_to_host(bus); if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; @@ -236,14 +221,44 @@ * implement self-view of the HT host yet */ -static int skip_k2_device(struct pci_bus *bus, unsigned int devfn) +/* + * This function deals with some "special cases" devices. + * + * 0 -> No special case + * 1 -> Skip the device but act as if the access was successfull + * (return 0xff's on reads, eventually, cache config space + * accesses in a later version) + * -1 -> Hide the device (unsuccessful acess) + */ +static int u3_ht_skip_device(struct pci_controller *hose, + struct pci_bus *bus, unsigned int devfn) { + struct device_node *busdn, *dn; int i; + /* + * When a device in K2 is powered down, we die on config + * cycle accesses. Fix that here. + */ for (i=0; i<2; i++) if (k2_skiplist[i] && k2_skiplist[i]->bus == bus && k2_skiplist[i]->devfn == devfn) return 1; + + /* We only allow config cycles to devices that are in OF device-tree + * as we are apparently having some weird things going on with some + * revs of K2 on recent G5s + */ + if (bus->self) + busdn = pci_device_to_OF_node(bus->self); + else + busdn = hose->arch_data; + for (dn = busdn->child; dn; dn = dn->sibling) + if (dn->devfn == devfn) + break; + if (dn == NULL) + return -1; + return 0; } @@ -259,8 +274,7 @@ { if (bus == hose->first_busno) { /* For now, we don't self probe U3 HT bridge */ - if (PCI_FUNC(devfn) != 0 || PCI_SLOT(devfn) > 7 || - PCI_SLOT(devfn) < 1) + if (PCI_SLOT(devfn) == 0) return 0; return ((unsigned long)hose->cfg_data) + U3_HT_CFA0(devfn, offset); } else @@ -271,39 +285,21 @@ int offset, int len, u32 *val) { struct pci_controller *hose; - struct device_node *busdn, *dn; unsigned long addr; - if (bus->self) - busdn = pci_device_to_OF_node(bus->self); - else - busdn = bus->sysdata; /* must be a phb */ - if (busdn == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - hose = busdn->phb; - if (hose == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - /* We only allow config cycles to devices that are in OF device-tree - * as we are apparently having some weird things going on with some - * revs of K2 on recent G5s - */ - for (dn = busdn->child; dn; dn = dn->sibling) - if (dn->devfn == devfn) - break; - if (dn == NULL) + hose = pci_bus_to_host(bus); + if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); if (!addr) return PCIBIOS_DEVICE_NOT_FOUND; - /* - * When a device in K2 is powered down, we die on config - * cycle accesses. Fix that here. We may ultimately want - * to cache the config space for those instead of returning - * 0xffffffff's to make life easier to HW detection tools - */ - if (skip_k2_device(bus, devfn)) { + + switch (u3_ht_skip_device(hose, bus, devfn)) { + case 0: + break; + case 1: switch (len) { case 1: *val = 0xff; break; @@ -313,6 +309,8 @@ *val = 0xfffffffful; break; } return PCIBIOS_SUCCESSFUL; + default: + return PCIBIOS_DEVICE_NOT_FOUND; } /* @@ -337,28 +335,24 @@ int offset, int len, u32 val) { struct pci_controller *hose; - struct device_node *busdn; unsigned long addr; - if (bus->self) - busdn = pci_device_to_OF_node(bus->self); - else - busdn = bus->sysdata; /* must be a phb */ - if (busdn == NULL) - return PCIBIOS_DEVICE_NOT_FOUND; - hose = busdn->phb; + hose = pci_bus_to_host(bus); if (hose == NULL) return PCIBIOS_DEVICE_NOT_FOUND; addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); if (!addr) return PCIBIOS_DEVICE_NOT_FOUND; - /* - * When a device in K2 is powered down, we die on config - * cycle accesses. Fix that here. - */ - if (skip_k2_device(bus, devfn)) + + switch (u3_ht_skip_device(hose, bus, devfn)) { + case 0: + break; + case 1: return PCIBIOS_SUCCESSFUL; + default: + return PCIBIOS_DEVICE_NOT_FOUND; + } /* * Note: the caller has already checked that offset is @@ -675,7 +669,6 @@ pci_fix_bus_sysdata(); iommu_setup_u3(); - } static void __init pmac_fixup_phb_resources(void) @@ -750,11 +743,6 @@ /* Tell pci.c to use the common resource allocation mecanism */ pci_probe_only = 0; - /* HT don't do more than 64 bytes transfers. FIXME: Deal with - * the exception of U3/AGP (hook into pci_set_mwi) - */ - pci_cache_line_size = 16; /* 64 bytes */ - /* Allow all IO */ io_page_mask = -1; } @@ -763,7 +751,7 @@ * Disable second function on K2-SATA, it's broken * and disable IO BARs on first one */ -void fixup_k2_sata(struct pci_dev* dev) +static void fixup_k2_sata(struct pci_dev* dev) { int i; u16 cmd; diff -Nru a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c --- a/arch/ppc64/kernel/pmac_setup.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/pmac_setup.c 2004-10-26 18:25:17 -07:00 @@ -72,6 +72,7 @@ #include #include "pmac.h" +#include "mpic.h" #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -319,29 +320,9 @@ DBG(" <- pmac_init_early\n"); } -extern void* OpenPIC_Addr; -extern void* OpenPIC2_Addr; -extern u_int OpenPIC_NumInitSenses; -extern u_char *OpenPIC_InitSenses; -extern void openpic_init(int main_pic, int offset, unsigned char* chrp_ack, - int programmer_switch_irq); -extern void openpic2_init(int offset); -extern int openpic_get_irq(struct pt_regs *regs); -extern int openpic2_get_irq(struct pt_regs *regs); - -static int pmac_cascade_irq = -1; - -static irqreturn_t pmac_u3_do_cascade(int cpl, void *dev_id, struct pt_regs *regs) -{ - int irq; - - for (;;) { - irq = openpic2_get_irq(regs); - if (irq == -1) - break; - ppc_irq_dispatch_handler(regs, irq); - } - return IRQ_HANDLED; +static int pmac_u3_cascade(struct pt_regs *regs, void *data) +{ + return mpic_get_one_irq((struct mpic *)data, regs); } static __init void pmac_init_IRQ(void) @@ -349,6 +330,7 @@ struct device_node *irqctrler = NULL; struct device_node *irqctrler2 = NULL; struct device_node *np = NULL; + struct mpic *mpic1, *mpic2; /* We first try to detect Apple's new Core99 chipset, since mac-io * is quite different on those machines and contains an IBM MPIC2. @@ -368,44 +350,37 @@ (unsigned int)irqctrler->addrs[0].address); prom_get_irq_senses(senses, 0, 128); - OpenPIC_InitSenses = senses; - OpenPIC_NumInitSenses = 128; - OpenPIC_Addr = ioremap(irqctrler->addrs[0].address, - irqctrler->addrs[0].size); - openpic_init(1, 0, NULL, -1); + mpic1 = mpic_alloc(irqctrler->addrs[0].address, + MPIC_PRIMARY | MPIC_WANTS_RESET, + 0, 0, 128, 256, senses, 128, " K2-MPIC "); + BUG_ON(mpic1 == NULL); + mpic_init(mpic1); if (irqctrler2 != NULL && irqctrler2->n_intrs > 0 && irqctrler2->n_addrs > 0) { printk(KERN_INFO "Slave OpenPIC at 0x%08x hooked on IRQ %d\n", (u32)irqctrler2->addrs[0].address, irqctrler2->intrs[0].line); + pmac_call_feature(PMAC_FTR_ENABLE_MPIC, irqctrler2, 0, 0); - OpenPIC2_Addr = ioremap(irqctrler2->addrs[0].address, - irqctrler2->addrs[0].size); prom_get_irq_senses(senses, 128, 128 + 128); - OpenPIC_InitSenses = senses; - OpenPIC_NumInitSenses = 128; - openpic2_init(128); - pmac_cascade_irq = irqctrler2->intrs[0].line; + + /* We don't need to set MPIC_BROKEN_U3 here since we don't have + * hypertransport interrupts routed to it + */ + mpic2 = mpic_alloc(irqctrler2->addrs[0].address, + MPIC_BIG_ENDIAN | MPIC_WANTS_RESET, + 0, 128, 128, 0, senses, 128, " U3-MPIC "); + BUG_ON(mpic2 == NULL); + mpic_init(mpic2); + mpic_setup_cascade(irqctrler2->intrs[0].line, + pmac_u3_cascade, mpic2); } } of_node_put(irqctrler); of_node_put(irqctrler2); } -/* We cannot do request_irq too early ... Right now, we get the - * cascade as a core_initcall, which should be fine for our needs - */ -static int __init pmac_irq_cascade_init(void) -{ - if (request_irq(pmac_cascade_irq, pmac_u3_do_cascade, 0, - "U3->K2 Cascade", NULL)) - printk(KERN_ERR "Unable to get OpenPIC IRQ for cascade\n"); - return 0; -} - -core_initcall(pmac_irq_cascade_init); - static void __init pmac_progress(char *s, unsigned short hex) { if (sccdbg) { @@ -420,6 +395,15 @@ #endif /* CONFIG_BOOTX_TEXT */ } +/* + * pmac has no legacy IO, anything calling this function has to + * fail or bad things will happen + */ +static int pmac_check_legacy_ioport(unsigned int baseport) +{ + return -ENODEV; +} + static int __init pmac_declare_of_platform_devices(void) { struct device_node *np; @@ -463,7 +447,7 @@ .init_early = pmac_init_early, .get_cpuinfo = pmac_show_cpuinfo, .init_IRQ = pmac_init_IRQ, - .get_irq = openpic_get_irq, + .get_irq = mpic_get_irq, .pcibios_fixup = pmac_pcibios_fixup, .restart = pmac_restart, .power_off = pmac_power_off, @@ -474,4 +458,5 @@ .calibrate_decr = pmac_calibrate_decr, .feature_call = pmac_do_feature_call, .progress = pmac_progress, + .check_legacy_ioport = pmac_check_legacy_ioport }; diff -Nru a/arch/ppc64/kernel/pmac_smp.c b/arch/ppc64/kernel/pmac_smp.c --- a/arch/ppc64/kernel/pmac_smp.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/pmac_smp.c 2004-10-26 18:25:17 -07:00 @@ -21,6 +21,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ + +#undef DEBUG + #include #include #include @@ -32,6 +35,7 @@ #include #include #include +#include #include #include @@ -48,14 +52,18 @@ #include #include -#include "open_pic.h" +#include "mpic.h" + +#ifdef DEBUG +#define DBG(fmt...) udbg_printf(fmt) +#else +#define DBG(fmt...) +#endif extern void pmac_secondary_start_1(void); extern void pmac_secondary_start_2(void); extern void pmac_secondary_start_3(void); -extern void smp_openpic_message_pass(int target, int msg); - extern struct smp_ops_t *smp_ops; static int __init smp_core99_probe(void) @@ -75,7 +83,7 @@ printk(KERN_INFO "PowerMac SMP probe found %d cpus\n", ncpus); if (ncpus > 1) - openpic_request_IPIs(); + mpic_request_ipis(); return ncpus; } @@ -102,15 +110,16 @@ * b .pmac_secondary_start - KERNELBASE */ switch(nr) { - case 1: - new_vector = (unsigned long)pmac_secondary_start_1; - break; - case 2: - new_vector = (unsigned long)pmac_secondary_start_2; - break; - case 3: - new_vector = (unsigned long)pmac_secondary_start_3; - break; + case 1: + new_vector = (unsigned long)pmac_secondary_start_1; + break; + case 2: + new_vector = (unsigned long)pmac_secondary_start_2; + break; + case 3: + default: + new_vector = (unsigned long)pmac_secondary_start_3; + break; } *vector = 0x48000002 + (new_vector - KERNELBASE); @@ -138,8 +147,8 @@ static void __init smp_core99_setup_cpu(int cpu_nr) { - /* Setup openpic */ - do_openpic_setup_cpu(); + /* Setup MPIC */ + mpic_setup_this_cpu(); if (cpu_nr == 0) { extern void g5_phy_disable_cpu1(void); @@ -149,15 +158,12 @@ */ if (num_online_cpus() < 2) g5_phy_disable_cpu1(); - if (ppc_md.progress) ppc_md.progress("core99_setup_cpu 0 done", 0x349); + if (ppc_md.progress) ppc_md.progress("smp_core99_setup_cpu 0 done", 0x349); } } -extern void smp_generic_give_timebase(void); -extern void smp_generic_take_timebase(void); - struct smp_ops_t core99_smp_ops __pmacdata = { - .message_pass = smp_openpic_message_pass, + .message_pass = smp_mpic_message_pass, .probe = smp_core99_probe, .kick_cpu = smp_core99_kick_cpu, .setup_cpu = smp_core99_setup_cpu, diff -Nru a/arch/ppc64/kernel/proc_ppc64.c b/arch/ppc64/kernel/proc_ppc64.c --- a/arch/ppc64/kernel/proc_ppc64.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/proc_ppc64.c 2004-10-26 18:25:18 -07:00 @@ -33,7 +33,8 @@ #include static loff_t page_map_seek( struct file *file, loff_t off, int whence); -static ssize_t page_map_read( struct file *file, char *buf, size_t nbytes, loff_t *ppos); +static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, + loff_t *ppos); static int page_map_mmap( struct file *file, struct vm_area_struct *vma ); static struct file_operations page_map_fops = { @@ -161,7 +162,8 @@ return (file->f_pos = new); } -static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) +static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, + loff_t *ppos) { struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); @@ -208,7 +210,8 @@ * whole nodes along with their properties. Operations on individual * properties are not implemented (yet). */ -static ssize_t ofdt_write(struct file *file, const char __user *buf, size_t count, loff_t *off) +static ssize_t ofdt_write(struct file *file, const char __user *buf, size_t count, + loff_t *off) { int rv = 0; char *kbuf; @@ -302,7 +305,8 @@ return rv; } -static struct property *new_property(const char *name, const int length, const unsigned char *value, struct property *last) +static struct property *new_property(const char *name, const int length, + const unsigned char *value, struct property *last) { struct property *new = kmalloc(sizeof(*new), GFP_KERNEL); @@ -343,7 +347,8 @@ * this function does no allocation or copying of the data. Return value * is set to the next name in buf, or NULL on error. */ -static char * parse_next_property(char *buf, char *end, char **name, int *length, unsigned char **value) +static char * parse_next_property(char *buf, char *end, char **name, int *length, + unsigned char **value) { char *tmp; @@ -351,13 +356,15 @@ tmp = strchr(buf, ' '); if (!tmp) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } *tmp = '\0'; if (++tmp >= end) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } @@ -365,11 +372,13 @@ *length = -1; *length = simple_strtoul(tmp, &tmp, 10); if (*length == -1) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } if (*tmp != ' ' || ++tmp >= end) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } @@ -377,11 +386,13 @@ *value = tmp; tmp += *length; if (tmp > end) { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } else if (tmp < end && *tmp != ' ' && *tmp != '\0') { - printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__); + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); return NULL; } tmp++; diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c --- a/arch/ppc64/kernel/prom.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/prom.c 2004-10-26 18:25:18 -07:00 @@ -52,7 +52,6 @@ #include #include #include -#include "open_pic.h" #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -1092,8 +1091,7 @@ * Work out the sense (active-low level / active-high edge) * of each interrupt from the device tree. */ -void __init -prom_get_irq_senses(unsigned char *senses, int off, int max) +void __init prom_get_irq_senses(unsigned char *senses, int off, int max) { struct device_node *np; int i, j; @@ -1105,7 +1103,9 @@ for (j = 0; j < np->n_intrs; j++) { i = np->intrs[j].line; if (i >= off && i < max) - senses[i-off] = np->intrs[j].sense; + senses[i-off] = np->intrs[j].sense ? + IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE : + IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE; } } } @@ -1817,6 +1817,14 @@ of_node_put(child); return -EBUSY; } + + /* XXX This is a layering violation, should be moved to the caller + * --BenH. + */ +#ifdef CONFIG_PPC_PSERIES + if (np->iommu_table) + iommu_free_table(np); +#endif /* CONFIG_PPC_PSERIES */ write_lock(&devtree_lock); OF_MARK_STALE(np); diff -Nru a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c --- a/arch/ppc64/kernel/prom_init.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/prom_init.c 2004-10-26 18:25:18 -07:00 @@ -51,7 +51,6 @@ #include #include #include -#include "open_pic.h" #ifdef CONFIG_LOGO_LINUX_CLUT224 #include @@ -160,8 +159,6 @@ extern unsigned long klimit; -//int global_width = 640, global_height = 480, global_depth = 8, global_pitch; -//unsigned global_address; /* prom structure */ static struct prom_t __initdata prom; @@ -706,46 +703,50 @@ struct prom_t *_prom = PTRRELOC(&prom); phandle prom_rtas; u64 base, entry = 0; - u32 size; + u32 size = 0; prom_debug("prom_instantiate_rtas: start...\n"); prom_rtas = call_prom("finddevice", 1, 1, ADDR("/rtas")); - if (prom_rtas != (phandle) -1) { - prom_getprop(prom_rtas, "rtas-size", &size, sizeof(size)); - if (size != 0) { - base = alloc_down(size, PAGE_SIZE, 0); - if (base == 0) { - prom_printf("RTAS allocation failed !\n"); - return; - } - prom_printf("instantiating rtas at 0x%x", base); + prom_debug("prom_rtas: %x\n", prom_rtas); + if (prom_rtas == (phandle) -1) + return; - prom_rtas = call_prom("open", 1, 1, ADDR("/rtas")); - prom_printf("..."); + prom_getprop(prom_rtas, "rtas-size", &size, sizeof(size)); + if (size == 0) + return; - if (call_prom("call-method", 3, 2, - ADDR("instantiate-rtas"), - prom_rtas, base) != PROM_ERROR) { - entry = (long)_prom->args.rets[1]; - } - if (entry == 0) { - prom_printf(" failed\n"); - return; - } - prom_printf(" done\n"); + base = alloc_down(size, PAGE_SIZE, 0); + if (base == 0) { + prom_printf("RTAS allocation failed !\n"); + return; + } + prom_printf("instantiating rtas at 0x%x", base); - reserve_mem(base, size); - } + prom_rtas = call_prom("open", 1, 1, ADDR("/rtas")); + prom_printf("..."); - prom_setprop(_prom->chosen, "linux,rtas-base", &base, sizeof(base)); - prom_setprop(_prom->chosen, "linux,rtas-entry", &entry, sizeof(entry)); - prom_setprop(_prom->chosen, "linux,rtas-size", &size, sizeof(size)); - - prom_debug("rtas base = 0x%x\n", base); - prom_debug("rtas entry = 0x%x\n", entry); - prom_debug("rtas size = 0x%x\n", (long)size); + if (call_prom("call-method", 3, 2, + ADDR("instantiate-rtas"), + prom_rtas, base) != PROM_ERROR) { + entry = (long)_prom->args.rets[1]; } + if (entry == 0) { + prom_printf(" failed\n"); + return; + } + prom_printf(" done\n"); + + reserve_mem(base, size); + + prom_setprop(_prom->chosen, "linux,rtas-base", &base, sizeof(base)); + prom_setprop(_prom->chosen, "linux,rtas-entry", &entry, sizeof(entry)); + prom_setprop(_prom->chosen, "linux,rtas-size", &size, sizeof(size)); + + prom_debug("rtas base = 0x%x\n", base); + prom_debug("rtas entry = 0x%x\n", entry); + prom_debug("rtas size = 0x%x\n", (long)size); + prom_debug("prom_instantiate_rtas: end...\n"); } @@ -952,9 +953,9 @@ continue; /* Skip non-configured cpus. */ - prom_getprop(node, "status", type, sizeof(type)); - if (strcmp(type, RELOC("okay")) != 0) - continue; + if (prom_getprop(node, "status", type, sizeof(type)) > 0) + if (strcmp(type, RELOC("okay")) != 0) + continue; reg = -1; prom_getprop(node, "reg", ®, sizeof(reg)); @@ -994,7 +995,8 @@ secondary_hold, cpuid); for ( i = 0 ; (i < 100000000) && - (*acknowledge == ((unsigned long)-1)); i++ ) ; + (*acknowledge == ((unsigned long)-1)); i++ ) + mb(); if (*acknowledge == cpuid) { prom_printf("done\n"); @@ -1130,6 +1132,8 @@ if (strstr(p, RELOC("Power Macintosh")) || strstr(p, RELOC("MacRISC4"))) return PLATFORM_POWERMAC; + if (strstr(p, RELOC("Momentum,Maple"))) + return PLATFORM_MAPLE; i += sl + 1; } } @@ -1161,7 +1165,7 @@ * So we check whether we will need to open the display, * and if so, open it now. */ -static unsigned long __init prom_check_displays(void) +static void __init prom_check_displays(void) { unsigned long offset = reloc_offset(); struct prom_t *_prom = PTRRELOC(&prom); diff -Nru a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c --- a/arch/ppc64/kernel/rtas.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/rtas.c 2004-10-26 18:25:17 -07:00 @@ -516,7 +516,6 @@ return 0; } -#ifdef CONFIG_HOTPLUG_CPU /* This version can't take the spinlock, because it never returns */ struct rtas_args rtas_stop_self_args = { @@ -541,7 +540,6 @@ panic("Alas, I survived.\n"); } -#endif /* CONFIG_HOTPLUG_CPU */ /* * Return the firmware-specified size of the error log buffer diff -Nru a/arch/ppc64/kernel/rtas_flash.c b/arch/ppc64/kernel/rtas_flash.c --- a/arch/ppc64/kernel/rtas_flash.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/rtas_flash.c 2004-10-26 18:25:18 -07:00 @@ -562,6 +562,7 @@ validate_flash(args_buf); } + /* The matching atomic_inc was in rtas_excl_open() */ atomic_dec(&dp->count); return 0; @@ -572,7 +573,8 @@ if (dp) { if (dp->data != NULL) kfree(dp->data); - remove_proc_entry(dp->name, NULL); + dp->owner = NULL; + remove_proc_entry(dp->name, dp->parent); } } diff -Nru a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c --- a/arch/ppc64/kernel/rtasd.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/rtasd.c 2004-10-26 18:25:17 -07:00 @@ -275,7 +275,7 @@ * know that we can safely clear the events in NVRAM. * Next we'll sit and wait for something else to log. */ -static ssize_t rtas_log_read(struct file * file, char * buf, +static ssize_t rtas_log_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { int error; diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c --- a/arch/ppc64/kernel/setup.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/setup.c 2004-10-26 18:25:18 -07:00 @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include #include #include @@ -51,6 +53,7 @@ #include #include #include +#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -72,11 +75,14 @@ extern void udbg_init_pmac_realmode(void); /* That's RTAS panel debug */ extern void call_rtas_display_status_delay(unsigned char c); +/* Here's maple real mode debug */ +extern void udbg_init_maple_realmode(void); #define EARLY_DEBUG_INIT() do {} while(0) #if 0 #define EARLY_DEBUG_INIT() udbg_init_debug_lpar() +#define EARLY_DEBUG_INIT() udbg_init_maple_realmode() #define EARLY_DEBUG_INIT() udbg_init_pmac_realmode() #define EARLY_DEBUG_INIT() \ do { ppc_md.udbg_putc = call_rtas_display_status_delay; } while(0) @@ -323,6 +329,7 @@ extern struct machdep_calls pSeries_md; extern struct machdep_calls pmac_md; +extern struct machdep_calls maple_md; /* Ultimately, stuff them in an elf section like initcalls... */ static struct machdep_calls __initdata *machines[] = { @@ -332,6 +339,9 @@ #ifdef CONFIG_PPC_PMAC &pmac_md, #endif /* CONFIG_PPC_PMAC */ +#ifdef CONFIG_PPC_MAPLE + &maple_md, +#endif /* CONFIG_PPC_MAPLE */ NULL }; @@ -630,6 +640,7 @@ printk("naca->debug_switch = 0x%lx\n", naca->debug_switch); printk("naca->interrupt_controller = 0x%ld\n", naca->interrupt_controller); printk("systemcfg = 0x%p\n", systemcfg); + printk("systemcfg->platform = 0x%x\n", systemcfg->platform); printk("systemcfg->processorCount = 0x%lx\n", systemcfg->processorCount); printk("systemcfg->physicalMemorySize = 0x%lx\n", systemcfg->physicalMemorySize); printk("systemcfg->dCacheL1LineSize = 0x%x\n", systemcfg->dCacheL1LineSize); @@ -783,12 +794,11 @@ #ifdef CONFIG_PPC_MULTIPLATFORM static int __init set_preferred_console(void) { - struct device_node *prom_stdout; + struct device_node *prom_stdout = NULL; char *name; + u32 *spd; int offset = 0; -#if 0 - phandle *stdout_ph; -#endif + DBG(" -> set_preferred_console()\n"); /* The user has requested a console so this is already set up. */ @@ -802,20 +812,7 @@ return -ENODEV; } /* We are getting a weird phandle from OF ... */ -#if 0 - stdout_ph = (phandle *)get_property(of_chosen, "linux,stdout-package", NULL); - if (stdout_ph == NULL) { - DBG(" no linux,stdout-package !\n"); - return -ENODEV; - } - prom_stdout = of_find_node_by_phandle(*stdout_ph); - if (!prom_stdout) { - DBG(" can't find stdout package for phandle 0x%x !\n", *stdout_ph); - return -ENODEV; - } -#endif /* ... So use the full path instead */ -#if 1 name = (char *)get_property(of_chosen, "linux,stdout-path", NULL); if (name == NULL) { DBG(" no linux,stdout-path !\n"); @@ -826,7 +823,6 @@ DBG(" can't find stdout package %s !\n", name); return -ENODEV; } -#endif DBG("stdout is %s\n", prom_stdout->full_name); name = (char *)get_property(prom_stdout, "name", NULL); @@ -834,8 +830,12 @@ DBG(" stdout package has no name !\n"); goto not_found; } + spd = (u32 *)get_property(prom_stdout, "current-speed", NULL); - if (strcmp(name, "serial") == 0) { + if (0) + ; +#ifdef CONFIG_SERIAL_8250_CONSOLE + else if (strcmp(name, "serial") == 0) { int i; u32 *reg = (u32 *)get_property(prom_stdout, "reg", &i); if (i > 8) { @@ -858,6 +858,7 @@ } } } +#endif /* CONFIG_SERIAL_8250_CONSOLE */ #ifdef CONFIG_PPC_PSERIES else if (strcmp(name, "vty") == 0) { u32 *reg = (u32 *)get_property(prom_stdout, "reg", NULL); @@ -887,17 +888,24 @@ } } #endif /* CONFIG_PPC_PSERIES */ +#ifdef CONFIG_SERIAL_PMACZILOG_CONSOLE else if (strcmp(name, "ch-a") == 0) offset = 0; else if (strcmp(name, "ch-b") == 0) offset = 1; +#endif /* CONFIG_SERIAL_PMACZILOG_CONSOLE */ else goto not_found; of_node_put(prom_stdout); DBG("Found serial console at ttyS%d\n", offset); - return add_preferred_console("ttyS", offset, NULL); + if (spd) { + char opt[16]; + sprintf(opt, "%d", *spd); + return add_preferred_console("ttyS", offset, opt); + } else + return add_preferred_console("ttyS", offset, NULL); not_found: DBG("No preferred console found !\n"); @@ -1106,15 +1114,209 @@ __setup("decr_overclock_proc0=", set_decr_overclock_proc0 ); __setup("decr_overclock=", set_decr_overclock ); +#ifndef CONFIG_PPC_ISERIES +/* + * This function can be used by platforms to "find" legacy serial ports. + * It works for "serial" nodes under an "isa" node, and will try to + * respect the "ibm,aix-loc" property if any. It works with up to 8 + * ports. + */ + +#define MAX_LEGACY_SERIAL_PORTS 8 +static struct old_serial_port old_serial_ports[MAX_LEGACY_SERIAL_PORTS]; +static unsigned int old_serial_count; + +void __init generic_find_legacy_serial_ports(unsigned int *default_speed) +{ + struct device_node *np; + u32 *sizeprop; + + struct isa_reg_property { + u32 space; + u32 address; + u32 size; + }; + struct pci_reg_property { + struct pci_address addr; + u32 size_hi; + u32 size_lo; + }; + + DBG(" -> generic_find_legacy_serial_port()\n"); + + naca->serialPortAddr = 0; + if (default_speed) + *default_speed = 0; + + np = of_find_node_by_path("/"); + if (!np) + return; + + /* First fill our array */ + for (np = NULL; (np = of_find_node_by_type(np, "serial"));) { + struct device_node *isa, *pci; + struct isa_reg_property *reg; + unsigned long phys_size, addr_size, io_base; + u32 *rangesp; + u32 *interrupts, *clk, *spd; + char *typep; + int index, rlen, rentsize; + + /* Ok, first check if it's under an "isa" parent */ + isa = of_get_parent(np); + if (!isa || strcmp(isa->name, "isa")) { + DBG("%s: no isa parent found\n", np->full_name); + continue; + } + + /* Now look for an "ibm,aix-loc" property that gives us ordering + * if any... + */ + typep = (char *)get_property(np, "ibm,aix-loc", NULL); + + /* Get the ISA port number */ + reg = (struct isa_reg_property *)get_property(np, "reg", NULL); + if (reg == NULL) + goto next_port; + /* We assume the interrupt number isn't translated ... */ + interrupts = (u32 *)get_property(np, "interrupts", NULL); + /* get clock freq. if present */ + clk = (u32 *)get_property(np, "clock-frequency", NULL); + /* get default speed if present */ + spd = (u32 *)get_property(np, "current-speed", NULL); + /* Default to locate at end of array */ + index = old_serial_count; /* end of the array by default */ + + /* If we have a location index, then use it */ + if (typep && *typep == 'S') { + index = simple_strtol(typep+1, NULL, 0) - 1; + /* if index is out of range, use end of array instead */ + if (index >= MAX_LEGACY_SERIAL_PORTS) + index = old_serial_count; + /* if our index is still out of range, that mean that + * array is full, we could scan for a free slot but that + * make little sense to bother, just skip the port + */ + if (index >= MAX_LEGACY_SERIAL_PORTS) + goto next_port; + if (index >= old_serial_count) + old_serial_count = index + 1; + /* Check if there is a port who already claimed our slot */ + if (old_serial_ports[index].port != 0) { + /* if we still have some room, move it, else override */ + if (old_serial_count < MAX_LEGACY_SERIAL_PORTS) { + DBG("Moved legacy port %d -> %d\n", index, + old_serial_count); + old_serial_ports[old_serial_count++] = + old_serial_ports[index]; + } else { + DBG("Replacing legacy port %d\n", index); + } + } + } + if (index >= MAX_LEGACY_SERIAL_PORTS) + goto next_port; + if (index >= old_serial_count) + old_serial_count = index + 1; + + /* Now fill the entry */ + memset(&old_serial_ports[index], 0, sizeof(struct old_serial_port)); + old_serial_ports[index].uart = 0; + old_serial_ports[index].baud_base = clk ? (*clk / 16) : BASE_BAUD; + old_serial_ports[index].port = reg->address; + old_serial_ports[index].irq = interrupts ? interrupts[0] : 0; + old_serial_ports[index].flags = ASYNC_BOOT_AUTOCONF; + + DBG("Added legacy port, index: %d, port: %x, irq: %d, clk: %d\n", + index, + old_serial_ports[index].port, + old_serial_ports[index].irq, + old_serial_ports[index].baud_base * 16); + + /* Get phys address of IO reg for port 1 */ + if (index != 0) + goto next_port; + + pci = of_get_parent(isa); + if (!pci) { + DBG("%s: no pci parent found\n", np->full_name); + goto next_port; + } + + rangesp = (u32 *)get_property(pci, "ranges", &rlen); + if (rangesp == NULL) { + of_node_put(pci); + goto next_port; + } + rlen /= 4; + + /* we need the #size-cells of the PCI bridge node itself */ + phys_size = 1; + sizeprop = (u32 *)get_property(pci, "#size-cells", NULL); + if (sizeprop != NULL) + phys_size = *sizeprop; + /* we need the parent #addr-cells */ + addr_size = prom_n_addr_cells(pci); + rentsize = 3 + addr_size + phys_size; + io_base = 0; + for (;rlen >= rentsize; rlen -= rentsize,rangesp += rentsize) { + if (((rangesp[0] >> 24) & 0x3) != 1) + continue; /* not IO space */ + io_base = rangesp[3]; + if (addr_size == 2) + io_base = (io_base << 32) | rangesp[4]; + } + if (io_base != 0) { + naca->serialPortAddr = io_base + reg->address; + if (default_speed && spd) + *default_speed = *spd; + } + of_node_put(pci); + next_port: + of_node_put(isa); + } + + DBG(" <- generic_find_legacy_serial_port()\n"); +} + +struct old_serial_port *get_legacy_serial_ports(unsigned int *count) +{ + *count = old_serial_count; + return old_serial_ports; +} +#else +struct old_serial_port *get_legacy_serial_ports(unsigned int *count) +{ + *count = 0; + return 0; +} +#endif /* CONFIG_PPC_ISERIES */ +EXPORT_SYMBOL(get_legacy_serial_ports); + +int check_legacy_ioport(unsigned long base_port) +{ + if (ppc_md.check_legacy_ioport == NULL) + return 0; + return ppc_md.check_legacy_ioport(base_port); +} +EXPORT_SYMBOL(check_legacy_ioport); + #ifdef CONFIG_XMON static int __init early_xmon(char *p) { /* ensure xmon is enabled */ xmon_init(); - debugger(0); + debugger(NULL); return 0; } early_param("xmon", early_xmon); #endif +void cpu_die(void) +{ + if (ppc_md.cpu_die) + ppc_md.cpu_die(); + local_irq_disable(); + for (;;); +} diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c --- a/arch/ppc64/kernel/smp.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/smp.c 2004-10-26 18:25:18 -07:00 @@ -43,18 +43,14 @@ #include #include #include -#include -#include -#include #include #include -#include "open_pic.h" #include -#include #include #include -#include -#include +#include + +#include "mpic.h" #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -88,113 +84,9 @@ /* Low level assembly function used to backup CPU 0 state */ extern void __save_cpu_setup(void); -extern void pseries_secondary_smp_init(unsigned long); - -#ifdef CONFIG_PPC_ISERIES -static unsigned long iSeries_smp_message[NR_CPUS]; - -void iSeries_smp_message_recv( struct pt_regs * regs ) -{ - int cpu = smp_processor_id(); - int msg; - - if ( num_online_cpus() < 2 ) - return; - - for ( msg = 0; msg < 4; ++msg ) - if ( test_and_clear_bit( msg, &iSeries_smp_message[cpu] ) ) - smp_message_recv( msg, regs ); -} - -static inline void smp_iSeries_do_message(int cpu, int msg) -{ - set_bit(msg, &iSeries_smp_message[cpu]); - HvCall_sendIPI(&(paca[cpu])); -} - -static void smp_iSeries_message_pass(int target, int msg) -{ - int i; - - if (target < NR_CPUS) - smp_iSeries_do_message(target, msg); - else { - for_each_online_cpu(i) { - if (target == MSG_ALL_BUT_SELF - && i == smp_processor_id()) - continue; - smp_iSeries_do_message(i, msg); - } - } -} - -static int smp_iSeries_numProcs(void) -{ - unsigned np, i; - - np = 0; - for (i=0; i < NR_CPUS; ++i) { - if (paca[i].lppaca.xDynProcStatus < 2) { - cpu_set(i, cpu_possible_map); - cpu_set(i, cpu_present_map); - ++np; - } - } - return np; -} - -static int smp_iSeries_probe(void) -{ - unsigned i; - unsigned np = 0; - - for (i=0; i < NR_CPUS; ++i) { - if (paca[i].lppaca.xDynProcStatus < 2) { - /*paca[i].active = 1;*/ - ++np; - } - } - - return np; -} - -static void smp_iSeries_kick_cpu(int nr) -{ - BUG_ON(nr < 0 || nr >= NR_CPUS); - - /* Verify that our partition has a processor nr */ - if (paca[nr].lppaca.xDynProcStatus >= 2) - return; - - /* The processor is currently spinning, waiting - * for the cpu_start field to become non-zero - * After we set cpu_start, the processor will - * continue on to secondary_start in iSeries_head.S - */ - paca[nr].cpu_start = 1; -} - -static void __devinit smp_iSeries_setup_cpu(int nr) -{ -} - -static struct smp_ops_t iSeries_smp_ops = { - .message_pass = smp_iSeries_message_pass, - .probe = smp_iSeries_probe, - .kick_cpu = smp_iSeries_kick_cpu, - .setup_cpu = smp_iSeries_setup_cpu, -}; - -/* This is called very early. */ -void __init smp_init_iSeries(void) -{ - smp_ops = &iSeries_smp_ops; - systemcfg->processorCount = smp_iSeries_numProcs(); -} -#endif #ifdef CONFIG_PPC_MULTIPLATFORM -void smp_openpic_message_pass(int target, int msg) +void smp_mpic_message_pass(int target, int msg) { /* make sure we're sending something that translates to an IPI */ if ( msg > 0x3 ){ @@ -205,242 +97,52 @@ switch ( target ) { case MSG_ALL: - openpic_cause_IPI(msg, 0xffffffff); + mpic_send_ipi(msg, 0xffffffff); break; case MSG_ALL_BUT_SELF: - openpic_cause_IPI(msg, - 0xffffffff & ~(1 << smp_processor_id())); + mpic_send_ipi(msg, 0xffffffff & ~(1 << smp_processor_id())); break; default: - openpic_cause_IPI(msg, 1< 1) - openpic_request_IPIs(); + mpic_request_ipis(); return nr_cpus; } -static void __devinit smp_openpic_setup_cpu(int cpu) -{ - do_openpic_setup_cpu(); -} - -#endif /* CONFIG_PPC_MULTIPLATFORM */ - -#ifdef CONFIG_PPC_PSERIES - -/* Get state of physical CPU. - * Return codes: - * 0 - The processor is in the RTAS stopped state - * 1 - stop-self is in progress - * 2 - The processor is not in the RTAS stopped state - * -1 - Hardware Error - * -2 - Hardware Busy, Try again later. - */ -int query_cpu_stopped(unsigned int pcpu) -{ - int cpu_status; - int status, qcss_tok; - - DBG(" -> query_cpu_stopped(%d)\n", pcpu); - qcss_tok = rtas_token("query-cpu-stopped-state"); - if (qcss_tok == RTAS_UNKNOWN_SERVICE) - return -1; - status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu); - if (status != 0) { - printk(KERN_ERR - "RTAS query-cpu-stopped-state failed: %i\n", status); - return status; - } - - DBG(" <- query_cpu_stopped(), status: %d\n", cpu_status); - - return cpu_status; -} - -#ifdef CONFIG_HOTPLUG_CPU - -int __cpu_disable(void) +void __devinit smp_mpic_setup_cpu(int cpu) { - /* FIXME: go put this in a header somewhere */ - extern void xics_migrate_irqs_away(void); - - systemcfg->processorCount--; - - /*fix boot_cpuid here*/ - if (smp_processor_id() == boot_cpuid) - boot_cpuid = any_online_cpu(cpu_online_map); - - /* FIXME: abstract this to not be platform specific later on */ - xics_migrate_irqs_away(); - return 0; + mpic_setup_this_cpu(); } -void __cpu_die(unsigned int cpu) -{ - int tries; - int cpu_status; - unsigned int pcpu = get_hard_smp_processor_id(cpu); - - for (tries = 0; tries < 25; tries++) { - cpu_status = query_cpu_stopped(pcpu); - if (cpu_status == 0 || cpu_status == -1) - break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/5); - } - if (cpu_status != 0) { - printk("Querying DEAD? cpu %i (%i) shows %i\n", - cpu, pcpu, cpu_status); - } - - /* Isolation and deallocation are definatly done by - * drslot_chrp_cpu. If they were not they would be - * done here. Change isolate state to Isolate and - * change allocation-state to Unusable. - */ - paca[cpu].cpu_start = 0; - - /* So we can recognize if it fails to come up next time. */ - cpu_callin_map[cpu] = 0; -} - -/* Kill this cpu */ -void cpu_die(void) -{ - local_irq_disable(); - /* Some hardware requires clearing the CPPR, while other hardware does not - * it is safe either way - */ - pSeriesLP_cppr_info(0, 0); - rtas_stop_self(); - /* Should never get here... */ - BUG(); - for(;;); -} - -/* Search all cpu device nodes for an offline logical cpu. If a - * device node has a "ibm,my-drc-index" property (meaning this is an - * LPAR), paranoid-check whether we own the cpu. For each "thread" - * of a cpu, if it is offline and has the same hw index as before, - * grab that in preference. - */ -static unsigned int find_physical_cpu_to_start(unsigned int old_hwindex) -{ - struct device_node *np = NULL; - unsigned int best = -1U; - - while ((np = of_find_node_by_type(np, "cpu"))) { - int nr_threads, len; - u32 *index = (u32 *)get_property(np, "ibm,my-drc-index", NULL); - u32 *tid = (u32 *) - get_property(np, "ibm,ppc-interrupt-server#s", &len); - - if (!tid) - tid = (u32 *)get_property(np, "reg", &len); - - if (!tid) - continue; - - /* If there is a drc-index, make sure that we own - * the cpu. - */ - if (index) { - int state; - int rc = rtas_get_sensor(9003, *index, &state); - if (rc != 0 || state != 1) - continue; - } - - nr_threads = len / sizeof(u32); - - while (nr_threads--) { - if (0 == query_cpu_stopped(tid[nr_threads])) { - best = tid[nr_threads]; - if (best == old_hwindex) - goto out; - } - } - } -out: - of_node_put(np); - return best; -} - -/** - * smp_startup_cpu() - start the given cpu - * - * At boot time, there is nothing to do. At run-time, call RTAS with - * the appropriate start location, if the cpu is in the RTAS stopped - * state. - * - * Returns: - * 0 - failure - * 1 - success - */ -static inline int __devinit smp_startup_cpu(unsigned int lcpu) -{ - int status; - unsigned long start_here = __pa((u32)*((unsigned long *) - pseries_secondary_smp_init)); - unsigned int pcpu; - - /* At boot time the cpus are already spinning in hold - * loops, so nothing to do. */ - if (system_state < SYSTEM_RUNNING) - return 1; - - pcpu = find_physical_cpu_to_start(get_hard_smp_processor_id(lcpu)); - if (pcpu == -1U) { - printk(KERN_INFO "No more cpus available, failing\n"); - return 0; - } - - /* Fixup atomic count: it exited inside IRQ handler. */ - paca[lcpu].__current->thread_info->preempt_count = 0; - - /* At boot this is done in prom.c. */ - paca[lcpu].hw_cpu_id = pcpu; - - status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL, - pcpu, start_here, lcpu); - if (status != 0) { - printk(KERN_ERR "start-cpu failed: %i\n", status); - return 0; - } - return 1; -} -#else /* ... CONFIG_HOTPLUG_CPU */ -static inline int __devinit smp_startup_cpu(unsigned int lcpu) -{ - return 1; -} -#endif /* CONFIG_HOTPLUG_CPU */ - -static void smp_pSeries_kick_cpu(int nr) +void __devinit smp_generic_kick_cpu(int nr) { BUG_ON(nr < 0 || nr >= NR_CPUS); - if (!smp_startup_cpu(nr)) - return; - /* * The processor is currently spinning, waiting for the * cpu_start field to become non-zero After we set cpu_start, * the processor will continue on to secondary_start */ paca[nr].cpu_start = 1; + mb(); } -#endif /* CONFIG_PPC_PSERIES */ + +#endif /* CONFIG_PPC_MULTIPLATFORM */ static void __init smp_space_timers(unsigned int max_cpus) { @@ -457,136 +159,6 @@ } } -#ifdef CONFIG_PPC_PSERIES -static void vpa_init(int cpu) -{ - unsigned long flags, pcpu = get_hard_smp_processor_id(cpu); - - /* Register the Virtual Processor Area (VPA) */ - flags = 1UL << (63 - 18); - register_vpa(flags, pcpu, __pa((unsigned long)&(paca[cpu].lppaca))); -} - -static inline void smp_xics_do_message(int cpu, int msg) -{ - set_bit(msg, &xics_ipi_message[cpu].value); - mb(); - xics_cause_IPI(cpu); -} - -static void smp_xics_message_pass(int target, int msg) -{ - unsigned int i; - - if (target < NR_CPUS) { - smp_xics_do_message(target, msg); - } else { - for_each_online_cpu(i) { - if (target == MSG_ALL_BUT_SELF - && i == smp_processor_id()) - continue; - smp_xics_do_message(i, msg); - } - } -} - -extern void xics_request_IPIs(void); - -static int __init smp_xics_probe(void) -{ -#ifdef CONFIG_SMP - xics_request_IPIs(); -#endif - - return cpus_weight(cpu_possible_map); -} - -static void __devinit smp_xics_setup_cpu(int cpu) -{ - if (cpu != boot_cpuid) - xics_setup_cpu(); -} - -static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED; -static unsigned long timebase = 0; - -static void __devinit pSeries_give_timebase(void) -{ - spin_lock(&timebase_lock); - rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL); - timebase = get_tb(); - spin_unlock(&timebase_lock); - - while (timebase) - barrier(); - rtas_call(rtas_token("thaw-time-base"), 0, 1, NULL); -} - -static void __devinit pSeries_take_timebase(void) -{ - while (!timebase) - barrier(); - spin_lock(&timebase_lock); - set_tb(timebase >> 32, timebase & 0xffffffff); - timebase = 0; - spin_unlock(&timebase_lock); -} - -static struct smp_ops_t pSeries_openpic_smp_ops = { - .message_pass = smp_openpic_message_pass, - .probe = smp_openpic_probe, - .kick_cpu = smp_pSeries_kick_cpu, - .setup_cpu = smp_openpic_setup_cpu, -}; - -static struct smp_ops_t pSeries_xics_smp_ops = { - .message_pass = smp_xics_message_pass, - .probe = smp_xics_probe, - .kick_cpu = smp_pSeries_kick_cpu, - .setup_cpu = smp_xics_setup_cpu, -}; - -/* This is called very early */ -void __init smp_init_pSeries(void) -{ - int ret, i; - - DBG(" -> smp_init_pSeries()\n"); - - if (naca->interrupt_controller == IC_OPEN_PIC) - smp_ops = &pSeries_openpic_smp_ops; - else - smp_ops = &pSeries_xics_smp_ops; - - /* Start secondary threads on SMT systems; primary threads - * are already in the running state. - */ - for_each_present_cpu(i) { - if (query_cpu_stopped(get_hard_smp_processor_id(i)) == 0) { - printk("%16.16x : starting thread\n", i); - DBG("%16.16x : starting thread\n", i); - rtas_call(rtas_token("start-cpu"), 3, 1, &ret, - get_hard_smp_processor_id(i), - __pa((u32)*((unsigned long *) - pseries_secondary_smp_init)), - i); - } - } - - if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) - vpa_init(boot_cpuid); - - /* Non-lpar has additional take/give timebase */ - if (systemcfg->platform == PLATFORM_PSERIES) { - smp_ops->give_timebase = pSeries_give_timebase; - smp_ops->take_timebase = pSeries_take_timebase; - } - - - DBG(" <- smp_init_pSeries()\n"); -} -#endif /* CONFIG_PPC_PSERIES */ - void smp_local_timer_interrupt(struct pt_regs * regs) { update_process_times(user_mode(regs)); @@ -809,6 +381,8 @@ { unsigned int cpu; + DBG("smp_prepare_cpus\n"); + /* * setup_cpu may need to be called on the boot cpu. We havent * spun any cpus up but lets be paranoid. @@ -833,9 +407,6 @@ max_cpus = smp_ops->probe(); - /* Backup CPU 0 state if necessary */ - __save_cpu_setup(); - smp_space_timers(max_cpus); for_each_cpu(cpu) @@ -876,6 +447,11 @@ paca[cpu].stab_real = virt_to_abs(tmp); } + /* Make sure callin-map entry is 0 (can be leftover a CPU + * hotplug + */ + cpu_callin_map[cpu] = 0; + /* The information for processor bringup must * be written out to main store before we release * the processor. @@ -883,6 +459,7 @@ mb(); /* wake up cpus */ + DBG("smp: kicking cpu %d\n", cpu); smp_ops->kick_cpu(cpu); /* @@ -922,7 +499,7 @@ return 0; } -extern unsigned int default_distrib_server; + /* Activate a secondary processor. */ int __devinit start_secondary(void *unused) { @@ -939,20 +516,8 @@ if (smp_ops->take_timebase) smp_ops->take_timebase(); -#ifdef CONFIG_PPC_PSERIES - if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { - vpa_init(cpu); - } - -#ifdef CONFIG_IRQ_ALL_CPUS - /* Put the calling processor into the GIQ. This is really only - * necessary from a secondary thread as the OF start-cpu interface - * performs this function for us on primary threads. - */ - /* TODO: 9005 is #defined in rtas-proc.c -- move to a header */ - rtas_set_indicator(9005, default_distrib_server, 1); -#endif -#endif + if (smp_ops->late_setup_cpu) + smp_ops->late_setup_cpu(cpu); spin_lock(&call_lock); cpu_set(cpu, cpu_online_map); diff -Nru a/arch/ppc64/kernel/u3_iommu.c b/arch/ppc64/kernel/u3_iommu.c --- a/arch/ppc64/kernel/u3_iommu.c 2004-10-26 18:25:19 -07:00 +++ b/arch/ppc64/kernel/u3_iommu.c 2004-10-26 18:25:19 -07:00 @@ -267,6 +267,7 @@ void iommu_setup_u3(void) { + struct pci_controller *phb, *tmp; struct pci_dev *dev = NULL; struct device_node *dn; @@ -298,6 +299,11 @@ struct device_node *dn = pci_device_to_OF_node(dev); if (dn) dn->iommu_table = &iommu_table_u3; + } + /* We also make sure we set all PHBs ... */ + list_for_each_entry_safe(phb, tmp, &hose_list, list_node) { + dn = (struct device_node *)phb->arch_data; + dn->iommu_table = &iommu_table_u3; } } diff -Nru a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c --- a/arch/ppc64/kernel/udbg.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/udbg.c 2004-10-26 18:25:17 -07:00 @@ -11,6 +11,8 @@ #include #define WANT_PPCDBG_TAB /* Only defined here */ +#include +#include #include #include #include @@ -20,6 +22,9 @@ #include #include +extern u8 real_readb(volatile u8 __iomem *addr); +extern void real_writeb(u8 data, volatile u8 __iomem *addr); + struct NS16550 { /* this struct must be packed */ unsigned char rbr; /* 0 */ @@ -47,21 +52,36 @@ #define LSR_TEMT 0x40 /* Xmitter empty */ #define LSR_ERR 0x80 /* Error */ -static volatile struct NS16550 *udbg_comport; +static volatile struct NS16550 __iomem *udbg_comport; -void udbg_init_uart(void *comport) +void udbg_init_uart(void __iomem *comport, unsigned int speed) { + u8 dll = 12; + + switch(speed) { + case 115200: + dll = 1; + break; + case 57600: + dll = 2; + break; + case 38400: + dll = 3; + break; + } if (comport) { - udbg_comport = (struct NS16550 *)comport; - udbg_comport->lcr = 0x00; eieio(); - udbg_comport->ier = 0xFF; eieio(); - udbg_comport->ier = 0x00; eieio(); - udbg_comport->lcr = 0x80; eieio(); /* Access baud rate */ - udbg_comport->dll = 12; eieio(); /* 1 = 115200, 2 = 57600, 3 = 38400, 12 = 9600 baud */ - udbg_comport->dlm = 0; eieio(); /* dll >> 8 which should be zero for fast rates; */ - udbg_comport->lcr = 0x03; eieio(); /* 8 data, 1 stop, no parity */ - udbg_comport->mcr = 0x03; eieio(); /* RTS/DTR */ - udbg_comport->fcr = 0x07; eieio(); /* Clear & enable FIFOs */ + udbg_comport = (struct NS16550 __iomem *)comport; + out_8(&udbg_comport->lcr, 0x00); + out_8(&udbg_comport->ier, 0xff); + out_8(&udbg_comport->ier, 0x00); + out_8(&udbg_comport->lcr, 0x80); /* Access baud rate */ + out_8(&udbg_comport->dll, dll); /* 1 = 115200, 2 = 57600, + 3 = 38400, 12 = 9600 baud */ + out_8(&udbg_comport->dlm, 0x00); /* dll >> 8 which should be zero + for fast rates; */ + out_8(&udbg_comport->lcr, 0x03); /* 8 data, 1 stop, no parity */ + out_8(&udbg_comport->mcr, 0x03); /* RTS/DTR */ + out_8(&udbg_comport->fcr ,0x07); /* Clear & enable FIFOs */ } } @@ -70,7 +90,8 @@ #define SCC_TXRDY 4 #define SCC_RXRDY 1 -static volatile u8 *sccc, *sccd; +static volatile u8 __iomem *sccc; +static volatile u8 __iomem *sccd; static unsigned char scc_inittab[] = { 13, 0, /* set baud rate divisor */ @@ -109,7 +130,7 @@ /* Setup for 57600 8N1 */ addr += 0x20; - sccc = (volatile u8 *) ioremap(addr & PAGE_MASK, PAGE_SIZE) ; + sccc = (volatile u8 * __iomem) ioremap(addr & PAGE_MASK, PAGE_SIZE) ; sccc += addr & ~PAGE_MASK; sccd = sccc + 0x10; @@ -117,13 +138,11 @@ mb(); for (i = 20000; i != 0; --i) - x = *sccc; eieio(); - *sccc = 9; eieio(); /* reset A or B side */ - *sccc = 0xc0; eieio(); - for (i = 0; i < sizeof(scc_inittab); ++i) { - *sccc = scc_inittab[i]; - eieio(); - } + x = in_8(sccc); + out_8(sccc, 0x09); /* reset A or B side */ + out_8(sccc, 0xc0); + for (i = 0; i < sizeof(scc_inittab); ++i) + out_8(sccc, scc_inittab[i]); ppc_md.udbg_putc = udbg_putc; ppc_md.udbg_getc = udbg_getc; @@ -135,9 +154,6 @@ #endif /* CONFIG_PPC_PMAC */ #if CONFIG_PPC_PMAC -extern u8 real_readb(volatile u8 *addr); -extern void real_writeb(u8 data, volatile u8 *addr); - static void udbg_real_putc(unsigned char c) { while ((real_readb(sccc) & SCC_TXRDY) == 0) @@ -149,8 +165,8 @@ void udbg_init_pmac_realmode(void) { - sccc = (volatile u8 *)0x80013020ul; - sccd = (volatile u8 *)0x80013030ul; + sccc = (volatile u8 __iomem *)0x80013020ul; + sccd = (volatile u8 __iomem *)0x80013030ul; ppc_md.udbg_putc = udbg_real_putc; ppc_md.udbg_getc = NULL; @@ -158,25 +174,50 @@ } #endif /* CONFIG_PPC_PMAC */ -void udbg_putc(unsigned char c) +#ifdef CONFIG_PPC_MAPLE +void udbg_maple_real_putc(unsigned char c) { if (udbg_comport) { - while ((udbg_comport->lsr & LSR_THRE) == 0) + while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) /* wait for idle */; - udbg_comport->thr = c; eieio(); + real_writeb(c, &udbg_comport->thr); eieio(); if (c == '\n') { /* Also put a CR. This is for convenience. */ - while ((udbg_comport->lsr & LSR_THRE) == 0) + while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) /* wait for idle */; - udbg_comport->thr = '\r'; eieio(); + real_writeb('\r', &udbg_comport->thr); eieio(); + } + } +} + +void udbg_init_maple_realmode(void) +{ + udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8; + + ppc_md.udbg_putc = udbg_maple_real_putc; + ppc_md.udbg_getc = NULL; + ppc_md.udbg_getc_poll = NULL; +} +#endif /* CONFIG_PPC_MAPLE */ + +void udbg_putc(unsigned char c) +{ + if (udbg_comport) { + while ((in_8(&udbg_comport->lsr) & LSR_THRE) == 0) + /* wait for idle */; + out_8(&udbg_comport->thr, c); + if (c == '\n') { + /* Also put a CR. This is for convenience. */ + while ((in_8(&udbg_comport->lsr) & LSR_THRE) == 0) + /* wait for idle */; + out_8(&udbg_comport->thr, '\r'); } } #ifdef CONFIG_PPC_PMAC else if (sccc) { - while ((*sccc & SCC_TXRDY) == 0) - eieio(); - *sccd = c; - eieio(); + while ((in_8(sccc) & SCC_TXRDY) == 0) + ; + out_8(sccd, c); if (c == '\n') udbg_putc('\r'); } @@ -186,16 +227,15 @@ int udbg_getc_poll(void) { if (udbg_comport) { - if ((udbg_comport->lsr & LSR_DR) != 0) - return udbg_comport->rbr; + if ((in_8(&udbg_comport->lsr) & LSR_DR) != 0) + return in_8(&udbg_comport->rbr); else return -1; } #ifdef CONFIG_PPC_PMAC else if (sccc) { - eieio(); - if ((*sccc & SCC_RXRDY) != 0) - return *sccd; + if ((in_8(sccc) & SCC_RXRDY) != 0) + return in_8(sccd); else return -1; } @@ -206,16 +246,15 @@ unsigned char udbg_getc(void) { if (udbg_comport) { - while ((udbg_comport->lsr & LSR_DR) == 0) + while ((in_8(&udbg_comport->lsr) & LSR_DR) == 0) /* wait for char */; - return udbg_comport->rbr; + return in_8(&udbg_comport->rbr); } #ifdef CONFIG_PPC_PMAC else if (sccc) { - eieio(); - while ((*sccc & SCC_RXRDY) == 0) - eieio(); - return *sccd; + while ((in_8(sccc) & SCC_RXRDY) == 0) + ; + return in_8(sccd); } #endif /* CONFIG_PPC_PMAC */ return 0; diff -Nru a/arch/ppc64/kernel/vecemu.c b/arch/ppc64/kernel/vecemu.c --- a/arch/ppc64/kernel/vecemu.c 2004-10-26 18:25:17 -07:00 +++ b/arch/ppc64/kernel/vecemu.c 2004-10-26 18:25:17 -07:00 @@ -263,7 +263,7 @@ unsigned int va, vb, vc, vd; vector128 *vrs; - if (get_user(instr, (unsigned int *) regs->nip)) + if (get_user(instr, (unsigned int __user *) regs->nip)) return -EFAULT; if ((instr >> 26) != 4) return -EINVAL; /* not an altivec instruction */ diff -Nru a/arch/ppc64/kernel/xics.c b/arch/ppc64/kernel/xics.c --- a/arch/ppc64/kernel/xics.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/kernel/xics.c 2004-10-26 18:25:18 -07:00 @@ -85,7 +85,7 @@ } qirr; }; -static struct xics_ipl *xics_per_cpu[NR_CPUS]; +static struct xics_ipl __iomem *xics_per_cpu[NR_CPUS]; static int xics_irq_8259_cascade = 0; static int xics_irq_8259_cascade_real = 0; @@ -116,22 +116,22 @@ static int pSeries_xirr_info_get(int n_cpu) { - return xics_per_cpu[n_cpu]->xirr.word; + return in_be32(&xics_per_cpu[n_cpu]->xirr.word); } static void pSeries_xirr_info_set(int n_cpu, int value) { - xics_per_cpu[n_cpu]->xirr.word = value; + out_be32(&xics_per_cpu[n_cpu]->xirr.word, value); } static void pSeries_cppr_info(int n_cpu, u8 value) { - xics_per_cpu[n_cpu]->xirr.bytes[0] = value; + out_8(&xics_per_cpu[n_cpu]->xirr.bytes[0], value); } static void pSeries_qirr_info(int n_cpu, u8 value) { - xics_per_cpu[n_cpu]->qirr.bytes[0] = value; + out_8(&xics_per_cpu[n_cpu]->qirr.bytes[0], value); } static xics_ops pSeries_ops = { @@ -457,7 +457,7 @@ struct xics_interrupt_node { unsigned long addr; unsigned long size; - } inodes[NR_CPUS]; + } intnodes[NR_CPUS]; ppc64_boot_msg(0x20, "XICS Init"); @@ -484,13 +484,13 @@ panic("xics_init_IRQ: can't find interrupt reg property"); while (ilen) { - inodes[indx].addr = (unsigned long long)*ireg++ << 32; + intnodes[indx].addr = (unsigned long)*ireg++ << 32; ilen -= sizeof(uint); - inodes[indx].addr |= *ireg++; + intnodes[indx].addr |= *ireg++; ilen -= sizeof(uint); - inodes[indx].size = (unsigned long long)*ireg++ << 32; + intnodes[indx].size = (unsigned long)*ireg++ << 32; ilen -= sizeof(uint); - inodes[indx].size |= *ireg++; + intnodes[indx].size |= *ireg++; ilen -= sizeof(uint); indx++; if (indx >= NR_CPUS) break; @@ -505,7 +505,8 @@ np = of_find_node_by_type(np, "cpu")) { ireg = (uint *)get_property(np, "reg", &ilen); if (ireg && ireg[0] == hard_smp_processor_id()) { - ireg = (uint *)get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen); + ireg = (uint *)get_property(np, "ibm,ppc-interrupt-gserver#s", + &ilen); i = ilen / sizeof(int); if (ireg && i > 0) { default_server = ireg[0]; @@ -516,8 +517,8 @@ } of_node_put(np); - intr_base = inodes[0].addr; - intr_size = (ulong)inodes[0].size; + intr_base = intnodes[0].addr; + intr_size = intnodes[0].size; np = of_find_node_by_type(NULL, "interrupt-controller"); if (!np) { @@ -538,16 +539,18 @@ if (systemcfg->platform == PLATFORM_PSERIES) { #ifdef CONFIG_SMP for_each_cpu(i) { + int hard_id; + /* FIXME: Do this dynamically! --RR */ if (!cpu_present(i)) continue; - xics_per_cpu[i] = __ioremap((ulong)inodes[get_hard_smp_processor_id(i)].addr, - (ulong)inodes[get_hard_smp_processor_id(i)].size, - _PAGE_NO_CACHE); + + hard_id = get_hard_smp_processor_id(i); + xics_per_cpu[i] = ioremap(intnodes[hard_id].addr, + intnodes[hard_id].size); } #else - xics_per_cpu[0] = __ioremap((ulong)intr_base, intr_size, - _PAGE_NO_CACHE); + xics_per_cpu[0] = ioremap(intr_base, intr_size); #endif /* CONFIG_SMP */ } else if (systemcfg->platform == PLATFORM_PSERIES_LPAR) { ops = &pSeriesLP_ops; @@ -578,7 +581,7 @@ no_action, 0, "8259 cascade", NULL)) printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 " "cascade\n"); - i8259_init(); + i8259_init(0); } return 0; } diff -Nru a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c --- a/arch/ppc64/mm/hash_utils.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/mm/hash_utils.c 2004-10-26 18:25:18 -07:00 @@ -401,7 +401,7 @@ info.si_signo = SIGBUS; info.si_errno = 0; info.si_code = BUS_ADRERR; - info.si_addr = (void *)address; + info.si_addr = (void __user *)address; force_sig_info(SIGBUS, &info, current); return; } diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c --- a/arch/ppc64/mm/hugetlbpage.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/mm/hugetlbpage.c 2004-10-26 18:25:18 -07:00 @@ -249,7 +249,7 @@ { if (within_hugepage_high_range(addr, len)) return 0; - else if ((addr < 0x100000000) && ((addr+len) < 0x100000000)) { + else if ((addr < 0x100000000UL) && ((addr+len) < 0x100000000UL)) { int err; /* Yes, we need both tests, in case addr+len overflows * 64-bit arithmetic */ diff -Nru a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c --- a/arch/ppc64/mm/init.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/mm/init.c 2004-10-26 18:25:18 -07:00 @@ -263,7 +263,8 @@ */ ; } else { - area = im_get_area(ea, size, IM_REGION_UNUSED|IM_REGION_SUBSET); + area = im_get_area(ea, size, + IM_REGION_UNUSED|IM_REGION_SUBSET|IM_REGION_EXISTS); if (area == NULL) { /* Expected when PHB-dlpar is in play */ return 1; @@ -873,14 +874,14 @@ local_irq_restore(flags); } -void * reserve_phb_iospace(unsigned long size) +void __iomem * reserve_phb_iospace(unsigned long size) { - void *virt_addr; + void __iomem *virt_addr; if (phbs_io_bot >= IMALLOC_BASE) panic("reserve_phb_iospace(): phb io space overflow\n"); - virt_addr = (void *) phbs_io_bot; + virt_addr = (void __iomem *) phbs_io_bot; phbs_io_bot += size; return virt_addr; diff -Nru a/arch/ppc64/xmon/start.c b/arch/ppc64/xmon/start.c --- a/arch/ppc64/xmon/start.c 2004-10-26 18:25:19 -07:00 +++ b/arch/ppc64/xmon/start.c 2004-10-26 18:25:19 -07:00 @@ -173,7 +173,7 @@ c = xmon_getchar(); if (c == -1) { if (p == str) - return 0; + return NULL; break; } *p++ = c; diff -Nru a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c --- a/arch/ppc64/xmon/xmon.c 2004-10-26 18:25:18 -07:00 +++ b/arch/ppc64/xmon/xmon.c 2004-10-26 18:25:18 -07:00 @@ -645,7 +645,7 @@ for (i = 0; i < NBPTS; ++i, ++bp) if (bp->enabled && pc == bp->address) return bp; - return 0; + return NULL; } static struct bpt *in_breakpoint_table(unsigned long nip, unsigned long *offp) @@ -1582,7 +1582,7 @@ extern char dec_exc; void -super_regs() +super_regs(void) { int cmd; unsigned long val; @@ -1816,7 +1816,7 @@ ""; void -memex() +memex(void) { int cmd, inc, i, nslash; unsigned long n; @@ -1967,7 +1967,7 @@ } int -bsesc() +bsesc(void) { int c; @@ -1985,7 +1985,7 @@ || ('a' <= (c) && (c) <= 'f') \ || ('A' <= (c) && (c) <= 'F')) void -dump() +dump(void) { int c; @@ -2150,7 +2150,7 @@ static unsigned mask; void -memlocate() +memlocate(void) { unsigned a, n; unsigned char val[4]; @@ -2183,7 +2183,7 @@ static unsigned long mlim = 0xffffffff; void -memzcan() +memzcan(void) { unsigned char v; unsigned a; @@ -2212,7 +2212,7 @@ /* Input scanning routines */ int -skipbl() +skipbl(void) { int c; @@ -2237,8 +2237,7 @@ }; int -scanhex(vp) -unsigned long *vp; +scanhex(unsigned long *vp) { int c, d; unsigned long v; @@ -2322,7 +2321,7 @@ } void -scannl() +scannl(void) { int c; @@ -2365,13 +2364,13 @@ static char *lineptr; void -flush_input() +flush_input(void) { lineptr = NULL; } int -inchar() +inchar(void) { if (lineptr == NULL || *lineptr == 0) { if (fgets(line, sizeof(line), stdin) == NULL) { @@ -2384,8 +2383,7 @@ } void -take_input(str) -char *str; +take_input(char *str) { lineptr = str; } diff -Nru a/arch/s390/defconfig b/arch/s390/defconfig --- a/arch/s390/defconfig 2004-10-26 18:25:18 -07:00 +++ b/arch/s390/defconfig 2004-10-26 18:25:18 -07:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc3 -# Fri Oct 8 19:17:35 2004 +# Linux kernel version: 2.6.9 +# Fri Oct 22 13:50:22 2004 # CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -26,6 +26,7 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -49,6 +50,7 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -144,6 +146,7 @@ # SCSI low-level drivers # # CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set CONFIG_ZFCP=y CONFIG_CCW=y @@ -157,7 +160,9 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set +# CONFIG_CDROM_PKTCDVD is not set # # S/390 block device drivers @@ -224,6 +229,7 @@ CONFIG_S390_TAPE_34XX=m # CONFIG_VMLOGRDR is not set # CONFIG_MONREADER is not set +# CONFIG_DCSS_SHM is not set # # Cryptographic devices @@ -427,6 +433,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -506,6 +513,7 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_INFO is not set @@ -513,6 +521,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # diff -Nru a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c --- a/arch/s390/kernel/asm-offsets.c 2004-10-26 18:25:17 -07:00 +++ b/arch/s390/kernel/asm-offsets.c 2004-10-26 18:25:17 -07:00 @@ -22,6 +22,8 @@ DEFINE(__THREAD_mm_segment, offsetof(struct task_struct, thread.mm_segment),); BLANK(); + DEFINE(__TASK_pid, offsetof(struct task_struct, pid),); + BLANK(); DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid),); DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address),); DEFINE(__PER_access_id, offsetof(per_struct, lowcore.words.access_id),); diff -Nru a/arch/s390/kernel/cpcmd.c b/arch/s390/kernel/cpcmd.c --- a/arch/s390/kernel/cpcmd.c 2004-10-26 18:25:18 -07:00 +++ b/arch/s390/kernel/cpcmd.c 2004-10-26 18:25:18 -07:00 @@ -15,7 +15,7 @@ #include static spinlock_t cpcmd_lock = SPIN_LOCK_UNLOCKED; -static char cpcmd_buf[128]; +static char cpcmd_buf[240]; void cpcmd(char *cmd, char *response, int rlen) { @@ -24,22 +24,23 @@ int cmdlen; spin_lock_irqsave(&cpcmd_lock, flags); - cmdlen = strlen(cmd); - strcpy(cpcmd_buf, cmd); - ASCEBC(cpcmd_buf, cmdlen); + cmdlen = strlen(cmd); + BUG_ON(cmdlen>240); + strcpy(cpcmd_buf, cmd); + ASCEBC(cpcmd_buf, cmdlen); - if (response != NULL && rlen > 0) { + if (response != NULL && rlen > 0) { #ifndef CONFIG_ARCH_S390X asm volatile ("LRA 2,0(%0)\n\t" "LR 4,%1\n\t" "O 4,%4\n\t" "LRA 3,0(%2)\n\t" "LR 5,%3\n\t" - ".long 0x83240008 # Diagnose 83\n\t" + ".long 0x83240008 # Diagnose X'08'\n\t" : /* no output */ : "a" (cpcmd_buf), "d" (cmdlen), "a" (response), "d" (rlen), "m" (mask) - : "2", "3", "4", "5" ); + : "cc", "2", "3", "4", "5" ); #else /* CONFIG_ARCH_S390X */ asm volatile (" lrag 2,0(%0)\n" " lgr 4,%1\n" @@ -47,19 +48,19 @@ " lrag 3,0(%2)\n" " lgr 5,%3\n" " sam31\n" - " .long 0x83240008 # Diagnose 83\n" + " .long 0x83240008 # Diagnose X'08'\n" " sam64" : /* no output */ : "a" (cpcmd_buf), "d" (cmdlen), "a" (response), "d" (rlen), "m" (mask) - : "2", "3", "4", "5" ); + : "cc", "2", "3", "4", "5" ); #endif /* CONFIG_ARCH_S390X */ EBCASC(response, rlen); } else { #ifndef CONFIG_ARCH_S390X asm volatile ("LRA 2,0(%0)\n\t" "LR 3,%1\n\t" - ".long 0x83230008 # Diagnose 83\n\t" + ".long 0x83230008 # Diagnose X'08'\n\t" : /* no output */ : "a" (cpcmd_buf), "d" (cmdlen) : "2", "3" ); @@ -67,7 +68,7 @@ asm volatile (" lrag 2,0(%0)\n" " lgr 3,%1\n" " sam31\n" - " .long 0x83230008 # Diagnose 83\n" + " .long 0x83230008 # Diagnose X'08'\n" " sam64" : /* no output */ : "a" (cpcmd_buf), "d" (cmdlen) diff -Nru a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c --- a/arch/s390/kernel/debug.c 2004-10-26 18:25:17 -07:00 +++ b/arch/s390/kernel/debug.c 2004-10-26 18:25:17 -07:00 @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -708,6 +709,70 @@ proceed_active_area(id); } +static int debug_stoppable=1; +static int debug_active=1; + +#define CTL_S390DBF 5677 +#define CTL_S390DBF_STOPPABLE 5678 +#define CTL_S390DBF_ACTIVE 5679 + +/* + * proc handler for the running debug_active sysctl + * always allow read, allow write only if debug_stoppable is set or + * if debug_active is already off + */ +static int s390dbf_procactive(ctl_table *table, int write, struct file *filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + if (!write || debug_stoppable || !debug_active) + return proc_dointvec(table, write, filp, buffer, lenp, ppos); + else + return 0; +} + + +static struct ctl_table s390dbf_table[] = { + { + .ctl_name = CTL_S390DBF_STOPPABLE, + .procname = "debug_stoppable", + .data = &debug_stoppable, + .maxlen = sizeof(int), + .mode = S_IRUGO | S_IWUSR, + .proc_handler = &proc_dointvec, + .strategy = &sysctl_intvec, + }, + { + .ctl_name = CTL_S390DBF_ACTIVE, + .procname = "debug_active", + .data = &debug_active, + .maxlen = sizeof(int), + .mode = S_IRUGO | S_IWUSR, + .proc_handler = &s390dbf_procactive, + .strategy = &sysctl_intvec, + }, + { .ctl_name = 0 } +}; + +static struct ctl_table s390dbf_dir_table[] = { + { + .ctl_name = CTL_S390DBF, + .procname = "s390dbf", + .maxlen = 0, + .mode = S_IRUGO | S_IXUGO, + .child = s390dbf_table, + }, + { .ctl_name = 0 } +}; + +struct ctl_table_header *s390dbf_sysctl_header; + +void debug_stop_all(void) +{ + if (debug_stoppable) + debug_active = 0; +} + + /* * debug_event_common: * - write debug entry with given size @@ -719,6 +784,8 @@ unsigned long flags; debug_entry_t *active; + if (!debug_active) + return NULL; spin_lock_irqsave(&id->lock, flags); active = get_active_entry(id); memset(DEBUG_DATA(active), 0, id->buf_size); @@ -740,6 +807,8 @@ unsigned long flags; debug_entry_t *active; + if (!debug_active) + return NULL; spin_lock_irqsave(&id->lock, flags); active = get_active_entry(id); memset(DEBUG_DATA(active), 0, id->buf_size); @@ -780,7 +849,8 @@ if((!id) || (level > id->level)) return NULL; - + if (!debug_active) + return NULL; numargs=debug_count_numargs(string); spin_lock_irqsave(&id->lock, flags); @@ -812,6 +882,8 @@ if((!id) || (level > id->level)) return NULL; + if (!debug_active) + return NULL; numargs=debug_count_numargs(string); @@ -838,6 +910,7 @@ { int rc = 0; + s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 1); down(&debug_lock); #ifdef CONFIG_PROC_FS debug_proc_root_entry = proc_mkdir(DEBUG_DIR_ROOT, NULL); @@ -1186,6 +1259,7 @@ #ifdef CONFIG_PROC_FS remove_proc_entry(debug_proc_root_entry->name, NULL); #endif /* CONFIG_PROC_FS */ + unregister_sysctl_table(s390dbf_sysctl_header); return; } @@ -1199,6 +1273,7 @@ EXPORT_SYMBOL(debug_register); EXPORT_SYMBOL(debug_unregister); EXPORT_SYMBOL(debug_set_level); +EXPORT_SYMBOL(debug_stop_all); EXPORT_SYMBOL(debug_register_view); EXPORT_SYMBOL(debug_unregister_view); EXPORT_SYMBOL(debug_event_common); diff -Nru a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S --- a/arch/s390/kernel/entry.S 2004-10-26 18:25:17 -07:00 +++ b/arch/s390/kernel/entry.S 2004-10-26 18:25:17 -07:00 @@ -144,6 +144,7 @@ l %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp lm %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task st %r3,__LC_CURRENT # __LC_CURRENT = current task struct + lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 l %r3,__THREAD_info(%r3) # load thread_info from task struct st %r3,__LC_THREAD_INFO ahi %r3,STACK_SIZE diff -Nru a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S --- a/arch/s390/kernel/entry64.S 2004-10-26 18:25:17 -07:00 +++ b/arch/s390/kernel/entry64.S 2004-10-26 18:25:17 -07:00 @@ -141,6 +141,7 @@ lg %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp lmg %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task stg %r3,__LC_CURRENT # __LC_CURRENT = current task struct + lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 lg %r3,__THREAD_info(%r3) # load thread_info from task struct stg %r3,__LC_THREAD_INFO aghi %r3,STACK_SIZE diff -Nru a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c --- a/arch/s390/kernel/irq.c 2004-10-26 18:25:18 -07:00 +++ b/arch/s390/kernel/irq.c 2004-10-26 18:25:18 -07:00 @@ -86,7 +86,7 @@ " la 15,0(%1)\n" : : "a" (new), "a" (old), "a" (__do_softirq) - : "0", "1", "2", "3", "4", "5", + : "0", "1", "2", "3", "4", "5", "14", "cc", "memory" ); } else /* We are already on the async stack. */ diff -Nru a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c --- a/arch/s390/kernel/traps.c 2004-10-26 18:25:17 -07:00 +++ b/arch/s390/kernel/traps.c 2004-10-26 18:25:17 -07:00 @@ -38,6 +38,7 @@ #include #include #include +#include /* Called from entry.S only */ extern void handle_per_exception(struct pt_regs *regs); @@ -277,8 +278,10 @@ void die(const char * str, struct pt_regs * regs, long err) { static int die_counter; - console_verbose(); - spin_lock_irq(&die_lock); + + debug_stop_all(); + console_verbose(); + spin_lock_irq(&die_lock); bust_spinlocks(1); printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); show_regs(regs); @@ -630,6 +633,21 @@ } } +asmlinkage void space_switch_exception(struct pt_regs * regs, long int_code) +{ + siginfo_t info; + + /* Set user psw back to home space mode. */ + if (regs->psw.mask & PSW_MASK_PSTATE) + regs->psw.mask |= PSW_ASC_HOME; + /* Send SIGILL. */ + info.si_signo = SIGILL; + info.si_errno = 0; + info.si_code = ILL_PRVOPC; + info.si_addr = get_check_address(regs); + do_trap(int_code, SIGILL, "space switch event", regs, &info); +} + asmlinkage void kernel_stack_overflow(struct pt_regs * regs) { die("Kernel stack overflow", regs, 0); @@ -673,7 +691,7 @@ pgm_check_table[0x3B] = &do_dat_exception; #endif /* CONFIG_ARCH_S390X */ pgm_check_table[0x15] = &operand_exception; - pgm_check_table[0x1C] = &privileged_op; + pgm_check_table[0x1C] = &space_switch_exception; pgm_check_table[0x1D] = &hfp_sqrt_exception; pgm_check_table[0x40] = &do_monitor_call; diff -Nru a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c --- a/arch/s390/mm/extmem.c 2004-10-26 18:25:18 -07:00 +++ b/arch/s390/mm/extmem.c 2004-10-26 18:25:18 -07:00 @@ -1,11 +1,10 @@ /* - * File...........: arch/s390/mm/dcss.c - * Author(s)......: Steven Shultz - * Carsten Otte + * File...........: arch/s390/mm/extmem.c + * Author(s)......: Carsten Otte + * Rob M van der Heij + * Steven Shultz * Bugreports.to..: - * thanks to Rob M van der Heij - * - he wrote the diag64 function - * (C) IBM Corporation 2002 + * (C) IBM Corporation 2002-2004 */ #include @@ -43,18 +42,38 @@ #define DCSS_SEGEXT 0x18 #define DCSS_QACTV 0x0c +struct qout64 { + int segstart; + int segend; + int segcnt; + int segrcnt; + char segout[8][6]; +}; + +struct qin64 { + char qopcode; + char rsrv1[3]; + char qrcode; + char rsrv2[3]; + char qname[8]; + unsigned int qoutptr; + short int qoutlen; +}; + struct dcss_segment { - struct list_head list; - char dcss_name[8]; - unsigned long start_addr; - unsigned long end; - atomic_t ref_count; - int dcss_attr; - int shared_attr; + struct list_head list; + char dcss_name[8]; + unsigned long start_addr; + unsigned long end; + atomic_t ref_count; + int do_nonshared; + int vm_segtype; }; static spinlock_t dcss_lock = SPIN_LOCK_UNLOCKED; static struct list_head dcss_list = LIST_HEAD_INIT(dcss_list); +static char *segtype_string[7] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC" }; + extern struct { unsigned long addr, size, type; } memory_chunk[MEMORY_CHUNKS]; @@ -63,20 +82,46 @@ * Create the 8 bytes, ebcdic VM segment name from * an ascii name. */ -static void inline dcss_mkname(char *name, char *dcss_name) +static void inline +dcss_mkname(char *name, char *dcss_name) { - int i; + int i; + + for (i = 0; i < 8; i++) { + if (name[i] == '\0') + break; + dcss_name[i] = toupper(name[i]); + }; + for (; i < 8; i++) + dcss_name[i] = ' '; + ASCEBC(dcss_name, 8); +} - for (i = 0; i <= 8; i++) { - if (name[i] == '\0') - break; - dcss_name[i] = toupper(name[i]); - }; - for (; i <= 8; i++) - dcss_name[i] = ' '; - ASCEBC(dcss_name, 8); + +/* + * search all segments in dcss_list, and return the one + * namend *name. If not found, return NULL. + */ +static struct dcss_segment * +segment_by_name (char *name) +{ + char dcss_name[9]; + struct list_head *l; + struct dcss_segment *tmp, *retval = NULL; + + BUG_ON (!spin_is_locked(&dcss_lock)); + dcss_mkname (name, dcss_name); + list_for_each (l, &dcss_list) { + tmp = list_entry (l, struct dcss_segment, list); + if (memcmp(tmp->dcss_name, dcss_name, 8) == 0) { + retval = tmp; + break; + } + } + return retval; } + /* * Perform a function on a dcss segment. */ @@ -84,337 +129,270 @@ dcss_diag (__u8 func, void *parameter, unsigned long *ret1, unsigned long *ret2) { - unsigned long rx, ry; - int rc; + unsigned long rx, ry; + int rc; - rx = (unsigned long) parameter; - ry = (unsigned long) func; - __asm__ __volatile__( + rx = (unsigned long) parameter; + ry = (unsigned long) func; + __asm__ __volatile__( #ifdef CONFIG_ARCH_S390X - " sam31\n" // switch to 31 bit - " diag %0,%1,0x64\n" - " sam64\n" // switch back to 64 bit + " sam31\n" // switch to 31 bit + " diag %0,%1,0x64\n" + " sam64\n" // switch back to 64 bit #else - " diag %0,%1,0x64\n" + " diag %0,%1,0x64\n" #endif - " ipm %2\n" - " srl %2,28\n" - : "+d" (rx), "+d" (ry), "=d" (rc) : : "cc" ); - *ret1 = rx; - *ret2 = ry; - return rc; + " ipm %2\n" + " srl %2,28\n" + : "+d" (rx), "+d" (ry), "=d" (rc) : : "cc" ); + *ret1 = rx; + *ret2 = ry; + return rc; } - -/* use to issue "extended" dcss query */ static inline int -dcss_diag_query(char *name, int *rwattr, int *shattr, unsigned long *segstart, unsigned long *segend) +dcss_diag_translate_rc (int vm_rc) { + if (vm_rc == 44) + return -ENOENT; + return -EIO; +} + + +/* do a diag to get info about a segment. + * fills start_address, end and vm_segtype fields + */ +static int +query_segment_info (struct dcss_segment *seg) { - int i,j,rc; - unsigned long rx, ry; + struct qin64 *qin = kmalloc (sizeof(struct qin64), GFP_DMA); + struct qout64 *qout = kmalloc (sizeof(struct qout64), GFP_DMA); - typedef struct segentry { - char thisseg[8]; - } segentry; - - struct qout64 { - int segstart; - int segend; - int segcnt; - int segrcnt; - segentry segout[6]; - }; - - struct qin64 { - char qopcode; - char rsrv1[3]; - char qrcode; - char rsrv2[3]; - char qname[8]; - unsigned int qoutptr; - short int qoutlen; - }; - - - struct qin64 *qinarea; - struct qout64 *qoutarea; - - qinarea = (struct qin64*) get_zeroed_page (GFP_DMA); - if (!qinarea) { - rc =-ENOMEM; - goto out; - } - qoutarea = (struct qout64*) get_zeroed_page (GFP_DMA); - if (!qoutarea) { - rc = -ENOMEM; - free_page ((unsigned long) qinarea); - goto out; - } - memset (qinarea,0,PAGE_SIZE); - memset (qoutarea,0,PAGE_SIZE); - - qinarea->qopcode = DCSS_QACTV; /* do a query for active - segments */ - qinarea->qoutptr = (unsigned long) qoutarea; - qinarea->qoutlen = sizeof(struct qout64); - - /* Move segment name into double word aligned - field and pad with blanks to 8 long. - */ - - for (i = j = 0 ; i < 8; i++) { - qinarea->qname[i] = (name[j] == '\0') ? ' ' : name[j++]; - } - - /* name already in EBCDIC */ - /* ASCEBC ((void *)&qinarea.qname, 8); */ - - /* set the assembler variables */ - rx = (unsigned long) qinarea; - ry = DCSS_SEGEXT; /* this is extended function */ + int diag_cc, rc; + unsigned long dummy, vmrc; - /* issue diagnose x'64' */ - __asm__ __volatile__( -#ifdef CONFIG_ARCH_S390X - " sam31\n" // switch to 31 bit - " diag %0,%1,0x64\n" - " sam64\n" // switch back to 64 bit -#else - " diag %0,%1,0x64\n" -#endif - " ipm %2\n" - " srl %2,28\n" - : "+d" (rx), "+d" (ry), "=d" (rc) : : "cc" ); - - /* parse the query output area */ - *segstart=qoutarea->segstart; - *segend=qoutarea->segend; - - if (rc > 1) - { - *rwattr = 2; - *shattr = 2; - rc = 0; - goto free; - } - - if (qoutarea->segcnt > 6) - { - *rwattr = 3; - *shattr = 3; - rc = 0; - goto free; - } - - *rwattr = 1; - *shattr = 1; - - for (i=0; i < qoutarea->segrcnt; i++) { - if (qoutarea->segout[i].thisseg[3] == 2 || - qoutarea->segout[i].thisseg[3] == 3 || - qoutarea->segout[i].thisseg[3] == 6 ) - *rwattr = 0; - if (qoutarea->segout[i].thisseg[3] == 1 || - qoutarea->segout[i].thisseg[3] == 3 || - qoutarea->segout[i].thisseg[3] == 5 ) - *shattr = 0; - } /* end of for statement */ - rc = 0; - free: - free_page ((unsigned long) qoutarea); - free_page ((unsigned long) qinarea); + if ((qin == NULL) || (qout == NULL)) { + rc = -ENOMEM; + goto out_free; + } + + /* initialize diag input parameters */ + qin->qopcode = DCSS_QACTV; + qin->qoutptr = (unsigned long) qout; + qin->qoutlen = sizeof(struct qout64); + memcpy (qin->qname, seg->dcss_name, 8); + + diag_cc = dcss_diag (DCSS_SEGEXT, qin, &dummy, &vmrc); + + if (diag_cc > 1) { + rc = dcss_diag_translate_rc (vmrc); + goto out_free; + } + + if (qout->segcnt > 1) { + rc = -ENOTSUPP; + goto out_free; + } + + /* analyze diag output and update seg */ + seg->start_addr = qout->segstart; + seg->end = qout->segend; + + seg->vm_segtype = qout->segout[0][3]; + + rc = 0; + + out_free: + if (qin) kfree(qin); + if (qout) kfree(qout); + return rc; +} + +/* + * check if the given segment collides with guest storage. + * returns 1 if this is the case, 0 if no collision was found + */ +static int +segment_overlaps_storage(struct dcss_segment *seg) +{ + int i; + + for (i=0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { + if (memory_chunk[i].type != 0) + continue; + if ((memory_chunk[i].addr >> 20) > (seg->end >> 20)) + continue; + if (((memory_chunk[i].addr + memory_chunk[i].size - 1) >> 20) + < (seg->start_addr >> 20)) + continue; + return 1; + } + return 0; +} + +/* + * check if segment collides with other segments that are currently loaded + * returns 1 if this is the case, 0 if no collision was found + */ +static int +segment_overlaps_others (struct dcss_segment *seg) +{ + struct list_head *l; + struct dcss_segment *tmp; + + BUG_ON (!spin_is_locked(&dcss_lock)); + list_for_each(l, &dcss_list) { + tmp = list_entry(l, struct dcss_segment, list); + if ((tmp->start_addr >> 20) > (seg->end >> 20)) + continue; + if ((tmp->end >> 20) < (seg->start_addr >> 20)) + continue; + if (seg == tmp) + continue; + return 1; + } + return 0; +} + +/* + * get info about a segment + * possible return values: + * -ENOSYS : we are not running on VM + * -EIO : could not perform query diagnose + * -ENOENT : no such segment + * -ENOTSUPP: multi-part segment cannot be used with linux + * -ENOSPC : segment cannot be used (overlaps with storage) + * -ENOMEM : out of memory + * 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h + */ +int +segment_info (char* name) +{ + int rc; + struct dcss_segment seg; + + if (!MACHINE_IS_VM) + return -ENOSYS; + + dcss_mkname(name, seg.dcss_name); + rc = query_segment_info (&seg); + if (rc < 0) + return rc; + return seg.vm_segtype; +} + +/* + * real segment loading function, called from segment_load + */ +static int +__segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long *end) +{ + struct dcss_segment *seg = kmalloc(sizeof(struct dcss_segment), + GFP_DMA); + int dcss_command, rc, diag_cc; + + if (seg == NULL) { + rc = -ENOMEM; + goto out; + } + dcss_mkname (name, seg->dcss_name); + rc = query_segment_info (seg); + if (rc < 0) + goto out_free; + if (segment_overlaps_storage(seg)) { + PRINT_WARN ("segment_load: not loading segment %s - overlaps" + " storage\n",name); + rc = -ENOSPC; + goto out_free; + } + if (segment_overlaps_others(seg)) { + PRINT_WARN ("segment_load: not loading segment %s - overlaps" + " other segments\n",name); + rc = -EBUSY; + goto out_free; + } + if (do_nonshared) + dcss_command = DCSS_LOADNSR; + else + dcss_command = DCSS_LOADNOLY; + + diag_cc = dcss_diag(dcss_command, seg->dcss_name, + &seg->start_addr, &seg->end); + if (diag_cc > 1) { + PRINT_WARN ("segment_load: could not load segment %s - " + "diag returned error (%ld)\n",name,seg->end); + rc = dcss_diag_translate_rc (seg->end); + dcss_diag(DCSS_PURGESEG, seg->dcss_name, + &seg->start_addr, &seg->end); + goto out_free; + } + seg->do_nonshared = do_nonshared; + atomic_set(&seg->ref_count, 1); + list_add(&seg->list, &dcss_list); + rc = seg->vm_segtype; + *addr = seg->start_addr; + *end = seg->end; + if (do_nonshared) + PRINT_INFO ("segment_load: loaded segment %s range %p .. %p " + "type %s in non-shared mode\n", name, + (void*)seg->start_addr, (void*)seg->end, + segtype_string[seg->vm_segtype]); + else + PRINT_INFO ("segment_load: loaded segment %s range %p .. %p " + "type %s in shared mode\n", name, + (void*)seg->start_addr, (void*)seg->end, + segtype_string[seg->vm_segtype]); + goto out; + out_free: + kfree (seg); out: - return rc; + return rc; } /* - * Load a DCSS segment via the diag 0x64. + * this function loads a DCSS segment + * name : name of the DCSS + * do_nonshared : 0 indicates that the dcss should be shared with other linux images + * 1 indicates that the dcss should be exclusive for this linux image + * addr : will be filled with start address of the segment + * end : will be filled with end address of the segment + * return values: + * -ENOSYS : we are not running on VM + * -EIO : could not perform query or load diagnose + * -ENOENT : no such segment + * -ENOTSUPP: multi-part segment cannot be used with linux + * -ENOSPC : segment cannot be used (overlaps with storage) + * -EBUSY : segment can temporarily not be used (overlaps with dcss) + * -EPERM : segment is currently loaded with incompatible permissions + * -ENOMEM : out of memory + * 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h */ -int segment_load(char *name, int segtype, unsigned long *addr, - unsigned long *end) +int +segment_load (char *name, int do_nonshared, unsigned long *addr, + unsigned long *end) { - char dcss_name[8]; - struct list_head *l; - struct dcss_segment *seg, *tmp; - unsigned long dummy; - unsigned long segstart, segend; - int rc = 0,i; - int rwattr, shattr; - - if (!MACHINE_IS_VM) - return -ENOSYS; - dcss_mkname(name, dcss_name); - /* search for the dcss in list of currently loaded segments */ - spin_lock(&dcss_lock); - seg = NULL; - list_for_each(l, &dcss_list) { - tmp = list_entry(l, struct dcss_segment, list); - if (memcmp(tmp->dcss_name, dcss_name, 8) == 0) { - seg = tmp; - break; - } - } - - if (seg == NULL) { - /* find out the attributes of this - shared segment */ - dcss_diag_query(dcss_name, &rwattr, &shattr, &segstart, &segend); - /* does segment collide with main memory? */ - for (i=0; i < MEMORY_CHUNKS; i++) { - if (memory_chunk[i].type != 0) - continue; - if (memory_chunk[i].addr > segend) - continue; - if (memory_chunk[i].addr + memory_chunk[i].size <= segstart) - continue; - spin_unlock(&dcss_lock); - return -ENOENT; - } - /* or does it collide with other (loaded) segments? */ - list_for_each(l, &dcss_list) { - tmp = list_entry(l, struct dcss_segment, list); - if ((segstart <= tmp->end && segstart >= tmp->start_addr) || - (segend <= tmp->end && segend >= tmp->start_addr) || - (segstart <= tmp->start_addr && segend >= tmp->end)) { - PRINT_ERR("Segment Overlap!\n"); - spin_unlock(&dcss_lock); - return -ENOENT; - } - } - - /* do case statement on segtype */ - /* if asking for shared ro, - shared rw works */ - /* if asking for exclusive ro, - exclusive rw works */ - - switch(segtype) { - case SEGMENT_SHARED_RO: - if (shattr > 1 || rwattr > 1) { - spin_unlock(&dcss_lock); - return -ENOENT; - } else { - if (shattr == 0 && rwattr == 0) - rc = SEGMENT_EXCLUSIVE_RO; - if (shattr == 0 && rwattr == 1) - rc = SEGMENT_EXCLUSIVE_RW; - if (shattr == 1 && rwattr == 0) - rc = SEGMENT_SHARED_RO; - if (shattr == 1 && rwattr == 1) - rc = SEGMENT_SHARED_RW; - } - break; - case SEGMENT_SHARED_RW: - if (shattr > 1 || rwattr != 1) { - spin_unlock(&dcss_lock); - return -ENOENT; - } else { - if (shattr == 0) - rc = SEGMENT_EXCLUSIVE_RW; - if (shattr == 1) - rc = SEGMENT_SHARED_RW; - } - break; - - case SEGMENT_EXCLUSIVE_RO: - if (shattr > 0 || rwattr > 1) { - spin_unlock(&dcss_lock); - return -ENOENT; - } else { - if (rwattr == 0) - rc = SEGMENT_EXCLUSIVE_RO; - if (rwattr == 1) - rc = SEGMENT_EXCLUSIVE_RW; - } - break; - - case SEGMENT_EXCLUSIVE_RW: -/* if (shattr != 0 || rwattr != 1) { - spin_unlock(&dcss_lock); - return -ENOENT; - } else { -*/ - rc = SEGMENT_EXCLUSIVE_RW; -// } - break; - - default: - spin_unlock(&dcss_lock); - return -ENOENT; - } /* end switch */ - - seg = kmalloc(sizeof(struct dcss_segment), GFP_DMA); - if (seg != NULL) { - memcpy(seg->dcss_name, dcss_name, 8); - if (rc == SEGMENT_EXCLUSIVE_RW) { - if (dcss_diag(DCSS_LOADNSR, seg->dcss_name, - &seg->start_addr, &seg->end) == 0) { - if (seg->end < max_low_pfn*PAGE_SIZE ) { - atomic_set(&seg->ref_count, 1); - list_add(&seg->list, &dcss_list); - *addr = seg->start_addr; - *end = seg->end; - seg->dcss_attr = rc; - if (shattr == 1 && rwattr == 1) - seg->shared_attr = SEGMENT_SHARED_RW; - else if (shattr == 1 && rwattr == 0) - seg->shared_attr = SEGMENT_SHARED_RO; - else - seg->shared_attr = SEGMENT_EXCLUSIVE_RW; - } else { - dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); - kfree (seg); - rc = -ENOENT; - } - } else { - kfree(seg); - rc = -ENOENT; - } - goto out; - } - if (dcss_diag(DCSS_LOADNOLY, seg->dcss_name, - &seg->start_addr, &seg->end) == 0) { - if (seg->end < max_low_pfn*PAGE_SIZE ) { - atomic_set(&seg->ref_count, 1); - list_add(&seg->list, &dcss_list); - *addr = seg->start_addr; - *end = seg->end; - seg->dcss_attr = rc; - seg->shared_attr = rc; - } else { - dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy); - kfree (seg); - rc = -ENOENT; - } - } else { - kfree(seg); - rc = -ENOENT; - } - } else rc = -ENOMEM; - } else { - /* found */ - if ((segtype == SEGMENT_EXCLUSIVE_RW) && (seg->dcss_attr != SEGMENT_EXCLUSIVE_RW)) { - PRINT_ERR("Segment already loaded in other mode than EXCLUSIVE_RW!\n"); - rc = -EPERM; - goto out; - /* reload segment in exclusive mode */ -/* dcss_diag(DCSS_LOADNSR, seg->dcss_name, - &seg->start_addr, &seg->end); - seg->dcss_attr = SEGMENT_EXCLUSIVE_RW;*/ - } - if ((segtype != SEGMENT_EXCLUSIVE_RW) && (seg->dcss_attr == SEGMENT_EXCLUSIVE_RW)) { - PRINT_ERR("Segment already loaded in EXCLUSIVE_RW mode!\n"); - rc = -EPERM; - goto out; + struct dcss_segment *seg; + int rc; + + if (!MACHINE_IS_VM) + return -ENOSYS; + + spin_lock (&dcss_lock); + seg = segment_by_name (name); + if (seg == NULL) + rc = __segment_load (name, do_nonshared, addr, end); + else { + if (do_nonshared == seg->do_nonshared) { + atomic_inc(&seg->ref_count); + *addr = seg->start_addr; + *end = seg->end; + rc = seg->vm_segtype; + } else { + *addr = *end = 0; + rc = -EPERM; } - atomic_inc(&seg->ref_count); - *addr = seg->start_addr; - *end = seg->end; - rc = seg->dcss_attr; - } -out: - spin_unlock(&dcss_lock); - return rc; + } + spin_unlock (&dcss_lock); + return rc; } /* @@ -422,84 +400,65 @@ * it from the address space if nobody is using it * any longer. */ -void segment_unload(char *name) +void +segment_unload(char *name) { - char dcss_name[8]; - unsigned long dummy; - struct list_head *l,*l_tmp; - struct dcss_segment *seg; - - if (!MACHINE_IS_VM) - return; - dcss_mkname(name, dcss_name); - spin_lock(&dcss_lock); - list_for_each_safe(l, l_tmp, &dcss_list) { - seg = list_entry(l, struct dcss_segment, list); - if (memcmp(seg->dcss_name, dcss_name, 8) == 0) { - if (atomic_dec_return(&seg->ref_count) == 0) { - /* Last user of the segment is - gone. */ - list_del(&seg->list); - dcss_diag(DCSS_PURGESEG, seg->dcss_name, - &dummy, &dummy); - kfree(seg); - } - break; - } - } - spin_unlock(&dcss_lock); + unsigned long dummy; + struct dcss_segment *seg; + + if (!MACHINE_IS_VM) + return; + + spin_lock(&dcss_lock); + seg = segment_by_name (name); + if (seg == NULL) { + PRINT_ERR ("could not find segment %s in segment_unload, " + "please report to linux390@de.ibm.com\n",name); + goto out_unlock; + } + if (atomic_dec_return(&seg->ref_count) == 0) { + list_del(&seg->list); + dcss_diag(DCSS_PURGESEG, seg->dcss_name, + &dummy, &dummy); + kfree(seg); + } +out_unlock: + spin_unlock(&dcss_lock); } /* - * Replace an existing DCSS segment, so that machines - * that load it anew will see the new version. + * save segment content permanently */ -void segment_replace(char *name) +void segment_save(char *name) { - char dcss_name[8]; - struct list_head *l; - struct dcss_segment *seg; - int mybeg = 0; - int myend = 0; - char mybuff1[80]; - char mybuff2[80]; - - if (!MACHINE_IS_VM) - return; - dcss_mkname(name, dcss_name); - - memset (mybuff1, 0, sizeof(mybuff1)); - memset (mybuff2, 0, sizeof(mybuff2)); - - spin_lock(&dcss_lock); - list_for_each(l, &dcss_list) { - seg = list_entry(l, struct dcss_segment, list); - if (memcmp(seg->dcss_name, dcss_name, 8) == 0) { - mybeg = seg->start_addr >> 12; - myend = (seg->end) >> 12; - if (seg->shared_attr == SEGMENT_EXCLUSIVE_RW) - sprintf(mybuff1, "DEFSEG %s %X-%X EW", - name, mybeg, myend); - if (seg->shared_attr == SEGMENT_EXCLUSIVE_RO) - sprintf(mybuff1, "DEFSEG %s %X-%X RO", - name, mybeg, myend); - if (seg->shared_attr == SEGMENT_SHARED_RW) - sprintf(mybuff1, "DEFSEG %s %X-%X SW", - name, mybeg, myend); - if (seg->shared_attr == SEGMENT_SHARED_RO) - sprintf(mybuff1, "DEFSEG %s %X-%X SR", - name, mybeg, myend); - spin_unlock(&dcss_lock); - sprintf(mybuff2, "SAVESEG %s", name); - cpcmd(mybuff1, NULL, 80); - cpcmd(mybuff2, NULL, 80); - break; - } - - } - if (myend == 0) spin_unlock(&dcss_lock); + struct dcss_segment *seg; + int startpfn = 0; + int endpfn = 0; + char cmd1[80]; + char cmd2[80]; + + if (!MACHINE_IS_VM) + return; + + spin_lock(&dcss_lock); + seg = segment_by_name (name); + + if (seg == NULL) { + PRINT_ERR ("could not find segment %s in segment_save, please report to linux390@de.ibm.com\n",name); + return; + } + + startpfn = seg->start_addr >> 12; + endpfn = (seg->end) >> 12; + sprintf(cmd1, "DEFSEG %s %X-%X %s", name, startpfn, endpfn, + segtype_string[seg->vm_segtype]); + sprintf(cmd2, "SAVESEG %s", name); + cpcmd(cmd1, NULL, 80); + cpcmd(cmd2, NULL, 80); + spin_unlock(&dcss_lock); } EXPORT_SYMBOL(segment_load); EXPORT_SYMBOL(segment_unload); -EXPORT_SYMBOL(segment_replace); +EXPORT_SYMBOL(segment_save); +EXPORT_SYMBOL(segment_info); diff -Nru a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S --- a/arch/sparc64/kernel/systbls.S 2004-10-26 18:25:18 -07:00 +++ b/arch/sparc64/kernel/systbls.S 2004-10-26 18:25:18 -07:00 @@ -76,7 +76,7 @@ .word sys_timer_delete, sys32_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink .word sys_mq_timedsend, sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid -/*280*/ .word sys_setaltroot, sys_add_key, sys_request_key, sys_keyctl +/*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl #endif /* CONFIG_COMPAT */ @@ -142,7 +142,7 @@ .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid -/*280*/ .word sys_setaltroot, sys_add_key, sys_request_key, sys_keyctl +/*280*/ .word sys_nis_syscall, sys_add_key, sys_request_key, sys_keyctl #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ defined(CONFIG_SOLARIS_EMUL_MODULE) diff -Nru a/arch/um/Kconfig b/arch/um/Kconfig --- a/arch/um/Kconfig 2004-10-26 18:25:18 -07:00 +++ b/arch/um/Kconfig 2004-10-26 18:25:18 -07:00 @@ -100,7 +100,8 @@ say Y or M here; otherwise say N. config HPPFS - tristate "HoneyPot ProcFS" + tristate "HoneyPot ProcFS (EXPERIMENTAL)" + depends on BROKEN help hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc entries to be overridden, removed, or fabricated from the host. @@ -113,8 +114,12 @@ You only need this if you are setting up a UML honeypot. Otherwise, it is safe to say 'N' here. + If you are actively using it, please ask for it to be fixed. In this + moment, it does not work on 2.6 (it works somehow on 2.4). + config MCONSOLE bool "Management console" + default y help The user mode linux management console is a low-level interface to the kernel, somewhat like the i386 SysRq interface. Since there is @@ -131,19 +136,40 @@ config HOST_2G_2G bool "2G/2G host address space split" + default n + help + This is needed when the host on which you run has a 2G/2G memory + split, instead of the customary 3G/1G. + + Note that to enable such a host + configuration, which makes sense only in some cases, you need special + host patches. + + So, if you do not know what to do here, say 'N'. config SMP - bool "Symmetric multi-processing support" + bool "Symmetric multi-processing support (EXPERIMENTAL)" default n + depends on MODE_TT && EXPERIMENTAL help - This option enables UML SMP support. UML implements virtual SMP by - allowing as many processes to run simultaneously on the host as - there are virtual processors configured. Obviously, if the host is - a uniprocessor, those processes will timeshare, but, inside UML, - will appear to be running simultaneously. If the host is a - multiprocessor, then UML processes may run simultaneously, depending - on the host scheduler. - It is safe to leave this unchanged. + This option enables UML SMP support. + It is NOT related to having a real SMP box. Not directly, at least. + + UML implements virtual SMP by allowing as many processes to run + simultaneously on the host as there are virtual processors configured. + + Obviously, if the host is a uniprocessor, those processes will + timeshare, but, inside UML, will appear to be running simultaneously. + If the host is a multiprocessor, then UML processes may run + simultaneously, depending on the host scheduler. + + This, however, is supported only in TT mode. So, if you use the SKAS + patch on your host, switching to TT mode and enabling SMP usually gives + you worse performances. + Also, since the support for SMP has been under-developed, there could + be some bugs being exposed by enabling SMP. + + If you don't know what to do, say N. config NR_CPUS int "Maximum number of CPUs (2-32)" @@ -246,5 +272,9 @@ if BROKEN source "drivers/mtd/Kconfig" endif + +config INPUT + bool + default n source "arch/um/Kconfig.debug" diff -Nru a/arch/um/Kconfig_block b/arch/um/Kconfig_block --- a/arch/um/Kconfig_block 2004-10-26 18:25:18 -07:00 +++ b/arch/um/Kconfig_block 2004-10-26 18:25:18 -07:00 @@ -52,6 +52,33 @@ bool "Initial RAM disk (initrd) support" depends on BLK_DEV_RAM=y +#Copied directly from drivers/block/Kconfig +config INITRAMFS_SOURCE + string "Source directory of cpio_list" + default "" + help + This can be set to either a directory containing files, etc to be + included in the initramfs archive, or a file containing newline + separated entries. + + If it is a file, it should be in the following format: + # a comment + file + dir + nod + + Where: + name of the file/dir/nod in the archive + location of the file in the current filesystem + mode/permissions of the file + user id (0=root) + group id (0=root) + device type (b=block, c=character) + major number of nod + minor number of nod + + If you are not sure, leave it blank. + config MMAPPER tristate "Example IO memory driver" depends on BROKEN diff -Nru a/arch/um/defconfig b/arch/um/defconfig --- a/arch/um/defconfig 2004-10-26 18:25:18 -07:00 +++ b/arch/um/defconfig 2004-10-26 18:25:18 -07:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc2-mm1 -# Thu Sep 16 23:44:48 2004 +# Linux kernel version: 2.6.9-bk4 +# Thu Oct 21 01:09:54 2004 # CONFIG_USERMODE=y CONFIG_MMU=y @@ -15,15 +15,13 @@ CONFIG_MODE_SKAS=y CONFIG_NET=y CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y +CONFIG_BINFMT_MISC=m CONFIG_HOSTFS=y -CONFIG_HPPFS=y CONFIG_MCONSOLE=y # CONFIG_HOST_2G_2G is not set # CONFIG_SMP is not set CONFIG_NEST_LEVEL=0 CONFIG_KERNEL_HALF_GIGS=1 -# CONFIG_HIGHMEM is not set CONFIG_KERNEL_STACK_ORDER=2 CONFIG_UML_REAL_TIME_CLOCK=y @@ -40,7 +38,7 @@ CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set +CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y @@ -48,11 +46,12 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y -# CONFIG_IKCONFIG is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -66,7 +65,12 @@ # # Loadable module support # -# CONFIG_MODULES is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y # # Generic Driver Options @@ -86,6 +90,7 @@ CONFIG_PTY_CHAN=y CONFIG_TTY_CHAN=y CONFIG_XTERM_CHAN=y +# CONFIG_NOCONFIG_CHAN is not set CONFIG_CON_ZERO_CHAN="fd:0,fd:1" CONFIG_CON_CHAN="xterm" CONFIG_SSL_CHAN="pty" @@ -93,22 +98,21 @@ CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_WATCHDOG is not set -CONFIG_UML_SOUND=y -CONFIG_SOUND=y -CONFIG_HOSTAUDIO=y +CONFIG_UML_SOUND=m +CONFIG_SOUND=m +CONFIG_HOSTAUDIO=m # # Block Devices # CONFIG_BLK_DEV_UBD=y -# CONFIG_BLK_DEV_UBD_SYNC is not set +CONFIG_BLK_DEV_UBD_SYNC=y CONFIG_BLK_DEV_COW_COMMON=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=y +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y -# CONFIG_MMAPPER is not set CONFIG_NETDEVICES=y # @@ -120,7 +124,6 @@ CONFIG_UML_NET_SLIP=y CONFIG_UML_NET_DAEMON=y CONFIG_UML_NET_MCAST=y -# CONFIG_UML_NET_PCAP is not set CONFIG_UML_NET_SLIRP=y # @@ -178,18 +181,15 @@ # Network testing # # CONFIG_NET_PKTGEN is not set -# CONFIG_KGDBOE is not set # CONFIG_NETPOLL is not set -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP 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_DUMMY=y +CONFIG_DUMMY=m # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set -CONFIG_TUN=y +CONFIG_TUN=m # # Ethernet (10 or 100Mbit) @@ -217,7 +217,7 @@ # Wan interfaces # # CONFIG_WAN is not set -CONFIG_PPP=y +CONFIG_PPP=m # CONFIG_PPP_MULTILINK is not set # CONFIG_PPP_FILTER is not set # CONFIG_PPP_ASYNC is not set @@ -225,7 +225,7 @@ # CONFIG_PPP_DEFLATE is not set # CONFIG_PPP_BSDCOMP is not set # CONFIG_PPPOE is not set -CONFIG_SLIP=y +CONFIG_SLIP=m # CONFIG_SLIP_COMPRESSED is not set # CONFIG_SLIP_SMART is not set # CONFIG_SLIP_MODE_SLIP6 is not set @@ -237,47 +237,38 @@ # CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -CONFIG_REISER4_FS=y -CONFIG_REISER4_LARGE_KEY=y -# CONFIG_REISER4_CHECK is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set CONFIG_REISERFS_FS=y # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set # CONFIG_XFS_FS is not set -CONFIG_MINIX_FS=y +# CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y - -# -# Caches -# -# CONFIG_CACHEFS is not set +CONFIG_AUTOFS_FS=m +CONFIG_AUTOFS4_FS=m # # CD-ROM/DVD Filesystems # -CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y # CONFIG_ZISOFS is not set # CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # @@ -286,11 +277,10 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -304,10 +294,6 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -CONFIG_JFFS_FS=y -CONFIG_JFFS_FS_VERBOSE=0 -# CONFIG_JFFS_PROC_FS is not set -# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -396,75 +382,10 @@ # CONFIG_LIBCRC32C is not set # -# SCSI support -# -# CONFIG_SCSI is not set - -# # Multi-device support (RAID and LVM) # # CONFIG_MD is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set -# CONFIG_MTD_CONCAT is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -CONFIG_MTD_BLKMTD=y - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set +# CONFIG_INPUT is not set # # Kernel hacking diff -Nru a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S --- a/arch/um/kernel/dyn.lds.S 2004-10-26 18:25:18 -07:00 +++ b/arch/um/kernel/dyn.lds.S 2004-10-26 18:25:18 -07:00 @@ -59,6 +59,8 @@ .text : { *(.text) SCHED_TEXT + LOCK_TEXT + *(.fixup) *(.stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) diff -Nru a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c --- a/arch/um/kernel/tt/process_kern.c 2004-10-26 18:25:18 -07:00 +++ b/arch/um/kernel/tt/process_kern.c 2004-10-26 18:25:18 -07:00 @@ -305,7 +305,6 @@ change_sig(SIGUSR1, 0); err = 0; - out: return(err); } diff -Nru a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S --- a/arch/um/kernel/uml.lds.S 2004-10-26 18:25:18 -07:00 +++ b/arch/um/kernel/uml.lds.S 2004-10-26 18:25:18 -07:00 @@ -35,6 +35,8 @@ { *(.text) SCHED_TEXT + LOCK_TEXT + *(.fixup) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.gnu.linkonce.t*) diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile --- a/arch/x86_64/kernel/Makefile 2004-10-26 18:25:18 -07:00 +++ b/arch/x86_64/kernel/Makefile 2004-10-26 18:25:18 -07:00 @@ -7,7 +7,7 @@ obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \ x8664_ksyms.o i387.o syscall.o vsyscall.o \ - setup64.o bootflag.o e820.o reboot.o warmreboot.o + setup64.o bootflag.o e820.o reboot.o warmreboot.o quirks.o obj-y += mce.o obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ @@ -37,3 +37,4 @@ swiotlb-$(CONFIG_SWIOTLB) += ../../ia64/lib/swiotlb.o microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o +quirks-y += ../../i386/kernel/quirks.o diff -Nru a/crypto/sha256.c b/crypto/sha256.c --- a/crypto/sha256.c 2004-10-26 18:25:17 -07:00 +++ b/crypto/sha256.c 2004-10-26 18:25:17 -07:00 @@ -63,15 +63,7 @@ static inline void LOAD_OP(int I, u32 *W, const u8 *input) { - u32 t1 = input[(4 * I)] & 0xff; - - t1 <<= 8; - t1 |= input[(4 * I) + 1] & 0xff; - t1 <<= 8; - t1 |= input[(4 * I) + 2] & 0xff; - t1 <<= 8; - t1 |= input[(4 * I) + 3] & 0xff; - W[I] = t1; + W[I] = __be32_to_cpu( ((u32*)(input))[I] ); } static inline void BLEND_OP(int I, u32 *W) diff -Nru a/crypto/sha512.c b/crypto/sha512.c --- a/crypto/sha512.c 2004-10-26 18:25:19 -07:00 +++ b/crypto/sha512.c 2004-10-26 18:25:19 -07:00 @@ -30,6 +30,7 @@ u64 state[8]; u32 count[4]; u8 buf[128]; + u64 W[80]; }; static inline u64 Ch(u64 x, u64 y, u64 z) @@ -104,34 +105,18 @@ static inline void LOAD_OP(int I, u64 *W, const u8 *input) { - u64 t1 = input[(8*I) ] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+1] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+2] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+3] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+4] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+5] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+6] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+7] & 0xff; - W[I] = t1; + W[I] = __be64_to_cpu( ((u64*)(input))[I] ); } static inline void BLEND_OP(int I, u64 *W) { - W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; + W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; } static void -sha512_transform(u64 *state, const u8 *input) +sha512_transform(u64 *state, u64 *W, const u8 *input) { u64 a, b, c, d, e, f, g, h, t1, t2; - u64 W[80]; int i; @@ -172,7 +157,6 @@ /* erase our data */ a = b = c = d = e = f = g = h = t1 = t2 = 0; - memset(W, 0, 80 * sizeof(u64)); } static void @@ -230,10 +214,10 @@ /* Transform as many times as possible. */ if (len >= part_len) { memcpy(&sctx->buf[index], data, part_len); - sha512_transform(sctx->state, sctx->buf); + sha512_transform(sctx->state, sctx->W, sctx->buf); for (i = part_len; i + 127 < len; i+=128) - sha512_transform(sctx->state, &data[i]); + sha512_transform(sctx->state, sctx->W, &data[i]); index = 0; } else { @@ -242,6 +226,9 @@ /* Buffer remaining input */ memcpy(&sctx->buf[index], &data[i], len - i); + + /* erase our data */ + memset(sctx->W, 0, sizeof(sctx->W)); } static void diff -Nru a/drivers/Makefile b/drivers/Makefile --- a/drivers/Makefile 2004-10-26 18:25:19 -07:00 +++ b/drivers/Makefile 2004-10-26 18:25:19 -07:00 @@ -17,8 +17,9 @@ # default. obj-y += char/ -# i810fb depends on char/agp/ +# i810fb and intelfb depend on char/agp/ obj-$(CONFIG_FB_I810) += video/i810/ +obj-$(CONFIG_FB_INTEL) += video/intelfb/ # we also need input/serio early so serio bus is initialized by the time # serial drivers start registering their serio ports diff -Nru a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c --- a/drivers/acpi/thermal.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/acpi/thermal.c 2004-10-26 18:25:18 -07:00 @@ -76,7 +76,7 @@ MODULE_LICENSE("GPL"); static int tzp; -MODULE_PARM(tzp, "i"); +module_param(tzp, int, 0); MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n"); diff -Nru a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h --- a/drivers/atm/fore200e.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/atm/fore200e.h 2004-10-26 18:25:18 -07:00 @@ -645,7 +645,7 @@ typedef struct fw_header { u32 magic; /* magic number */ - u32 version; /* firware version id */ + u32 version; /* firmware version id */ u32 load_offset; /* fw load offset in board memory */ u32 start_offset; /* fw execution start address in board memory */ } fw_header_t; diff -Nru a/drivers/atm/horizon.c b/drivers/atm/horizon.c --- a/drivers/atm/horizon.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/atm/horizon.c 2004-10-26 18:25:17 -07:00 @@ -354,8 +354,7 @@ /********** globals **********/ -static hrz_dev * hrz_devs = NULL; -static struct timer_list housekeeping; +static void do_housekeeping (unsigned long arg); static unsigned short debug = 0; static unsigned short vpi_bits = 0; @@ -1386,7 +1385,7 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id, struct pt_regs *pt_regs) { - hrz_dev * dev = hrz_devs; + hrz_dev * dev = (hrz_dev *) dev_id; u32 int_source; unsigned int irq_ok; (void) pt_regs; @@ -1397,16 +1396,6 @@ PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq); return IRQ_NONE; } - // Did one of our cards generate the interrupt? - while (dev) { - if (dev == dev_id) - break; - dev = dev->prev; - } - if (!dev) { - PRINTD (DBG_IRQ, "irq not for me: %d", irq); - return IRQ_NONE; - } if (irq != dev->irq) { PRINTD (DBG_IRQ|DBG_ERR, "irq mismatch: %d", irq); return IRQ_NONE; @@ -1462,28 +1451,18 @@ /********** housekeeping **********/ -static void set_timer (struct timer_list * timer, unsigned int delay) { - timer->expires = jiffies + delay; - add_timer (timer); - return; -} - static void do_housekeeping (unsigned long arg) { // just stats at the moment - hrz_dev * dev = hrz_devs; - (void) arg; - // data is set to zero at module unload - if (housekeeping.data) { - while (dev) { - // collect device-specific (not driver/atm-linux) stats here - dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); - dev->rx_cell_count += rd_regw (dev, RX_CELL_COUNT_OFF); - dev->hec_error_count += rd_regw (dev, HEC_ERROR_COUNT_OFF); - dev->unassigned_cell_count += rd_regw (dev, UNASSIGNED_CELL_COUNT_OFF); - dev = dev->prev; - } - set_timer (&housekeeping, HZ/10); - } + hrz_dev * dev = (hrz_dev *) arg; + + // collect device-specific (not driver/atm-linux) stats here + dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); + dev->rx_cell_count += rd_regw (dev, RX_CELL_COUNT_OFF); + dev->hec_error_count += rd_regw (dev, HEC_ERROR_COUNT_OFF); + dev->unassigned_cell_count += rd_regw (dev, UNASSIGNED_CELL_COUNT_OFF); + + mod_timer (&dev->housekeeping, jiffies + HZ/10); + return; } @@ -2719,157 +2698,176 @@ .owner = THIS_MODULE, }; -static int __init hrz_probe (void) { - struct pci_dev * pci_dev; - int devs; - - PRINTD (DBG_FLOW, "hrz_probe"); - - devs = 0; - pci_dev = NULL; - while ((pci_dev = pci_find_device - (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, pci_dev) - )) { - hrz_dev * dev; - - // adapter slot free, read resources from PCI configuration space - u32 iobase = pci_resource_start (pci_dev, 0); - u32 * membase = bus_to_virt (pci_resource_start (pci_dev, 1)); - u8 irq = pci_dev->irq; - - /* XXX DEV_LABEL is a guess */ - if (!request_region (iobase, HRZ_IO_EXTENT, DEV_LABEL)) - continue; - - if (pci_enable_device (pci_dev)) - continue; - - dev = kmalloc (sizeof(hrz_dev), GFP_KERNEL); - if (!dev) { - // perhaps we should be nice: deregister all adapters and abort? - PRINTD (DBG_ERR, "out of memory"); - continue; - } - - memset (dev, 0, sizeof(hrz_dev)); - - // grab IRQ and install handler - move this someplace more sensible - if (request_irq (irq, - interrupt_handler, - SA_SHIRQ, /* irqflags guess */ - DEV_LABEL, /* name guess */ - dev)) { - PRINTD (DBG_WARN, "request IRQ failed!"); - // free_irq is at "endif" - } else { - - PRINTD (DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", - iobase, irq, membase); - - dev->atm_dev = atm_dev_register (DEV_LABEL, &hrz_ops, -1, NULL); - if (!(dev->atm_dev)) { - PRINTD (DBG_ERR, "failed to register Madge ATM adapter"); - } else { +static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) +{ + hrz_dev * dev; + int err = 0; + + // adapter slot free, read resources from PCI configuration space + u32 iobase = pci_resource_start (pci_dev, 0); + u32 * membase = bus_to_virt (pci_resource_start (pci_dev, 1)); + u8 irq = pci_dev->irq; unsigned char lat; - - PRINTD (DBG_INFO, "registered Madge ATM adapter (no. %d) (%p) at %p", - dev->atm_dev->number, dev, dev->atm_dev); + + PRINTD (DBG_FLOW, "hrz_probe"); + + /* XXX DEV_LABEL is a guess */ + if (!request_region(iobase, HRZ_IO_EXTENT, DEV_LABEL)) + return -EINVAL; + + if (pci_enable_device(pci_dev)) { + err = -EINVAL; + goto out_release; + } + + dev = kmalloc(sizeof(hrz_dev), GFP_KERNEL); + if (!dev) { + // perhaps we should be nice: deregister all adapters and abort? + PRINTD(DBG_ERR, "out of memory"); + err = -ENOMEM; + goto out_disable; + } + + memset(dev, 0, sizeof(hrz_dev)); + + pci_set_drvdata(pci_dev, dev); + + // grab IRQ and install handler - move this someplace more sensible + if (request_irq(irq, + interrupt_handler, + SA_SHIRQ, /* irqflags guess */ + DEV_LABEL, /* name guess */ + dev)) { + PRINTD(DBG_WARN, "request IRQ failed!"); + err = -EINVAL; + goto out_free; + } + + PRINTD(DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", + iobase, irq, membase); + + dev->atm_dev = atm_dev_register(DEV_LABEL, &hrz_ops, -1, NULL); + if (!(dev->atm_dev)) { + PRINTD(DBG_ERR, "failed to register Madge ATM adapter"); + err = -EINVAL; + goto out_free_irq; + } + + PRINTD(DBG_INFO, "registered Madge ATM adapter (no. %d) (%p) at %p", + dev->atm_dev->number, dev, dev->atm_dev); dev->atm_dev->dev_data = (void *) dev; dev->pci_dev = pci_dev; - + // enable bus master accesses - pci_set_master (pci_dev); - + pci_set_master(pci_dev); + // frobnicate latency (upwards, usually) - pci_read_config_byte (pci_dev, PCI_LATENCY_TIMER, &lat); + pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &lat); if (pci_lat) { - PRINTD (DBG_INFO, "%s PCI latency timer from %hu to %hu", - "changing", lat, pci_lat); - pci_write_config_byte (pci_dev, PCI_LATENCY_TIMER, pci_lat); + PRINTD(DBG_INFO, "%s PCI latency timer from %hu to %hu", + "changing", lat, pci_lat); + pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, pci_lat); } else if (lat < MIN_PCI_LATENCY) { - PRINTK (KERN_INFO, "%s PCI latency timer from %hu to %hu", - "increasing", lat, MIN_PCI_LATENCY); - pci_write_config_byte (pci_dev, PCI_LATENCY_TIMER, MIN_PCI_LATENCY); + PRINTK(KERN_INFO, "%s PCI latency timer from %hu to %hu", + "increasing", lat, MIN_PCI_LATENCY); + pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, MIN_PCI_LATENCY); } - + dev->iobase = iobase; dev->irq = irq; dev->membase = membase; - + dev->rx_q_entry = dev->rx_q_reset = &memmap->rx_q_entries[0]; dev->rx_q_wrap = &memmap->rx_q_entries[RX_CHANS-1]; - + // these next three are performance hacks dev->last_vc = -1; dev->tx_last = -1; dev->tx_idle = 0; - + dev->tx_regions = 0; dev->tx_bytes = 0; dev->tx_skb = NULL; dev->tx_iovec = NULL; - + dev->tx_cell_count = 0; dev->rx_cell_count = 0; dev->hec_error_count = 0; dev->unassigned_cell_count = 0; - + dev->noof_spare_buffers = 0; - + { - unsigned int i; - for (i = 0; i < TX_CHANS; ++i) - dev->tx_channel_record[i] = -1; + unsigned int i; + for (i = 0; i < TX_CHANS; ++i) + dev->tx_channel_record[i] = -1; } - + dev->flags = 0; - + // Allocate cell rates and remember ASIC version // Fibre: ATM_OC3_PCR = 1555200000/8/270*260/53 - 29/53 // Copper: (WRONG) we want 6 into the above, close to 25Mb/s // Copper: (plagarise!) 25600000/8/270*260/53 - n/53 - - if (hrz_init (dev)) { - // to be really pedantic, this should be ATM_OC3c_PCR - dev->tx_avail = ATM_OC3_PCR; - dev->rx_avail = ATM_OC3_PCR; - set_bit (ultra, &dev->flags); // NOT "|= ultra" ! + + if (hrz_init(dev)) { + // to be really pedantic, this should be ATM_OC3c_PCR + dev->tx_avail = ATM_OC3_PCR; + dev->rx_avail = ATM_OC3_PCR; + set_bit(ultra, &dev->flags); // NOT "|= ultra" ! } else { - dev->tx_avail = ((25600000/8)*26)/(27*53); - dev->rx_avail = ((25600000/8)*26)/(27*53); - PRINTD (DBG_WARN, "Buggy ASIC: no TX bus-mastering."); + dev->tx_avail = ((25600000/8)*26)/(27*53); + dev->rx_avail = ((25600000/8)*26)/(27*53); + PRINTD(DBG_WARN, "Buggy ASIC: no TX bus-mastering."); } - + // rate changes spinlock - spin_lock_init (&dev->rate_lock); - + spin_lock_init(&dev->rate_lock); + // on-board memory access spinlock; we want atomic reads and // writes to adapter memory (handles IRQ and SMP) - spin_lock_init (&dev->mem_lock); - - init_waitqueue_head (&dev->tx_queue); - + spin_lock_init(&dev->mem_lock); + + init_waitqueue_head(&dev->tx_queue); + // vpi in 0..4, vci in 6..10 dev->atm_dev->ci_range.vpi_bits = vpi_bits; dev->atm_dev->ci_range.vci_bits = 10-vpi_bits; - - // update count and linked list - ++devs; - dev->prev = hrz_devs; - hrz_devs = dev; - // success - continue; - - /* not currently reached */ - atm_dev_deregister (dev->atm_dev); - } /* atm_dev_register */ - free_irq (irq, dev); - - } /* request_irq */ - kfree (dev); - release_region(iobase, HRZ_IO_EXTENT); - } /* kmalloc and while */ - return devs; + + init_timer(&dev->housekeeping); + dev->housekeeping.function = do_housekeeping; + dev->housekeeping.data = (unsigned long) dev; + mod_timer(&dev->housekeeping, jiffies); + +out: + return err; + +out_free_irq: + free_irq(dev->irq, dev); +out_free: + kfree(dev); +out_disable: + pci_disable_device(pci_dev); +out_release: + release_region(iobase, HRZ_IO_EXTENT); + goto out; +} + +static void __devexit hrz_remove_one(struct pci_dev *pci_dev) +{ + hrz_dev *dev; + + dev = pci_get_drvdata(pci_dev); + + PRINTD(DBG_INFO, "closing %p (atm_dev = %p)", dev, dev->atm_dev); + del_timer_sync(&dev->housekeeping); + hrz_reset(dev); + atm_dev_deregister(dev->atm_dev); + free_irq(dev->irq, dev); + release_region(dev->iobase, HRZ_IO_EXTENT); + kfree(dev); + + pci_disable_device(pci_dev); } static void __init hrz_check_args (void) { @@ -2909,11 +2907,22 @@ MODULE_PARM_DESC(max_rx_size, "maximum size of RX AAL5 frames"); MODULE_PARM_DESC(pci_lat, "PCI latency in bus cycles"); +static struct pci_device_id hrz_pci_tbl[] = { + { PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, PCI_ANY_ID, PCI_ANY_ID, + 0, 0, 0 }, + { 0, } +}; + +static struct pci_driver hrz_driver = { + .name = "horizon", + .probe = hrz_probe, + .remove = __devexit_p(hrz_remove_one), + .id_table = hrz_pci_tbl, +}; + /********** module entry **********/ static int __init hrz_module_init (void) { - int devs; - // sanity check - cast is needed since printk does not support %Zu if (sizeof(struct MEMMAP) != 128*1024/4) { PRINTK (KERN_ERR, "Fix struct MEMMAP (is %lu fakewords).", @@ -2927,44 +2936,15 @@ hrz_check_args(); // get the juice - devs = hrz_probe(); - - if (devs) { - init_timer (&housekeeping); - housekeeping.function = do_housekeeping; - // paranoia - housekeeping.data = 1; - set_timer (&housekeeping, 0); - } else { - PRINTK (KERN_ERR, "no (usable) adapters found"); - } - - return devs ? 0 : -ENODEV; + return pci_module_init(&hrz_driver); } /********** module exit **********/ static void __exit hrz_module_exit (void) { - hrz_dev * dev; PRINTD (DBG_FLOW, "cleanup_module"); - // paranoia - housekeeping.data = 0; - del_timer (&housekeeping); - - while (hrz_devs) { - dev = hrz_devs; - hrz_devs = dev->prev; - - PRINTD (DBG_INFO, "closing %p (atm_dev = %p)", dev, dev->atm_dev); - hrz_reset (dev); - atm_dev_deregister (dev->atm_dev); - free_irq (dev->irq, dev); - release_region (dev->iobase, HRZ_IO_EXTENT); - kfree (dev); - } - - return; + return pci_unregister_driver(&hrz_driver); } module_init(hrz_module_init); diff -Nru a/drivers/atm/horizon.h b/drivers/atm/horizon.h --- a/drivers/atm/horizon.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/atm/horizon.h 2004-10-26 18:25:18 -07:00 @@ -457,7 +457,7 @@ unsigned long unassigned_cell_count; struct pci_dev * pci_dev; - struct hrz_dev * prev; + struct timer_list housekeeping; }; typedef struct hrz_dev hrz_dev; diff -Nru a/drivers/base/Kconfig b/drivers/base/Kconfig --- a/drivers/base/Kconfig 2004-10-26 18:25:17 -07:00 +++ b/drivers/base/Kconfig 2004-10-26 18:25:17 -07:00 @@ -14,7 +14,7 @@ default y help Say yes to avoid building firmware. Firmware is usually shipped - with the driver, and only when updating the firware a rebuild + with the driver, and only when updating the firmware a rebuild should be made. If unsure say Y here. diff -Nru a/drivers/base/bus.c b/drivers/base/bus.c --- a/drivers/base/bus.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/base/bus.c 2004-10-26 18:25:17 -07:00 @@ -515,7 +515,7 @@ if (bus) { pr_debug("bus %s: add driver %s\n", bus->name, drv->name); - error = kobject_set_name(&drv->kobj, drv->name); + error = kobject_set_name(&drv->kobj, "%s", drv->name); if (error) { put_bus(bus); return error; @@ -666,7 +666,7 @@ { int retval; - retval = kobject_set_name(&bus->subsys.kset.kobj, bus->name); + retval = kobject_set_name(&bus->subsys.kset.kobj, "%s", bus->name); if (retval) goto out; diff -Nru a/drivers/base/class.c b/drivers/base/class.c --- a/drivers/base/class.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/base/class.c 2004-10-26 18:25:19 -07:00 @@ -139,7 +139,7 @@ INIT_LIST_HEAD(&cls->children); INIT_LIST_HEAD(&cls->interfaces); - error = kobject_set_name(&cls->subsys.kset.kobj, cls->name); + error = kobject_set_name(&cls->subsys.kset.kobj, "%s", cls->name); if (error) return error; @@ -368,7 +368,7 @@ class_dev->class_id); /* first, register with generic layer. */ - kobject_set_name(&class_dev->kobj, class_dev->class_id); + kobject_set_name(&class_dev->kobj, "%s", class_dev->class_id); if (parent) class_dev->kobj.parent = &parent->subsys.kset.kobj; diff -Nru a/drivers/base/core.c b/drivers/base/core.c --- a/drivers/base/core.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/base/core.c 2004-10-26 18:25:17 -07:00 @@ -221,7 +221,7 @@ pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id); /* first, register with generic layer. */ - kobject_set_name(&dev->kobj, dev->bus_id); + kobject_set_name(&dev->kobj, "%s", dev->bus_id); if (parent) dev->kobj.parent = &parent->kobj; diff -Nru a/drivers/base/cpu.c b/drivers/base/cpu.c --- a/drivers/base/cpu.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/base/cpu.c 2004-10-26 18:25:17 -07:00 @@ -32,6 +32,8 @@ switch (buf[0]) { case '0': ret = cpu_down(cpu->sysdev.id); + if (!ret) + kobject_hotplug(&dev->kobj, KOBJ_OFFLINE); break; case '1': ret = cpu_up(cpu->sysdev.id); diff -Nru a/drivers/block/floppy.c b/drivers/block/floppy.c --- a/drivers/block/floppy.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/block/floppy.c 2004-10-26 18:25:17 -07:00 @@ -4286,6 +4286,13 @@ } use_virtual_dma = can_use_virtual_dma & 1; +#if defined(CONFIG_PPC64) + if (check_legacy_ioport(FDC1)) { + del_timer(&fd_timeout); + err = -ENODEV; + goto out_unreg_region; + } +#endif fdc_state[0].address = FDC1; if (fdc_state[0].address == -1) { del_timer(&fd_timeout); diff -Nru a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c --- a/drivers/block/ll_rw_blk.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/block/ll_rw_blk.c 2004-10-26 18:25:17 -07:00 @@ -2685,22 +2685,36 @@ { struct bio *bio, *prevbio = NULL; int nr_phys_segs, nr_hw_segs; + unsigned int phys_size, hw_size; + request_queue_t *q = rq->q; if (!rq->bio) return; - nr_phys_segs = nr_hw_segs = 0; + phys_size = hw_size = nr_phys_segs = nr_hw_segs = 0; rq_for_each_bio(bio, rq) { /* Force bio hw/phys segs to be recalculated. */ bio->bi_flags &= ~(1 << BIO_SEG_VALID); - nr_phys_segs += bio_phys_segments(rq->q, bio); - nr_hw_segs += bio_hw_segments(rq->q, bio); + nr_phys_segs += bio_phys_segments(q, bio); + nr_hw_segs += bio_hw_segments(q, bio); if (prevbio) { - if (blk_phys_contig_segment(rq->q, prevbio, bio)) + int pseg = phys_size + prevbio->bi_size + bio->bi_size; + int hseg = hw_size + prevbio->bi_size + bio->bi_size; + + if (blk_phys_contig_segment(q, prevbio, bio) && + pseg <= q->max_segment_size) { nr_phys_segs--; - if (blk_hw_contig_segment(rq->q, prevbio, bio)) + phys_size += prevbio->bi_size + bio->bi_size; + } else + phys_size = 0; + + if (blk_hw_contig_segment(q, prevbio, bio) && + hseg <= q->max_segment_size) { nr_hw_segs--; + hw_size += prevbio->bi_size + bio->bi_size; + } else + hw_size = 0; } prevbio = bio; } diff -Nru a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c --- a/drivers/block/pktcdvd.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/block/pktcdvd.c 2004-10-26 18:25:17 -07:00 @@ -621,7 +621,7 @@ BUG_ON(len < 0); memcpy(vto, vfrom, len); - kunmap_atomic(src_bvl->bv_page, KM_USER0); + kunmap_atomic(vfrom, KM_USER0); seg++; offs = 0; @@ -649,7 +649,7 @@ void *vfrom = kmap_atomic(pages[f], KM_USER0) + offsets[f]; void *vto = page_address(pkt->pages[p]) + offs; memcpy(vto, vfrom, CD_FRAMESIZE); - kunmap_atomic(pages[f], KM_USER0); + kunmap_atomic(vfrom, KM_USER0); pages[f] = pkt->pages[p]; offsets[f] = offs; } else { diff -Nru a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c --- a/drivers/cdrom/cdrom.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/cdrom/cdrom.c 2004-10-26 18:25:17 -07:00 @@ -296,12 +296,12 @@ static int check_media_type; /* automatically restart mrw format */ static int mrw_format_restart = 1; -MODULE_PARM(debug, "i"); -MODULE_PARM(autoclose, "i"); -MODULE_PARM(autoeject, "i"); -MODULE_PARM(lockdoor, "i"); -MODULE_PARM(check_media_type, "i"); -MODULE_PARM(mrw_format_restart, "i"); +module_param(debug, bool, 0); +module_param(autoclose, bool, 0); +module_param(autoeject, bool, 0); +module_param(lockdoor, bool, 0); +module_param(check_media_type, bool, 0); +module_param(mrw_format_restart, bool, 0); static spinlock_t cdrom_lock = SPIN_LOCK_UNLOCKED; diff -Nru a/drivers/char/cyclades.c b/drivers/char/cyclades.c --- a/drivers/char/cyclades.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/char/cyclades.c 2004-10-26 18:25:17 -07:00 @@ -5551,7 +5551,7 @@ } for (j = 1; j <= ints[0]; j++){ if ( i < NR_ISA_ADDRS ){ - cy_isa_addresses[i++] = (unsigned char *)(ints[j]); + cy_isa_addresses[i++] = ints[j]; } } #endif /* CONFIG_ISA */ diff -Nru a/drivers/char/hw_random.c b/drivers/char/hw_random.c --- a/drivers/char/hw_random.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/char/hw_random.c 2004-10-26 18:25:17 -07:00 @@ -581,7 +581,7 @@ DPRINTK ("ENTER\n"); /* Probe for Intel, AMD RNGs */ - while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) { + for_each_pci_dev(pdev) { ent = pci_match_device (rng_pci_tbl, pdev); if (ent) { rng_ops = &rng_vendor_ops[ent->driver_data]; diff -Nru a/drivers/char/lp.c b/drivers/char/lp.c --- a/drivers/char/lp.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/char/lp.c 2004-10-26 18:25:17 -07:00 @@ -749,8 +749,8 @@ static char *parport[LP_NO] = { NULL, }; static int reset = 0; -MODULE_PARM(parport, "1-" __MODULE_STRING(LP_NO) "s"); -MODULE_PARM(reset, "i"); +module_param_array(parport, charp, NULL, 0); +module_param(reset, bool, 0); #ifndef MODULE static int __init lp_setup (char *str) diff -Nru a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c --- a/drivers/char/mmtimer.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/char/mmtimer.c 2004-10-26 18:25:18 -07:00 @@ -103,13 +103,13 @@ break; case MMTIMER_GETRES: /* resolution of the clock in 10^-15 s */ - if(copy_to_user((unsigned long *)arg, &mmtimer_femtoperiod, - sizeof(unsigned long))) + if(copy_to_user((unsigned long __user *)arg, + &mmtimer_femtoperiod, sizeof(unsigned long))) return -EFAULT; break; case MMTIMER_GETFREQ: /* frequency in Hz */ - if(copy_to_user((unsigned long *)arg, + if(copy_to_user((unsigned long __user *)arg, &sn_rtc_cycles_per_second, sizeof(unsigned long))) return -EFAULT; @@ -125,8 +125,8 @@ break; case MMTIMER_GETCOUNTER: - if(copy_to_user((unsigned long *)arg, RTC_COUNTER_ADDR, - sizeof(unsigned long))) + if(copy_to_user((unsigned long __user *)arg, + RTC_COUNTER_ADDR, sizeof(unsigned long))) return -EFAULT; break; default: diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c --- a/drivers/char/tty_io.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/char/tty_io.c 2004-10-26 18:25:18 -07:00 @@ -168,8 +168,7 @@ static inline void free_tty_struct(struct tty_struct *tty) { - if (tty->write_buf) - kfree(tty->write_buf); + kfree(tty->write_buf); kfree(tty); } @@ -1060,6 +1059,7 @@ up(&tty->atomic_write); return -ENOMEM; } + kfree(tty->write_buf); tty->write_cnt = chunk; tty->write_buf = buf; } @@ -2148,11 +2148,11 @@ static int send_break(struct tty_struct *tty, int duration) { - set_current_state(TASK_INTERRUPTIBLE); - tty->driver->break_ctl(tty, -1); - if (!signal_pending(current)) + if (!signal_pending(current)) { + set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(duration); + } tty->driver->break_ctl(tty, 0); if (signal_pending(current)) return -EINTR; diff -Nru a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c --- a/drivers/firmware/efivars.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/firmware/efivars.c 2004-10-26 18:25:18 -07:00 @@ -640,7 +640,7 @@ *(short_name + strlen(short_name)) = '-'; efi_guid_unparse(vendor_guid, short_name + strlen(short_name)); - kobject_set_name(&new_efivar->kobj, short_name); + kobject_set_name(&new_efivar->kobj, "%s", short_name); kobj_set_kset_s(new_efivar, vars_subsys); kobject_register(&new_efivar->kobj); diff -Nru a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c --- a/drivers/firmware/pcdp.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/firmware/pcdp.c 2004-10-26 18:25:17 -07:00 @@ -98,8 +98,8 @@ if (uart_irq_supported(rev, uart)) { port.irq = acpi_register_gsi(uart->gsi, - uart_active_high_low(rev, uart), - uart_edge_level(rev, uart)); + uart_edge_level(rev, uart), + uart_active_high_low(rev, uart)); port.flags |= UPF_AUTO_IRQ; /* some FW reported wrong GSI */ if (uart_pci(rev, uart)) port.flags |= UPF_SHARE_IRQ; diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig --- a/drivers/i2c/busses/Kconfig 2004-10-26 18:25:18 -07:00 +++ b/drivers/i2c/busses/Kconfig 2004-10-26 18:25:18 -07:00 @@ -339,7 +339,7 @@ config SCx200_ACB tristate "NatSemi SCx200 ACCESS.bus" - depends on I2C + depends on I2C && PCI help Enable the use of the ACCESS.bus controllers of a SCx200 processor. diff -Nru a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c --- a/drivers/ide/arm/icside.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/arm/icside.c 2004-10-26 18:25:18 -07:00 @@ -212,33 +212,18 @@ ide_hwif_t *hwif = drive->hwif; struct icside_state *state = hwif->hwif_data; struct scatterlist *sg = hwif->sg_table; - int nents; - if (rq->flags & REQ_DRIVE_TASKFILE) { - ide_task_t *args = rq->special; + ide_map_sg(drive, rq); - if (args->command_type == IDE_DRIVE_TASK_RAW_WRITE) - hwif->sg_dma_direction = DMA_TO_DEVICE; - else - hwif->sg_dma_direction = DMA_FROM_DEVICE; - - sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE); - nents = 1; - } else { - nents = blk_rq_map_sg(drive->queue, rq, sg); - - if (rq_data_dir(rq) == READ) - hwif->sg_dma_direction = DMA_FROM_DEVICE; - else - hwif->sg_dma_direction = DMA_TO_DEVICE; - } - - nents = dma_map_sg(state->dev, sg, nents, hwif->sg_dma_direction); + if (rq_data_dir(rq) == READ) + hwif->sg_dma_direction = DMA_FROM_DEVICE; + else + hwif->sg_dma_direction = DMA_TO_DEVICE; - hwif->sg_nents = nents; + hwif->sg_nents = dma_map_sg(state->dev, sg, hwif->sg_nents, + hwif->sg_dma_direction); } - /* * Configure the IOMD to give the appropriate timings for the transfer * mode being requested. We take the advice of the ATA standards, and @@ -498,14 +483,6 @@ ICS_ARCIN_V6_INTRSTAT_1)) & 1; } -static int icside_dma_verbose(ide_drive_t *drive) -{ - printk(", %s (peak %dMB/s)", - ide_xfer_verbose(drive->current_speed), - 2000 / drive->drive_data); - return 1; -} - static int icside_dma_timeout(ide_drive_t *drive) { printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name); @@ -554,7 +531,6 @@ hwif->dma_start = icside_dma_start; hwif->ide_dma_end = icside_dma_end; hwif->ide_dma_test_irq = icside_dma_test_irq; - hwif->ide_dma_verbose = icside_dma_verbose; hwif->ide_dma_timeout = icside_dma_timeout; hwif->ide_dma_lostirq = icside_dma_lostirq; diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c --- a/drivers/ide/ide-cd.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/ide-cd.c 2004-10-26 18:25:18 -07:00 @@ -3039,10 +3039,9 @@ printk(", %dkB Cache", be16_to_cpu(cap.buffer_size)); -#ifdef CONFIG_BLK_DEV_IDEDMA if (drive->using_dma) - (void) HWIF(drive)->ide_dma_verbose(drive); -#endif /* CONFIG_BLK_DEV_IDEDMA */ + ide_dma_verbose(drive); + printk("\n"); return nslots; @@ -3433,7 +3432,7 @@ /* options */ char *ignore = NULL; -MODULE_PARM(ignore, "s"); +module_param(ignore, charp, 0400); MODULE_DESCRIPTION("ATAPI CD-ROM Driver"); static int ide_cdrom_attach (ide_drive_t *drive) diff -Nru a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c --- a/drivers/ide/ide-disk.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/ide-disk.c 2004-10-26 18:25:17 -07:00 @@ -1244,7 +1244,7 @@ printk(", CHS=%d/%d/%d", drive->bios_cyl, drive->bios_head, drive->bios_sect); if (drive->using_dma) - (void) HWIF(drive)->ide_dma_verbose(drive); + ide_dma_verbose(drive); printk("\n"); drive->mult_count = 0; diff -Nru a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c --- a/drivers/ide/ide-dma.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/ide-dma.c 2004-10-26 18:25:18 -07:00 @@ -207,67 +207,23 @@ { ide_hwif_t *hwif = HWIF(drive); struct scatterlist *sg = hwif->sg_table; - int nents; - nents = blk_rq_map_sg(drive->queue, rq, hwif->sg_table); - + if ((rq->flags & REQ_DRIVE_TASKFILE) && rq->nr_sectors > 256) + BUG(); + + ide_map_sg(drive, rq); + if (rq_data_dir(rq) == READ) hwif->sg_dma_direction = PCI_DMA_FROMDEVICE; else hwif->sg_dma_direction = PCI_DMA_TODEVICE; - return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction); + return pci_map_sg(hwif->pci_dev, sg, hwif->sg_nents, hwif->sg_dma_direction); } EXPORT_SYMBOL_GPL(ide_build_sglist); /** - * ide_raw_build_sglist - map IDE scatter gather for DMA - * @drive: the drive to build the DMA table for - * @rq: the request holding the sg list - * - * Perform the PCI mapping magic necessary to access the source or - * target buffers of a taskfile request via PCI DMA. The lower layers - * of the kernel provide the necessary cache management so that we can - * operate in a portable fashion - */ - -int ide_raw_build_sglist(ide_drive_t *drive, struct request *rq) -{ - ide_hwif_t *hwif = HWIF(drive); - struct scatterlist *sg = hwif->sg_table; - int nents = 0; - ide_task_t *args = rq->special; - u8 *virt_addr = rq->buffer; - int sector_count = rq->nr_sectors; - - if (args->command_type == IDE_DRIVE_TASK_RAW_WRITE) - hwif->sg_dma_direction = PCI_DMA_TODEVICE; - else - hwif->sg_dma_direction = PCI_DMA_FROMDEVICE; - -#if 1 - if (sector_count > 256) - BUG(); - - if (sector_count > 128) { -#else - while (sector_count > 128) { -#endif - sg_init_one(&sg[nents], virt_addr, 128 * SECTOR_SIZE); - nents++; - virt_addr = virt_addr + (128 * SECTOR_SIZE); - sector_count -= 128; - } - sg_init_one(&sg[nents], virt_addr, sector_count * SECTOR_SIZE); - nents++; - - return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction); -} - -EXPORT_SYMBOL_GPL(ide_raw_build_sglist); - -/** * ide_build_dmatable - build IDE DMA table * * ide_build_dmatable() prepares a dma request. We map the command @@ -288,10 +244,7 @@ int i; struct scatterlist *sg; - if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) - hwif->sg_nents = i = ide_raw_build_sglist(drive, rq); - else - hwif->sg_nents = i = ide_build_sglist(drive, rq); + hwif->sg_nents = i = ide_build_sglist(drive, rq); if (!i) return 0; @@ -728,17 +681,14 @@ EXPORT_SYMBOL(__ide_dma_good_drive); -#ifdef CONFIG_BLK_DEV_IDEDMA_PCI -int __ide_dma_verbose (ide_drive_t *drive) +void ide_dma_verbose(ide_drive_t *drive) { struct hd_driveid *id = drive->id; ide_hwif_t *hwif = HWIF(drive); if (id->field_valid & 4) { - if ((id->dma_ultra >> 8) && (id->dma_mword >> 8)) { - printk(", BUG DMA OFF"); - return hwif->ide_dma_off_quietly(drive); - } + if ((id->dma_ultra >> 8) && (id->dma_mword >> 8)) + goto bug_dma_off; if (id->dma_ultra & ((id->dma_ultra >> 8) & hwif->ultra_mask)) { if (((id->dma_ultra >> 11) & 0x1F) && eighty_ninty_three(drive)) { @@ -768,19 +718,22 @@ printk(", (U)DMA"); /* Can be BIOS-enabled! */ } } else if (id->field_valid & 2) { - if ((id->dma_mword >> 8) && (id->dma_1word >> 8)) { - printk(", BUG DMA OFF"); - return hwif->ide_dma_off_quietly(drive); - } + if ((id->dma_mword >> 8) && (id->dma_1word >> 8)) + goto bug_dma_off; printk(", DMA"); } else if (id->field_valid & 1) { printk(", BUG"); } - return 1; + return; +bug_dma_off: + printk(", BUG DMA OFF"); + hwif->ide_dma_off_quietly(drive); + return; } -EXPORT_SYMBOL(__ide_dma_verbose); +EXPORT_SYMBOL(ide_dma_verbose); +#ifdef CONFIG_BLK_DEV_IDEDMA_PCI int __ide_dma_lostirq (ide_drive_t *drive) { printk("%s: DMA interrupt recovery\n", drive->name); @@ -955,8 +908,6 @@ hwif->ide_dma_end = &__ide_dma_end; if (!hwif->ide_dma_test_irq) hwif->ide_dma_test_irq = &__ide_dma_test_irq; - if (!hwif->ide_dma_verbose) - hwif->ide_dma_verbose = &__ide_dma_verbose; if (!hwif->ide_dma_timeout) hwif->ide_dma_timeout = &__ide_dma_timeout; if (!hwif->ide_dma_lostirq) diff -Nru a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c --- a/drivers/ide/ide-io.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/ide-io.c 2004-10-26 18:25:18 -07:00 @@ -680,6 +680,9 @@ ide_hwif_t *hwif = drive->hwif; struct scatterlist *sg = hwif->sg_table; + if (hwif->sg_mapped) /* needed by ide-scsi */ + return; + if ((rq->flags & REQ_DRIVE_TASKFILE) == 0) { hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg); } else { @@ -1219,12 +1222,15 @@ HWGROUP(drive)->rq = NULL; rq->errors = 0; + + if (!rq->bio) + goto out; + rq->sector = rq->bio->bi_sector; rq->current_nr_sectors = bio_iovec(rq->bio)->bv_len >> 9; rq->hard_cur_sectors = rq->current_nr_sectors; - if (rq->bio) - rq->buffer = NULL; - + rq->buffer = NULL; +out: return ret; } diff -Nru a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c --- a/drivers/ide/ide-proc.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/ide-proc.c 2004-10-26 18:25:18 -07:00 @@ -8,37 +8,6 @@ /* * This is the /proc/ide/ filesystem implementation. * - * The major reason this exists is to provide sufficient access - * to driver and config data, such that user-mode programs can - * be developed to handle chipset tuning for most PCI interfaces. - * This should provide better utilities, and less kernel bloat. - * - * The entire pci config space for a PCI interface chipset can be - * retrieved by just reading it. e.g. "cat /proc/ide3/config" - * - * To modify registers *safely*, do something like: - * echo "P40:88" >/proc/ide/ide3/config - * That expression writes 0x88 to pci config register 0x40 - * on the chip which controls ide3. Multiple tuples can be issued, - * and the writes will be completed as an atomic set: - * echo "P40:88 P41:35 P42:00 P43:00" >/proc/ide/ide3/config - * - * All numbers must be specified using pairs of ascii hex digits. - * It is important to note that these writes will be performed - * after waiting for the IDE controller (both interfaces) - * to be completely idle, to ensure no corruption of I/O in progress. - * - * Non-PCI registers can also be written, using "R" in place of "P" - * in the above examples. The size of the port transfer is determined - * by the number of pairs of hex digits given for the data. If a two - * digit value is given, the write will be a byte operation; if four - * digits are used, the write will be performed as a 16-bit operation; - * and if eight digits are specified, a 32-bit "dword" write will be - * performed. Odd numbers of digits are not permitted. - * - * If there is an error *anywhere* in the string of registers/data - * then *none* of the writes will be performed. - * * Drive/Driver settings can be retrieved by reading the drive's * "settings" files. e.g. "cat /proc/ide0/hda/settings" * To write a new value "val" into a specific setting "name", use: @@ -51,10 +20,6 @@ * returned data as 256 16-bit words. The "hdparm" utility will * be updated someday soon to use this mechanism. * - * Feel free to develop and distribute fancy GUI configuration - * utilities for your favorite PCI chipsets. I'll be working on - * one for the Promise 20246 someday soon. -ml - * */ #include @@ -74,227 +39,6 @@ #include -static int proc_ide_write_config(struct file *file, const char __user *buffer, - unsigned long count, void *data) -{ - ide_hwif_t *hwif = (ide_hwif_t *)data; - ide_hwgroup_t *mygroup = (ide_hwgroup_t *)(hwif->hwgroup); - ide_hwgroup_t *mategroup = NULL; - unsigned long timeout; - unsigned long flags; - const char *start = NULL, *msg = NULL; - struct entry { u32 val; u16 reg; u8 size; u8 pci; } *prog, *q, *r; - int want_pci = 0; - char *buf, *s; - int err; - - if (hwif->mate && hwif->mate->hwgroup) - mategroup = (ide_hwgroup_t *)(hwif->mate->hwgroup); - - if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) - return -EACCES; - - if (count >= PAGE_SIZE) - return -EINVAL; - - s = buf = (char *)__get_free_page(GFP_USER); - if (!buf) - return -ENOMEM; - - err = -ENOMEM; - q = prog = (struct entry *)__get_free_page(GFP_USER); - if (!prog) - goto out; - - err = -EFAULT; - if (copy_from_user(buf, buffer, count)) - goto out1; - - buf[count] = '\0'; - - while (isspace(*s)) - s++; - - while (*s) { - char *p; - int digits; - - start = s; - - if ((char *)(q + 1) > (char *)prog + PAGE_SIZE) { - msg = "too many entries"; - goto parse_error; - } - - switch (*s++) { - case 'R': q->pci = 0; - break; - case 'P': q->pci = 1; - want_pci = 1; - break; - default: msg = "expected 'R' or 'P'"; - goto parse_error; - } - - q->reg = simple_strtoul(s, &p, 16); - digits = p - s; - if (!digits || digits > 4 || (q->pci && q->reg > 0xff)) { - msg = "bad/missing register number"; - goto parse_error; - } - if (*p++ != ':') { - msg = "missing ':'"; - goto parse_error; - } - q->val = simple_strtoul(p, &s, 16); - digits = s - p; - if (digits != 2 && digits != 4 && digits != 8) { - msg = "bad data, 2/4/8 digits required"; - goto parse_error; - } - q->size = digits / 2; - - if (q->pci) { -#ifdef CONFIG_BLK_DEV_IDEPCI - if (q->reg & (q->size - 1)) { - msg = "misaligned access"; - goto parse_error; - } -#else - msg = "not a PCI device"; - goto parse_error; -#endif /* CONFIG_BLK_DEV_IDEPCI */ - } - - q++; - - if (*s && !isspace(*s++)) { - msg = "expected whitespace after data"; - goto parse_error; - } - while (isspace(*s)) - s++; - } - - /* - * What follows below is fucking insane, even for IDE people. - * For now I've dealt with the obvious problems on the parsing - * side, but IMNSHO we should simply remove the write access - * to /proc/ide/.../config, killing that FPOS completely. - */ - - err = -EBUSY; - timeout = jiffies + (3 * HZ); - spin_lock_irqsave(&ide_lock, flags); - while (mygroup->busy || - (mategroup && mategroup->busy)) { - spin_unlock_irqrestore(&ide_lock, flags); - if (time_after(jiffies, timeout)) { - printk("/proc/ide/%s/config: channel(s) busy, cannot write\n", hwif->name); - goto out1; - } - spin_lock_irqsave(&ide_lock, flags); - } - -#ifdef CONFIG_BLK_DEV_IDEPCI - if (want_pci && (!hwif->pci_dev || hwif->pci_dev->vendor)) { - spin_unlock_irqrestore(&ide_lock, flags); - printk("proc_ide: PCI registers not accessible for %s\n", - hwif->name); - err = -EINVAL; - goto out1; - } -#endif /* CONFIG_BLK_DEV_IDEPCI */ - - for (r = prog; r < q; r++) { - unsigned int reg = r->reg, val = r->val; - if (r->pci) { -#ifdef CONFIG_BLK_DEV_IDEPCI - int rc = 0; - struct pci_dev *dev = hwif->pci_dev; - switch (q->size) { - case 1: msg = "byte"; - rc = pci_write_config_byte(dev, reg, val); - break; - case 2: msg = "word"; - rc = pci_write_config_word(dev, reg, val); - break; - case 4: msg = "dword"; - rc = pci_write_config_dword(dev, reg, val); - break; - } - if (rc) { - spin_unlock_irqrestore(&ide_lock, flags); - printk("proc_ide_write_config: error writing %s at bus %02x dev %02x reg 0x%x value 0x%x\n", - msg, dev->bus->number, dev->devfn, reg, val); - printk("proc_ide_write_config: error %d\n", rc); - err = -EIO; - goto out1; - } -#endif /* CONFIG_BLK_DEV_IDEPCI */ - } else { /* not pci */ - switch (r->size) { - case 1: hwif->OUTB(val, reg); - break; - case 2: hwif->OUTW(val, reg); - break; - case 4: hwif->OUTL(val, reg); - break; - } - } - } - spin_unlock_irqrestore(&ide_lock, flags); - err = count; -out1: - free_page((unsigned long)prog); -out: - free_page((unsigned long)buf); - return err; - -parse_error: - printk("parse error\n"); - printk("proc_ide: error: %s: '%s'\n", msg, start); - err = -EINVAL; - goto out1; -} - -static int proc_ide_read_config - (char *page, char **start, off_t off, int count, int *eof, void *data) -{ - char *out = page; - int len; - -#ifdef CONFIG_BLK_DEV_IDEPCI - ide_hwif_t *hwif = (ide_hwif_t *)data; - struct pci_dev *dev = hwif->pci_dev; - if ((hwif->pci_dev && hwif->pci_dev->vendor) && dev && dev->bus) { - int reg = 0; - - out += sprintf(out, "pci bus %02x device %02x vendor %04x " - "device %04x channel %d\n", - dev->bus->number, dev->devfn, - hwif->pci_dev->vendor, hwif->pci_dev->device, - hwif->channel); - do { - u8 val; - int rc = pci_read_config_byte(dev, reg, &val); - if (rc) { - printk("proc_ide_read_config: error %d reading" - " bus %02x dev %02x reg 0x%02x\n", - rc, dev->bus->number, dev->devfn, reg); - out += sprintf(out, "??%c", - (++reg & 0xf) ? ' ' : '\n'); - } else - out += sprintf(out, "%02x%c", - val, (++reg & 0xf) ? ' ' : '\n'); - } while (reg < 0x100); - } else -#endif /* CONFIG_BLK_DEV_IDEPCI */ - out += sprintf(out, "(none)\n"); - len = out - page; - PROC_IDE_READ_RETURN(page,start,off,count,eof,len); -} - static int proc_ide_read_imodel (char *page, char **start, off_t off, int count, int *eof, void *data) { @@ -687,7 +431,6 @@ static ide_proc_entry_t hwif_entries[] = { { "channel", S_IFREG|S_IRUGO, proc_ide_read_channel, NULL }, - { "config", S_IFREG|S_IRUGO|S_IWUSR,proc_ide_read_config, proc_ide_write_config }, { "mate", S_IFREG|S_IRUGO, proc_ide_read_mate, NULL }, { "model", S_IFREG|S_IRUGO, proc_ide_read_imodel, NULL }, { NULL, 0, NULL, NULL } diff -Nru a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c --- a/drivers/ide/ide-taskfile.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/ide-taskfile.c 2004-10-26 18:25:17 -07:00 @@ -304,7 +304,7 @@ else taskfile_input_data(drive, buf, SECTOR_WORDS); - kunmap_atomic(page, KM_BIO_SRC_IRQ); + kunmap_atomic(buf, KM_BIO_SRC_IRQ); #ifdef CONFIG_HIGHMEM local_irq_restore(flags); #endif diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c --- a/drivers/ide/ide.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/ide.c 2004-10-26 18:25:17 -07:00 @@ -694,7 +694,6 @@ hwif->ide_dma_test_irq = tmp_hwif->ide_dma_test_irq; hwif->ide_dma_host_on = tmp_hwif->ide_dma_host_on; hwif->ide_dma_host_off = tmp_hwif->ide_dma_host_off; - hwif->ide_dma_verbose = tmp_hwif->ide_dma_verbose; hwif->ide_dma_lostirq = tmp_hwif->ide_dma_lostirq; hwif->ide_dma_timeout = tmp_hwif->ide_dma_timeout; diff -Nru a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c --- a/drivers/ide/pci/aec62xx.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/pci/aec62xx.c 2004-10-26 18:25:18 -07:00 @@ -18,52 +18,7 @@ #include "aec62xx.h" -#if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 aec62xx_proc = 0; - -#define AEC_MAX_DEVS 5 - -static struct pci_dev *aec_devs[AEC_MAX_DEVS]; -static int n_aec_devs; - -static int aec62xx_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - char *chipset_nums[] = {"error", "error", "error", "error", - "error", "error", "850UF", "860", - "860R", "865", "865R", "error" }; - int len; - int i; - - for (i = 0; i < n_aec_devs; i++) { - struct pci_dev *dev = aec_devs[i]; - unsigned long iobase = pci_resource_start(dev, 4); - u8 c0 = 0, c1 = 0, art = 0; - - c0 = inb(iobase + 0x02); - c1 = inb(iobase + 0x0a); - - p += sprintf(p, "\nController: %d\n", i); - p += sprintf(p, "Chipset: AEC%s\n", chipset_nums[dev->device]); - - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - (void) pci_read_config_byte(dev, 0x4a, &art); - p += sprintf(p, " %sabled ", - (art&0x02)?" en":"dis"); - p += sprintf(p, " %sabled\n", - (art&0x04)?" en":"dis"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s ", - (c0&0x20)?"yes":"no ",(c0&0x40)?"yes":"no "); - p += sprintf(p, " %s %s\n", - (c1&0x20)?"yes":"no ",(c1&0x40)?"yes":"no "); - +#if 0 if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) { (void) pci_read_config_byte(dev, 0x54, &art); p += sprintf(p, "DMA Mode: %s(%s)", @@ -79,59 +34,7 @@ (c1&0x40)?((art&0xc0)?"UDMA":" DMA"):" PIO", (art&0x80)?"2":(art&0x40)?"1":"0"); } else { - /* - * case PCI_DEVICE_ID_ARTOP_ATP860: - * case PCI_DEVICE_ID_ARTOP_ATP860R: - * case PCI_DEVICE_ID_ARTOP_ATP865: - * case PCI_DEVICE_ID_ARTOP_ATP865R: - */ - (void) pci_read_config_byte(dev, 0x44, &art); - p += sprintf(p, "DMA Mode: %s(%s)", - (c0&0x20)?((art&0x07)?"UDMA":" DMA"):" PIO", - ((art&0x07)==0x07)?"6": - ((art&0x06)==0x06)?"5": - ((art&0x05)==0x05)?"4": - ((art&0x04)==0x04)?"3": - ((art&0x03)==0x03)?"2": - ((art&0x02)==0x02)?"1": - ((art&0x01)==0x01)?"0":"?"); - p += sprintf(p, " %s(%s)", - (c0&0x40)?((art&0x70)?"UDMA":" DMA"):" PIO", - ((art&0x70)==0x70)?"6": - ((art&0x60)==0x60)?"5": - ((art&0x50)==0x50)?"4": - ((art&0x40)==0x40)?"3": - ((art&0x30)==0x30)?"2": - ((art&0x20)==0x20)?"1": - ((art&0x10)==0x10)?"0":"?"); - (void) pci_read_config_byte(dev, 0x45, &art); - p += sprintf(p, " %s(%s)", - (c1&0x20)?((art&0x07)?"UDMA":" DMA"):" PIO", - ((art&0x07)==0x07)?"6": - ((art&0x06)==0x06)?"5": - ((art&0x05)==0x05)?"4": - ((art&0x04)==0x04)?"3": - ((art&0x03)==0x03)?"2": - ((art&0x02)==0x02)?"1": - ((art&0x01)==0x01)?"0":"?"); - p += sprintf(p, " %s(%s)\n", - (c1&0x40)?((art&0x70)?"UDMA":" DMA"):" PIO", - ((art&0x70)==0x70)?"6": - ((art&0x60)==0x60)?"5": - ((art&0x50)==0x50)?"4": - ((art&0x40)==0x40)?"3": - ((art&0x30)==0x30)?"2": - ((art&0x20)==0x20)?"1": - ((art&0x10)==0x10)?"0":"?"); - } - } - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_AEC62xx_TIMINGS) && defined(CONFIG_PROC_FS) */ +#endif /* * TO DO: active tuning and correction of cards without a bios. @@ -374,15 +277,6 @@ pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start); } - -#if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS) - aec_devs[n_aec_devs++] = dev; - - if (!aec62xx_proc) { - aec62xx_proc = 1; - ide_pci_create_host_proc("aec62xx", aec62xx_get_info); - } -#endif /* DISPLAY_AEC62XX_TIMINGS && CONFIG_PROC_FS */ if (bus_speed <= 33) pci_set_drvdata(dev, (void *) aec6xxx_33_base); diff -Nru a/drivers/ide/pci/aec62xx.h b/drivers/ide/pci/aec62xx.h --- a/drivers/ide/pci/aec62xx.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/pci/aec62xx.h 2004-10-26 18:25:18 -07:00 @@ -5,8 +5,6 @@ #include #include -#define DISPLAY_AEC62XX_TIMINGS - struct chipset_bus_clock_list_entry { byte xfer_speed; byte chipset_settings; diff -Nru a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c --- a/drivers/ide/pci/atiixp.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/pci/atiixp.c 2004-10-26 18:25:18 -07:00 @@ -47,102 +47,6 @@ static int save_mdma_mode[4]; -#define DISPLAY_ATIIXP_TIMINGS - -#if defined(DISPLAY_ATIIXP_TIMINGS) && defined(CONFIG_PROC_FS) - -#include -#include - -static u8 atiixp_proc; -static struct pci_dev *bmide_dev; - -/** - * atiixp_get_info - fill in /proc for ATIIXP IDE - * @buffer: buffer to fill - * @addr: address of user start in buffer - * @offset: offset into 'file' - * @count: buffer count - * - * Output summary data on the tuning. - */ - -static int atiixp_get_info(char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - struct pci_dev *dev = bmide_dev; - unsigned long bibma = pci_resource_start(dev, 4); - u32 mdma_timing = 0; - u16 udma_mode = 0, pio_mode = 0; - u8 c0, c1, udma_control = 0; - - p += sprintf(p, "\n ATI "); - p += sprintf(p, "ATIIXP Ultra100 IDE Chipset.\n"); - - pci_read_config_byte(dev, ATIIXP_IDE_UDMA_CONTROL, &udma_control); - pci_read_config_word(dev, ATIIXP_IDE_UDMA_MODE, &udma_mode); - pci_read_config_word(dev, ATIIXP_IDE_PIO_MODE, &pio_mode); - pci_read_config_dword(dev, ATIIXP_IDE_MDMA_TIMING, &mdma_timing); - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb(bibma + 0x02); - c1 = inb(bibma + 0x0a); - - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0 & 0x80) ? "dis" : " en", - (c1 & 0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0 & 0x20) ? "yes" : "no ", - (c0 & 0x40) ? "yes" : "no ", - (c1 & 0x20) ? "yes" : "no ", - (c1 & 0x40) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - (udma_control & 0x01) ? "yes" : "no ", - (udma_control & 0x02) ? "yes" : "no ", - (udma_control & 0x04) ? "yes" : "no ", - (udma_control & 0x08) ? "yes" : "no " ); - p += sprintf(p, "UDMA mode: %c %c " - " %c %c\n", - (udma_control & 0x01) ? - ((udma_mode & 0x07) + 48) : 'X', - (udma_control & 0x02) ? - (((udma_mode >> 4) & 0x07) + 48) : 'X', - (udma_control & 0x04) ? - (((udma_mode >> 8) & 0x07) + 48) : 'X', - (udma_control & 0x08) ? - (((udma_mode >> 12) & 0x07) + 48) : 'X'); - p += sprintf(p, "MDMA mode: %c %c " - " %c %c\n", - (save_mdma_mode[0] && (c0 & 0x20)) ? - ((save_mdma_mode[0] & 0xf) + 48) : 'X', - (save_mdma_mode[1] && (c0 & 0x40)) ? - ((save_mdma_mode[1] & 0xf) + 48) : 'X', - (save_mdma_mode[2] && (c1 & 0x20)) ? - ((save_mdma_mode[2] & 0xf) + 48) : 'X', - (save_mdma_mode[3] && (c1 & 0x40)) ? - ((save_mdma_mode[3] & 0xf) + 48) : 'X'); - p += sprintf(p, "PIO mode: %c %c " - " %c %c\n", - (c0 & 0x20) ? 'X' : ((pio_mode & 0x07) + 48), - (c0 & 0x40) ? 'X' : (((pio_mode >> 4) & 0x07) + 48), - (c1 & 0x20) ? 'X' : (((pio_mode >> 8) & 0x07) + 48), - (c1 & 0x40) ? 'X' : (((pio_mode >> 12) & 0x07) + 48)); - - return p - buffer; /* => must be less than 4k! */ -} -#endif /* defined(DISPLAY_ATIIXP_TIMINGS) && defined(CONFIG_PROC_FS) */ - /** * atiixp_ratemask - compute rate mask for ATIIXP IDE * @drive: IDE drive to compute for @@ -397,27 +301,6 @@ } /** - * init_chipset_atiixp - set up the ATIIXP chipset - * @dev: PCI device to set up - * @name: Name of the device - * - * Initialize the PCI device as required. For the ATIIXP this turns - * out to be nice and simple - */ - -static unsigned int __devinit init_chipset_atiixp(struct pci_dev *dev, const char *name) -{ -#if defined(DISPLAY_ATIIXP_TIMINGS) && defined(CONFIG_PROC_FS) - if (!atiixp_proc) { - atiixp_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("atiixp", atiixp_get_info); - } -#endif /* DISPLAY_ATIIXP_TIMINGS && CONFIG_PROC_FS */ - return 0; -} - -/** * init_hwif_atiixp - fill in the hwif for the ATIIXP * @hwif: IDE interface * @@ -459,7 +342,6 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = { { /* 0 */ .name = "ATIIXP", - .init_chipset = init_chipset_atiixp, .init_hwif = init_hwif_atiixp, .channels = 2, .autodma = AUTODMA, diff -Nru a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c --- a/drivers/ide/pci/cs5520.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/pci/cs5520.c 2004-10-26 18:25:17 -07:00 @@ -51,57 +51,6 @@ #include #include -#define DISPLAY_CS5520_TIMINGS - -#if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 cs5520_proc = 0; -static struct pci_dev *bmide_dev; - -static int cs5520_get_info(char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - unsigned long bmiba = pci_resource_start(bmide_dev, 2); - int len; - u8 c0 = 0, c1 = 0; - u16 reg16; - u32 reg32; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb(bmiba + 0x02); - c1 = inb(bmiba + 0x0a); - - p += sprintf(p, "\nCyrix CS55x0 IDE\n"); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - - p += sprintf(p, "\n\nTimings: \n"); - - pci_read_config_word(bmide_dev, 0x62, ®16); - p += sprintf(p, "8bit CAT/CRT : %04x\n", reg16); - pci_read_config_dword(bmide_dev, 0x64, ®32); - p += sprintf(p, "16bit Primary : %08x\n", reg32); - pci_read_config_dword(bmide_dev, 0x68, ®32); - p += sprintf(p, "16bit Secondary: %08x\n", reg32); - - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} - -#endif - struct pio_clocks { int address; @@ -144,12 +93,14 @@ printk("PIO clocking = %d\n", pio); /* FIXME: if DMA = 1 do we need to set the DMA bit here ? */ - - /* 8bit command timing for channel */ + + /* 8bit CAT/CRT - 8bit command timing for channel */ pci_write_config_byte(pdev, 0x62 + controller, (cs5520_pio_clocks[pio].recovery << 4) | (cs5520_pio_clocks[pio].assert)); - + + /* 0x64 - 16bit Primary, 0x68 - 16bit Secondary */ + /* FIXME: should these use address ? */ /* Data read timing */ pci_write_config_byte(pdev, 0x64 + 4*controller + (drive->dn&1), @@ -188,19 +139,6 @@ /* Then tell the core to use DMA operations */ return hwif->ide_dma_on(drive); } - - -static unsigned int __devinit init_chipset_cs5520(struct pci_dev *dev, const char *name) -{ -#if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS) - if (!cs5520_proc) { - cs5520_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("cs5520", cs5520_get_info); - } -#endif /* DISPLAY_CS5520_TIMINGS && CONFIG_PROC_FS */ - return 0; -} /* * We provide a callback for our nonstandard DMA location @@ -255,7 +193,6 @@ #define DECLARE_CS_DEV(name_str) \ { \ .name = name_str, \ - .init_chipset = init_chipset_cs5520, \ .init_setup_dma = cs5520_init_setup_dma, \ .init_hwif = init_hwif_cs5520, \ .channels = 2, \ @@ -294,7 +231,6 @@ printk(KERN_WARNING "cs5520: No suitable DMA available.\n"); return -ENODEV; } - init_chipset_cs5520(dev, d->name); index.all = 0xf0f0; diff -Nru a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c --- a/drivers/ide/pci/cs5530.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/pci/cs5530.c 2004-10-26 18:25:17 -07:00 @@ -31,56 +31,6 @@ #include #include -#define DISPLAY_CS5530_TIMINGS - -#if defined(DISPLAY_CS5530_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 cs5530_proc = 0; - -static struct pci_dev *bmide_dev; - -static int cs5530_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - unsigned long bibma = pci_resource_start(bmide_dev, 4); - u8 c0 = 0, c1 = 0; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - - c0 = inb_p((u16)bibma + 0x02); - c1 = inb_p((u16)bibma + 0x0a); - - p += sprintf(p, "\n " - "Cyrix 5530 Chipset.\n"); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0&0x20) ? "yes" : "no ", - (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", - (c1&0x40) ? "yes" : "no " ); - - p += sprintf(p, "UDMA\n"); - p += sprintf(p, "DMA\n"); - p += sprintf(p, "PIO\n"); - - return p-buffer; -} -#endif /* DISPLAY_CS5530_TIMINGS && CONFIG_PROC_FS */ - /** * cs5530_xfer_set_mode - set a new transfer mode at the drive * @drive: drive to tune @@ -271,14 +221,6 @@ { struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; unsigned long flags; - -#if defined(DISPLAY_CS5530_TIMINGS) && defined(CONFIG_PROC_FS) - if (!cs5530_proc) { - cs5530_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("cs5530", cs5530_get_info); - } -#endif /* DISPLAY_CS5530_TIMINGS && CONFIG_PROC_FS */ dev = NULL; while ((dev = pci_find_device(PCI_VENDOR_ID_CYRIX, PCI_ANY_ID, dev)) != NULL) { diff -Nru a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c --- a/drivers/ide/pci/hpt366.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/ide/pci/hpt366.c 2004-10-26 18:25:19 -07:00 @@ -72,49 +72,6 @@ #include "hpt366.h" -#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include -#endif /* defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) */ - -static unsigned int hpt_revision(struct pci_dev *dev); -static unsigned int hpt_minimum_revision(struct pci_dev *dev, int revision); - -#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) - -static u8 hpt366_proc = 0; -static struct pci_dev *hpt_devs[HPT366_MAX_DEVS]; -static int n_hpt_devs; - -static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - char *chipset_nums[] = {"366", "366", "368", - "370", "370A", "372", - "302", "371", "374" }; - int i, len; - - p += sprintf(p, "\n " - "HighPoint HPT366/368/370/372/374\n"); - for (i = 0; i < n_hpt_devs; i++) { - struct pci_dev *dev = hpt_devs[i]; - unsigned long iobase = dev->resource[4].start; - u32 class_rev = hpt_revision(dev); - u8 c0, c1; - - p += sprintf(p, "\nController: %d\n", i); - p += sprintf(p, "Chipset: HPT%s\n", chipset_nums[class_rev]); - p += sprintf(p, "--------------- Primary Channel " - "--------------- Secondary Channel " - "--------------\n"); - - /* get the bus master status registers */ - c0 = inb(iobase + 0x2); - c1 = inb(iobase + 0xa); - p += sprintf(p, "Enabled: %s" - " %s\n", - (c0 & 0x80) ? "no" : "yes", - (c1 & 0x80) ? "no" : "yes"); #if 0 if (hpt_minimum_revision(dev, 3)) { u8 cbl; @@ -128,16 +85,6 @@ (cbl & 0x01) ? 33 : 66); p += sprintf(p, "\n"); } -#endif - p += sprintf(p, "--------------- drive0 --------- drive1 " - "------- drive0 ---------- drive1 -------\n"); - p += sprintf(p, "DMA capable: %s %s" - " %s %s\n", - (c0 & 0x20) ? "yes" : "no ", - (c0 & 0x40) ? "yes" : "no ", - (c1 & 0x20) ? "yes" : "no ", - (c1 & 0x40) ? "yes" : "no "); - { u8 c2, c3; /* older revs don't have these registers mapped @@ -159,15 +106,7 @@ (c3 & 0x80) ? "PIO " : "off "); } } - p += sprintf(p, "\n"); - - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) */ +#endif static u32 hpt_revision (struct pci_dev *dev) { @@ -1105,15 +1044,6 @@ } if (ret) return ret; - -#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) - hpt_devs[n_hpt_devs++] = dev; - - if (!hpt366_proc) { - hpt366_proc = 1; - ide_pci_create_host_proc("hpt366", hpt366_get_info); - } -#endif /* DISPLAY_HPT366_TIMINGS && CONFIG_PROC_FS */ return dev->irq; } diff -Nru a/drivers/ide/pci/hpt366.h b/drivers/ide/pci/hpt366.h --- a/drivers/ide/pci/hpt366.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/pci/hpt366.h 2004-10-26 18:25:18 -07:00 @@ -5,8 +5,6 @@ #include #include -#define DISPLAY_HPT366_TIMINGS - /* various tuning parameters */ #define HPT_RESET_STATE_ENGINE #undef HPT_DELAY_INTERRUPT diff -Nru a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c --- a/drivers/ide/pci/pdc202xx_new.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/pci/pdc202xx_new.c 2004-10-26 18:25:18 -07:00 @@ -41,61 +41,6 @@ #define PDC202_DEBUG_CABLE 0 -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 pdcnew_proc = 0; -#define PDC202_MAX_DEVS 5 -static struct pci_dev *pdc202_devs[PDC202_MAX_DEVS]; -static int n_pdc202_devs; - -static char * pdcnew_info(char *buf, struct pci_dev *dev) -{ - char *p = buf; - - p += sprintf(p, "\n "); - switch(dev->device) { - case PCI_DEVICE_ID_PROMISE_20277: - p += sprintf(p, "SBFastTrak 133 Lite"); break; - case PCI_DEVICE_ID_PROMISE_20276: - p += sprintf(p, "MBFastTrak 133 Lite"); break; - case PCI_DEVICE_ID_PROMISE_20275: - p += sprintf(p, "MBUltra133"); break; - case PCI_DEVICE_ID_PROMISE_20271: - p += sprintf(p, "FastTrak TX2000"); break; - case PCI_DEVICE_ID_PROMISE_20270: - p += sprintf(p, "FastTrak LP/TX2/TX4"); break; - case PCI_DEVICE_ID_PROMISE_20269: - p += sprintf(p, "Ultra133 TX2"); break; - case PCI_DEVICE_ID_PROMISE_20268: - p += sprintf(p, "Ultra100 TX2"); break; - default: - p += sprintf(p, "Ultra series"); break; - break; - } - p += sprintf(p, " Chipset.\n"); - return (char *)p; -} - -static int pdcnew_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int i, len; - - for (i = 0; i < n_pdc202_devs; i++) { - struct pci_dev *dev = pdc202_devs[i]; - p = pdcnew_info(buffer, dev); - } - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) */ - - static u8 pdcnew_ratemask (ide_drive_t *drive) { u8 mode; @@ -416,15 +361,6 @@ #ifdef CONFIG_PPC_PMAC apple_kiwi_init(dev); #endif - -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) - pdc202_devs[n_pdc202_devs++] = dev; - - if (!pdcnew_proc) { - pdcnew_proc = 1; - ide_pci_create_host_proc("pdcnew", pdcnew_get_info); - } -#endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */ return dev->irq; } diff -Nru a/drivers/ide/pci/pdc202xx_new.h b/drivers/ide/pci/pdc202xx_new.h --- a/drivers/ide/pci/pdc202xx_new.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/pci/pdc202xx_new.h 2004-10-26 18:25:17 -07:00 @@ -43,8 +43,6 @@ set_2regs(0x13,(c)); \ } while(0) -#define DISPLAY_PDC202XX_TIMINGS - static void init_setup_pdcnew(struct pci_dev *, ide_pci_device_t *); static void init_setup_pdc20270(struct pci_dev *, ide_pci_device_t *); static void init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t *d); diff -Nru a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c --- a/drivers/ide/pci/pdc202xx_old.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/ide/pci/pdc202xx_old.c 2004-10-26 18:25:19 -07:00 @@ -50,68 +50,14 @@ #define PDC202_DEBUG_CABLE 0 -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 pdc202xx_proc = 0; -#define PDC202_MAX_DEVS 5 -static struct pci_dev *pdc202_devs[PDC202_MAX_DEVS]; -static int n_pdc202_devs; - -static char * pdc202xx_info (char *buf, struct pci_dev *dev) -{ - char *p = buf; - +#if 0 unsigned long bibma = pci_resource_start(dev, 4); - u32 reg60h = 0, reg64h = 0, reg68h = 0, reg6ch = 0; - u16 reg50h = 0, pmask = (1<<10), smask = (1<<11); u8 hi = 0, lo = 0; - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - u8 c0 = inb_p((u16)bibma + 0x02); - u8 c1 = inb_p((u16)bibma + 0x0a); - - u8 sc11 = inb_p((u16)bibma + 0x11); - u8 sc1a = inb_p((u16)bibma + 0x1a); - u8 sc1b = inb_p((u16)bibma + 0x1b); u8 sc1c = inb_p((u16)bibma + 0x1c); - u8 sc1d = inb_p((u16)bibma + 0x1d); u8 sc1e = inb_p((u16)bibma + 0x1e); u8 sc1f = inb_p((u16)bibma + 0x1f); - pci_read_config_word(dev, 0x50, ®50h); - pci_read_config_dword(dev, 0x60, ®60h); - pci_read_config_dword(dev, 0x64, ®64h); - pci_read_config_dword(dev, 0x68, ®68h); - pci_read_config_dword(dev, 0x6c, ®6ch); - - p += sprintf(p, "\n "); - switch(dev->device) { - case PCI_DEVICE_ID_PROMISE_20267: - p += sprintf(p, "Ultra100"); break; - case PCI_DEVICE_ID_PROMISE_20265: - p += sprintf(p, "Ultra100 on M/B"); break; - case PCI_DEVICE_ID_PROMISE_20263: - p += sprintf(p, "FastTrak 66"); break; - case PCI_DEVICE_ID_PROMISE_20262: - p += sprintf(p, "Ultra66"); break; - case PCI_DEVICE_ID_PROMISE_20246: - p += sprintf(p, "Ultra33"); - reg50h |= 0x0c00; - break; - default: - p += sprintf(p, "Ultra Series"); break; - } - p += sprintf(p, " Chipset.\n"); - - p += sprintf(p, "------------------------------- General Status " - "---------------------------------\n"); - p += sprintf(p, "Burst Mode : %sabled\n", - (sc1f & 0x01) ? "en" : "dis"); p += sprintf(p, "Host Mode : %s\n", (sc1f & 0x08) ? "Tri-Stated" : "Normal"); p += sprintf(p, "Bus Clocking : %s\n", @@ -126,70 +72,7 @@ SPLIT_BYTE(sc1e, hi, lo); p += sprintf(p, "Status Polling Period : %d\n", hi); p += sprintf(p, "Interrupt Check Status Polling Delay : %d\n", lo); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %s %s\n", - (c0&0x80)?"disabled":"enabled ", - (c1&0x80)?"disabled":"enabled "); - p += sprintf(p, "66 Clocking %s %s\n", - (sc11&0x02)?"enabled ":"disabled", - (sc11&0x08)?"enabled ":"disabled"); - p += sprintf(p, " Mode %s Mode %s\n", - (sc1a & 0x01) ? "MASTER" : "PCI ", - (sc1b & 0x01) ? "MASTER" : "PCI "); - p += sprintf(p, " %s %s\n", - (sc1d & 0x08) ? "Error " : - ((sc1d & 0x05) == 0x05) ? "Not My INTR " : - (sc1d & 0x04) ? "Interrupting" : - (sc1d & 0x02) ? "FIFO Full " : - (sc1d & 0x01) ? "FIFO Empty " : "????????????", - (sc1d & 0x80) ? "Error " : - ((sc1d & 0x50) == 0x50) ? "Not My INTR " : - (sc1d & 0x40) ? "Interrupting" : - (sc1d & 0x20) ? "FIFO Full " : - (sc1d & 0x10) ? "FIFO Empty " : "????????????"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0&0x20)?"yes":"no ", (c0&0x40)?"yes":"no ", - (c1&0x20)?"yes":"no ", (c1&0x40)?"yes":"no "); - p += sprintf(p, "DMA Mode: %s %s " - " %s %s\n", - pdc202xx_ultra_verbose(reg60h, (reg50h & pmask)), - pdc202xx_ultra_verbose(reg64h, (reg50h & pmask)), - pdc202xx_ultra_verbose(reg68h, (reg50h & smask)), - pdc202xx_ultra_verbose(reg6ch, (reg50h & smask))); - p += sprintf(p, "PIO Mode: %s %s " - " %s %s\n", - pdc202xx_pio_verbose(reg60h), - pdc202xx_pio_verbose(reg64h), - pdc202xx_pio_verbose(reg68h), - pdc202xx_pio_verbose(reg6ch)); -#if 0 - p += sprintf(p, "--------------- Can ATAPI DMA ---------------\n"); #endif - return (char *)p; -} - -static int pdc202xx_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int i, len; - - for (i = 0; i < n_pdc202_devs; i++) { - struct pci_dev *dev = pdc202_devs[i]; - p = pdc202xx_info(buffer, dev); - } - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) */ - static u8 pdc202xx_ratemask (ide_drive_t *drive) { @@ -546,11 +429,13 @@ u8 sc1d = hwif->INB((high_16 + 0x001d)); if (hwif->channel) { + /* bit7: Error, bit6: Interrupting, bit5: FIFO Full, bit4: FIFO Empty */ if ((sc1d & 0x50) == 0x50) goto somebody_else; else if ((sc1d & 0x40) == 0x40) return (dma_stat & 4) == 4; } else { + /* bit3: Error, bit2: Interrupting, bit1: FIFO Full, bit0: FIFO Empty */ if ((sc1d & 0x05) == 0x05) goto somebody_else; else if ((sc1d & 0x04) == 0x04) @@ -667,15 +552,6 @@ printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start); } - -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) - pdc202_devs[n_pdc202_devs++] = dev; - - if (!pdc202xx_proc) { - pdc202xx_proc = 1; - ide_pci_create_host_proc("pdc202xx", pdc202xx_get_info); - } -#endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */ /* * software reset - this is required because the bios diff -Nru a/drivers/ide/pci/pdc202xx_old.h b/drivers/ide/pci/pdc202xx_old.h --- a/drivers/ide/pci/pdc202xx_old.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/pci/pdc202xx_old.h 2004-10-26 18:25:17 -07:00 @@ -23,41 +23,6 @@ NULL }; -static inline u8 *pdc202xx_pio_verbose (u32 drive_pci) -{ - if ((drive_pci & 0x000ff000) == 0x000ff000) return("NOTSET"); - if ((drive_pci & 0x00000401) == 0x00000401) return("PIO 4"); - if ((drive_pci & 0x00000602) == 0x00000602) return("PIO 3"); - if ((drive_pci & 0x00000803) == 0x00000803) return("PIO 2"); - if ((drive_pci & 0x00000C05) == 0x00000C05) return("PIO 1"); - if ((drive_pci & 0x00001309) == 0x00001309) return("PIO 0"); - return("PIO ?"); -} - -static inline u8 *pdc202xx_dma_verbose (u32 drive_pci) -{ - if ((drive_pci & 0x00036000) == 0x00036000) return("MWDMA 2"); - if ((drive_pci & 0x00046000) == 0x00046000) return("MWDMA 1"); - if ((drive_pci & 0x00056000) == 0x00056000) return("MWDMA 0"); - if ((drive_pci & 0x00056000) == 0x00056000) return("SWDMA 2"); - if ((drive_pci & 0x00068000) == 0x00068000) return("SWDMA 1"); - if ((drive_pci & 0x000BC000) == 0x000BC000) return("SWDMA 0"); - return("PIO---"); -} - -static inline u8 *pdc202xx_ultra_verbose (u32 drive_pci, u16 slow_cable) -{ - if ((drive_pci & 0x000ff000) == 0x000ff000) - return("NOTSET"); - if ((drive_pci & 0x00012000) == 0x00012000) - return((slow_cable) ? "UDMA 2" : "UDMA 4"); - if ((drive_pci & 0x00024000) == 0x00024000) - return((slow_cable) ? "UDMA 1" : "UDMA 3"); - if ((drive_pci & 0x00036000) == 0x00036000) - return("UDMA 0"); - return(pdc202xx_dma_verbose(drive_pci)); -} - /* A Register */ #define SYNC_ERRDY_EN 0xC0 @@ -97,8 +62,6 @@ #define MC2 0x04 /* DMA"C" timing */ #define MC1 0x02 /* DMA"C" timing */ #define MC0 0x01 /* DMA"C" timing */ - -#define DISPLAY_PDC202XX_TIMINGS static void init_setup_pdc202ata4(struct pci_dev *dev, ide_pci_device_t *d); static void init_setup_pdc20265(struct pci_dev *, ide_pci_device_t *); diff -Nru a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c --- a/drivers/ide/pci/piix.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/pci/piix.c 2004-10-26 18:25:17 -07:00 @@ -106,165 +106,6 @@ #include "piix.h" static int no_piix_dma; -#if defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 piix_proc = 0; -#define PIIX_MAX_DEVS 5 -static struct pci_dev *piix_devs[PIIX_MAX_DEVS]; -static int n_piix_devs; - -/** - * piix_get_info - fill in /proc for PIIX ide - * @buffer: buffer to fill - * @addr: address of user start in buffer - * @offset: offset into 'file' - * @count: buffer count - * - * Walks the PIIX devices and outputs summary data on the tuning and - * anything else that will help with debugging - */ - -static int piix_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int i; - - for (i = 0; i < n_piix_devs; i++) { - struct pci_dev *dev = piix_devs[i]; - unsigned long bibma = pci_resource_start(dev, 4); - u16 reg40 = 0, psitre = 0, reg42 = 0, ssitre = 0; - u8 c0 = 0, c1 = 0, reg54 = 0, reg55 = 0; - u8 reg44 = 0, reg48 = 0, reg4a = 0, reg4b = 0; - - p += sprintf(p, "\nController: %d\n", i); - p += sprintf(p, "\n Intel "); - switch(dev->device) { - case PCI_DEVICE_ID_INTEL_82801EB_1: - p += sprintf(p, "PIIX4 SATA 150 "); - break; - case PCI_DEVICE_ID_INTEL_82801BA_8: - case PCI_DEVICE_ID_INTEL_82801BA_9: - case PCI_DEVICE_ID_INTEL_82801CA_10: - case PCI_DEVICE_ID_INTEL_82801CA_11: - case PCI_DEVICE_ID_INTEL_82801DB_10: - case PCI_DEVICE_ID_INTEL_82801DB_11: - case PCI_DEVICE_ID_INTEL_82801EB_11: - case PCI_DEVICE_ID_INTEL_82801E_11: - case PCI_DEVICE_ID_INTEL_ESB_2: - case PCI_DEVICE_ID_INTEL_ICH6_19: - p += sprintf(p, "PIIX4 Ultra 100 "); - break; - case PCI_DEVICE_ID_INTEL_82372FB_1: - case PCI_DEVICE_ID_INTEL_82801AA_1: - p += sprintf(p, "PIIX4 Ultra 66 "); - break; - case PCI_DEVICE_ID_INTEL_82451NX: - case PCI_DEVICE_ID_INTEL_82801AB_1: - case PCI_DEVICE_ID_INTEL_82443MX_1: - case PCI_DEVICE_ID_INTEL_82371AB: - p += sprintf(p, "PIIX4 Ultra 33 "); - break; - case PCI_DEVICE_ID_INTEL_82371SB_1: - p += sprintf(p, "PIIX3 "); - break; - case PCI_DEVICE_ID_INTEL_82371MX: - p += sprintf(p, "MPIIX "); - break; - case PCI_DEVICE_ID_INTEL_82371FB_1: - case PCI_DEVICE_ID_INTEL_82371FB_0: - default: - p += sprintf(p, "PIIX "); - break; - } - p += sprintf(p, "Chipset.\n"); - - if (dev->device == PCI_DEVICE_ID_INTEL_82371MX) - continue; - - pci_read_config_word(dev, 0x40, ®40); - pci_read_config_word(dev, 0x42, ®42); - pci_read_config_byte(dev, 0x44, ®44); - pci_read_config_byte(dev, 0x48, ®48); - pci_read_config_byte(dev, 0x4a, ®4a); - pci_read_config_byte(dev, 0x4b, ®4b); - pci_read_config_byte(dev, 0x54, ®54); - pci_read_config_byte(dev, 0x55, ®55); - - psitre = (reg40 & 0x4000) ? 1 : 0; - ssitre = (reg42 & 0x4000) ? 1 : 0; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb(bibma + 0x02); - c1 = inb(bibma + 0x0a); - - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0&0x20) ? "yes" : "no ", - (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", - (c1&0x40) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - (reg48&0x01) ? "yes" : "no ", - (reg48&0x02) ? "yes" : "no ", - (reg48&0x04) ? "yes" : "no ", - (reg48&0x08) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - ((reg54&0x11) && - (reg55&0x10) && (reg4a&0x01)) ? "5" : - ((reg54&0x11) && (reg4a&0x02)) ? "4" : - ((reg54&0x11) && (reg4a&0x01)) ? "3" : - (reg4a&0x02) ? "2" : - (reg4a&0x01) ? "1" : - (reg4a&0x00) ? "0" : "X", - ((reg54&0x22) && - (reg55&0x20) && (reg4a&0x10)) ? "5" : - ((reg54&0x22) && (reg4a&0x20)) ? "4" : - ((reg54&0x22) && (reg4a&0x10)) ? "3" : - (reg4a&0x20) ? "2" : - (reg4a&0x10) ? "1" : - (reg4a&0x00) ? "0" : "X", - ((reg54&0x44) && - (reg55&0x40) && (reg4b&0x03)) ? "5" : - ((reg54&0x44) && (reg4b&0x02)) ? "4" : - ((reg54&0x44) && (reg4b&0x01)) ? "3" : - (reg4b&0x02) ? "2" : - (reg4b&0x01) ? "1" : - (reg4b&0x00) ? "0" : "X", - ((reg54&0x88) && - (reg55&0x80) && (reg4b&0x30)) ? "5" : - ((reg54&0x88) && (reg4b&0x20)) ? "4" : - ((reg54&0x88) && (reg4b&0x10)) ? "3" : - (reg4b&0x20) ? "2" : - (reg4b&0x10) ? "1" : - (reg4b&0x00) ? "0" : "X"); - - p += sprintf(p, "UDMA\n"); - p += sprintf(p, "DMA\n"); - p += sprintf(p, "PIO\n"); - - /* - * FIXME.... Add configuration junk data....blah blah...... - */ - } - return p-buffer; /* => must be less than 4k! */ -} -#endif /* defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) */ /** * piix_ratemask - compute rate mask for PIIX IDE @@ -627,14 +468,6 @@ break; } -#if defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) - piix_devs[n_piix_devs++] = dev; - - if (!piix_proc) { - piix_proc = 1; - ide_pci_create_host_proc("piix", piix_get_info); - } -#endif /* DISPLAY_PIIX_TIMINGS && CONFIG_PROC_FS */ return 0; } diff -Nru a/drivers/ide/pci/piix.h b/drivers/ide/pci/piix.h --- a/drivers/ide/pci/piix.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/pci/piix.h 2004-10-26 18:25:17 -07:00 @@ -5,10 +5,6 @@ #include #include -#define PIIX_DEBUG_DRIVE_INFO 0 - -#define DISPLAY_PIIX_TIMINGS - static void init_setup_piix(struct pci_dev *, ide_pci_device_t *); static unsigned int __devinit init_chipset_piix(struct pci_dev *, const char *); static void init_hwif_piix(ide_hwif_t *); diff -Nru a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c --- a/drivers/ide/pci/sc1200.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/pci/sc1200.c 2004-10-26 18:25:18 -07:00 @@ -67,55 +67,6 @@ return pci_clock; } -#define DISPLAY_SC1200_TIMINGS - -#if defined(DISPLAY_SC1200_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static int sc1200_get_info(char *, char **, off_t, int); -extern int (*sc1200_display_info)(char *, char **, off_t, int); /* ide-proc.c */ -extern char *ide_media_verbose(ide_drive_t *); -static u8 sc1200_proc = 0; - -static struct pci_dev *bmide_dev; - -static int sc1200_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - unsigned long bibma = pci_resource_start(bmide_dev, 4); - int len; - u8 c0 = 0, c1 = 0; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - - c0 = inb_p(bibma + 0x02); - c1 = inb_p(bibma + 0x0a); - - p += sprintf(p, "\n National SCx200 Chipset.\n"); - p += sprintf(p, "--------------- Primary Channel ---------------- Secondary Channel -------------\n"); - p += sprintf(p, " %sabled %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 -------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s %s %s\n", - (c0&0x20) ? "yes" : "no ", (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", (c1&0x40) ? "yes" : "no " ); - - p += sprintf(p, "UDMA\n"); - p += sprintf(p, "DMA\n"); - p += sprintf(p, "PIO\n"); - - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* DISPLAY_SC1200_TIMINGS && CONFIG_PROC_FS */ - extern char *ide_xfer_verbose (byte xfer_rate); /* @@ -505,21 +456,6 @@ } /* - * Initialize the sc1200 bridge for reliable IDE DMA operation. - */ -static unsigned int __init init_chipset_sc1200 (struct pci_dev *dev, const char *name) -{ -#if defined(DISPLAY_SC1200_TIMINGS) && defined(CONFIG_PROC_FS) - if (!bmide_dev) { - sc1200_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("sc1200", sc1200_get_info); - } -#endif /* DISPLAY_SC1200_TIMINGS && CONFIG_PROC_FS */ - return 0; -} - -/* * This gets invoked by the IDE driver once for each channel, * and performs channel-specific pre-initialization before drive probing. */ @@ -545,7 +481,6 @@ static ide_pci_device_t sc1200_chipset __devinitdata = { .name = "SC1200", - .init_chipset = init_chipset_sc1200, .init_hwif = init_hwif_sc1200, .channels = 2, .autodma = AUTODMA, diff -Nru a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c --- a/drivers/ide/pci/serverworks.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/pci/serverworks.c 2004-10-26 18:25:17 -07:00 @@ -44,164 +44,6 @@ static u8 svwks_revision = 0; static struct pci_dev *isa_dev; -#if defined(DISPLAY_SVWKS_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 svwks_proc = 0; -#define SVWKS_MAX_DEVS 2 -static struct pci_dev *svwks_devs[SVWKS_MAX_DEVS]; -static int n_svwks_devs; - -static int svwks_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int i, len; - - p += sprintf(p, "\n " - "ServerWorks OSB4/CSB5/CSB6\n"); - - for (i = 0; i < n_svwks_devs; i++) { - struct pci_dev *dev = svwks_devs[i]; - unsigned long bibma = pci_resource_start(dev, 4); - u32 reg40, reg44; - u16 reg48, reg56; - u8 reg54, c0=0, c1=0; - - pci_read_config_dword(dev, 0x40, ®40); - pci_read_config_dword(dev, 0x44, ®44); - pci_read_config_word(dev, 0x48, ®48); - pci_read_config_byte(dev, 0x54, ®54); - pci_read_config_word(dev, 0x56, ®56); - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb_p(bibma + 0x02); - c1 = inb_p(bibma + 0x0a); - - p += sprintf(p, "\n ServerWorks "); - switch(dev->device) { - case PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2: - case PCI_DEVICE_ID_SERVERWORKS_CSB6IDE: - p += sprintf(p, "CSB6 "); - break; - case PCI_DEVICE_ID_SERVERWORKS_CSB5IDE: - p += sprintf(p, "CSB5 "); - break; - case PCI_DEVICE_ID_SERVERWORKS_OSB4IDE: - p += sprintf(p, "OSB4 "); - break; - default: - p += sprintf(p, "%04x ", dev->device); - break; - } - p += sprintf(p, "Chipset (rev %02x)\n", svwks_revision); - - p += sprintf(p, "------------------------------- " - "General Status " - "---------------------------------\n"); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled" - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s" - " %s %s\n", - (c0&0x20) ? "yes" : "no ", - (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", - (c1&0x40) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s" - " %s %s\n", - (reg54 & 0x01) ? "yes" : "no ", - (reg54 & 0x02) ? "yes" : "no ", - (reg54 & 0x04) ? "yes" : "no ", - (reg54 & 0x08) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s" - " %s %s\n", - ((reg56&0x0005)==0x0005)?"5": - ((reg56&0x0004)==0x0004)?"4": - ((reg56&0x0003)==0x0003)?"3": - ((reg56&0x0002)==0x0002)?"2": - ((reg56&0x0001)==0x0001)?"1": - ((reg56&0x000F))?"?":"0", - ((reg56&0x0050)==0x0050)?"5": - ((reg56&0x0040)==0x0040)?"4": - ((reg56&0x0030)==0x0030)?"3": - ((reg56&0x0020)==0x0020)?"2": - ((reg56&0x0010)==0x0010)?"1": - ((reg56&0x00F0))?"?":"0", - ((reg56&0x0500)==0x0500)?"5": - ((reg56&0x0400)==0x0400)?"4": - ((reg56&0x0300)==0x0300)?"3": - ((reg56&0x0200)==0x0200)?"2": - ((reg56&0x0100)==0x0100)?"1": - ((reg56&0x0F00))?"?":"0", - ((reg56&0x5000)==0x5000)?"5": - ((reg56&0x4000)==0x4000)?"4": - ((reg56&0x3000)==0x3000)?"3": - ((reg56&0x2000)==0x2000)?"2": - ((reg56&0x1000)==0x1000)?"1": - ((reg56&0xF000))?"?":"0"); - p += sprintf(p, "DMA enabled: %s %s" - " %s %s\n", - ((reg44&0x00002000)==0x00002000)?"2": - ((reg44&0x00002100)==0x00002100)?"1": - ((reg44&0x00007700)==0x00007700)?"0": - ((reg44&0x0000FF00)==0x0000FF00)?"X":"?", - ((reg44&0x00000020)==0x00000020)?"2": - ((reg44&0x00000021)==0x00000021)?"1": - ((reg44&0x00000077)==0x00000077)?"0": - ((reg44&0x000000FF)==0x000000FF)?"X":"?", - ((reg44&0x20000000)==0x20000000)?"2": - ((reg44&0x21000000)==0x21000000)?"1": - ((reg44&0x77000000)==0x77000000)?"0": - ((reg44&0xFF000000)==0xFF000000)?"X":"?", - ((reg44&0x00200000)==0x00200000)?"2": - ((reg44&0x00210000)==0x00210000)?"1": - ((reg44&0x00770000)==0x00770000)?"0": - ((reg44&0x00FF0000)==0x00FF0000)?"X":"?"); - - p += sprintf(p, "PIO enabled: %s %s" - " %s %s\n", - ((reg40&0x00002000)==0x00002000)?"4": - ((reg40&0x00002200)==0x00002200)?"3": - ((reg40&0x00003400)==0x00003400)?"2": - ((reg40&0x00004700)==0x00004700)?"1": - ((reg40&0x00005D00)==0x00005D00)?"0":"?", - ((reg40&0x00000020)==0x00000020)?"4": - ((reg40&0x00000022)==0x00000022)?"3": - ((reg40&0x00000034)==0x00000034)?"2": - ((reg40&0x00000047)==0x00000047)?"1": - ((reg40&0x0000005D)==0x0000005D)?"0":"?", - ((reg40&0x20000000)==0x20000000)?"4": - ((reg40&0x22000000)==0x22000000)?"3": - ((reg40&0x34000000)==0x34000000)?"2": - ((reg40&0x47000000)==0x47000000)?"1": - ((reg40&0x5D000000)==0x5D000000)?"0":"?", - ((reg40&0x00200000)==0x00200000)?"4": - ((reg40&0x00220000)==0x00220000)?"3": - ((reg40&0x00340000)==0x00340000)?"2": - ((reg40&0x00470000)==0x00470000)?"1": - ((reg40&0x005D0000)==0x005D0000)?"0":"?"); - - } - p += sprintf(p, "\n"); - - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_SVWKS_TIMINGS) && defined(CONFIG_PROC_FS) */ - static int check_in_drive_lists (ide_drive_t *drive, const char **list) { while (*list) @@ -616,16 +458,6 @@ btr |= (svwks_revision >= SVWKS_CSB5_REVISION_NEW) ? 0x3 : 0x2; pci_write_config_byte(dev, 0x5A, btr); } - - -#if defined(DISPLAY_SVWKS_TIMINGS) && defined(CONFIG_PROC_FS) - svwks_devs[n_svwks_devs++] = dev; - - if (!svwks_proc) { - svwks_proc = 1; - ide_pci_create_host_proc("svwks", svwks_get_info); - } -#endif /* DISPLAY_SVWKS_TIMINGS && CONFIG_PROC_FS */ return (dev->irq) ? dev->irq : 0; } diff -Nru a/drivers/ide/pci/serverworks.h b/drivers/ide/pci/serverworks.h --- a/drivers/ide/pci/serverworks.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/pci/serverworks.h 2004-10-26 18:25:17 -07:00 @@ -21,8 +21,6 @@ NULL }; -#define DISPLAY_SVWKS_TIMINGS 1 - static void init_setup_svwks(struct pci_dev *, ide_pci_device_t *); static void init_setup_csb6(struct pci_dev *, ide_pci_device_t *); static unsigned int init_chipset_svwks(struct pci_dev *, const char *); diff -Nru a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c --- a/drivers/ide/pci/sgiioc4.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/pci/sgiioc4.c 2004-10-26 18:25:18 -07:00 @@ -332,17 +332,6 @@ } static int -sgiioc4_ide_dma_verbose(ide_drive_t * drive) -{ - if (drive->using_dma == 1) - printk(", UDMA(16)"); - else - printk(", PIO"); - - return 1; -} - -static int sgiioc4_ide_dma_lostirq(ide_drive_t * drive) { HWIF(drive)->resetproc(drive); @@ -501,10 +490,7 @@ unsigned int count = 0, i = 1; struct scatterlist *sg; - if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) - hwif->sg_nents = i = ide_raw_build_sglist(drive, rq); - else - hwif->sg_nents = i = ide_build_sglist(drive, rq); + hwif->sg_nents = i = ide_build_sglist(drive, rq); if (!i) return 0; /* sglist of length Zero */ @@ -623,7 +609,6 @@ hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq; hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on; hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; - hwif->ide_dma_verbose = &sgiioc4_ide_dma_verbose; hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; hwif->ide_dma_timeout = &__ide_dma_timeout; hwif->INB = &sgiioc4_INB; diff -Nru a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c --- a/drivers/ide/pci/siimage.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/pci/siimage.c 2004-10-26 18:25:17 -07:00 @@ -554,12 +554,6 @@ return 0; } -static int siimage_mmio_ide_dma_verbose (ide_drive_t *drive) -{ - int temp = __ide_dma_verbose(drive); - return temp; -} - /** * siimage_busproc - bus isolation ioctl * @drive: drive to isolate/restore @@ -1077,7 +1071,6 @@ if (hwif->mmio) { hwif->ide_dma_test_irq = &siimage_mmio_ide_dma_test_irq; - hwif->ide_dma_verbose = &siimage_mmio_ide_dma_verbose; } else { hwif->ide_dma_test_irq = & siimage_io_ide_dma_test_irq; } diff -Nru a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c --- a/drivers/ide/pci/slc90e66.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/ide/pci/slc90e66.c 2004-10-26 18:25:18 -07:00 @@ -21,103 +21,6 @@ #include -#define DISPLAY_SLC90E66_TIMINGS - -#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) -#include -#include - -static u8 slc90e66_proc = 0; -static struct pci_dev *bmide_dev; - -static int slc90e66_get_info (char *buffer, char **addr, off_t offset, int count) -{ - char *p = buffer; - int len; - unsigned long bibma = pci_resource_start(bmide_dev, 4); - u16 reg40 = 0, psitre = 0, reg42 = 0, ssitre = 0; - u8 c0 = 0, c1 = 0; - u8 reg44 = 0, reg47 = 0, reg48 = 0, reg4a = 0, reg4b = 0; - - pci_read_config_word(bmide_dev, 0x40, ®40); - pci_read_config_word(bmide_dev, 0x42, ®42); - pci_read_config_byte(bmide_dev, 0x44, ®44); - pci_read_config_byte(bmide_dev, 0x47, ®47); - pci_read_config_byte(bmide_dev, 0x48, ®48); - pci_read_config_byte(bmide_dev, 0x4a, ®4a); - pci_read_config_byte(bmide_dev, 0x4b, ®4b); - - psitre = (reg40 & 0x4000) ? 1 : 0; - ssitre = (reg42 & 0x4000) ? 1 : 0; - - /* - * at that point bibma+0x2 et bibma+0xa are byte registers - * to investigate: - */ - c0 = inb_p(bibma + 0x02); - c1 = inb_p(bibma + 0x0a); - - p += sprintf(p, " SLC90E66 Chipset.\n"); - p += sprintf(p, "--------------- Primary Channel " - "---------------- Secondary Channel " - "-------------\n"); - p += sprintf(p, " %sabled " - " %sabled\n", - (c0&0x80) ? "dis" : " en", - (c1&0x80) ? "dis" : " en"); - p += sprintf(p, "--------------- drive0 --------- drive1 " - "-------- drive0 ---------- drive1 ------\n"); - p += sprintf(p, "DMA enabled: %s %s " - " %s %s\n", - (c0&0x20) ? "yes" : "no ", - (c0&0x40) ? "yes" : "no ", - (c1&0x20) ? "yes" : "no ", - (c1&0x40) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - (reg48&0x01) ? "yes" : "no ", - (reg48&0x02) ? "yes" : "no ", - (reg48&0x04) ? "yes" : "no ", - (reg48&0x08) ? "yes" : "no " ); - p += sprintf(p, "UDMA enabled: %s %s " - " %s %s\n", - ((reg4a&0x04)==0x04) ? "4" : - ((reg4a&0x03)==0x03) ? "3" : - (reg4a&0x02) ? "2" : - (reg4a&0x01) ? "1" : - (reg4a&0x00) ? "0" : "X", - ((reg4a&0x40)==0x40) ? "4" : - ((reg4a&0x30)==0x30) ? "3" : - (reg4a&0x20) ? "2" : - (reg4a&0x10) ? "1" : - (reg4a&0x00) ? "0" : "X", - ((reg4b&0x04)==0x04) ? "4" : - ((reg4b&0x03)==0x03) ? "3" : - (reg4b&0x02) ? "2" : - (reg4b&0x01) ? "1" : - (reg4b&0x00) ? "0" : "X", - ((reg4b&0x40)==0x40) ? "4" : - ((reg4b&0x30)==0x30) ? "3" : - (reg4b&0x20) ? "2" : - (reg4b&0x10) ? "1" : - (reg4b&0x00) ? "0" : "X"); - - p += sprintf(p, "UDMA\n"); - p += sprintf(p, "DMA\n"); - p += sprintf(p, "PIO\n"); - -/* - * FIXME.... Add configuration junk data....blah blah...... - */ - - /* p - buffer must be less than 4k! */ - len = (p - buffer) - offset; - *addr = buffer + offset; - - return len > count ? count : len; -} -#endif /* defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) */ - static u8 slc90e66_ratemask (ide_drive_t *drive) { u8 mode = 2; @@ -236,6 +139,7 @@ if (speed >= XFER_UDMA_0) { if (!(reg48 & u_flag)) pci_write_config_word(dev, 0x48, reg48|u_flag); + /* FIXME: (reg4a & a_speed) ? */ if ((reg4a & u_speed) != u_speed) { pci_write_config_word(dev, 0x4a, reg4a & ~a_speed); pci_read_config_word(dev, 0x4a, ®4a); @@ -313,18 +217,6 @@ } #endif /* CONFIG_BLK_DEV_IDEDMA */ -static unsigned int __init init_chipset_slc90e66 (struct pci_dev *dev, const char *name) -{ -#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) - if (!slc90e66_proc) { - slc90e66_proc = 1; - bmide_dev = dev; - ide_pci_create_host_proc("slc90e66", slc90e66_get_info); - } -#endif /* DISPLAY_SLC90E66_TIMINGS && CONFIG_PROC_FS */ - return 0; -} - static void __init init_hwif_slc90e66 (ide_hwif_t *hwif) { u8 reg47 = 0; @@ -366,7 +258,6 @@ static ide_pci_device_t slc90e66_chipset __devinitdata = { .name = "SLC90E66", - .init_chipset = init_chipset_slc90e66, .init_hwif = init_hwif_slc90e66, .channels = 2, .autodma = AUTODMA, diff -Nru a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c --- a/drivers/ide/ppc/pmac.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/ide/ppc/pmac.c 2004-10-26 18:25:17 -07:00 @@ -1560,56 +1560,6 @@ #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC /* - * We build & map the sglist for a given request. - */ -static int __pmac -pmac_ide_build_sglist(ide_drive_t *drive, struct request *rq) -{ - ide_hwif_t *hwif = HWIF(drive); - struct scatterlist *sg = hwif->sg_table; - int nents; - - nents = blk_rq_map_sg(drive->queue, rq, sg); - - if (rq_data_dir(rq) == READ) - hwif->sg_dma_direction = PCI_DMA_FROMDEVICE; - else - hwif->sg_dma_direction = PCI_DMA_TODEVICE; - - return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction); -} - -/* - * Same as above but for a "raw" taskfile request - */ -static int __pmac -pmac_ide_raw_build_sglist(ide_drive_t *drive, struct request *rq) -{ - ide_hwif_t *hwif = HWIF(drive); - struct scatterlist *sg = hwif->sg_table; - int nents = 0; - ide_task_t *args = rq->special; - unsigned char *virt_addr = rq->buffer; - int sector_count = rq->nr_sectors; - - if (args->command_type == IDE_DRIVE_TASK_RAW_WRITE) - hwif->sg_dma_direction = PCI_DMA_TODEVICE; - else - hwif->sg_dma_direction = PCI_DMA_FROMDEVICE; - - if (sector_count > 128) { - sg_init_one(&sg[nents], virt_addr, 128 * SECTOR_SIZE); - nents++; - virt_addr = virt_addr + (128 * SECTOR_SIZE); - sector_count -= 128; - } - sg_init_one(&sg[nents], virt_addr, sector_count * SECTOR_SIZE); - nents++; - - return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction); -} - -/* * pmac_ide_build_dmatable builds the DBDMA command list * for a transfer and sets the DBDMA channel to point to it. */ @@ -1632,11 +1582,8 @@ while (readl(&dma->status) & RUN) udelay(1); - /* Build sglist */ - if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) - hwif->sg_nents = i = pmac_ide_raw_build_sglist(drive, rq); - else - hwif->sg_nents = i = pmac_ide_build_sglist(drive, rq); + hwif->sg_nents = i = ide_build_sglist(drive, rq); + if (!i) return 0; @@ -2078,7 +2025,6 @@ hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq; hwif->ide_dma_host_off = &pmac_ide_dma_host_off; hwif->ide_dma_host_on = &pmac_ide_dma_host_on; - hwif->ide_dma_verbose = &__ide_dma_verbose; hwif->ide_dma_timeout = &__ide_dma_timeout; hwif->ide_dma_lostirq = &pmac_ide_dma_lostirq; diff -Nru a/drivers/input/serio/i8042-io.h b/drivers/input/serio/i8042-io.h --- a/drivers/input/serio/i8042-io.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/input/serio/i8042-io.h 2004-10-26 18:25:17 -07:00 @@ -35,6 +35,7 @@ # define I8042_AUX_IRQ 12 #endif + /* * Register numbers. */ @@ -96,7 +97,7 @@ * On ix86 platforms touching the i8042 data register region can do really * bad things. Because of this the region is always reserved on ix86 boxes. */ -#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) && !defined(__mips__) +#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) && !defined(__mips__) && !defined (CONFIG_PPC64) if (!request_region(I8042_DATA_REG, 16, "i8042")) return -1; #endif @@ -110,12 +111,18 @@ i8042_noloop = 1; #endif +#if defined(CONFIG_PPC64) + if (check_legacy_ioport(I8042_DATA_REG)) + return -1; + if (!request_region(I8042_DATA_REG, 16, "i8042")) + return -1; +#endif return 0; } static inline void i8042_platform_exit(void) { -#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) +#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) && !defined(__x86_64__) && !defined(CONFIG_PPC64) release_region(I8042_DATA_REG, 16); #endif } diff -Nru a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c --- a/drivers/isdn/hisax/hisax_fcpcipnp.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c 2004-10-26 18:25:18 -07:00 @@ -996,7 +996,7 @@ static int __init hisax_fcpcipnp_init(void) { - int retval, pci_nr_found; + int retval; printk(KERN_INFO "hisax_fcpcipnp: Fritz!Card PCI/PCIv2/PnP ISDN driver v0.0.1\n"); diff -Nru a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c --- a/drivers/macintosh/therm_adt746x.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/macintosh/therm_adt746x.c 2004-10-26 18:25:18 -07:00 @@ -23,6 +23,7 @@ #include #include #include + #include #include #include @@ -51,16 +52,21 @@ static int fan_speed = -1; MODULE_AUTHOR("Colin Leroy "); -MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and Powerbook G4 Alu"); +MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and " + "Powerbook G4 Alu"); MODULE_LICENSE("GPL"); MODULE_PARM(limit_adjust,"i"); -MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50 cpu, 70 gpu) by N degrees."); +MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50 cpu, 70 gpu) " + "by N degrees."); + MODULE_PARM(fan_speed,"i"); -MODULE_PARM_DESC(fan_speed,"Specify fan speed (0-255) when lim < temp < lim+8 (default 128)"); +MODULE_PARM_DESC(fan_speed,"Specify fan speed (0-255) when lim < temp < lim+8 " + "(default 128)"); struct thermostat { struct i2c_client clt; + u8 temps[3]; u8 cached_temp[3]; u8 initial_limits[3]; u8 limits[3]; @@ -74,7 +80,9 @@ static struct thermostat* thermostat; static struct task_struct *thread_therm = NULL; -static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno); +static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, + int busno); + static void write_both_fan_speed(struct thermostat *th, int speed); static void write_fan_speed(struct thermostat *th, int speed, int fan); @@ -140,10 +148,11 @@ kthread_stop(thread_therm); } - printk(KERN_INFO "adt746x: Putting max temperatures back from %d, %d, %d," - " to %d, %d, %d\n", + printk(KERN_INFO "adt746x: Putting max temperatures back from " + "%d, %d, %d to %d, %d, %d\n", th->limits[0], th->limits[1], th->limits[2], - th->initial_limits[0], th->initial_limits[1], th->initial_limits[2]); + th->initial_limits[0], th->initial_limits[1], + th->initial_limits[2]); for (i = 0; i < 3; i++) write_reg(th, LIMIT_REG[i], th->initial_limits[i]); @@ -202,11 +211,11 @@ if (th->last_speed[fan] != speed) { if (speed == -1) - printk(KERN_INFO "adt746x: Setting speed to: automatic for %s fan.\n", - fan?"GPU":"CPU"); + printk(KERN_INFO "adt746x: Setting speed to automatic " + "for %s fan.\n", fan?"GPU":"CPU"); else - printk(KERN_INFO "adt746x: Setting speed to: %d for %s fan.\n", - speed, fan?"GPU":"CPU"); + printk(KERN_INFO "adt746x: Setting speed to %d " + "for %s fan.\n", speed, fan?"GPU":"CPU"); } else return; @@ -217,8 +226,11 @@ } else { /* back to automatic */ if(therm_type == ADT7460) { - manual = read_reg(th, MANUAL_MODE[fan]) & (~MANUAL_MASK); - write_reg(th, MANUAL_MODE[fan], manual|REM_CONTROL[fan]); + manual = read_reg(th, + MANUAL_MODE[fan]) & (~MANUAL_MASK); + + write_reg(th, + MANUAL_MODE[fan], manual|REM_CONTROL[fan]); } else { manual = read_reg(th, MANUAL_MODE[fan]); write_reg(th, MANUAL_MODE[fan], manual&(~AUTO_MASK)); @@ -228,99 +240,114 @@ th->last_speed[fan] = speed; } -static int monitor_task(void *arg) +static void read_sensors(struct thermostat *th) { - struct thermostat* th = arg; - u8 temps[3]; - u8 lims[3]; - int i; + int i = 0; + + for (i = 0; i < 3; i++) + th->temps[i] = read_reg(th, TEMP_REG[i]); +} + #ifdef DEBUG - int mfan_speed; +static void display_stats(struct thermostat *th) +{ + if (th->temps[0] != th->cached_temp[0] + || th->temps[1] != th->cached_temp[1] + || th->temps[2] != th->cached_temp[2]) { + printk(KERN_INFO "adt746x: Temperature infos:" + " thermostats: %d,%d,%d;" + " limits: %d,%d,%d;" + " fan speed: %d RPM\n", + th->temps[0], th->temps[1], th->temps[2], + th->limits[0], th->limits[1], th->limits[2], + read_fan_speed(th, FAN_SPEED[0])); + } + th->cached_temp[0] = th->temps[0]; + th->cached_temp[1] = th->temps[1]; + th->cached_temp[2] = th->temps[2]; +} #endif + +static void update_fans_speed (struct thermostat *th) +{ + int lastvar = 0; /* last variation, for iBook */ + int i = 0; + + /* we don't care about local sensor, so we start at sensor 1 */ + for (i = 1; i < 3; i++) { + int started = 0; + int fan_number = (therm_type == ADT7460 && i == 2); + int var = th->temps[i] - th->limits[i]; + if (var > 8) { + if (th->overriding[fan_number] == 0) + printk(KERN_INFO "adt746x: Limit exceeded by " + "%d, overriding specified fan speed " + "for %s.\n", var, + fan_number?"GPU":"CPU"); + + th->overriding[fan_number] = 1; + write_fan_speed(th, 255, fan_number); + started = 1; + } else if ((!th->overriding[fan_number] || var < 6) && var > 0) { + if (th->overriding[fan_number] == 1) + printk(KERN_INFO "adt746x: Limit exceeded by " + "%d, setting speed to specified " + "for %s.\n", var, + fan_number?"GPU":"CPU"); + + th->overriding[fan_number] = 0; + write_fan_speed(th, fan_speed, fan_number); + started = 1; + } else if (var < -1) { + /* don't stop iBook fan if GPU is cold and CPU is not + * so cold (lastvar >= -1) */ + if (therm_type == ADT7460 || lastvar < -1 || i == 1) { + if (th->last_speed[fan_number] != 0) + printk(KERN_INFO "adt746x: Stopping %s " + "fan.\n", + fan_number?"GPU":"CPU"); + write_fan_speed(th, 0, fan_number); + } + } + + lastvar = var; + + if (started && therm_type == ADT7467) + return; /* we don't want to re-stop the fan + * if CPU is heating and GPU is not */ + } +} + +static int monitor_task(void *arg) +{ + struct thermostat* th = arg; + while(!kthread_should_stop()) { if (current->flags & PF_FREEZE) refrigerator(PF_FREEZE); msleep_interruptible(2000); - /* Check status */ - /* local : chip */ - /* remote 1: CPU ?*/ - /* remote 2: GPU ?*/ #ifndef DEBUG - if (fan_speed != -1) { -#endif - for (i = 0; i < 3; i++) { - temps[i] = read_reg(th, TEMP_REG[i]); - lims[i] = th->limits[i]; - } -#ifndef DEBUG - } + if (fan_speed != -1) + read_sensors(th); +#else + read_sensors(th); #endif - if (fan_speed != -1) { - int lastvar = 0; /* for iBook */ - for (i = 1; i < 3; i++) { /* we don't care about local sensor */ - int started = 0; - int fan_number = (therm_type == ADT7460 && i == 2); - int var = temps[i] - lims[i]; - if (var > 8) { - if (th->overriding[fan_number] == 0) - printk(KERN_INFO "adt746x: Limit exceeded by %d, overriding specified fan speed for %s.\n", - var, fan_number?"GPU":"CPU"); - th->overriding[fan_number] = 1; - write_fan_speed(th, 255, fan_number); - started = 1; - } else if ((!th->overriding[fan_number] || var < 6) && var > 0) { - if (th->overriding[fan_number] == 1) - printk(KERN_INFO "adt746x: Limit exceeded by %d, setting speed to specified for %s.\n", - var, fan_number?"GPU":"CPU"); - th->overriding[fan_number] = 0; - write_fan_speed(th, fan_speed, fan_number); - started = 1; - } else if (var < -1) { - /* don't stop iBook fan if GPU is cold and CPU is not - * so cold (lastvar >= -1) */ - if (therm_type == ADT7460 || lastvar < -1 || i == 1) { - if (th->last_speed[fan_number] != 0) - printk(KERN_INFO "adt746x: Stopping %s fan.\n", - fan_number?"GPU":"CPU"); - write_fan_speed(th, 0, fan_number); - } - } - - lastvar = var; - - if (started && therm_type == ADT7467) - break; /* we don't want to re-stop the fan - * if CPU is heating and GPU is not */ - } - } + + if (fan_speed != -1) + update_fans_speed(th); + #ifdef DEBUG - mfan_speed = read_fan_speed(th, FAN_SPEED[0]); - /* only one fan in the iBook G4 */ - - if (temps[0] != th->cached_temp[0] - || temps[1] != th->cached_temp[1] - || temps[2] != th->cached_temp[2]) { - printk(KERN_INFO "adt746x: Temperature infos:" - " thermostats: %d,%d,%d;" - " limits: %d,%d,%d;" - " fan speed: %d RPM\n", - temps[0], temps[1], temps[2], - lims[0], lims[1], lims[2], - mfan_speed); - } - th->cached_temp[0] = temps[0]; - th->cached_temp[1] = temps[1]; - th->cached_temp[2] = temps[2]; -#endif + display_stats(th); +#endif + } return 0; } -static void -set_limit(struct thermostat *th, int i) +static void set_limit(struct thermostat *th, int i) { /* Set CPU limit higher to avoid powerdowns */ th->limits[i] = default_limits_chip[i] + limit_adjust; @@ -329,9 +356,9 @@ /* set our limits to normal */ th->limits[i] = default_limits_local[i] + limit_adjust; } - -static int -attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno) + +static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, + int busno) { struct thermostat* th; int rc; @@ -339,9 +366,13 @@ if (thermostat) return 0; - th = (struct thermostat *)kmalloc(sizeof(struct thermostat), GFP_KERNEL); + + th = (struct thermostat *) + kmalloc(sizeof(struct thermostat), GFP_KERNEL); + if (!th) return -ENOMEM; + memset(th, 0, sizeof(*th)); th->clt.addr = addr; th->clt.adapter = adapter; @@ -351,13 +382,14 @@ rc = read_reg(th, 0); if (rc < 0) { - printk(KERN_ERR "adt746x: Thermostat failed to read config from bus %d !\n", - busno); + printk(KERN_ERR "adt746x: Thermostat failed to read config " + "from bus %d !\n", + busno); kfree(th); return -ENODEV; } + /* force manual control to start the fan quieter */ - if (fan_speed == -1) fan_speed=128; @@ -374,14 +406,16 @@ } printk(KERN_INFO "adt746x: Lowering max temperatures from %d, %d, %d" - " to %d, %d, %d\n", - th->initial_limits[0], th->initial_limits[1], th->initial_limits[2], - th->limits[0], th->limits[1], th->limits[2]); + " to %d, %d, %d\n", + th->initial_limits[0], th->initial_limits[1], + th->initial_limits[2], th->limits[0], th->limits[1], + th->limits[2]); thermostat = th; if (i2c_attach_client(&th->clt)) { - printk(KERN_INFO "adt746x: Thermostat failed to attach client !\n"); + printk(KERN_INFO "adt746x: Thermostat failed to attach " + "client !\n"); thermostat = NULL; kfree(th); return -ENODEV; @@ -392,8 +426,10 @@ th->last_speed[1] = -2; if (fan_speed != -1) { + /* manual mode, stop fans */ write_both_fan_speed(th, 0); } else { + /* automatic mode */ write_both_fan_speed(th, -1); } @@ -510,8 +546,9 @@ therm_bus = ((*prop) >> 8) & 0x0f; therm_address = ((*prop) & 0xff) >> 1; - printk(KERN_INFO "adt746x: Thermostat bus: %d, address: 0x%02x, limit_adjust: %d, fan_speed: %d\n", - therm_bus, therm_address, limit_adjust, fan_speed); + printk(KERN_INFO "adt746x: Thermostat bus: %d, address: 0x%02x, " + "limit_adjust: %d, fan_speed: %d\n", + therm_bus, therm_address, limit_adjust, fan_speed); of_dev = of_platform_device_create(np, "temperatures"); @@ -548,8 +585,11 @@ device_remove_file(&of_dev->dev, &dev_attr_limit_adjust); device_remove_file(&of_dev->dev, &dev_attr_specified_fan_speed); device_remove_file(&of_dev->dev, &dev_attr_cpu_fan_speed); + if(therm_type == ADT7460) - device_remove_file(&of_dev->dev, &dev_attr_gpu_fan_speed); + device_remove_file(&of_dev->dev, + &dev_attr_gpu_fan_speed); + of_device_unregister(of_dev); } i2c_del_driver(&thermostat_driver); diff -Nru a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c --- a/drivers/md/dm-crypt.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/md/dm-crypt.c 2004-10-26 18:25:17 -07:00 @@ -1,5 +1,6 @@ /* * Copyright (C) 2003 Christophe Saout + * Copyright (C) 2004 Clemens Fruhwirth * * This file is released under the GPL. */ @@ -15,6 +16,7 @@ #include #include #include +#include #include "dm.h" @@ -40,12 +42,22 @@ struct bio *bio_out; unsigned int offset_in; unsigned int offset_out; - int idx_in; - int idx_out; + unsigned int idx_in; + unsigned int idx_out; sector_t sector; int write; }; +struct crypt_config; + +struct crypt_iv_operations { + int (*ctr)(struct crypt_config *cc, struct dm_target *ti, + const char *opts); + void (*dtr)(struct crypt_config *cc); + const char *(*status)(struct crypt_config *cc); + int (*generator)(struct crypt_config *cc, u8 *iv, sector_t sector); +}; + /* * Crypt: maps a linear range of a block device * and encrypts / decrypts at the same time. @@ -64,11 +76,14 @@ /* * crypto related data */ - struct crypto_tfm *tfm; + struct crypt_iv_operations *iv_gen_ops; + char *iv_mode; + void *iv_gen_private; sector_t iv_offset; - int (*iv_generator)(struct crypt_config *cc, u8 *iv, sector_t sector); - int iv_size; - int key_size; + unsigned int iv_size; + + struct crypto_tfm *tfm; + unsigned int key_size; u8 key[0]; }; @@ -93,18 +108,129 @@ /* - * Different IV generation algorithms + * Different IV generation algorithms: + * + * plain: the initial vector is the 32-bit low-endian version of the sector + * number, padded with zeros if neccessary. + * + * ess_iv: "encrypted sector|salt initial vector", the sector number is + * encrypted with the bulk cipher using a salt as key. The salt + * should be derived from the bulk cipher's key via hashing. + * + * plumb: unimplemented, see: + * http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/454 */ -static int crypt_iv_plain(struct crypt_config *cc, u8 *iv, sector_t sector) + +static int crypt_iv_plain_gen(struct crypt_config *cc, u8 *iv, sector_t sector) { + memset(iv, 0, cc->iv_size); *(u32 *)iv = cpu_to_le32(sector & 0xffffffff); - if (cc->iv_size > sizeof(u32) / sizeof(u8)) - memset(iv + (sizeof(u32) / sizeof(u8)), 0, - cc->iv_size - (sizeof(u32) / sizeof(u8))); return 0; } +static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, + const char *opts) +{ + struct crypto_tfm *essiv_tfm; + struct crypto_tfm *hash_tfm; + struct scatterlist sg; + unsigned int saltsize; + u8 *salt; + + if (opts == NULL) { + ti->error = PFX "Digest algorithm missing for ESSIV mode"; + return -EINVAL; + } + + /* Hash the cipher key with the given hash algorithm */ + hash_tfm = crypto_alloc_tfm(opts, 0); + if (hash_tfm == NULL) { + ti->error = PFX "Error initializing ESSIV hash"; + return -EINVAL; + } + + if (crypto_tfm_alg_type(hash_tfm) != CRYPTO_ALG_TYPE_DIGEST) { + ti->error = PFX "Expected digest algorithm for ESSIV hash"; + crypto_free_tfm(hash_tfm); + return -EINVAL; + } + + saltsize = crypto_tfm_alg_digestsize(hash_tfm); + salt = kmalloc(saltsize, GFP_KERNEL); + if (salt == NULL) { + ti->error = PFX "Error kmallocing salt storage in ESSIV"; + crypto_free_tfm(hash_tfm); + return -ENOMEM; + } + + sg.page = virt_to_page(cc->key); + sg.offset = offset_in_page(cc->key); + sg.length = cc->key_size; + crypto_digest_digest(hash_tfm, &sg, 1, salt); + crypto_free_tfm(hash_tfm); + + /* Setup the essiv_tfm with the given salt */ + essiv_tfm = crypto_alloc_tfm(crypto_tfm_alg_name(cc->tfm), + CRYPTO_TFM_MODE_ECB); + if (essiv_tfm == NULL) { + ti->error = PFX "Error allocating crypto tfm for ESSIV"; + kfree(salt); + return -EINVAL; + } + if (crypto_tfm_alg_blocksize(essiv_tfm) + != crypto_tfm_alg_ivsize(cc->tfm)) { + ti->error = PFX "Block size of ESSIV cipher does " + "not match IV size of block cipher"; + crypto_free_tfm(essiv_tfm); + kfree(salt); + return -EINVAL; + } + if (crypto_cipher_setkey(essiv_tfm, salt, saltsize) < 0) { + ti->error = PFX "Failed to set key for ESSIV cipher"; + crypto_free_tfm(essiv_tfm); + kfree(salt); + return -EINVAL; + } + kfree(salt); + + cc->iv_gen_private = (void *)essiv_tfm; + return 0; +} + +static void crypt_iv_essiv_dtr(struct crypt_config *cc) +{ + crypto_free_tfm((struct crypto_tfm *)cc->iv_gen_private); + cc->iv_gen_private = NULL; +} + +static int crypt_iv_essiv_gen(struct crypt_config *cc, u8 *iv, sector_t sector) +{ + struct scatterlist sg = { NULL, }; + + memset(iv, 0, cc->iv_size); + *(u64 *)iv = cpu_to_le64(sector); + + sg.page = virt_to_page(iv); + sg.offset = offset_in_page(iv); + sg.length = cc->iv_size; + crypto_cipher_encrypt((struct crypto_tfm *)cc->iv_gen_private, + &sg, &sg, cc->iv_size); + + return 0; +} + +static struct crypt_iv_operations crypt_iv_plain_ops = { + .generator = crypt_iv_plain_gen +}; + +static struct crypt_iv_operations crypt_iv_essiv_ops = { + .ctr = crypt_iv_essiv_ctr, + .dtr = crypt_iv_essiv_dtr, + .generator = crypt_iv_essiv_gen +}; + + static inline int crypt_convert_scatterlist(struct crypt_config *cc, struct scatterlist *out, struct scatterlist *in, unsigned int length, @@ -113,8 +239,8 @@ u8 iv[cc->iv_size]; int r; - if (cc->iv_generator) { - r = cc->iv_generator(cc, iv, sector); + if (cc->iv_gen_ops) { + r = cc->iv_gen_ops->generator(cc, iv, sector); if (r < 0) return r; @@ -200,13 +326,13 @@ */ static struct bio * crypt_alloc_buffer(struct crypt_config *cc, unsigned int size, - struct bio *base_bio, int *bio_vec_idx) + struct bio *base_bio, unsigned int *bio_vec_idx) { struct bio *bio; - int nr_iovecs = dm_div_up(size, PAGE_SIZE); + unsigned int nr_iovecs = dm_div_up(size, PAGE_SIZE); int gfp_mask = GFP_NOIO | __GFP_HIGHMEM; - int flags = current->flags; - int i; + unsigned long flags = current->flags; + unsigned int i; /* * Tell VM to act less aggressively and fail earlier. @@ -280,9 +406,8 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *bio, unsigned int bytes) { - unsigned int start, end; + unsigned int i, start, end; struct bio_vec *bv; - int i; /* * This is ugly, but Jens Axboe thinks that using bi_idx in the @@ -366,11 +491,11 @@ /* * Decode key from its hex representation */ -static int crypt_decode_key(u8 *key, char *hex, int size) +static int crypt_decode_key(u8 *key, char *hex, unsigned int size) { char buffer[3]; char *endp; - int i; + unsigned int i; buffer[2] = '\0'; @@ -393,9 +518,9 @@ /* * Encode key into its hex representation */ -static void crypt_encode_key(char *hex, u8 *key, int size) +static void crypt_encode_key(char *hex, u8 *key, unsigned int size) { - int i; + unsigned int i; for(i = 0; i < size; i++) { sprintf(hex, "%02x", *key); @@ -414,9 +539,11 @@ struct crypto_tfm *tfm; char *tmp; char *cipher; - char *mode; - int crypto_flags; - int key_size; + char *chainmode; + char *ivmode; + char *ivopts; + unsigned int crypto_flags; + unsigned int key_size; if (argc != 5) { ti->error = PFX "Not enough arguments"; @@ -425,7 +552,9 @@ tmp = argv[0]; cipher = strsep(&tmp, "-"); - mode = strsep(&tmp, "-"); + chainmode = strsep(&tmp, "-"); + ivopts = strsep(&tmp, "-"); + ivmode = strsep(&ivopts, ":"); if (tmp) DMWARN(PFX "Unexpected additional cipher options"); @@ -439,19 +568,33 @@ return -ENOMEM; } - if (!mode || strcmp(mode, "plain") == 0) - cc->iv_generator = crypt_iv_plain; - else if (strcmp(mode, "ecb") == 0) - cc->iv_generator = NULL; - else { - ti->error = PFX "Invalid chaining mode"; + cc->key_size = key_size; + if ((key_size == 0 && strcmp(argv[1], "-") != 0) + || crypt_decode_key(cc->key, argv[1], key_size) < 0) { + ti->error = PFX "Error decoding key"; goto bad1; } - if (cc->iv_generator) + /* Compatiblity mode for old dm-crypt cipher strings */ + if (!chainmode || (strcmp(chainmode, "plain") == 0 && !ivmode)) { + chainmode = "cbc"; + ivmode = "plain"; + } + + /* Choose crypto_flags according to chainmode */ + if (strcmp(chainmode, "cbc") == 0) crypto_flags = CRYPTO_TFM_MODE_CBC; - else + else if (strcmp(chainmode, "ecb") == 0) crypto_flags = CRYPTO_TFM_MODE_ECB; + else { + ti->error = PFX "Unknown chaining mode"; + goto bad1; + } + + if (crypto_flags != CRYPTO_TFM_MODE_ECB && !ivmode) { + ti->error = PFX "This chaining mode requires an IV mechanism"; + goto bad1; + } tfm = crypto_alloc_tfm(cipher, crypto_flags); if (!tfm) { @@ -463,15 +606,39 @@ goto bad2; } + cc->tfm = tfm; + + /* + * Choose ivmode. Valid modes: "plain", "essiv:". + * See comments at iv code + */ + + if (ivmode == NULL) + cc->iv_gen_ops = NULL; + else if (strcmp(ivmode, "plain") == 0) + cc->iv_gen_ops = &crypt_iv_plain_ops; + else if (strcmp(ivmode, "essiv") == 0) + cc->iv_gen_ops = &crypt_iv_essiv_ops; + else { + ti->error = PFX "Invalid IV mode"; + goto bad2; + } + + if (cc->iv_gen_ops && cc->iv_gen_ops->ctr && + cc->iv_gen_ops->ctr(cc, ti, ivopts) < 0) + goto bad2; + if (tfm->crt_cipher.cit_decrypt_iv && tfm->crt_cipher.cit_encrypt_iv) - /* at least a 32 bit sector number should fit in our buffer */ + /* at least a 64 bit sector number should fit in our buffer */ cc->iv_size = max(crypto_tfm_alg_ivsize(tfm), - (unsigned int)(sizeof(u32) / sizeof(u8))); + (unsigned int)(sizeof(u64) / sizeof(u8))); else { cc->iv_size = 0; - if (cc->iv_generator) { + if (cc->iv_gen_ops) { DMWARN(PFX "Selected cipher does not support IVs"); - cc->iv_generator = NULL; + if (cc->iv_gen_ops->dtr) + cc->iv_gen_ops->dtr(cc); + cc->iv_gen_ops = NULL; } } @@ -479,52 +646,59 @@ mempool_free_slab, _crypt_io_pool); if (!cc->io_pool) { ti->error = PFX "Cannot allocate crypt io mempool"; - goto bad2; + goto bad3; } cc->page_pool = mempool_create(MIN_POOL_PAGES, mempool_alloc_page, mempool_free_page, NULL); if (!cc->page_pool) { ti->error = PFX "Cannot allocate page mempool"; - goto bad3; - } - - cc->tfm = tfm; - cc->key_size = key_size; - if ((key_size == 0 && strcmp(argv[1], "-") != 0) - || crypt_decode_key(cc->key, argv[1], key_size) < 0) { - ti->error = PFX "Error decoding key"; goto bad4; } if (tfm->crt_cipher.cit_setkey(tfm, cc->key, key_size) < 0) { ti->error = PFX "Error setting key"; - goto bad4; + goto bad5; } if (sscanf(argv[2], SECTOR_FORMAT, &cc->iv_offset) != 1) { ti->error = PFX "Invalid iv_offset sector"; - goto bad4; + goto bad5; } if (sscanf(argv[4], SECTOR_FORMAT, &cc->start) != 1) { ti->error = PFX "Invalid device sector"; - goto bad4; + goto bad5; } if (dm_get_device(ti, argv[3], cc->start, ti->len, dm_table_get_mode(ti->table), &cc->dev)) { ti->error = PFX "Device lookup failed"; - goto bad4; + goto bad5; } + if (ivmode && cc->iv_gen_ops) { + if (ivopts) + *(ivopts - 1) = ':'; + cc->iv_mode = kmalloc(strlen(ivmode) + 1, GFP_KERNEL); + if (!cc->iv_mode) { + ti->error = PFX "Error kmallocing iv_mode string"; + goto bad5; + } + strcpy(cc->iv_mode, ivmode); + } else + cc->iv_mode = NULL; + ti->private = cc; return 0; -bad4: +bad5: mempool_destroy(cc->page_pool); -bad3: +bad4: mempool_destroy(cc->io_pool); +bad3: + if (cc->iv_gen_ops && cc->iv_gen_ops->dtr) + cc->iv_gen_ops->dtr(cc); bad2: crypto_free_tfm(tfm); bad1: @@ -539,6 +713,10 @@ mempool_destroy(cc->page_pool); mempool_destroy(cc->io_pool); + if (cc->iv_mode) + kfree(cc->iv_mode); + if (cc->iv_gen_ops && cc->iv_gen_ops->dtr) + cc->iv_gen_ops->dtr(cc); crypto_free_tfm(cc->tfm); dm_put_device(ti, cc->dev); kfree(cc); @@ -577,7 +755,8 @@ static inline struct bio * crypt_clone(struct crypt_config *cc, struct crypt_io *io, struct bio *bio, - sector_t sector, int *bvec_idx, struct convert_context *ctx) + sector_t sector, unsigned int *bvec_idx, + struct convert_context *ctx) { struct bio *clone; @@ -630,7 +809,7 @@ struct bio *clone; unsigned int remaining = bio->bi_size; sector_t sector = bio->bi_sector - ti->begin; - int bvec_idx = 0; + unsigned int bvec_idx = 0; io->target = ti; io->bio = bio; @@ -692,8 +871,8 @@ struct crypt_config *cc = (struct crypt_config *) ti->private; char buffer[32]; const char *cipher; - const char *mode = NULL; - int offset; + const char *chainmode = NULL; + unsigned int sz = 0; switch (type) { case STATUSTYPE_INFO: @@ -705,34 +884,35 @@ switch(cc->tfm->crt_cipher.cit_mode) { case CRYPTO_TFM_MODE_CBC: - mode = "plain"; + chainmode = "cbc"; break; case CRYPTO_TFM_MODE_ECB: - mode = "ecb"; + chainmode = "ecb"; break; default: BUG(); } - snprintf(result, maxlen, "%s-%s ", cipher, mode); - offset = strlen(result); + if (cc->iv_mode) + DMEMIT("%s-%s-%s ", cipher, chainmode, cc->iv_mode); + else + DMEMIT("%s-%s ", cipher, chainmode); if (cc->key_size > 0) { - if ((maxlen - offset) < ((cc->key_size << 1) + 1)) + if ((maxlen - sz) < ((cc->key_size << 1) + 1)) return -ENOMEM; - crypt_encode_key(result + offset, cc->key, cc->key_size); - offset += cc->key_size << 1; + crypt_encode_key(result + sz, cc->key, cc->key_size); + sz += cc->key_size << 1; } else { - if (offset >= maxlen) + if (sz >= maxlen) return -ENOMEM; - result[offset++] = '-'; + result[sz++] = '-'; } format_dev_t(buffer, cc->dev->bdev->bd_dev); - snprintf(result + offset, maxlen - offset, " " SECTOR_FORMAT - " %s " SECTOR_FORMAT, cc->iv_offset, - buffer, cc->start); + DMEMIT(" " SECTOR_FORMAT " %s " SECTOR_FORMAT, + cc->iv_offset, buffer, cc->start); break; } return 0; @@ -740,7 +920,7 @@ static struct target_type crypt_target = { .name = "crypt", - .version= {1, 0, 0}, + .version= {1, 1, 0}, .module = THIS_MODULE, .ctr = crypt_ctr, .dtr = crypt_dtr, diff -Nru a/drivers/md/dm-target.c b/drivers/md/dm-target.c --- a/drivers/md/dm-target.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/md/dm-target.c 2004-10-26 18:25:19 -07:00 @@ -120,10 +120,9 @@ return -ENOMEM; down_write(&_lock); - if (__find_target_type(t->name)) { - kfree(ti); + if (__find_target_type(t->name)) rv = -EEXIST; - } else + else list_add(&ti->list, &_targets); up_write(&_lock); diff -Nru a/drivers/md/dm.c b/drivers/md/dm.c --- a/drivers/md/dm.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/md/dm.c 2004-10-26 18:25:18 -07:00 @@ -805,7 +805,7 @@ { struct mapped_device *md = (struct mapped_device *) context; - atomic_inc(&md->event_nr);; + atomic_inc(&md->event_nr); wake_up(&md->eventq); } diff -Nru a/drivers/md/linear.c b/drivers/md/linear.c --- a/drivers/md/linear.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/md/linear.c 2004-10-26 18:25:18 -07:00 @@ -99,17 +99,14 @@ linear_conf_t *conf = mddev_to_conf(mddev); int i, ret = 0; - for (i=0; i < mddev->raid_disks; i++) { + for (i=0; i < mddev->raid_disks && ret == 0; i++) { struct block_device *bdev = conf->disks[i].rdev->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; - } - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; + else + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); } return ret; } diff -Nru a/drivers/md/md.c b/drivers/md/md.c --- a/drivers/md/md.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/md/md.c 2004-10-26 18:25:17 -07:00 @@ -154,38 +154,6 @@ tmp = tmp->next;}) \ ) -int md_flush_mddev(mddev_t *mddev, sector_t *error_sector) -{ - struct list_head *tmp; - mdk_rdev_t *rdev; - int ret = 0; - - /* - * this list iteration is done without any locking in md?! - */ - ITERATE_RDEV(mddev, rdev, tmp) { - request_queue_t *r_queue = bdev_get_queue(rdev->bdev); - int err; - - if (!r_queue->issue_flush_fn) - err = -EOPNOTSUPP; - else - err = r_queue->issue_flush_fn(r_queue, rdev->bdev->bd_disk, error_sector); - - if (!ret) - ret = err; - } - - return ret; -} - -static int md_flush_all(request_queue_t *q, struct gendisk *disk, - sector_t *error_sector) -{ - mddev_t *mddev = q->queuedata; - - return md_flush_mddev(mddev, error_sector); -} static int md_fail_request (request_queue_t *q, struct bio *bio) { @@ -472,30 +440,6 @@ return csum; } -/* csum_partial is not consistent between different architectures. - * Some (i386) do a 32bit csum. Some (alpha) do 16 bit. - * This makes it hard for user-space to know what to do. - * So we use calc_sb_csum to set the checksum to allow working - * with older kernels, but allow calc_sb_csum_common to - * be used when checking if a checksum is correct, to - * make life easier for user-space tools that might write - * a superblock. - */ -static unsigned int calc_sb_csum_common(mdp_super_t *super) -{ - unsigned int disk_csum = super->sb_csum; - unsigned long long newcsum = 0; - unsigned int csum; - int i; - unsigned int *superc = (int*) super; - super->sb_csum = 0; - - for (i=0; i>32); - super->sb_csum = disk_csum; - return csum; -} /* * Handle superblock details. @@ -579,8 +523,7 @@ if (sb->raid_disks <= 0) goto abort; - if (calc_sb_csum(sb) != sb->sb_csum && - calc_sb_csum_common(sb) != sb->sb_csum) { + if (csum_fold(calc_sb_csum(sb)) != csum_fold(sb->sb_csum)) { printk(KERN_WARNING "md: invalid superblock checksum on %s\n", b); goto abort; @@ -805,7 +748,7 @@ { unsigned int disk_csum, csum; unsigned long long newcsum; - int size = 256 + sb->max_dev*2; + int size = 256 + le32_to_cpu(sb->max_dev)*2; unsigned int *isuper = (unsigned int*)sb; int i; @@ -820,7 +763,7 @@ csum = (newcsum & 0xffffffff) + (newcsum >> 32); sb->sb_csum = disk_csum; - return csum; + return cpu_to_le32(csum); } static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version) @@ -842,7 +785,7 @@ case 0: sb_offset = rdev->bdev->bd_inode->i_size >> 9; sb_offset -= 8*2; - sb_offset &= ~(4*2); + sb_offset &= ~(4*2-1); /* convert from sectors to K */ sb_offset /= 2; break; @@ -875,6 +818,11 @@ bdevname(rdev->bdev,b)); return -EINVAL; } + if (le64_to_cpu(sb->data_size) < 10) { + printk("md: data_size too small on %s\n", + bdevname(rdev->bdev,b)); + return -EINVAL; + } rdev->preferred_minor = 0xffff; rdev->data_offset = le64_to_cpu(sb->data_offset); @@ -919,7 +867,6 @@ if (mddev->raid_disks == 0) { mddev->major_version = 1; - mddev->minor_version = 0; mddev->patch_version = 0; mddev->persistent = 1; mddev->chunk_size = le32_to_cpu(sb->chunksize) << 9; @@ -928,7 +875,7 @@ mddev->level = le32_to_cpu(sb->level); mddev->layout = le32_to_cpu(sb->layout); mddev->raid_disks = le32_to_cpu(sb->raid_disks); - mddev->size = (u32)le64_to_cpu(sb->size); + mddev->size = le64_to_cpu(sb->size)/2; mddev->events = le64_to_cpu(sb->events); mddev->recovery_cp = le64_to_cpu(sb->resync_offset); @@ -996,7 +943,7 @@ if (rdev2->desc_nr > max_dev) max_dev = rdev2->desc_nr; - sb->max_dev = max_dev; + sb->max_dev = cpu_to_le32(max_dev); for (i=0; idev_roles[max_dev] = cpu_to_le16(0xfffe); @@ -1491,17 +1438,6 @@ } - /* - * Check if we can support this RAID array - */ - if (mddev->major_version != MD_MAJOR_VERSION || - mddev->minor_version > MD_MINOR_VERSION) { - printk(KERN_ALERT - "md: %s: unsupported raid array version %d.%d.%d\n", - mdname(mddev), mddev->major_version, - mddev->minor_version, mddev->patch_version); - goto abort; - } if ((mddev->recovery_cp != MaxSector) && ((mddev->level == 1) || @@ -1511,8 +1447,6 @@ mdname(mddev)); return 0; -abort: - return 1; } int mdp_major = 0; @@ -1714,7 +1648,6 @@ */ mddev->queue->queuedata = mddev; mddev->queue->make_request_fn = mddev->pers->make_request; - mddev->queue->issue_flush_fn = md_flush_all; mddev->changed = 1; return 0; @@ -1846,7 +1779,7 @@ err = do_md_run (mddev); if (err) { - printk(KERN_WARNING "md :do_md_run() returned %d\n", err); + printk(KERN_WARNING "md: do_md_run() returned %d\n", err); do_md_stop (mddev, 0); } } @@ -2036,7 +1969,7 @@ info.major_version = mddev->major_version; info.minor_version = mddev->minor_version; - info.patch_version = 1; + info.patch_version = MD_PATCHLEVEL_VERSION; info.ctime = mddev->ctime; info.level = mddev->level; info.size = mddev->size; @@ -2436,7 +2369,7 @@ /* The "size" is the amount of each device that is used. * This can only make sense for arrays with redundancy. * linear and raid0 always use whatever space is available - * We can only consider changing the size of no resync + * We can only consider changing the size if no resync * or reconstruction is happening, and if the new size * is acceptable. It must fit before the sb_offset or, * if that is curr_resync = 2; + try_again: + if (signal_pending(current)) { + flush_signals(current); + goto skip; + } ITERATE_MDDEV(mddev2,tmp) { + printk("."); if (mddev2 == mddev) continue; if (mddev2->curr_resync && match_mddev_units(mddev,mddev2)) { - printk(KERN_INFO "md: delaying resync of %s" - " until %s has finished resync (they" - " share one or more physical units)\n", - mdname(mddev), mdname(mddev2)); - if (mddev < mddev2) {/* arbitrarily yield */ + DEFINE_WAIT(wq); + if (mddev < mddev2 && mddev->curr_resync == 2) { + /* arbitrarily yield */ mddev->curr_resync = 1; wake_up(&resync_wait); } - if (wait_event_interruptible(resync_wait, - mddev2->curr_resync < mddev->curr_resync)) { - flush_signals(current); + if (mddev > mddev2 && mddev->curr_resync == 1) + /* no need to wait here, we can wait the next + * time 'round when curr_resync == 2 + */ + continue; + prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE); + if (!signal_pending(current) + && mddev2->curr_resync >= mddev->curr_resync) { + printk(KERN_INFO "md: delaying resync of %s" + " until %s has finished resync (they" + " share one or more physical units)\n", + mdname(mddev), mdname(mddev2)); mddev_put(mddev2); - goto skip; + schedule(); + finish_wait(&resync_wait, &wq); + goto try_again; } - } - if (mddev->curr_resync == 1) { - mddev_put(mddev2); - break; + finish_wait(&resync_wait, &wq); } } } while (mddev->curr_resync < 2); @@ -3500,6 +3454,7 @@ md_enter_safemode(mddev); skip: mddev->curr_resync = 0; + wake_up(&resync_wait); set_bit(MD_RECOVERY_DONE, &mddev->recovery); md_wakeup_thread(mddev->thread); } @@ -3567,14 +3522,11 @@ mddev->recovery = 0; /* flag recovery needed just to double check */ set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); - wake_up(&resync_wait); goto unlock; } - if (mddev->recovery) { + if (mddev->recovery) /* probably just the RECOVERY_NEEDED flag */ mddev->recovery = 0; - wake_up(&resync_wait); - } /* no recovery is running. * remove any failed drives, then diff -Nru a/drivers/md/multipath.c b/drivers/md/multipath.c --- a/drivers/md/multipath.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/md/multipath.c 2004-10-26 18:25:18 -07:00 @@ -36,8 +36,6 @@ static mdk_personality_t multipath_personality; -static spinlock_t retry_list_lock = SPIN_LOCK_UNLOCKED; -struct multipath_bh *multipath_retry_list = NULL, **multipath_retry_tail; static void *mp_pool_alloc(int gfp_flags, void *data) @@ -63,16 +61,16 @@ * now we use the first available disk. */ - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); for (i = 0; i < disks; i++) { mdk_rdev_t *rdev = conf->multipaths[i].rdev; if (rdev && rdev->in_sync) { atomic_inc(&rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); return i; } } - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); printk(KERN_ERR "multipath_map(): no more operational IO paths?\n"); return (-1); @@ -82,14 +80,11 @@ { unsigned long flags; mddev_t *mddev = mp_bh->mddev; + multipath_conf_t *conf = mddev_to_conf(mddev); - spin_lock_irqsave(&retry_list_lock, flags); - if (multipath_retry_list == NULL) - multipath_retry_tail = &multipath_retry_list; - *multipath_retry_tail = mp_bh; - multipath_retry_tail = &mp_bh->next_mp; - mp_bh->next_mp = NULL; - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_lock_irqsave(&conf->device_lock, flags); + list_add(&mp_bh->retry_list, &conf->retry_list); + spin_unlock_irqrestore(&conf->device_lock, flags); md_wakeup_thread(mddev->thread); } @@ -140,26 +135,26 @@ { multipath_conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->multipaths[i].rdev; - if (rdev && !rdev->faulty) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } + static void multipath_unplug(request_queue_t *q) { unplug_slaves(q->queuedata); @@ -195,6 +190,7 @@ multipath = conf->multipaths + mp_bh->path; mp_bh->bio = *bio; + mp_bh->bio.bi_sector += multipath->rdev->data_offset; mp_bh->bio.bi_bdev = multipath->rdev->bdev; mp_bh->bio.bi_rw |= (1 << BIO_RW_FAILFAST); mp_bh->bio.bi_end_io = multipath_end_request; @@ -224,22 +220,26 @@ multipath_conf_t *conf = mddev_to_conf(mddev); int i, ret = 0; - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->multipaths[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } - - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; } } + rcu_read_unlock(); return ret; } @@ -310,10 +310,9 @@ struct multipath_info *p; print_multipath_conf(conf); - spin_lock_irq(&conf->device_lock); + for (path=0; pathraid_disks; path++) if ((p=conf->multipaths+path)->rdev == NULL) { - p->rdev = rdev; blk_queue_stack_limits(mddev->queue, rdev->bdev->bd_disk->queue); @@ -330,9 +329,9 @@ conf->working_disks++; rdev->raid_disk = path; rdev->in_sync = 1; + p->rdev = rdev; found = 1; } - spin_unlock_irq(&conf->device_lock); print_multipath_conf(conf); return found; @@ -341,26 +340,29 @@ static int multipath_remove_disk(mddev_t *mddev, int number) { multipath_conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; struct multipath_info *p = conf->multipaths + number; print_multipath_conf(conf); - spin_lock_irq(&conf->device_lock); - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { printk(KERN_ERR "hot-remove-disk, slot %d is identified" " but is still operational!\n", number); err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); abort: - spin_unlock_irq(&conf->device_lock); print_multipath_conf(conf); return err; @@ -382,18 +384,18 @@ struct bio *bio; unsigned long flags; multipath_conf_t *conf = mddev_to_conf(mddev); + struct list_head *head = &conf->retry_list; md_check_recovery(mddev); for (;;) { char b[BDEVNAME_SIZE]; - spin_lock_irqsave(&retry_list_lock, flags); - mp_bh = multipath_retry_list; - if (!mp_bh) + spin_lock_irqsave(&conf->device_lock, flags); + if (list_empty(head)) break; - multipath_retry_list = mp_bh->next_mp; - spin_unlock_irqrestore(&retry_list_lock, flags); + mp_bh = list_entry(head->prev, struct multipath_bh, retry_list); + list_del(head->prev); + spin_unlock_irqrestore(&conf->device_lock, flags); - mddev = mp_bh->mddev; bio = &mp_bh->bio; bio->bi_sector = mp_bh->master_bio->bi_sector; @@ -409,6 +411,7 @@ bdevname(bio->bi_bdev,b), (unsigned long long)bio->bi_sector); *bio = *(mp_bh->master_bio); + bio->bi_sector += conf->multipaths[mp_bh->path].rdev->data_offset; bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev; bio->bi_rw |= (1 << BIO_RW_FAILFAST); bio->bi_end_io = multipath_end_request; @@ -416,7 +419,7 @@ generic_make_request(bio); } } - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_unlock_irqrestore(&conf->device_lock, flags); } static int multipath_run (mddev_t *mddev) @@ -489,6 +492,7 @@ mddev->sb_dirty = 1; conf->mddev = mddev; conf->device_lock = SPIN_LOCK_UNLOCKED; + INIT_LIST_HEAD(&conf->retry_list); if (!conf->working_disks) { printk(KERN_ERR "multipath: no operational IO paths for %s\n", diff -Nru a/drivers/md/raid0.c b/drivers/md/raid0.c --- a/drivers/md/raid0.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/md/raid0.c 2004-10-26 18:25:18 -07:00 @@ -48,18 +48,14 @@ mdk_rdev_t **devlist = conf->strip_zone[0].dev; int i, ret = 0; - for (i=0; iraid_disks; i++) { + for (i=0; iraid_disks && ret == 0; i++) { struct block_device *bdev = devlist[i]->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; - } - - ret =r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; + else + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); } return ret; } diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c --- a/drivers/md/raid1.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/md/raid1.c 2004-10-26 18:25:18 -07:00 @@ -30,8 +30,6 @@ #define NR_RAID1_BIOS 256 static mdk_personality_t raid1_personality; -static spinlock_t retry_list_lock = SPIN_LOCK_UNLOCKED; -static LIST_HEAD(retry_list_head); static void unplug_slaves(mddev_t *mddev); @@ -188,10 +186,11 @@ { unsigned long flags; mddev_t *mddev = r1_bio->mddev; + conf_t *conf = mddev_to_conf(mddev); - spin_lock_irqsave(&retry_list_lock, flags); - list_add(&r1_bio->retry_list, &retry_list_head); - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_lock_irqsave(&conf->device_lock, flags); + list_add(&r1_bio->retry_list, &conf->retry_list); + spin_unlock_irqrestore(&conf->device_lock, flags); md_wakeup_thread(mddev->thread); } @@ -340,7 +339,7 @@ const int sectors = r1_bio->sectors; sector_t new_distance, current_distance; - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); /* * Check if it if we can balance. We can balance on the whole * device if no resync is going on, or below the resync window. @@ -417,7 +416,7 @@ conf->last_used = new_disk; atomic_inc(&conf->mirrors[new_disk].rdev->nr_pending); } - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); return new_disk; } @@ -426,26 +425,26 @@ { conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->mirrors[i].rdev; - if (rdev && atomic_read(&rdev->nr_pending)) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } + static void raid1_unplug(request_queue_t *q) { unplug_slaves(q->queuedata); @@ -456,24 +455,28 @@ { mddev_t *mddev = q->queuedata; conf_t *conf = mddev_to_conf(mddev); - unsigned long flags; int i, ret = 0; - spin_lock_irqsave(&conf->device_lock, flags); - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->mirrors[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (r_queue->issue_flush_fn) { - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; + if (!r_queue->issue_flush_fn) + ret = -EOPNOTSUPP; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); return ret; } @@ -580,7 +583,7 @@ * bios[x] to bio */ disks = conf->raid_disks; - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); for (i = 0; i < disks; i++) { if (conf->mirrors[i].rdev && !conf->mirrors[i].rdev->faulty) { @@ -589,7 +592,7 @@ } else r1_bio->bios[i] = NULL; } - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); atomic_set(&r1_bio->remaining, 1); md_write_start(mddev); @@ -711,7 +714,6 @@ conf_t *conf = mddev->private; mirror_info_t *tmp; - spin_lock_irq(&conf->device_lock); /* * Find all failed disks within the RAID1 configuration * and mark them readable @@ -726,7 +728,6 @@ tmp->rdev->in_sync = 1; } } - spin_unlock_irq(&conf->device_lock); print_conf(conf); return 0; @@ -740,10 +741,8 @@ int mirror; mirror_info_t *p; - spin_lock_irq(&conf->device_lock); for (mirror=0; mirror < mddev->raid_disks; mirror++) if ( !(p=conf->mirrors+mirror)->rdev) { - p->rdev = rdev; blk_queue_stack_limits(mddev->queue, rdev->bdev->bd_disk->queue); @@ -758,9 +757,9 @@ p->head_position = 0; rdev->raid_disk = mirror; found = 1; + p->rdev = rdev; break; } - spin_unlock_irq(&conf->device_lock); print_conf(conf); return found; @@ -769,24 +768,27 @@ static int raid1_remove_disk(mddev_t *mddev, int number) { conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; mirror_info_t *p = conf->mirrors+ number; print_conf(conf); - spin_lock_irq(&conf->device_lock); - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); abort: - spin_unlock_irq(&conf->device_lock); print_conf(conf); return err; @@ -904,11 +906,11 @@ static void raid1d(mddev_t *mddev) { - struct list_head *head = &retry_list_head; r1bio_t *r1_bio; struct bio *bio; unsigned long flags; conf_t *conf = mddev_to_conf(mddev); + struct list_head *head = &conf->retry_list; int unplug=0; mdk_rdev_t *rdev; @@ -917,12 +919,12 @@ for (;;) { char b[BDEVNAME_SIZE]; - spin_lock_irqsave(&retry_list_lock, flags); + spin_lock_irqsave(&conf->device_lock, flags); if (list_empty(head)) break; r1_bio = list_entry(head->prev, r1bio_t, retry_list); list_del(head->prev); - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_unlock_irqrestore(&conf->device_lock, flags); mddev = r1_bio->mddev; conf = mddev_to_conf(mddev); @@ -941,6 +943,8 @@ } else { r1_bio->bios[r1_bio->read_disk] = NULL; r1_bio->read_disk = disk; + bio_put(bio); + bio = bio_clone(r1_bio->master_bio, GFP_NOIO); r1_bio->bios[r1_bio->read_disk] = bio; rdev = conf->mirrors[disk].rdev; if (printk_ratelimit()) @@ -948,15 +952,17 @@ " another mirror\n", bdevname(rdev->bdev,b), (unsigned long long)r1_bio->sector); - bio->bi_bdev = rdev->bdev; bio->bi_sector = r1_bio->sector + rdev->data_offset; + bio->bi_bdev = rdev->bdev; + bio->bi_end_io = raid1_end_read_request; bio->bi_rw = READ; + bio->bi_private = r1_bio; unplug = 1; generic_make_request(bio); } } } - spin_unlock_irqrestore(&retry_list_lock, flags); + spin_unlock_irqrestore(&conf->device_lock, flags); if (unplug) unplug_slaves(mddev); } @@ -1023,7 +1029,7 @@ */ disk = conf->last_used; /* make sure disk is operational */ - spin_lock_irq(&conf->device_lock); + while (conf->mirrors[disk].rdev == NULL || !conf->mirrors[disk].rdev->in_sync) { if (disk <= 0) @@ -1034,7 +1040,7 @@ } conf->last_used = disk; atomic_inc(&conf->mirrors[disk].rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + mirror = conf->mirrors + disk; @@ -1087,7 +1093,7 @@ int rv = max_sector - sector_nr; md_done_sync(mddev, rv, 1); put_buf(r1_bio); - atomic_dec(&conf->mirrors[disk].rdev->nr_pending); + rdev_dec_pending(conf->mirrors[disk].rdev, mddev); return rv; } @@ -1205,6 +1211,7 @@ conf->raid_disks = mddev->raid_disks; conf->mddev = mddev; conf->device_lock = SPIN_LOCK_UNLOCKED; + INIT_LIST_HEAD(&conf->retry_list); if (conf->working_disks == 1) mddev->recovery_cp = MaxSector; diff -Nru a/drivers/md/raid10.c b/drivers/md/raid10.c --- a/drivers/md/raid10.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/md/raid10.c 2004-10-26 18:25:18 -07:00 @@ -36,7 +36,7 @@ * device of the previous section. * Thus there are (near_copies*far_copies) of each chunk, and each is on a different * drive. - * near_copies and far_copies must be at least one, and there product is at most + * near_copies and far_copies must be at least one, and their product is at most * raid_disks. */ @@ -498,7 +498,7 @@ sector_t new_distance, current_distance; raid10_find_phys(conf, r10_bio); - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); /* * Check if we can balance. We can balance on the whole * device if no resync is going on, or below the resync window. @@ -570,7 +570,7 @@ if (disk >= 0 && conf->mirrors[disk].rdev) atomic_inc(&conf->mirrors[disk].rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); return disk; } @@ -579,26 +579,26 @@ { conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->mirrors[i].rdev; - if (rdev && atomic_read(&rdev->nr_pending)) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } + static void raid10_unplug(request_queue_t *q) { unplug_slaves(q->queuedata); @@ -609,24 +609,28 @@ { mddev_t *mddev = q->queuedata; conf_t *conf = mddev_to_conf(mddev); - unsigned long flags; int i, ret = 0; - spin_lock_irqsave(&conf->device_lock, flags); - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->mirrors[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; request_queue_t *r_queue = bdev_get_queue(bdev); - if (r_queue->issue_flush_fn) { - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; + if (!r_queue->issue_flush_fn) + ret = -EOPNOTSUPP; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); return ret; } @@ -757,7 +761,7 @@ * bios[x] to bio */ raid10_find_phys(conf, r10_bio); - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); for (i = 0; i < conf->copies; i++) { int d = r10_bio->devs[i].devnum; if (conf->mirrors[d].rdev && @@ -767,7 +771,7 @@ } else r10_bio->devs[i].bio = NULL; } - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); atomic_set(&r10_bio->remaining, 1); md_write_start(mddev); @@ -900,7 +904,6 @@ conf_t *conf = mddev->private; mirror_info_t *tmp; - spin_lock_irq(&conf->device_lock); /* * Find all non-in_sync disks within the RAID10 configuration * and mark them in_sync @@ -915,7 +918,6 @@ tmp->rdev->in_sync = 1; } } - spin_unlock_irq(&conf->device_lock); print_conf(conf); return 0; @@ -934,10 +936,9 @@ * very different from resync */ return 0; - spin_lock_irq(&conf->device_lock); + for (mirror=0; mirror < mddev->raid_disks; mirror++) if ( !(p=conf->mirrors+mirror)->rdev) { - p->rdev = rdev; blk_queue_stack_limits(mddev->queue, rdev->bdev->bd_disk->queue); @@ -952,9 +953,9 @@ p->head_position = 0; rdev->raid_disk = mirror; found = 1; + p->rdev = rdev; break; } - spin_unlock_irq(&conf->device_lock); print_conf(conf); return found; @@ -963,24 +964,27 @@ static int raid10_remove_disk(mddev_t *mddev, int number) { conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; mirror_info_t *p = conf->mirrors+ number; print_conf(conf); - spin_lock_irq(&conf->device_lock); - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); abort: - spin_unlock_irq(&conf->device_lock); print_conf(conf); return err; @@ -1145,6 +1149,7 @@ atomic_inc(&r10_bio->remaining); md_sync_acct(conf->mirrors[d].rdev->bdev, tbio->bi_size >> 9); + tbio->bi_sector += conf->mirrors[d].rdev->data_offset; generic_make_request(tbio); } @@ -1233,8 +1238,8 @@ int mirror; bio = r10_bio->devs[r10_bio->read_slot].bio; r10_bio->devs[r10_bio->read_slot].bio = NULL; + bio_put(bio); mirror = read_balance(conf, r10_bio); - r10_bio->devs[r10_bio->read_slot].bio = bio; if (mirror == -1) { printk(KERN_ALERT "raid10: %s: unrecoverable I/O" " read error for block %llu\n", @@ -1248,15 +1253,14 @@ " another mirror\n", bdevname(rdev->bdev,b), (unsigned long long)r10_bio->sector); - bio->bi_bdev = rdev->bdev; + bio = bio_clone(r10_bio->master_bio, GFP_NOIO); + r10_bio->devs[r10_bio->read_slot].bio = bio; bio->bi_sector = r10_bio->devs[r10_bio->read_slot].addr + rdev->data_offset; - bio->bi_next = NULL; - bio->bi_flags &= (1<bi_flags |= 1 << BIO_UPTODATE; - bio->bi_idx = 0; - bio->bi_size = r10_bio->sectors << 9; + bio->bi_bdev = rdev->bdev; bio->bi_rw = READ; + bio->bi_private = r10_bio; + bio->bi_end_io = raid10_end_read_request; unplug = 1; generic_make_request(bio); } @@ -1468,7 +1472,7 @@ set_bit(R10BIO_IsSync, &r10_bio->state); raid10_find_phys(conf, r10_bio); r10_bio->sectors = (sector_nr | conf->chunk_mask) - sector_nr +1; - spin_lock_irq(&conf->device_lock); + for (i=0; icopies; i++) { int d = r10_bio->devs[i].devnum; bio = r10_bio->devs[i].bio; @@ -1488,14 +1492,15 @@ bio->bi_bdev = conf->mirrors[d].rdev->bdev; count++; } - spin_unlock_irq(&conf->device_lock); + if (count < 2) { for (i=0; icopies; i++) { int d = r10_bio->devs[i].devnum; if (r10_bio->devs[i].bio->bi_end_io) - atomic_dec(&conf->mirrors[d].rdev->nr_pending); + rdev_dec_pending(conf->mirrors[d].rdev, mddev); } put_buf(r10_bio); + biolist = NULL; goto giveup; } } @@ -1557,7 +1562,7 @@ } } - return nr_sectors; + return sectors_skipped + nr_sectors; giveup: /* There is nowhere to write, so all non-sync * drives must be failed, so try the next chunk... diff -Nru a/drivers/md/raid5.c b/drivers/md/raid5.c --- a/drivers/md/raid5.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/md/raid5.c 2004-10-26 18:25:17 -07:00 @@ -1247,13 +1247,13 @@ else bi->bi_end_io = raid5_end_read_request; - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); rdev = conf->disks[i].rdev; if (rdev && rdev->faulty) rdev = NULL; if (rdev) atomic_inc(&rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); if (rdev) { if (test_bit(R5_Syncio, &sh->dev[i].flags)) @@ -1302,25 +1302,24 @@ { raid5_conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->disks[i].rdev; - if (rdev && atomic_read(&rdev->nr_pending)) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); - if (r_queue && r_queue->unplug_fn) + if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } static void raid5_unplug_device(request_queue_t *q) @@ -1347,29 +1346,26 @@ raid5_conf_t *conf = mddev_to_conf(mddev); int i, ret = 0; - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->disks[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; - request_queue_t *r_queue; + request_queue_t *r_queue = bdev_get_queue(bdev); - if (!bdev) - continue; - - r_queue = bdev_get_queue(bdev); - if (!r_queue) - continue; - - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } - - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; } } + rcu_read_unlock(); return ret; } @@ -1799,7 +1795,6 @@ raid5_conf_t *conf = mddev->private; struct disk_info *tmp; - spin_lock_irq(&conf->device_lock); for (i = 0; i < conf->raid_disks; i++) { tmp = conf->disks + i; if (tmp->rdev @@ -1811,7 +1806,6 @@ tmp->rdev->in_sync = 1; } } - spin_unlock_irq(&conf->device_lock); print_raid5_conf(conf); return 0; } @@ -1819,25 +1813,28 @@ static int raid5_remove_disk(mddev_t *mddev, int number) { raid5_conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; struct disk_info *p = conf->disks + number; print_raid5_conf(conf); - spin_lock_irq(&conf->device_lock); - - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); abort: - spin_unlock_irq(&conf->device_lock); + print_raid5_conf(conf); return err; } @@ -1849,19 +1846,17 @@ int disk; struct disk_info *p; - spin_lock_irq(&conf->device_lock); /* * find the disk ... */ for (disk=0; disk < mddev->raid_disks; disk++) if ((p=conf->disks + disk)->rdev == NULL) { - p->rdev = rdev; rdev->in_sync = 0; rdev->raid_disk = disk; found = 1; + p->rdev = rdev; break; } - spin_unlock_irq(&conf->device_lock); print_raid5_conf(conf); return found; } diff -Nru a/drivers/md/raid6main.c b/drivers/md/raid6main.c --- a/drivers/md/raid6main.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/md/raid6main.c 2004-10-26 18:25:17 -07:00 @@ -1409,13 +1409,13 @@ else bi->bi_end_io = raid6_end_read_request; - spin_lock_irq(&conf->device_lock); + rcu_read_lock(); rdev = conf->disks[i].rdev; if (rdev && rdev->faulty) rdev = NULL; if (rdev) atomic_inc(&rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); + rcu_read_unlock(); if (rdev) { if (test_bit(R5_Syncio, &sh->dev[i].flags)) @@ -1464,25 +1464,24 @@ { raid6_conf_t *conf = mddev_to_conf(mddev); int i; - unsigned long flags; - spin_lock_irqsave(&conf->device_lock, flags); + rcu_read_lock(); for (i=0; iraid_disks; i++) { mdk_rdev_t *rdev = conf->disks[i].rdev; - if (rdev && atomic_read(&rdev->nr_pending)) { + if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { request_queue_t *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); - if (r_queue && r_queue->unplug_fn) + if (r_queue->unplug_fn) r_queue->unplug_fn(r_queue); - spin_lock_irqsave(&conf->device_lock, flags); - atomic_dec(&rdev->nr_pending); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } } - spin_unlock_irqrestore(&conf->device_lock, flags); + rcu_read_unlock(); } static void raid6_unplug_device(request_queue_t *q) @@ -1509,29 +1508,26 @@ raid6_conf_t *conf = mddev_to_conf(mddev); int i, ret = 0; - for (i=0; iraid_disks; i++) { + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { mdk_rdev_t *rdev = conf->disks[i].rdev; if (rdev && !rdev->faulty) { struct block_device *bdev = rdev->bdev; - request_queue_t *r_queue; + request_queue_t *r_queue = bdev_get_queue(bdev); - if (!bdev) - continue; - - r_queue = bdev_get_queue(bdev); - if (!r_queue) - continue; - - if (!r_queue->issue_flush_fn) { + if (!r_queue->issue_flush_fn) ret = -EOPNOTSUPP; - break; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } - - ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); - if (ret) - break; } } + rcu_read_unlock(); return ret; } @@ -1968,7 +1964,6 @@ raid6_conf_t *conf = mddev->private; struct disk_info *tmp; - spin_lock_irq(&conf->device_lock); for (i = 0; i < conf->raid_disks; i++) { tmp = conf->disks + i; if (tmp->rdev @@ -1980,7 +1975,6 @@ tmp->rdev->in_sync = 1; } } - spin_unlock_irq(&conf->device_lock); print_raid6_conf(conf); return 0; } @@ -1988,25 +1982,29 @@ static int raid6_remove_disk(mddev_t *mddev, int number) { raid6_conf_t *conf = mddev->private; - int err = 1; + int err = 0; + mdk_rdev_t *rdev; struct disk_info *p = conf->disks + number; print_raid6_conf(conf); - spin_lock_irq(&conf->device_lock); - - if (p->rdev) { - if (p->rdev->in_sync || - atomic_read(&p->rdev->nr_pending)) { + rdev = p->rdev; + if (rdev) { + if (rdev->in_sync || + atomic_read(&rdev->nr_pending)) { err = -EBUSY; goto abort; } p->rdev = NULL; - err = 0; + synchronize_kernel(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } } - if (err) - MD_BUG(); + abort: - spin_unlock_irq(&conf->device_lock); + print_raid6_conf(conf); return err; } @@ -2018,19 +2016,17 @@ int disk; struct disk_info *p; - spin_lock_irq(&conf->device_lock); /* * find the disk ... */ for (disk=0; disk < mddev->raid_disks; disk++) if ((p=conf->disks + disk)->rdev == NULL) { - p->rdev = rdev; rdev->in_sync = 0; rdev->raid_disk = disk; found = 1; + p->rdev = rdev; break; } - spin_unlock_irq(&conf->device_lock); print_raid6_conf(conf); return found; } diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c --- a/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-26 18:25:17 -07:00 @@ -917,14 +917,6 @@ } -static int dvb_net_set_config(struct net_device *dev, struct ifmap *map) -{ - if (netif_running(dev)) - return -EBUSY; - return 0; -} - - static void wq_restart_net_feed (void *data) { struct net_device *dev = data; @@ -983,7 +975,6 @@ dev->hard_start_xmit = dvb_net_tx; dev->get_stats = dvb_net_get_stats; dev->set_multicast_list = dvb_net_set_multicast_list; - dev->set_config = dvb_net_set_config; dev->set_mac_address = dvb_net_set_mac; dev->mtu = 4096; dev->mc_count = 0; diff -Nru a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c --- a/drivers/media/video/cpia.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/media/video/cpia.c 2004-10-26 18:25:18 -07:00 @@ -4047,22 +4047,13 @@ proc_cpia_create(); #endif -#ifdef CONFIG_KMOD -#ifdef CONFIG_VIDEO_CPIA_PP_MODULE - request_module("cpia_pp"); -#endif - -#ifdef CONFIG_VIDEO_CPIA_USB_MODULE - request_module("cpia_usb"); -#endif -#endif /* CONFIG_KMOD */ - #ifdef CONFIG_VIDEO_CPIA_PP cpia_pp_init(); #endif #ifdef CONFIG_VIDEO_CPIA_USB cpia_usb_init(); #endif + return 0; } diff -Nru a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c --- a/drivers/misc/ibmasm/ibmasmfs.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/misc/ibmasm/ibmasmfs.c 2004-10-26 18:25:18 -07:00 @@ -173,13 +173,8 @@ { struct dentry *dentry; struct inode *inode; - struct qstr qname; - qname.name = name; - qname.len = strlen (name); - qname.hash = full_name_hash(name, qname.len); - - dentry = d_alloc(parent, &qname); + dentry = d_alloc_name(parent, name); if (!dentry) return NULL; @@ -202,12 +197,8 @@ { struct dentry *dentry; struct inode *inode; - struct qstr qname; - qname.name = name; - qname.len = strlen (name); - qname.hash = full_name_hash(name, qname.len); - dentry = d_alloc(parent, &qname); + dentry = d_alloc_name(parent, name); if (!dentry) return NULL; diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c --- a/drivers/net/3c59x.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/3c59x.c 2004-10-26 18:25:17 -07:00 @@ -2887,7 +2887,7 @@ } static struct ethtool_ops vortex_ethtool_ops = { - .get_drvinfo = vortex_get_drvinfo, + .get_drvinfo = vortex_get_drvinfo, }; #ifdef CONFIG_PCI diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c --- a/drivers/net/8139too.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/8139too.c 2004-10-26 18:25:17 -07:00 @@ -599,10 +599,10 @@ MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM (multicast_filter_limit, "i"); -MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM (full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM (debug, "i"); +module_param(multicast_filter_limit, int, 0); +module_param_array(media, int, NULL, 0); +module_param_array(full_duplex, int, NULL, 0); +module_param(debug, int, 0); MODULE_PARM_DESC (debug, "8139too bitmapped message enable number"); MODULE_PARM_DESC (multicast_filter_limit, "8139too maximum number of filtered multicast addresses"); MODULE_PARM_DESC (media, "8139too: Bits 4+9: force full duplex, bit 5: 100Mbps"); diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig --- a/drivers/net/Kconfig 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/Kconfig 2004-10-26 18:25:18 -07:00 @@ -1413,66 +1413,17 @@ depends on NET_PCI && PCI select MII ---help--- - This driver supports Intel(R) PRO/100 family of adapters, which - includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82558 PRO/100+ PCI Adapter 668081-xxx, - 689661-xxx - 82558 PRO/100+ Management Adapter 691334-xxx, - 701738-xxx, - 721383-xxx - 82558 PRO/100+ Dual Port Server Adapter 714303-xxx, - 711269-xxx, - A28276-xxx - 82558 PRO/100+ PCI Server Adapter 710550-xxx - 82550 PRO/100 S Server Adapter 752438-xxx - 82559 A56831-xxx, - A10563-xxx, - A12171-xxx, - A12321-xxx, - A12320-xxx, - A12170-xxx - 748568-xxx - 748565-xxx - 82550 PRO/100 S Desktop Adapter 751767-xxx - 82559 748592-xxx, - A12167-xxx, - A12318-xxx, - A12317-xxx, - A12165-xxx, - 748569-xxx - 82559 PRO/100+ Server Adapter 729757-xxx - 82559 PRO/100 S Management Adapter 748566-xxx, - 748564-xxx - 82550 PRO/100 S Dual Port Server Adapter A56831-xxx - 82551 PRO/100 M Desktop Adapter A80897-xxx - PRO/100 S Advanced Management Adapter - 747842-xxx, - 745171-xxx - CNR PRO/100 VE Desktop Adapter A10386-xxx, - A10725-xxx, - A23801-xxx, - A19716-xxx - PRO/100 VM Desktop Adapter A14323-xxx, - A19725-xxx, - A23801-xxx, - A22220-xxx, - A23796-xxx - - + This driver supports Intel(R) PRO/100 family of adapters. To verify that your adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number - in the format 123456-001 (six digits hyphen three digits). Match - this to the list of numbers above. + in the format 123456-001 (six digits hyphen three digits). - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + Use the above information and the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm + to identify the adapter. + For the latest Intel PRO/100 network driver for Linux, see: http://appsr.intel.com/scripts-df/support_intel.asp @@ -1730,7 +1681,7 @@ (e.g. VT8235). To compile this driver as a module, choose M here. The module - will be called via-rhine. + will be called via-velocity. config VIA_RHINE_MMIO bool "Use MMIO instead of PIO" @@ -1742,18 +1693,6 @@ If unsure, say Y. -config VIA_VELOCITY - tristate "VIA Velocity support" - depends on NET_PCI && PCI - select CRC32 - select CRC_CCITT - select MII - help - If you have a VIA "Velocity" based network card say Y here. - - To compile this driver as a module, choose M here. The module - will be called via-velocity. - config LAN_SAA9730 bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)" depends on NET_PCI && EXPERIMENTAL && MIPS @@ -1933,29 +1872,8 @@ depends on PCI ---help--- This driver supports Intel(R) PRO/1000 gigabit ethernet family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, - 717037-xxx - 82543 PRO/1000 F Server Adapter 738640-xxx, - A38888-xxx - 82543 PRO/1000 T Server Adapter A19845-xxx, - A33948-xxx - 82544 PRO/1000 XT Server Adapter A51580-xxx - 82544 PRO/1000 XF Server Adapter A50484-xxx - 82544 PRO/1000 T Desktop Adapter A62947-xxx - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 PRO/1000 MT Desktop Adapter C91016-xxx - 82545 PRO/1000 MT Server Adapter A92165-xxx - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - 82545 PRO/1000 MF Server Adapter A91622-xxx - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: @@ -2140,6 +2058,18 @@ say M here and read Documentation/kbuild/modules.txt. The module will be called sk98lin. This is recommended. +config VIA_VELOCITY + tristate "VIA Velocity support" + depends on NET_PCI && PCI + select CRC32 + select CRC_CCITT + select MII + help + If you have a VIA "Velocity" based network card say Y here. + + To compile this driver as a module, choose M here. The module + will be called via-velocity. + config TIGON3 tristate "Broadcom Tigon3 support" depends on PCI @@ -2202,14 +2132,8 @@ depends on PCI ---help--- This driver supports Intel(R) PRO/10GbE family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: diff -Nru a/drivers/net/acenic.c b/drivers/net/acenic.c --- a/drivers/net/acenic.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/acenic.c 2004-10-26 18:25:18 -07:00 @@ -443,7 +443,7 @@ MODULE_PARM_DESC(tx_ratio, "AceNIC/3C985/GA620 ratio of NIC memory used for TX/RX descriptors (range 0-63)"); -static char version[] __initdata = +static char version[] __devinitdata = "acenic.c: v0.92 08/05/2002 Jes Sorensen, linux-acenic@SunSITE.dk\n" " http://home.cern.ch/~jes/gige/acenic.html\n"; @@ -538,7 +538,7 @@ * addresses but who gives a damn. */ dev->base_addr = pci_resource_start(pdev, 0); - ap->regs = (struct ace_regs *)ioremap(dev->base_addr, 0x4000); + ap->regs = ioremap(dev->base_addr, 0x4000); if (!ap->regs) { printk(KERN_ERR "%s: Unable to map I/O register, " "AceNIC %i will be disabled.\n", @@ -631,7 +631,7 @@ { struct net_device *dev = pci_get_drvdata(pdev); struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; short i; unregister_netdev(dev); @@ -884,7 +884,7 @@ /* * Commands are considered to be slow. */ -static inline void ace_issue_cmd(struct ace_regs *regs, struct cmd *cmd) +static inline void ace_issue_cmd(struct ace_regs __iomem *regs, struct cmd *cmd) { u32 idx; @@ -897,10 +897,10 @@ } -static int __init ace_init(struct net_device *dev) +static int __devinit ace_init(struct net_device *dev) { struct ace_private *ap; - struct ace_regs *regs; + struct ace_regs __iomem *regs; struct ace_info *info = NULL; struct pci_dev *pdev; unsigned long myjif; @@ -1318,11 +1318,10 @@ writel(TX_RING_BASE, ®s->WinBase); if (ACE_IS_TIGON_I(ap)) { - ap->tx_ring = (struct tx_desc *)regs->Window; - for (i = 0; i < (TIGON_I_TX_RING_ENTRIES * - sizeof(struct tx_desc) / 4); i++) { - writel(0, (unsigned long)ap->tx_ring + i * 4); - } + ap->tx_ring = (struct tx_desc *) regs->Window; + for (i = 0; i < (TIGON_I_TX_RING_ENTRIES + * sizeof(struct tx_desc)) / sizeof(u32); i++) + writel(0, (void __iomem *)ap->tx_ring + i * 4); set_aceaddr(&info->tx_ctrl.rngptr, TX_RING_BASE); } else { @@ -1549,14 +1548,9 @@ static void ace_set_rxtx_parms(struct net_device *dev, int jumbo) { - struct ace_private *ap; - struct ace_regs *regs; - int board_idx; - - ap = netdev_priv(dev); - regs = ap->regs; - - board_idx = ap->board_idx; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; + int board_idx = ap->board_idx; if (board_idx >= 0) { if (!jumbo) { @@ -1594,7 +1588,7 @@ { struct net_device *dev = data; struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; /* * We haven't received a stats update event for more than 2.5 @@ -1617,7 +1611,7 @@ static void ace_tasklet(unsigned long dev) { - struct ace_private *ap = ((struct net_device *)dev)->priv; + struct ace_private *ap = netdev_priv((struct net_device *)dev); int cur_size; cur_size = atomic_read(&ap->cur_rx_bufs); @@ -1675,10 +1669,9 @@ */ static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs) { - struct ace_regs *regs; + struct ace_regs __iomem *regs = ap->regs; short i, idx; - - regs = ap->regs; + prefetchw(&ap->cur_rx_bufs); @@ -1739,11 +1732,9 @@ static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs) { - struct ace_regs *regs; + struct ace_regs __iomem *regs = ap->regs; short i, idx; - regs = ap->regs; - prefetchw(&ap->cur_mini_bufs); idx = ap->rx_mini_skbprd; @@ -1798,11 +1789,9 @@ */ static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs) { - struct ace_regs *regs; + struct ace_regs __iomem *regs = ap->regs; short i, idx; - regs = ap->regs; - idx = ap->rx_jumbo_skbprd; for (i = 0; i < nr_bufs; i++) { @@ -2082,8 +2071,7 @@ * the 12.3.x Firmware - my Tigon I NICs seem to disagree! */ if (ACE_IS_TIGON_I(ap)) { - struct ace_regs *regs = ap->regs; - writel(idx, ®s->RxRetCsm); + writel(idx, &ap->regs->RxRetCsm); } ap->cur_rx = idx; @@ -2163,16 +2151,13 @@ static irqreturn_t ace_interrupt(int irq, void *dev_id, struct pt_regs *ptregs) { - struct ace_private *ap; - struct ace_regs *regs; struct net_device *dev = (struct net_device *)dev_id; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; u32 idx; u32 txcsm, rxretcsm, rxretprd; u32 evtcsm, evtprd; - ap = netdev_priv(dev); - regs = ap->regs; - /* * In case of PCI shared interrupts or spurious interrupts, * we want to make sure it is actually our interrupt before @@ -2325,13 +2310,10 @@ static int ace_open(struct net_device *dev) { - struct ace_private *ap; - struct ace_regs *regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; struct cmd cmd; - ap = netdev_priv(dev); - regs = ap->regs; - if (!(ap->fw_running)) { printk(KERN_WARNING "%s: Firmware not running!\n", dev->name); return -EBUSY; @@ -2383,8 +2365,8 @@ static int ace_close(struct net_device *dev) { - struct ace_private *ap; - struct ace_regs *regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; struct cmd cmd; unsigned long flags; short i; @@ -2396,9 +2378,7 @@ */ netif_stop_queue(dev); - ap = netdev_priv(dev); - regs = ap->regs; - + if (ap->promisc) { cmd.evt = C_SET_PROMISC_MODE; cmd.code = C_C_PROMISC_DISABLE; @@ -2433,9 +2413,11 @@ if (mapping) { if (ACE_IS_TIGON_I(ap)) { - writel(0, &ap->tx_ring[i].addr.addrhi); - writel(0, &ap->tx_ring[i].addr.addrlo); - writel(0, &ap->tx_ring[i].flagsize); + struct tx_desc __iomem *tx + = (struct tx_desc __iomem *) &ap->tx_ring[i]; + writel(0, &tx->addr.addrhi); + writel(0, &tx->addr.addrlo); + writel(0, &tx->flagsize); } else memset(ap->tx_ring + i, 0, sizeof(struct tx_desc)); @@ -2492,11 +2474,12 @@ #endif if (ACE_IS_TIGON_I(ap)) { - writel(addr >> 32, &desc->addr.addrhi); - writel(addr & 0xffffffff, &desc->addr.addrlo); - writel(flagsize, &desc->flagsize); + struct tx_desc __iomem *io = (struct tx_desc __iomem *) desc; + writel(addr >> 32, &io->addr.addrhi); + writel(addr & 0xffffffff, &io->addr.addrlo); + writel(flagsize, &io->flagsize); #if ACENIC_DO_VLAN - writel(vlan_tag, &desc->vlanres); + writel(vlan_tag, &io->vlanres); #endif } else { desc->addr.addrhi = addr >> 32; @@ -2512,9 +2495,10 @@ static int ace_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; struct tx_desc *desc; u32 idx, flagsize; + unsigned long maxjiff = jiffies + 3*HZ; restart: idx = ap->tx_prd; @@ -2522,10 +2506,7 @@ if (tx_ring_full(ap, ap->tx_ret_csm, idx)) goto overflow; -#if MAX_SKB_FRAGS - if (!skb_shinfo(skb)->nr_frags) -#endif - { + if (!skb_shinfo(skb)->nr_frags) { dma_addr_t mapping; u32 vlan_tag = 0; @@ -2547,9 +2528,7 @@ flagsize |= BD_FLG_COAL_NOW; ace_load_tx_bd(ap, desc, mapping, flagsize, vlan_tag); - } -#if MAX_SKB_FRAGS - else { + } else { dma_addr_t mapping; u32 vlan_tag = 0; int i, len = 0; @@ -2604,7 +2583,6 @@ ace_load_tx_bd(ap, desc, mapping, flagsize, vlan_tag); } } -#endif wmb(); ap->tx_prd = idx; @@ -2624,7 +2602,7 @@ } dev->trans_start = jiffies; - return 0; + return NETDEV_TX_OK; overflow: /* @@ -2643,15 +2621,22 @@ * Alternative is to return with 1 not throttling queue. In this * case loop becomes longer, no more useful effects. */ - barrier(); - goto restart; + if (time_before(jiffies, maxjiff)) { + barrier(); + cpu_relax(); + goto restart; + } + + /* The ring is stuck full. */ + printk(KERN_WARNING "%s: Transmit ring stuck full\n", dev->name); + return NETDEV_TX_BUSY; } static int ace_change_mtu(struct net_device *dev, int new_mtu) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; if (new_mtu > ACE_JUMBO_MTU) return -EINVAL; @@ -2688,7 +2673,7 @@ static int ace_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; u32 link; memset(ecmd, 0, sizeof(struct ethtool_cmd)); @@ -2741,7 +2726,7 @@ static int ace_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; u32 link, speed; link = readl(®s->GigLnkState); @@ -2821,8 +2806,9 @@ */ static int ace_set_mac_addr(struct net_device *dev, void *p) { + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; struct sockaddr *addr=p; - struct ace_regs *regs; u8 *da; struct cmd cmd; @@ -2833,7 +2819,6 @@ da = (u8 *)dev->dev_addr; - regs = ((struct ace_private *)netdev_priv(dev))->regs; writel(da[0] << 8 | da[1], ®s->MacAddrHi); writel((da[2] << 24) | (da[3] << 16) | (da[4] << 8) | da[5], ®s->MacAddrLo); @@ -2850,7 +2835,7 @@ static void ace_set_multicast_list(struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; struct cmd cmd; if ((dev->flags & IFF_ALLMULTI) && !(ap->mcast_all)) { @@ -2904,8 +2889,8 @@ static struct net_device_stats *ace_get_stats(struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); - struct ace_mac_stats *mac_stats = - (struct ace_mac_stats *)ap->regs->Stats; + struct ace_mac_stats __iomem *mac_stats = + (struct ace_mac_stats __iomem *)ap->regs->Stats; ap->stats.rx_missed_errors = readl(&mac_stats->drop_space); ap->stats.multicast = readl(&mac_stats->kept_mc); @@ -2915,10 +2900,10 @@ } -static void __init ace_copy(struct ace_regs *regs, void *src, +static void __devinit ace_copy(struct ace_regs __iomem *regs, void *src, u32 dest, int size) { - unsigned long tdest; + void __iomem *tdest; u32 *wsrc; short tsize, i; @@ -2928,7 +2913,7 @@ while (size > 0) { tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1), min_t(u32, size, ACE_WINDOW_SIZE)); - tdest = (unsigned long)®s->Window + + tdest = (void __iomem *) ®s->Window + (dest & (ACE_WINDOW_SIZE - 1)); writel(dest & ~(ACE_WINDOW_SIZE - 1), ®s->WinBase); /* @@ -2948,9 +2933,9 @@ } -static void __init ace_clear(struct ace_regs *regs, u32 dest, int size) +static void __devinit ace_clear(struct ace_regs __iomem *regs, u32 dest, int size) { - unsigned long tdest; + void __iomem *tdest; short tsize = 0, i; if (size <= 0) @@ -2959,7 +2944,7 @@ while (size > 0) { tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1), min_t(u32, size, ACE_WINDOW_SIZE)); - tdest = (unsigned long)®s->Window + + tdest = (void __iomem *) ®s->Window + (dest & (ACE_WINDOW_SIZE - 1)); writel(dest & ~(ACE_WINDOW_SIZE - 1), ®s->WinBase); @@ -2981,13 +2966,10 @@ * This operation requires the NIC to be halted and is performed with * interrupts disabled and with the spinlock hold. */ -int __init ace_load_firmware(struct net_device *dev) +int __devinit ace_load_firmware(struct net_device *dev) { - struct ace_private *ap; - struct ace_regs *regs; - - ap = netdev_priv(dev); - regs = ap->regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; if (!(readl(®s->CpuCtrl) & CPU_HALTED)) { printk(KERN_ERR "%s: trying to download firmware while the " @@ -3035,7 +3017,7 @@ * Thanks to Stevarino Webinski for helping tracking down the bugs in the * code i2c readout code by beta testing all my hacks. */ -static void __init eeprom_start(struct ace_regs *regs) +static void __devinit eeprom_start(struct ace_regs __iomem *regs) { u32 local; @@ -3064,7 +3046,7 @@ } -static void __init eeprom_prep(struct ace_regs *regs, u8 magic) +static void __devinit eeprom_prep(struct ace_regs __iomem *regs, u8 magic) { short i; u32 local; @@ -3101,7 +3083,7 @@ } -static int __init eeprom_check_ack(struct ace_regs *regs) +static int __devinit eeprom_check_ack(struct ace_regs __iomem *regs) { int state; u32 local; @@ -3129,7 +3111,7 @@ } -static void __init eeprom_stop(struct ace_regs *regs) +static void __devinit eeprom_stop(struct ace_regs __iomem *regs) { u32 local; @@ -3164,11 +3146,11 @@ /* * Read a whole byte from the EEPROM. */ -static int __init read_eeprom_byte(struct net_device *dev, +static int __devinit read_eeprom_byte(struct net_device *dev, unsigned long offset) { - struct ace_private *ap; - struct ace_regs *regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; unsigned long flags; u32 local; int result = 0; @@ -3179,9 +3161,6 @@ result = -ENODEV; goto out; } - - ap = netdev_priv(dev); - regs = ap->regs; /* * Don't take interrupts on this CPU will bit banging diff -Nru a/drivers/net/acenic.h b/drivers/net/acenic.h --- a/drivers/net/acenic.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/acenic.h 2004-10-26 18:25:18 -07:00 @@ -10,11 +10,6 @@ */ #define USE_TX_COAL_NOW 0 -#ifndef MAX_SKB_FRAGS -#define MAX_SKB_FRAGS 0 -#endif - - /* * Addressing: * @@ -638,7 +633,7 @@ struct ace_private { struct ace_info *info; - struct ace_regs *regs; /* register base */ + struct ace_regs __iomem *regs; /* register base */ struct ace_skb *skb; dma_addr_t info_dma; /* 32/64 bit */ @@ -712,13 +707,7 @@ } #define tx_free(ap) tx_space((ap)->tx_ret_csm, (ap)->tx_prd, ap) - -#if MAX_SKB_FRAGS #define tx_ring_full(ap, csm, prd) (tx_space(ap, csm, prd) <= TX_RESERVED) -#else -#define tx_ring_full 0 -#endif - static inline void set_aceaddr(aceaddr *aa, dma_addr_t addr) { @@ -729,7 +718,7 @@ } -static inline void ace_set_txprd(struct ace_regs *regs, +static inline void ace_set_txprd(struct ace_regs __iomem *regs, struct ace_private *ap, u32 value) { #ifdef INDEX_DEBUG @@ -750,8 +739,8 @@ static inline void ace_mask_irq(struct net_device *dev) { - struct ace_private *ap = dev->priv; - struct ace_regs *regs = ap->regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; if (ACE_IS_TIGON_I(ap)) writel(1, ®s->MaskInt); @@ -764,8 +753,8 @@ static inline void ace_unmask_irq(struct net_device *dev) { - struct ace_private *ap = dev->priv; - struct ace_regs *regs = ap->regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; if (ACE_IS_TIGON_I(ap)) writel(0, ®s->MaskInt); diff -Nru a/drivers/net/acenic_firmware.h b/drivers/net/acenic_firmware.h --- a/drivers/net/acenic_firmware.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/acenic_firmware.h 2004-10-26 18:25:18 -07:00 @@ -23,7 +23,7 @@ #define tigonFwRodata NULL #else /* Generated by genfw.c */ -static u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __initdata = { +static u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __devinitdata = { 0x10000003, 0x0, 0xd, 0xd, 0x3c1d0001, 0x8fbd5c54, 0x3a0f021, 0x3c100000, 0x26104000, diff -Nru a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c --- a/drivers/net/bonding/bond_main.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/bonding/bond_main.c 2004-10-26 18:25:19 -07:00 @@ -4700,6 +4700,7 @@ module_init(bonding_init); module_exit(bonding_exit); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); MODULE_DESCRIPTION(DRV_DESCRIPTION ", v" DRV_VERSION); MODULE_AUTHOR("Thomas Davis, tadavis@lbl.gov and many others"); MODULE_SUPPORTED_DEVICE("most ethernet devices"); diff -Nru a/drivers/net/defxx.c b/drivers/net/defxx.c --- a/drivers/net/defxx.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/defxx.c 2004-10-26 18:25:17 -07:00 @@ -19,7 +19,7 @@ * LVS Lawrence V. Stefani * * Maintainers: - * macro Maciej W. Rozycki + * macro Maciej W. Rozycki * * Credits: * I'd like to thank Patricia Cross for helping me get started with @@ -190,6 +190,7 @@ * Feb 2001 Skb allocation fixes * Feb 2001 davej PCI enable cleanups. * 04 Aug 2003 macro Converted to the DMA API. + * 14 Aug 2004 macro Fix device names reported. */ /* Include files */ @@ -214,12 +215,14 @@ #include "defxx.h" -/* Version information string - should be updated prior to each new release!!! */ +/* Version information string should be updated prior to each new release! */ +#define DRV_NAME "defxx" +#define DRV_VERSION "v1.07" +#define DRV_RELDATE "2004/08/14" static char version[] __devinitdata = - "defxx.c:v1.06 2003/08/04 Lawrence V. Stefani and others\n"; - -#define DRV_NAME "defxx" + DRV_NAME ": " DRV_VERSION " " DRV_RELDATE + " Lawrence V. Stefani and others\n"; #define DYNAMIC_BUFFERS 1 @@ -235,7 +238,7 @@ static void dfx_bus_init(struct net_device *dev); static void dfx_bus_config_check(DFX_board_t *bp); -static int dfx_driver_init(struct net_device *dev); +static int dfx_driver_init(struct net_device *dev, const char *print_name); static int dfx_adap_init(DFX_board_t *bp, int get_buffers); static int dfx_open(struct net_device *dev); @@ -404,24 +407,25 @@ */ static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, long ioaddr) { + static int version_disp; + char *print_name = DRV_NAME; struct net_device *dev; DFX_board_t *bp; /* board pointer */ int alloc_size; /* total buffer size used */ int err; -#ifndef MODULE - static int version_disp; - - if (!version_disp) /* display version info if adapter is found */ - { + if (!version_disp) { /* display version info if adapter is found */ version_disp = 1; /* set display flag to TRUE so that */ printk(version); /* we only display this string ONCE */ } -#endif + + if (pdev != NULL) + print_name = pdev->slot_name; dev = alloc_fddidev(sizeof(*bp)); if (!dev) { - printk (KERN_ERR "defxx: unable to allocate fddidev, aborting\n"); + printk(KERN_ERR "%s: unable to allocate fddidev, aborting\n", + print_name); return -ENOMEM; } @@ -437,9 +441,12 @@ bp = dev->priv; - if (!request_region (ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, DRV_NAME)) { - printk (KERN_ERR "%s: Cannot reserve I/O resource 0x%x @ 0x%lx, aborting\n", - DRV_NAME, PFI_K_CSR_IO_LEN, ioaddr); + if (!request_region(ioaddr, + pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, + print_name)) { + printk(KERN_ERR "%s: Cannot reserve I/O resource " + "0x%x @ 0x%lx, aborting\n", print_name, + pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, ioaddr); err = -EBUSY; goto err_out; } @@ -468,7 +475,7 @@ pci_set_master (pdev); } - if (dfx_driver_init(dev) != DFX_K_SUCCESS) { + if (dfx_driver_init(dev, print_name) != DFX_K_SUCCESS) { err = -ENODEV; goto err_out_region; } @@ -477,6 +484,7 @@ if (err) goto err_out_kfree; + printk("%s: registered as %s\n", print_name, dev->name); return 0; err_out_kfree: @@ -770,6 +778,7 @@ * * Arguments: * dev - pointer to device information + * print_name - printable device name * * Functional Description: * This function allocates additional resources such as the host memory @@ -792,7 +801,8 @@ * returning from this routine. */ -static int __devinit dfx_driver_init(struct net_device *dev) +static int __devinit dfx_driver_init(struct net_device *dev, + const char *print_name) { DFX_board_t *bp = dev->priv; int alloc_size; /* total buffer size needed */ @@ -841,26 +851,20 @@ /* Read the factory MAC address from the adapter then save it */ - if (dfx_hw_port_ctrl_req(bp, - PI_PCTRL_M_MLA, - PI_PDATA_A_MLA_K_LO, - 0, - &data) != DFX_K_SUCCESS) - { - printk("%s: Could not read adapter factory MAC address!\n", dev->name); + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_LO, 0, + &data) != DFX_K_SUCCESS) { + printk("%s: Could not read adapter factory MAC address!\n", + print_name); return(DFX_K_FAILURE); - } + } memcpy(&bp->factory_mac_addr[0], &data, sizeof(u32)); - if (dfx_hw_port_ctrl_req(bp, - PI_PCTRL_M_MLA, - PI_PDATA_A_MLA_K_HI, - 0, - &data) != DFX_K_SUCCESS) - { - printk("%s: Could not read adapter factory MAC address!\n", dev->name); + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_HI, 0, + &data) != DFX_K_SUCCESS) { + printk("%s: Could not read adapter factory MAC address!\n", + print_name); return(DFX_K_FAILURE); - } + } memcpy(&bp->factory_mac_addr[4], &data, sizeof(u16)); /* @@ -872,27 +876,19 @@ memcpy(dev->dev_addr, bp->factory_mac_addr, FDDI_K_ALEN); if (bp->bus_type == DFX_BUS_TYPE_EISA) - printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", - dev->name, - dev->base_addr, - dev->irq, - dev->dev_addr[0], - dev->dev_addr[1], - dev->dev_addr[2], - dev->dev_addr[3], - dev->dev_addr[4], - dev->dev_addr[5]); + printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, " + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", + print_name, dev->base_addr, dev->irq, + dev->dev_addr[0], dev->dev_addr[1], + dev->dev_addr[2], dev->dev_addr[3], + dev->dev_addr[4], dev->dev_addr[5]); else - printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", - dev->name, - dev->base_addr, - dev->irq, - dev->dev_addr[0], - dev->dev_addr[1], - dev->dev_addr[2], - dev->dev_addr[3], - dev->dev_addr[4], - dev->dev_addr[5]); + printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, " + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", + print_name, dev->base_addr, dev->irq, + dev->dev_addr[0], dev->dev_addr[1], + dev->dev_addr[2], dev->dev_addr[3], + dev->dev_addr[4], dev->dev_addr[5]); /* * Get memory for descriptor block, consumer block, and other buffers @@ -909,11 +905,11 @@ (PI_ALIGN_K_DESC_BLK - 1); bp->kmalloced = top_v = pci_alloc_consistent(bp->pci_dev, alloc_size, &bp->kmalloced_dma); - if (top_v == NULL) - { - printk("%s: Could not allocate memory for host buffers and structures!\n", dev->name); + if (top_v == NULL) { + printk("%s: Could not allocate memory for host buffers " + "and structures!\n", print_name); return(DFX_K_FAILURE); - } + } memset(top_v, 0, alloc_size); /* zero out memory before continuing */ top_p = bp->kmalloced_dma; /* get physical address of buffer */ @@ -970,14 +966,20 @@ /* Display virtual and physical addresses if debug driver */ - DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n", dev->name, (long)bp->descr_block_virt, bp->descr_block_phys); - DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_req_virt, bp->cmd_req_phys); - DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys); - DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->rcv_block_virt, bp->rcv_block_phys); - DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->cons_block_virt, bp->cons_block_phys); + DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n", + print_name, + (long)bp->descr_block_virt, bp->descr_block_phys); + DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n", + print_name, (long)bp->cmd_req_virt, bp->cmd_req_phys); + DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n", + print_name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys); + DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n", + print_name, (long)bp->rcv_block_virt, bp->rcv_block_phys); + DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n", + print_name, (long)bp->cons_block_virt, bp->cons_block_phys); return(DFX_K_SUCCESS); - } +} /* @@ -2668,12 +2670,12 @@ static void my_skb_align(struct sk_buff *skb, int n) { - unsigned long x=(unsigned long)skb->data; + unsigned long x = (unsigned long)skb->data; unsigned long v; - v=(x+n-1)&~(n-1); /* Where we want to be */ + v = ALIGN(x, n); /* Where we want to be */ - skb_reserve(skb, v-x); + skb_reserve(skb, v - x); } @@ -3428,11 +3430,6 @@ { int rc_pci, rc_eisa; -/* when a module, this is printed whether or not devices are found in probe */ -#ifdef MODULE - printk(version); -#endif - rc_pci = pci_module_init(&dfx_driver); if (rc_pci >= 0) dfx_have_pci = 1; @@ -3453,6 +3450,9 @@ module_init(dfx_init); module_exit(dfx_cleanup); +MODULE_AUTHOR("Lawrence V. Stefani"); +MODULE_DESCRIPTION("DEC FDDIcontroller EISA/PCI (DEFEA/DEFPA) driver " + DRV_VERSION " " DRV_RELDATE); MODULE_LICENSE("GPL"); diff -Nru a/drivers/net/defxx.h b/drivers/net/defxx.h --- a/drivers/net/defxx.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/defxx.h 2004-10-26 18:25:18 -07:00 @@ -16,7 +16,7 @@ * LVS Lawrence V. Stefani * * Maintainers: - * macro Maciej W. Rozycki + * macro Maciej W. Rozycki * * Modification History: * Date Name Description diff -Nru a/drivers/net/dummy.c b/drivers/net/dummy.c --- a/drivers/net/dummy.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/dummy.c 2004-10-26 18:25:18 -07:00 @@ -77,7 +77,7 @@ static int dummy_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = dev->priv; + struct net_device_stats *stats = netdev_priv(dev); stats->tx_packets++; stats->tx_bytes+=skb->len; @@ -88,7 +88,7 @@ static struct net_device_stats *dummy_get_stats(struct net_device *dev) { - return dev->priv; + return netdev_priv(dev); } static struct net_device **dummies; diff -Nru a/drivers/net/e100.c b/drivers/net/e100.c --- a/drivers/net/e100.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/net/e100.c 2004-10-26 18:25:19 -07:00 @@ -154,8 +154,8 @@ #define DRV_NAME "e100" -#define DRV_EXT "-NAPI" -#define DRV_VERSION "3.0.27-k2"DRV_EXT +#define DRV_EXT "-NAPI" +#define DRV_VERSION "3.2.3-k2"DRV_EXT #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation" #define PFX DRV_NAME ": " @@ -574,13 +574,21 @@ static inline void e100_enable_irq(struct nic *nic) { + unsigned long flags; + + spin_lock_irqsave(&nic->cmd_lock, flags); writeb(irq_mask_none, &nic->csr->scb.cmd_hi); + spin_unlock_irqrestore(&nic->cmd_lock, flags); e100_write_flush(nic); } static inline void e100_disable_irq(struct nic *nic) { + unsigned long flags; + + spin_lock_irqsave(&nic->cmd_lock, flags); writeb(irq_mask_all, &nic->csr->scb.cmd_hi); + spin_unlock_irqrestore(&nic->cmd_lock, flags); e100_write_flush(nic); } @@ -595,16 +603,6 @@ writel(software_reset, &nic->csr->port); e100_write_flush(nic); udelay(20); - /* TCO workaround - 82559 and greater */ - if(nic->mac >= mac_82559_D101M) { - /* Issue a redundant CU load base without setting - * general pointer, and without waiting for scb to - * clear. This gets us into post-driver. Finally, - * wait 20 msec for reset to take effect. */ - writeb(cuc_load_base, &nic->csr->scb.cmd_lo); - mdelay(20); - } - /* Mask off our interrupt line - it's unmasked after reset */ e100_disable_irq(nic); } @@ -1253,8 +1251,13 @@ mii_check_link(&nic->mii); /* Software generated interrupt to recover from (rare) Rx - * allocation failure */ - writeb(irq_sw_gen, &nic->csr->scb.cmd_hi); + * allocation failure. + * Unfortunately have to use a spinlock to not re-enable interrupts + * accidentally, due to hardware that shares a register between the + * interrupt mask bit and the SW Interrupt generation bit */ + spin_lock_irq(&nic->cmd_lock); + writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); + spin_unlock_irq(&nic->cmd_lock); e100_write_flush(nic); e100_update_stats(nic); @@ -1304,6 +1307,7 @@ switch(err) { case -ENOSPC: /* We queued the skb, but now we're out of space. */ + DPRINTK(TX_ERR, DEBUG, "No space for CB\n"); netif_stop_queue(netdev); break; case -ENOMEM: @@ -1424,14 +1428,12 @@ #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN) static inline int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) { - unsigned int rx_offset = 2; /* u32 align protocol headers */ - - if(!(rx->skb = dev_alloc_skb(RFD_BUF_LEN + rx_offset))) + if(!(rx->skb = dev_alloc_skb(RFD_BUF_LEN + NET_IP_ALIGN))) return -ENOMEM; /* Align, init, and map the RFD. */ rx->skb->dev = nic->netdev; - skb_reserve(rx->skb, rx_offset); + skb_reserve(rx->skb, NET_IP_ALIGN); memcpy(rx->skb->data, &nic->blank_rfd, sizeof(struct rfd)); rx->dma_addr = pci_map_single(nic->pdev, rx->skb->data, RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL); @@ -1470,7 +1472,7 @@ /* If data isn't ready, nothing to indicate */ if(unlikely(!(rfd_status & cb_complete))) - return -EAGAIN; + return -EAGAIN; /* Get actual data size */ actual_size = le16_to_cpu(rfd->actual_size) & 0x3FFF; @@ -1762,7 +1764,7 @@ if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), skb->data, ETH_DATA_LEN)) - err = -EAGAIN; + err = -EAGAIN; err_loopback_none: mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0); @@ -1955,12 +1957,17 @@ struct param_range *rfds = &nic->params.rfds; struct param_range *cbs = &nic->params.cbs; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(netdev)) e100_down(nic); rfds->count = max(ring->rx_pending, rfds->min); rfds->count = min(rfds->count, rfds->max); cbs->count = max(ring->tx_pending, cbs->min); cbs->count = min(cbs->count, cbs->max); + DPRINTK(DRV, INFO, "Ring Param settings: rx: %d, tx %d\n", + rfds->count, cbs->count); if(netif_running(netdev)) e100_up(nic); @@ -2172,6 +2179,7 @@ #ifdef CONFIG_NET_POLL_CONTROLLER netdev->poll_controller = e100_netpoll; #endif + strcpy(netdev->name, pci_name(pdev)); nic = netdev_priv(netdev); nic->netdev = netdev; @@ -2255,6 +2263,7 @@ pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic))); + strcpy(netdev->name, "eth%d"); if((err = register_netdev(netdev))) { DPRINTK(PROBE, ERR, "Cannot register net device, aborting.\n"); goto err_out_free; @@ -2351,7 +2360,7 @@ printk(KERN_INFO PFX "%s, %s\n", DRV_DESCRIPTION, DRV_VERSION); printk(KERN_INFO PFX "%s\n", DRV_COPYRIGHT); } - return pci_module_init(&e100_driver); + return pci_module_init(&e100_driver); } static void __exit e100_cleanup_module(void) diff -Nru a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h --- a/drivers/net/e1000/e1000.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/e1000/e1000.h 2004-10-26 18:25:17 -07:00 @@ -64,7 +64,6 @@ #include #include #include -#include #include #ifdef NETIF_F_TSO #include @@ -73,7 +72,6 @@ #include #include #include -#include #define BAR_0 0 #define BAR_1 1 diff -Nru a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c --- a/drivers/net/e1000/e1000_ethtool.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/e1000/e1000_ethtool.c 2004-10-26 18:25:18 -07:00 @@ -249,7 +249,8 @@ e1000_reset(adapter); } else - return e1000_force_mac_fc(hw); + return ((hw->media_type == e1000_media_type_fiber) ? + e1000_setup_link(hw) : e1000_force_mac_fc(hw)); return 0; } @@ -592,6 +593,9 @@ tx_old = adapter->tx_ring; rx_old = adapter->rx_ring; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(adapter->netdev)) e1000_down(adapter); @@ -637,7 +641,6 @@ return err; } - #define REG_PATTERN_TEST(R, M, W) \ { \ uint32_t pat, value; \ @@ -1017,8 +1020,8 @@ struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rxdr, i); struct sk_buff *skb; - if(!(skb = alloc_skb(E1000_RXBUFFER_2048 + NET_IP_ALIGN, - GFP_KERNEL))) { + if(!(skb = alloc_skb(E1000_RXBUFFER_2048 + NET_IP_ALIGN, + GFP_KERNEL))) { ret_val = 6; goto err_nomem; } @@ -1442,6 +1445,8 @@ case E1000_DEV_ID_82543GC_COPPER: case E1000_DEV_ID_82544EI_FIBER: case E1000_DEV_ID_82546EB_QUAD_COPPER: + case E1000_DEV_ID_82545EM_FIBER: + case E1000_DEV_ID_82545EM_COPPER: wol->supported = 0; wol->wolopts = 0; return; diff -Nru a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c --- a/drivers/net/e1000/e1000_hw.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/net/e1000/e1000_hw.c 2004-10-26 18:25:19 -07:00 @@ -65,6 +65,7 @@ static void e1000_standby_eeprom(struct e1000_hw *hw); static int32_t e1000_id_led_init(struct e1000_hw * hw); static int32_t e1000_set_vco_speed(struct e1000_hw *hw); +static int32_t e1000_polarity_reversal_workaround(struct e1000_hw *hw); static int32_t e1000_set_phy_mode(struct e1000_hw *hw); /* IGP cable length table */ @@ -1594,6 +1595,15 @@ ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); if(ret_val) return ret_val; + + if((hw->mac_type == e1000_82544 || hw->mac_type == e1000_82543) && + (!hw->autoneg) && + (hw->forced_speed_duplex == e1000_10_full || + hw->forced_speed_duplex == e1000_10_half)) { + ret_val = e1000_polarity_reversal_workaround(hw); + if(ret_val) + return ret_val; + } } return E1000_SUCCESS; } @@ -1983,6 +1993,7 @@ uint32_t ctrl; uint32_t status; uint32_t rctl; + uint32_t icr; uint32_t signal = 0; int32_t ret_val; uint16_t phy_data; @@ -2032,6 +2043,25 @@ * link-up */ e1000_check_downshift(hw); + /* If we are on 82544 or 82543 silicon and speed/duplex + * are forced to 10H or 10F, then we will implement the polarity + * reversal workaround. We disable interrupts first, and upon + * returning, place the devices interrupt state to its previous + * value except for the link status change interrupt which will + * happen due to the execution of this workaround. + */ + + if((hw->mac_type == e1000_82544 || hw->mac_type == e1000_82543) && + (!hw->autoneg) && + (hw->forced_speed_duplex == e1000_10_full || + hw->forced_speed_duplex == e1000_10_half)) { + E1000_WRITE_REG(hw, IMC, 0xffffffff); + ret_val = e1000_polarity_reversal_workaround(hw); + icr = E1000_READ_REG(hw, ICR); + E1000_WRITE_REG(hw, ICS, (icr & ~E1000_ICS_LSC)); + E1000_WRITE_REG(hw, IMS, IMS_ENABLE_MASK); + } + } else { /* No link detected */ e1000_config_dsp_after_link_change(hw, FALSE); @@ -5191,28 +5221,88 @@ return E1000_SUCCESS; } -/****************************************************************************** - * Verifies the hardware needs to allow ARPs to be processed by the host - * - * hw - Struct containing variables accessed by shared code - * - * returns: - TRUE/FALSE - * - *****************************************************************************/ -uint32_t -e1000_enable_mng_pass_thru(struct e1000_hw *hw) +static int32_t +e1000_polarity_reversal_workaround(struct e1000_hw *hw) { - uint32_t manc; + int32_t ret_val; + uint16_t mii_status_reg; + uint16_t i; - if (hw->asf_firmware_present) { - manc = E1000_READ_REG(hw, MANC); + /* Polarity reversal workaround for forced 10F/10H links. */ + + /* Disable the transmitter on the PHY */ + + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019); + if(ret_val) + return ret_val; + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFFF); + if(ret_val) + return ret_val; + + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0000); + if(ret_val) + return ret_val; + + /* This loop will early-out if the NO link condition has been met. */ + for(i = PHY_FORCE_TIME; i > 0; i--) { + /* Read the MII Status Register and wait for Link Status bit + * to be clear. + */ + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + if((mii_status_reg & ~MII_SR_LINK_STATUS) == 0) break; + msec_delay_irq(100); + } + + /* Recommended delay time after link has been lost */ + msec_delay_irq(1000); + + /* Now we will re-enable th transmitter on the PHY */ + + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019); + if(ret_val) + return ret_val; + msec_delay_irq(50); + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFF0); + if(ret_val) + return ret_val; + msec_delay_irq(50); + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFF00); + if(ret_val) + return ret_val; + msec_delay_irq(50); + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0x0000); + if(ret_val) + return ret_val; - if (!(manc & E1000_MANC_RCV_TCO_EN) || - !(manc & E1000_MANC_EN_MAC_ADDR_FILTER)) - return FALSE; - if ((manc & E1000_MANC_SMBUS_EN) && !(manc & E1000_MANC_ASF_EN)) - return TRUE; + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0000); + if(ret_val) + return ret_val; + + /* This loop will early-out if the link condition has been met. */ + for(i = PHY_FORCE_TIME; i > 0; i--) { + /* Read the MII Status Register and wait for Link Status bit + * to be set. + */ + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + if(mii_status_reg & MII_SR_LINK_STATUS) break; + msec_delay_irq(100); } - return FALSE; + return E1000_SUCCESS; } diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c --- a/drivers/net/e1000/e1000_main.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/e1000/e1000_main.c 2004-10-26 18:25:17 -07:00 @@ -48,7 +48,7 @@ #else #define DRIVERNAPI "-NAPI" #endif -char e1000_driver_version[] = "5.3.19-k2"DRIVERNAPI; +char e1000_driver_version[] = "5.5.4-k2"DRIVERNAPI; char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; /* e1000_pci_tbl - PCI Device ID Table @@ -311,7 +311,8 @@ void e1000_reset(struct e1000_adapter *adapter) { - uint32_t pba, manc; + uint32_t pba; + /* Repartition Pba for greater than 9k mtu * To take effect CTRL.RST is required. */ @@ -354,12 +355,6 @@ e1000_reset_adaptive(&adapter->hw); e1000_phy_get_info(&adapter->hw, &adapter->phy_info); - - if(adapter->en_mng_pt) { - manc = E1000_READ_REG(&adapter->hw, MANC); - manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST); - E1000_WRITE_REG(&adapter->hw, MANC, manc); - } } /** @@ -422,11 +417,6 @@ adapter->hw.back = adapter; adapter->msg_enable = (1 << debug) - 1; - rtnl_lock(); - /* we need to set the name early for the DPRINTK macro */ - if(dev_alloc_name(netdev, netdev->name) < 0) - goto err_free_unlock; - mmio_start = pci_resource_start(pdev, BAR_0); mmio_len = pci_resource_len(pdev, BAR_0); @@ -466,6 +456,7 @@ #ifdef CONFIG_NET_POLL_CONTROLLER netdev->poll_controller = e1000_netpoll; #endif + strcpy(netdev->name, pci_name(pdev)); netdev->mem_start = mmio_start; netdev->mem_end = mmio_start + mmio_len; @@ -502,8 +493,6 @@ /* hard_start_xmit is safe against parallel locking */ netdev->features |= NETIF_F_LLTX; - adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw); - /* before reading the EEPROM, reset the controller to * put the device in a known good starting state */ @@ -553,7 +542,6 @@ netif_carrier_off(netdev); netif_stop_queue(netdev); - DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n"); e1000_check_options(adapter); /* Initial Wake on LAN setting @@ -586,12 +574,13 @@ /* reset the hardware with the new settings */ e1000_reset(adapter); - /* We're already holding the rtnl lock; call the no-lock version */ - if((err = register_netdevice(netdev))) + strcpy(netdev->name, "eth%d"); + if((err = register_netdev(netdev))) goto err_register; + DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n"); + cards_found++; - rtnl_unlock(); return 0; err_register: @@ -599,8 +588,6 @@ err_eeprom: iounmap(adapter->hw.hw_addr); err_ioremap: -err_free_unlock: - rtnl_unlock(); free_netdev(netdev); err_alloc_etherdev: pci_release_regions(pdev); @@ -641,6 +628,8 @@ pci_release_regions(pdev); free_netdev(netdev); + + pci_disable_device(pdev); } /** @@ -2335,8 +2324,8 @@ if(unlikely(adapter->vlgrp && (rx_desc->status & E1000_RXD_STAT_VP))) { vlan_hwaccel_receive_skb(skb, adapter->vlgrp, - le16_to_cpu(rx_desc->special & - E1000_RXD_SPC_VLAN_MASK)); + le16_to_cpu(rx_desc->special) & + E1000_RXD_SPC_VLAN_MASK); } else { netif_receive_skb(skb); } @@ -2344,8 +2333,8 @@ if(unlikely(adapter->vlgrp && (rx_desc->status & E1000_RXD_STAT_VP))) { vlan_hwaccel_rx(skb, adapter->vlgrp, - le16_to_cpu(rx_desc->special & - E1000_RXD_SPC_VLAN_MASK)); + le16_to_cpu(rx_desc->special) & + E1000_RXD_SPC_VLAN_MASK); } else { netif_rx(skb); } @@ -2894,9 +2883,9 @@ { struct net_device *netdev = pci_get_drvdata(pdev); struct e1000_adapter *adapter = netdev->priv; - uint32_t manc; + uint32_t manc, ret; - pci_enable_device(pdev); + ret = pci_enable_device(pdev); pci_set_power_state(pdev, 0); pci_restore_state(pdev); diff -Nru a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h --- a/drivers/net/e1000/e1000_osdep.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/e1000/e1000_osdep.h 2004-10-26 18:25:17 -07:00 @@ -49,6 +49,12 @@ set_current_state(TASK_UNINTERRUPTIBLE); \ schedule_timeout((x * HZ)/1000 + 2); \ } } while(0) +/* Some workarounds require millisecond delays and are run during interrupt + * context. Most notably, when establishing link, the phy may need tweaking + * but cannot process phy register reads/writes faster than millisecond + * intervals...and we establish link due to a "link status change" interrupt. + */ +#define msec_delay_irq(x) mdelay(x) #endif #define PCI_COMMAND_REGISTER PCI_COMMAND diff -Nru a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c --- a/drivers/net/e1000/e1000_param.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/e1000/e1000_param.c 2004-10-26 18:25:18 -07:00 @@ -34,31 +34,21 @@ #define E1000_MAX_NIC 32 -#define OPTION_UNSET -1 +#define OPTION_UNSET -1 #define OPTION_DISABLED 0 #define OPTION_ENABLED 1 -/* Module Parameters are always initialized to -1, so that the driver - * can tell the difference between no user specified value or the - * user asking for the default value. - * The true default values are loaded in when e1000_check_options is called. - * - * This is a GCC extension to ANSI C. - * See the item "Labeled Elements in Initializers" in the section - * "Extensions to the C Language Family" of the GCC documentation. - */ - -#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } - /* All parameters are treated the same, as an integer array of values. * This macro just reduces the need to repeat the same declaration code * over and over (plus this helps to avoid typo bugs). */ -#define E1000_PARAM(X, S) \ -static const int __devinitdata X[E1000_MAX_NIC + 1] = E1000_PARAM_INIT; \ -MODULE_PARM(X, "1-" __MODULE_STRING(E1000_MAX_NIC) "i"); \ -MODULE_PARM_DESC(X, S); +#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } +#define E1000_PARAM(X, desc) \ + static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ + static int num_##X = 0; \ + module_param_array(X, int, &num_##X, 0); \ + MODULE_PARM_DESC(X, desc); /* Transmit Descriptor Count * @@ -305,7 +295,6 @@ DPRINTK(PROBE, NOTICE, "Warning: no configuration for board #%i\n", bd); DPRINTK(PROBE, NOTICE, "Using defaults for all values\n"); - bd = E1000_MAX_NIC; } { /* Transmit Descriptor Count */ @@ -322,9 +311,14 @@ opt.arg.r.max = mac_type < e1000_82544 ? E1000_MAX_TXD : E1000_MAX_82544_TXD; - tx_ring->count = TxDescriptors[bd]; - e1000_validate_option(&tx_ring->count, &opt, adapter); - E1000_ROUNDUP(tx_ring->count, REQ_TX_DESCRIPTOR_MULTIPLE); + if (num_TxDescriptors > bd) { + tx_ring->count = TxDescriptors[bd]; + e1000_validate_option(&tx_ring->count, &opt, adapter); + E1000_ROUNDUP(tx_ring->count, + REQ_TX_DESCRIPTOR_MULTIPLE); + } else { + tx_ring->count = opt.def; + } } { /* Receive Descriptor Count */ struct e1000_option opt = { @@ -340,9 +334,14 @@ opt.arg.r.max = mac_type < e1000_82544 ? E1000_MAX_RXD : E1000_MAX_82544_RXD; - rx_ring->count = RxDescriptors[bd]; - e1000_validate_option(&rx_ring->count, &opt, adapter); - E1000_ROUNDUP(rx_ring->count, REQ_RX_DESCRIPTOR_MULTIPLE); + if (num_RxDescriptors > bd) { + rx_ring->count = RxDescriptors[bd]; + e1000_validate_option(&rx_ring->count, &opt, adapter); + E1000_ROUNDUP(rx_ring->count, + REQ_RX_DESCRIPTOR_MULTIPLE); + } else { + rx_ring->count = opt.def; + } } { /* Checksum Offload Enable/Disable */ struct e1000_option opt = { @@ -352,9 +351,13 @@ .def = OPTION_ENABLED }; - int rx_csum = XsumRX[bd]; - e1000_validate_option(&rx_csum, &opt, adapter); - adapter->rx_csum = rx_csum; + if (num_XsumRX > bd) { + int rx_csum = XsumRX[bd]; + e1000_validate_option(&rx_csum, &opt, adapter); + adapter->rx_csum = rx_csum; + } else { + adapter->rx_csum = opt.def; + } } { /* Flow Control */ @@ -374,9 +377,13 @@ .p = fc_list }} }; - int fc = FlowControl[bd]; - e1000_validate_option(&fc, &opt, adapter); - adapter->hw.fc = adapter->hw.original_fc = fc; + if (num_FlowControl > bd) { + int fc = FlowControl[bd]; + e1000_validate_option(&fc, &opt, adapter); + adapter->hw.fc = adapter->hw.original_fc = fc; + } else { + adapter->hw.fc = opt.def; + } } { /* Transmit Interrupt Delay */ struct e1000_option opt = { @@ -388,8 +395,13 @@ .max = MAX_TXDELAY }} }; - adapter->tx_int_delay = TxIntDelay[bd]; - e1000_validate_option(&adapter->tx_int_delay, &opt, adapter); + if (num_TxIntDelay > bd) { + adapter->tx_int_delay = TxIntDelay[bd]; + e1000_validate_option(&adapter->tx_int_delay, &opt, + adapter); + } else { + adapter->tx_int_delay = opt.def; + } } { /* Transmit Absolute Interrupt Delay */ struct e1000_option opt = { @@ -401,8 +413,13 @@ .max = MAX_TXABSDELAY }} }; - adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; - e1000_validate_option(&adapter->tx_abs_int_delay, &opt, adapter); + if (num_TxAbsIntDelay > bd) { + adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; + e1000_validate_option(&adapter->tx_abs_int_delay, &opt, + adapter); + } else { + adapter->tx_abs_int_delay = opt.def; + } } { /* Receive Interrupt Delay */ struct e1000_option opt = { @@ -414,8 +431,13 @@ .max = MAX_RXDELAY }} }; - adapter->rx_int_delay = RxIntDelay[bd]; - e1000_validate_option(&adapter->rx_int_delay, &opt, adapter); + if (num_RxIntDelay > bd) { + adapter->rx_int_delay = RxIntDelay[bd]; + e1000_validate_option(&adapter->rx_int_delay, &opt, + adapter); + } else { + adapter->rx_int_delay = opt.def; + } } { /* Receive Absolute Interrupt Delay */ struct e1000_option opt = { @@ -427,8 +449,13 @@ .max = MAX_RXABSDELAY }} }; - adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; - e1000_validate_option(&adapter->rx_abs_int_delay, &opt, adapter); + if (num_RxAbsIntDelay > bd) { + adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; + e1000_validate_option(&adapter->rx_abs_int_delay, &opt, + adapter); + } else { + adapter->rx_abs_int_delay = opt.def; + } } { /* Interrupt Throttling Rate */ struct e1000_option opt = { @@ -440,20 +467,27 @@ .max = MAX_ITR }} }; - adapter->itr = InterruptThrottleRate[bd]; - switch(adapter->itr) { - case -1: + if (num_InterruptThrottleRate > bd) { + adapter->itr = InterruptThrottleRate[bd]; + switch(adapter->itr) { + case -1: + adapter->itr = 1; + break; + case 0: + DPRINTK(PROBE, INFO, "%s turned off\n", + opt.name); + break; + case 1: + DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", + opt.name); + break; + default: + e1000_validate_option(&adapter->itr, &opt, + adapter); + break; + } + } else { adapter->itr = 1; - break; - case 0: - DPRINTK(PROBE, INFO, "%s turned off\n", opt.name); - break; - case 1: - DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", opt.name); - break; - default: - e1000_validate_option(&adapter->itr, &opt, adapter); - break; } } @@ -481,17 +515,17 @@ e1000_check_fiber_options(struct e1000_adapter *adapter) { int bd = adapter->bd_number; - bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd; - - if((Speed[bd] != OPTION_UNSET)) { + if(num_Speed > bd) { DPRINTK(PROBE, INFO, "Speed not valid for fiber adapters, " "parameter ignored\n"); } - if((Duplex[bd] != OPTION_UNSET)) { + + if(num_Duplex > bd) { DPRINTK(PROBE, INFO, "Duplex not valid for fiber adapters, " "parameter ignored\n"); } - if((AutoNeg[bd] != OPTION_UNSET) && (AutoNeg[bd] != 0x20)) { + + if((num_AutoNeg > bd) && (AutoNeg[bd] != 0x20)) { DPRINTK(PROBE, INFO, "AutoNeg other than 1000/Full is " "not valid for fiber adapters, " "parameter ignored\n"); @@ -510,7 +544,6 @@ { int speed, dplx; int bd = adapter->bd_number; - bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd; { /* Speed */ struct e1000_opt_list speed_list[] = {{ 0, "" }, @@ -527,8 +560,12 @@ .p = speed_list }} }; - speed = Speed[bd]; - e1000_validate_option(&speed, &opt, adapter); + if (num_Speed > bd) { + speed = Speed[bd]; + e1000_validate_option(&speed, &opt, adapter); + } else { + speed = opt.def; + } } { /* Duplex */ struct e1000_opt_list dplx_list[] = {{ 0, "" }, @@ -544,11 +581,15 @@ .p = dplx_list }} }; - dplx = Duplex[bd]; - e1000_validate_option(&dplx, &opt, adapter); + if (num_Duplex > bd) { + dplx = Duplex[bd]; + e1000_validate_option(&dplx, &opt, adapter); + } else { + dplx = opt.def; + } } - if(AutoNeg[bd] != OPTION_UNSET && (speed != 0 || dplx != 0)) { + if((num_AutoNeg > bd) && (speed != 0 || dplx != 0)) { DPRINTK(PROBE, INFO, "AutoNeg specified along with Speed or Duplex, " "parameter ignored\n"); @@ -605,7 +646,7 @@ switch (speed + dplx) { case 0: adapter->hw.autoneg = adapter->fc_autoneg = 1; - if(Speed[bd] != OPTION_UNSET || Duplex[bd] != OPTION_UNSET) + if((num_Speed > bd) && (speed != 0 || dplx != 0)) DPRINTK(PROBE, INFO, "Speed and duplex autonegotiation enabled\n"); break; diff -Nru a/drivers/net/eql.c b/drivers/net/eql.c --- a/drivers/net/eql.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/eql.c 2004-10-26 18:25:18 -07:00 @@ -164,12 +164,12 @@ static void __init eql_setup(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); SET_MODULE_OWNER(dev); init_timer(&eql->timer); - eql->timer.data = (unsigned long) dev->priv; + eql->timer.data = (unsigned long) eql; eql->timer.expires = jiffies + EQL_DEFAULT_RESCHED_IVAL; eql->timer.function = eql_timer; @@ -197,7 +197,7 @@ static int eql_open(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); /* XXX We should force this off automatically for the user. */ printk(KERN_INFO "%s: remember to turn off Van-Jacobson compression on " @@ -241,7 +241,7 @@ static int eql_close(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); /* * The timer has to be stopped first before we start hacking away @@ -326,7 +326,7 @@ static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); slave_t *slave; spin_lock(&eql->queue.lock); @@ -352,7 +352,7 @@ static struct net_device_stats * eql_get_stats(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); return &eql->stats; } @@ -378,7 +378,7 @@ static inline int eql_is_full(slave_queue_t *queue) { - equalizer_t *eql = queue->master_dev->priv; + equalizer_t *eql = netdev_priv(queue->master_dev); if (queue->num_slaves >= eql->max_slaves) return 1; @@ -420,7 +420,7 @@ if (!eql_is_master(slave_dev) && !eql_is_slave(slave_dev)) { slave_t *s = kmalloc(sizeof(*s), GFP_KERNEL); - equalizer_t *eql = master_dev->priv; + equalizer_t *eql = netdev_priv(master_dev); int ret; if (!s) { @@ -453,7 +453,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __user *srqp) { - equalizer_t *eql = master_dev->priv; + equalizer_t *eql = netdev_priv(master_dev); struct net_device *slave_dev; slaving_request_t srq; int ret; @@ -485,7 +485,7 @@ static int eql_g_slave_cfg(struct net_device *dev, slave_config_t __user *scp) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); slave_t *slave; struct net_device *slave_dev; slave_config_t sc; @@ -539,7 +539,7 @@ if (!slave_dev) return ret; - eql = dev->priv; + eql = netdev_priv(dev); spin_lock_bh(&eql->queue.lock); if (eql_is_slave(slave_dev)) { slave = __eql_find_slave_dev(&eql->queue, slave_dev); @@ -561,7 +561,7 @@ master_config_t mc; if (eql_is_master(dev)) { - eql = dev->priv; + eql = netdev_priv(dev); mc.max_slaves = eql->max_slaves; mc.min_slaves = eql->min_slaves; if (copy_to_user(mcp, &mc, sizeof (master_config_t))) @@ -580,7 +580,7 @@ return -EFAULT; if (eql_is_master(dev)) { - eql = dev->priv; + eql = netdev_priv(dev); eql->max_slaves = mc.max_slaves; eql->min_slaves = mc.min_slaves; return 0; diff -Nru a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c --- a/drivers/net/hamradio/hdlcdrv.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/net/hamradio/hdlcdrv.c 2004-10-26 18:25:19 -07:00 @@ -549,6 +549,8 @@ netif_stop_queue(dev); + netif_stop_queue(dev); + if (s->ops && s->ops->close) i = s->ops->close(dev); if (s->skb) diff -Nru a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c --- a/drivers/net/ibmlana.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/ibmlana.c 2004-10-26 18:25:17 -07:00 @@ -885,14 +885,6 @@ return &priv->stat; } -/* we don't support runtime reconfiguration, since am MCA card can - be unambigously identified by its POS registers. */ - -static int ibmlana_config(struct net_device *dev, struct ifmap *map) -{ - return 0; -} - /* switch receiver mode. */ static void ibmlana_set_multicast_list(struct net_device *dev) @@ -984,7 +976,6 @@ dev->open = ibmlana_open; dev->stop = ibmlana_close; - dev->set_config = ibmlana_config; dev->hard_start_xmit = ibmlana_tx; dev->do_ioctl = NULL; dev->get_stats = ibmlana_stats; diff -Nru a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c --- a/drivers/net/ixgb/ixgb_main.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/ixgb/ixgb_main.c 2004-10-26 18:25:17 -07:00 @@ -30,7 +30,7 @@ char ixgb_driver_name[] = "ixgb"; char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; -char ixgb_driver_version[] = "1.0.66"; +char ixgb_driver_version[] = "1.0.66-k2"; char ixgb_copyright[] = "Copyright (c) 2001-2004 Intel Corporation."; /* ixgb_pci_tbl - PCI Device ID Table @@ -1614,8 +1614,12 @@ } #else for (i = 0; i < IXGB_MAX_INTR; i++) - if (!ixgb_clean_rx_irq(adapter) & !ixgb_clean_tx_irq(adapter)) + if (ixgb_clean_rx_irq(adapter) == FALSE) break; + for (i = 0; i < IXGB_MAX_INTR; i++) + if (ixgb_clean_tx_irq(adapter) == FALSE) + break; + /* if RAIDC:EN == 1 and ICR:RXDMT0 == 1, we need to * set IMS:RXDMT0 to 1 to restart the RBD timer (POLL) */ @@ -1676,7 +1680,7 @@ eop = tx_ring->buffer_info[i].next_to_watch; eop_desc = IXGB_TX_DESC(*tx_ring, eop); - while (eop_desc->status & cpu_to_le32(IXGB_TX_DESC_STATUS_DD)) { + while (eop_desc->status & IXGB_TX_DESC_STATUS_DD) { for (cleaned = FALSE; !cleaned;) { tx_desc = IXGB_TX_DESC(*tx_ring, i); diff -Nru a/drivers/net/mac8390.c b/drivers/net/mac8390.c --- a/drivers/net/mac8390.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/mac8390.c 2004-10-26 18:25:18 -07:00 @@ -42,10 +42,6 @@ #include "8390.h" -#if (LINUX_VERSION_CODE < 0x02030e) -#define net_device device -#endif - #define WD_START_PG 0x00 /* First page of TX buffer */ #define CABLETRON_RX_START_PG 0x00 /* First page of RX buffer */ #define CABLETRON_RX_STOP_PG 0x30 /* Last page +1 of RX ring */ diff -Nru a/drivers/net/meth.c b/drivers/net/meth.c --- a/drivers/net/meth.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/meth.c 2004-10-26 18:25:18 -07:00 @@ -368,31 +368,6 @@ } /* - * Configuration changes (passed on by ifconfig) - */ -static int meth_config(struct net_device *dev, struct ifmap *map) -{ - if (dev->flags & IFF_UP) /* can't act on a running interface */ - return -EBUSY; - - /* Don't allow changing the I/O address */ - if (map->base_addr != dev->base_addr) { - printk(KERN_WARNING "meth: Can't change I/O address\n"); - return -EOPNOTSUPP; - } - - /* Don't allow changing the IRQ */ - if (map->irq != dev->irq) { - printk(KERN_WARNING "meth: Can't change IRQ\n"); - return -EOPNOTSUPP; - } - DPRINTK("Configured\n"); - - /* ignore other fields */ - return 0; -} - -/* * Receive a packet: retrieve, encapsulate and pass over to upper levels */ static void meth_rx(struct net_device* dev, unsigned long int_status) @@ -813,7 +788,6 @@ dev->open = meth_open; dev->stop = meth_release; - dev->set_config = meth_config; dev->hard_start_xmit = meth_tx; dev->do_ioctl = meth_ioctl; dev->get_stats = meth_stats; diff -Nru a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c --- a/drivers/net/ne2k-pci.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/ne2k-pci.c 2004-10-26 18:25:17 -07:00 @@ -653,12 +653,43 @@ pci_set_drvdata(pdev, NULL); } +#ifdef CONFIG_PM +static int ne2k_pci_suspend (struct pci_dev *pdev, u32 state) +{ + struct net_device *dev = pci_get_drvdata (pdev); + + netif_device_detach(dev); + pci_save_state(pdev); + pci_set_power_state(pdev, state); + + return 0; +} + +static int ne2k_pci_resume (struct pci_dev *pdev) +{ + struct net_device *dev = pci_get_drvdata (pdev); + + pci_set_power_state(pdev, 0); + pci_restore_state(pdev); + NS8390_init(dev, 1); + netif_device_attach(dev); + + return 0; +} + +#endif /* CONFIG_PM */ + static struct pci_driver ne2k_driver = { .name = DRV_NAME, .probe = ne2k_pci_init_one, .remove = __devexit_p(ne2k_pci_remove_one), .id_table = ne2k_pci_tbl, +#ifdef CONFIG_PM + .suspend = ne2k_pci_suspend, + .resume = ne2k_pci_resume, +#endif /* CONFIG_PM */ + }; diff -Nru a/drivers/net/ns83820.c b/drivers/net/ns83820.c --- a/drivers/net/ns83820.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/net/ns83820.c 2004-10-26 18:25:19 -07:00 @@ -64,6 +64,8 @@ * tuning * 0.20 - fix stupid RFEN thinko. i am such a smurf. * + * 20040828 0.21 - add hardware vlan accleration + * by Neil Horman * Driver Overview * =============== * @@ -92,7 +94,9 @@ //#define dprintk printk #define dprintk(x...) do { } while (0) +#include #include +#include #include #include #include @@ -108,6 +112,7 @@ #include #include #include +#include #include #include @@ -115,7 +120,7 @@ #define DRV_NAME "ns83820" -/* Global parameters. See MODULE_PARM near the bottom. */ +/* Global parameters. See module_param near the bottom. */ static int ihr = 2; static int reset_phy = 0; static int lnksts = 0; /* CFG_LNKSTS bit polarity */ @@ -138,6 +143,9 @@ /* tunables */ #define RX_BUF_SIZE 1500 /* 8192 */ +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) +#define NS83820_VLAN_ACCEL_SUPPORT +#endif /* Must not exceed ~65000. */ #define NR_RX_DESC 64 @@ -262,6 +270,8 @@ #define EXTSTS_UDPPKT 0x00200000 #define EXTSTS_TCPPKT 0x00080000 #define EXTSTS_IPPKT 0x00020000 +#define EXTSTS_VPKT 0x00010000 +#define EXTSTS_VTG_MASK 0x0000ffff #define SPDSTS_POLARITY (CFG_SPDSTS1 | CFG_SPDSTS0 | CFG_DUPSTS | (lnksts ? CFG_LNKSTS : 0)) @@ -403,6 +413,7 @@ #define CMDSTS_INTR 0x20000000 #define CMDSTS_ERR 0x10000000 #define CMDSTS_OK 0x08000000 +#define CMDSTS_RUNT 0x00200000 #define CMDSTS_LEN_MASK 0x0000ffff #define CMDSTS_DEST_MASK 0x01800000 @@ -432,6 +443,10 @@ struct pci_dev *pci_dev; +#ifdef NS83820_VLAN_ACCEL_SUPPORT + struct vlan_group *vlgrp; +#endif + struct rx_info rx_info; struct tasklet_struct rx_tasklet; @@ -494,6 +509,33 @@ (((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE) +#ifdef NS83820_VLAN_ACCEL_SUPPORT +static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp) +{ + struct ns83820 *dev = PRIV(ndev); + + spin_lock_irq(&dev->misc_lock); + spin_lock(&dev->tx_lock); + + dev->vlgrp = grp; + + spin_unlock(&dev->tx_lock); + spin_unlock_irq(&dev->misc_lock); +} + +static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid) +{ + struct ns83820 *dev = PRIV(ndev); + + spin_lock_irq(&dev->misc_lock); + spin_lock(&dev->tx_lock); + if (dev->vlgrp) + dev->vlgrp->vlan_devices[vid] = NULL; + spin_unlock(&dev->tx_lock); + spin_unlock_irq(&dev->misc_lock); +} +#endif + /* Packet Receiver * * The hardware supports linked lists of receive descriptors for @@ -836,6 +878,7 @@ struct ns83820 *dev = PRIV(ndev); struct rx_info *info = &dev->rx_info; unsigned next_rx; + int rx_rc, len; u32 cmdsts, *desc; unsigned long flags; int nr = 0; @@ -876,8 +919,24 @@ pci_unmap_single(dev->pci_dev, bufptr, RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + len = cmdsts & CMDSTS_LEN_MASK; +#ifdef NS83820_VLAN_ACCEL_SUPPORT + /* NH: As was mentioned below, this chip is kinda + * brain dead about vlan tag stripping. Frames + * that are 64 bytes with a vlan header appended + * like arp frames, or pings, are flagged as Runts + * when the tag is stripped and hardware. This + * also means that the OK bit in the descriptor + * is cleared when the frame comes in so we have + * to do a specific length check here to make sure + * the frame would have been ok, had we not stripped + * the tag. + */ + if (likely((CMDSTS_OK & cmdsts) || + ((cmdsts & CMDSTS_RUNT) && len >= 56))) { +#else if (likely(CMDSTS_OK & cmdsts)) { - int len = cmdsts & 0xffff; +#endif skb_put(skb, len); if (unlikely(!skb)) goto netdev_mangle_me_harder_failed; @@ -891,7 +950,18 @@ skb->ip_summed = CHECKSUM_NONE; } skb->protocol = eth_type_trans(skb, ndev); - if (NET_RX_DROP == netif_rx(skb)) { +#ifdef NS83820_VLAN_ACCEL_SUPPORT + if(extsts & EXTSTS_VPKT) { + unsigned short tag; + tag = ntohs(extsts & EXTSTS_VTG_MASK); + rx_rc = vlan_hwaccel_rx(skb,dev->vlgrp,tag); + } else { + rx_rc = netif_rx(skb); + } +#else + rx_rc = netif_rx(skb); +#endif + if (NET_RX_DROP == rx_rc) { netdev_mangle_me_harder_failed: dev->stats.rx_dropped ++; } @@ -1099,6 +1169,17 @@ extsts |= EXTSTS_UDPPKT; } +#ifdef NS83820_VLAN_ACCEL_SUPPORT + if(vlan_tx_tag_present(skb)) { + /* fetch the vlan tag info out of the + * ancilliary data if the vlan code + * is using hw vlan acceleration + */ + short tag = vlan_tx_tag_get(skb); + extsts |= (EXTSTS_VPKT | htons(tag)); + } +#endif + len = skb->len; if (nr_frags) len -= skb->data_len; @@ -1854,7 +1935,6 @@ SET_ETHTOOL_OPS(ndev, &ops); ndev->tx_timeout = ns83820_tx_timeout; ndev->watchdog_timeo = 5 * HZ; - pci_set_drvdata(pci_dev, ndev); ns83820_do_reset(dev, CR_RST); @@ -1980,11 +2060,25 @@ * a ping with a VLAN header) then the card, strips the 4 byte VLAN * tag and then checks the packet size, so if RXCFG_ARP is not enabled, * it discrards it!. These guys...... + * also turn on tag stripping if hardware acceleration is enabled */ - writel(VRCR_IPEN | VRCR_VTDEN, dev->base + VRCR); +#ifdef NS83820_VLAN_ACCEL_SUPPORT +#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN|VRCR_VTREN) +#else +#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN) +#endif + writel(VRCR_INIT_VALUE, dev->base + VRCR); - /* Enable per-packet TCP/UDP/IP checksumming */ - writel(VTCR_PPCHK, dev->base + VTCR); + /* Enable per-packet TCP/UDP/IP checksumming + * and per packet vlan tag insertion if + * vlan hardware acceleration is enabled + */ +#ifdef NS83820_VLAN_ACCEL_SUPPORT +#define VTCR_INIT_VALUE (VTCR_PPCHK|VTCR_VPPTI) +#else +#define VTCR_INIT_VALUE VTCR_PPCHK +#endif + writel(VTCR_INIT_VALUE, dev->base + VTCR); /* Ramit : Enable async and sync pause frames */ /* writel(0, dev->base + PCR); */ @@ -2001,6 +2095,13 @@ ndev->features |= NETIF_F_SG; ndev->features |= NETIF_F_IP_CSUM; +#ifdef NS83820_VLAN_ACCEL_SUPPORT + /* We also support hardware vlan acceleration */ + ndev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; + ndev->vlan_rx_register = ns83820_vlan_rx_register; + ndev->vlan_rx_kill_vid = ns83820_vlan_rx_kill_vid; +#endif + if (using_dac) { printk(KERN_INFO "%s: using 64 bit addressing.\n", ndev->name); @@ -2109,13 +2210,13 @@ MODULE_DEVICE_TABLE(pci, ns83820_pci_tbl); -MODULE_PARM(lnksts, "i"); +module_param(lnksts, int, 0); MODULE_PARM_DESC(lnksts, "Polarity of LNKSTS bit"); -MODULE_PARM(ihr, "i"); +module_param(ihr, int, 0); MODULE_PARM_DESC(ihr, "Time in 100 us increments to delay interrupts (range 0-127)"); -MODULE_PARM(reset_phy, "i"); +module_param(reset_phy, int, 0); MODULE_PARM_DESC(reset_phy, "Set to 1 to reset the PHY on startup"); module_init(ns83820_init); diff -Nru a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c --- a/drivers/net/pcnet32.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/pcnet32.c 2004-10-26 18:25:17 -07:00 @@ -359,9 +359,9 @@ struct net_device_stats stats; char tx_full; int options; - int shared_irq:1, /* shared irq possible */ - dxsuflo:1, /* disable transmit stop on uflo */ - mii:1; /* mii port available */ + unsigned int shared_irq:1, /* shared irq possible */ + dxsuflo:1, /* disable transmit stop on uflo */ + mii:1; /* mii port available */ struct net_device *next; struct mii_if_info mii_if; struct timer_list watchdog_timer; diff -Nru a/drivers/net/s2io.c b/drivers/net/s2io.c --- a/drivers/net/s2io.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/s2io.c 2004-10-26 18:25:18 -07:00 @@ -3983,14 +3983,14 @@ MODULE_AUTHOR("Raghavendra Koushik "); MODULE_LICENSE("GPL"); -MODULE_PARM(ring_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(frame_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(ring_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(fifo_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(fifo_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +module_param(ring_num, uint, 0); +module_param_array(frame_len, uint, NULL, 0); +module_param_array(ring_len, uint, NULL, 0); +module_param(fifo_num, uint, 0); +module_param_array(fifo_len, uint, NULL, 0); +module_param(rx_prio, uint, 0); +module_param(tx_prio, uint, 0); +module_param(latency_timer, byte, 0); /* * Input Argument/s: diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c --- a/drivers/net/sis900.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/sis900.c 2004-10-26 18:25:18 -07:00 @@ -262,13 +262,12 @@ u8 reg; int i; - isa_bridge = pci_find_device(PCI_VENDOR_ID_SI, 0x0008, isa_bridge); + isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0008, isa_bridge); + if (!isa_bridge) + isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0018, isa_bridge); if (!isa_bridge) { - isa_bridge = pci_find_device(PCI_VENDOR_ID_SI, 0x0018, isa_bridge); - if (!isa_bridge) { - printk("%s: Can not find ISA bridge\n", net_dev->name); - return 0; - } + printk("%s: Can not find ISA bridge\n", net_dev->name); + return 0; } pci_read_config_byte(isa_bridge, 0x48, ®); pci_write_config_byte(isa_bridge, 0x48, reg | 0x40); @@ -278,6 +277,7 @@ ((u8 *)(net_dev->dev_addr))[i] = inb(0x71); } pci_write_config_byte(isa_bridge, 0x48, reg & ~0x40); + pci_dev_put(isa_bridge); return 1; } @@ -488,9 +488,11 @@ } /* save our host bridge revision */ - dev = pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, NULL); - if (dev) + dev = pci_get_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, NULL); + if (dev) { pci_read_config_byte(dev, PCI_CLASS_REVISION, &sis_priv->host_bridge_rev); + pci_dev_put(dev); + } /* print some information about our NIC */ printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", net_dev->name, diff -Nru a/drivers/net/sk_mca.c b/drivers/net/sk_mca.c --- a/drivers/net/sk_mca.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/sk_mca.c 2004-10-26 18:25:18 -07:00 @@ -972,14 +972,6 @@ return &(priv->stat); } -/* we don't support runtime reconfiguration, since an MCA card can - be unambigously identified by its POS registers. */ - -static int skmca_config(struct net_device *dev, struct ifmap *map) -{ - return 0; -} - /* switch receiver mode. We use the LANCE's multicast filter to prefilter multicast addresses. */ @@ -1147,7 +1139,6 @@ /* set methods */ dev->open = skmca_open; dev->stop = skmca_close; - dev->set_config = skmca_config; dev->hard_start_xmit = skmca_tx; dev->do_ioctl = NULL; dev->get_stats = skmca_stats; diff -Nru a/drivers/net/skfp/hwmtm.c b/drivers/net/skfp/hwmtm.c --- a/drivers/net/skfp/hwmtm.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/skfp/hwmtm.c 2004-10-26 18:25:18 -07:00 @@ -1901,7 +1901,8 @@ } if (!smc->hw.mac_ring_is_up || frag_count > queue->tx_free) { - if (frame_status &= ~LAN_TX) { + frame_status &= ~LAN_TX; + if (frame_status) { DB_TX("Ring is down: terminate LAN_TX",0,0,2) ; } else { diff -Nru a/drivers/net/slip.c b/drivers/net/slip.c --- a/drivers/net/slip.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/net/slip.c 2004-10-26 18:25:19 -07:00 @@ -57,6 +57,7 @@ #define SL_CHECK_TRANSMIT #include #include +#include #include #include @@ -85,8 +86,8 @@ static struct net_device **slip_devs; -int slip_maxdev = SL_NRUNIT; /* Can be overridden with insmod! */ -MODULE_PARM(slip_maxdev, "i"); +static int slip_maxdev = SL_NRUNIT; +module_param(slip_maxdev, int, 0); MODULE_PARM_DESC(slip_maxdev, "Maximum number of slip devices"); static int slip_esc(unsigned char *p, unsigned char *d, int len); @@ -458,13 +459,11 @@ static void sl_tx_timeout(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock(&sl->lock); if (netif_queue_stopped(dev)) { - struct slip *sl = (struct slip*)(dev->priv); - if (!netif_running(dev)) goto out; @@ -494,7 +493,7 @@ static int sl_xmit(struct sk_buff *skb, struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock(&sl->lock); if (!netif_running(dev)) { @@ -528,7 +527,7 @@ static int sl_close(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock_bh(&sl->lock); if (sl->tty) { @@ -547,7 +546,7 @@ static int sl_open(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); if (sl->tty==NULL) return -ENODEV; @@ -561,7 +560,7 @@ static int sl_change_mtu(struct net_device *dev, int new_mtu) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); if (new_mtu < 68 || new_mtu > 65534) return -EINVAL; @@ -577,7 +576,7 @@ sl_get_stats(struct net_device *dev) { static struct net_device_stats stats; - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); #ifdef SL_INCLUDE_CSLIP struct slcompress *comp; #endif @@ -612,7 +611,7 @@ static int sl_init(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); /* * Finish setting up the DEVICE info. @@ -630,7 +629,7 @@ static void sl_uninit(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); sl_free_bufs(sl); } @@ -719,7 +718,7 @@ if ((dev = slip_devs[i]) == NULL) break; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->tty || sl->leased) continue; if (dev->flags&IFF_UP) @@ -746,7 +745,7 @@ if (dev == NULL) break; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->leased) { if (sl->line != line) continue; @@ -788,7 +787,7 @@ i = sel; dev = slip_devs[i]; if (score > 1) { - sl = dev->priv; + sl = netdev_priv(dev); sl->flags &= (1 << SLF_INUSE); return sl; } @@ -799,7 +798,7 @@ return NULL; if (dev) { - sl = dev->priv; + sl = netdev_priv(dev); if (test_bit(SLF_INUSE, &sl->flags)) { unregister_netdevice(dev); dev = NULL; @@ -817,7 +816,7 @@ dev->base_addr = i; } - sl = dev->priv; + sl = netdev_priv(dev); /* Initialize channel control data */ sl->magic = SLIP_MAGIC; @@ -1260,7 +1259,7 @@ static int sl_ioctl(struct net_device *dev,struct ifreq *rq,int cmd) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); unsigned long *p = (unsigned long *)&rq->ifr_ifru; if (sl == NULL) /* Allocation failed ?? */ @@ -1406,7 +1405,7 @@ dev = slip_devs[i]; if (!dev) continue; - sl = dev->priv; + sl = netdev_priv(dev); spin_lock_bh(&sl->lock); if (sl->tty) { busy++; @@ -1423,7 +1422,7 @@ continue; slip_devs[i] = NULL; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->tty) { printk(KERN_ERR "%s: tty discipline still running\n", dev->name); diff -Nru a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c --- a/drivers/net/tokenring/olympic.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/tokenring/olympic.c 2004-10-26 18:25:18 -07:00 @@ -1401,7 +1401,6 @@ u16 lan_status = 0, lan_status_diff ; /* Initialize to stop compiler warning */ u8 fdx_prot_error ; u16 next_ptr; - int i ; arb_block = (olympic_priv->olympic_lap + olympic_priv->arb) ; asb_block = (olympic_priv->olympic_lap + olympic_priv->asb) ; diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c --- a/drivers/net/tulip/de2104x.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/tulip/de2104x.c 2004-10-26 18:25:18 -07:00 @@ -1208,8 +1208,7 @@ pci_write_config_dword(de->pdev, PCIPM, pmctl); /* de4x5.c delays, so we do too */ - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(msecs_to_jiffies(10)); + msleep(10); } } diff -Nru a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c --- a/drivers/net/tulip/de4x5.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/tulip/de4x5.c 2004-10-26 18:25:17 -07:00 @@ -5089,7 +5089,7 @@ lp->useMII = TRUE; /* Search the MII address space for possible PHY devices */ - for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(++i)%DE4X5_MAX_MII) { + for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(i+1)%DE4X5_MAX_MII) { lp->phy[lp->active].addr = i; if (i==0) n++; /* Count cycles */ while (de4x5_reset_phy(dev)<0) udelay(100);/* Wait for reset */ diff -Nru a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c --- a/drivers/net/tulip/tulip_core.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/tulip/tulip_core.c 2004-10-26 18:25:18 -07:00 @@ -1221,6 +1221,11 @@ struct tulip_private *tp; /* See note below on the multiport cards. */ static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'}; + static struct pci_device_id early_486_chipsets[] = { + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424) }, + { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496) }, + { }, + }; static int last_irq; static int multiport_cnt; /* For four-port boards w/one EEPROM */ u8 chip_rev; @@ -1274,17 +1279,15 @@ * without the workarounds being on. */ - /* Intel Saturn. Switch to 8 long words burst, 8 long word cache aligned - Aries might need this too. The Saturn errata are not pretty reading but - thankfully it's an old 486 chipset. + /* 1. Intel Saturn. Switch to 8 long words burst, 8 long word cache + aligned. Aries might need this too. The Saturn errata are not + pretty reading but thankfully it's an old 486 chipset. + + 2. The dreaded SiS496 486 chipset. Same workaround as Intel + Saturn. */ - if (pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424, NULL)) { - csr0 = MRL | MRM | (8 << BurstLenShift) | (1 << CALShift); - force_csr0 = 1; - } - /* The dreaded SiS496 486 chipset. Same workaround as above. */ - if (pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, NULL)) { + if (pci_dev_present(early_486_chipsets)) { csr0 = MRL | MRM | (8 << BurstLenShift) | (1 << CALShift); force_csr0 = 1; } diff -Nru a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c --- a/drivers/net/tulip/xircom_cb.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/net/tulip/xircom_cb.c 2004-10-26 18:25:18 -07:00 @@ -117,6 +117,9 @@ static int xircom_close(struct net_device *dev); static void xircom_up(struct xircom_private *card); static struct net_device_stats *xircom_get_stats(struct net_device *dev); +#if CONFIG_NET_POLL_CONTROLLER +static void xircom_poll_controller(struct net_device *dev); +#endif static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset); static void investigate_write_descriptor(struct net_device *dev, struct xircom_private *card, int descnr, unsigned int bufferoffset); @@ -269,6 +272,9 @@ dev->stop = &xircom_close; dev->get_stats = &xircom_get_stats; dev->priv = private; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = &xircom_poll_controller; +#endif SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); pci_set_drvdata(pdev, dev); @@ -500,6 +506,14 @@ } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void xircom_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + xircom_interrupt(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif static void initialize_card(struct xircom_private *card) diff -Nru a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c --- a/drivers/net/wan/cosa.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/wan/cosa.c 2004-10-26 18:25:17 -07:00 @@ -156,7 +156,7 @@ unsigned short startaddr; /* Firmware start address */ unsigned short busmaster; /* Use busmastering? */ int nchannels; /* # of channels on this card */ - int driver_status; /* For communicating with firware */ + int driver_status; /* For communicating with firmware */ int firmware_status; /* Downloaded, reseted, etc. */ long int rxbitmap, txbitmap; /* Bitmap of channels who are willing to send/receive data */ long int rxtx; /* RX or TX in progress? */ diff -Nru a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c --- a/drivers/net/wan/lmc/lmc_main.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/net/wan/lmc/lmc_main.c 2004-10-26 18:25:17 -07:00 @@ -101,7 +101,6 @@ static int lmc_close(struct net_device *dev); static struct net_device_stats *lmc_get_stats(struct net_device *dev); static irqreturn_t lmc_interrupt(int irq, void *dev_instance, struct pt_regs *regs); -static int lmc_set_config(struct net_device *dev, struct ifmap *map); static void lmc_initcsrs(lmc_softc_t * const sc, lmc_csrptr_t csr_base, size_t csr_size); static void lmc_softreset(lmc_softc_t * const); static void lmc_running_reset(struct net_device *dev); @@ -814,7 +813,6 @@ dev->stop = lmc_close; dev->get_stats = lmc_get_stats; dev->do_ioctl = lmc_ioctl; - dev->set_config = lmc_set_config; dev->tx_timeout = lmc_driver_timeout; dev->watchdog_timeo = (HZ); /* 1 second */ @@ -1973,13 +1971,6 @@ LMC_CSR_WRITE (sc, csr_txlist, virt_to_bus (sc->lmc_txring)); lmc_trace(sc->lmc_device, "lmc_softreset out"); -} - -static int lmc_set_config(struct net_device *dev, struct ifmap *map) /*fold00*/ -{ - lmc_trace(dev, "lmc_set_config in"); - lmc_trace(dev, "lmc_set_config out"); - return -EOPNOTSUPP; } void lmc_gpio_mkinput(lmc_softc_t * const sc, u_int32_t bits) /*fold00*/ diff -Nru a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c --- a/drivers/net/wireless/netwave_cs.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/net/wireless/netwave_cs.c 2004-10-26 18:25:19 -07:00 @@ -219,7 +219,6 @@ /* Misc device stuff */ static int netwave_open(struct net_device *dev); /* Open the device */ static int netwave_close(struct net_device *dev); /* Close the device */ -static int netwave_config(struct net_device *dev, struct ifmap *map); /* Packet transmission and Packet reception */ static int netwave_start_xmit( struct sk_buff *skb, struct net_device *dev); @@ -482,7 +481,6 @@ /* Netwave specific entries in the device structure */ SET_MODULE_OWNER(dev); dev->hard_start_xmit = &netwave_start_xmit; - dev->set_config = &netwave_config; dev->get_stats = &netwave_get_stats; dev->set_multicast_list = &set_multicast_list; /* wireless extensions */ @@ -1286,16 +1284,6 @@ /* Set the IENA bit in COR */ wait_WOC(iobase); outb(corConfIENA + corConfLVLREQ, iobase + NETWAVE_REG_COR); -} - -/* - * Function netwave_config (dev, map) - * - * Configure device, this work is done by netwave_pcmcia_config when a - * card is inserted - */ -static int netwave_config(struct net_device *dev, struct ifmap *map) { - return 0; } /* diff -Nru a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c --- a/drivers/oprofile/oprofilefs.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/oprofile/oprofilefs.c 2004-10-26 18:25:17 -07:00 @@ -135,11 +135,8 @@ { struct dentry * dentry; struct inode * inode; - struct qstr qname; - qname.name = name; - qname.len = strlen(name); - qname.hash = full_name_hash(qname.name, qname.len); - dentry = d_alloc(root, &qname); + + dentry = d_alloc_name(root, name); if (!dentry) return NULL; inode = oprofilefs_get_inode(sb, S_IFREG | perm); @@ -228,11 +225,8 @@ { struct dentry * dentry; struct inode * inode; - struct qstr qname; - qname.name = name; - qname.len = strlen(name); - qname.hash = full_name_hash(qname.name, qname.len); - dentry = d_alloc(root, &qname); + + dentry = d_alloc_name(root, name); if (!dentry) return NULL; inode = oprofilefs_get_inode(sb, S_IFDIR | 0755); diff -Nru a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c --- a/drivers/pci/hotplug/pci_hotplug_core.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/pci/hotplug/pci_hotplug_core.c 2004-10-26 18:25:18 -07:00 @@ -568,7 +568,7 @@ if ((slot->info == NULL) || (slot->ops == NULL)) return -EINVAL; - kobject_set_name(&slot->kobj, slot->name); + kobject_set_name(&slot->kobj, "%s", slot->name); kobj_set_kset_s(slot, pci_hotplug_slots_subsys); /* this can fail if we have already registered a slot with the same name */ diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c --- a/drivers/pci/quirks.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/pci/quirks.c 2004-10-26 18:25:17 -07:00 @@ -18,7 +18,6 @@ #include #include #include -#include #undef DEBUG @@ -1211,58 +1210,12 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_intel_ide_combined ); #endif /* CONFIG_SCSI_SATA */ -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) - -void __devinit quirk_intel_irqbalance(struct pci_dev *dev) -{ - u8 config, rev; - u32 word; - extern struct pci_raw_ops *raw_pci_ops; - - /* BIOS may enable hardware IRQ balancing for - * E7520/E7320/E7525(revision ID 0x9 and below) - * based platforms. - * Disable SW irqbalance/affinity on those platforms. - */ - pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); - if (rev > 0x9) - return; - - printk(KERN_INFO "Intel E7520/7320/7525 detected."); - - /* enable access to config space*/ - pci_read_config_byte(dev, 0xf4, &config); - config |= 0x2; - pci_write_config_byte(dev, 0xf4, config); - - /* read xTPR register */ - raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); - - if (!(word & (1 << 13))) { - printk(KERN_INFO "Disabling irq balancing and affinity\n"); -#ifdef CONFIG_IRQBALANCE - irqbalance_disable(""); -#endif - noirqdebug_setup(""); - no_irq_affinity = 1; - } - - config &= ~0x2; - /* disable access to config space*/ - pci_write_config_byte(dev, 0xf4, config); -} -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_intel_irqbalance); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance); -#endif int pciehp_msi_quirk; static void __devinit quirk_pciehp_msi(struct pci_dev *pdev) { pciehp_msi_quirk = 1; -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) - quirk_intel_irqbalance(pdev); -#endif } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SMCH, quirk_pciehp_msi ); diff -Nru a/drivers/pcmcia/bulkmem.c b/drivers/pcmcia/bulkmem.c --- a/drivers/pcmcia/bulkmem.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/pcmcia/bulkmem.c 2004-10-26 18:25:19 -07:00 @@ -49,11 +49,11 @@ #include "cs_internal.h" #ifdef DEBUG -extern int pc_debug; +extern int ds_pc_debug; #define cs_socket_name(skt) ((skt)->dev.class_id) #define ds_dbg(skt, lvl, fmt, arg...) do { \ - if (pc_debug >= lvl) \ + if (ds_pc_debug >= lvl) \ printk(KERN_DEBUG "ds: %s: " fmt, \ cs_socket_name(skt) , ## arg); \ } while (0) diff -Nru a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c --- a/drivers/pcmcia/ds.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/pcmcia/ds.c 2004-10-26 18:25:18 -07:00 @@ -75,12 +75,12 @@ MODULE_LICENSE("Dual MPL/GPL"); #ifdef DEBUG -int pc_debug; +int ds_pc_debug; -module_param(pc_debug, int, 0644); +module_param_named(pc_debug, ds_pc_debug, int, 0644); #define ds_dbg(lvl, fmt, arg...) do { \ - if (pc_debug > (lvl)) \ + if (ds_pc_debug > (lvl)) \ printk(KERN_DEBUG "ds: " fmt , ## arg); \ } while (0) #else @@ -1060,7 +1060,11 @@ } } - if (cmd & IOC_OUT) __copy_to_user(uarg, (char *)&buf, size); + if (cmd & IOC_OUT) { + if (__copy_to_user(uarg, (char *)&buf, size)) + err = -EFAULT; + } + return err; } /* ds_ioctl */ diff -Nru a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c --- a/drivers/s390/block/dcssblk.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/s390/block/dcssblk.c 2004-10-26 18:25:17 -07:00 @@ -140,6 +140,53 @@ } /* + * print appropriate error message for segment_load()/segment_info() + * return code + */ +static void +dcssblk_segment_warn(int rc, char* seg_name) +{ + switch (rc) { + case -ENOENT: + PRINT_WARN("cannot load/query segment %s, does not exist\n", + seg_name); + break; + case -ENOSYS: + PRINT_WARN("cannot load/query segment %s, not running on VM\n", + seg_name); + break; + case -EIO: + PRINT_WARN("cannot load/query segment %s, hardware error\n", + seg_name); + break; + case -ENOTSUPP: + PRINT_WARN("cannot load/query segment %s, is a multi-part " + "segment\n", seg_name); + break; + case -ENOSPC: + PRINT_WARN("cannot load/query segment %s, overlaps with " + "storage\n", seg_name); + break; + case -EBUSY: + PRINT_WARN("cannot load/query segment %s, overlaps with " + "already loaded dcss\n", seg_name); + break; + case -EPERM: + PRINT_WARN("cannot load/query segment %s, already loaded in " + "incompatible mode\n", seg_name); + break; + case -ENOMEM: + PRINT_WARN("cannot load/query segment %s, out of memory\n", + seg_name); + break; + default: + PRINT_WARN("cannot load/query segment %s, return value %i\n", + seg_name, rc); + break; + } +} + +/* * device attribute for switching shared/nonshared (exclusive) * operation (show + store) */ @@ -185,61 +232,38 @@ if (inbuf[0] == '1') { // reload segment in shared mode segment_unload(dev_info->segment_name); - rc = segment_load(dev_info->segment_name, SEGMENT_SHARED_RO, + rc = segment_load(dev_info->segment_name, SEGMENT_SHARED, &dev_info->start, &dev_info->end); if (rc < 0) { - PRINT_ERR("Segment %s not reloaded, rc=%d\n", - dev_info->segment_name, rc); + dcssblk_segment_warn(rc, dev_info->segment_name); goto removeseg; } dev_info->is_shared = 1; - PRINT_INFO("Segment %s reloaded, shared mode.\n", - dev_info->segment_name); + if (rc == SEG_TYPE_SR || rc == SEG_TYPE_ER || rc == SEG_TYPE_SC) + set_disk_ro(dev_info->gd, 1); } else if (inbuf[0] == '0') { // reload segment in exclusive mode + if (dev_info->segment_type == SEG_TYPE_SC) { + PRINT_ERR("Segment type SC (%s) cannot be loaded in " + "non-shared mode\n", dev_info->segment_name); + up_write(&dcssblk_devices_sem); + return -EINVAL; + } segment_unload(dev_info->segment_name); - rc = segment_load(dev_info->segment_name, SEGMENT_EXCLUSIVE_RW, + rc = segment_load(dev_info->segment_name, SEGMENT_EXCLUSIVE, &dev_info->start, &dev_info->end); if (rc < 0) { - PRINT_ERR("Segment %s not reloaded, rc=%d\n", - dev_info->segment_name, rc); + dcssblk_segment_warn(rc, dev_info->segment_name); goto removeseg; } dev_info->is_shared = 0; - PRINT_INFO("Segment %s reloaded, exclusive (read-write) mode.\n", - dev_info->segment_name); + set_disk_ro(dev_info->gd, 0); } else { up_write(&dcssblk_devices_sem); PRINT_WARN("Invalid value, must be 0 or 1\n"); return -EINVAL; } - dev_info->segment_type = rc; rc = count; - - switch (dev_info->segment_type) { - case SEGMENT_SHARED_RO: - case SEGMENT_EXCLUSIVE_RO: - set_disk_ro(dev_info->gd, 1); - break; - case SEGMENT_SHARED_RW: - case SEGMENT_EXCLUSIVE_RW: - set_disk_ro(dev_info->gd, 0); - break; - } - if ((inbuf[0] == '1') && - ((dev_info->segment_type == SEGMENT_EXCLUSIVE_RO) || - (dev_info->segment_type == SEGMENT_EXCLUSIVE_RW))) { - PRINT_WARN("Could not get shared copy of segment %s\n", - dev_info->segment_name); - rc = -EPERM; - } - if ((inbuf[0] == '0') && - ((dev_info->segment_type == SEGMENT_SHARED_RO) || - (dev_info->segment_type == SEGMENT_SHARED_RW))) { - PRINT_WARN("Could not get exclusive copy of segment %s\n", - dev_info->segment_name); - rc = -EPERM; - } up_write(&dcssblk_devices_sem); goto out; @@ -292,7 +316,7 @@ // device is idle => we save immediately PRINT_INFO("Saving segment %s\n", dev_info->segment_name); - segment_replace(dev_info->segment_name); + segment_save(dev_info->segment_name); } else { // device is busy => we save it when it becomes // idle in dcssblk_release @@ -390,18 +414,17 @@ /* * load the segment */ - rc = segment_load(local_buf, SEGMENT_SHARED_RO, + rc = segment_load(local_buf, SEGMENT_SHARED, &dev_info->start, &dev_info->end); if (rc < 0) { - PRINT_ERR("Segment %s not loaded, rc=%d\n", local_buf, rc); + dcssblk_segment_warn(rc, dev_info->segment_name); goto dealloc_gendisk; } seg_byte_size = (dev_info->end - dev_info->start + 1); set_capacity(dev_info->gd, seg_byte_size >> 9); // size in sectors - PRINT_INFO("Loaded segment %s from %p to %p, size = %lu Byte, " - "capacity = %lu sectors (512 Byte)\n", local_buf, - (void *) dev_info->start, (void *) dev_info->end, - seg_byte_size, seg_byte_size >> 9); + PRINT_INFO("Loaded segment %s, size = %lu Byte, " + "capacity = %lu (512 Byte) sectors\n", local_buf, + seg_byte_size, seg_byte_size >> 9); dev_info->segment_type = rc; dev_info->save_pending = 0; @@ -451,12 +474,12 @@ blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096); switch (dev_info->segment_type) { - case SEGMENT_SHARED_RO: - case SEGMENT_EXCLUSIVE_RO: + case SEG_TYPE_SR: + case SEG_TYPE_ER: + case SEG_TYPE_SC: set_disk_ro(dev_info->gd,1); break; - case SEGMENT_SHARED_RW: - case SEGMENT_EXCLUSIVE_RW: + default: set_disk_ro(dev_info->gd,0); break; } @@ -589,7 +612,7 @@ && (dev_info->save_pending)) { PRINT_INFO("Segment %s became idle and is being saved now\n", dev_info->segment_name); - segment_replace(dev_info->segment_name); + segment_save(dev_info->segment_name); dev_info->save_pending = 0; } up_write(&dcssblk_devices_sem); diff -Nru a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c --- a/drivers/s390/char/monreader.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/s390/char/monreader.c 2004-10-26 18:25:17 -07:00 @@ -115,6 +115,53 @@ ASCEBC(ebcdic_name, 8); } +/* + * print appropriate error message for segment_load()/segment_info() + * return code + */ +static void +mon_segment_warn(int rc, char* seg_name) +{ + switch (rc) { + case -ENOENT: + P_WARNING("cannot load/query segment %s, does not exist\n", + seg_name); + break; + case -ENOSYS: + P_WARNING("cannot load/query segment %s, not running on VM\n", + seg_name); + break; + case -EIO: + P_WARNING("cannot load/query segment %s, hardware error\n", + seg_name); + break; + case -ENOTSUPP: + P_WARNING("cannot load/query segment %s, is a multi-part " + "segment\n", seg_name); + break; + case -ENOSPC: + P_WARNING("cannot load/query segment %s, overlaps with " + "storage\n", seg_name); + break; + case -EBUSY: + P_WARNING("cannot load/query segment %s, overlaps with " + "already loaded dcss\n", seg_name); + break; + case -EPERM: + P_WARNING("cannot load/query segment %s, already loaded in " + "incompatible mode\n", seg_name); + break; + case -ENOMEM: + P_WARNING("cannot load/query segment %s, out of memory\n", + seg_name); + break; + default: + P_WARNING("cannot load/query segment %s, return value %i\n", + seg_name, rc); + break; + } +} + static inline unsigned long mon_mca_start(struct mon_msg *monmsg) { @@ -534,10 +581,21 @@ return -ENODEV; } - rc = segment_load(mon_dcss_name, SEGMENT_SHARED_RO, + rc = segment_info(mon_dcss_name); + if (rc < 0) { + mon_segment_warn(rc, mon_dcss_name); + return rc; + } + if (rc != SEG_TYPE_SC) { + P_ERROR("segment %s has unsupported type, should be SC\n", + mon_dcss_name); + return -EINVAL; + } + + rc = segment_load(mon_dcss_name, SEGMENT_SHARED, &mon_dcss_start, &mon_dcss_end); if (rc < 0) { - P_ERROR("Segment %s not loaded, rc = %d\n", mon_dcss_name, rc); + mon_segment_warn(rc, mon_dcss_name); return -EINVAL; } dcss_mkname(mon_dcss_name, &user_data_connect[8]); diff -Nru a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c --- a/drivers/s390/cio/qdio.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/s390/cio/qdio.c 2004-10-26 18:25:18 -07:00 @@ -56,7 +56,7 @@ #include "ioasm.h" #include "chsc.h" -#define VERSION_QDIO_C "$Revision: 1.86 $" +#define VERSION_QDIO_C "$Revision: 1.88 $" /****************** MODULE PARAMETER VARIABLES ********************/ MODULE_AUTHOR("Utz Bacher "); @@ -808,7 +808,7 @@ #endif /* QDIO_USE_PROCESSING_STATE */ /* * not needed, as the inbound queue will be synced on the next - * siga-r + * siga-r, resp. tiqdio_is_inbound_q_done will do the siga-s */ /*SYNC_MEMORY;*/ f++; @@ -899,7 +899,7 @@ /* means, no more buffers to be filled */ inline static int -iqdio_is_inbound_q_done(struct qdio_q *q) +tiqdio_is_inbound_q_done(struct qdio_q *q) { int no_used; #ifdef CONFIG_QDIO_DEBUG @@ -1139,7 +1139,7 @@ goto out; qdio_kick_inbound_handler(q); - if (iqdio_is_inbound_q_done(q)) + if (tiqdio_is_inbound_q_done(q)) if (!qdio_stop_polling(q)) { /* * we set the flags to get into the stuff next time, @@ -1401,7 +1401,7 @@ int result=-ENOMEM; for (i=0;islib=kmalloc(PAGE_SIZE,GFP_KERNEL); + q->slib=kmalloc(PAGE_SIZE,GFP_KERNEL|GFP_DMA); if (!q->slib) { QDIO_PRINT_ERR("kmalloc of slib failed!\n"); goto out; @@ -1420,7 +1420,7 @@ } for (i=0;islib=kmalloc(PAGE_SIZE,GFP_KERNEL); + q->slib=kmalloc(PAGE_SIZE,GFP_KERNEL|GFP_DMA); if (!q->slib) { QDIO_PRINT_ERR("kmalloc of slib failed!\n"); goto out; diff -Nru a/drivers/s390/net/ctcdbug.h b/drivers/s390/net/ctcdbug.h --- a/drivers/s390/net/ctcdbug.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/s390/net/ctcdbug.h 2004-10-26 18:25:17 -07:00 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/ctcdbug.h ($Revision: 1.3 $) + * linux/drivers/s390/net/ctcdbug.h ($Revision: 1.4 $) * * CTC / ESCON network driver - s390 dbf exploit. * @@ -9,7 +9,7 @@ * Author(s): Original Code written by * Peter Tiedemann (ptiedem@de.ibm.com) * - * $Revision: 1.3 $ $Date: 2004/07/28 12:27:54 $ + * $Revision: 1.4 $ $Date: 2004/10/15 09:26:58 $ * * 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 @@ -59,7 +59,7 @@ debug_event(ctc_dbf_##name,level,(void*)(addr),len); \ } while (0) -extern DEFINE_PER_CPU(char[256], ctc_dbf_txt_buf); +DECLARE_PER_CPU(char[256], ctc_dbf_txt_buf); extern debug_info_t *ctc_dbf_setup; extern debug_info_t *ctc_dbf_data; extern debug_info_t *ctc_dbf_trace; diff -Nru a/drivers/s390/net/iucv.h b/drivers/s390/net/iucv.h --- a/drivers/s390/net/iucv.h 2004-10-26 18:25:19 -07:00 +++ b/drivers/s390/net/iucv.h 2004-10-26 18:25:19 -07:00 @@ -63,7 +63,7 @@ debug_event(iucv_dbf_##name,level,(void*)(addr),len); \ } while (0) -extern DEFINE_PER_CPU(char[256], iucv_dbf_txt_buf); +DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf); #define IUCV_DBF_TEXT_(name,level,text...) \ do { \ diff -Nru a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c --- a/drivers/s390/net/lcs.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/s390/net/lcs.c 2004-10-26 18:25:17 -07:00 @@ -11,7 +11,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Martin Schwidefsky * - * $Revision: 1.92 $ $Date: 2004/09/03 08:06:11 $ + * $Revision: 1.94 $ $Date: 2004/10/19 09:30:54 $ * * 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 @@ -59,7 +59,7 @@ /** * initialization string for output */ -#define VERSION_LCS_C "$Revision: 1.92 $" +#define VERSION_LCS_C "$Revision: 1.94 $" static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")"; static char debug_buffer[255]; @@ -549,6 +549,7 @@ return 0; LCS_DBF_TEXT(4,trace,"haltsch"); LCS_DBF_TEXT_(4,trace,"%s", channel->ccwdev->dev.bus_id); + channel->state = CH_STATE_INIT; spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); rc = ccw_device_halt(channel->ccwdev, (addr_t) channel); spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); @@ -1357,6 +1358,7 @@ LCS_DBF_TEXT_(5, trace, "Rint%s",cdev->dev.bus_id); LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.cstat, irb->scsw.dstat); + LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.fctl, irb->scsw.actl); /* How far in the ccw chain have we processed? */ if ((channel->state != CH_STATE_INIT) && @@ -1624,8 +1626,6 @@ /* start/reset card */ if (card->dev) netif_stop_queue(card->dev); - card->write.state = CH_STATE_INIT; - card->read.state = CH_STATE_INIT; rc = lcs_stop_channels(card); if (rc == 0) { rc = lcs_start_channels(card); diff -Nru a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h --- a/drivers/s390/net/qeth.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/s390/net/qeth.h 2004-10-26 18:25:17 -07:00 @@ -92,7 +92,7 @@ debug_event(qeth_dbf_##name,level,(void*)(addr),len); \ } while (0) -extern DEFINE_PER_CPU(char[256], qeth_dbf_txt_buf); +DECLARE_PER_CPU(char[256], qeth_dbf_txt_buf); #define QETH_DBF_TEXT_(name,level,text...) \ do { \ @@ -740,8 +740,6 @@ #ifdef CONFIG_QETH_VLAN spinlock_t vlanlock; struct vlan_group *vlangrp; - __u8 vlans_current[VLAN_GROUP_ARRAY_LEN/(8*sizeof(__u8))]; - __u8 vlans_new[VLAN_GROUP_ARRAY_LEN/(8*sizeof(__u8))]; #endif struct work_struct kernel_thread_starter; spinlock_t thread_mask_lock; diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c --- a/drivers/s390/net/qeth_main.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/s390/net/qeth_main.c 2004-10-26 18:25:18 -07:00 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.145 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.155 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -12,7 +12,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Thomas Spatzier * - * $Revision: 1.145 $ $Date: 2004/10/08 15:08:40 $ + * $Revision: 1.155 $ $Date: 2004/10/21 13:27:46 $ * * 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 @@ -78,7 +78,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -#define VERSION_QETH_C "$Revision: 1.145 $" +#define VERSION_QETH_C "$Revision: 1.155 $" static const char *version = "qeth S/390 OSA-Express driver"; /** @@ -2153,8 +2153,9 @@ qeth_type_trans(struct sk_buff *skb, struct net_device *dev) { struct qeth_card *card; + struct ethhdr *eth; - QETH_DBF_TEXT(trace,5,"typtrans"); + QETH_DBF_TEXT(trace,6,"typtrans"); card = (struct qeth_card *)dev->priv; #ifdef CONFIG_TR @@ -2162,7 +2163,23 @@ (card->info.link_type == QETH_LINK_TYPE_LANE_TR)) return tr_type_trans(skb,dev); #endif /* CONFIG_TR */ - return eth_type_trans(skb,dev); + skb->mac.raw = skb->data; + skb_pull(skb, ETH_HLEN ); + eth = eth_hdr(skb); + + if (*eth->h_dest & 1) { + if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) + skb->pkt_type = PACKET_BROADCAST; + else + skb->pkt_type = PACKET_MULTICAST; + } else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN)) + skb->pkt_type = PACKET_OTHERHOST; + + if (ntohs(eth->h_proto) >= 1536) + return eth->h_proto; + if (*(unsigned short *) (skb->data) == 0xFFFF) + return htons(ETH_P_802_3); + return htons(ETH_P_802_2); } static inline void @@ -2234,26 +2251,21 @@ qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, struct qeth_hdr *hdr) { - __u32 cast_type = 0; - __u16 rc = 0; + unsigned short vlan_id = 0; - cast_type = *(__u32 *) hdr->hdr.l2.flags; - if (cast_type & (QETH_LAYER2_FLAG_UNICAST << 8)) - skb->pkt_type = PACKET_HOST; - else if (cast_type & (QETH_LAYER2_FLAG_MULTICAST << 8)) - skb->pkt_type = PACKET_MULTICAST; - else if (cast_type & (QETH_LAYER2_FLAG_BROADCAST << 8)) - skb->pkt_type = PACKET_BROADCAST; + skb->pkt_type = PACKET_HOST; + if (card->options.checksum_type == NO_CHECKSUMMING) + skb->ip_summed = CHECKSUM_UNNECESSARY; else - skb->pkt_type = PACKET_HOST; + skb->ip_summed = CHECKSUM_NONE; #ifdef CONFIG_QETH_VLAN - if (cast_type & (QETH_LAYER2_FLAG_VLAN << 8)) { - rc = hdr->hdr.l2.vlan_id; + if (hdr->hdr.l2.flags[2] & (QETH_LAYER2_FLAG_VLAN)) { skb_pull(skb, VLAN_HLEN); + vlan_id = hdr->hdr.l2.vlan_id; } #endif - skb->protocol = qeth_type_trans(skb, card->dev); - return rc; + skb->protocol = qeth_type_trans(skb, skb->dev); + return vlan_id; } static inline void @@ -2261,7 +2273,8 @@ struct qeth_hdr *hdr) { #ifdef CONFIG_QETH_IPV6 - if (hdr->hdr.l3.flags & QETH_HDR_PASSTHRU){ + if (hdr->hdr.l3.flags & QETH_HDR_PASSTHRU) { + skb->pkt_type = PACKET_HOST; skb->protocol = qeth_type_trans(skb, card->dev); return; } @@ -2322,6 +2335,7 @@ #endif while((skb = qeth_get_next_skb(card, buf->buffer, &element, &offset, &hdr))) { + skb->dev = card->dev; if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); else @@ -2331,13 +2345,12 @@ dev_kfree_skb_any(skb); continue; } - skb->dev = card->dev; #ifdef CONFIG_QETH_VLAN if (vlan_tag) vlan_hwaccel_rx(skb, card->vlangrp, vlan_tag); else #endif - rxrc = netif_rx(skb); + rxrc = netif_rx(skb); card->dev->last_rx = jiffies; card->stats.rx_packets++; card->stats.rx_bytes += skb->len; @@ -3621,7 +3634,8 @@ *skb = new_skb; } #ifdef CONFIG_QETH_VLAN - if (card->vlangrp && vlan_tx_tag_present(*skb) && (ipv == 6)){ + if (card->vlangrp && vlan_tx_tag_present(*skb) && + ((ipv == 6) || card->options.layer2) ) { /* * Move the mac addresses (6 bytes src, 6 bytes dest) * to the beginning of the new header. We are using three @@ -3631,14 +3645,13 @@ memcpy((*skb)->data, (*skb)->data + 4, 4); memcpy((*skb)->data + 4, (*skb)->data + 8, 4); memcpy((*skb)->data + 8, (*skb)->data + 12, 4); - tag = (u16 *) (*skb)->data + 12; + tag = (u16 *)((*skb)->data + 12); /* * first two bytes = ETH_P_8021Q (0x8100) * second two bytes = VLANID */ *tag = __constant_htons(ETH_P_8021Q); - *(tag + 1) = vlan_tx_tag_get(*skb); - *(tag + 1) = htons(*(tag + 1)); + *(tag + 1) = htons(vlan_tx_tag_get(*skb)); } #endif *hdr = (struct qeth_hdr *) skb_push(*skb, sizeof(struct qeth_hdr)); @@ -3734,7 +3747,7 @@ qeth_layer2_get_packet_type(card, hdr, skb); hdr->hdr.l2.pkt_length = skb->len-QETH_HEADER_SIZE; -#ifdef QETH_VLAN +#ifdef CONFIG_QETH_VLAN /* VSWITCH relies on the VLAN * information to be present in * the QDIO header */ @@ -4793,7 +4806,6 @@ } #ifdef CONFIG_QETH_VLAN -static void qeth_layer2_process_vlans(struct qeth_card *); static void qeth_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) { @@ -4806,8 +4818,6 @@ spin_lock_irqsave(&card->vlanlock, flags); card->vlangrp = grp; spin_unlock_irqrestore(&card->vlanlock, flags); - if (card->options.layer2) - qeth_layer2_process_vlans(card); } static inline void @@ -4902,12 +4912,69 @@ } static void +qeth_layer2_send_setdelvlan(struct qeth_card *card, __u16 i, + enum qeth_ipa_cmds ipacmd) +{ + int rc; + struct qeth_ipa_cmd *cmd; + struct qeth_cmd_buffer *iob; + + QETH_DBF_TEXT_(trace, 4, "L2sdv%x",ipacmd); + iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); + cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); + cmd->data.setdelvlan.vlan_id = i; + + rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); + if (rc) { + PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " + "Continuing\n",i, card->info.if_name, rc); + QETH_DBF_TEXT_(trace, 2, "L2VL%4x", ipacmd); + QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); + QETH_DBF_TEXT_(trace, 2, "err%d", rc); + } +} + +static void +qeth_layer2_process_vlans(struct qeth_card *card, int clear) +{ + unsigned short i; + + QETH_DBF_TEXT(trace, 3, "L2prcvln"); + + if (!card->vlangrp) + return; + for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { + if (card->vlangrp->vlan_devices[i] == NULL) + continue; + if (clear) + qeth_layer2_send_setdelvlan(card, i, IPA_CMD_DELVLAN); + else + qeth_layer2_send_setdelvlan(card, i, IPA_CMD_SETVLAN); + } +} + +/*add_vid is layer 2 used only ....*/ +static void +qeth_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) +{ + struct qeth_card *card; + + QETH_DBF_TEXT_(trace, 4, "aid:%d", vid); + + card = (struct qeth_card *) dev->priv; + if (!card->options.layer2) + return; + qeth_layer2_send_setdelvlan(card, vid, IPA_CMD_SETVLAN); +} + +/*... kill_vid used for both modes*/ +static void qeth_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) { struct qeth_card *card; unsigned long flags; - QETH_DBF_TEXT(trace,4,"vlkilvid"); + QETH_DBF_TEXT_(trace, 4, "kid:%d", vid); card = (struct qeth_card *) dev->priv; /* free all skbs for the vlan device */ @@ -4920,7 +4987,7 @@ card->vlangrp->vlan_devices[vid] = NULL; spin_unlock_irqrestore(&card->vlanlock, flags); if (card->options.layer2) - qeth_layer2_process_vlans(card); + qeth_layer2_send_setdelvlan(card, vid, IPA_CMD_DELVLAN); if ( (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) || (qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD) == 0) ) schedule_work(&card->kernel_thread_starter); @@ -5328,93 +5395,6 @@ return rc; } -#ifdef CONFIG_QETH_VLAN -/* ATT: not a very readable order: bytes count from lower numbers, bits - count from lsb */ -static void -qeth_layer2_set_bit(__u8 *ptr,int i) -{ - ptr[i/8]|=0x80>>(i%8); -} - -static int -qeth_layer2_get_bit(__u8 *ptr,int i) -{ - return (ptr[i/8]&(0x80>>(i%8)))?1:0; -} - -static void -qeth_layer2_takeover_vlans(struct qeth_card *card) -{ - int i; - - QETH_DBF_TEXT(trace, 3, "L2tkvlan"); - /* copy new to current */ - memcpy(&card->vlans_current[0], - &card->vlans_new[0], - VLAN_GROUP_ARRAY_LEN/(8*sizeof(__u8))); - - /* clear new vector */ - memset(&card->vlans_new[0], 0, - VLAN_GROUP_ARRAY_LEN/(8*sizeof(__u8))); - - for (i=0; ivlangrp) && - (card->vlangrp->vlan_devices[i]) ) - qeth_layer2_set_bit(&card->vlans_new[0], i); - } -} - -static void -qeth_layer2_send_setdelvlan(struct qeth_card *card, __u16 i, - enum qeth_ipa_cmds ipacmd) -{ - int rc; - struct qeth_ipa_cmd *cmd; - struct qeth_cmd_buffer *iob; - - QETH_DBF_TEXT(trace, 4, "L2sdvlan"); - iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); - cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); - cmd->data.setdelvlan.vlan_id = i; - - rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); - if (rc) { - PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " - "Continuing\n",i, card->info.if_name, rc); - QETH_DBF_TEXT_(trace, 2, "L2VL%4x", ipacmd); - QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); - QETH_DBF_TEXT_(trace, 2, "err%d", rc); - } -} - -static void -qeth_layer2_register_vlans(struct qeth_card *card) -{ - __u16 i; - - QETH_DBF_TEXT(trace, 3, "L2regvln"); - for (i=0; ivlans_current[0], i)) && - (!qeth_layer2_get_bit(&card->vlans_new[0], i)) ) - qeth_layer2_send_setdelvlan(card, i, IPA_CMD_DELVLAN); - if ( (!qeth_layer2_get_bit(&card->vlans_current[0], i)) && - (qeth_layer2_get_bit(&card->vlans_new[0], i)) ) - qeth_layer2_send_setdelvlan(card, i, IPA_CMD_SETVLAN); - } -} - -static void -qeth_layer2_process_vlans(struct qeth_card *card) -{ - QETH_DBF_TEXT(trace, 2, "L2provln"); - - qeth_layer2_takeover_vlans(card); - qeth_layer2_register_vlans(card); -} - -#endif - static int qeth_layer2_register_addr_entry(struct qeth_card *card, struct qeth_ipaddr *addr) @@ -5575,6 +5555,7 @@ #ifdef CONFIG_QETH_VLAN dev->vlan_rx_register = qeth_vlan_rx_register; dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; + dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; #endif if (qeth_get_netdev_flags(card) & IFF_NOARP) { dev->rebuild_header = NULL; @@ -5596,9 +5577,8 @@ if ((card->options.fake_broadcast) || (card->info.broadcast_capable)) dev->flags |= IFF_BROADCAST; - dev->hard_header_len = - qeth_get_hlen(card->info.link_type) + card->options.add_hhlen; + qeth_get_hlen(card->info.link_type) + card->options.add_hhlen; dev->addr_len = OSA_ADDR_LEN; dev->mtu = card->info.initial_mtu; @@ -6187,7 +6167,10 @@ card->info.if_name, rc); } else { PRINT_INFO("VLAN enabled \n"); - card->dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; + card->dev->features |= + NETIF_F_HW_VLAN_FILTER | + NETIF_F_HW_VLAN_TX | + NETIF_F_HW_VLAN_RX; } #endif /* QETH_VLAN */ return rc; @@ -6559,6 +6542,7 @@ card->lan_online = 1; if (card->options.layer2) { card->dev->features |= + NETIF_F_HW_VLAN_FILTER | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; card->dev->flags|=IFF_MULTICAST|IFF_BROADCAST; @@ -6568,7 +6552,7 @@ return rc; } #ifdef CONFIG_QETH_VLAN - qeth_layer2_process_vlans(card); + qeth_layer2_process_vlans(card, 0); #endif goto out; } @@ -6737,6 +6721,10 @@ card->state = CARD_STATE_SOFTSETUP; } if (card->state == CARD_STATE_SOFTSETUP) { +#ifdef CONFIG_QETH_VLAN + if (card->options.layer2) + qeth_layer2_process_vlans(card, 1); +#endif qeth_clear_ip_list(card, !card->use_hard_stop, recover_flag); qeth_clear_ipacmd_list(card); card->state = CARD_STATE_HARDSETUP; @@ -7019,7 +7007,12 @@ } /*maybe it was set offline without ifconfig down * we can also use this state for recovery purposes*/ - qeth_set_allowed_threads(card, 0xffffffff, 0); + if (card->options.layer2) + qeth_set_allowed_threads(card, + QETH_RECOVER_THREAD | + QETH_SET_MC_THREAD,0); + else + qeth_set_allowed_threads(card, 0xffffffff, 0); if (recover_flag == CARD_STATE_RECOVER) qeth_start_again(card); qeth_notify_processes(); diff -Nru a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c --- a/drivers/scsi/ide-scsi.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/scsi/ide-scsi.c 2004-10-26 18:25:18 -07:00 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -253,17 +254,6 @@ kfree(atapi_buf); } -static inline void idescsi_free_bio (struct bio *bio) -{ - struct bio *bhp; - - while (bio) { - bhp = bio; - bio = bio->bi_next; - bio_put(bhp); - } -} - static void hexdump(u8 *x, int len) { int i; @@ -421,7 +411,6 @@ spin_lock_irqsave(host->host_lock, flags); pc->done(pc->scsi_cmd); spin_unlock_irqrestore(host->host_lock, flags); - idescsi_free_bio(rq->bio); kfree(pc); kfree(rq); scsi->pc = NULL; @@ -585,6 +574,50 @@ return ide_started; } +static inline int idescsi_set_direction(idescsi_pc_t *pc) +{ + switch (pc->c[0]) { + case READ_6: case READ_10: case READ_12: + clear_bit(PC_WRITING, &pc->flags); + return 0; + case WRITE_6: case WRITE_10: case WRITE_12: + set_bit(PC_WRITING, &pc->flags); + return 0; + default: + return 1; + } +} + +static int idescsi_map_sg(ide_drive_t *drive, idescsi_pc_t *pc) +{ + ide_hwif_t *hwif = drive->hwif; + struct scatterlist *sg, *scsi_sg; + int segments; + + if (!pc->request_transfer || pc->request_transfer % 1024) + return 1; + + if (idescsi_set_direction(pc)) + return 1; + + sg = hwif->sg_table; + scsi_sg = pc->scsi_cmd->request_buffer; + segments = pc->scsi_cmd->use_sg; + + if (segments > hwif->sg_max_nents) + return 1; + + if (!segments) { + hwif->sg_nents = 1; + sg_init_one(sg, pc->scsi_cmd->request_buffer, pc->request_transfer); + } else { + hwif->sg_nents = segments; + memcpy(sg, scsi_sg, sizeof(*sg) * segments); + } + + return 0; +} + /* * Issue a packet command */ @@ -594,7 +627,6 @@ ide_hwif_t *hwif = drive->hwif; atapi_feature_t feature; atapi_bcount_t bcount; - struct request *rq = pc->rq; scsi->pc=pc; /* Set the current packet command */ pc->actually_transferred=0; /* We haven't transferred any data yet */ @@ -602,8 +634,11 @@ bcount.all = min(pc->request_transfer, 63 * 1024); /* Request to transfer the entire buffer at once */ feature.all = 0; - if (drive->using_dma && rq->bio) + if (drive->using_dma && !idescsi_map_sg(drive, pc)) { + hwif->sg_mapped = 1; feature.b.dma = !hwif->dma_setup(drive); + hwif->sg_mapped = 0; + } SELECT_DRIVE(drive); if (IDE_CONTROL_REG) @@ -775,81 +810,6 @@ return -EINVAL; } -static inline struct bio *idescsi_kmalloc_bio (int count) -{ - struct bio *bh, *bhp, *first_bh; - - if ((first_bh = bhp = bh = bio_alloc(GFP_ATOMIC, 1)) == NULL) - goto abort; - bio_init(bh); - bh->bi_vcnt = 1; - while (--count) { - if ((bh = bio_alloc(GFP_ATOMIC, 1)) == NULL) - goto abort; - bio_init(bh); - bh->bi_vcnt = 1; - bhp->bi_next = bh; - bhp = bh; - bh->bi_next = NULL; - } - return first_bh; -abort: - idescsi_free_bio (first_bh); - return NULL; -} - -static inline int idescsi_set_direction (idescsi_pc_t *pc) -{ - switch (pc->c[0]) { - case READ_6: case READ_10: case READ_12: - clear_bit (PC_WRITING, &pc->flags); - return 0; - case WRITE_6: case WRITE_10: case WRITE_12: - set_bit (PC_WRITING, &pc->flags); - return 0; - default: - return 1; - } -} - -static inline struct bio *idescsi_dma_bio(ide_drive_t *drive, idescsi_pc_t *pc) -{ - struct bio *bh = NULL, *first_bh = NULL; - int segments = pc->scsi_cmd->use_sg; - struct scatterlist *sg = pc->scsi_cmd->request_buffer; - - if (!drive->using_dma || !pc->request_transfer || pc->request_transfer % 1024) - return NULL; - if (idescsi_set_direction(pc)) - return NULL; - if (segments) { - if ((first_bh = bh = idescsi_kmalloc_bio (segments)) == NULL) - return NULL; -#if IDESCSI_DEBUG_LOG - printk ("ide-scsi: %s: building DMA table, %d segments, %dkB total\n", drive->name, segments, pc->request_transfer >> 10); -#endif /* IDESCSI_DEBUG_LOG */ - while (segments--) { - bh->bi_io_vec[0].bv_page = sg->page; - bh->bi_io_vec[0].bv_len = sg->length; - bh->bi_io_vec[0].bv_offset = sg->offset; - bh->bi_size = sg->length; - bh = bh->bi_next; - sg++; - } - } else { - if ((first_bh = bh = idescsi_kmalloc_bio (1)) == NULL) - return NULL; -#if IDESCSI_DEBUG_LOG - printk ("ide-scsi: %s: building DMA table for a single buffer (%dkB)\n", drive->name, pc->request_transfer >> 10); -#endif /* IDESCSI_DEBUG_LOG */ - bh->bi_io_vec[0].bv_page = virt_to_page(pc->scsi_cmd->request_buffer); - bh->bi_io_vec[0].bv_offset = offset_in_page(pc->scsi_cmd->request_buffer); - bh->bi_io_vec[0].bv_len = pc->request_transfer; - bh->bi_size = pc->request_transfer; - } - return first_bh; -} - static inline int should_transform(ide_drive_t *drive, struct scsi_cmnd *cmd) { idescsi_scsi_t *scsi = drive_to_idescsi(drive); @@ -921,7 +881,6 @@ ide_init_drive_cmd (rq); rq->special = (char *) pc; - rq->bio = idescsi_dma_bio (drive, pc); rq->flags = REQ_SPECIAL; spin_unlock_irq(host->host_lock); (void) ide_do_drive_cmd (drive, rq, ide_end); @@ -975,7 +934,6 @@ */ printk (KERN_ERR "ide-scsi: cmd aborted!\n"); - idescsi_free_bio(scsi->pc->rq->bio); if (scsi->pc->rq->flags & REQ_SENSE) kfree(scsi->pc->buffer); kfree(scsi->pc->rq); @@ -1024,7 +982,6 @@ /* kill current request */ blkdev_dequeue_request(req); end_that_request_last(req); - idescsi_free_bio(req->bio); if (req->flags & REQ_SENSE) kfree(scsi->pc->buffer); kfree(scsi->pc); diff -Nru a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c --- a/drivers/scsi/libata-scsi.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/scsi/libata-scsi.c 2004-10-26 18:25:17 -07:00 @@ -97,7 +97,7 @@ return 0; default: - rc = -EOPNOTSUPP; + rc = -ENOTTY; break; } diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c --- a/drivers/scsi/megaraid.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/scsi/megaraid.c 2004-10-26 18:25:17 -07:00 @@ -4006,7 +4006,7 @@ mbox->m_out.xferaddr = (u32)adapter->buf_dma_handle; /* - * Non-ROMB firware fail this command, so all channels + * Non-ROMB firmware fail this command, so all channels * must be shown RAID */ adapter->mega_ch_class = 0xFF; diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c --- a/drivers/serial/8250.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/serial/8250.c 2004-10-26 18:25:17 -07:00 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -41,7 +42,6 @@ #endif #include -#include "8250.h" /* * Configuration: @@ -112,11 +112,17 @@ #define SERIAL_PORT_DFNS #endif +#ifndef ARCH_HAS_GET_LEGACY_SERIAL_PORTS static struct old_serial_port old_serial_port[] = { SERIAL_PORT_DFNS /* defined in asm/serial.h */ }; - +static inline struct old_serial_port *get_legacy_serial_ports(unsigned int *count) +{ + *count = ARRAY_SIZE(old_serial_port); + return old_serial_port; +} #define UART_NR (ARRAY_SIZE(old_serial_port) + CONFIG_SERIAL_8250_NR_UARTS) +#endif /* ARCH_HAS_DYNAMIC_LEGACY_SERIAL_PORTS */ #ifdef CONFIG_SERIAL_8250_RSA @@ -1958,22 +1964,27 @@ { struct uart_8250_port *up; static int first = 1; + struct old_serial_port *old_ports; + int count; int i; if (!first) return; first = 0; - for (i = 0, up = serial8250_ports; i < ARRAY_SIZE(old_serial_port); - i++, up++) { - up->port.iobase = old_serial_port[i].port; - up->port.irq = irq_canonicalize(old_serial_port[i].irq); - up->port.uartclk = old_serial_port[i].baud_base * 16; - up->port.flags = old_serial_port[i].flags; - up->port.hub6 = old_serial_port[i].hub6; - up->port.membase = old_serial_port[i].iomem_base; - up->port.iotype = old_serial_port[i].io_type; - up->port.regshift = old_serial_port[i].iomem_reg_shift; + old_ports = get_legacy_serial_ports(&count); + if (old_ports == NULL) + return; + + for (i = 0, up = serial8250_ports; i < count; i++, up++) { + up->port.iobase = old_ports[i].port; + up->port.irq = irq_canonicalize(old_ports[i].irq); + up->port.uartclk = old_ports[i].baud_base * 16; + up->port.flags = old_ports[i].flags; + up->port.hub6 = old_ports[i].hub6; + up->port.membase = old_ports[i].iomem_base; + up->port.iotype = old_ports[i].io_type; + up->port.regshift = old_ports[i].iomem_reg_shift; up->port.ops = &serial8250_pops; if (share_irqs) up->port.flags |= UPF_SHARE_IRQ; diff -Nru a/drivers/serial/8250.h b/drivers/serial/8250.h --- a/drivers/serial/8250.h 2004-10-26 18:25:17 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,75 +0,0 @@ -/* - * linux/drivers/char/8250.h - * - * Driver for 8250/16550-type serial ports - * - * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o. - * - * Copyright (C) 2001 Russell King. - * - * 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. - * - * $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $ - */ - -#include - -int serial8250_register_port(struct uart_port *); -void serial8250_unregister_port(int line); -void serial8250_get_irq_map(unsigned int *map); -void serial8250_suspend_port(int line); -void serial8250_resume_port(int line); - -struct old_serial_port { - unsigned int uart; - unsigned int baud_base; - unsigned int port; - unsigned int irq; - unsigned int flags; - unsigned char hub6; - unsigned char io_type; - unsigned char *iomem_base; - unsigned short iomem_reg_shift; -}; - -/* - * This replaces serial_uart_config in include/linux/serial.h - */ -struct serial8250_config { - const char *name; - unsigned short fifo_size; - unsigned short tx_loadsz; - unsigned char fcr; - unsigned int flags; -}; - -#define UART_CAP_FIFO (1 << 8) /* UART has FIFO */ -#define UART_CAP_EFR (1 << 9) /* UART has EFR */ -#define UART_CAP_SLEEP (1 << 10) /* UART has IER sleep */ -#define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */ - -#undef SERIAL_DEBUG_PCI - -#if defined(__i386__) && (defined(CONFIG_M386) || defined(CONFIG_M486)) -#define SERIAL_INLINE -#endif - -#ifdef SERIAL_INLINE -#define _INLINE_ inline -#else -#define _INLINE_ -#endif - -#define PROBE_RSA (1 << 0) -#define PROBE_ANY (~0) - -#define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8) - -#ifdef CONFIG_SERIAL_8250_SHARE_IRQ -#define SERIAL8250_SHARE_IRQS 1 -#else -#define SERIAL8250_SHARE_IRQS 0 -#endif diff -Nru a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c --- a/drivers/serial/8250_pci.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/serial/8250_pci.c 2004-10-26 18:25:18 -07:00 @@ -23,13 +23,13 @@ #include #include #include -#include #include +#include +#include #include #include -#include "8250.h" /* * Definitions for PCI support. diff -Nru a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c --- a/drivers/serial/8250_pnp.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/serial/8250_pnp.c 2004-10-26 18:25:17 -07:00 @@ -26,11 +26,10 @@ #include #include #include +#include #include #include - -#include "8250.h" #define UNKNOWN_DEV 0x3000 diff -Nru a/drivers/serial/au1x00_uart.c b/drivers/serial/au1x00_uart.c --- a/drivers/serial/au1x00_uart.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/serial/au1x00_uart.c 2004-10-26 18:25:17 -07:00 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,6 @@ #endif #include -#include "8250.h" /* * Debugging. diff -Nru a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c --- a/drivers/serial/serial_cs.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/serial/serial_cs.c 2004-10-26 18:25:18 -07:00 @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -54,8 +55,6 @@ #include #include #include - -#include "8250.h" #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; diff -Nru a/drivers/usb/Kconfig b/drivers/usb/Kconfig --- a/drivers/usb/Kconfig 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/Kconfig 2004-10-26 18:25:17 -07:00 @@ -7,7 +7,7 @@ # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface. config USB tristate "Support for Host-side USB" - depends on PCI || SA1111 || ARCH_OMAP1510 || ARCH_OMAP1610 || ARCH_LH7A404 || PXA27x + depends on USB_ARCH_HAS_HCD ---help--- Universal Serial Bus (USB) is a specification for a serial bus subsystem which offers higher speeds and more features than the diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c --- a/drivers/usb/class/audio.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/usb/class/audio.c 2004-10-26 18:25:19 -07:00 @@ -3119,12 +3119,18 @@ { struct usb_device *dev = state->s->usbdev; struct mixerchannel *ch; - unsigned char buf[2]; + unsigned char *buf; __s16 v1; unsigned int v2, v3; if (!state->nrmixch || state->nrmixch > SOUND_MIXER_NRDEVICES) return; + buf = kmalloc(sizeof(*buf) * 2, GFP_KERNEL); + if (!buf) { + printk(KERN_ERR "prepmixch: out of memory\n") ; + return; + } + ch = &state->mixch[state->nrmixch-1]; switch (ch->selector) { case 0: /* mixer unit request */ @@ -3236,13 +3242,16 @@ default: goto err; } - return; + freebuf: + kfree(buf); + return; err: printk(KERN_ERR "usbaudio: mixer request device %u if %u unit %u ch %u selector %u failed\n", dev->devnum, state->ctrlif, ch->unitid, ch->chnum, ch->selector); if (state->nrmixch) state->nrmixch--; + goto freebuf; } diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c --- a/drivers/usb/class/usblp.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/class/usblp.c 2004-10-26 18:25:17 -07:00 @@ -222,6 +222,7 @@ /* forward reference to make our lives easier */ static struct usb_driver usblp_driver; +static DECLARE_MUTEX(usblp_sem); /* locks the existence of usblp's */ /* * Functions for usblp control messages. @@ -343,7 +344,7 @@ if (minor < 0) return -ENODEV; - lock_kernel(); + down (&usblp_sem); retval = -ENODEV; intf = usb_find_interface(&usblp_driver, minor); @@ -389,7 +390,7 @@ } } out: - unlock_kernel(); + up (&usblp_sem); return retval; } @@ -415,13 +416,13 @@ { struct usblp *usblp = file->private_data; - down (&usblp->sem); + down (&usblp_sem); usblp->used = 0; if (usblp->present) { usblp_unlink_urbs(usblp); - up(&usblp->sem); } else /* finish cleanup from disconnect */ usblp_cleanup (usblp); + up (&usblp_sem); return 0; } @@ -1149,8 +1150,8 @@ BUG (); } + down (&usblp_sem); down (&usblp->sem); - lock_kernel(); usblp->present = 0; usb_set_intfdata (intf, NULL); @@ -1159,12 +1160,11 @@ usblp->writebuf, usblp->writeurb->transfer_dma); usb_buffer_free (usblp->dev, USBLP_BUF_SIZE, usblp->readbuf, usblp->readurb->transfer_dma); + up (&usblp->sem); if (!usblp->used) usblp_cleanup (usblp); - else /* cleanup later, on release */ - up (&usblp->sem); - unlock_kernel(); + up (&usblp_sem); } static struct usb_device_id usblp_ids [] = { diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/core/hub.c 2004-10-26 18:25:18 -07:00 @@ -56,6 +56,31 @@ module_param (blinkenlights, bool, S_IRUGO); MODULE_PARM_DESC (blinkenlights, "true to cycle leds on hubs"); +/* + * As of 2.6.10 we introduce a new USB device initialization scheme which + * closely resembles the way Windows works. Hopefully it will be compatible + * with a wider range of devices than the old scheme. However some previously + * working devices may start giving rise to "device not accepting address" + * errors; if that happens the user can try the old scheme by adjusting the + * following module parameters. + * + * For maximum flexibility there are two boolean parameters to control the + * hub driver's behavior. On the first initialization attempt, if the + * "old_scheme_first" parameter is set then the old scheme will be used, + * otherwise the new scheme is used. If that fails and "use_both_schemes" + * is set, then the driver will make another attempt, using the other scheme. + */ +static int old_scheme_first = 0; +module_param(old_scheme_first, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(old_scheme_first, + "start with the old device initialization scheme"); + +static int use_both_schemes = 0; +module_param(use_both_schemes, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(use_both_schemes, + "try the other device initialization scheme if the " + "first one fails"); + #ifdef DEBUG static inline char *portspeed (int portstatus) @@ -78,9 +103,17 @@ /* USB 2.0 spec Section 11.24.4.5 */ static int get_hub_descriptor(struct usb_device *hdev, void *data, int size) { - return usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), - USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB, - USB_DT_HUB << 8, 0, data, size, HZ * USB_CTRL_GET_TIMEOUT); + int i, ret; + + for (i = 0; i < 3; i++) { + ret = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB, + USB_DT_HUB << 8, 0, data, size, + HZ * USB_CTRL_GET_TIMEOUT); + if (ret >= (USB_DT_HUB_NONVAR_SIZE + 2)) + return ret; + } + return -EINVAL; } /* @@ -641,6 +674,7 @@ hub->indicator [0] = INDICATOR_CYCLE; hub_power_on(hub); + hub->change_bits[0] = ~0; hub_activate(hub); return 0; @@ -1265,7 +1299,8 @@ #define PORT_RESET_TRIES 5 #define SET_ADDRESS_TRIES 2 #define GET_DESCRIPTOR_TRIES 2 -#define SET_CONFIG_TRIES 2 +#define SET_CONFIG_TRIES (2 * (use_both_schemes + 1)) +#define USE_NEW_SCHEME(i) ((i) / 2 == old_scheme_first) #define HUB_ROOT_RESET_TIME 50 /* times are in msec */ #define HUB_SHORT_RESET_TIME 10 @@ -1983,20 +2018,30 @@ return portstatus; } +#define usb_sndaddr0pipe() (PIPE_CONTROL << 30) +#define usb_rcvaddr0pipe() ((PIPE_CONTROL << 30) | USB_DIR_IN) + static int hub_set_address(struct usb_device *udev) { int retval; if (udev->devnum == 0) return -EINVAL; - if (udev->state != USB_STATE_DEFAULT && - udev->state != USB_STATE_ADDRESS) + if (udev->state == USB_STATE_ADDRESS) + return 0; + if (udev->state != USB_STATE_DEFAULT) return -EINVAL; - retval = usb_control_msg(udev, (PIPE_CONTROL << 30) /* Address 0 */, + retval = usb_control_msg(udev, usb_sndaddr0pipe(), USB_REQ_SET_ADDRESS, 0, udev->devnum, 0, NULL, 0, HZ * USB_CTRL_SET_TIMEOUT); - if (retval == 0) + if (retval == 0) { + int m = udev->epmaxpacketin[0]; + usb_set_device_state(udev, USB_STATE_ADDRESS); + usb_disable_endpoint(udev, 0 + USB_DIR_IN); + usb_disable_endpoint(udev, 0 + USB_DIR_OUT); + udev->epmaxpacketin[0] = udev->epmaxpacketout[0] = m; + } return retval; } @@ -2010,7 +2055,8 @@ * pointers, it's not necessary to lock the device. */ static int -hub_port_init (struct usb_device *hdev, struct usb_device *udev, int port) +hub_port_init (struct usb_device *hdev, struct usb_device *udev, int port, + int retry_counter) { static DECLARE_MUTEX(usb_address0_sem); @@ -2049,6 +2095,7 @@ dev_dbg(&udev->dev, "device reset changed speed!\n"); goto fail; } + oldspeed = udev->speed; /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... * it's fixed size except for full speed devices. @@ -2058,22 +2105,22 @@ i = 64; break; case USB_SPEED_FULL: /* 8, 16, 32, or 64 */ - /* to determine the ep0 maxpacket size, read the first 8 - * bytes from the device descriptor to get bMaxPacketSize0; - * then correct our initial (small) guess. + /* to determine the ep0 maxpacket size, try to read + * the device descriptor to get bMaxPacketSize0 and + * then correct our initial guess. */ - // FALLTHROUGH + i = 64; + break; case USB_SPEED_LOW: /* fixed at 8 */ i = 8; break; default: goto fail; } - udev->epmaxpacketin [0] = i; - udev->epmaxpacketout[0] = i; + udev->epmaxpacketin[0] = udev->epmaxpacketout[0] = i; dev_info (&udev->dev, - "%s %s speed USB device using address %d\n", + "%s %s speed USB device using %s and address %d\n", (udev->config) ? "reset" : "new", ({ char *speed; switch (udev->speed) { case USB_SPEED_LOW: speed = "low"; break; @@ -2081,6 +2128,7 @@ case USB_SPEED_HIGH: speed = "high"; break; default: speed = "?"; break; }; speed;}), + udev->bus->controller->driver->name, udev->devnum); /* Set up TT records, if needed */ @@ -2101,11 +2149,59 @@ * this area, and this is how Linux has done it for ages. * Change it cautiously. * - * NOTE: Windows gets the descriptor first, seemingly to help - * work around device bugs like "can't use addresses with bit 3 - * set in certain configurations". Yes, really. - */ - for (i = 0; i < GET_DESCRIPTOR_TRIES; ++i) { + * NOTE: If USE_NEW_SCHEME() is true we will start by issuing + * a 64-byte GET_DESCRIPTOR request. This is what Windows does, + * so it may help with some non-standards-compliant devices. + * Otherwise we start with SET_ADDRESS and then try to read the + * first 8 bytes of the device descriptor to get the ep0 maxpacket + * value. + */ + for (i = 0; i < GET_DESCRIPTOR_TRIES; (++i, msleep(100))) { + if (USE_NEW_SCHEME(retry_counter)) { + struct usb_device_descriptor *buf; + +#define GET_DESCRIPTOR_BUFSIZE 64 + buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO); + if (!buf) { + retval = -ENOMEM; + continue; + } + buf->bMaxPacketSize0 = 0; + + /* Use a short timeout the first time through, + * so that recalcitrant full-speed devices with + * 8- or 16-byte ep0-maxpackets won't slow things + * down tremendously by NAKing the unexpectedly + * early status stage. + */ + j = usb_control_msg(udev, usb_rcvaddr0pipe(), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, + USB_DT_DEVICE << 8, 0, + buf, GET_DESCRIPTOR_BUFSIZE, + (i ? HZ * USB_CTRL_GET_TIMEOUT : HZ)); + udev->descriptor.bMaxPacketSize0 = + buf->bMaxPacketSize0; + kfree(buf); + + retval = hub_port_reset(hdev, port, udev, delay); + if (retval < 0) /* error or disconnect */ + goto fail; + if (oldspeed != udev->speed) { + dev_dbg(&udev->dev, + "device reset changed speed!\n"); + retval = -ENODEV; + goto fail; + } + if (udev->descriptor.bMaxPacketSize0 == 0) { + dev_err(&udev->dev, "device descriptor " + "read/%s, error %d\n", + "64", j); + retval = -EMSGSIZE; + continue; + } +#undef GET_DESCRIPTOR_BUFSIZE + } + for (j = 0; j < SET_ADDRESS_TRIES; ++j) { retval = hub_set_address(udev); if (retval >= 0) @@ -2124,25 +2220,31 @@ * - read ep0 maxpacket even for high and low speed, */ msleep(10); + if (USE_NEW_SCHEME(retry_counter)) + break; + retval = usb_get_device_descriptor(udev, 8); - if (retval >= 8) + if (retval < 8) { + dev_err(&udev->dev, "device descriptor " + "read/%s, error %d\n", + "8", retval); + if (retval >= 0) + retval = -EMSGSIZE; + } else { + retval = 0; break; - msleep(100); + } } - if (retval != 8) { - dev_err(&udev->dev, "device descriptor read/%s, error %d\n", - "8", retval); - if (retval >= 0) - retval = -EMSGSIZE; + if (retval) goto fail; - } - if (udev->speed == USB_SPEED_FULL - && (udev->epmaxpacketin [0] - != udev->descriptor.bMaxPacketSize0)) { + + /* Should we verify that the value is valid? */ + i = udev->descriptor.bMaxPacketSize0; + dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i); + if (udev->epmaxpacketin[0] != i) { usb_disable_endpoint(udev, 0 + USB_DIR_IN); usb_disable_endpoint(udev, 0 + USB_DIR_OUT); - udev->epmaxpacketin [0] = udev->descriptor.bMaxPacketSize0; - udev->epmaxpacketout[0] = udev->descriptor.bMaxPacketSize0; + udev->epmaxpacketin[0] = udev->epmaxpacketout[0] = i; } retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE); @@ -2312,7 +2414,7 @@ } /* reset and get descriptor */ - status = hub_port_init(hdev, udev, port); + status = hub_port_init(hdev, udev, port, i); if (status < 0) goto loop; @@ -2732,7 +2834,7 @@ { struct usb_device *parent = udev->parent; struct usb_device_descriptor descriptor = udev->descriptor; - int i, ret, port = -1; + int i, ret = 0, port = -1; int udev_is_a_hub = 0; if (udev->state == USB_STATE_NOTATTACHED || @@ -2768,12 +2870,16 @@ hub_pre_reset(udev); } - /* ep0 maxpacket size may change; let the HCD know about it. - * Other endpoints will be handled by re-enumeration. */ - usb_disable_endpoint(udev, 0); - usb_disable_endpoint(udev, 0 + USB_DIR_IN); + for (i = 0; i < SET_CONFIG_TRIES; ++i) { - ret = hub_port_init(parent, udev, port); + /* ep0 maxpacket size may change; let the HCD know about it. + * Other endpoints will be handled by re-enumeration. */ + usb_disable_endpoint(udev, 0 + USB_DIR_IN); + usb_disable_endpoint(udev, 0 + USB_DIR_OUT); + ret = hub_port_init(parent, udev, port, i); + if (ret >= 0) + break; + } if (ret < 0) goto re_enumerate; diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c --- a/drivers/usb/core/message.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/core/message.c 2004-10-26 18:25:17 -07:00 @@ -823,9 +823,19 @@ */ int usb_get_status(struct usb_device *dev, int type, int target, void *data) { - return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), - USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, data, 2, - HZ * USB_CTRL_GET_TIMEOUT); + int ret; + u16 *status = kmalloc(sizeof(*status), GFP_KERNEL); + + if (!status) + return -ENOMEM; + + ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, status, + sizeof(*status), HZ * USB_CTRL_GET_TIMEOUT); + + *(u16 *)data = *status; + kfree(status); + return ret; } /** diff -Nru a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c --- a/drivers/usb/core/urb.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/core/urb.c 2004-10-26 18:25:18 -07:00 @@ -264,11 +264,10 @@ max = usb_maxpacket (dev, pipe, is_out); if (max <= 0) { - dbg ("%s: bogus endpoint %d-%s on usb-%s-%s (bad maxpacket %d)", - __FUNCTION__, - usb_pipeendpoint (pipe), is_out ? "OUT" : "IN", - dev->bus->bus_name, dev->devpath, - max); + dev_dbg(&dev->dev, + "bogus endpoint ep%d%s in %s (bad maxpacket %d)", + usb_pipeendpoint (pipe), is_out ? "out" : "in", + __FUNCTION__, max); return -EMSGSIZE; } diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/core/usb.c 2004-10-26 18:25:18 -07:00 @@ -550,9 +550,7 @@ return 0; intf = to_usb_interface(dev); - usb_drv = to_usb_driver(drv); - id = usb_drv->id_table; id = usb_match_id (intf, usb_drv->id_table); if (id) @@ -765,6 +763,7 @@ if (dev->bus->op->allocate) if (dev->bus->op->allocate(dev)) { + usb_bus_put(bus); kfree(dev); return NULL; } diff -Nru a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c --- a/drivers/usb/gadget/ether.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/usb/gadget/ether.c 2004-10-26 18:25:19 -07:00 @@ -2320,7 +2320,7 @@ } else if (gadget_is_lh7a40x(gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209); } else if (gadget_is_n9604(gadget)) { - device_desc.bcdDevice = __constant_cpu_to_le16 (0x020a); + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0210); } else { /* can't assume CDC works. don't want to default to * anything less functional on CDC-capable hardware, diff -Nru a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c --- a/drivers/usb/gadget/file_storage.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/usb/gadget/file_storage.c 2004-10-26 18:25:19 -07:00 @@ -250,7 +250,7 @@ #define DRIVER_DESC "File-backed Storage Gadget" #define DRIVER_NAME "g_file_storage" -#define DRIVER_VERSION "31 August 2004" +#define DRIVER_VERSION "20 October 2004" static const char longname[] = DRIVER_DESC; static const char shortname[] = DRIVER_NAME; @@ -430,9 +430,9 @@ /* Command Block Wrapper */ struct bulk_cb_wrap { - u32 Signature; // Contains 'USBC' + __le32 Signature; // Contains 'USBC' u32 Tag; // Unique per command id - u32 DataTransferLength; // Size of the data + __le32 DataTransferLength; // Size of the data u8 Flags; // Direction in bit 7 u8 Lun; // LUN (normally 0) u8 Length; // Of the CDB, <= MAX_COMMAND_SIZE @@ -445,9 +445,9 @@ /* Command Status Wrapper */ struct bulk_cs_wrap { - u32 Signature; // Should = 'USBS' + __le32 Signature; // Should = 'USBS' u32 Tag; // Same as original command - u32 Residue; // Amount not transferred + __le32 Residue; // Amount not transferred u8 Status; // See below }; @@ -3717,30 +3717,30 @@ if (mod_data.release == 0xffff) { // Parameter wasn't set if (gadget_is_net2280(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0301); + mod_data.release = 0x0301; else if (gadget_is_dummy(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0302); + mod_data.release = 0x0302; else if (gadget_is_pxa(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0303); + mod_data.release = 0x0303; else if (gadget_is_sh(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0304); + mod_data.release = 0x0304; /* The sa1100 controller is not supported */ else if (gadget_is_goku(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0306); + mod_data.release = 0x0306; else if (gadget_is_mq11xx(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0307); + mod_data.release = 0x0307; else if (gadget_is_omap(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16(0x0308); + mod_data.release = 0x0308; else if (gadget_is_lh7a40x(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16 (0x0309); + mod_data.release = 0x0309; else if (gadget_is_n9604(fsg->gadget)) - mod_data.release = __constant_cpu_to_le16 (0x030a); + mod_data.release = 0x0310; else { WARN(fsg, "controller '%s' not recognized\n", fsg->gadget->name); - mod_data.release = __constant_cpu_to_le16(0x0399); + mod_data.release = 0x0399; } } diff -Nru a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c --- a/drivers/usb/gadget/goku_udc.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/gadget/goku_udc.c 2004-10-26 18:25:17 -07:00 @@ -90,7 +90,7 @@ static void nuke(struct goku_ep *, int status); static inline void -command(struct goku_udc_regs *regs, int command, unsigned epnum) +command(struct goku_udc_regs __iomem *regs, int command, unsigned epnum) { writel(COMMAND_EP(epnum) | command, ®s->Command); udelay(300); @@ -161,8 +161,8 @@ /* ep1 and ep2 can do double buffering and/or dma */ if (ep->num < 3) { - struct goku_udc_regs *regs = ep->dev->regs; - u32 tmp; + struct goku_udc_regs __iomem *regs = ep->dev->regs; + u32 tmp; /* double buffer except (for now) with pio in */ tmp = ((ep->dma || !ep->is_in) @@ -191,7 +191,7 @@ return 0; } -static void ep_reset(struct goku_udc_regs *regs, struct goku_ep *ep) +static void ep_reset(struct goku_udc_regs __iomem *regs, struct goku_ep *ep) { struct goku_udc *dev = ep->dev; @@ -209,16 +209,16 @@ writel(dev->int_enable, ®s->int_enable); readl(®s->int_enable); if (ep->num < 3) { - struct goku_udc_regs *regs = ep->dev->regs; - u32 tmp; + struct goku_udc_regs __iomem *r = ep->dev->regs; + u32 tmp; - tmp = readl(®s->EPxSingle); + tmp = readl(&r->EPxSingle); tmp &= ~(0x11 << ep->num); - writel(tmp, ®s->EPxSingle); + writel(tmp, &r->EPxSingle); - tmp = readl(®s->EPxBCS); + tmp = readl(&r->EPxBCS); tmp &= ~(0x11 << ep->num); - writel(tmp, ®s->EPxBCS); + writel(tmp, &r->EPxBCS); } /* reset dma in case we're still using it */ if (ep->dma) { @@ -237,7 +237,7 @@ } ep->ep.maxpacket = MAX_FIFO_SIZE; - ep->desc = 0; + ep->desc = NULL; ep->stopped = 1; ep->irqs = 0; ep->dma = 0; @@ -274,10 +274,10 @@ struct goku_request *req; if (!_ep) - return 0; + return NULL; req = kmalloc(sizeof *req, gfp_flags); if (!req) - return 0; + return NULL; memset(req, 0, sizeof *req); req->req.dma = DMA_ADDR_INVALID; @@ -334,7 +334,7 @@ ep = container_of(_ep, struct goku_ep, ep); if (!_ep) - return 0; + return NULL; *dma = DMA_ADDR_INVALID; #if defined(USE_KMALLOC) @@ -413,7 +413,7 @@ /*-------------------------------------------------------------------------*/ static inline int -write_packet(u32 *fifo, u8 *buf, struct goku_request *req, unsigned max) +write_packet(u32 __iomem *fifo, u8 *buf, struct goku_request *req, unsigned max) { unsigned length, count; @@ -488,10 +488,10 @@ static int read_fifo(struct goku_ep *ep, struct goku_request *req) { - struct goku_udc_regs *regs; - u32 size, set; - u8 *buf; - unsigned bufferspace, is_short, dbuff; + struct goku_udc_regs __iomem *regs; + u32 size, set; + u8 *buf; + unsigned bufferspace, is_short, dbuff; regs = ep->dev->regs; top: @@ -581,7 +581,8 @@ } static inline void -pio_irq_enable(struct goku_udc *dev, struct goku_udc_regs *regs, int epnum) +pio_irq_enable(struct goku_udc *dev, + struct goku_udc_regs __iomem *regs, int epnum) { dev->int_enable |= INT_EPxDATASET (epnum); writel(dev->int_enable, ®s->int_enable); @@ -589,7 +590,8 @@ } static inline void -pio_irq_disable(struct goku_udc *dev, struct goku_udc_regs *regs, int epnum) +pio_irq_disable(struct goku_udc *dev, + struct goku_udc_regs __iomem *regs, int epnum) { dev->int_enable &= ~INT_EPxDATASET (epnum); writel(dev->int_enable, ®s->int_enable); @@ -613,10 +615,10 @@ // return: 0 = q running, 1 = q stopped, negative = errno static int start_dma(struct goku_ep *ep, struct goku_request *req) { - struct goku_udc_regs *regs = ep->dev->regs; - u32 master; - u32 start = req->req.dma; - u32 end = start + req->req.length - 1; + struct goku_udc_regs __iomem *regs = ep->dev->regs; + u32 master; + u32 start = req->req.dma; + u32 end = start + req->req.length - 1; master = readl(®s->dma_master) & MST_RW_BITS; @@ -668,9 +670,9 @@ static void dma_advance(struct goku_udc *dev, struct goku_ep *ep) { - struct goku_request *req; - struct goku_udc_regs *regs = ep->dev->regs; - u32 master; + struct goku_request *req; + struct goku_udc_regs __iomem *regs = ep->dev->regs; + u32 master; master = readl(®s->dma_master); @@ -716,9 +718,9 @@ static void abort_dma(struct goku_ep *ep, int status) { - struct goku_udc_regs *regs = ep->dev->regs; - struct goku_request *req; - u32 curr, master; + struct goku_udc_regs __iomem *regs = ep->dev->regs; + struct goku_request *req; + u32 curr, master; /* NAK future host requests, hoping the implicit delay lets the * dma engine finish reading (or writing) its latest packet and @@ -848,7 +850,7 @@ if (unlikely(status != 0)) { if (status > 0) status = 0; - req = 0; + req = NULL; } } /* else pio or dma irq handler advances the queue. */ @@ -927,7 +929,7 @@ } else if (!list_empty(&req->queue)) done(ep, req, -ECONNRESET); else - req = 0; + req = NULL; spin_unlock_irqrestore(&dev->lock, flags); return req ? 0 : -EOPNOTSUPP; @@ -984,7 +986,8 @@ retval = -EAGAIN; else if (ep->is_in && value /* data in (either) packet buffer? */ - && (ep->dev->regs->DataSet & DATASET_AB(ep->num))) + && (readl(&ep->dev->regs->DataSet) + & DATASET_AB(ep->num))) retval = -EAGAIN; else if (!value) goku_clear_halt(ep); @@ -1000,9 +1003,9 @@ static int goku_fifo_status(struct usb_ep *_ep) { - struct goku_ep *ep; - struct goku_udc_regs *regs; - u32 size; + struct goku_ep *ep; + struct goku_udc_regs __iomem *regs; + u32 size; if (!_ep) return -ENODEV; @@ -1022,9 +1025,9 @@ static void goku_fifo_flush(struct usb_ep *_ep) { - struct goku_ep *ep; - struct goku_udc_regs *regs; - u32 size; + struct goku_ep *ep; + struct goku_udc_regs __iomem *regs; + u32 size; if (!_ep) return; @@ -1141,14 +1144,14 @@ udc_proc_read(char *buffer, char **start, off_t off, int count, int *eof, void *_dev) { - char *buf = buffer; - struct goku_udc *dev = _dev; - struct goku_udc_regs *regs = dev->regs; - char *next = buf; - unsigned size = count; - unsigned long flags; - int i, t, is_usb_connected; - u32 tmp; + char *buf = buffer; + struct goku_udc *dev = _dev; + struct goku_udc_regs __iomem *regs = dev->regs; + char *next = buf; + unsigned size = count; + unsigned long flags; + int i, t, is_usb_connected; + u32 tmp; if (off != 0) return 0; @@ -1336,17 +1339,17 @@ ep->dev = dev; INIT_LIST_HEAD (&ep->queue); - ep_reset(0, ep); + ep_reset(NULL, ep); } - dev->ep[0].reg_mode = 0; + dev->ep[0].reg_mode = NULL; dev->ep[0].ep.maxpacket = MAX_EP0_SIZE; list_del_init (&dev->ep[0].ep.ep_list); } static void udc_reset(struct goku_udc *dev) { - struct goku_udc_regs *regs = dev->regs; + struct goku_udc_regs __iomem *regs = dev->regs; writel(0, ®s->power_detect); writel(0, ®s->int_enable); @@ -1363,8 +1366,8 @@ static void ep0_start(struct goku_udc *dev) { - struct goku_udc_regs *regs = dev->regs; - unsigned i; + struct goku_udc_regs __iomem *regs = dev->regs; + unsigned i; VDBG(dev, "%s\n", __FUNCTION__); @@ -1441,15 +1444,15 @@ return -EBUSY; /* hook up the driver */ - driver->driver.bus = 0; + driver->driver.bus = NULL; dev->driver = driver; dev->gadget.dev.driver = &driver->driver; retval = driver->bind(&dev->gadget); if (retval) { DBG(dev, "bind to driver %s --> error %d\n", driver->driver.name, retval); - dev->driver = 0; - dev->gadget.dev.driver = 0; + dev->driver = NULL; + dev->gadget.dev.driver = NULL; return retval; } @@ -1471,7 +1474,7 @@ DBG (dev, "%s\n", __FUNCTION__); if (dev->gadget.speed == USB_SPEED_UNKNOWN) - driver = 0; + driver = NULL; /* disconnect gadget driver after quiesceing hw and the driver */ udc_reset (dev); @@ -1498,7 +1501,7 @@ return -EINVAL; spin_lock_irqsave(&dev->lock, flags); - dev->driver = 0; + dev->driver = NULL; stop_activity(dev, driver); spin_unlock_irqrestore(&dev->lock, flags); @@ -1514,9 +1517,9 @@ static void ep0_setup(struct goku_udc *dev) { - struct goku_udc_regs *regs = dev->regs; - struct usb_ctrlrequest ctrl; - int tmp; + struct goku_udc_regs __iomem *regs = dev->regs; + struct usb_ctrlrequest ctrl; + int tmp; /* read SETUP packet and enter DATA stage */ ctrl.bRequestType = readl(®s->bRequestType); @@ -1623,11 +1626,11 @@ static irqreturn_t goku_irq(int irq, void *_dev, struct pt_regs *r) { - struct goku_udc *dev = _dev; - struct goku_udc_regs *regs = dev->regs; - struct goku_ep *ep; - u32 stat, handled = 0; - unsigned i, rescans = 5; + struct goku_udc *dev = _dev; + struct goku_udc_regs __iomem *regs = dev->regs; + struct goku_ep *ep; + u32 stat, handled = 0; + unsigned i, rescans = 5; spin_lock(&dev->lock); @@ -1645,7 +1648,7 @@ stat = 0; handled = 1; // FIXME have a neater way to prevent re-enumeration - dev->driver = 0; + dev->driver = NULL; goto done; } if (stat & INT_PWRDETECT) { @@ -1825,9 +1828,9 @@ pci_disable_device(pdev); device_unregister(&dev->gadget.dev); - pci_set_drvdata(pdev, 0); - dev->regs = 0; - the_controller = 0; + pci_set_drvdata(pdev, NULL); + dev->regs = NULL; + the_controller = NULL; INFO(dev, "unbind\n"); } @@ -1838,9 +1841,9 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) { - struct goku_udc *dev = 0; + struct goku_udc *dev = NULL; unsigned long resource, len; - void *base = 0; + void __iomem *base = NULL; int retval; char buf [8], *bufp; @@ -1900,7 +1903,7 @@ retval = -EFAULT; goto done; } - dev->regs = (struct goku_udc_regs *) base; + dev->regs = (struct goku_udc_regs __iomem *) base; pci_set_drvdata(pdev, dev); INFO(dev, "%s\n", driver_desc); diff -Nru a/drivers/usb/gadget/goku_udc.h b/drivers/usb/gadget/goku_udc.h --- a/drivers/usb/gadget/goku_udc.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/gadget/goku_udc.h 2004-10-26 18:25:18 -07:00 @@ -216,9 +216,9 @@ struct list_head queue; const struct usb_endpoint_descriptor *desc; - u32 *reg_fifo; - u32 *reg_mode; - u32 *reg_status; + u32 __iomem *reg_fifo; + u32 __iomem *reg_mode; + u32 __iomem *reg_status; }; struct goku_request { @@ -253,7 +253,7 @@ /* pci state used to access those endpoints */ struct pci_dev *pdev; - struct goku_udc_regs *regs; + struct goku_udc_regs __iomem *regs; u32 int_enable; /* statistics... */ diff -Nru a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c --- a/drivers/usb/gadget/inode.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/gadget/inode.c 2004-10-26 18:25:18 -07:00 @@ -1981,12 +1981,8 @@ { struct dentry *dentry; struct inode *inode; - struct qstr qname; - qname.name = name; - qname.len = strlen (name); - qname.hash = full_name_hash (qname.name, qname.len); - dentry = d_alloc (sb->s_root, &qname); + dentry = d_alloc_name(sb->s_root, name); if (!dentry) return NULL; diff -Nru a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c --- a/drivers/usb/gadget/net2280.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/gadget/net2280.c 2004-10-26 18:25:17 -07:00 @@ -717,7 +717,7 @@ dmacount |= (1 << DMA_DONE_INTERRUPT_ENABLE); /* td->dmadesc = previously set by caller */ - td->dmaaddr = cpu_to_le32p (&req->req.dma); + td->dmaaddr = cpu_to_le32 (req->req.dma); /* 2280 may be polling VALID_BIT through ep->dma->dmadesc */ wmb (); @@ -1707,8 +1707,10 @@ td = req->td; t = scnprintf (next, size, "\t td %08x " " count %08x buf %08x desc %08x\n", - req->td_dma, td->dmacount, - td->dmaaddr, td->dmadesc); + (u32) req->td_dma, + le32_to_cpu (td->dmacount), + le32_to_cpu (td->dmaaddr), + le32_to_cpu (td->dmadesc)); if (t <= 0 || t > size) goto done; size -= t; @@ -2845,6 +2847,7 @@ dev->got_irq = 1; /* DMA setup */ + /* NOTE: we know only the 32 LSBs of dma addresses may be nonzero */ dev->requests = pci_pool_create ("requests", pdev, sizeof (struct net2280_dma), 0 /* no alignment requirements */, diff -Nru a/drivers/usb/gadget/net2280.h b/drivers/usb/gadget/net2280.h --- a/drivers/usb/gadget/net2280.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/gadget/net2280.h 2004-10-26 18:25:18 -07:00 @@ -495,10 +495,10 @@ * use struct net2280_dma_regs bitfields */ struct net2280_dma { - u32 dmacount; - u32 dmaaddr; /* the buffer */ - u32 dmadesc; /* next dma descriptor */ - u32 _reserved; + __le32 dmacount; + __le32 dmaaddr; /* the buffer */ + __le32 dmadesc; /* next dma descriptor */ + __le32 _reserved; } __attribute__ ((aligned (16))); /*-------------------------------------------------------------------------*/ diff -Nru a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c --- a/drivers/usb/gadget/omap_udc.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/gadget/omap_udc.c 2004-10-26 18:25:17 -07:00 @@ -59,15 +59,14 @@ #undef USB_TRACE -/* OUT-dma seems to be behaving */ +/* bulk DMA seems to be behaving for both IN and OUT */ #define USE_DMA /* ISO too */ #define USE_ISO - #define DRIVER_DESC "OMAP UDC driver" -#define DRIVER_VERSION "24 August 2004" +#define DRIVER_VERSION "4 October 2004" #define DMA_ADDR_INVALID (~(dma_addr_t)0) @@ -104,7 +103,6 @@ module_param (fifo_mode, uint, 0); MODULE_PARM_DESC (fifo_mode, "endpoint setup (0 == default)"); - #ifdef USE_DMA static unsigned use_dma = 1; @@ -224,18 +222,17 @@ list_add(&ep->iso, &udc->iso); /* maybe assign a DMA channel to this endpoint */ - if (use_dma && desc->bmAttributes == USB_ENDPOINT_XFER_BULK - && !(ep->bEndpointAddress & USB_DIR_IN)) - /* FIXME ISO can dma, but prefers first channel. - * IN can dma, but lacks debugging. - */ + if (use_dma && desc->bmAttributes == USB_ENDPOINT_XFER_BULK) + /* FIXME ISO can dma, but prefers first channel */ dma_channel_claim(ep, 0); /* PIO OUT may RX packets */ if (desc->bmAttributes != USB_ENDPOINT_XFER_ISOC && !ep->has_dma - && !(ep->bEndpointAddress & USB_DIR_IN)) + && !(ep->bEndpointAddress & USB_DIR_IN)) { UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } spin_unlock_irqrestore(&udc->lock, flags); VDBG("%s enabled\n", _ep->name); @@ -262,6 +259,7 @@ ep->has_dma = 0; UDC_CTRL_REG = UDC_SET_HALT; list_del_init(&ep->iso); + del_timer(&ep->timer); spin_unlock_irqrestore(&ep->udc->lock, flags); @@ -498,17 +496,22 @@ u16 ep_stat = UDC_STAT_FLG_REG; is_last = 0; - if (ep_stat & FIFO_UNREADABLE) + if (ep_stat & FIFO_EMPTY) { + if (!ep->double_buf) + break; + ep->fnf = 1; + } + if (ep_stat & UDC_EP_HALTED) break; - if (ep_stat & (UDC_NON_ISO_FIFO_FULL|UDC_ISO_FIFO_FULL)) + if (ep_stat & FIFO_FULL) avail = ep->ep.maxpacket; - else + else { avail = UDC_RXFSTAT_REG; + ep->fnf = ep->double_buf; + } count = read_packet(buf, req, avail); - // FIXME double buffered PIO OUT wasn't behaving... - /* partial packet reads may not be errors */ if (count < ep->ep.maxpacket) { is_last = 1; @@ -526,26 +529,56 @@ if (!ep->bEndpointAddress) break; - if (!ep->double_buf) { - UDC_CTRL_REG = UDC_SET_FIFO_EN; - if (!is_last) - break; - } - - if (is_last) { + if (is_last) done(ep, req, 0); - if (list_empty(&ep->queue) || !ep->double_buf) - break; - req = container_of(ep->queue.next, - struct omap_req, queue); - is_last = 0; - } + break; } return is_last; } /*-------------------------------------------------------------------------*/ +static u16 dma_src_len(struct omap_ep *ep, dma_addr_t start) +{ + dma_addr_t end; + + /* IN-DMA needs this on fault/cancel paths, so 15xx misreports + * the last transfer's bytecount by more than a FIFO's worth. + */ + if (cpu_is_omap15xx()) + return 0; + + end = omap_readw(OMAP_DMA_CSAC(ep->lch)); + if (end == ep->dma_counter) + return 0; + + end |= start & (0xffff << 16); + if (end < start) + end += 0x10000; + return end - start; +} + +#define DMA_DEST_LAST(x) (cpu_is_omap15xx() \ + ? OMAP_DMA_CSAC(x) /* really: CPC */ \ + : OMAP_DMA_CDAC(x)) + +static u16 dma_dest_len(struct omap_ep *ep, dma_addr_t start) +{ + dma_addr_t end; + + end = omap_readw(DMA_DEST_LAST(ep->lch)); + if (end == ep->dma_counter) + return 0; + + end |= start & (0xffff << 16); + if (cpu_is_omap15xx()) + end++; + if (end < start) + end += 0x10000; + return end - start; +} + + /* Each USB transfer request using DMA maps to one or more DMA transfers. * When DMA completion isn't request completion, the UDC continues with * the next DMA transfer for that USB transfer. @@ -555,26 +588,29 @@ { u16 txdma_ctrl; unsigned length = req->req.length - req->req.actual; + const int sync_mode = cpu_is_omap15xx() + ? OMAP_DMA_SYNC_FRAME + : OMAP_DMA_SYNC_ELEMENT; /* measure length in either bytes or packets */ - if (length <= (UDC_TXN_TSC + 1)) { + if ((cpu_is_omap16xx() && length <= (UDC_TXN_TSC + 1)) + || (cpu_is_omap15xx() && length < ep->maxpacket)) { txdma_ctrl = UDC_TXN_EOT | length; omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8, - length, 1, OMAP_DMA_SYNC_ELEMENT); + length, 1, sync_mode); } else { - length = max(length / ep->maxpacket, + length = min(length / ep->maxpacket, (unsigned) UDC_TXN_TSC + 1); txdma_ctrl = length; omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8, - ep->ep.maxpacket, length, - OMAP_DMA_SYNC_ELEMENT); + ep->ep.maxpacket, length, sync_mode); length *= ep->maxpacket; } - omap_set_dma_src_params(ep->lch, OMAP_DMA_PORT_EMIFF, OMAP_DMA_AMODE_POST_INC, req->req.dma + req->req.actual); omap_start_dma(ep->lch); + ep->dma_counter = omap_readw(OMAP_DMA_CSAC(ep->lch)); UDC_DMA_IRQ_EN_REG |= UDC_TX_DONE_IE(ep->dma_channel); UDC_TXDMA_REG(ep->dma_channel) = UDC_TXN_START | txdma_ctrl; req->dma_bytes = length; @@ -592,14 +628,9 @@ && req->dma_bytes != 0 && (req->req.actual % ep->maxpacket) == 0) return; - } else { - u32 last; - - // FIXME this surely isn't #bytes transferred - last = (omap_readw(OMAP_DMA_CSSA_U(ep->lch)) << 16) - | omap_readw(OMAP_DMA_CSSA_L(ep->lch)); - req->req.actual = last - req->req.dma; - } + } else + req->req.actual += dma_src_len(ep, req->req.dma + + req->req.actual); /* tx completion */ omap_stop_dma(ep->lch); @@ -624,6 +655,7 @@ OMAP_DMA_SYNC_ELEMENT); omap_set_dma_dest_params(ep->lch, OMAP_DMA_PORT_EMIFF, OMAP_DMA_AMODE_POST_INC, req->req.dma + req->req.actual); + ep->dma_counter = omap_readw(DMA_DEST_LAST(ep->lch)); UDC_RXDMA_REG(ep->dma_channel) = UDC_RXN_STOP | (packets - 1); UDC_DMA_IRQ_EN_REG |= UDC_RX_EOT_IE(ep->dma_channel); @@ -638,15 +670,13 @@ { u16 count; - /* FIXME must be a better way to see how much dma - * happened, even when it never got going... - */ - count = omap_readw(OMAP_DMA_CDAC(ep->lch)); - count -= 0xffff & (req->req.dma + req->req.actual); + if (status == 0) + ep->dma_counter = (u16) (req->req.dma + req->req.actual); + count = dma_dest_len(ep, req->req.dma + req->req.actual); count += req->req.actual; if (count <= req->req.length) req->req.actual = count; - + if (count != req->dma_bytes || status) omap_stop_dma(ep->lch); @@ -705,7 +735,9 @@ if (irq_src & UDC_RXN_CNT) { ep = &udc->ep[UDC_DMA_RX_SRC(dman_stat)]; - DBG("%s, RX_CNT irq?\n", ep->ep.name); + ep->irqs++; + /* omap15xx does this unasked... */ + VDBG("%s, RX_CNT irq?\n", ep->ep.name); UDC_IRQ_SRC_REG = UDC_RXN_CNT; } } @@ -778,7 +810,8 @@ omap_disable_dma_irq(ep->lch, OMAP_DMA_BLOCK_IRQ); /* channel type P: hw synch (fifo) */ - omap_writew(2, OMAP_DMA_LCH_CTRL(ep->lch)); + if (!cpu_is_omap15xx()) + omap_writew(2, OMAP_DMA_LCH_CTRL(ep->lch)); } just_restart: @@ -803,6 +836,10 @@ use_ep(ep, UDC_EP_SEL); (is_in ? write_fifo : read_fifo)(ep, req); deselect_ep(); + if (!is_in) { + UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } /* IN: 6 wait states before it'll tx */ } } @@ -833,24 +870,21 @@ UDC_TXDMA_CFG_REG &= ~mask; if (req) { - if (active) - udelay(50); finish_in_dma(ep, req, -ECONNRESET); - if (UDC_TXDMA_CFG_REG & mask) - WARN("%s, SPIN abort TX dma\n", ep->ep.name); - } - /* host may empty the fifo (or not...) */ + /* clear FIFO; hosts probably won't empty it */ + use_ep(ep, UDC_EP_SEL); + UDC_CTRL_REG = UDC_CLR_EP; + deselect_ep(); + } while (UDC_TXDMA_CFG_REG & mask) udelay(10); - } else { UDC_RXDMA_CFG_REG &= ~mask; /* dma empties the fifo */ - while (active && (UDC_RXDMA_CFG_REG & mask)) + while (UDC_RXDMA_CFG_REG & mask) udelay(10); - omap_stop_dma(ep->lch); if (req) finish_out_dma(ep, req, -ECONNRESET); } @@ -997,6 +1031,10 @@ if ((is_in ? write_fifo : read_fifo)(ep, req) == 1) req = 0; deselect_ep(); + if (!is_in) { + UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } /* IN: 6 wait states before it'll tx */ } } @@ -1034,7 +1072,7 @@ if (use_dma && ep->dma_channel && ep->queue.next == &req->queue) { int channel = ep->dma_channel; - /* releasing the dma completion cancels the request, + /* releasing the channel cancels the request, * reclaiming the channel restarts the queue */ dma_channel_release(ep); @@ -1104,8 +1142,10 @@ use_ep(ep, 0); UDC_CTRL_REG = UDC_RESET_EP; ep->ackwait = 0; - if (!(ep->bEndpointAddress & USB_DIR_IN)) + if (!(ep->bEndpointAddress & USB_DIR_IN)) { UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } } } done: @@ -1218,7 +1258,7 @@ /* * Called by whatever detects VBUS sessions: external transceiver - * driver, or maybe GPIO0 VBUS IRQ. + * driver, or maybe GPIO0 VBUS IRQ. May request 48 MHz clock. */ static int omap_vbus_session(struct usb_gadget *gadget, int is_active) { @@ -1229,6 +1269,13 @@ spin_lock_irqsave(&udc->lock, flags); VDBG("VBUS %s\n", is_active ? "on" : "off"); udc->vbus_active = (is_active != 0); + if (cpu_is_omap15xx()) { + /* "software" detect, ignored if !VBUS_MODE_1510 */ + if (is_active) + FUNC_MUX_CTRL_0_REG |= VBUS_CTRL_1510; + else + FUNC_MUX_CTRL_0_REG &= ~VBUS_CTRL_1510; + } if (can_pullup(udc)) pullup_enable(udc); else @@ -1342,8 +1389,15 @@ /* Clear any pending requests and then scrub any rx/tx state * before starting to handle the SETUP request. */ - if (irq_src & UDC_SETUP) + if (irq_src & UDC_SETUP) { + u16 ack = irq_src & (UDC_EP0_TX|UDC_EP0_RX); + nuke(ep0, 0); + if (ack) { + UDC_IRQ_SRC_REG = ack; + irq_src = UDC_SETUP; + } + } /* IN/OUT packets mean we're in the DATA or STATUS stage. * This driver uses only uses protocol stalls (ep0 never halts), @@ -1508,8 +1562,10 @@ use_ep(ep, 0); UDC_CTRL_REG = UDC_RESET_EP; ep->ackwait = 0; - if (!(ep->bEndpointAddress & USB_DIR_IN)) + if (!(ep->bEndpointAddress & USB_DIR_IN)) { UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } } VDBG("%s halt cleared by host\n", ep->name); goto ep0out_status_stage; @@ -1743,6 +1799,39 @@ return status; } +/* workaround for seemingly-lost IRQs for RX ACKs... */ +#define PIO_OUT_TIMEOUT (jiffies + HZ/3) +#define HALF_FULL(f) (!((f)&(UDC_NON_ISO_FIFO_FULL|UDC_NON_ISO_FIFO_EMPTY))) + +static void pio_out_timer(unsigned long _ep) +{ + struct omap_ep *ep = (void *) _ep; + unsigned long flags; + u16 stat_flg; + + spin_lock_irqsave(&ep->udc->lock, flags); + if (!list_empty(&ep->queue) && ep->ackwait) { + use_ep(ep, 0); + stat_flg = UDC_STAT_FLG_REG; + + if ((stat_flg & UDC_ACK) && (!(stat_flg & UDC_FIFO_EN) + || (ep->double_buf && HALF_FULL(stat_flg)))) { + struct omap_req *req; + + VDBG("%s: lose, %04x\n", ep->ep.name, stat_flg); + req = container_of(ep->queue.next, + struct omap_req, queue); + UDC_EP_NUM_REG = ep->bEndpointAddress | UDC_EP_SEL; + (void) read_fifo(ep, req); + UDC_EP_NUM_REG = ep->bEndpointAddress; + UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } + } + mod_timer(&ep->timer, PIO_OUT_TIMEOUT); + spin_unlock_irqrestore(&ep->udc->lock, flags); +} + static irqreturn_t omap_udc_pio_irq(int irq, void *_dev, struct pt_regs *r) { @@ -1766,38 +1855,56 @@ ep = &udc->ep[epnum]; ep->irqs++; - if (!list_empty(&ep->queue)) { - UDC_EP_NUM_REG = epnum | UDC_EP_SEL; - if ((UDC_STAT_FLG_REG & UDC_ACK)) { + UDC_EP_NUM_REG = epnum | UDC_EP_SEL; + ep->fnf = 0; + if ((UDC_STAT_FLG_REG & UDC_ACK)) { + ep->ackwait--; + if (!list_empty(&ep->queue)) { int stat; req = container_of(ep->queue.next, struct omap_req, queue); stat = read_fifo(ep, req); - // FIXME double buffered PIO OUT should work + if (!ep->double_buf) + ep->fnf = 1; } - UDC_EP_NUM_REG = epnum; } + /* min 6 clock delay before clearing EP_SEL ... */ + epn_stat = UDC_EPN_STAT_REG; + epn_stat = UDC_EPN_STAT_REG; + UDC_EP_NUM_REG = epnum; + + /* enabling fifo _after_ clearing ACK, contrary to docs, + * reduces lossage; timer still needed though (sigh). + */ + if (ep->fnf) { + UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1 + ep->double_buf; + } + mod_timer(&ep->timer, PIO_OUT_TIMEOUT); } /* then IN transfers */ - if (irq_src & UDC_EPN_TX) { + else if (irq_src & UDC_EPN_TX) { epnum = epn_stat & 0x0f; UDC_IRQ_SRC_REG = UDC_EPN_TX; status = IRQ_HANDLED; ep = &udc->ep[16 + epnum]; ep->irqs++; - ep->ackwait = 0; - if (!list_empty(&ep->queue)) { - UDC_EP_NUM_REG = epnum | UDC_EP_DIR | UDC_EP_SEL; - if ((UDC_STAT_FLG_REG & UDC_ACK)) { + UDC_EP_NUM_REG = epnum | UDC_EP_DIR | UDC_EP_SEL; + if ((UDC_STAT_FLG_REG & UDC_ACK)) { + ep->ackwait = 0; + if (!list_empty(&ep->queue)) { req = container_of(ep->queue.next, struct omap_req, queue); (void) write_fifo(ep, req); } - UDC_EP_NUM_REG = epnum | UDC_EP_DIR; - /* 6 wait states before it'll tx */ } + /* min 6 clock delay before clearing EP_SEL ... */ + epn_stat = UDC_EPN_STAT_REG; + epn_stat = UDC_EPN_STAT_REG; + UDC_EP_NUM_REG = epnum | UDC_EP_DIR; + /* then 6 clocks before it'd tx */ } spin_unlock_irqrestore(&udc->lock, flags); @@ -1939,6 +2046,9 @@ pullup_disable (udc); } + if (machine_is_omap_innovator()) + omap_vbus_session(&udc->gadget, 1); + done: return status; } @@ -1954,6 +2064,9 @@ if (!driver || driver != udc->driver) return -EINVAL; + if (machine_is_omap_innovator()) + omap_vbus_session(&udc->gadget, 0); + if (udc->transceiver) (void) otg_set_peripheral(udc->transceiver, 0); else @@ -2002,8 +2115,16 @@ stat_flg = UDC_STAT_FLG_REG; seq_printf(s, - "\n%s %sirqs %ld stat %04x " EIGHTBITS FOURBITS "%s\n", - ep->name, buf, ep->irqs, stat_flg, + "\n%s %s%s%sirqs %ld stat %04x " EIGHTBITS FOURBITS "%s\n", + ep->name, buf, + ep->double_buf ? "dbuf " : "", + ({char *s; switch(ep->ackwait){ + case 0: s = ""; break; + case 1: s = "(ackw) "; break; + case 2: s = "(ackw2) "; break; + default: s = "(?) "; break; + } s;}), + ep->irqs, stat_flg, (stat_flg & UDC_NO_RXPACKET) ? "no_rxpacket " : "", (stat_flg & UDC_MISS_IN) ? "miss_in " : "", (stat_flg & UDC_DATA_FLUSH) ? "data_flush " : "", @@ -2021,10 +2142,19 @@ if (list_empty (&ep->queue)) seq_printf(s, "\t(queue empty)\n"); else - list_for_each_entry (req, &ep->queue, queue) + list_for_each_entry (req, &ep->queue, queue) { + unsigned length = req->req.actual; + + if (use_dma && buf[0]) { + length += ((ep->bEndpointAddress & USB_DIR_IN) + ? dma_src_len : dma_dest_len) + (ep, req->req.dma + length); + buf[0] = 0; + } seq_printf(s, "\treq %p len %d/%d buf %p\n", - &req->req, req->req.actual, + &req->req, length, req->req.length, req->req.buf); + } } static char *trx_mode(unsigned m) @@ -2125,7 +2255,11 @@ fifo_mode, udc->driver ? udc->driver->driver.name : "(none)", HMC, - udc->transceiver ? udc->transceiver->label : ""); + udc->transceiver ? udc->transceiver->label : "(none)"); + seq_printf(s, "ULPD control %04x req %04x status %04x\n", + __REG16(ULPD_CLOCK_CTRL), + __REG16(ULPD_SOFT_REQ), + __REG16(ULPD_STATUS_REQ)); /* OTG controller registers */ if (!cpu_is_omap15xx()) @@ -2305,10 +2439,10 @@ epn_rxtx |= UDC_EPN_RX_ISO; dbuf = 1; } else { - /* pio-out could potentially double-buffer, - * as can (should!) DMA-IN + /* double-buffering "not supported" on 15xx, + * and ignored for PIO-IN on 16xx */ - if (!use_dma || (addr & USB_DIR_IN)) + if (!use_dma || cpu_is_omap15xx()) dbuf = 0; switch (maxp) { @@ -2320,6 +2454,9 @@ } if (dbuf && addr) epn_rxtx |= UDC_EPN_RX_DB; + init_timer(&ep->timer); + ep->timer.function = pio_out_timer; + ep->timer.data = (unsigned long) ep; } if (addr) epn_rxtx |= UDC_EPN_RX_VALID; @@ -2509,23 +2646,35 @@ return -EBUSY; } - INFO("OMAP UDC rev %d.%d, %s receptacle\n", + INFO("OMAP UDC rev %d.%d%s\n", UDC_REV_REG >> 4, UDC_REV_REG & 0xf, - config->otg ? "Mini-AB" : "B/Mini-B"); + config->otg ? ", Mini-AB" : ""); /* use the mode given to us by board init code */ if (cpu_is_omap15xx()) { hmc = HMC_1510; type = "(unknown)"; - /* FIXME may need a GPIO-0 handler to call - * usb_gadget_vbus_{dis,}connect() on us... - */ + if (machine_is_omap_innovator()) { + /* just set up software VBUS detect, and then + * later rig it so we always report VBUS. + * FIXME without really sensing VBUS, we can't + * know when to turn PULLUP_EN on/off; and that + * means we always "need" the 48MHz clock. + */ + u32 tmp = FUNC_MUX_CTRL_0_REG; + + FUNC_MUX_CTRL_0_REG &= ~VBUS_CTRL_1510; + tmp |= VBUS_MODE_1510; + tmp &= ~VBUS_CTRL_1510; + FUNC_MUX_CTRL_0_REG = tmp; + } } else { hmc = HMC_1610; switch (hmc) { case 3: case 11: + case 16: case 19: case 25: xceiv = otg_get_transceiver(); @@ -2565,7 +2714,9 @@ xceiv = 0; // "udc" is now valid pullup_disable(udc); +#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) udc->gadget.is_otg = (config->otg != 0); +#endif /* USB general purpose IRQ: ep0, state changes, dma, etc */ status = request_irq(odev->resource[1].start, omap_udc_irq, @@ -2694,7 +2845,11 @@ static int __init udc_init(void) { - INFO("%s, version: " DRIVER_VERSION "%s\n", driver_desc, + INFO("%s, version: " DRIVER_VERSION +#ifdef USE_ISO + " (iso)" +#endif + "%s\n", driver_desc, use_dma ? " (dma)" : ""); return driver_register(&udc_driver); } diff -Nru a/drivers/usb/gadget/omap_udc.h b/drivers/usb/gadget/omap_udc.h --- a/drivers/usb/gadget/omap_udc.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/gadget/omap_udc.h 2004-10-26 18:25:17 -07:00 @@ -146,11 +146,14 @@ u8 bmAttributes; unsigned double_buf:1; unsigned stopped:1; - unsigned ackwait:1; + unsigned fnf:1; unsigned has_dma:1; + u8 ackwait; u8 dma_channel; + u16 dma_counter; int lch; struct omap_udc *udc; + struct timer_list timer; }; struct omap_udc { @@ -168,7 +171,6 @@ unsigned ep0_set_config:1; unsigned ep0_reset_config:1; unsigned ep0_setup:1; - unsigned hmc:6; struct completion *done; }; diff -Nru a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c --- a/drivers/usb/gadget/zero.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/gadget/zero.c 2004-10-26 18:25:18 -07:00 @@ -1189,7 +1189,7 @@ } else if (gadget_is_lh7a40x(gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209); } else if (gadget_is_n9604(gadget)) { - device_desc.bcdDevice = __constant_cpu_to_le16 (0x020a); + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0210); } else { /* gadget zero is so simple (for now, no altsettings) that * it SHOULD NOT have problems with bulk-capable hardware. diff -Nru a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig --- a/drivers/usb/host/Kconfig 2004-10-26 18:25:19 -07:00 +++ b/drivers/usb/host/Kconfig 2004-10-26 18:25:19 -07:00 @@ -1,3 +1,21 @@ +# Host-side USB depends on having a host controller +# NOTE: dummy_hcd is always an option, but it's ignored here ... +# NOTE: SL-811 option should be board-specific ... +config USB_ARCH_HAS_HCD + boolean + default y if USB_ARCH_HAS_OHCI + default y if ARM # SL-811 + default PCI + +# many non-PCI hcds implement OHCI +config USB_ARCH_HAS_OHCI + boolean + default y if SA1111 + default y if ARCH_OMAP + default y if ARCH_LH7A404 + default y if PXA27x + default PCI + # # USB Host Controller Drivers # @@ -6,7 +24,7 @@ config USB_EHCI_HCD tristate "EHCI HCD (USB 2.0) support" - depends on USB + depends on USB && PCI ---help--- The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware. @@ -51,8 +69,8 @@ config USB_OHCI_HCD tristate "OHCI HCD support" - depends on USB - select ISP1301_OMAP if MACH_OMAP_H2 + depends on USB && USB_ARCH_HAS_OHCI + select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 ---help--- The Open Host Controller Interface (OHCI) is a standard for accessing USB 1.1 host controller hardware. It does more in hardware than Intel's @@ -68,7 +86,7 @@ config USB_UHCI_HCD tristate "UHCI HCD (most Intel and VIA) support" - depends on USB + depends on USB && PCI ---help--- The Universal Host Controller Interface is a standard by Intel for accessing the USB hardware in the PC (which is also called the USB diff -Nru a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c --- a/drivers/usb/host/ehci-dbg.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/host/ehci-dbg.c 2004-10-26 18:25:18 -07:00 @@ -185,7 +185,7 @@ } static int __attribute__((__unused__)) -dbg_status_buf (char *buf, unsigned len, char *label, u32 status) +dbg_status_buf (char *buf, unsigned len, const char *label, u32 status) { return scnprintf (buf, len, "%s%sstatus %04x%s%s%s%s%s%s%s%s%s%s", @@ -204,7 +204,7 @@ } static int __attribute__((__unused__)) -dbg_intr_buf (char *buf, unsigned len, char *label, u32 enable) +dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable) { return scnprintf (buf, len, "%s%sintrenable %02x%s%s%s%s%s%s", @@ -221,7 +221,8 @@ static const char *const fls_strings [] = { "1024", "512", "256", "??" }; -static int dbg_command_buf (char *buf, unsigned len, char *label, u32 command) +static int +dbg_command_buf (char *buf, unsigned len, const char *label, u32 command) { return scnprintf (buf, len, "%s%scommand %06x %s=%d ithresh=%d%s%s%s%s period=%s%s %s", @@ -240,7 +241,7 @@ } static int -dbg_port_buf (char *buf, unsigned len, char *label, int port, u32 status) +dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) { char *sig; @@ -276,19 +277,19 @@ {} static inline int __attribute__((__unused__)) -dbg_status_buf (char *buf, unsigned len, char *label, u32 status) +dbg_status_buf (char *buf, unsigned len, const char *label, u32 status) { return 0; } static inline int __attribute__((__unused__)) -dbg_command_buf (char *buf, unsigned len, char *label, u32 command) +dbg_command_buf (char *buf, unsigned len, const char *label, u32 command) { return 0; } static inline int __attribute__((__unused__)) -dbg_intr_buf (char *buf, unsigned len, char *label, u32 enable) +dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable) { return 0; } static inline int __attribute__((__unused__)) -dbg_port_buf (char *buf, unsigned len, char *label, int port, u32 status) +dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) { return 0; } #endif /* DEBUG */ diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c --- a/drivers/usb/host/ehci-hcd.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/host/ehci-hcd.c 2004-10-26 18:25:18 -07:00 @@ -347,9 +347,18 @@ #ifdef CONFIG_PCI /* EHCI 0.96 and later may have "extended capabilities" */ - if (hcd->self.controller->bus == &pci_bus_type) + if (hcd->self.controller->bus == &pci_bus_type) { + struct pci_dev *pdev = to_pci_dev(ehci->hcd.self.controller); + + /* AMD8111 EHCI doesn't work, according to AMD errata */ + if ((pdev->vendor == PCI_VENDOR_ID_AMD) + && (pdev->device == 0x7463)) { + ehci_info (ehci, "ignoring AMD8111 (errata)\n"); + return -EIO; + } + temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params)); - else + } else temp = 0; while (temp && count--) { u32 cap; @@ -362,10 +371,6 @@ if (bios_handoff (ehci, temp, cap) != 0) return -EOPNOTSUPP; break; - case 0x0a: /* appendix C */ - ehci_dbg (ehci, "debug registers, BAR %d offset %d\n", - (cap >> 29) & 0x07, (cap >> 16) & 0x0fff); - break; case 0: /* illegal reserved capability */ ehci_warn (ehci, "illegal capability!\n"); cap = 0; @@ -857,6 +862,30 @@ } } +static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) +{ + /* if we need to use IAA and it's busy, defer */ + if (qh->qh_state == QH_STATE_LINKED + && ehci->reclaim + && HCD_IS_RUNNING (ehci->hcd.state)) { + struct ehci_qh *last; + + for (last = ehci->reclaim; + last->reclaim; + last = last->reclaim) + continue; + qh->qh_state = QH_STATE_UNLINK_WAIT; + last->reclaim = qh; + + /* bypass IAA if the hc can't care */ + } else if (!HCD_IS_RUNNING (ehci->hcd.state) && ehci->reclaim) + end_unlink_async (ehci, NULL); + + /* something else might have unlinked the qh by now */ + if (qh->qh_state == QH_STATE_LINKED) + start_unlink_async (ehci, qh); +} + /* remove from hardware lists * completions normally happen asynchronously */ @@ -875,28 +904,7 @@ qh = (struct ehci_qh *) urb->hcpriv; if (!qh) break; - - /* if we need to use IAA and it's busy, defer */ - if (qh->qh_state == QH_STATE_LINKED - && ehci->reclaim - && HCD_IS_RUNNING (ehci->hcd.state) - ) { - struct ehci_qh *last; - - for (last = ehci->reclaim; - last->reclaim; - last = last->reclaim) - continue; - qh->qh_state = QH_STATE_UNLINK_WAIT; - last->reclaim = qh; - - /* bypass IAA if the hc can't care */ - } else if (!HCD_IS_RUNNING (ehci->hcd.state) && ehci->reclaim) - end_unlink_async (ehci, NULL); - - /* something else might have unlinked the qh by now */ - if (qh->qh_state == QH_STATE_LINKED) - start_unlink_async (ehci, qh); + unlink_async (ehci, qh); break; case PIPE_INTERRUPT: @@ -949,7 +957,7 @@ struct ehci_hcd *ehci = hcd_to_ehci (hcd); int epnum; unsigned long flags; - struct ehci_qh *qh; + struct ehci_qh *qh, *tmp; /* ASSERT: any requests/urbs are being unlinked */ /* ASSERT: nobody can be submitting urbs for this any more */ @@ -975,6 +983,16 @@ if (!HCD_IS_RUNNING (ehci->hcd.state)) qh->qh_state = QH_STATE_IDLE; switch (qh->qh_state) { + case QH_STATE_LINKED: + for (tmp = ehci->async->qh_next.qh; + tmp && tmp != qh; + tmp = tmp->qh_next.qh) + continue; + /* periodic qh self-unlinks on empty */ + if (!tmp) + goto nogood; + unlink_async (ehci, qh); + /* FALL THROUGH */ case QH_STATE_UNLINK: /* wait for hw to finish? */ idle_timeout: spin_unlock_irqrestore (&ehci->lock, flags); @@ -988,6 +1006,7 @@ } /* else FALL THROUGH */ default: +nogood: /* caller was supposed to have unlinked any requests; * that's not our job. just leak this memory. */ diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c --- a/drivers/usb/host/ehci-sched.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/host/ehci-sched.c 2004-10-26 18:25:17 -07:00 @@ -353,8 +353,8 @@ hcd_to_bus (&ehci->hcd)->bandwidth_allocated -= (qh->usecs + qh->c_usecs) / qh->period; - dbg ("descheduled qh %p, period = %d frame = %d count = %d, urbs = %d", - qh, qh->period, frame, + ehci_dbg (ehci, "descheduled qh%d/%p frame=%d count=%d, urbs=%d\n", + qh->period, qh, frame, atomic_read (&qh->kref.refcount), ehci->periodic_sched); } @@ -486,13 +486,14 @@ qh->hw_info2 &= ~__constant_cpu_to_le32(0xffff); qh->hw_info2 |= cpu_to_le32 (1 << uframe) | c_mask; } else - dbg ("reused previous qh %p schedule", qh); + ehci_dbg (ehci, "reused qh %p schedule\n", qh); /* stuff into the periodic schedule */ qh->qh_state = QH_STATE_LINKED; - dbg ("scheduled qh %p usecs %d/%d period %d.0 starting %d.%d (gap %d)", - qh, qh->usecs, qh->c_usecs, - qh->period, frame, uframe, qh->gap_uf); + ehci_dbg(ehci, + "scheduled qh%d/%p usecs %d/%d starting %d.%d (gap %d)\n", + qh->period, qh, qh->usecs, qh->c_usecs, + frame, uframe, qh->gap_uf); do { if (unlikely (ehci->pshadow [frame].ptr != 0)) { diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/host/ohci-hcd.c 2004-10-26 18:25:17 -07:00 @@ -154,6 +154,11 @@ module_param (power_switching, bool, 0); MODULE_PARM_DESC (power_switching, "true (not default) to switch port power"); +/* Some boards leave IR set wrongly, since they fail BIOS/SMM handshakes */ +static int no_handshake = 0; +module_param (no_handshake, bool, 0); +MODULE_PARM_DESC (no_handshake, "true (not default) disables BIOS handshake"); + /*-------------------------------------------------------------------------*/ /* @@ -426,7 +431,7 @@ #ifndef IR_DISABLE /* SMM owns the HC? not for long! */ - if (ohci_readl (&ohci->regs->control) & OHCI_CTRL_IR) { + if (!no_handshake && ohci_readl (&ohci->regs->control) & OHCI_CTRL_IR) { ohci_dbg (ohci, "USB HC TakeOver from BIOS/SMM\n"); /* this timeout is arbitrary. we make it long, so systems diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/host/uhci-hcd.c 2004-10-26 18:25:18 -07:00 @@ -765,8 +765,12 @@ uhci_insert_tds_in_qh(qh, urb, UHCI_PTR_BREADTH); - /* Low-speed transfers get a different queue, and won't hog the bus */ - if (urb->dev->speed == USB_SPEED_LOW) + /* Low-speed transfers get a different queue, and won't hog the bus. + * Also, some devices enumerate better without FSBR; the easiest way + * to do that is to put URBs on the low-speed queue while the device + * is in the DEFAULT state. */ + if (urb->dev->speed == USB_SPEED_LOW || + urb->dev->state == USB_STATE_DEFAULT) skelqh = uhci->skel_ls_control_qh; else { skelqh = uhci->skel_fs_control_qh; diff -Nru a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig --- a/drivers/usb/input/Kconfig 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/input/Kconfig 2004-10-26 18:25:18 -07:00 @@ -1,7 +1,7 @@ # # USB Input driver configuration # -comment "USB Human Interface Devices (HID)" +comment "USB Input Devices" depends on USB config USB_HID @@ -12,7 +12,8 @@ mice, joysticks, graphic tablets, or any other HID based devices to your computer via USB. You also need to select HID Input layer support (below) if you want to use keyboards, mice, joysticks and - the like. + the like ... as well as Uninterruptible Power Supply (UPS) and + monitor control devices. You can't use this driver and the HIDBP (Boot Protocol) keyboard and mouse drivers at the same time. More information is available: @@ -24,7 +25,7 @@ module will be called usbhid. comment "Input core support is needed for USB HID input layer or HIDBP support" - depends on USB && INPUT=n + depends on USB_HID && INPUT=n config USB_HIDINPUT bool "HID input layer support" @@ -32,8 +33,7 @@ depends on INPUT && USB_HID help Say Y here if you want to use a USB keyboard, mouse or joystick, - or any other HID input device. You also need "Input core support", - (CONFIG_INPUT), which you select under "Input device support", above. + or any other HID input device. If unsure, say Y. @@ -87,7 +87,6 @@ This module supports these devices separately using a separate event interface on /dev/usb/hiddevX (char 180:96 to 180:111). - This driver requires CONFIG_USB_HID. If unsure, say Y. diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c --- a/drivers/usb/input/hid-core.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/input/hid-core.c 2004-10-26 18:25:18 -07:00 @@ -925,6 +925,7 @@ case -ECONNRESET: /* unlink */ case -ENOENT: case -ESHUTDOWN: + case -EPERM: return; case -ETIMEDOUT: /* NAK */ break; @@ -1833,6 +1834,30 @@ return 0; } +static int hid_suspend(struct usb_interface *intf, u32 state) +{ + struct hid_device *hid = usb_get_intfdata (intf); + + usb_kill_urb(hid->urbin); + intf->dev.power.power_state = state; + dev_dbg(&intf->dev, "suspend\n"); + return 0; +} + +static int hid_resume(struct usb_interface *intf) +{ + struct hid_device *hid = usb_get_intfdata (intf); + int status; + + intf->dev.power.power_state = PM_SUSPEND_ON; + if (hid->open) + status = usb_submit_urb(hid->urbin, GFP_NOIO); + else + status = 0; + dev_dbg(&intf->dev, "resume status %d\n", status); + return status; +} + static struct usb_device_id hid_usb_ids [] = { { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS, .bInterfaceClass = USB_INTERFACE_CLASS_HID }, @@ -1846,6 +1871,8 @@ .name = "usbhid", .probe = hid_probe, .disconnect = hid_disconnect, + .suspend = hid_suspend, + .resume = hid_resume, .id_table = hid_usb_ids, }; diff -Nru a/drivers/usb/media/dabusb.c b/drivers/usb/media/dabusb.c --- a/drivers/usb/media/dabusb.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/media/dabusb.c 2004-10-26 18:25:18 -07:00 @@ -595,8 +595,7 @@ if (file->f_flags & O_NONBLOCK) { return -EBUSY; } - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout (HZ / 2); + msleep_interruptible(500); if (signal_pending (current)) { return -EAGAIN; diff -Nru a/drivers/usb/media/w9968cf.h b/drivers/usb/media/w9968cf.h --- a/drivers/usb/media/w9968cf.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/media/w9968cf.h 2004-10-26 18:25:17 -07:00 @@ -135,7 +135,7 @@ #define W9968CF_MODULE_NAME "V4L driver for W996[87]CF JPEG USB " \ "Dual Mode Camera Chip" -#define W9968CF_MODULE_VERSION "1:1.32-basic" +#define W9968CF_MODULE_VERSION "1:1.33-basic" #define W9968CF_MODULE_AUTHOR "(C) 2002-2004 Luca Risolia" #define W9968CF_AUTHOR_EMAIL "" #define W9968CF_MODULE_LICENSE "GPL" diff -Nru a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig --- a/drivers/usb/misc/Kconfig 2004-10-26 18:25:19 -07:00 +++ b/drivers/usb/misc/Kconfig 2004-10-26 18:25:19 -07:00 @@ -121,6 +121,16 @@ To compile this driver as a module, choose M here: the module will be called cytherm. +config USB_PHIDGETKIT + tristate "USB PhidgetKit support" + depends on USB + help + Say Y here if you want to connect a PhidgetKit USB device from + Phidgets Inc. + + To compile this driver as a module, choose M here: the + module will be called phidgetkit. + config USB_PHIDGETSERVO tristate "USB PhidgetServo support" depends on USB diff -Nru a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile --- a/drivers/usb/misc/Makefile 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/misc/Makefile 2004-10-26 18:25:18 -07:00 @@ -10,8 +10,9 @@ obj-$(CONFIG_USB_LCD) += usblcd.o obj-$(CONFIG_USB_LED) += usbled.o obj-$(CONFIG_USB_LEGOTOWER) += legousbtower.o +obj-$(CONFIG_USB_PHIDGETKIT) += phidgetkit.o +obj-$(CONFIG_USB_PHIDGETSERVO) += phidgetservo.o obj-$(CONFIG_USB_RIO500) += rio500.o obj-$(CONFIG_USB_TEST) += usbtest.o obj-$(CONFIG_USB_TIGL) += tiglusb.o obj-$(CONFIG_USB_USS720) += uss720.o -obj-$(CONFIG_USB_PHIDGETSERVO) += phidgetservo.o diff -Nru a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/misc/phidgetkit.c 2004-10-26 18:25:19 -07:00 @@ -0,0 +1,581 @@ +/* + * USB PhidgetInterfaceKit driver 1.0 + * + * Copyright (C) 2004 Sean Young + * Copyright (C) 2004 Greg Kroah-Hartman + * + * 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. + * + * This is a driver for the USB PhidgetInterfaceKit. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_AUTHOR "Sean Young " +#define DRIVER_DESC "USB PhidgetInterfaceKit Driver" + +#define USB_VENDOR_ID_GLAB 0x06c2 +#define USB_DEVICE_ID_INTERFACEKIT004 0x0040 +#define USB_DEVICE_ID_INTERFACEKIT888 0x0045 +#define USB_DEVICE_ID_INTERFACEKIT047 0x0051 +#define USB_DEVICE_ID_INTERFACEKIT088 0x0053 + +#define USB_VENDOR_ID_WISEGROUP 0x0925 +#define USB_DEVICE_ID_INTERFACEKIT884 0x8201 + +#define MAX_INTERFACES 8 + +struct driver_interfacekit { + int sensors; + int inputs; + int outputs; + int has_lcd; +}; +#define ifkit(_sensors, _inputs, _outputs, _lcd) \ +static struct driver_interfacekit ph_##_sensors##_inputs##_outputs = { \ + .sensors = _sensors, \ + .inputs = _inputs, \ + .outputs = _outputs, \ + .has_lcd = _lcd, \ +}; +ifkit(0, 0, 4, 0); +ifkit(8, 8, 8, 0); +ifkit(0, 4, 7, 1); +ifkit(8, 8, 4, 0); +ifkit(0, 8, 8, 1); + +struct phidget_interfacekit { + struct usb_device *udev; + struct usb_interface *intf; + struct driver_interfacekit *ifkit; + int outputs[MAX_INTERFACES]; + int inputs[MAX_INTERFACES]; + int sensors[MAX_INTERFACES]; + u8 lcd_files_on; + + struct urb *irq; + unsigned char *data; + dma_addr_t data_dma; +}; + +static struct usb_device_id id_table[] = { + {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT004), + .driver_info = (kernel_ulong_t)&ph_004}, + {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT888), + .driver_info = (kernel_ulong_t)&ph_888}, + {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT047), + .driver_info = (kernel_ulong_t)&ph_047}, + {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT088), + .driver_info = (kernel_ulong_t)&ph_088}, + {USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_INTERFACEKIT884), + .driver_info = (kernel_ulong_t)&ph_884}, + {} +}; +MODULE_DEVICE_TABLE(usb, id_table); + +static int change_outputs(struct phidget_interfacekit *kit, int output_num, int enable) +{ + unsigned char *buffer; + int retval; + int n; + + buffer = kmalloc(4, GFP_KERNEL); + if (!buffer) { + dev_err(&kit->udev->dev, "%s - out of memory\n", + __FUNCTION__); + return -ENOMEM; + } + + kit->outputs[output_num] = enable; + memset(buffer, 0, 4); + for (n=0; n<8; n++) { + if (kit->outputs[n]) { + buffer[0] |= 1 << n; + } + } + + dev_dbg(&kit->udev->dev, "data: %02x %02x\n", buffer[0], buffer[1]); + + retval = usb_control_msg(kit->udev, + usb_sndctrlpipe(kit->udev, 0), + 0x09, 0x21, 0x0200, 0x0000, buffer, 4, 2 * HZ); + + if (retval != 4) + dev_err(&kit->udev->dev, "retval = %d\n", retval); + kfree(buffer); + + return retval < 0 ? retval : 0; +} + +static int change_string(struct phidget_interfacekit *kit, const char *display, unsigned char row) +{ + unsigned char *buffer; + unsigned char *form_buffer; + int retval = -ENOMEM; + int i,j, len, buf_ptr; + + buffer = kmalloc(8, GFP_KERNEL); + form_buffer = kmalloc(30, GFP_KERNEL); + if ((!buffer) || (!form_buffer)) { + dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__); + goto exit; + } + + len = strlen(display); + if (len > 20) + len = 20; + + dev_dbg(&kit->udev->dev, "Setting LCD line %d to %s\n", row, display); + + form_buffer[0] = row * 0x40 + 0x80; + form_buffer[1] = 0x02; + buf_ptr = 2; + for (i = 0; i 7) + len = 7; + else + len = (buf_ptr - i); + for (j = 0; j < len; j++) + buffer[j] = form_buffer[i + j]; + buffer[7] = len; + + retval = usb_control_msg(kit->udev, + usb_sndctrlpipe(kit->udev, 0), + 0x09, 0x21, 0x0200, 0x0000, buffer, 8, 2 * HZ); + if (retval < 0) + goto exit; + } + + retval = 0; +exit: + kfree(buffer); + kfree(form_buffer); + + return retval; +} + +#define set_lcd_line(number) \ +static ssize_t lcd_line_##number(struct device *dev, const char *buf, size_t count) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + change_string(kit, buf, number - 1); \ + return count; \ +} \ +static DEVICE_ATTR(lcd_line_##number, S_IWUGO, NULL, lcd_line_##number); +set_lcd_line(1); +set_lcd_line(2); + +static ssize_t set_backlight(struct device *dev, const char *buf, size_t count) +{ + struct usb_interface *intf = to_usb_interface(dev); + struct phidget_interfacekit *kit = usb_get_intfdata(intf); + int enabled; + unsigned char *buffer; + int retval = -ENOMEM; + + buffer = kmalloc(8, GFP_KERNEL); + if (!buffer) { + dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__); + goto exit; + } + + if (sscanf(buf, "%d", &enabled) < 1) { + retval = -EINVAL; + goto exit; + } + memset(buffer, 0x00, 8); + if (enabled) + buffer[0] = 0x01; + buffer[7] = 0x11; + + dev_dbg(&kit->udev->dev, "Setting backlight to %s\n", enabled ? "on" : "off"); + + retval = usb_control_msg(kit->udev, + usb_sndctrlpipe(kit->udev, 0), + 0x09, 0x21, 0x0200, 0x0000, buffer, 8, 2 * HZ); + if (retval < 0) + goto exit; + + retval = count; +exit: + kfree(buffer); + return retval; +} +static DEVICE_ATTR(backlight, S_IWUGO, NULL, set_backlight); + +static void remove_lcd_files(struct phidget_interfacekit *kit) +{ + if (kit->lcd_files_on) { + dev_dbg(&kit->udev->dev, "Removing lcd files\n"); + device_remove_file(&kit->intf->dev, &dev_attr_lcd_line_1); + device_remove_file(&kit->intf->dev, &dev_attr_lcd_line_2); + device_remove_file(&kit->intf->dev, &dev_attr_backlight); + } +} + +static ssize_t enable_lcd_files(struct device *dev, const char *buf, size_t count) +{ + struct usb_interface *intf = to_usb_interface(dev); + struct phidget_interfacekit *kit = usb_get_intfdata(intf); + int enable; + + if (kit->ifkit->has_lcd == 0) + return -ENODEV; + + if (sscanf(buf, "%d", &enable) < 1) + return -EINVAL; + + if (enable) { + if (!kit->lcd_files_on) { + dev_dbg(&kit->udev->dev, "Adding lcd files\n"); + device_create_file(&kit->intf->dev, &dev_attr_lcd_line_1); + device_create_file(&kit->intf->dev, &dev_attr_lcd_line_2); + device_create_file(&kit->intf->dev, &dev_attr_backlight); + kit->lcd_files_on = 1; + } + } else { + if (kit->lcd_files_on) { + remove_lcd_files(kit); + kit->lcd_files_on = 0; + } + } + + return count; +} +static DEVICE_ATTR(lcd, S_IWUGO, NULL, enable_lcd_files); + +static void interfacekit_irq(struct urb *urb, struct pt_regs *regs) +{ + struct phidget_interfacekit *kit = urb->context; + unsigned char *buffer = kit->data; + int status; + int n; + + switch (urb->status) { + case 0: /* success */ + break; + case -ECONNRESET: /* unlink */ + case -ENOENT: + case -ESHUTDOWN: + return; + /* -EPIPE: should clear the halt */ + default: /* error */ + goto resubmit; + } + + for (n=0; n<8; n++) { + kit->inputs[n] = buffer[1] & (1 << n) ? 1 : 0; + } + + if (buffer[0] & 1) { + kit->sensors[4] = buffer[2] + (buffer[3] & 0x0f) * 256; + kit->sensors[5] = buffer[4] + (buffer[3] & 0xf0) * 16; + kit->sensors[6] = buffer[5] + (buffer[6] & 0x0f) * 256; + kit->sensors[7] = buffer[7] + (buffer[6] & 0xf0) * 16; + } else { + kit->sensors[0] = buffer[2] + (buffer[3] & 0x0f) * 256; + kit->sensors[1] = buffer[4] + (buffer[3] & 0xf0) * 16; + kit->sensors[2] = buffer[5] + (buffer[6] & 0x0f) * 256; + kit->sensors[3] = buffer[7] + (buffer[6] & 0xf0) * 16; + } + +resubmit: + status = usb_submit_urb(urb, SLAB_ATOMIC); + if (status) + err("can't resubmit intr, %s-%s/interfacekit0, status %d", + kit->udev->bus->bus_name, + kit->udev->devpath, status); +} + +#define show_set_output(value) \ +static ssize_t set_output##value(struct device *dev, const char *buf, \ + size_t count) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + int enabled; \ + int retval; \ + \ + if (sscanf(buf, "%d", &enabled) < 1) { \ + return -EINVAL; \ + } \ + \ + retval = change_outputs(kit, value - 1, enabled ? 1 : 0); \ + \ + return retval ? retval : count; \ +} \ + \ +static ssize_t show_output##value(struct device *dev, char *buf) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + \ + return sprintf(buf, "%d\n", kit->outputs[value - 1 ]); \ +} \ +static DEVICE_ATTR(output##value, S_IWUGO | S_IRUGO, \ + show_output##value, set_output##value); +show_set_output(1); +show_set_output(2); +show_set_output(3); +show_set_output(4); +show_set_output(5); +show_set_output(6); +show_set_output(7); +show_set_output(8); /* should be MAX_INTERFACES - 1 */ + +#define show_input(value) \ +static ssize_t show_input##value(struct device *dev, char *buf) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + \ + return sprintf(buf, "%d\n", kit->inputs[value - 1]); \ +} \ +static DEVICE_ATTR(input##value, S_IRUGO, show_input##value, NULL); + +show_input(1); +show_input(2); +show_input(3); +show_input(4); +show_input(5); +show_input(6); +show_input(7); +show_input(8); /* should be MAX_INTERFACES - 1 */ + +#define show_sensor(value) \ +static ssize_t show_sensor##value(struct device *dev, char *buf) \ +{ \ + struct usb_interface *intf = to_usb_interface(dev); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ + \ + return sprintf(buf, "%d\n", kit->sensors[value - 1]); \ +} \ +static DEVICE_ATTR(sensor##value, S_IRUGO, show_sensor##value, NULL); + +show_sensor(1); +show_sensor(2); +show_sensor(3); +show_sensor(4); +show_sensor(5); +show_sensor(6); +show_sensor(7); +show_sensor(8); /* should be MAX_INTERFACES - 1 */ + +static int interfacekit_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct usb_device *dev = interface_to_usbdev(intf); + struct usb_host_interface *interface; + struct usb_endpoint_descriptor *endpoint; + struct phidget_interfacekit *kit; + struct driver_interfacekit *ifkit; + int pipe, maxp; + + ifkit = (struct driver_interfacekit *)id->driver_info; + if (!ifkit) + return -ENODEV; + + interface = intf->cur_altsetting; + if (interface->desc.bNumEndpoints != 1) + return -ENODEV; + + endpoint = &interface->endpoint[0].desc; + if (!(endpoint->bEndpointAddress & 0x80)) + return -ENODEV; + /* + * bmAttributes + */ + pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); + maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); + + kit = kmalloc(sizeof(*kit), GFP_KERNEL); + if (kit == NULL) { + dev_err(&intf->dev, "%s - out of memory\n", __FUNCTION__); + return -ENOMEM; + } + memset(kit, 0, sizeof(*kit)); + kit->ifkit = ifkit; + + kit->data = usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &kit->data_dma); + if (!kit->data) { + kfree(kit); + return -ENOMEM; + } + + kit->irq = usb_alloc_urb(0, GFP_KERNEL); + if (!kit->irq) { + usb_buffer_free(dev, 8, kit->data, kit->data_dma); + kfree(kit); + return -ENOMEM; + } + + kit->udev = usb_get_dev(dev); + kit->intf = intf; + usb_fill_int_urb(kit->irq, kit->udev, pipe, kit->data, + (maxp > 8 ? 8 : maxp), + interfacekit_irq, kit, endpoint->bInterval); + kit->irq->transfer_dma = kit->data_dma; + kit->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + + usb_set_intfdata(intf, kit); + + if (usb_submit_urb(kit->irq, GFP_KERNEL)) { + return -EIO; + } + + if (ifkit->outputs == 8) { + device_create_file(&intf->dev, &dev_attr_output1); + device_create_file(&intf->dev, &dev_attr_output2); + device_create_file(&intf->dev, &dev_attr_output3); + device_create_file(&intf->dev, &dev_attr_output4); + device_create_file(&intf->dev, &dev_attr_output5); + device_create_file(&intf->dev, &dev_attr_output6); + device_create_file(&intf->dev, &dev_attr_output7); + device_create_file(&intf->dev, &dev_attr_output8); + } + + if (ifkit->inputs >= 4) { + device_create_file(&intf->dev, &dev_attr_input1); + device_create_file(&intf->dev, &dev_attr_input2); + device_create_file(&intf->dev, &dev_attr_input3); + device_create_file(&intf->dev, &dev_attr_input4); + } + if (ifkit->inputs == 8) { + device_create_file(&intf->dev, &dev_attr_input5); + device_create_file(&intf->dev, &dev_attr_input6); + device_create_file(&intf->dev, &dev_attr_input7); + device_create_file(&intf->dev, &dev_attr_input8); + } + + if (ifkit->sensors >= 4) { + device_create_file(&intf->dev, &dev_attr_sensor1); + device_create_file(&intf->dev, &dev_attr_sensor2); + device_create_file(&intf->dev, &dev_attr_sensor3); + device_create_file(&intf->dev, &dev_attr_sensor4); + } + if (ifkit->sensors >= 7) { + device_create_file(&intf->dev, &dev_attr_sensor5); + device_create_file(&intf->dev, &dev_attr_sensor6); + device_create_file(&intf->dev, &dev_attr_sensor7); + } + if (ifkit->sensors == 8) { + device_create_file(&intf->dev, &dev_attr_sensor8); + } + + if (ifkit->has_lcd) + device_create_file(&intf->dev, &dev_attr_lcd); + + dev_info(&intf->dev, "USB PhidgetInterfaceKit %d/%d/%d attached\n", + ifkit->inputs, ifkit->outputs, ifkit->sensors); + + return 0; +} + +static void interfacekit_disconnect(struct usb_interface *interface) +{ + struct phidget_interfacekit *kit; + + kit = usb_get_intfdata(interface); + usb_set_intfdata(interface, NULL); + if (!kit) + return; + + if (kit->ifkit->outputs == MAX_INTERFACES) { + device_remove_file(&interface->dev, &dev_attr_output1); + device_remove_file(&interface->dev, &dev_attr_output2); + device_remove_file(&interface->dev, &dev_attr_output3); + device_remove_file(&interface->dev, &dev_attr_output4); + device_remove_file(&interface->dev, &dev_attr_output5); + device_remove_file(&interface->dev, &dev_attr_output6); + device_remove_file(&interface->dev, &dev_attr_output7); + device_remove_file(&interface->dev, &dev_attr_output7); + } + + if (kit->ifkit->inputs >= 4) { + device_remove_file(&interface->dev, &dev_attr_input1); + device_remove_file(&interface->dev, &dev_attr_input2); + device_remove_file(&interface->dev, &dev_attr_input3); + device_remove_file(&interface->dev, &dev_attr_input4); + } + if (kit->ifkit->inputs == 8) { + device_remove_file(&interface->dev, &dev_attr_input5); + device_remove_file(&interface->dev, &dev_attr_input6); + device_remove_file(&interface->dev, &dev_attr_input7); + device_remove_file(&interface->dev, &dev_attr_input8); + } + + if (kit->ifkit->sensors >= 4) { + device_remove_file(&interface->dev, &dev_attr_sensor1); + device_remove_file(&interface->dev, &dev_attr_sensor2); + device_remove_file(&interface->dev, &dev_attr_sensor3); + device_remove_file(&interface->dev, &dev_attr_sensor4); + } + if (kit->ifkit->sensors >= 7) { + device_remove_file(&interface->dev, &dev_attr_sensor5); + device_remove_file(&interface->dev, &dev_attr_sensor6); + device_remove_file(&interface->dev, &dev_attr_sensor7); + } + if (kit->ifkit->sensors == 8) { + device_remove_file(&interface->dev, &dev_attr_sensor8); + } + if (kit->ifkit->has_lcd) + device_create_file(&interface->dev, &dev_attr_lcd); + + dev_info(&interface->dev, "USB PhidgetInterfaceKit %d/%d/%d detached\n", + kit->ifkit->inputs, kit->ifkit->outputs, kit->ifkit->sensors); + + usb_kill_urb(kit->irq); + usb_free_urb(kit->irq); + usb_buffer_free(kit->udev, 8, kit->data, kit->data_dma); + + usb_put_dev(kit->udev); + kfree(kit); +} + +static struct usb_driver interfacekit_driver = { + .owner = THIS_MODULE, + .name = "phidgetkit", + .probe = interfacekit_probe, + .disconnect = interfacekit_disconnect, + .id_table = id_table +}; + +static int __init interfacekit_init(void) +{ + int retval = 0; + + retval = usb_register(&interfacekit_driver); + if (retval) + err("usb_register failed. Error number %d", retval); + + return retval; +} + +static void __exit interfacekit_exit(void) +{ + usb_deregister(&interfacekit_driver); +} + +module_init(interfacekit_init); +module_exit(interfacekit_exit); + +MODULE_AUTHOR(DRIVER_AUTHOR); +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/usb/misc/tiglusb.c b/drivers/usb/misc/tiglusb.c --- a/drivers/usb/misc/tiglusb.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/misc/tiglusb.c 2004-10-26 18:25:17 -07:00 @@ -4,7 +4,7 @@ * Target: Texas Instruments graphing calculators (http://lpg.ticalc.org). * * Copyright (C) 2001-2004: - * Romain Lievin + * Romain Lievin * Julien BLACHE * under the terms of the GNU General Public License. * @@ -14,7 +14,7 @@ * and the website at: http://lpg.ticalc.org/prj_usb/ * for more info. * - * History : + * History: * 1.0x, Romain & Julien: initial submit. * 1.03, Greg Kroah: modifications. * 1.04, Julien: clean-up & fixes; Romain: 2.4 backport. @@ -22,6 +22,7 @@ * 1.06, Romain: synched with 2.5, version/firmware changed (confusing). * 1.07, Romain: fixed bad use of usb_clear_halt (invalid argument); * timeout argument checked in ioctl + clean-up. + * 1.08, Romain: added support of USB port embedded on some TI's handhelds. */ #include @@ -41,7 +42,7 @@ /* * Version Information */ -#define DRIVER_VERSION "1.07" +#define DRIVER_VERSION "1.08" #define DRIVER_AUTHOR "Romain Lievin & Julien Blache " #define DRIVER_DESC "TI-GRAPH LINK USB (aka SilverLink) driver" #define DRIVER_LICENSE "GPL" @@ -115,8 +116,7 @@ return -EBUSY; } - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout (HZ / 2); + msleep_interruptible(500); if (signal_pending (current)) { return -EAGAIN; @@ -178,11 +178,11 @@ if (!s->dev) return -EIO; - buffer = kmalloc(BULK_RCV_MAX, GFP_KERNEL); + buffer = kmalloc (s->max_ps, GFP_KERNEL); if (!buffer) return -ENOMEM; - bytes_to_read = (count >= BULK_RCV_MAX) ? BULK_RCV_MAX : count; + bytes_to_read = (count >= s->max_ps) ? s->max_ps : count; pipe = usb_rcvbulkpipe (s->dev, 1); result = usb_bulk_msg (s->dev, pipe, buffer, bytes_to_read, @@ -235,11 +235,11 @@ if (!s->dev) return -EIO; - buffer = kmalloc(BULK_SND_MAX, GFP_KERNEL); + buffer = kmalloc (s->max_ps, GFP_KERNEL); if (!buffer) return -ENOMEM; - bytes_to_write = (count >= BULK_SND_MAX) ? BULK_SND_MAX : count; + bytes_to_write = (count >= s->max_ps) ? s->max_ps : count; if (copy_from_user (buffer, buf, bytes_to_write)) { ret = -EFAULT; goto out; @@ -309,6 +309,15 @@ if (clear_pipes (s->dev)) ret = -EIO; break; + case IOCTL_TIUSB_GET_MAXPS: + if (copy_to_user((int *) arg, &s->max_ps, sizeof(int))) + return -EFAULT; + break; + case IOCTL_TIUSB_GET_DEVID: + if (copy_to_user((int *) arg, &s->dev->descriptor.idProduct, + sizeof(int))) + return -EFAULT; + break; default: ret = -ENOTTY; break; @@ -341,6 +350,9 @@ int minor = -1; int i, err = 0; ptiglusb_t s; + struct usb_host_config *conf; + struct usb_host_interface *ifdata = NULL; + int max_ps; dbg ("probing vendor id 0x%x, device id 0x%x", dev->descriptor.idVendor, dev->descriptor.idProduct); @@ -355,19 +367,31 @@ goto out; } - if ((dev->descriptor.idProduct != 0xe001) - && (dev->descriptor.idVendor != 0x451)) { + if (dev->descriptor.idVendor != 0x451) { err = -ENODEV; goto out; } - // NOTE: it's already in this config, this shouldn't be needed. - // is this working around some hardware bug? - if (usb_reset_configuration (dev) < 0) { - err ("tiglusb_probe: reset_configuration failed"); - err = -ENODEV; - goto out; - } + if ((dev->descriptor.idProduct != 0xe001) && + (dev->descriptor.idProduct != 0xe004) && + (dev->descriptor.idProduct != 0xe008)) { + err = -ENODEV; + goto out; + } + + /* + * TI introduced some new handhelds with embedded USB port. + * Port advertises same config as SilverLink cable but with a + * different maximum packet size (64 rather than 32). + */ + + conf = dev->actconfig; + ifdata = conf->interface[0]->cur_altsetting; + max_ps = ifdata->endpoint[0].desc.wMaxPacketSize; + + info("max packet size of %d/%d bytes\n", + ifdata->endpoint[0].desc.wMaxPacketSize, + ifdata->endpoint[1].desc.wMaxPacketSize); /* * Find a tiglusb struct @@ -390,6 +414,7 @@ down (&s->mutex); s->remove_pending = 0; s->dev = dev; + s->max_ps = max_ps; up (&s->mutex); dbg ("bound to interface"); diff -Nru a/drivers/usb/misc/tiglusb.h b/drivers/usb/misc/tiglusb.h --- a/drivers/usb/misc/tiglusb.h 2004-10-26 18:25:19 -07:00 +++ b/drivers/usb/misc/tiglusb.h 2004-10-26 18:25:19 -07:00 @@ -18,12 +18,6 @@ #define MAXTIGL 16 /* - * Max. packetsize for IN and OUT pipes - */ -#define BULK_RCV_MAX 32 -#define BULK_SND_MAX 32 - -/* * The driver context... */ @@ -42,6 +36,8 @@ driver_state_t state; /* started/stopped */ int opened; /* tru if open */ int remove_pending; + + int max_ps; /* max packet size */ } tiglusb_t, *ptiglusb_t; #endif diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c --- a/drivers/usb/net/kaweth.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/net/kaweth.c 2004-10-26 18:25:18 -07:00 @@ -246,7 +246,7 @@ struct kaweth_ethernet_configuration configuration; struct net_device_stats stats; -} __attribute__ ((packed)); +}; /**************************************************************** @@ -651,7 +651,7 @@ ****************************************************************/ static int kaweth_open(struct net_device *net) { - struct kaweth_device *kaweth = (struct kaweth_device *)net->priv; + struct kaweth_device *kaweth = netdev_priv(net); int res; kaweth_dbg("Opening network device."); @@ -689,7 +689,7 @@ ****************************************************************/ static int kaweth_close(struct net_device *net) { - struct kaweth_device *kaweth = net->priv; + struct kaweth_device *kaweth = netdev_priv(net); netif_stop_queue(net); @@ -729,7 +729,8 @@ struct sk_buff *skb = kaweth->tx_skb; if (unlikely(urb->status != 0)) - kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status); + if (urb->status != -ENOENT) + kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status); netif_wake_queue(kaweth->net); dev_kfree_skb_irq(skb); @@ -740,7 +741,7 @@ ****************************************************************/ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net) { - struct kaweth_device *kaweth = net->priv; + struct kaweth_device *kaweth = netdev_priv(net); __le16 *private_header; int res; @@ -811,7 +812,7 @@ ****************************************************************/ static void kaweth_set_rx_mode(struct net_device *net) { - struct kaweth_device *kaweth = net->priv; + struct kaweth_device *kaweth = netdev_priv(net); __u16 packet_filter_bitmap = KAWETH_PACKET_FILTER_DIRECTED | KAWETH_PACKET_FILTER_BROADCAST | @@ -868,7 +869,8 @@ ****************************************************************/ static struct net_device_stats *kaweth_netdev_stats(struct net_device *dev) { - return &((struct kaweth_device *)dev->priv)->stats; + struct kaweth_device *kaweth = netdev_priv(dev); + return &kaweth->stats; } /**************************************************************** @@ -876,7 +878,7 @@ ****************************************************************/ static void kaweth_tx_timeout(struct net_device *net) { - struct kaweth_device *kaweth = net->priv; + struct kaweth_device *kaweth = netdev_priv(net); kaweth_warn("%s: Tx timed out. Resetting.", net->name); kaweth->stats.tx_errors++; @@ -911,12 +913,14 @@ (int)dev->descriptor.bLength, (int)dev->descriptor.bDescriptorType); - if(!(kaweth = kmalloc(sizeof(struct kaweth_device), GFP_KERNEL))) + netdev = alloc_etherdev(sizeof(*kaweth)); + if (!netdev) return -ENOMEM; - memset(kaweth, 0, sizeof(struct kaweth_device)); - + kaweth = netdev_priv(netdev); kaweth->dev = dev; + kaweth->net = netdev; + spin_lock_init(&kaweth->device_lock); init_waitqueue_head(&kaweth->term_wait); @@ -941,9 +945,7 @@ 100, 2)) < 0) { kaweth_err("Error downloading firmware (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; } if ((result = kaweth_download_firmware(kaweth, @@ -952,9 +954,7 @@ 100, 3)) < 0) { kaweth_err("Error downloading firmware fix (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; } if ((result = kaweth_download_firmware(kaweth, @@ -963,9 +963,8 @@ 126, 2)) < 0) { kaweth_err("Error downloading trigger code (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; + } if ((result = kaweth_download_firmware(kaweth, @@ -974,23 +973,20 @@ 126, 3)) < 0) { kaweth_err("Error downloading trigger code fix (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; } if ((result = kaweth_trigger_firmware(kaweth, 126)) < 0) { kaweth_err("Error triggering firmware (%d)", result); - free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); - return -EIO; + goto err_fw; } /* Device will now disappear for a moment... */ kaweth_info("Firmware loaded. I'll be back..."); +err_fw: free_page((unsigned long)kaweth->firmware_buf); - kfree(kaweth); + free_netdev(netdev); return -EIO; } @@ -998,8 +994,7 @@ if(result < 0) { kaweth_err("Error reading configuration (%d), no net device created", result); - kfree(kaweth); - return -EIO; + goto err_free_netdev; } kaweth_info("Statistics collection: %x", kaweth->configuration.statistics_mask); @@ -1017,18 +1012,17 @@ &bcast_addr, sizeof(bcast_addr))) { kaweth_err("Firmware not functioning properly, no net device created"); - kfree(kaweth); - return -EIO; + goto err_free_netdev; } if(kaweth_set_urb_size(kaweth, KAWETH_BUF_SIZE) < 0) { kaweth_dbg("Error setting URB size"); - goto err_no_netdev; + goto err_free_netdev; } if(kaweth_set_sofs_wait(kaweth, KAWETH_SOFS_TO_WAIT) < 0) { kaweth_err("Error setting SOFS wait"); - goto err_no_netdev; + goto err_free_netdev; } result = kaweth_set_receive_filter(kaweth, @@ -1038,20 +1032,14 @@ if(result < 0) { kaweth_err("Error setting receive filter"); - kfree(kaweth); - return -EIO; + goto err_free_netdev; } kaweth_dbg("Initializing net device."); - if (!(netdev = alloc_etherdev(0))) { - kfree(kaweth); - return -ENOMEM; - } - kaweth->tx_urb = usb_alloc_urb(0, GFP_KERNEL); if (!kaweth->tx_urb) - goto err_no_urb; + goto err_free_netdev; kaweth->rx_urb = usb_alloc_urb(0, GFP_KERNEL); if (!kaweth->rx_urb) goto err_only_tx; @@ -1072,26 +1060,23 @@ if (!kaweth->rx_buf) goto err_all_but_rxbuf; - kaweth->net = netdev; - memcpy(kaweth->net->broadcast, &bcast_addr, sizeof(bcast_addr)); - memcpy(kaweth->net->dev_addr, - &kaweth->configuration.hw_addr, + memcpy(netdev->broadcast, &bcast_addr, sizeof(bcast_addr)); + memcpy(netdev->dev_addr, &kaweth->configuration.hw_addr, sizeof(kaweth->configuration.hw_addr)); - kaweth->net->priv = kaweth; - kaweth->net->open = kaweth_open; - kaweth->net->stop = kaweth_close; - - kaweth->net->watchdog_timeo = KAWETH_TX_TIMEOUT; - kaweth->net->tx_timeout = kaweth_tx_timeout; - - kaweth->net->hard_start_xmit = kaweth_start_xmit; - kaweth->net->set_multicast_list = kaweth_set_rx_mode; - kaweth->net->get_stats = kaweth_netdev_stats; - kaweth->net->mtu = le16_to_cpu(kaweth->configuration.segment_size); - SET_ETHTOOL_OPS(kaweth->net, &ops); + netdev->open = kaweth_open; + netdev->stop = kaweth_close; + + netdev->watchdog_timeo = KAWETH_TX_TIMEOUT; + netdev->tx_timeout = kaweth_tx_timeout; + + netdev->hard_start_xmit = kaweth_start_xmit; + netdev->set_multicast_list = kaweth_set_rx_mode; + netdev->get_stats = kaweth_netdev_stats; + netdev->mtu = le16_to_cpu(kaweth->configuration.segment_size); + SET_ETHTOOL_OPS(netdev, &ops); - memset(&kaweth->stats, 0, sizeof(kaweth->stats)); + /* kaweth is zeroed as part of alloc_netdev */ INIT_WORK(&kaweth->lowmem_work, kaweth_resubmit_tl, (void *)kaweth); @@ -1128,10 +1113,9 @@ usb_free_urb(kaweth->rx_urb); err_only_tx: usb_free_urb(kaweth->tx_urb); -err_no_urb: +err_free_netdev: free_netdev(netdev); -err_no_netdev: - kfree(kaweth); + return -EIO; } @@ -1141,6 +1125,7 @@ static void kaweth_disconnect(struct usb_interface *intf) { struct kaweth_device *kaweth = usb_get_intfdata(intf); + struct net_device *netdev; kaweth_info("Unregistering"); @@ -1149,40 +1134,23 @@ kaweth_warn("unregistering non-existant device"); return; } - + netdev = kaweth->net; kaweth->removed = 1; usb_kill_urb(kaweth->irq_urb); usb_kill_urb(kaweth->rx_urb); + usb_kill_urb(kaweth->tx_urb); - /* we need to wait for the urb to be cancelled, if it is active */ - spin_lock(&kaweth->device_lock); - if (usb_unlink_urb(kaweth->tx_urb) == -EINPROGRESS) { - spin_unlock(&kaweth->device_lock); - wait_event(kaweth->term_wait, kaweth->end); - } else { - spin_unlock(&kaweth->device_lock); - } - - if(kaweth->net) { - if(kaweth->net->flags & IFF_UP) { - kaweth_dbg("Closing net device"); - dev_close(kaweth->net); - } - - kaweth_dbg("Unregistering net device"); - unregister_netdev(kaweth->net); - free_netdev(kaweth->net); - } + kaweth_dbg("Unregistering net device"); + unregister_netdev(netdev); usb_free_urb(kaweth->rx_urb); usb_free_urb(kaweth->tx_urb); usb_free_urb(kaweth->irq_urb); - usb_buffer_free(kaweth->dev, KAWETH_BUF_SIZE, (void *)kaweth->rx_buf, kaweth->rxbufferhandle); usb_buffer_free(kaweth->dev, INTBUFFERSIZE, (void *)kaweth->intbuffer, kaweth->intbufferhandle); - kfree(kaweth); + free_netdev(netdev); } diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/net/usbnet.c 2004-10-26 18:25:18 -07:00 @@ -567,7 +567,7 @@ static void ax8817x_set_multicast(struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); struct ax8817x_data *data = (struct ax8817x_data *)&dev->data; u8 rx_ctl = 0x8c; @@ -610,7 +610,7 @@ static int ax8817x_mdio_read(struct net_device *netdev, int phy_id, int loc) { - struct usbnet *dev = netdev->priv; + struct usbnet *dev = netdev_priv(netdev); u16 res; u8 buf[1]; @@ -623,7 +623,7 @@ static void ax8817x_mdio_write(struct net_device *netdev, int phy_id, int loc, int val) { - struct usbnet *dev = netdev->priv; + struct usbnet *dev = netdev_priv(netdev); u16 res = val; u8 buf[1]; @@ -634,7 +634,7 @@ static void ax8817x_get_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); u8 opt; if (ax8817x_read_cmd(dev, AX_CMD_READ_MONITOR_MODE, 0, 0, 1, &opt) < 0) { @@ -654,7 +654,7 @@ static int ax8817x_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); u8 opt = 0; u8 buf[1]; @@ -675,7 +675,7 @@ static int ax8817x_get_eeprom(struct net_device *net, struct ethtool_eeprom *eeprom, u8 *data) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); u16 *ebuf = (u16 *)data; int i; @@ -704,14 +704,14 @@ static int ax8817x_get_settings(struct net_device *net, struct ethtool_cmd *cmd) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); return mii_ethtool_gset(&dev->mii,cmd); } static int ax8817x_set_settings(struct net_device *net, struct ethtool_cmd *cmd) { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); return mii_ethtool_sset(&dev->mii,cmd); } @@ -2276,7 +2276,7 @@ static int usbnet_change_mtu (struct net_device *net, int new_mtu) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); if (new_mtu <= MIN_PACKET || new_mtu > MAX_PACKET) return -EINVAL; @@ -2302,7 +2302,8 @@ static struct net_device_stats *usbnet_get_stats (struct net_device *net) { - return &((struct usbnet *) net->priv)->stats; + struct usbnet *dev = netdev_priv(net); + return &dev->stats; } /*-------------------------------------------------------------------------*/ @@ -2569,7 +2570,7 @@ static int usbnet_stop (struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); int temp; DECLARE_WAIT_QUEUE_HEAD (unlink_wakeup); DECLARE_WAITQUEUE (wait, current); @@ -2616,7 +2617,7 @@ static int usbnet_open (struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); int retval = 0; struct driver_info *info = dev->driver_info; @@ -2666,7 +2667,7 @@ static void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) { - struct usbnet *dev = net->priv; + struct usbnet *dev = netdev_priv(net); strncpy (info->driver, driver_name, sizeof info->driver); strncpy (info->version, DRIVER_VERSION, sizeof info->version); @@ -2677,7 +2678,7 @@ static u32 usbnet_get_link (struct net_device *net) { - struct usbnet *dev = net->priv; + struct usbnet *dev = netdev_priv(net); /* If a check_connect is defined, return it's results */ if (dev->driver_info->check_connect) @@ -2689,14 +2690,14 @@ static u32 usbnet_get_msglevel (struct net_device *net) { - struct usbnet *dev = net->priv; + struct usbnet *dev = netdev_priv(net); return dev->msg_level; } static void usbnet_set_msglevel (struct net_device *net, u32 level) { - struct usbnet *dev = net->priv; + struct usbnet *dev = netdev_priv(net); dev->msg_level = level; } @@ -2705,7 +2706,7 @@ { #ifdef NEED_MII { - struct usbnet *dev = (struct usbnet *)net->priv; + struct usbnet *dev = netdev_priv(net); if (dev->mii.mdio_read != NULL && dev->mii.mdio_write != NULL) return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); @@ -2817,7 +2818,7 @@ static void usbnet_tx_timeout (struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); unlink_urbs (dev, &dev->txq); tasklet_schedule (&dev->bh); @@ -2829,7 +2830,7 @@ static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) { - struct usbnet *dev = (struct usbnet *) net->priv; + struct usbnet *dev = netdev_priv(net); int length; int retval = NET_XMIT_SUCCESS; struct urb *urb = NULL; @@ -3014,6 +3015,7 @@ { struct usbnet *dev; struct usb_device *xdev; + struct net_device *net; dev = usb_get_intfdata(intf); usb_set_intfdata(intf, NULL); @@ -3026,7 +3028,8 @@ xdev->bus->bus_name, xdev->devpath, dev->driver_info->description); - unregister_netdev (dev->net); + net = dev->net; + unregister_netdev (net); /* we don't hold rtnl here ... */ flush_scheduled_work (); @@ -3034,8 +3037,7 @@ if (dev->driver_info->unbind) dev->driver_info->unbind (dev, intf); - free_netdev(dev->net); - kfree (dev); + free_netdev(net); usb_put_dev (xdev); } @@ -3069,12 +3071,13 @@ status = -ENOMEM; // set up our own records - if (!(dev = kmalloc (sizeof *dev, GFP_KERNEL))) { + net = alloc_etherdev(sizeof(*dev)); + if (!net) { dbg ("can't kmalloc dev"); goto out; } - memset (dev, 0, sizeof *dev); + dev = netdev_priv(net); dev->udev = xdev; dev->driver_info = info; dev->msg_level = msg_level; @@ -3088,14 +3091,8 @@ dev->delay.data = (unsigned long) dev; init_timer (&dev->delay); - // set up network interface records - net = alloc_etherdev(0); - if (!net) - goto out1; - SET_MODULE_OWNER (net); dev->net = net; - net->priv = dev; strcpy (net->name, "usb%d"); memcpy (net->dev_addr, node_id, sizeof node_id); @@ -3144,8 +3141,8 @@ dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1); - SET_NETDEV_DEV(dev->net, &udev->dev); - status = register_netdev (dev->net); + SET_NETDEV_DEV(net, &udev->dev); + status = register_netdev (net); if (status) goto out3; devinfo (dev, "register usbnet at usb-%s-%s, %s", @@ -3156,16 +3153,15 @@ usb_set_intfdata (udev, dev); // start as if the link is up - netif_device_attach (dev->net); + netif_device_attach (net); return 0; out3: if (info->unbind) info->unbind (dev, udev); - free_netdev(net); out1: - kfree(dev); + free_netdev(net); out: usb_put_dev(xdev); return status; @@ -3251,6 +3247,10 @@ }, { // Sitecom LN-029 "USB 2.0 10/100 Ethernet adapter" USB_DEVICE (0x6189, 0x182d), + .driver_info = (unsigned long) &ax8817x_info, +}, { + // corega FEther USB2-TX + USB_DEVICE (0x07aa, 0x0017), .driver_info = (unsigned long) &ax8817x_info, }, { // Surecom EP-1427X-2 diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c --- a/drivers/usb/serial/belkin_sa.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/serial/belkin_sa.c 2004-10-26 18:25:18 -07:00 @@ -607,6 +607,7 @@ MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); +MODULE_VERSION( DRIVER_VERSION ); MODULE_LICENSE("GPL"); module_param(debug, bool, S_IRUGO | S_IWUSR); diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c --- a/drivers/usb/serial/cyberjack.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/serial/cyberjack.c 2004-10-26 18:25:18 -07:00 @@ -502,6 +502,7 @@ MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); +MODULE_VERSION( DRIVER_VERSION ); MODULE_LICENSE("GPL"); module_param(debug, bool, S_IRUGO | S_IWUSR); diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c --- a/drivers/usb/serial/pl2303.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/serial/pl2303.c 2004-10-26 18:25:18 -07:00 @@ -90,6 +90,7 @@ { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) }, { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) }, { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) }, + { USB_DEVICE(PHAROS_VENDOR_ID, PHAROS_PRODUCT_ID) }, { } /* Terminating entry */ }; @@ -1188,6 +1189,7 @@ module_exit(pl2303_exit); MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL"); module_param(debug, bool, S_IRUGO | S_IWUSR); diff -Nru a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h --- a/drivers/usb/serial/pl2303.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/serial/pl2303.h 2004-10-26 18:25:18 -07:00 @@ -50,3 +50,6 @@ #define SAMSUNG_VENDOR_ID 0x04e8 #define SAMSUNG_PRODUCT_ID 0x8001 +/* Pharos / Microsoft GPS puck */ +#define PHAROS_VENDOR_ID 0x067b +#define PHAROS_PRODUCT_ID 0xaaa0 diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c --- a/drivers/usb/serial/usb-serial.c 2004-10-26 18:25:19 -07:00 +++ b/drivers/usb/serial/usb-serial.c 2004-10-26 18:25:19 -07:00 @@ -452,18 +452,12 @@ port = serial->port[i]; if (!port) continue; - if (port->read_urb) { - usb_kill_urb(port->read_urb); - usb_free_urb(port->read_urb); - } - if (port->write_urb) { - usb_kill_urb(port->write_urb); - usb_free_urb(port->write_urb); - } - if (port->interrupt_in_urb) { - usb_kill_urb(port->interrupt_in_urb); - usb_free_urb(port->interrupt_in_urb); - } + usb_kill_urb(port->read_urb); + usb_free_urb(port->read_urb); + usb_kill_urb(port->write_urb); + usb_free_urb(port->write_urb); + usb_kill_urb(port->interrupt_in_urb); + usb_free_urb(port->interrupt_in_urb); kfree(port->bulk_in_buffer); kfree(port->bulk_out_buffer); kfree(port->interrupt_in_buffer); @@ -799,18 +793,12 @@ struct usb_serial_port *port = to_usb_serial_port(dev); dbg ("%s - %s", __FUNCTION__, dev->bus_id); - if (port->read_urb) { - usb_kill_urb(port->read_urb); - usb_free_urb(port->read_urb); - } - if (port->write_urb) { - usb_kill_urb(port->write_urb); - usb_free_urb(port->write_urb); - } - if (port->interrupt_in_urb) { - usb_kill_urb(port->interrupt_in_urb); - usb_free_urb(port->interrupt_in_urb); - } + usb_kill_urb(port->read_urb); + usb_free_urb(port->read_urb); + usb_kill_urb(port->write_urb); + usb_free_urb(port->write_urb); + usb_kill_urb(port->interrupt_in_urb); + usb_free_urb(port->interrupt_in_urb); kfree(port->bulk_in_buffer); kfree(port->bulk_out_buffer); kfree(port->interrupt_in_buffer); diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c 2004-10-26 18:25:17 -07:00 +++ b/drivers/usb/serial/visor.c 2004-10-26 18:25:17 -07:00 @@ -381,10 +381,17 @@ .read_bulk_callback = visor_read_bulk_callback, }; +struct visor_private { + spinlock_t lock; + int bytes_in; + int bytes_out; + int outstanding_urbs; +}; -static int bytes_in; -static int bytes_out; +/* number of outstanding urbs to prevent userspace DoS from happening */ +#define URB_UPPER_LIMIT 42 +static int stats; /****************************************************************************** * Handspring Visor specific driver functions @@ -392,6 +399,8 @@ static int visor_open (struct usb_serial_port *port, struct file *filp) { struct usb_serial *serial = port->serial; + struct visor_private *priv = usb_get_serial_port_data(port); + unsigned long flags; int result = 0; dbg("%s - port %d", __FUNCTION__, port->number); @@ -402,8 +411,11 @@ return -ENODEV; } - bytes_in = 0; - bytes_out = 0; + spin_lock_irqsave(&priv->lock, flags); + priv->bytes_in = 0; + priv->bytes_out = 0; + priv->outstanding_urbs = 0; + spin_unlock_irqrestore(&priv->lock, flags); /* * Force low_latency on so that our tty_push actually forces the data @@ -441,6 +453,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp) { + struct visor_private *priv = usb_get_serial_port_data(port); unsigned char *transfer_buffer; dbg("%s - port %d", __FUNCTION__, port->number); @@ -461,20 +474,32 @@ kfree (transfer_buffer); } - /* Uncomment the following line if you want to see some statistics in your syslog */ - /* dev_info (&port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */ + if (stats) + dev_info(&port->dev, "Bytes In = %d Bytes Out = %d\n", + priv->bytes_in, priv->bytes_out); } static int visor_write (struct usb_serial_port *port, const unsigned char *buf, int count) { + struct visor_private *priv = usb_get_serial_port_data(port); struct usb_serial *serial = port->serial; struct urb *urb; unsigned char *buffer; + unsigned long flags; int status; dbg("%s - port %d", __FUNCTION__, port->number); + spin_lock_irqsave(&priv->lock, flags); + if (priv->outstanding_urbs > URB_UPPER_LIMIT) { + spin_unlock_irqrestore(&priv->lock, flags); + dev_dbg(&port->dev, "write limit hit\n"); + return 0; + } + ++priv->outstanding_urbs; + spin_unlock_irqrestore(&priv->lock, flags); + buffer = kmalloc (count, GFP_ATOMIC); if (!buffer) { dev_err(&port->dev, "out of memory\n"); @@ -506,7 +531,10 @@ count = status; kfree (buffer); } else { - bytes_out += count; + spin_lock_irqsave(&priv->lock, flags); + ++priv->outstanding_urbs; + priv->bytes_out += count; + spin_unlock_irqrestore(&priv->lock, flags); } /* we are done with this urb, so let the host driver @@ -547,6 +575,8 @@ static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; + struct visor_private *priv = usb_get_serial_port_data(port); + unsigned long flags; /* free up the transfer buffer, as usb_free_urb() does not do this */ kfree (urb->transfer_buffer); @@ -557,6 +587,10 @@ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); + spin_lock_irqsave(&priv->lock, flags); + --priv->outstanding_urbs; + spin_unlock_irqrestore(&priv->lock, flags); + schedule_work(&port->work); } @@ -564,8 +598,10 @@ static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; - struct tty_struct *tty; + struct visor_private *priv = usb_get_serial_port_data(port); unsigned char *data = urb->transfer_buffer; + struct tty_struct *tty; + unsigned long flags; int i; int result; @@ -590,7 +626,9 @@ } tty_flip_buffer_push(tty); } - bytes_in += urb->actual_length; + spin_lock_irqsave(&priv->lock, flags); + priv->bytes_in += urb->actual_length; + spin_unlock_irqrestore(&priv->lock, flags); /* Continue trying to always read */ usb_fill_bulk_urb (port->read_urb, port->serial->dev, @@ -825,6 +863,22 @@ return num_ports; } +static int generic_startup(struct usb_serial *serial) +{ + struct visor_private *priv; + int i; + + for (i = 0; i < serial->num_ports; ++i) { + priv = kmalloc (sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + memset (priv, 0x00, sizeof(*priv)); + spin_lock_init(&priv->lock); + usb_set_serial_port_data(serial->port[i], priv); + } + return 0; +} + static int clie_3_5_startup (struct usb_serial *serial) { struct device *dev = &serial->dev->dev; @@ -864,7 +918,7 @@ return -EIO; } - return 0; + return generic_startup(serial); } static int treo_attach (struct usb_serial *serial) @@ -903,7 +957,7 @@ COPY_PORT(serial->port[1], swap_port); kfree(swap_port); - return 0; + return generic_startup(serial); } static int clie_5_attach (struct usb_serial *serial) @@ -924,7 +978,7 @@ /* port 0 now uses the modified endpoint Address */ serial->port[0]->bulk_out_endpointAddress = serial->port[1]->bulk_out_endpointAddress; - return 0; + return generic_startup(serial); } static void visor_shutdown (struct usb_serial *serial) @@ -1080,8 +1134,11 @@ module_param(debug, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Debug enabled or not"); +module_param(stats, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(stats, "Enables statistics or not"); module_param(vendor, ushort, 0); MODULE_PARM_DESC(vendor, "User specified vendor ID"); module_param(product, ushort, 0); MODULE_PARM_DESC(product, "User specified product ID"); + diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c --- a/drivers/usb/storage/scsiglue.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/usb/storage/scsiglue.c 2004-10-26 18:25:18 -07:00 @@ -175,7 +175,7 @@ US_DEBUGP("%s called\n", __FUNCTION__); srb->host_scribble = (unsigned char *)us; - /* enqueue the command */ + /* check for state-transition errors */ if (us->sm_state != US_STATE_IDLE || us->srb != NULL) { printk(KERN_ERR USB_STORAGE "Error in %s: " "state = %d, us->srb = %p\n", @@ -183,10 +183,17 @@ return SCSI_MLQUEUE_HOST_BUSY; } + /* fail the command if we are disconnecting */ + if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { + US_DEBUGP("Fail command during disconnect\n"); + srb->result = DID_NO_CONNECT << 16; + done(srb); + return 0; + } + + /* enqueue the command and wake up the control thread */ srb->scsi_done = done; us->srb = srb; - - /* wake up the process task */ up(&(us->sema)); return 0; diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig --- a/drivers/video/Kconfig 2004-10-26 18:25:17 -07:00 +++ b/drivers/video/Kconfig 2004-10-26 18:25:17 -07:00 @@ -41,7 +41,7 @@ config FB_MODE_HELPERS bool "Enable Video Mode Handling Helpers" depends on FB - default y + default n ---help--- This enables functions for handling video modes using the Generalized Timing Formula and the EDID parser. A few drivers rely @@ -61,10 +61,10 @@ parameters in terms of number of tiles instead of number of pixels. For example, to draw a single character, instead of using bitmaps, an index to an array of bitmaps will be used. To clear or move a - rectangular section of a screen, the rectangle willbe described in + rectangular section of a screen, the rectangle will be described in terms of number of tiles in the x- and y-axis. - This is particularly important to one driver, the matroxfb. If + This is particularly important to one driver, matroxfb. If unsure, say N. config FB_CIRRUS @@ -517,6 +517,27 @@ If unsure, say N. +config FB_INTEL + tristate "Intel 830M/845G/852GM/855GM/865G support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI + select AGP + select AGP_INTEL + help + This driver supports the on-board graphics built in to the Intel + 830M/845G/852GM/855GM/865G chipsets. + Say Y if you have and plan to use such a board. + + To compile this driver as a module, choose M here: the + module will be called intelfb. + +config FB_INTEL_DEBUG + bool "Intel driver Debug Messages" + depends on FB_INTEL + ---help--- + Say Y here if you want the Intel driver to output all sorts + of debugging informations to provide to the maintainer when + something goes wrong. + config FB_MATROX tristate "Matrox acceleration" depends on FB && PCI @@ -750,6 +771,19 @@ framebuffer device. The ATI product support page for these boards is at . +config FB_ATY_GENERIC_LCD + bool "Mach64 generic LCD support (EXPERIMENTAL)" + depends on FB_ATY_CT + help + Say Y if you have a laptop with an ATI Rage LT PRO, Rage Mobility, + Rage XC, or Rage XL chipset. + +config FB_ATY_XL_INIT + bool "Rage XL No-BIOS Init support" + depends on FB_ATY_CT + help + Say Y here to support booting a Rage XL without BIOS support. + config FB_ATY_GX bool "Mach64 GX support" if PCI depends on FB_ATY @@ -761,11 +795,41 @@ is at . -config FB_ATY_XL_INIT - bool " Rage XL No-BIOS Init support" if FB_ATY_CT - depends on FB_ATY +config FB_SAVAGE + tristate "S3 Savage support" + depends on FB && PCI && EXPERIMENTAL + select I2C_ALGOBIT if FB_SAVAGE_I2C + select I2C if FB_SAVAGE_I2C + select FB_MODE_HELPERS help - Say Y here to support booting a Rage XL without BIOS support. + This driver supports notebooks and computers with S3 Savage PCI/AGP + chips. + + Say Y if you have such a graphics card. + + To compile this driver as a module, choose M here; the module + will be called savagefb. + +config FB_SAVAGE_I2C + bool "Enable DDC2 Support" + depends on FB_SAVAGE + help + This enables I2C support for S3 Savage Chipsets. This is used + only for getting EDID information from the attached display + allowing for robust video mode handling and switching. + + Because fbdev-2.6 requires that drivers must be able to + independently validate video mode parameters, you should say Y + here. + +config FB_SAVAGE_ACCEL + bool "Enable Console Acceleration" + depends on FB_SAVAGE + default n + help + This option will compile in console acceleration support. If + the resulting framebuffer console has bothersome glitches, then + choose N here. config FB_SIS tristate "SiS acceleration" diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile --- a/drivers/video/Makefile 2004-10-26 18:25:17 -07:00 +++ b/drivers/video/Makefile 2004-10-26 18:25:17 -07:00 @@ -29,9 +29,13 @@ obj-$(CONFIG_FB_RADEON) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_SIS) += sis/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_KYRO) += kyro/ cfbfillrect.o cfbcopyarea.o cfbimgblt.o - +obj-$(CONFIG_FB_SAVAGE) += savage/ cfbfillrect.o cfbcopyarea.o \ + cfbimgblt.o obj-$(CONFIG_FB_I810) += cfbcopyarea.o cfbfillrect.o cfbimgblt.o \ vgastate.o +obj-$(CONFIG_FB_INTEL) += cfbfillrect.o cfbcopyarea.o \ + cfbimgblt.o + obj-$(CONFIG_FB_RADEON_OLD) += radeonfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o vgastate.o obj-$(CONFIG_FB_VIRGE) += virgefb.o diff -Nru a/drivers/video/aty/ati_ids.h b/drivers/video/aty/ati_ids.h --- a/drivers/video/aty/ati_ids.h 2004-10-26 18:25:17 -07:00 +++ b/drivers/video/aty/ati_ids.h 2004-10-26 18:25:17 -07:00 @@ -64,6 +64,7 @@ #define PCI_CHIP_MACH64LQ 0x4C51 #define PCI_CHIP_MACH64LR 0x4C52 #define PCI_CHIP_MACH64LS 0x4C53 +#define PCI_CHIP_MACH64LT 0x4C54 #define PCI_CHIP_RADEON_LW 0x4C57 #define PCI_CHIP_RADEON_LX 0x4C58 #define PCI_CHIP_RADEON_LY 0x4C59 diff -Nru a/drivers/video/aty/atyfb.h b/drivers/video/aty/atyfb.h --- a/drivers/video/aty/atyfb.h 2004-10-26 18:25:18 -07:00 +++ b/drivers/video/aty/atyfb.h 2004-10-26 18:25:18 -07:00 @@ -3,6 +3,8 @@ */ #include +#include +#include /* * Elements of the hardware specific atyfb_par structure */ @@ -10,16 +12,60 @@ struct crtc { u32 vxres; u32 vyres; + u32 xoffset; + u32 yoffset; + u32 bpp; u32 h_tot_disp; u32 h_sync_strt_wid; u32 v_tot_disp; u32 v_sync_strt_wid; + u32 vline_crnt_vline; u32 off_pitch; u32 gen_cntl; u32 dp_pix_width; /* acceleration */ u32 dp_chain_mask; /* acceleration */ +#ifdef CONFIG_FB_ATY_GENERIC_LCD + u32 horz_stretching; + u32 vert_stretching; + u32 ext_vert_stretch; + u32 shadow_h_tot_disp; + u32 shadow_h_sync_strt_wid; + u32 shadow_v_tot_disp; + u32 shadow_v_sync_strt_wid; + u32 lcd_gen_cntl; + u32 lcd_config_panel; + u32 lcd_index; +#endif +}; + +struct aty_interrupt { + wait_queue_head_t wait; + unsigned int count; + int pan_display; +}; + +struct pll_info { + int pll_max; + int pll_min; + int sclk, mclk, mclk_pm, xclk; + int ref_div; + int ref_clk; }; +typedef struct { + u16 unknown1; + u16 PCLK_min_freq; + u16 PCLK_max_freq; + u16 unknown2; + u16 ref_freq; + u16 ref_divider; + u16 unknown3; + u16 MCLK_pwd; + u16 MCLK_max_freq; + u16 XCLK_max_freq; + u16 SCLK_freq; +} __attribute__ ((packed)) PLL_BLOCK_MACH64; + struct pll_514 { u8 m; u8 n; @@ -36,16 +82,39 @@ u8 pll_ref_div; u8 pll_gen_cntl; u8 mclk_fb_div; + u8 mclk_fb_mult; /* 2 ro 4 */ +/* u8 sclk_fb_div;*/ u8 pll_vclk_cntl; u8 vclk_post_div; u8 vclk_fb_div; u8 pll_ext_cntl; - u32 dsp_config; /* Mach64 GTB DSP */ - u32 dsp_on_off; /* Mach64 GTB DSP */ +/* u8 ext_vpll_cntl; + u8 spll_cntl2;*/ + u32 dsp_config; /* Mach64 GTB DSP */ + u32 dsp_on_off; /* Mach64 GTB DSP */ + u32 dsp_loop_latency; + u32 fifo_size; + u32 xclkpagefaultdelay; + u32 xclkmaxrasdelay; + u8 xclk_ref_div; + u8 xclk_post_div; u8 mclk_post_div_real; + u8 xclk_post_div_real; u8 vclk_post_div_real; + u8 features; +#ifdef CONFIG_FB_ATY_GENERIC_LCD + u32 xres; /* use for LCD stretching/scaling */ +#endif }; +/* + for pll_ct.features +*/ +#define DONT_USE_SPLL 0x1 +#define DONT_USE_XDLL 0x2 +#define USE_CPUCLK 0x4 +#define POWERDOWN_PLL 0x8 + union aty_pll { struct pll_ct ct; struct pll_514 ibm514; @@ -56,42 +125,68 @@ * The hardware parameters for each card */ -struct aty_cursor { - u8 bits[8][64]; - u8 mask[8][64]; - u8 __iomem *ram; -}; - struct atyfb_par { struct aty_cmap_regs __iomem *aty_cmap_regs; + struct { u8 red, green, blue; } palette[256]; const struct aty_dac_ops *dac_ops; const struct aty_pll_ops *pll_ops; - struct aty_cursor *cursor; void __iomem *ati_regbase; - unsigned long clk_wr_offset; + unsigned long clk_wr_offset; /* meaning overloaded, clock id by CT */ struct crtc crtc; union aty_pll pll; + struct pll_info pll_limits; u32 features; u32 ref_clk_per; u32 pll_per; u32 mclk_per; + u32 xclk_per; u8 bus_type; u8 ram_type; u8 mem_refresh_rate; - u8 blitter_may_be_busy; + u16 pci_id; u32 accel_flags; + int blitter_may_be_busy; + int asleep; + int lock_blank; + unsigned long res_start; + unsigned long res_size; #ifdef __sparc__ struct pci_mmap_map *mmap_map; u8 mmaped; +#endif int open; +#ifdef CONFIG_FB_ATY_GENERIC_LCD + unsigned long bios_base_phys; + unsigned long bios_base; + unsigned long lcd_table; + u16 lcd_width; + u16 lcd_height; + u32 lcd_pixclock; + u16 lcd_refreshrate; + u16 lcd_htotal; + u16 lcd_hdisp; + u16 lcd_hsync_dly; + u16 lcd_hsync_len; + u16 lcd_vtotal; + u16 lcd_vdisp; + u16 lcd_vsync_len; + u16 lcd_right_margin; + u16 lcd_lower_margin; + u16 lcd_hblank_len; + u16 lcd_vblank_len; #endif -#ifdef CONFIG_PMAC_PBOOK - struct fb_info *next; - unsigned char *save_framebuffer; - unsigned long save_pll[64]; + unsigned long aux_start; /* auxiliary aperture */ + unsigned long aux_size; + struct aty_interrupt vblank; + unsigned long irq_flags; + unsigned int irq; + spinlock_t int_lock; +#ifdef CONFIG_MTRR + int mtrr_aper; + int mtrr_reg; #endif }; - + /* * ATI Mach64 features */ @@ -101,7 +196,7 @@ #define M64F_RESET_3D 0x00000001 #define M64F_MAGIC_FIFO 0x00000002 #define M64F_GTB_DSP 0x00000004 -#define M64F_FIFO_24 0x00000008 +#define M64F_FIFO_32 0x00000008 #define M64F_SDRAM_MAGIC_PLL 0x00000010 #define M64F_MAGIC_POSTDIV 0x00000020 #define M64F_INTEGRATED 0x00000040 @@ -116,9 +211,10 @@ #define M64F_G3_PB_1_1 0x00008000 #define M64F_G3_PB_1024x768 0x00010000 #define M64F_EXTRA_BRIGHT 0x00020000 -#define M64F_LT_SLEEP 0x00040000 +#define M64F_LT_LCD_REGS 0x00040000 #define M64F_XL_DLL 0x00080000 - +#define M64F_MFB_FORCE_4 0x00100000 +#define M64F_HW_TRIPLE 0x00200000 /* * Register access @@ -137,8 +233,7 @@ #endif } -static inline void aty_st_le32(int regindex, u32 val, - const struct atyfb_par *par) +static inline void aty_st_le32(int regindex, u32 val, const struct atyfb_par *par) { /* Hack for bloc 1, should be cleanly optimized by compiler */ if (regindex >= 0x400) @@ -163,8 +258,7 @@ #endif } -static inline void aty_st_8(int regindex, u8 val, - const struct atyfb_par *par) +static inline void aty_st_8(int regindex, u8 val, const struct atyfb_par *par) { /* Hack for bloc 1, should be cleanly optimized by compiler */ if (regindex >= 0x400) @@ -177,17 +271,10 @@ #endif } -static inline u8 aty_ld_pll(int offset, const struct atyfb_par *par) -{ - u8 res; - - /* write addr byte */ - aty_st_8(CLOCK_CNTL + 1, (offset << 2), par); - /* read the register value */ - res = aty_ld_8(CLOCK_CNTL + 2, par); - return res; -} - +#if defined(CONFIG_PM) || defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) +extern void aty_st_lcd(int index, u32 val, const struct atyfb_par *par); +extern u32 aty_ld_lcd(int index, const struct atyfb_par *par); +#endif /* * DAC operations @@ -195,14 +282,14 @@ struct aty_dac_ops { int (*set_dac) (const struct fb_info * info, - const union aty_pll * pll, u32 bpp, u32 accel); + const union aty_pll * pll, u32 bpp, u32 accel); }; -extern const struct aty_dac_ops aty_dac_ibm514; /* IBM RGB514 */ -extern const struct aty_dac_ops aty_dac_ati68860b; /* ATI 68860-B */ -extern const struct aty_dac_ops aty_dac_att21c498; /* AT&T 21C498 */ -extern const struct aty_dac_ops aty_dac_unsupported; /* unsupported */ -extern const struct aty_dac_ops aty_dac_ct; /* Integrated */ +extern const struct aty_dac_ops aty_dac_ibm514; /* IBM RGB514 */ +extern const struct aty_dac_ops aty_dac_ati68860b; /* ATI 68860-B */ +extern const struct aty_dac_ops aty_dac_att21c498; /* AT&T 21C498 */ +extern const struct aty_dac_ops aty_dac_unsupported; /* unsupported */ +extern const struct aty_dac_ops aty_dac_ct; /* Integrated */ /* @@ -210,37 +297,32 @@ */ struct aty_pll_ops { - int (*var_to_pll) (const struct fb_info * info, u32 vclk_per, - u8 bpp, union aty_pll * pll); - u32(*pll_to_var) (const struct fb_info * info, - const union aty_pll * pll); - void (*set_pll) (const struct fb_info * info, - const union aty_pll * pll); + int (*var_to_pll) (const struct fb_info * info, u32 vclk_per, u32 bpp, union aty_pll * pll); + u32 (*pll_to_var) (const struct fb_info * info, const union aty_pll * pll); + void (*set_pll) (const struct fb_info * info, const union aty_pll * pll); + void (*get_pll) (const struct fb_info *info, union aty_pll * pll); + int (*init_pll) (const struct fb_info * info, union aty_pll * pll); }; -extern const struct aty_pll_ops aty_pll_ati18818_1; /* ATI 18818 */ -extern const struct aty_pll_ops aty_pll_stg1703; /* STG 1703 */ -extern const struct aty_pll_ops aty_pll_ch8398; /* Chrontel 8398 */ -extern const struct aty_pll_ops aty_pll_att20c408; /* AT&T 20C408 */ -extern const struct aty_pll_ops aty_pll_ibm514; /* IBM RGB514 */ -extern const struct aty_pll_ops aty_pll_unsupported; /* unsupported */ -extern const struct aty_pll_ops aty_pll_ct; /* Integrated */ +extern const struct aty_pll_ops aty_pll_ati18818_1; /* ATI 18818 */ +extern const struct aty_pll_ops aty_pll_stg1703; /* STG 1703 */ +extern const struct aty_pll_ops aty_pll_ch8398; /* Chrontel 8398 */ +extern const struct aty_pll_ops aty_pll_att20c408; /* AT&T 20C408 */ +extern const struct aty_pll_ops aty_pll_ibm514; /* IBM RGB514 */ +extern const struct aty_pll_ops aty_pll_unsupported; /* unsupported */ +extern const struct aty_pll_ops aty_pll_ct; /* Integrated */ -extern void aty_set_pll_ct(const struct fb_info *info, - const union aty_pll *pll); -extern void aty_calc_pll_ct(const struct fb_info *info, - struct pll_ct *pll); +extern void aty_set_pll_ct(const struct fb_info *info, const union aty_pll *pll); +extern u8 aty_ld_pll_ct(int offset, const struct atyfb_par *par); /* * Hardware cursor support */ -extern struct aty_cursor *aty_init_cursor(struct fb_info *info); +extern int aty_init_cursor(struct fb_info *info); extern int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor); -extern void aty_set_cursor_color(struct fb_info *info); -extern void aty_set_cursor_shape(struct fb_info *info); /* * Hardware acceleration @@ -260,6 +342,5 @@ } extern void aty_reset_engine(const struct atyfb_par *par); -extern void aty_init_engine(struct atyfb_par *par, - struct fb_info *info); +extern void aty_init_engine(struct atyfb_par *par, struct fb_info *info); diff -Nru a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c --- a/drivers/video/aty/atyfb_base.c 2004-10-26 18:25:18 -07:00 +++ b/drivers/video/aty/atyfb_base.c 2004-10-26 18:25:18 -07:00 @@ -1,6 +1,7 @@ /* * ATI Frame Buffer Device Driver Core * + * Copyright (C) 2004 Alex Kern * Copyright (C) 1997-2001 Geert Uytterhoeven * Copyright (C) 1998 Bernd Harries * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) @@ -24,10 +25,13 @@ * Harry AC Eaton * Anthony Tong * + * Generic LCD support written by Daniel Mantione, ported from 2.4.20 by Alex Kern + * Many Thanks to Ville Syrjälä for patches and fixing nasting 16 bit color bug. + * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive for * more details. - * + * * Many thanks to Nitya from ATI devrel for support and patience ! */ @@ -38,15 +42,16 @@ - cursor support on all cards and all ramdacs. - cursor parameters controlable via ioctl()s. - guess PLL and MCLK based on the original PLL register values initialized - by the BIOS or Open Firmware (if they are initialized). + by Open Firmware (if they are initialized). BIOS is done - (Anyone to help with this?) + (Anyone with Mac to help with this?) ******************************************************************************/ #include #include +#include #include #include #include @@ -54,19 +59,20 @@ #include #include #include -#include #include #include #include #include -#include -#include +#include +#include +#include #include #include #include