Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-19 Thread Corey Minyard
This is a continuation of a previous discussion. There are serial interfaces to IPMI chips that I need to support and I need a way to access these at panic time or when the system is in a state where it can't schedule. I have written a layered driver for the serial core, but Alan says that a

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-19 Thread Corey Minyard
This is a continuation of a previous discussion. There are serial interfaces to IPMI chips that I need to support and I need a way to access these at panic time or when the system is in a state where it can't schedule. I have written a layered driver for the serial core, but Alan says that a

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-12 Thread Tilman Schmidt
Am 11.12.2006 18:07 schrieb Corey Minyard: > Tilman Schmidt wrote: >> I was under the impression that line disciplines need a user space >> process to open the serial device and push them onto it. Is there >> a way for a driver to attach to a serial port through the line >> discipline interface

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-12 Thread Tilman Schmidt
Am 11.12.2006 18:40 schrieb Alan: > On Mon, 11 Dec 2006 17:58:29 +0100 > Tilman Schmidt <[EMAIL PROTECTED]> wrote: > >> On Mon, 11 Dec 2006 10:20:16 +, Alan wrote: >>> This looks wrong. You already have a kernel interface to serial drivers. >>> It is called a line discipline. We use it for

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-12 Thread Tilman Schmidt
Am 11.12.2006 18:40 schrieb Alan: On Mon, 11 Dec 2006 17:58:29 +0100 Tilman Schmidt [EMAIL PROTECTED] wrote: On Mon, 11 Dec 2006 10:20:16 +, Alan wrote: This looks wrong. You already have a kernel interface to serial drivers. It is called a line discipline. We use it for ppp, we use it

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-12 Thread Tilman Schmidt
Am 11.12.2006 18:07 schrieb Corey Minyard: Tilman Schmidt wrote: I was under the impression that line disciplines need a user space process to open the serial device and push them onto it. Is there a way for a driver to attach to a serial port through the line discipline interface from kernel

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Guennadi Liakhovetski
On Mon, 11 Dec 2006, Alan wrote: > > there as "protocols" for user-tty interfaces, i.e., you need a user, that > > opens a tty, sets a line discipline to it, and does io (read/write) over > > it, and NOT to be completely initialised and driven from the kernel. > > Take a look at the SLIP

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Guennadi Liakhovetski
On Mon, 11 Dec 2006, Alan wrote: > On Sun, 10 Dec 2006 19:23:54 -0600 > Corey Minyard <[EMAIL PROTECTED]> wrote: > > > Nothing has come of this yet. But we have these two requests and a > > request from Russell Doty at Redhat. > > > > It would be nice to know if this type of thing was

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
> there as "protocols" for user-tty interfaces, i.e., you need a user, that > opens a tty, sets a line discipline to it, and does io (read/write) over > it, and NOT to be completely initialised and driven from the kernel. Take a look at the SLIP driver. User space sets up the port but all the

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
On Mon, 11 Dec 2006 17:58:29 +0100 Tilman Schmidt <[EMAIL PROTECTED]> wrote: > On Mon, 11 Dec 2006 10:20:16 +, Alan wrote: > > This looks wrong. You already have a kernel interface to serial drivers. > > It is called a line discipline. We use it for ppp, we use it for slip, we > > use it for

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Corey Minyard
Alan wrote: This is going to require some more thought. But I believe it can be done with adding a poll routine to the tty_operations structure What status do you need to poll ? I need to poll for receive and transmit characters so I can do I/O during panics (interrupts disabled).

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
> I was actually wrong, flush_to_ldisc does handle reentrancy. > It can only have one caller to disc->receive_buf() at a time. So > long chains of recursion don't seem to be possible, even if called > from IRQ context. disc->receive_buf is single threaded but if it then sends characters back in

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Corey Minyard
Tilman Schmidt wrote: On Mon, 11 Dec 2006 10:20:16 +, Alan wrote: This looks wrong. You already have a kernel interface to serial drivers. It is called a line discipline. We use it for ppp, we use it for slip, we use it for a few other things such as attaching sync drivers to some

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Tilman Schmidt
On Mon, 11 Dec 2006 10:20:16 +, Alan wrote: > This looks wrong. You already have a kernel interface to serial drivers. > It is called a line discipline. We use it for ppp, we use it for slip, we > use it for a few other things such as attaching sync drivers to some > devices. I was under the

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Corey Minyard
Alan wrote: On Mon, 11 Dec 2006 08:52:20 -0600 Corey Minyard <[EMAIL PROTECTED]> wrote: So here's the start of discussion: 1) The IPMI driver needs to run at panic time to modify watchdog timers and store panic information in the event log. So no work queues, no delayed work, and the need

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
On Mon, 11 Dec 2006 08:52:20 -0600 Corey Minyard <[EMAIL PROTECTED]> wrote: > So here's the start of discussion: > > 1) The IPMI driver needs to run at panic time to modify watchdog > timers and store panic information in the event log. So no work > queues, no delayed work, and the need for some

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Corey Minyard
Alan wrote: On Sun, 10 Dec 2006 19:23:54 -0600 Corey Minyard <[EMAIL PROTECTED]> wrote: Nothing has come of this yet. But we have these two requests and a request from Russell Doty at Redhat. It would be nice to know if this type of thing was acceptable or not, and the problems with the

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
On Sun, 10 Dec 2006 19:23:54 -0600 Corey Minyard <[EMAIL PROTECTED]> wrote: > Nothing has come of this yet. But we have these two requests and a > request from Russell Doty at Redhat. > > It would be nice to know if this type of thing was acceptable or not, > and the problems with the patch.

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
On Sun, 10 Dec 2006 19:23:54 -0600 Corey Minyard [EMAIL PROTECTED] wrote: Nothing has come of this yet. But we have these two requests and a request from Russell Doty at Redhat. It would be nice to know if this type of thing was acceptable or not, and the problems with the patch. The

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Corey Minyard
Alan wrote: On Sun, 10 Dec 2006 19:23:54 -0600 Corey Minyard [EMAIL PROTECTED] wrote: Nothing has come of this yet. But we have these two requests and a request from Russell Doty at Redhat. It would be nice to know if this type of thing was acceptable or not, and the problems with the

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
On Mon, 11 Dec 2006 08:52:20 -0600 Corey Minyard [EMAIL PROTECTED] wrote: So here's the start of discussion: 1) The IPMI driver needs to run at panic time to modify watchdog timers and store panic information in the event log. So no work queues, no delayed work, and the need for some type

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Corey Minyard
Alan wrote: On Mon, 11 Dec 2006 08:52:20 -0600 Corey Minyard [EMAIL PROTECTED] wrote: So here's the start of discussion: 1) The IPMI driver needs to run at panic time to modify watchdog timers and store panic information in the event log. So no work queues, no delayed work, and the need

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Tilman Schmidt
On Mon, 11 Dec 2006 10:20:16 +, Alan wrote: This looks wrong. You already have a kernel interface to serial drivers. It is called a line discipline. We use it for ppp, we use it for slip, we use it for a few other things such as attaching sync drivers to some devices. I was under the

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Corey Minyard
Tilman Schmidt wrote: On Mon, 11 Dec 2006 10:20:16 +, Alan wrote: This looks wrong. You already have a kernel interface to serial drivers. It is called a line discipline. We use it for ppp, we use it for slip, we use it for a few other things such as attaching sync drivers to some

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
I was actually wrong, flush_to_ldisc does handle reentrancy. It can only have one caller to disc-receive_buf() at a time. So long chains of recursion don't seem to be possible, even if called from IRQ context. disc-receive_buf is single threaded but if it then sends characters back in the

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Corey Minyard
Alan wrote: This is going to require some more thought. But I believe it can be done with adding a poll routine to the tty_operations structure What status do you need to poll ? I need to poll for receive and transmit characters so I can do I/O during panics (interrupts disabled).

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
On Mon, 11 Dec 2006 17:58:29 +0100 Tilman Schmidt [EMAIL PROTECTED] wrote: On Mon, 11 Dec 2006 10:20:16 +, Alan wrote: This looks wrong. You already have a kernel interface to serial drivers. It is called a line discipline. We use it for ppp, we use it for slip, we use it for a few

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Alan
there as protocols for user-tty interfaces, i.e., you need a user, that opens a tty, sets a line discipline to it, and does io (read/write) over it, and NOT to be completely initialised and driven from the kernel. Take a look at the SLIP driver. User space sets up the port but all the actual

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Guennadi Liakhovetski
On Mon, 11 Dec 2006, Alan wrote: On Sun, 10 Dec 2006 19:23:54 -0600 Corey Minyard [EMAIL PROTECTED] wrote: Nothing has come of this yet. But we have these two requests and a request from Russell Doty at Redhat. It would be nice to know if this type of thing was acceptable or not,

Re: [PATCH] Add the ability to layer another driver over the serial driver

2006-12-11 Thread Guennadi Liakhovetski
On Mon, 11 Dec 2006, Alan wrote: there as protocols for user-tty interfaces, i.e., you need a user, that opens a tty, sets a line discipline to it, and does io (read/write) over it, and NOT to be completely initialised and driven from the kernel. Take a look at the SLIP driver. User