Subject: Re: bottom handler

From: Mark van Doesburg <[email-masked]>
Date: Sun, 11 Oct 1998 16:12:38 +0200

Thinking about this, if it was the case that the net_bh was not
	being run when a mark_bh(NET_BH) was, then how could networking
	possibly work?

OK, it seems like i've really not give enough information.

	You don't say what kernel version you're using, which release
	date, nor where you got the kernel sources from, so I can't
	investigate your symptoms myself and suggest possible reasons.
	Also, it would be helpful to know which version of GCC and
	binutils you're using to compile up the kernel.

I'm using kernel 2.1.123 with your pre-patch-2.1.123-19981004-1. The
compiler i use is egcs-1.1b with P. Blundell's
egcs-19980824-arm-diff-980829 patch applied.

	However, looking at the code as it stands in the latest 2.1
	kernels, I can see no reason for your symptoms.  You may be
	seeing a side effect of schedule() calling do_bottom_half, or
	even a compiler bug.

I will upgrade the compiler immediatly.

Here's what i've done and get:

First i've taken the ebsa-285 architecture and created another one from
it, you might remember it from the remapping discussion. The second
thing i've done was to add a console/tty driver for the serial port on
the 21285.  The third thing was to add the PCI networking driver.

Now, when i boot the system i get the kernel boot messages on a
terminal.  So the remapping of the kernel and the serial driver seem to
be OK.  When it continues it gets to the network driver i've written,
this gives some comments about the initialisation which are exactly what
i expected them to be. Then it starts to mount a root file system, since
i've enabled the debugging option for the NFS-root code (compile time
option) i get messages which tell me its found the mountd and the nfsd
ports.

When i enable the debugging messages in my own code everything continues
as it should. It mounts the root and then panics because it cannot find
init.

However when i reduce the debugging messages to a single character it no
longer works. It still finds the nfsd/mountd ports correctly but it
stops when actually mounting the file system. The single character
debugging messages i print on the console are:

	r interrupt from the I2O inbound post list, a packet to receive
		is detected.

	x send a packet.

	b running network bottom handler.

When i ping the strongarm from the i386 i can see the packets arrive on
the sa because i get r's on the terminal. I can also see the bottom
handler is not run since the b's do not appear.

I've tried how long the debugging have to be in order to get this thing
working. It turns out te be 10 characters. If i replace the r message
with 10 r's the system mounts the root. The reason for this might be the
serial driver. The 21285 serial port has a output fifo which causes the
tx-interrupt to be signaled when less than 8 characters are in it.  If i
send one or more characters the driver puts them in a buffer. After
putting the data in the buffer it enables the tx-interrupt. When there
is enough room in the fifo the interrupt routine is called. This routine
fills the fifo from the buffer. If there is no data left to send in the
buffer it disables the tx-interrupt. In both one character and the ten
char case the interrupt routine is called only once since the tx-fifo is
16 bytes long.

I know this is a lot of new code at the same time, but its the only thing
i can try.

I would be really happy if someone was willing to test my 21285 console/tty
driver, just mail me if you want to try my patch.

greetings,

Mark.
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]