All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [bonding] Add basic support for dynamic configuration of bond interfaces
From: Amir Noam @ 2004-01-11 14:28 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: bonding-devel, netdev
In-Reply-To: <E6F7D288B394A64585E67497E5126BA601F991D1@hasmsx403.iil.intel.com>

On Sunday 11 January 2004 03:34 am, Jeff Garzik wrote:
> Amir Noam wrote:
> > The following patch sets provide basic support for future bonding
> > operations (specifically for dynamic configuration of bonding
> > interfaces).
> >
> > This is done by adding two new bonding ioctls: one for deviceless
> > commands (an ioctl hook) and one for device oriented commands.
> > Like ethtool, the first u32 value in the data structure will
> > indicate the exact sub-command to be executed.
> >
> > The sets are against the latest netdev-2.4 and
> > net-drivers-2.5-exp trees.
>
> I don't disagree with the overall goal of these patches, but I
> think we might need to pause a bit, and consider how best to
> configure, add, and remove bonding interfaces, if we are coming up
> with a new interface.
>
>
> For configuration tasks that occur outside the scope of a single
> bonding interface (i.e. a single struct net_device), you need a
> separate entity from a socket ioctl.  It's not ideal at all to
> configure N objects using a special ioctl ... when opening one of
> said objects :)

That's not exactly what the new ioctls do.

The new SIOCBONDING ioctl handles commands aimed for the bonding 
module (and not to any specific bonding interface). This is done via 
an ioctl hook that captures these commands at the socket level 
(before dev_ioctl()) and passes it to the bonding code. Such commands 
do not require opening a bonding interface at all, just a valid 
socket to send the ioctl.

Also, such commands do not configure N other objects (like bonding 
interfaces) at all. They are used explicitly for "deviceless" 
commands, like dynamically adding and removing a bonding interface 
from the system.

> I would suggest a simple character device (misc_register), and let
> the userland application configure settings unrelated to a single
> object.

I was trying to follow the example of several other network modules 
(e.g. vlan, dlci, bridge) that use a socket level ioctl hook to 
handle such deviceless commands.

Do you think that a char device is preferrable, given that other 
similar modules use a socket ioctl hook?

> For a configuring state related to a _single_ bonding interface
> (i.e. a single net_device), socket ioctls are OK.

For such configuration commands (aimed at a specific bonding 
interface) I've added the SIOCBONDDEVICE ioctl, which is designed to 
be extendable to more commands in the future.

-- 
Amir

^ permalink raw reply

* Re: [parisc-linux] running gcc testsuite triggers ongoing page faults
From: Randolph Chung @ 2004-01-11 14:25 UTC (permalink / raw)
  To: Matthias Klose; +Cc: parisc-linux, debian-hppa
In-Reply-To: <16385.13815.94626.165424@gargle.gargle.HOWL>

> well, the last testcase logged in build/gcc/testsuite/gcc.log is 
> 
> 	gcc.c-torture/execute/931004-12.c compilation,  -O1
> 
> the next one would be
> 
> 	gcc.c-torture/execute/931004-12.c compilation,  -O2

does it always die at the same test case?

randolph

^ permalink raw reply

* Re: 2.6.0 NFS-server low to 0 performance
From: Guennadi Liakhovetski @ 2004-01-11 14:24 UTC (permalink / raw)
  To: Russell King; +Cc: Helge Hafting, linux-kernel
In-Reply-To: <20040111135309.F1931@flint.arm.linux.org.uk>

On Sun, 11 Jan 2004, Russell King wrote:

> Basically, the SMC91C111 is great for use on small, *well controlled*
> embedded networks, but anything else is asking for trouble.

Ok, thanks. Well, just out of curiousity (also, why I concluded it might
have been a more general problem - because I had it on both my ARM boards)
- where is the bottleneck likely to be on a SA system with a Netgear-FA411
PCMCIA card (NE2000-compatible)? Just a slow CPU?

Thanks
Guennadi
---
Guennadi Liakhovetski



^ permalink raw reply

* Re: compilation queries
From: kamal.r nair @ 2004-01-11 14:22 UTC (permalink / raw)
  To: selinux
In-Reply-To: <1073577362.31574.4356.camel@moss-huskies>

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

dear howard holm
i have got the subscription from selinux.
 can u help me out in compiling the SELINUX 2.4.21source code into redhat 2.4 linux kernels.i did download the source from the website(www.nsa.gov/selinux) and copied into my linux system (/root) and started compiling using the normal kernel compilation steps.The compilation got over and the next time when i booted my system using the SELINUX kernel newly configured, the initial process got loaded and then followed by the error "no socket drivers loaded" and "cannot load root" and finally "kernel panic".

 I kindly request you to give the compilation steps involved in the above process and the errors i have made while compiling the kernel.
 expecting your reply at the earliest.
 
 Regds
 
 Kamal.R.Nair




---------------------------------
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

[-- Attachment #2: Type: text/html, Size: 1081 bytes --]

^ permalink raw reply

* Re: Synaptics Touchpad workaround for strange behavior after Sync loss (With Patch).
From: Vojtech Pavlik @ 2004-01-11 14:22 UTC (permalink / raw)
  To: Peter Berg Larsen; +Cc: Gunter Königsmann, linux-kernel
In-Reply-To: <Pine.LNX.4.40.0401111347320.16947-100000@shannon.math.ku.dk>

On Sun, Jan 11, 2004 at 01:52:46PM +0100, Peter Berg Larsen wrote:
> 
> On Sun, 11 Jan 2004, Gunter Königsmann wrote:
> 
> > Hmmm... Now I get an "Reverted to legacy aux mode" after about every third
> > resync of the driver, and sometimes odd and sometimes even numbers of sync
> > losses...
> 
> How often is that? X/minute. I do not expect many "reverted .." messages,
> but if there is, then I believe the mux ver 1.1 has added some extra error
> codes that we se as a revert.

Or the BIOS powermanagement is touching the controller in a way the MUX
mode doesn't like ...

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply

* Re: Synaptics Touchpad workaround for strange behavior after Sync loss (With Patch).
From: Vojtech Pavlik @ 2004-01-11 14:21 UTC (permalink / raw)
  To: Peter Berg Larsen; +Cc: Gunter Königsmann, linux-kernel, Dmitry Torokhov
In-Reply-To: <Pine.LNX.4.40.0401111326480.16947-100000@shannon.math.ku.dk>

On Sun, Jan 11, 2004 at 01:46:41PM +0100, Peter Berg Larsen wrote:

> On Sun, 11 Jan 2004, Vojtech Pavlik wrote:
> 
> > > I dont have a machine with active multiplexing so the the patch is
> > > untested. It warns when the mouse is removed, and tries to recover
> > > if multiplexing is disabled.
> >
> > It's nice, but er definitely shouldn't call i8042_enable_mux() from the
> > interrupt handler, because i8042_command() waits for characters arriving
> > in the interrupt handler, so we could get into rather nasty recursions.
> 
> Are you sure? The i8042_command does spin_lock_irqsave(&i8042_lock,
> flags), i8042_wait_read, i8042_read_data and unlock. It seems a good place
> for me as the 8042s buffer is just flush by the interrupt. Well except for
> the fact it is in the interrupt handler :)

Ahh, yeah, I forgot. Gee, and I wrote i8042_command.

> I cannot see a simple/fast solution: All data read in the interrupt must
> be processed otherwise kbd data might be lost. I dont want
> I8042_BUFFER_SIZE calls to serio_rescan/reconnect, as serio is not smart
> enought to only do it once. The mux port number(s) must be remembered if
> serio is called after the loop. I dont like any further calls to
> i8042_flush as it troughs away both kbd and aux data.

Consider the loop gone. It already is in my version.

> hmm, I actually want the handler to look something like:
> 
>  if (str & I8042_STR_MUXERR)
>           i8042_handle_aux_data
>  else
>           i8042_handle_kbd_data
> 
> That way i8042_flush can call handle_*_data depending on what to flush.
> 
> Peter
 

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply

* [PATCH][2.6] change registers name for vr41xx
From: Yoichi Yuasa @ 2004-01-11 14:19 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yuasa, linux-mips

Hello Ralf,

I made a patch for vr41xx of 2.6.

Although the old register name is using CPU as the base,
it is not dependent on CPU in practice.
This patch corrects the name depending on the CPU name.

Please apply this patch.

Yoichi

diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/bcu.c linux/arch/mips/vr41xx/common/bcu.c
--- linux-orig/arch/mips/vr41xx/common/bcu.c	Sat Jan 10 19:43:13 2004
+++ linux/arch/mips/vr41xx/common/bcu.c	Sun Jan 11 22:09:01 2004
@@ -46,8 +46,8 @@
 #include <asm/cpu.h>
 #include <asm/io.h>
 
-#define VR4111_CLKSPEEDREG	KSEG1ADDR(0x0b000014)
-#define VR4122_CLKSPEEDREG	KSEG1ADDR(0x0f000014)
+#define CLKSPEEDREG_TYPE1	KSEG1ADDR(0x0b000014)
+#define CLKSPEEDREG_TYPE2	KSEG1ADDR(0x0f000014)
  #define CLKSP(x)		((x) & 0x001f)
  #define CLKSP_VR4133(x)	((x) & 0x0007)
 
@@ -78,10 +78,10 @@
 {
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
-	case CPU_VR4121: return readw(VR4111_CLKSPEEDREG);
+	case CPU_VR4121: return readw(CLKSPEEDREG_TYPE1);
 	case CPU_VR4122:
 	case CPU_VR4131:
-	case CPU_VR4133: return readw(VR4122_CLKSPEEDREG);
+	case CPU_VR4133: return readw(CLKSPEEDREG_TYPE2);
 	default:
 		printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
 		break;
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/cmu.c linux/arch/mips/vr41xx/common/cmu.c
--- linux-orig/arch/mips/vr41xx/common/cmu.c	Sat Jan 10 19:43:13 2004
+++ linux/arch/mips/vr41xx/common/cmu.c	Sun Jan 11 22:09:01 2004
@@ -47,33 +47,33 @@
 #include <asm/io.h>
 #include <asm/vr41xx/vr41xx.h>
 
-#define VR4111_CMUCLKMSK	KSEG1ADDR(0x0b000060)
-#define VR4122_CMUCLKMSK	KSEG1ADDR(0x0f000060)
- #define MSKPIU			0x0001
- #define MSKSIU			0x0002
- #define MSKAIU			0x0004
- #define MSKKIU			0x0008
- #define MSKFIR			0x0010
- #define MSKDSIU		0x0820
- #define MSKCSI			0x0040
- #define MSKPCIU		0x0080
- #define MSKSSIU		0x0100
- #define MSKSHSP		0x0200
- #define MSKFFIR		0x0400
- #define MSKSCSI		0x1000
- #define MSKPPCIU		0x2000
-#define VR4133_CMUCLKMSK2	KSEG1ADDR(0x0f000064)
- #define MSKCEU			0x0001
- #define MSKMAC0		0x0002
- #define MSKMAC1		0x0004
+#define CMUCLKMSK_TYPE1	KSEG1ADDR(0x0b000060)
+#define CMUCLKMSK_TYPE2	KSEG1ADDR(0x0f000060)
+ #define MSKPIU		0x0001
+ #define MSKSIU		0x0002
+ #define MSKAIU		0x0004
+ #define MSKKIU		0x0008
+ #define MSKFIR		0x0010
+ #define MSKDSIU	0x0820
+ #define MSKCSI		0x0040
+ #define MSKPCIU	0x0080
+ #define MSKSSIU	0x0100
+ #define MSKSHSP	0x0200
+ #define MSKFFIR	0x0400
+ #define MSKSCSI	0x1000
+ #define MSKPPCIU	0x2000
+#define CMUCLKMSK2	KSEG1ADDR(0x0f000064)
+ #define MSKCEU		0x0001
+ #define MSKMAC0	0x0002
+ #define MSKMAC1	0x0004
 
 static u32 vr41xx_cmu_base;
 static u16 cmuclkmsk, cmuclkmsk2;
 
 #define read_cmuclkmsk()	readw(vr41xx_cmu_base)
-#define read_cmuclkmsk2()	readw(VR4133_CMUCLKMSK2)
+#define read_cmuclkmsk2()	readw(CMUCLKMSK2)
 #define write_cmuclkmsk()	writew(cmuclkmsk, vr41xx_cmu_base)
-#define write_cmuclkmsk2()	writew(cmuclkmsk2, VR4133_CMUCLKMSK2)
+#define write_cmuclkmsk2()	writew(cmuclkmsk2, CMUCLKMSK2)
 
 void vr41xx_clock_supply(unsigned int clock)
 {
@@ -206,14 +206,14 @@
 	switch (current_cpu_data.cputype) {
         case CPU_VR4111:
         case CPU_VR4121:
-                vr41xx_cmu_base = VR4111_CMUCLKMSK;
+                vr41xx_cmu_base = CMUCLKMSK_TYPE1;
                 break;
         case CPU_VR4122:
         case CPU_VR4131:
-                vr41xx_cmu_base = VR4122_CMUCLKMSK;
+                vr41xx_cmu_base = CMUCLKMSK_TYPE2;
                 break;
         case CPU_VR4133:
-                vr41xx_cmu_base = VR4122_CMUCLKMSK;
+                vr41xx_cmu_base = CMUCLKMSK_TYPE2;
 		cmuclkmsk2 = read_cmuclkmsk2();
                 break;
 	default:
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/giu.c linux/arch/mips/vr41xx/common/giu.c
--- linux-orig/arch/mips/vr41xx/common/giu.c	Sat Jan 10 19:43:13 2004
+++ linux/arch/mips/vr41xx/common/giu.c	Sun Jan 11 22:09:01 2004
@@ -49,8 +49,8 @@
 #include <asm/io.h>
 #include <asm/vr41xx/vr41xx.h>
 
-#define VR4111_GIUIOSELL	KSEG1ADDR(0x0b000100)
-#define VR4122_GIUIOSELL	KSEG1ADDR(0x0f000140)
+#define GIUIOSELL_TYPE1	KSEG1ADDR(0x0b000100)
+#define GIUIOSELL_TYPE2	KSEG1ADDR(0x0f000140)
 
 #define GIUIOSELL	0x00
 #define GIUIOSELH	0x02
@@ -281,12 +281,12 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		giu_base = VR4111_GIUIOSELL;
+		giu_base = GIUIOSELL_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		giu_base = VR4122_GIUIOSELL;
+		giu_base = GIUIOSELL_TYPE2;
 		break;
 	default:
 		panic("GIU: Unexpected CPU of NEC VR4100 series");
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/icu.c linux/arch/mips/vr41xx/common/icu.c
--- linux-orig/arch/mips/vr41xx/common/icu.c	Sat Jan 10 19:43:13 2004
+++ linux/arch/mips/vr41xx/common/icu.c	Sun Jan 11 22:09:01 2004
@@ -68,11 +68,11 @@
 static unsigned char sysint2_assign[16] = {
 	2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 
-#define VR4111_SYSINT1REG	KSEG1ADDR(0x0b000080)
-#define VR4111_SYSINT2REG	KSEG1ADDR(0x0b000200)
+#define SYSINT1REG_TYPE1	KSEG1ADDR(0x0b000080)
+#define SYSINT2REG_TYPE1	KSEG1ADDR(0x0b000200)
 
-#define VR4122_SYSINT1REG	KSEG1ADDR(0x0f000080)
-#define VR4122_SYSINT2REG	KSEG1ADDR(0x0f0000a0)
+#define SYSINT1REG_TYPE2	KSEG1ADDR(0x0f000080)
+#define SYSINT2REG_TYPE2	KSEG1ADDR(0x0f0000a0)
 
 #define SYSINT1REG	0x00
 #define INTASSIGN0	0x04
@@ -293,14 +293,14 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		icu1_base = VR4111_SYSINT1REG;
-		icu2_base = VR4111_SYSINT2REG;
+		icu1_base = SYSINT1REG_TYPE1;
+		icu2_base = SYSINT2REG_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		icu1_base = VR4122_SYSINT1REG;
-		icu2_base = VR4122_SYSINT2REG;
+		icu1_base = SYSINT1REG_TYPE2;
+		icu2_base = SYSINT2REG_TYPE2;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/rtc.c linux/arch/mips/vr41xx/common/rtc.c
--- linux-orig/arch/mips/vr41xx/common/rtc.c	Sat Jan 10 19:43:13 2004
+++ linux/arch/mips/vr41xx/common/rtc.c	Sun Jan 11 22:09:01 2004
@@ -39,11 +39,11 @@
 #define REMAINDER_PER_SEC	(CLOCK_TICK_RATE - (CYCLES_PER_JIFFY * HZ))
 #define CYCLES_PER_100USEC	((CLOCK_TICK_RATE + (10000 / 2)) / 10000)
 
-#define VR4111_ETIMELREG	KSEG1ADDR(0x0b0000c0)
-#define VR4111_TCLKLREG		KSEG1ADDR(0x0b0001c0)
+#define ETIMELREG_TYPE1		KSEG1ADDR(0x0b0000c0)
+#define TCLKLREG_TYPE1		KSEG1ADDR(0x0b0001c0)
 
-#define VR4122_ETIMELREG	KSEG1ADDR(0x0f000100)
-#define VR4122_TCLKLREG		KSEG1ADDR(0x0f000120)
+#define ETIMELREG_TYPE2		KSEG1ADDR(0x0f000100)
+#define TCLKLREG_TYPE2		KSEG1ADDR(0x0f000120)
 
 /* RTC 1 registers */
 #define ETIMELREG		0x00
@@ -264,14 +264,14 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		rtc1_base = VR4111_ETIMELREG;
-		rtc2_base = VR4111_TCLKLREG;
+		rtc1_base = ETIMELREG_TYPE1;
+		rtc2_base = TCLKLREG_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		rtc1_base = VR4122_ETIMELREG;
-		rtc2_base = VR4122_TCLKLREG;
+		rtc1_base = ETIMELREG_TYPE2;
+		rtc2_base = TCLKLREG_TYPE2;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/serial.c linux/arch/mips/vr41xx/common/serial.c
--- linux-orig/arch/mips/vr41xx/common/serial.c	Sat Jan 10 19:43:13 2004
+++ linux/arch/mips/vr41xx/common/serial.c	Sun Jan 11 22:09:01 2004
@@ -50,12 +50,12 @@
 #include <asm/vr41xx/vr41xx.h>
 
 /* VR4111 and VR4121 SIU Registers */
-#define VR4111_SIURB		KSEG1ADDR(0x0c000000)
-#define VR4111_SIUIRSEL		KSEG1ADDR(0x0c000008)
+#define SIURB_TYPE1		KSEG1ADDR(0x0c000000)
+#define SIUIRSEL_TYPE1		KSEG1ADDR(0x0c000008)
 
-/* VR4122 and VR4131 SIU Registers */
-#define VR4122_SIURB		KSEG1ADDR(0x0f000800)
-#define VR4122_SIUIRSEL		KSEG1ADDR(0x0f000808)
+/* VR4122, VR4131 and VR4133 SIU Registers */
+#define SIURB_TYPE2		KSEG1ADDR(0x0f000800)
+#define SIUIRSEL_TYPE2		KSEG1ADDR(0x0f000808)
 
  #define USE_RS232C		0x00
  #define USE_IRDA		0x01
@@ -102,12 +102,12 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		writew(val, VR4111_SIUIRSEL);
+		writew(val, SIUIRSEL_TYPE1);
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		writew(val, VR4122_SIUIRSEL);
+		writew(val, SIUIRSEL_TYPE2);
 		break;
 	default:
 		printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
@@ -130,12 +130,12 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		s.iomem_base = (unsigned char *)VR4111_SIURB;
+		s.iomem_base = (unsigned char *)SIURB_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		s.iomem_base = (unsigned char *)VR4122_SIURB;
+		s.iomem_base = (unsigned char *)SIURB_TYPE2;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");

^ permalink raw reply

* [PATCH][2.4] change registers name for vr41xx
From: Yoichi Yuasa @ 2004-01-11 14:13 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yuasa, linux-mips

Hello Ralf,

I made a patch for vr41xx of 2.4.

Although the old register name is using CPU as the base,
it is not dependent on CPU in practice.
This patch corrects the name depending on the CPU name.

Please apply this patch.

Yoichi

diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/bcu.c linux/arch/mips/vr41xx/common/bcu.c
--- linux-orig/arch/mips/vr41xx/common/bcu.c	Wed Dec  3 01:37:03 2003
+++ linux/arch/mips/vr41xx/common/bcu.c	Sun Jan 11 22:08:37 2004
@@ -45,8 +45,8 @@
 #include <asm/cpu.h>
 #include <asm/io.h>
 
-#define VR4111_CLKSPEEDREG	KSEG1ADDR(0x0b000014)
-#define VR4122_CLKSPEEDREG	KSEG1ADDR(0x0f000014)
+#define CLKSPEEDREG_TYPE1	KSEG1ADDR(0x0b000014)
+#define CLKSPEEDREG_TYPE2	KSEG1ADDR(0x0f000014)
  #define CLKSP(x)		((x) & 0x001f)
  #define CLKSP_VR4133(x)	((x) & 0x0007)
 
@@ -77,10 +77,10 @@
 {
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
-	case CPU_VR4121: return readw(VR4111_CLKSPEEDREG);
+	case CPU_VR4121: return readw(CLKSPEEDREG_TYPE1);
 	case CPU_VR4122:
 	case CPU_VR4131:
-	case CPU_VR4133: return readw(VR4122_CLKSPEEDREG);
+	case CPU_VR4133: return readw(CLKSPEEDREG_TYPE2);
 	default:
 		printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
 		break;
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/cmu.c linux/arch/mips/vr41xx/common/cmu.c
--- linux-orig/arch/mips/vr41xx/common/cmu.c	Fri Oct 31 11:28:40 2003
+++ linux/arch/mips/vr41xx/common/cmu.c	Sun Jan 11 22:08:37 2004
@@ -46,33 +46,33 @@
 #include <asm/io.h>
 #include <asm/vr41xx/vr41xx.h>
 
-#define VR4111_CMUCLKMSK	KSEG1ADDR(0x0b000060)
-#define VR4122_CMUCLKMSK	KSEG1ADDR(0x0f000060)
- #define MSKPIU			0x0001
- #define MSKSIU			0x0002
- #define MSKAIU			0x0004
- #define MSKKIU			0x0008
- #define MSKFIR			0x0010
- #define MSKDSIU		0x0820
- #define MSKCSI			0x0040
- #define MSKPCIU		0x0080
- #define MSKSSIU		0x0100
- #define MSKSHSP		0x0200
- #define MSKFFIR		0x0400
- #define MSKSCSI		0x1000
- #define MSKPPCIU		0x2000
-#define VR4133_CMUCLKMSK2	KSEG1ADDR(0x0f000064)
- #define MSKCEU			0x0001
- #define MSKMAC0		0x0002
- #define MSKMAC1		0x0004
+#define CMUCLKMSK_TYPE1	KSEG1ADDR(0x0b000060)
+#define CMUCLKMSK_TYPE2	KSEG1ADDR(0x0f000060)
+ #define MSKPIU		0x0001
+ #define MSKSIU		0x0002
+ #define MSKAIU		0x0004
+ #define MSKKIU		0x0008
+ #define MSKFIR		0x0010
+ #define MSKDSIU	0x0820
+ #define MSKCSI		0x0040
+ #define MSKPCIU	0x0080
+ #define MSKSSIU	0x0100
+ #define MSKSHSP	0x0200
+ #define MSKFFIR	0x0400
+ #define MSKSCSI	0x1000
+ #define MSKPPCIU	0x2000
+#define CMUCLKMSK2	KSEG1ADDR(0x0f000064)
+ #define MSKCEU		0x0001
+ #define MSKMAC0	0x0002
+ #define MSKMAC1	0x0004
 
 static u32 vr41xx_cmu_base;
 static u16 cmuclkmsk, cmuclkmsk2;
 
 #define read_cmuclkmsk()	readw(vr41xx_cmu_base)
-#define read_cmuclkmsk2()	readw(VR4133_CMUCLKMSK2)
+#define read_cmuclkmsk2()	readw(CMUCLKMSK2)
 #define write_cmuclkmsk()	writew(cmuclkmsk, vr41xx_cmu_base)
-#define write_cmuclkmsk2()	writew(cmuclkmsk2, VR4133_CMUCLKMSK2)
+#define write_cmuclkmsk2()	writew(cmuclkmsk2, CMUCLKMSK2)
 
 void vr41xx_clock_supply(unsigned int clock)
 {
@@ -205,14 +205,14 @@
 	switch (current_cpu_data.cputype) {
         case CPU_VR4111:
         case CPU_VR4121:
-                vr41xx_cmu_base = VR4111_CMUCLKMSK;
+                vr41xx_cmu_base = CMUCLKMSK_TYPE1;
                 break;
         case CPU_VR4122:
         case CPU_VR4131:
-                vr41xx_cmu_base = VR4122_CMUCLKMSK;
+                vr41xx_cmu_base = CMUCLKMSK_TYPE2;
                 break;
         case CPU_VR4133:
-                vr41xx_cmu_base = VR4122_CMUCLKMSK;
+                vr41xx_cmu_base = CMUCLKMSK_TYPE2;
 		cmuclkmsk2 = read_cmuclkmsk2();
                 break;
 	default:
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/giu.c linux/arch/mips/vr41xx/common/giu.c
--- linux-orig/arch/mips/vr41xx/common/giu.c	Thu Dec 18 00:58:12 2003
+++ linux/arch/mips/vr41xx/common/giu.c	Sun Jan 11 22:08:37 2004
@@ -48,8 +48,8 @@
 #include <asm/io.h>
 #include <asm/vr41xx/vr41xx.h>
 
-#define VR4111_GIUIOSELL	KSEG1ADDR(0x0b000100)
-#define VR4122_GIUIOSELL	KSEG1ADDR(0x0f000140)
+#define GIUIOSELL_TYPE1	KSEG1ADDR(0x0b000100)
+#define GIUIOSELL_TYPE2	KSEG1ADDR(0x0f000140)
 
 #define GIUIOSELL	0x00
 #define GIUIOSELH	0x02
@@ -280,12 +280,12 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		giu_base = VR4111_GIUIOSELL;
+		giu_base = GIUIOSELL_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		giu_base = VR4122_GIUIOSELL;
+		giu_base = GIUIOSELL_TYPE2;
 		break;
 	default:
 		panic("GIU: Unexpected CPU of NEC VR4100 series");
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/icu.c linux/arch/mips/vr41xx/common/icu.c
--- linux-orig/arch/mips/vr41xx/common/icu.c	Thu Dec 18 00:58:12 2003
+++ linux/arch/mips/vr41xx/common/icu.c	Sun Jan 11 22:08:37 2004
@@ -67,11 +67,11 @@
 static unsigned char sysint2_assign[16] = {
 	2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 
-#define VR4111_SYSINT1REG	KSEG1ADDR(0x0b000080)
-#define VR4111_SYSINT2REG	KSEG1ADDR(0x0b000200)
+#define SYSINT1REG_TYPE1	KSEG1ADDR(0x0b000080)
+#define SYSINT2REG_TYPE1	KSEG1ADDR(0x0b000200)
 
-#define VR4122_SYSINT1REG	KSEG1ADDR(0x0f000080)
-#define VR4122_SYSINT2REG	KSEG1ADDR(0x0f0000a0)
+#define SYSINT1REG_TYPE2	KSEG1ADDR(0x0f000080)
+#define SYSINT2REG_TYPE2	KSEG1ADDR(0x0f0000a0)
 
 #define SYSINT1REG	0x00
 #define INTASSIGN0	0x04
@@ -292,14 +292,14 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		icu1_base = VR4111_SYSINT1REG;
-		icu2_base = VR4111_SYSINT2REG;
+		icu1_base = SYSINT1REG_TYPE1;
+		icu2_base = SYSINT2REG_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		icu1_base = VR4122_SYSINT1REG;
-		icu2_base = VR4122_SYSINT2REG;
+		icu1_base = SYSINT1REG_TYPE2;
+		icu2_base = SYSINT2REG_TYPE2;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/rtc.c linux/arch/mips/vr41xx/common/rtc.c
--- linux-orig/arch/mips/vr41xx/common/rtc.c	Tue Dec  2 04:31:49 2003
+++ linux/arch/mips/vr41xx/common/rtc.c	Sun Jan 11 22:08:37 2004
@@ -40,11 +40,11 @@
 #define REMAINDER_PER_SEC	(CLOCK_TICK_RATE - (CYCLES_PER_JIFFY * HZ))
 #define CYCLES_PER_100USEC	((CLOCK_TICK_RATE + (10000 / 2)) / 10000)
 
-#define VR4111_ETIMELREG	KSEG1ADDR(0x0b0000c0)
-#define VR4111_TCLKLREG		KSEG1ADDR(0x0b0001c0)
+#define ETIMELREG_TYPE1		KSEG1ADDR(0x0b0000c0)
+#define TCLKLREG_TYPE1		KSEG1ADDR(0x0b0001c0)
 
-#define VR4122_ETIMELREG	KSEG1ADDR(0x0f000100)
-#define VR4122_TCLKLREG		KSEG1ADDR(0x0f000120)
+#define ETIMELREG_TYPE2		KSEG1ADDR(0x0f000100)
+#define TCLKLREG_TYPE2		KSEG1ADDR(0x0f000120)
 
 /* RTC 1 registers */
 #define ETIMELREG		0x00
@@ -265,14 +265,14 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		rtc1_base = VR4111_ETIMELREG;
-		rtc2_base = VR4111_TCLKLREG;
+		rtc1_base = ETIMELREG_TYPE1;
+		rtc2_base = TCLKLREG_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		rtc1_base = VR4122_ETIMELREG;
-		rtc2_base = VR4122_TCLKLREG;
+		rtc1_base = ETIMELREG_TYPE2;
+		rtc2_base = TCLKLREG_TYPE2;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/common/serial.c linux/arch/mips/vr41xx/common/serial.c
--- linux-orig/arch/mips/vr41xx/common/serial.c	Fri Oct 31 11:28:41 2003
+++ linux/arch/mips/vr41xx/common/serial.c	Sun Jan 11 22:08:37 2004
@@ -49,12 +49,12 @@
 #include <asm/vr41xx/vr41xx.h>
 
 /* VR4111 and VR4121 SIU Registers */
-#define VR4111_SIURB		KSEG1ADDR(0x0c000000)
-#define VR4111_SIUIRSEL		KSEG1ADDR(0x0c000008)
+#define SIURB_TYPE1		KSEG1ADDR(0x0c000000)
+#define SIUIRSEL_TYPE1		KSEG1ADDR(0x0c000008)
 
-/* VR4122 and VR4131 SIU Registers */
-#define VR4122_SIURB		KSEG1ADDR(0x0f000800)
-#define VR4122_SIUIRSEL		KSEG1ADDR(0x0f000808)
+/* VR4122, VR4131 and VR4133 SIU Registers */
+#define SIURB_TYPE2		KSEG1ADDR(0x0f000800)
+#define SIUIRSEL_TYPE2		KSEG1ADDR(0x0f000808)
 
  #define USE_RS232C		0x00
  #define USE_IRDA		0x01
@@ -101,12 +101,12 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		writew(val, VR4111_SIUIRSEL);
+		writew(val, SIUIRSEL_TYPE1);
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		writew(val, VR4122_SIUIRSEL);
+		writew(val, SIUIRSEL_TYPE2);
 		break;
 	default:
 		printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
@@ -129,12 +129,12 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		s.iomem_base = (unsigned char *)VR4111_SIURB;
+		s.iomem_base = (unsigned char *)SIURB_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		s.iomem_base = (unsigned char *)VR4122_SIURB;
+		s.iomem_base = (unsigned char *)SIURB_TYPE2;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");

^ permalink raw reply

* Re: Strange logs...
From: Antony Stone @ 2004-01-11 14:09 UTC (permalink / raw)
  To: netfilter
In-Reply-To: <004f01c3d84b$28d3c5a0$1530a8c0@HUSH>

On Sunday 11 January 2004 1:59 pm, Carlos Fernandez Sanz wrote:

> > Your IRQ/address etc setup looks fine to me, however there is clearly
> > something weird about the network hardware arrangement for you to get the
> > above-described ping behaviour.
>
> Such as the router and the switch being connected for no reason? I was
> obviously on crack when I set that up.... just found out that was the
> problem.... strange that everything would work perfectly for hours then
> stop working for minutes, etc... probably a table filling up in the switch
> or the router or both :-)

I'd put it down to the arp caches getting (mightily) confused about where to 
find things.   Never mind the degree to which a security engineer's eyebrow 
would rise upon realising your switch was connected to both sides of your 
firewall :)

Regards,

Antony.

-- 
This email is intended for the use of the individual addressee(s) named above 
and may contain information that is confidential, privileged or unsuitable 
for overly sensitive persons with low self-esteem, no sense of humour, or 
irrational religious beliefs.

If you have received this email in error, you are required to shred it 
immediately, add some nutmeg, three egg whites and a dessertspoonful of 
caster sugar.   Whisk until soft peaks form, then place in a warm oven for 40 
minutes.   Remove promptly and let stand for 2 hours before adding some 
decorative kiwi fruit and cream.   Then notify me immediately by return email 
and eat the original message.

                                                     Please reply to the list;
                                                           please don't CC me.



^ permalink raw reply

* [linux-lvm] Re: Getting duplicate posts from linux-lvm, dm-devel and maybe lvm-devel
From: Alasdair G Kergon @ 2004-01-11 14:09 UTC (permalink / raw)
  To: linux-lvm

On Sun, Jan 11, 2004 at 12:10:27PM -0600, Ken Fuchs wrote:
> In the last few days, I've been getting duplicate posts from linux-lvm
> and dm-devel mailing lists sent to my address

Sistina's mail routing was changed a few days back and a side-effect is
that many posts to Sistina lists now get duplicated.

I have identified the cause of the problem, and I anticipate that it
can be fixed tomorrow.

Sorry for the inconvenience.


A reminder about spam filtering.

Hundreds of messages a day now have to be filtered from the list addresses.
Please try always to post from a subscribed email address, and to use a
relevant and detailed subject line.

Messages without subject lines, or ones saying "help" or "urgent",
or messages containing HTML or attachments are easily mistaken for spam
and might get delayed or disappear to /dev/null.

Alasdair
-- 
agk@uk.sistina.com

^ permalink raw reply

* Re: Re: usx2y: known problems with us122 and alsa-drivers-1.0.1?
From: Karsten Wiese @ 2004-01-11 14:08 UTC (permalink / raw)
  To: Bill Gribble; +Cc: alsa-devel, Martin Langer
In-Reply-To: <200401111449.06508.annabellesgarden@yahoo.de>

you might also try 2.6.1-mm1. ALSA 1.0.1 is integrated there, IIUC!

regards, Karsten



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html

^ permalink raw reply

* [PATCH 2.4] i2c cleanups, third wave (3/8)
From: Jean Delvare @ 2004-01-11 14:08 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: LKML, LM Sensors
In-Reply-To: <20040111144214.7a6a4e59.khali@linux-fr.org>

Remove bus scanning from various algorithms (i2c-algo-bit, i2c-algo-ite,
i2c-algo-pcf and i2c-algo-sibyte). This was discussed on the LM Sensors
mailing list:
http://archives.andrew.net.au/lm-sensors/msg05639.html
Main reason is that there is the i2cdetect user-space tools for that,
which works with all i2c busses (except i2c-isa) and does a better job.

A similar patch was sent to Greg KH for linux 2.6 and was applied in
2.6.1-rc1.

Note that this patch was voluntarily generated using diff -U2, because
it contains only removals, so much context isn't required.


diff -U2 -rN linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-bit.c linux-2.4.24-pre3-k2/drivers/i2c/i2c-algo-bit.c
--- linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-bit.c	2004-01-05 09:44:26.000000000 +0100
+++ linux-2.4.24-pre3-k2/drivers/i2c/i2c-algo-bit.c	2004-01-05 15:22:54.000000000 +0100
@@ -51,5 +51,4 @@
 static int i2c_debug;
 static int bit_test;	/* see if the line-setting functions work	*/
-static int bit_scan;	/* have a look at what's hanging 'round		*/
 
 /* --- setting states on the bus with the right timing: ---------------	*/
@@ -527,5 +526,4 @@
 int i2c_bit_add_bus(struct i2c_adapter *adap)
 {
-	int i;
 	struct i2c_algo_bit_data *bit_adap = adap->algo_data;
 
@@ -547,21 +545,4 @@
 	adap->retries = 3;	/* be replaced by defines	*/
 
-	/* scan bus */
-	if (bit_scan) {
-		int ack;
-		printk(KERN_INFO " i2c-algo-bit.o: scanning bus %s.\n",
-		       adap->name);
-		for (i = 0x00; i < 0xff; i+=2) {
-			i2c_start(bit_adap);
-			ack = i2c_outb(adap,i);
-			i2c_stop(bit_adap);
-			if (ack>0) {
-				printk("(%02x)",i>>1); 
-			} else 
-				printk("."); 
-		}
-		printk("\n");
-	}
-
 #ifdef MODULE
 	MOD_INC_USE_COUNT;
@@ -605,9 +586,7 @@
 
 MODULE_PARM(bit_test, "i");
-MODULE_PARM(bit_scan, "i");
 MODULE_PARM(i2c_debug,"i");
 
 MODULE_PARM_DESC(bit_test, "Test the lines of the bus to see if it is stuck");
-MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus");
 MODULE_PARM_DESC(i2c_debug,
             "debug level - 0 off; 1 normal; 2,3 more verbose; 9 bit-protocol");
diff -U2 -rN linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-ite.c linux-2.4.24-pre3-k2/drivers/i2c/i2c-algo-ite.c
--- linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-ite.c	2004-01-05 09:43:53.000000000 +0100
+++ linux-2.4.24-pre3-k2/drivers/i2c/i2c-algo-ite.c	2004-01-06 11:56:13.000000000 +0100
@@ -68,5 +68,4 @@
 static int i2c_debug=1;
 static int iic_test=0;	/* see if the line-setting functions work	*/
-static int iic_scan=0;	/* have a look at what's hanging 'round		*/
 
 /* --- setting states on the bus with the right timing: ---------------	*/
@@ -745,6 +744,4 @@
 int i2c_iic_add_bus(struct i2c_adapter *adap)
 {
-	int i;
-	short status;
 	struct i2c_algo_iic_data *iic_adap = adap->algo_data;
 
@@ -774,22 +771,4 @@
 	iic_init(iic_adap);
 
-	/* scan bus */
-	/* By default scanning the bus is turned off. */
-	if (iic_scan) {
-		printk(KERN_INFO " i2c-algo-ite: scanning bus %s.\n",
-		       adap->name);
-		for (i = 0x00; i < 0xff; i+=2) {
-			iic_outw(iic_adap, ITE_I2CSAR, i);
-			iic_start(iic_adap);
-			if ( (wait_for_pin(iic_adap, &status) == 0) && 
-			    ((status & ITE_I2CHSR_DNE) == 0) ) { 
-				printk(KERN_INFO "\n(%02x)\n",i>>1); 
-			} else {
-				printk(KERN_INFO "."); 
-				iic_reset(iic_adap);
-			}
-			udelay(iic_adap->udelay);
-		}
-	}
 	return 0;
 }
@@ -834,9 +813,7 @@
 
 MODULE_PARM(iic_test, "i");
-MODULE_PARM(iic_scan, "i");
 MODULE_PARM(i2c_debug,"i");
 
 MODULE_PARM_DESC(iic_test, "Test if the I2C bus is available");
-MODULE_PARM_DESC(iic_scan, "Scan for active chips on the bus");
 MODULE_PARM_DESC(i2c_debug,
         "debug level - 0 off; 1 normal; 2,3 more verbose; 9 iic-protocol");
diff -U2 -rN linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-pcf.c linux-2.4.24-pre3-k2/drivers/i2c/i2c-algo-pcf.c
--- linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-pcf.c	2003-12-31 14:50:59.000000000 +0100
+++ linux-2.4.24-pre3-k2/drivers/i2c/i2c-algo-pcf.c	2004-01-06 12:01:10.000000000 +0100
@@ -53,5 +53,4 @@
  */
 static int i2c_debug=0;
-static int pcf_scan=0;	/* have a look at what's hanging 'round		*/
 
 /* --- setting states on the bus with the right timing: ---------------	*/
@@ -458,5 +457,5 @@
 int i2c_pcf_add_bus(struct i2c_adapter *adap)
 {
-	int i, status;
+	int i;
 	struct i2c_algo_pcf_data *pcf_adap = adap->algo_data;
 
@@ -481,28 +480,4 @@
 
 	i2c_add_adapter(adap);
-
-	/* scan bus */
-	if (pcf_scan) {
-		printk(KERN_INFO " i2c-algo-pcf.o: scanning bus %s.\n",
-		       adap->name);
-		for (i = 0x00; i < 0xff; i+=2) {
-			if (wait_for_bb(pcf_adap)) {
-    			printk(KERN_INFO " i2c-algo-pcf.o: scanning bus %s - TIMEOUTed.\n",
-		           adap->name);
-			    break;
-			}
-			i2c_outb(pcf_adap, i);
-			i2c_start(pcf_adap);
-			if ((wait_for_pin(pcf_adap, &status) >= 0) && 
-			    ((status & I2C_PCF_LRB) == 0)) { 
-				printk("(%02x)",i>>1); 
-			} else {
-				printk("."); 
-			}
-			i2c_stop(pcf_adap);
-			udelay(pcf_adap->udelay);
-		}
-		printk("\n");
-	}
 	return 0;
 }
@@ -537,12 +512,8 @@
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(pcf_scan, "i");
 MODULE_PARM(i2c_debug,"i");
-
-MODULE_PARM_DESC(pcf_scan, "Scan for active chips on the bus");
 MODULE_PARM_DESC(i2c_debug,
         "debug level - 0 off; 1 normal; 2,3 more verbose; 9 pcf-protocol");
 
-
 int init_module(void) 
 {
diff -U2 -rN linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-sibyte.c linux-2.4.24-pre3-k2/drivers/i2c/i2c-algo-sibyte.c
--- linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-sibyte.c	2003-08-25 13:44:41.000000000 +0200
+++ linux-2.4.24-pre3-k2/drivers/i2c/i2c-algo-sibyte.c	2004-01-06 12:09:46.000000000 +0100
@@ -40,10 +40,5 @@
 #define SMB_CSR(a,r) ((long)(a->reg_base + r))
 
-/* ----- global variables ---------------------------------------------	*/
-
-/* module parameters:
- */
-static int bit_scan=0;	/* have a look at what's hanging 'round		*/
-
+/* ----- functions ---------------------------------------------------- */
 
 static int smbus_xfer(struct i2c_adapter *i2c_adap, u16 addr, 
@@ -152,5 +147,4 @@
 int i2c_sibyte_add_bus(struct i2c_adapter *i2c_adap, int speed)
 {
-	int i;
 	struct i2c_algo_sibyte_data *adap = i2c_adap->algo_data;
 
@@ -164,22 +158,4 @@
         csr_out32(0, SMB_CSR(adap,R_SMB_CONTROL));
 
-	/* scan bus */
-	if (bit_scan) {
-                union i2c_smbus_data data;
-                int rc;
-		printk(KERN_INFO " i2c-algo-sibyte.o: scanning bus %s.\n",
-		       i2c_adap->name);
-		for (i = 0x00; i < 0x7f; i++) {
-                        /* XXXKW is this a realistic probe? */
-                        rc = smbus_xfer(i2c_adap, i, 0, I2C_SMBUS_READ, 0,
-                                        I2C_SMBUS_BYTE_DATA, &data);
-			if (!rc) {
-				printk("(%02x)",i); 
-			} else 
-				printk("."); 
-		}
-		printk("\n");
-	}
-
 #ifdef MODULE
 	MOD_INC_USE_COUNT;
@@ -217,6 +193,4 @@
 MODULE_AUTHOR("Kip Walker, Broadcom Corp.");
 MODULE_DESCRIPTION("SiByte I2C-Bus algorithm");
-MODULE_PARM(bit_scan, "i");
-MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus");
 MODULE_LICENSE("GPL");
 

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

^ permalink raw reply

* Re: ANNOUNCE: megaraid driver version 2.10.1
From: 'hch@infradead.org' @ 2004-01-11 14:06 UTC (permalink / raw)
  To: Mukker, Atul
  Cc: 'linux-kernel@vger.kernel.org', linux-scsi,
	'torvalds@osdl.org',
	'marcelo.tosatti@cyclades.com', Matt_Domsch
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E57033BC2AA@exa-atlanta.se.lsil.com>

On Fri, Jan 09, 2004 at 06:54:09PM -0500, Mukker, Atul wrote:
> All,
> 
> The megaraid driver version 2.10.1 is released and can be downloaded from
> ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-2.10.1/
> 
> Following other components are also available at this location:
> i.	Patches for Red Hat and SuSE stock kernels

Can't find patches for mainline anywhere.  Also it's usually a good
idea to send the _patches_ to lkml for review.

I've diffed the driver against the 2.4 megaraid2 driver and it looks
mostly sane, the 2.6 version OTOH copletly backs out the changes that
went into the driver from outside LSI.  Please try to port the changes
you made to the driver in 2.6.1.

^ permalink raw reply

* Re: port translation
From: Romain Moyne @ 2004-01-11 14:03 UTC (permalink / raw)
  To: Antony Stone; +Cc: netfilter
In-Reply-To: <200401111355.44937.Antony@Soft-Solutions.co.uk>

Antony Stone a écrit :

>On Sunday 11 January 2004 1:45 pm, Romain Moyne wrote:
>
>  
>
>>Cedric Blancher a écrit :
>>
>>    
>>
>>>	iptables -t nat -A POSTROUTING -s $LAN -d $WB -j SNAT --to $ETH0
>>>      
>>>
>>What must I write instead of $LAN and $ETH0 ?
>>    
>>
>
>$LAN is the network range of the machines you might have packets coming from 
>(note it is the source address in the above rule) and $ETH0 is the IP address 
>of the interface on your netfilter machine.
>
>Perhaps $LAN=192.168.0.0/24 and $ETH0=192.168.0.1 for your network?
>
>Antony.
>
>  
>
Thanks to everybody ! It works fine now ;)
Thanks you

Romain



^ permalink raw reply

* Re: logitech cordless desktop deluxe optical keyboard issues
From: Andries.Brouwer @ 2004-01-11 13:58 UTC (permalink / raw)
  To: Andries.Brouwer, sven.kissner; +Cc: linux-kernel

    > That is a kernel message, not showkey output.
    > (BTW - which kernel precisely? The message is not the 2.6.0 one.)
    > Maybe showkey -s never sees them?

    i'm running a vanilla 2.6.1-kernel, without any additional patches.
    you're right about the message, showkey is exiting after 10s, even
    if i keep one of the 'problematic' keys pressed..

Yes, I see. Looking at 2.6.1 things are a bit different again,
but raw mode is very broken. Instead of reporting what the
keyboard sends, as raw mode is supposed to do, the scancode
is first converted to a keycode, and in the case of an unknown
scancode it is then just thrown away. In raw mode the keycode
is later translated back to a scancode (using a correspondence
that is not 1-1), but in your case we never get that far.

Did you try using setkeycodes? Say

# setkeycodes 91 120 92 121

to map scancode 0x91 to keycode 120 and 0x92 to 121.

Andries

^ permalink raw reply

* Re: [PATCH][TRIVIAL] Remove bogus "value 0x37ffffff truncated to 0x37ffffff" warning.
From: Bart Samwel @ 2004-01-11 13:58 UTC (permalink / raw)
  To: Davide Libenzi
  Cc: Tim Cambrant, Mario Vanoni, Linux Kernel Mailing List,
	Andrew Morton
In-Reply-To: <400097E0.5040900@samwel.tk>

Bart Samwel wrote:
> Davide Libenzi wrote:
> 
>>>> #define MAXMEM                       (~__PAGE_OFFSET + 1 - 
>>>> __VMALLOC_RESERVE)
>>>
>>>
>>> I tried that first, before I came up with the solution in the patch, 
>>> because I didn't like the dependency of 0xFFFFFFFF being 32-bit. It 
>>> was a nice idea, but it didn't work. Apparently, gas interprets ~ as 
>>> a one's complement negation operator, not a bitwise or. Therefore, 
>>> ~__PAGE_OFFSET is just as negative as -__PAGE_OFFSET as far as gas is 
>>> concerned. It gives me the same warning.
>>
>>
>>
>> That would mean a bug in as. __PAGE_OFFSET is unsigned and ~ is 
>> documented (not a surprise) as "bitwise not". The bitwise not of 
>> __PAGE_OFFSET (unsigned) is still unsigned. BTW 2.14 does not give 
>> warnings with both the original statement and the ~ one. This:
>>                                                                                                                         
>>         
>> PG=0xC0000000                                                                                                   
>>         VM=(128 << 
>> 20)                                                                                                  
>>                                                                                                                         
>>         mov (~PG + 1 - VM), 
>> %eax                                                                                        
>>         mov (-PG - VM), 
>> %eax                                                                                            
>>                                                                                                                         
>> generate this:
>>
>> zzzzzzzz:     file format elf32-i386
>>
>> Disassembly of section .text:
>>
>> 00000000 <.text>:
>>    0:   a1 00 00 00 38          mov    0x38000000,%eax
>>    5:   a1 00 00 00 38          mov    0x38000000,%eax
>>
>>
>> w/out any warnings. And the result is obviously 0x38000000 and not 
>> 0x37ffffff.
> 
> 
> I get the same behaviour. The 0x37ffffff is from the place where MAXMEM 
> is used (the ramdisk_max variable in setup.S); it subtracts one from the 
> value. It turns out that the error only occurs when the value is used in 
> a data definition. Experimentally found first value for which it gives 
> the error is:
> 
> ramdisk_max: .long ~(0x80000000)
> 
> Interestingly, it doesn't occur for 0x7fffffff. I've taken a look at gas 
> to see where it goes wrong, but my newly built version doesn't exhibit 
> this behaviour -- it compiles the above statement without warnings. It 
> might have to do with the differences between the build environment that 
> the Debian binutils package is built in and my own machine -- I'll do 
> some more investigating.

OK, I've done a bit of investigation. It turns out that as generates 
this warning when the following condition is met:

       if ((get & mask) != 0
	  && ((get & mask) != mask
	      || (get & hibit) == 0))

I've modified the warning to give me some more info about the values 
involved:

test.S: Assembler messages:
test.S:3: Warning: value 0xffffffff7fffffff truncated to 0x7fffffff, 
mask = ffffffff00000000, unmask = ffffffff, (get & mask) = 
ffffffff00000000), sizeof(get) = 8, sizeof(mask) = 8

This could be correct if as interpreted ~ as a 64-bit binary not, not a 
32-bit one. Not quite unlogical (it doesn't know the type of the input 
value -- it's a literal), except that it doesn't print the full value 
when it truncates it. I find it strange though that the warning isn't 
given for values under 0x80000000! This turns out to have to do with the 
"hibit", which turns out to be 0x80000000. Basically, their logic is 
that if (get & mask) == mask (all upper bits are 1) and (get & hibit) != 
0 as well, then the number is fits within a 32 bits *signed* integer. 
However, they don't look at the unsignedness of the value. So, I've 
changed this to:


       if ((get & mask) != 0
	  && (exp->X_unsigned
               || (get & mask) != mask
	      || (get & hibit) == 0))

Now it seems to behave correctly: for '~' it always warns, for '-' it 
only warns if the negative value is below -0x80000000. I'll submit a 
patch to this effect (including the format extensions) to the binutils 
people.

What's the effect of this for the linux warning? We don't want to use ~ 
for this, because it's not a 32-bit binary not. So, we need to use 
either my solution or the one supplied by Hans.

-- Bart

^ permalink raw reply

* Re: personality.h: struct map_segment
From: Christoph Hellwig @ 2004-01-11 13:57 UTC (permalink / raw)
  To: Justin Pryzby; +Cc: linux-kernel
In-Reply-To: <20040111015723.GA8968@andromeda>

On Sat, Jan 10, 2004 at 08:57:24PM -0500, Justin Pryzby wrote:
> However, as best as I can tell, struct map_segment is never defined.
> I've grepped 2.4 and 2.5, and googled to no avail.  I'm just curious, is
> this simply unimplemented functionality?  And what is it ultimately
> supposed to do?

It's used in the linux-abi modules to map between constants of foreign
OSes to the Linux native ones, e.g. for error numbers, signal numbers
and whatever.  It probably does not have much business beeing in mainline
personality.h..


^ permalink raw reply

* Re: Strange logs...
From: Carlos Fernandez Sanz @ 2004-01-11 13:59 UTC (permalink / raw)
  To: netfilter
In-Reply-To: <200401111340.27973.Antony@Soft-Solutions.co.uk>

> That is just plain wrong.   You should not need a connection to your
external
> router in order to ping between two internal machines (assuming you are
> pinging the real IP addresses, and not relying on a DNS lookup or
something).

Indeed....

> Your IRQ/address etc setup looks fine to me, however there is clearly
> something weird about the network hardware arrangement for you to get the
> above-described ping behaviour.

Such as the router and the switch being connected for no reason? I was
obviously on crack when I set that up.... just found out that was the
problem.... strange that everything would work perfectly for hours then stop
working for minutes, etc... probably a table filling up in the switch or the
router or both :-)

Well, I made you waste a few minutes and wasted a nice sunday morning doing
this instead of being with my girlfriend, on the bright side I got a spare
network cable, give me your address if you want a slice :-)

Thanks!



^ permalink raw reply

* Re: [BUG] 2.6.1-rc1-mm1 with r8169 driver
From: DaMouse Networks @ 2004-01-11 13:59 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev
In-Reply-To: <20040111141806.A19535@electric-eye.fr.zoreil.com>

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

Same results for non-SMP kernel (kpanic after a few minutes of surfing and also when i ran ping -f). 
Stock 2.6.1 runs fine with my 7000 (ping -f) packets to the router :).
debug-stuff for 2.6.1-r8169 (2.6.1+the r8169 that we've applied so far) is attached.

-DaMouse

On Sun, 11 Jan 2004 14:18:06 +0100
Francois Romieu <romieu@fr.zoreil.com> wrote:

> DaMouse Networks <damouse@ntlworld.com> :
> > Ok, looks like my additional testing with ping -f is bringing out the bugs
> > in this baby, once I'd got past the r8169-rx-fill-typo.patch it borked on
> > "ping -f" with the kpanic I pictured last time. Looks like I shoulda tested
> > that also last time :/. I have attached the files you requested any other
> > stuff you need just ask :)
> 
> Fine. I'll dig it this evening.
> 
> (/me gives a quick sight...)
> 
> Hmmm... acpi + HT smp.
> 
> Can you (no more request until I cook something, no joke :o) ):
> - check that plain 2.6.1 driver does not panic under 'ping -f' ?
> - compile a non SMP enabled kernel and see if patched r8169 is stable
>   - during normal traffic
>   - during 'ping -f'
> 
> Please Cc: netdev@oss.sgi.com and include the relevant 'dmesg' output.
> 
> --
> Ueimor

[-- Attachment #2: debug.tar.bz2 --]
[-- Type: application/octet-stream, Size: 6523 bytes --]

^ permalink raw reply

* [PATCH 2.4] i2c cleanups, third wave (2/8)
From: Jean Delvare @ 2004-01-11 13:59 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: LKML, LM Sensors
In-Reply-To: <20040111144214.7a6a4e59.khali@linux-fr.org>

Remove old debugging stuff ("SLO_IO") from two algorithms
(i2c-algo-bit and i2c-algo-ite). This is unused and wouldn't even
compile if commented out.

A similar patch was sent to Greg KH for linux 2.6 and was applied in
2.6.1-rc1.

Note that this patch was voluntarily generated using diff -U2, because
it contains only removals, so much context isn't required.


diff -U2 -rN linux-2.4.24-pre3/drivers/i2c/i2c-algo-bit.c linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-bit.c
--- linux-2.4.24-pre3/drivers/i2c/i2c-algo-bit.c	2003-12-31 14:50:59.000000000 +0100
+++ linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-bit.c	2004-01-05 09:44:26.000000000 +0100
@@ -44,20 +44,7 @@
  	/* debug the protocol by showing transferred bits */
 
-/* debugging - slow down transfer to have a look at the data .. 	*/
-/* I use this with two leds&resistors, each one connected to sda,scl 	*/
-/* respectively. This makes sure that the algorithm works. Some chips   */
-/* might not like this, as they have an internal timeout of some mils	*/
-/*
-#define SLO_IO      jif=jiffies;while(time_before_eq(jiffies, jif+i2c_table[minor].veryslow))\
-                        if (need_resched) schedule();
-*/
-
 
 /* ----- global variables ---------------------------------------------	*/
 
-#ifdef SLO_IO
-	int jif;
-#endif
-
 /* module parameters:
  */
@@ -89,7 +76,4 @@
 	setscl(adap,0);
 	udelay(adap->udelay);
-#ifdef SLO_IO
-	SLO_IO
-#endif
 }
 
@@ -124,7 +108,4 @@
 	}
 	DEBSTAT(printk(KERN_DEBUG "needed %ld jiffies\n", jiffies-start));
-#ifdef SLO_IO
-	SLO_IO
-#endif
 	return 0;
 } 
diff -U2 -rN linux-2.4.24-pre3/drivers/i2c/i2c-algo-ite.c linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-ite.c
--- linux-2.4.24-pre3/drivers/i2c/i2c-algo-ite.c	2003-12-31 14:50:59.000000000 +0100
+++ linux-2.4.24-pre3-k1/drivers/i2c/i2c-algo-ite.c	2004-01-05 09:43:53.000000000 +0100
@@ -61,20 +61,7 @@
 #define DEF_TIMEOUT 16
 
-/* debugging - slow down transfer to have a look at the data .. 	*/
-/* I use this with two leds&resistors, each one connected to sda,scl 	*/
-/* respectively. This makes sure that the algorithm works. Some chips   */
-/* might not like this, as they have an internal timeout of some mils	*/
-/*
-#define SLO_IO      jif=jiffies;while(jiffies<=jif+i2c_table[minor].veryslow)\
-                        if (need_resched) schedule();
-*/
-
 
 /* ----- global variables ---------------------------------------------	*/
 
-#ifdef SLO_IO
-	int jif;
-#endif
-
 /* module parameters:
  */

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

^ permalink raw reply

* PATCH, accessibility, adaptive modules, 2.6.0
From: Karl Dahlke @ 2004-01-11  8:57 UTC (permalink / raw)
  To: linux-kernel, torvalds

[-- Attachment #1: Type: text/plain, Size: 48237 bytes --]

Type of change:

Make LInux easily accessible to people with various disabilities.

I can tell you, from personal experience,
that trying to patch and build and install a new kernel,
*before* I receive any feedback whatsoever from the computer,
is nearly impossible.
Yet that's what we must do today, if we want a kernel-resident adapter.

This patch has been "in the works" for four years,
and I have used the system, 8 hours a day, for all that time.
Of course it has moved through many versions.
This is the patch for version 2.6.0.

Note that this patch does not install any specific adapters.
Rather, it makes the kernel "accessible".
Thus it is ready for adaptive modules,
just as the kernel stands ready to acccept ethernet drivers,
sound card drivers, etc.
It is my hope that people will develop all sorts of adapters,
for blind, blind-deaf, motor impaired, etc.

Since this introduces a new capability, the patch includes
Documentation/accessibility.txt
Best to read that file in the patch below;
no point in me copying all that info again up here.

This isn't a large patch, if you set aside the aforementioned documentation,
but it is pretty complex, and subtle.
I spent a lot of time working with Alan Cox (and others),
trying to get it right.
I appreciate all the help I received from the Linux development team.

Finally, I know you are pressed for time.
New hardware, new features, new routing algorithms, etc.
Still, I hope this can fit into your busy schedules.
Making Linux accessible is very important;
it might even be the law in certain situations.
And with this patch in place, all sorts of people can write
various adapters for many different disabilities.
It's just my opinion, but I believe this approach is more flexible
than embeding specific adapters into the Linux kernel,
as we have tried to do in the past.
Better to apply one patch, this patch,
and write and distribute as many loadable modules as we wish.

This patch just crosses the 40K size limit,
as described in Documentation/SubmittingPatches,
but I think I'll include it inline anyways.
It's only a tad over, and I think a lot of people will want to see it.
But it you want to apply the patch, probably best to get it here.
http://www.eklhad.net/linux/jupiter-base/kernel-2.6.0.patch
Apply this patch via
patch -b -p0 <patchfile
from the top of your source tree.

I thank you in advance for your time.
Karl Dahlke
eklhad@comcast.net

--- MAINTAINERS	2004-01-11 06:10:42.000000000 -0500
+++ MAINTAINERS.new	2004-01-11 06:10:42.000000000 -0500
@@ -139,6 +139,12 @@
 L:	linux-aio@kvack.org
 S:	Supported
 
+ACCESSIBILITY, ADAPTERS FOR THE DISABLED
+P:	Karl Dahlke
+M:	karl@eklhad.net
+W:	http://www.eklhad.net/linux/jupiter
+S:	Maintained
+
 ACENIC DRIVER
 P:	Jes Sorensen
 M:	jes@trained-monkey.org
--- init/Kconfig	2004-01-11 06:10:42.000000000 -0500
+++ init/Kconfig.new	2004-01-11 06:10:42.000000000 -0500
@@ -65,6 +65,24 @@
 
 menu "General setup"
 
+config ACCESSIBILITY
+	bool "Support for accessibility adapters for disabled users"
+	default y
+	help
+	An adapter is a peripheral device and/or a specialized device driver
+	that makes Linux accessible to a disabled user.
+	Some adapters redirect output to a speech synthesizer or braille device
+	for the blind.  Other adapters modify keyboard input
+	for the motor impaired.  In any case, the adapter must somehow
+	intercept keyboard input and tty output.
+	These streams are generally hidden deep within the kernel.
+	If you say y here, kernel modules will have access to keyboard
+	input and tty output.  Adapters can then be loaded as modules,
+	without patching and rebuilding the kernel.
+	The effect on kernel size and performance is negligible,
+	so you should probably say y here.
+	Review Documentation/accessibility.txt for more information.
+
 config SWAP
 	bool "Support for paging of anonymous memory"
 	depends on MMU
--- Documentation/accessibility.txt	2004-01-11 06:10:42.000000000 -0500
+++ Documentation/accessibility.txt.new	2004-01-11 06:10:42.000000000 -0500
@@ -0,0 +1,428 @@
+		Linux Accessibility For Disabled Users
+
+As Linux matures and proliferates, the disabled community is asking how they
+too can access this important operating system.
+We have a legal and moral obligation
+to make Linux accessible to as many individuals as possible.
+Disabilities may include blindness (can't read the output),
+and motor impaired (can't type the input), to name just two.
+
+Given the difficulty of programming in the kernel,
+and maintaining patches while versions of Linux march along,
+we are not surprised to find an assortment of adapted applications.
+It is relatively easy to make a user program send its output to a synthesizer,
+or read from an alternate peripheral (rather than the keyboard).
+EmacsSpeak for the blind is a good example.
+However, we must remember that a program is being adapted, not the computer.
+Often the program is extremely powerful, such as emacs or bash,
+but it is a program nonetheless. There will always be some users who would
+rather adapt the entire computer, as has been done for Dos and Windows.
+
+Fortunately this task has become much easier,
+thanks to a standard interface that supports adaptive modules.
+When you run `make config', say yes to "accessibility adapters",
+and the resulting kernel will support adaptive modules.
+By definition, an adaptive module redirects or restructures keyboard input
+or console output in a manner that compensates for a particular disability.
+These streams were not available to loadable modules in earlier versions of Linux,
+but they are now.  Here are some sample adapters.
+
+    Blind: send console output to a speech synthesizer.
+    Function keys allow the user to review the contents of screen memory.
+
+    Blind-deaf: send console output to a braille device.
+
+    One hand: Keys are remapped to minimize cross-keyboard movements.
+    This may include key chords, which cannot be implemented via loadkeys.
+
+    No hands: A sip and puff peripheral sends a limited set of scan codes to
+    the keyboard input port.  An adapter reads them in sequence and
+    translates them into characters.  This may include
+    word completion/prediction algorithms and user defined macros.
+
+The accessibility interface is defined in linux/accessibility.h.
+Module developers should include this header file, along with module.h
+and any other files needed for consistency.
+After you've read this document, please review accessibility.h.
+
+The adaptive module defines a set of operations, actually functions,
+that the kernel invokes.
+These are similar to file operations or inode operations,
+but they are driven by console output and keyboard input.
+These "callback" functions are defined below.
+
+        	void (*tty_start)(int minor);
+        	void (*tty_stop)(int minor);
+
+These functions are called when a tty is allocated or freed, respectively.
+A tty is allocated when it is opened for the first time.
+This action invokes tty_start(),
+passing the minor device number of the newly created tty.
+Subsequent processes may open and close this tty,
+but that will not trigger any adapter operations,
+until the last process closes the tty.
+That frees the tty and invokes tty_stop().
+
+Some adapters use tty_start() to allocate a structure for each open tty.
+This can be thought of as an extention to struct tty_struct,
+but it isn't defined in linux/tty.h; it is defined by the adapter.
+Tty_stop() can then be used to free the structure and stop any
+reading that might be in progress on that tty.
+
+Developers may want to think carefully before deallocating resources
+inside tty_stop(). Under Redhat, the first tty driver, tty1,
+is opened to run rc.sysinit, then closed.
+Then all the virtual terminals are opened as you enter a higher run level.
+If you deallocate resources when tty1 closes,
+there will be no log of the output of rc_sysinit.
+This is probably not what you want. My adapter allocates its buffers through
+tty_start(), but basically ignores tty_stop().
+It then deallocates everything it knows about in cleanup_module().
+
+        	int (*tty_out)(int minor, unsigned char c, int isEcho);
+
+This function is called whenever an output character is generated.
+The first parameter holds the minor device number, which is between 1 and 63.
+The second parameter is the output character.
+It's high order bit may be significant.
+Finally, the third parameter determines whether this character
+is an echo of an input character,
+according to the line discipline of the tty.
+I use this information to generate a unique sound when the user is typing capital letters,
+thus the user will not type a paragraph in caps lock by mistake.
+You wouldn't want these tones to appear whenever the computer
+prints capital letters,
+so I only generate the tones when isecho is nonzero.
+
+The return value is a bit map as follows.
+
+01send the character on to the screen, or virtual screen
+(virtual terminals are fully supported).
+If the character is eaten as part of a recognized escape sequence,
+this function should return 0.
+
+02Send an escape to the screen before sending this character.
+This is used when we thought we were running a talking escape sequence,
+but then we didn't get the right follow-on character,
+so we want the tty to send the escape that was swallowed earlier.
+
+04Take a realtime break.
+It took a while to process this particular character, for whatever reason,
+and we don't want to monopolize the CPU.
+My system sets this bit after it generates the sound associated with
+the return character.
+The sound is made using CPU cycles -- quite a few of them --
+so it is best to let another process have a turn.
+
+        	int (*keystroke)(unsigned int *key_p, int *shiftstate_p, int upflag) ;
+
+The key code and shift state are passed into this routine.
+Keycodes are fairly (though not entirely) standard
+representations of keys on the keyboard,
+and the bits of shiftstate,
+indicating shift, control, alt, etc,
+are documented in the Linux manual.
+See dumpkeys(1), showkey(1), and loadkeys(1).
+Upflag is set if the key is being released.
+Most adapters simply return if this flag is set.
+they are only interested in key press events.
+But if you want to recognize key chords
+that activate specialized functions, this interface will support that.
+
+Note that key and state are passed by reference.
+The adapter can change the key and shiftstate,
+and Linux will process the new key and state,
+as though that were entered at the keyboard.
+This is rarely done however.
+In fact you have to be very careful with this.
+If you change x to y with upflag off,
+you'll want to do the same with upflag on,
+press and release, so that Linux can maintain its bookkeeping.
+As I say, most adapters don't change the key codes.
+But they sometimes eat the keystroke, as described below.
+
+The return value is boolean.
+If zero is returned, the key has been eaten by the adapter.
+For example, the keystroke might cause the module to begin reading.
+The running process doesn't need to see it.
+Conversely, a nonzero return routes the key to its destination.
+This is usually a process reading from /dev/console,
+but it could be a meta function
+such as changing virtual terminals or the famous control-alt-delete reboot.
+
+WARNING!!
+Unlike the previous functions,
+this one is invoked as part of an interrupt routine.
+Specifically, it is called from the bottom half of the keyboard interrupt.
+Hardware interrupts are not disabled,
+so you won't lose data from a serial port or ethernet connection,
+but some Linux functions are suspended while inside this software interrupt.
+You should not hold the CPU for too long.
+When a speech function cannot be executed right away,
+because the synthesizer is busy (for instance),
+put it on a pending queue and deal with it later.
+
+Because this routine is triggered by a keystroke,
+it is entirely asynchronous with respect to the kernel.
+As a result there are certain operations you cannot perform,
+such as allocating memory or other resources.
+The tty_start() routine is a better place
+to allocate all the resources you will need to perform your functions.
+
+	void scroll(int minor, int t, int b, int nr) ;
+	void cursorloc(int minor, int x, int y) ;
+
+When a console screen, or section thereof, scrolls up or down,
+the kernel calls scroll(), passing the top and bottom of the region,
+and the number of rows that the region has scrolled up.
+A negative number means the region has scrolled down.
+If the adapter is reading from screen memory,
+it may want to move its reading cursor accordingly,
+to keep in step with the moving text.
+
+Whenever the cursor moves, the kernel calls cursorloc(),
+passing the new x and y coordinates.
+In a typical sequence, a program generates output,
+the tty driver passes the output character to the adapter,
+the adapter returns 1, the tty driver sends the character on to the console,
+the console prints it, and moves the cursor one to the right,
+or down to the next line if we wrap,
+then sends the new cursor location to the adapter via cursorloc().
+
+	void (*polling)(void);
+
+Most adapters employ an asynchronous thread to implement
+continuous reading.
+This thread monitors the speech synthesizer and transmits text
+while Linux executes other processes.
+Thus the blind user can sit back and listen to a screen full of information
+while somebody else computes the first million digits of pi.
+For simplicity, this thread is usually implemented by a polling function.
+In other words, a function wakes up ten times a second,
+checks the status of the synthesizer,
+and if the unit is not busy, sends it more words to speak.
+This is not the most efficient design,
+but we don't really need to mess with interrupts for events
+that only come two or three times a second.
+The adapter supplies the polling function and the period.
+
+	extern int register_accessibility_device(struct accessibility_device *dev);
+	extern void unregister_accessibility_device(struct accessibility_device *dev);
+
+The adaptive module calls a register function to attach itself to the kernel,
+and an unregister function to detach itself from the kernel.
+This is usually done from init_module() and cleanup_module() respectively.
+The function pointers are passed to register() and unregister()
+inside a structure that describes the adapter.
+See accessibility.h for more details.
+
+Register() could fail if another adaptive module is currently loaded.
+Otherwise it sets the function pointers as you indicate
+and calls tty_start() for each open tty.
+Similarly, unregister() calls tty_stop() for each open tty,
+and restores the kernel to its original behavior.
+Obviously the open ttys aren't going away,
+but the adapter is,
+and this seems like a simple way to clean things up.
+
+The adaptive module, like any other module,
+is limited to the symbols that have been exported by the kernel.
+This list is growing all the time, and most of the symbols needed by a speech
+adapter should be availble.  These include functions to access the serial port,
+for speech synthesizers on ttyS0 through ttyS3.
+However, if you are writing an unusual adapter,
+you might find you need a function or variable that has not been exported.
+In this case you may indeed need to patch the kernel,
+but it is a simple patch,
+and you should have no trouble incorporating it into the next release of Linux.
+
+In addition to exporting preexisting symbols,
+I have added some functions to the base kernel --
+functions that most adaptive modules will need --
+functions that developers don't want to reinvent and maintain
+over and over again.  Future releases will include more
+functions that are common to many adapters.
+
+	        extern void kd_mknotes(const short *notes);
+
+An array of notes is pushed onto an internal sound fifo.
+These notes are then played by an asynchronous thread, using the PC speaker.
+If the fifo is full, the incoming tones are discarded.
+Thus if a program issues 100 note strings in rapid sequence
+the first dozen fill the fifo and the rest are silently lost.
+The fifo then drains over the next few seconds.
+Of course this isn't likely to happen in practice.
+Normally we place beeps and tones into a near-empty
+fifo, whence they are played immediately.
+If the computer has no toggle speaker, this function is a stub.
+Future versions will send sin waves to the sound card.
+
+The parameter *notes is an array of shorts.
+Each note consists of two shorts: frequency and duration.
+A frequency of -1 is a rest.
+A frequency of zero ends the list of notes.
+Duration is measured in hundredths of a second,
+and frequency is given in hurtz.
+
+	        extern int vc_screenParams(int minor,
+	        short *nlines, short *ncols, short *x, short *y);
+	        extern int vc_screenimage(int minor, short *dest, int destsize);
+	extern int vc_screenItem(int minor, int x, int y);
+
+The first function retrieves parameters for the designated console,
+returning -ENODEV if the minor number is not associated with an active tty.
+The adapter may wish to allocate a buffer of shorts, nlines*ncols in size,
+then use the second function to retrieve a copy of screen memory, frozen in time.
+Alternatively, the adapter can use the third function to read
+individual characters off the screen.
+
+	extern void tty_putc(int minor, int ch);
+	extern void tty_puts(int minor, char *cp);
+
+These are simple wrappers around the put_queue and puts_queue routines
+in keyboard.h.  The interface is simplified, so you don't need to know
+about struct vc_data (which may change anyways); you only need pass the
+minor number and the character(s).
+This is used to implement macros.
+A keystroke can invoke a macro, which simulates an entire
+string of characters typed at the keyboard.
+See the example code at the bottom of this page.
+
+	/proc
+
+Adapters can make use of the /proc file system
+to pass information back to the user, or on to the synthesizer.
+This is generally more flexible than new ioctl directives or system calls.
+The directory /proc/accessibility is intended to house various adapters.
+Create a subdirectory for your adapter,
+then add more files under this subdirectory as you see fit.
+
+For example, my Jupiter adapter makes the text buffers available
+under /proc/accessibility/jupiter,
+so your ineractive session can be saved to a file
+at any time.  The session associated with tty3
+is captured in /proc/accessibility/jupiter/buf3.
+To prevent others from evesdropping on your work, this file is
+owned by root, or by you, if you pass your uid as a module parameter.
+This is merely an example; each adapter can add its own files
+under /proc/accessibility/xxx, for various purposes.
+
+Below is a sample adapter.
+It prints messages when it attaches and detaches itself,
+intersepts shift F5, and swallows escape q.
+
+----------------------------------------------------------------------
+
+/*********************************************************************
+
+adapter_generic.c: skeleton for an adaptive module.
+
+Compile this using the C flags
+that correspond to kernel modules on your system.
+The following flags will probably work.
+CFLAGS = -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -m386 -DCPU=386 -DMODULE
+
+Then run insmod on the resulting object file.
+insmod adapter_generic.o period=7
+Run rmmod when you want to remove the module.
+
+*********************************************************************/
+
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/accessibility.h>
+
+int period;
+MODULE_PARM(period, "i"); /* i means integer */
+
+/* Make a little beep every period seconds, or not, if period = 0. */
+static void pollFunction(struct accessibility_device *dev)
+{
+	static const short beep[] = {
+		3000,3,0,0	};
+	kd_mknotes(beep);
+}
+
+static void tty_start(struct accessibility_device *dev, int minor)
+{
+	printk("tty start %d\n", minor);
+}
+
+static void tty_stop(struct accessibility_device *dev, int minor)
+{
+	printk("tty stop %d\n", minor);
+}
+
+/* Eat escape q, as though it invoked a particular function */
+static int tty_out(struct accessibility_device *dev,
+int minor, unsigned char c, int isecho)
+{
+	static int escstate = 0;
+	if(escstate) {
+		escstate = 0;
+		if(c == 'q') {
+			/* perform the function */
+			printk("escape q function\n");
+			/* Return 4 if it took a while to run this function */
+			return 4;
+		}
+		return 3; /* print escape and the current character */
+	}
+	if(c == '\33') {
+		escstate = 1;
+		return 0;
+	}
+	return 1;
+}
+
+/* Let shift F5 perform a special function */
+/* Let alt m be a macro */
+static int keystroke(struct accessibility_device *dev,
+int key, int shiftstate)
+{
+	if(key == 0x3f && shiftstate == 1) {
+		/* perform the function */
+		printk("f5 function\n");
+		return 0;
+	}
+	if(key == 0x32 && shiftstate == 2) {
+		tty_puts(fg_console+1, "macro");
+		return 0;
+	}
+	return 1;
+}
+
+static struct accessibility_operations myops = {
+	tty_start,
+	tty_stop,
+	tty_out,
+	keystroke,
+	NULL, /* scroll function */
+	NULL, /* cursor location function */
+	NULL, /* might become pollFunction */
+	0,
+};
+
+static struct accessibility_device mydev = {
+ops: &myops,
+};
+
+int init_module(void)
+{
+if(period) {
+myops.polling = pollFunction;
+myops.period = period*100;
+}
+	return register_accessibility_device(&mydev);
+}
+
+void cleanup_module(void)
+{
+	unregister_accessibility_device(&mydev);
+}
+
+----------------------------------------------------------------------
+
+Written and maintained by Karl Dahlke.
+karl@eklhad.net
--- include/linux/accessibility.h	2004-01-11 06:10:42.000000000 -0500
+++ include/linux/accessibility.h.new	2004-01-11 06:10:42.000000000 -0500
@@ -0,0 +1,89 @@
+/*********************************************************************
+
+accessibility.h: interface to various adapters for disabled users.
+
+Copyright (C) Karl Dahlke, 2001.
+This software may be freely distributed under the GPL, general public license,
+as articulated by the Free Software Foundation.
+
+Maintained by Karl Dahlke,  karl@eklhad.net.
+
+This header file defines the interface between the Linux kernel and the
+accessibility modules.
+See Documentation/accessibility.txt for more details.
+
+*********************************************************************/
+
+#ifndef LINUX_ACCESSIBILITY_H
+#define LINUX_ACCESSIBILITY_H 1
+
+#include <linux/config.h>
+#include <linux/proc_fs.h>
+#include <linux/timer.h>
+
+#ifdef CONFIG_ACCESSIBILITY
+
+/*
+ * Accessibility device structure.  This is a placeholder for now.
+ * We'll probably need it in the future.
+ */
+
+struct accessibility_device
+{
+	struct accessibility_operations *ops;
+#ifdef CONFIG_PROC_FS
+	struct proc_dir_entry *proc;
+#endif
+	struct pci_device *dev;
+	void *data; /* each adapter links its own structure here */
+	struct timer_list polltime;
+	char pollrunning;
+	char tty_out_status;
+};
+
+/*
+ * Here are the operations performed by an accessibility adapter.
+ * Any of these function pointers may be left null, for the default kernel behavior.
+ */
+
+struct accessibility_operations
+{
+	void (*tty_start) (struct accessibility_device *dev,
+		int minor);
+	void (*tty_stop) (struct accessibility_device *dev,
+		int minor);
+	int (*tty_out) (struct accessibility_device *dev,
+		int minor, unsigned char c, int echo);
+	int (*keystroke) (struct accessibility_device *dev,
+		unsigned int *key, int *shiftstate, int up_flag);
+	void (*scroll) (struct accessibility_device *dev,
+		int minor, int t, int b, int nr);
+	void (*cursorloc) (struct accessibility_device *dev,
+		int minor, int x, int y);
+	void (*polling) (struct accessibility_device *dev);
+	int period;
+};
+
+extern int register_accessibility_device(struct accessibility_device *dev);
+extern void unregister_accessibility_device(struct accessibility_device *dev);
+
+extern void tty_putc(int minor, int ch);
+extern void tty_puts(int minor, char *cp);
+extern int vc_screenParams(int minor, short *nrows, short *ncols, short *x, short *y);
+extern int vc_screenItem(int minor, int x, int y);
+extern int vc_screenImage(int minor, short *dest, int destsize);
+extern void kd_mknotes(const short *data);
+
+/* For internal use only - not accessible from adapters. */
+
+#ifndef MODULE
+
+/* For now, there is one and only one adapter active at any one time. */
+extern struct accessibility_device *accdev;
+extern struct accessibility_operations *accops;
+
+#endif
+
+#endif
+
+#endif
--- include/linux/proc_fs.h	2004-01-11 06:10:42.000000000 -0500
+++ include/linux/proc_fs.h.new	2004-01-11 06:10:42.000000000 -0500
@@ -84,6 +84,7 @@
 extern struct proc_dir_entry proc_root;
 extern struct proc_dir_entry *proc_root_fs;
 extern struct proc_dir_entry *proc_net;
+extern struct proc_dir_entry *proc_accessibility;
 extern struct proc_dir_entry *proc_bus;
 extern struct proc_dir_entry *proc_root_driver;
 extern struct proc_dir_entry *proc_root_kcore;
--- drivers/Makefile	2004-01-11 06:10:42.000000000 -0500
+++ drivers/Makefile.new	2004-01-11 06:10:42.000000000 -0500
@@ -49,3 +49,12 @@
 obj-$(CONFIG_MCA)		+= mca/
 obj-$(CONFIG_EISA)		+= eisa/
 obj-$(CONFIG_CPU_FREQ)		+= cpufreq/
+
+#  Best to leave this at the end -
+#  some adaptive modules may need to look back and see which char devices
+#  are available.
+#  Builtin adapters are not yet implemented.
+#  I don't think it would be hard to do, we just haven't done it yet.
+#obj-y				+= accessibility/
+obj-m				+= accessibility/
+
--- drivers/Kconfig	2004-01-11 06:10:42.000000000 -0500
+++ drivers/Kconfig.new	2004-01-11 06:10:42.000000000 -0500
@@ -38,6 +38,8 @@
 
 source "drivers/char/Kconfig"
 
+source "drivers/accessibility/Kconfig"
+
 # source "drivers/misc/Kconfig"
 
 source "drivers/media/Kconfig"
--- drivers/char/keyboard.c	2004-01-11 06:10:42.000000000 -0500
+++ drivers/char/keyboard.c.new	2004-01-11 06:10:42.000000000 -0500
@@ -33,6 +33,7 @@
 #include <linux/string.h>
 #include <linux/random.h>
 #include <linux/init.h>
+#include <linux/accessibility.h>
 #include <linux/slab.h>
 
 #include <linux/kbd_kern.h>
@@ -41,6 +42,8 @@
 #include <linux/sysrq.h>
 #include <linux/input.h>
 
+#include <asm/io.h>
+
 static void kbd_disconnect(struct input_handle *handle);
 extern void ctrl_alt_del(void);
 
@@ -262,6 +265,80 @@
 }
 
 /*
+ * Push notes onto a sound fifo and play them via an asynchronous thread.
+ */
+
+#define SF_LEN 32 /* length of sound fifo */
+static short sf_fifo[SF_LEN];
+static short sf_head, sf_tail;
+
+#define PORT_SPEAKER 0x61
+#define PORT_TIMER2 0x43
+#define PORT_TIMERVAL 0x42
+
+/* Pop the next sound out of the sound fifo. */
+static void popfifo(unsigned long );
+static struct timer_list note_timer =
+		TIMER_INITIALIZER(popfifo, 0, 0);
+static void popfifo(unsigned long notUsed)
+{
+	short i, freq, duration;
+
+	/* Apparently it's ok to delete a timer that has expired, */
+	/* or has never been added in the first place. */
+	/* kd_mksound() does it, so can we. */
+	del_timer(&note_timer);
+
+	if((i = sf_tail) == sf_head) {
+		/* turn off singing speaker */
+		outb(inb_p(PORT_SPEAKER)&0xFC, PORT_SPEAKER);
+		return; /* sound fifo is empty */
+	}
+
+	/* First short holds the frequency */
+	freq = sf_fifo[i++];
+	if(i == SF_LEN) i = 0; /* wrap around */
+	duration = sf_fifo[i++];
+	if(i == SF_LEN) i = 0;
+	sf_tail = i;
+
+	mod_timer(&note_timer, jiffies + duration*(HZ/100));
+
+	cli();
+	if(freq < 0) {
+		outb(inb_p(PORT_SPEAKER)&0xFC, PORT_SPEAKER);
+	} else {
+		duration = 1193180 / freq;
+		outb_p(inb_p(PORT_SPEAKER)|3, PORT_SPEAKER);
+		/* set command for counter 2, 2 byte write */
+		outb_p(0xB6, PORT_TIMER2);
+		outb_p(duration & 0xff, PORT_TIMERVAL);
+		outb((duration >> 8) & 0xff, PORT_TIMERVAL);
+	}
+	sti();
+} /* popfifo */
+
+/* Put a string of notes into the sound fifo. */
+void kd_mknotes(const short *p)
+{
+	short i;
+
+	cli();
+	i = sf_head;
+	/* Copy shorts into the fifo, until the terminating zero. */
+	while(*p) {
+		sf_fifo[i++] = *p++;
+		if(i == SF_LEN) i = 0; /* wrap around */
+		if(i == sf_tail) { sti(); return; }
+	}
+	sf_head = i;
+	sti();
+
+	/* first sound,  get things started. */
+	if(!timer_pending(&note_timer)) popfifo(0);
+} /* kd_mknotes */
+
+/*
  * Setting the keyboard rate.
  */
 
@@ -316,6 +393,19 @@
 	con_schedule_flip(tty);
 }
 
+/* Pass characters to the tty, e.g. invoking a macro with a singel keystroke */
+void tty_putc(int minor, int ch)
+{
+	struct vc_data *c = vc_cons[minor-1].d;
+	put_queue(c, ch);
+} /* tty_putc */
+
+void tty_puts(int minor, char *cp)
+{
+	struct vc_data *c = vc_cons[minor-1].d;
+	puts_queue(c, cp);
+} /* tty_puts */
+
 static void applkey(struct vc_data *vc, int key, char mode)
 {
 	static char buf[] = { 0x1b, 'O', 0x00, 0x00 };
@@ -1082,6 +1172,13 @@
 		raw_mode = 1;
 	}
 
+#ifdef CONFIG_ACCESSIBILITY
+	if(accops && accops->keystroke && !raw_mode) {
+		if(!accops->keystroke(accdev, &keycode, &shift_state, !down))
+			return; /* eaten by the adapter */
+	}
+#endif
+
 	if (down)
 		set_bit(keycode, key_down);
 	else
@@ -1231,3 +1328,8 @@
 
 	return 0;
 }
+
+EXPORT_SYMBOL(getledstate);
+EXPORT_SYMBOL(tty_putc);
+EXPORT_SYMBOL(tty_puts);
+EXPORT_SYMBOL(kd_mknotes);
--- drivers/char/tty_io.c	2004-01-11 06:10:42.000000000 -0500
+++ drivers/char/tty_io.c.new	2004-01-11 06:10:42.000000000 -0500
@@ -86,8 +86,8 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/poll.h>
-#include <linux/proc_fs.h>
 #include <linux/init.h>
+#include <linux/accessibility.h>
 #include <linux/module.h>
 #include <linux/smp_lock.h>
 #include <linux/device.h>
@@ -771,6 +771,98 @@
 	up(&tty_sem);
 }
 
+#ifdef CONFIG_ACCESSIBILITY
+
+/*
+ * The accessibility device.
+ * At this point there is only one.
+ * For more information, see Documentation/accessibility.txt.
+ */
+
+struct accessibility_device *accdev;
+struct accessibility_operations *accops;
+
+/* wrapper to call the adapter's polling function */
+static void accessibility_polling_wrapper(unsigned long arg)
+{
+	struct accessibility_device *dev = (struct accessibility_device *)arg;
+	/* First thing we're going to do is re-enable the timer. */
+	mod_timer(&dev->polltime, jiffies + dev->ops->period);
+	if(dev->pollrunning) return; /* reentrant lock */
+	/* Now call the function in the adapter */
+	dev->pollrunning = 1;
+	dev->ops->polling(dev);
+	dev->pollrunning = 0;
+} /* accessibility_polling_wrapper */
+
+int register_accessibility_device(struct accessibility_device *dev)
+{
+	if(accdev) return -EBUSY;
+
+	/* call tty_start for each open tty */
+	if(dev->ops && dev->ops->tty_start) {
+		int index, minor;
+		dev_t ttydev;
+		struct tty_driver *driver;
+		for(minor=1; minor<=MAX_NR_CONSOLES; ++minor) {
+			ttydev = MKDEV(TTY_MAJOR, minor);
+			driver = get_tty_driver(ttydev, &index);
+			if(!driver) continue;
+			if(!driver->ttys[index]) continue;
+			dev->ops->tty_start(dev, minor);
+		} /* loop over possible consoles */
+	} /* tty_start method was provided */
+
+	/* make the link */
+	accdev = dev;
+	accops = dev->ops;
+
+	/* start the user polling function */
+	if(accops && accops->polling && accops->period) {
+		static struct timer_list sample_polltime =
+			TIMER_INITIALIZER(accessibility_polling_wrapper, 0, 0);
+		memcpy(&dev->polltime, &sample_polltime, sizeof(sample_polltime));
+		dev->polltime.data = (unsigned long)dev;
+		dev->pollrunning = 0;
+		accessibility_polling_wrapper((unsigned long)dev);
+	}
+
+	return 0; /* adapter is attached */
+} /* register_accessibility_device */
+
+void unregister_accessibility_device(struct accessibility_device *dev)
+{
+	if(!dev || dev != accdev) return;
+
+	/* kill the polling function */
+	if(accops && accops->polling && accops->period) {
+		del_timer(&dev->polltime);
+		dev->polltime.function = 0;
+	}
+
+	accops = 0;
+	accdev = 0;
+
+	/* Call tty_stop for each open tty. */
+	if(dev->ops && dev->ops->tty_stop) {
+		int index, minor;
+		dev_t ttydev;
+		struct tty_driver *driver;
+		for(minor=1; minor<=MAX_NR_CONSOLES; ++minor) {
+			ttydev = MKDEV(TTY_MAJOR, minor);
+			driver = get_tty_driver(ttydev, &index);
+			if(!driver) continue;
+			if(!driver->ttys[index]) continue;
+			dev->ops->tty_stop(dev, minor);
+		} /* loop over possible consoles */
+	} /* tty_stop method was provided */
+} /* unregister_accessibility_device */
+
+EXPORT_SYMBOL(register_accessibility_device);
+EXPORT_SYMBOL(unregister_accessibility_device);
+
+#endif
+
 static void release_mem(struct tty_struct *tty, int idx);
 
 static inline void tty_line_name(struct tty_driver *driver, int index, char *p)
@@ -791,6 +883,7 @@
 	struct termios *tp, **tp_loc, *o_tp, **o_tp_loc;
 	struct termios *ltp, **ltp_loc, *o_ltp, **o_ltp_loc;
 	int retval=0;
+	int minor;
 
 	/* 
 	 * Check whether we need to acquire the tty semaphore to avoid
@@ -898,6 +991,16 @@
 	 */
 	driver->ttys[idx] = tty;
 	
+	/* tty created, notify the adapter */
+#ifdef CONFIG_ACCESSIBILITY
+	minor = driver->minor_start + idx;
+	if(accops && accops->tty_start &&
+	driver->major == TTY_MAJOR &&
+	minor > 0 && minor < MAX_NR_CONSOLES) {
+		accops->tty_start(accdev, minor);
+	} /* console device */
+#endif
+
 	if (!*tp_loc)
 		*tp_loc = tp;
 	if (!*ltp_loc)
@@ -994,6 +1097,16 @@
 {
 	struct tty_struct *o_tty;
 	struct termios *tp;
+	int minor;
+
+#ifdef CONFIG_ACCESSIBILITY
+	minor = tty->driver->minor_start + idx;
+	if(accops && accops->tty_stop &&
+	tty->driver->major == TTY_MAJOR &&
+	minor > 0 && minor < MAX_NR_CONSOLES) {
+		accops->tty_stop(accdev, minor);
+	} /* console device */
+#endif
 
 	if ((o_tty = tty->link) != NULL) {
 		o_tty->driver->ttys[idx] = NULL;
--- drivers/char/n_tty.c	2004-01-11 06:10:42.000000000 -0500
+++ drivers/char/n_tty.c.new	2004-01-11 06:10:42.000000000 -0500
@@ -45,6 +45,8 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/poll.h>
+#include <linux/config.h>
+#include <linux/accessibility.h>
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -173,10 +175,44 @@
 }
 
 /*
+ * put_char() wrapper, modified by Karl Dahlke, Jan 2004.
+ * This wrapper use to call driver->put_char(), and nothing more.
+ * Now if calls the accessibility adapter if appropriate.
+ */
+static void put_char(unsigned char c, struct tty_struct *tty, int isecho)
+{
+#ifdef CONFIG_ACCESSIBILITY
+	int major = tty->driver->major;
+	int minor = tty->driver->minor_start + tty->index;
+	if(accops && accops->tty_out &&
+	major == TTY_MAJOR &&
+	minor > 0 && minor < MAX_NR_CONSOLES) {
+		accdev->tty_out_status &= ~3;
+		accdev->tty_out_status |= accops->tty_out(accdev, minor, c, isecho);
+		if(!(accdev->tty_out_status&1)) return; /* do not display */
+		if(accdev->tty_out_status&2) {
+			/* I'll assume the driver has room for escape c.
+			 * We've already tested ahead of time;
+			 * it has room for C, or we would have blocked.
+			 * Does it have room for both characters?
+			 * On a serial or ethernet port, maybe not,
+			 * but on a console screen, it should.
+			 * There's no flow control -- nothing should block.
+			 * So I'm running on faith --
+			 * trying to keep the programming simple. */
+			tty->driver->put_char(tty, '\33');
+		} /* display previous escape */
+	} /* an adapted tty */
+#endif
+
+	tty->driver->put_char(tty, c);
+} /* put_char */
+
+/*
  * Perform OPOST processing.  Returns -1 when the output device is
  * full and the character must be retried.
  */
-static int opost(unsigned char c, struct tty_struct *tty)
+static int opost(unsigned char c, struct tty_struct *tty, int isecho)
 {
 	int	space, spaces;
 
@@ -192,7 +228,7 @@
 			if (O_ONLCR(tty)) {
 				if (space < 2)
 					return -1;
-				tty->driver->put_char(tty, '\r');
+				put_char('\r', tty, 0);
 				tty->column = 0;
 			}
 			tty->canon_column = tty->column;
@@ -211,10 +247,13 @@
 		case '\t':
 			spaces = 8 - (tty->column & 7);
 			if (O_TABDLY(tty) == XTABS) {
+				int minor = tty->driver->minor_start + tty->index;
 				if (space < spaces)
 					return -1;
 				tty->column += spaces;
-				tty->driver->write(tty, 0, "        ", spaces);
+				if(minor > 0 && minor < MAX_NR_CONSOLES) {
+					while(spaces--) put_char(' ', tty, 0);
+				} else tty->driver->write(tty, 0, "        ", spaces);
 				return 0;
 			}
 			tty->column += spaces;
@@ -231,7 +270,7 @@
 			break;
 		}
 	}
-	tty->driver->put_char(tty, c);
+	put_char(c, tty, isecho);
 	return 0;
 }
 
@@ -300,28 +339,22 @@
 }
 
 
-
-static inline void put_char(unsigned char c, struct tty_struct *tty)
-{
-	tty->driver->put_char(tty, c);
-}
-
 /* Must be called only when L_ECHO(tty) is true. */
 
 static void echo_char(unsigned char c, struct tty_struct *tty)
 {
 	if (L_ECHOCTL(tty) && iscntrl(c) && c != '\t') {
-		put_char('^', tty);
-		put_char(c ^ 0100, tty);
+		put_char('^', tty, 0);
+		put_char(c ^ 0100, tty, 0);
 		tty->column += 2;
 	} else
-		opost(c, tty);
+		opost(c, tty, 1);
 }
 
 static inline void finish_erasing(struct tty_struct *tty)
 {
 	if (tty->erasing) {
-		put_char('/', tty);
+		put_char('/', tty, 0);
 		tty->column++;
 		tty->erasing = 0;
 	}
@@ -334,7 +367,7 @@
 	unsigned long flags;
 
 	if (tty->read_head == tty->canon_head) {
-		/* opost('\a', tty); */		/* what do you think? */
+		/* opost('\a', tty, 0); */		/* what do you think? */
 		return;
 	}
 	if (c == ERASE_CHAR(tty))
@@ -360,7 +393,7 @@
 			echo_char(KILL_CHAR(tty), tty);
 			/* Add a newline if ECHOK is on and ECHOKE is off. */
 			if (L_ECHOK(tty))
-				opost('\n', tty);
+				opost('\n', tty, 0);
 			return;
 		}
 		kill_type = KILL;
@@ -384,7 +417,7 @@
 		if (L_ECHO(tty)) {
 			if (L_ECHOPRT(tty)) {
 				if (!tty->erasing) {
-					put_char('\\', tty);
+					put_char('\\', tty, 0);
 					tty->column++;
 					tty->erasing = 1;
 				}
@@ -415,22 +448,22 @@
 				/* Now backup to that column. */
 				while (tty->column > col) {
 					/* Can't use opost here. */
-					put_char('\b', tty);
+					put_char('\b', tty, 0);
 					if (tty->column > 0)
 						tty->column--;
 				}
 			} else {
 				if (iscntrl(c) && L_ECHOCTL(tty)) {
-					put_char('\b', tty);
-					put_char(' ', tty);
-					put_char('\b', tty);
+					put_char('\b', tty, 0);
+					put_char(' ', tty, 0);
+					put_char('\b', tty, 0);
 					if (tty->column > 0)
 						tty->column--;
 				}
 				if (!iscntrl(c) || L_ECHOCTL(tty)) {
-					put_char('\b', tty);
-					put_char(' ', tty);
-					put_char('\b', tty);
+					put_char('\b', tty, 0);
+					put_char(' ', tty, 0);
+					put_char('\b', tty, 0);
 					if (tty->column > 0)
 						tty->column--;
 				}
@@ -541,7 +574,7 @@
 		tty->lnext = 0;
 		if (L_ECHO(tty)) {
 			if (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
-				put_char('\a', tty); /* beep if no space */
+				put_char('\a', tty, 0); /* beep if no space */
 				return;
 			}
 			/* Record the column of first canon char. */
@@ -598,8 +631,8 @@
 			if (L_ECHO(tty)) {
 				finish_erasing(tty);
 				if (L_ECHOCTL(tty)) {
-					put_char('^', tty);
-					put_char('\b', tty);
+					put_char('^', tty, 0);
+					put_char('\b', tty, 0);
 				}
 			}
 			return;
@@ -610,7 +643,7 @@
 
 			finish_erasing(tty);
 			echo_char(c, tty);
-			opost('\n', tty);
+			opost('\n', tty, 0);
 			while (tail != tty->read_head) {
 				echo_char(tty->read_buf[tail], tty);
 				tail = (tail+1) & (N_TTY_BUF_SIZE-1);
@@ -620,10 +653,10 @@
 		if (c == '\n') {
 			if (L_ECHO(tty) || L_ECHONL(tty)) {
 				if (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
-					put_char('\a', tty);
+					put_char('\a', tty, 0);
 					return;
 				}
-				opost('\n', tty);
+				opost('\n', tty, 0);
 			}
 			goto handle_newline;
 		}
@@ -640,7 +673,7 @@
 			 */
 			if (L_ECHO(tty)) {
 				if (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
-					put_char('\a', tty);
+					put_char('\a', tty, 0);
 					return;
 				}
 				/* Record the column of first canon char. */
@@ -672,11 +705,11 @@
 	finish_erasing(tty);
 	if (L_ECHO(tty)) {
 		if (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
-			put_char('\a', tty); /* beep if no space */
+			put_char('\a', tty, 0); /* beep if no space */
 			return;
 		}
 		if (c == '\n')
-			opost('\n', tty);
+			opost('\n', tty, 0);
 		else {
 			/* Record the column of first canon char. */
 			if (tty->canon_head == tty->read_head)
@@ -1163,6 +1196,8 @@
 	DECLARE_WAITQUEUE(wait, current);
 	int c;
 	ssize_t retval = 0;
+	int major = tty->driver->major;
+	int minor = tty->driver->minor_start + tty->index;
 
 	/* Job control check -- must be done at start (POSIX.1 7.1.1.4). */
 	if (L_TOSTOP(tty) && file->f_op->write != redirected_tty_write) {
@@ -1182,6 +1217,37 @@
 			retval = -EIO;
 			break;
 		}
+
+/* If this is a talking tty, we must run everything through put_char. */
+#ifdef CONFIG_ACCESSIBILITY
+if(accops && accops->tty_out &&
+major == TTY_MAJOR &&
+minor > 0 && minor < MAX_NR_CONSOLES) {
+	accdev->tty_out_status = 0;
+	while(nr > 0) {
+		int oval;
+		get_user(c, b);
+/* If we interrupt the swoop of a carriage return, */
+/* it really sounds weird! */
+		if(c == '\r') set_current_state(TASK_UNINTERRUPTIBLE);
+		oval = opost(c, tty, 0);
+		if(c == '\r') set_current_state(TASK_INTERRUPTIBLE);
+		if(oval < 0) break;
+		++b, --nr;
+		if (tty->driver->flush_chars)
+			tty->driver->flush_chars(tty);
+		if(accdev->tty_out_status&4) {
+/* I just don't understand why I have to set this to RUNNING, */
+/* but I do! */
+			current->state = TASK_RUNNING;
+			break;
+		}
+	} /* loop putting characters */
+} else {
+#endif
+
+/* non-accessibility code follows -- takes advantage of opost_block() */
+
 		if (O_OPOST(tty) && !(test_bit(TTY_HW_COOK_OUT, &tty->flags))) {
 			while (nr > 0) {
 				ssize_t num = opost_block(tty, b, nr);
@@ -1196,7 +1262,7 @@
 				if (nr == 0)
 					break;
 				get_user(c, b);
-				if (opost(c, tty) < 0)
+				if (opost(c, tty, 0) < 0)
 					break;
 				b++; nr--;
 			}
@@ -1211,6 +1277,11 @@
 			b += c;
 			nr -= c;
 		}
+
+#ifdef CONFIG_ACCESSIBILITY
+} /* preexisting code or accessibility code */
+#endif
+
 		if (!nr)
 			break;
 		if (file->f_flags & O_NONBLOCK) {
--- drivers/char/vt.c	2004-01-11 06:10:42.000000000 -0500
+++ drivers/char/vt.c.new	2004-01-11 06:10:42.000000000 -0500
@@ -97,6 +97,7 @@
 #include <linux/timer.h>
 #include <linux/interrupt.h>
 #include <linux/config.h>
+#include <linux/accessibility.h>
 #include <linux/workqueue.h>
 #include <linux/bootmem.h>
 #include <linux/pm.h>
@@ -263,6 +264,10 @@
 		nr = b - t - 1;
 	if (b > video_num_lines || t >= b || nr < 1)
 		return;
+#ifdef CONFIG_ACCESSIBILITY
+	if(accops && accops->scroll)
+		accops->scroll(accdev, currcons+1, t, b, nr);
+#endif
 	if (IS_VISIBLE && sw->con_scroll(vc_cons[currcons].d, t, b, SM_UP, nr))
 		return;
 	d = (unsigned short *) (origin+video_size_row*t);
@@ -281,6 +286,10 @@
 		nr = b - t - 1;
 	if (b > video_num_lines || t >= b || nr < 1)
 		return;
+#ifdef CONFIG_ACCESSIBILITY
+	if(accops && accops->scroll)
+		accops->scroll(accdev, currcons+1, t, b, -nr);
+#endif
 	if (IS_VISIBLE && sw->con_scroll(vc_cons[currcons].d, t, b, SM_DOWN, nr))
 		return;
 	s = (unsigned short *) (origin+video_size_row*t);
@@ -545,8 +554,15 @@
 
 static void set_cursor(int currcons)
 {
-    if (!IS_FG || console_blanked || vcmode == KD_GRAPHICS)
+    if (console_blanked || vcmode == KD_GRAPHICS)
 	return;
+#ifdef CONFIG_ACCESSIBILITY
+	/* Background console adapters may still want to track the cursor,
+	 * so this code comes before the is_fg test. */
+	if(accops && accops->cursorloc)
+		accops->cursorloc(accdev, currcons+1, x, y);
+#endif
+	if(! IS_FG) return;
     if (deccm) {
 	if (currcons == sel_cons)
 		clear_selection();
@@ -3038,10 +3054,85 @@
 	return 0;
 }
 
+#ifdef CONFIG_ACCESSIBILITY
+
+int vc_screenItem(int minor, int xx, int yy)
+{
+	int currcons = minor - 1;
+	short nlines, ncols;
+	unsigned short *org;
+
+	if(!vc_cons_allocated(currcons)) return -ENODEV;
+
+	nlines = video_num_lines;
+	ncols = video_num_columns;
+	if(xx < 0 || xx >= nlines || yy < 0 || yy >= ncols) return -EFAULT;
+	org = screen_pos(currcons, xx*ncols, 0);
+	org += yy;
+	return vcs_scr_readw(currcons, org);
+} /* vc_screenItem */
+
+/* Grab a copy of screen memory. */
+int vc_screenImage(int minor, short *dest, int destsize)
+{
+	int currcons = minor - 1;
+	short nlines, ncols;
+	long p;
+	int row, col;
+	unsigned short *org;
+
+	if(!vc_cons_allocated(currcons)) return -ENODEV;
+	if(!dest) return 0;
+
+	nlines = video_num_lines;
+	ncols = video_num_columns;
+if(nlines*ncols > destsize) return -ENOMEM;
+
+	p = 0;
+	for(row=0; row<nlines; ++row) {
+		org = screen_pos(currcons, row*ncols, 0);
+		for(col=0; col<ncols; ++col) {
+			dest[p++] = vcs_scr_readw(currcons, org++);
+		} /* loop over columns */
+	} /* loop over rows */
+
+	return 0;
+} /* vc_screenImage */
+
+/* get the screen parameters */
+int vc_screenParams(int minor,
+short *nlines_p, short *ncols_p, short *x_p, short *y_p)
+{
+	int currcons = minor - 1;
+	short nlines, ncols;
+	char xy[2];
+
+	if(!vc_cons_allocated(currcons)) return -ENODEV;
+
+	nlines = video_num_lines;
+	ncols = video_num_columns;
+	*nlines_p = nlines;
+	*ncols_p = ncols;
+
+	getconsxy(currcons, xy);
+	*x_p = xy[0];
+	*y_p = xy[1];
+
+	return 0;
+} /* vc_screenParams */
+
+#endif
+
+
 /*
  *	Visible symbols for modules
  */
 
+#ifdef CONFIG_ACCESSIBILITY
+EXPORT_SYMBOL(vc_screenImage);
+EXPORT_SYMBOL(vc_screenItem);
+EXPORT_SYMBOL(vc_screenParams);
+#endif
 EXPORT_SYMBOL(color_table);
 EXPORT_SYMBOL(default_red);
 EXPORT_SYMBOL(default_grn);
--- fs/proc/root.c	2004-01-11 06:10:42.000000000 -0500
+++ fs/proc/root.c.new	2004-01-11 06:10:42.000000000 -0500
@@ -19,6 +19,7 @@
 #include <linux/smp_lock.h>
 
 struct proc_dir_entry *proc_net, *proc_bus, *proc_root_fs, *proc_root_driver;
+struct proc_dir_entry *proc_accessibility;
 
 #ifdef CONFIG_SYSCTL
 struct proc_dir_entry *proc_sys_root;
@@ -53,6 +54,7 @@
 	}
 	proc_misc_init();
 	proc_net = proc_mkdir("net", 0);
+	proc_accessibility = proc_mkdir("accessibility", 0);
 #ifdef CONFIG_SYSVIPC
 	proc_mkdir("sysvipc", 0);
 #endif
@@ -160,5 +162,6 @@
 EXPORT_SYMBOL(proc_root);
 EXPORT_SYMBOL(proc_root_fs);
 EXPORT_SYMBOL(proc_net);
+EXPORT_SYMBOL(proc_accessibility);
 EXPORT_SYMBOL(proc_bus);
 EXPORT_SYMBOL(proc_root_driver);
--- drivers/accessibility/Makefile	2004-01-10 09:36:53.000000000 -0500
+++ drivers/accessibility/Makefile.new	2004-01-10 09:36:53.000000000 -0500
@@ -0,0 +1,6 @@
+#
+# Makefile for the Linux adaptive modules
+#
+# 15 Jan 2004, Karl Dahlke <karl@eklhad.net>
+#
+
--- drivers/accessibility/Kconfig	2004-01-10 09:36:53.000000000 -0500
+++ drivers/accessibility/Kconfig.new	2004-01-10 09:36:53.000000000 -0500
@@ -0,0 +1,7 @@
+#
+#  Accessibility adapters
+#
+
+menu "Accessibility Adapters"
+
+endmenu

^ permalink raw reply

* Re: MASQUERADE: Route sent us somewhere else (was Re: Fw: Rusty's brain broke!)
From: Julian Anastasov @ 2004-01-11 13:55 UTC (permalink / raw)
  To: Harald Welte
  Cc: kuznet, Rusty Russell, fenio, davem, linux-net, kaber,
	Netfilter Development Mailinglist, boris, email, Jan.Schubert
In-Reply-To: <20040111130114.GJ20706@sunbeam.de.gnumonks.org>


	Hello,

On Sun, 11 Jan 2004, Harald Welte wrote:

> As an example case where I would suspect problems: The packet could be
> coming from a local socket, and the socket be bound to a specific
> interface (sk->bound_dev_if).

	IMO, the real example is that the people use multipath routes
and providing oif was the only way MASQUERADE to meet the netfilter
and firewalling expectations of not changing the output device during
hooks. OTOH, providing oif=0 is the valid approach for selecting the
right route but as long as the above expectation exists there are
two options for the users:

- provide oif learned from the input route (as before the discussed
change). May be in 99% of the setups it selects the right route.
I think, we should use this, at least for 2.4.

- use CONNMARK or similar functionality to keep the connection
bound to its path. As long as CONNMARK is not a standard feature
there is no safe way to use multipath routes with MASQUERADE and
SNAT in the latest kernels. Even before this change it was risky
to rely on the routing cache to keep NAT connections bound to
its path in the multipath route - the cache entries expire.

Regards

--
Julian Anastasov <ja@ssi.bg>

^ permalink raw reply

* Re: port translation
From: Antony Stone @ 2004-01-11 13:55 UTC (permalink / raw)
  To: netfilter
In-Reply-To: <40015381.1090803@yahoo.fr>

On Sunday 11 January 2004 1:45 pm, Romain Moyne wrote:

> Cedric Blancher a écrit :
>
> >	iptables -t nat -A POSTROUTING -s $LAN -d $WB -j SNAT --to $ETH0
>
> What must I write instead of $LAN and $ETH0 ?

$LAN is the network range of the machines you might have packets coming from 
(note it is the source address in the above rule) and $ETH0 is the IP address 
of the interface on your netfilter machine.

Perhaps $LAN=192.168.0.0/24 and $ETH0=192.168.0.1 for your network?

Antony.

-- 
Never write it in Perl if you can do it in Awk.
Never do it in Awk if sed can handle it.
Never use sed when tr can do the job.
Never invoke tr when cat is sufficient.
Avoid using cat whenever possible.

                                                     Please reply to the list;
                                                           please don't CC me.



^ permalink raw reply

* Re: OOPs
From: Carsten Grohmann @ 2004-01-11 13:50 UTC (permalink / raw)
  To: nagray, SE Linux
In-Reply-To: <1073364706.20253.142.camel@hawaii.efficax.net>

On Dienstag, 6. Januar 2004 05:51, Nick wrote:
> I know, I know, RTFM. I can only claim tired and hungry. And I'm
> sorry Russel I forgot a subject again. I retract my question and
> goodnight (after a trip to Jack in the Box)
>
> Nix
>
>
> I was building Fedora tonight after taking a couple of weeks off
> and during the "rpmbuild --rebuild *.src.rpm" I am getting this
> error
>
> Any quick ideas?

I think you need the autoconf213 package (from Fedora cd 3).

Greetings

Cars

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply

* Re: 2.6.0 NFS-server low to 0 performance
From: Russell King @ 2004-01-11 13:53 UTC (permalink / raw)
  To: Guennadi Liakhovetski, Helge Hafting; +Cc: linux-kernel
In-Reply-To: <20040111131857.GA11246@hh.idb.hist.no>

On Sun, Jan 11, 2004 at 02:18:57PM +0100, Helge Hafting wrote:
> On Sat, Jan 10, 2004 at 11:42:45PM +0100, Guennadi Liakhovetski wrote:
> > The only my doubt was - yes, you upgrade the __server__, so, you look in
> > Changes, upgrade all necessary stuff, or just upgrade blindly (as does
> > happen sometimes, I believe) a distribution - and the server works, fine.
> > What I find non-obvious, is that on updating the server you have to
> > re-configure __clients__, see? Just think about a network somewhere in a
> 
> If you upgrade the server and read "Changes", then a note in changes might
> say that "you need to configure carefully or some clients could get in trouble."
> (If the current "Changes" don't have that - post a documentation patch.)

[This is more to Guennadi than Helge]

I don't see why such a patch to "Changes" should be necessary.  The
problem is most definitely with the client hardware, and not the
server software.

The crux of this problem comes down to the SMC91C111 having only a
small on-board packet buffer, which is capable of storing only about
4 packets (both TX and RX).  This means that if you receive 8 packets
with high enough interrupt latency, you _will_ drop some of those
packets.

Note that this is independent of whether you're using DMA mode with
the SMC91C111 - DMA mode only allows you to off load the packets from
the chip faster once you've discovered you have a packet to off load
via an interrupt.

It won't be just NFS that's affected - eg, if you have 4kB NFS packets
and several machines broadcast an ARP at the same time, you'll again
run out of packet space on the SMC91C111.  Does that mean you should
somehow change the way ARP works?

Sure, reducing the NFS packet size relieves the problem, but that's
just a work around for the symptom and nothing more.  It's exactly
the same type of work around as switching the SMC91C111 to operate at
10mbps only - both work by reducing the rate at which packets are
received by the target, thereby offsetting the interrupt latency
and packet unload times.

Basically, the SMC91C111 is great for use on small, *well controlled*
embedded networks, but anything else is asking for trouble.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.