Re: serial.c patch in 2.3.19

Nick Holloway (alfie@alfie.demon.co.uk)
Sun, 17 Oct 1999 20:00:50 +0100


On Sat, Oct 16, 1999 at 01:02:28PM -0400, Theodore Y. Ts'o wrote:
> A similar change is already in the 2.3 serial driver (and in the 4.90
> driver, which will work on either the 2.2 or 2.3 kernel ---
> http://web.mit.edu/tytso/www/linux/serial). So yeah, that should fix
> it. So yeah, it should probably fix things. (Sorry, I didn't realize
> the folks who were complaining where using the 2.2 kernel.)

The problems are with the 2.3 kernel. There isn't a similar change --
there is a different change that I introduced in 2.3.19 (when Alan was
babysitting). This was to not call request_region when the uart type
was none (as there is no region allocated).

Unfortunately, the value of state->type has been overwritten with the
user's new value at that point. This means that if you change the uart
type from 8250 to none, the region is not released. Furthermore, you
still don't release the region when the port is subsequently changed
to zero.

The patch I sent is needed in addition to the change introduced in 2.3.19.
This fixes it so that changing the uart type to none, or the port to zero
(in either order) will result in the region being released. You will
also not get errors about releasing regions that are not allocated.

> Once I do a bit more testing, I'll be submitting the newer serial driver
> to Alan for inclusion into the 2.2 kernel.

The point I started was when the 2.3 kernel was complaining about bogus
calls to release_region (due to Debian calling setserial at boot time).
It would appear that the 2.2 kernel silently ignores these.

-- 
 `O O'  | Nick.Holloway@alfie.demon.co.uk
// ^ \\ | http://www.alfie.demon.co.uk/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/