Re: 2.6.13-mm3

Sonny Rao
2005-09-12T21:53:58Z

On Mon, Sep 12, 2005 at 11:06:32PM +0200, Jiri Slaby wrote:
> > I'm getting some build errors on ppc64 in drivers/char/hvc_console.c
> >
> >
> > CC drivers/char/hvc_console.o
> > drivers/char/hvc_console.c: In function `hvc_poll':
> > drivers/char/hvc_console.c:600: error: `count' undeclared (first use in this
> > function)
> > drivers/char/hvc_console.c:600: error: (Each undeclared identifier is reported
> > only once
> > drivers/char/hvc_console.c:600: error: for each function it appears in.)
> > drivers/char/hvc_console.c:636: error: structure has no member named `flip'
> > make[1]: *** [drivers/char/hvc_console.o] Error 1
> > make: *** [_module_drivers/char] Error 2
> >
> > The count undeclared one was easy to fix but I coldn't fix the filp
> > structure element in 2-3 minutes so I'm punting.
> >
> > Anyone have a patch to fix this driver?
>
> Try this:
> ---

Hmm, that didn't build. I made my own version based on yours,
unfortunately I don't know if it boots because all my network just went
down. Hopefully, someone will confirm that the fix is correct.

--- linux-2.6.13-mm3/drivers/char/hvc_console.c~orig 2005-09-12 16:37:14.434077464 -0500
+++ linux-2.6.13-mm3/drivers/char/hvc_console.c 2005-09-12 16:37:25.466998360 -0500
@@ -597,7 +597,7 @@ static int hvc_poll(struct hvc_struct *h

/* Read data if any */
for (;;) {
- count = tty_buffer_request_room(tty, N_INBUF);
+ int count = tty_buffer_request_room(tty, N_INBUF);

/* If flip is full, just reschedule a later read */
if (count == 0) {
@@ -633,7 +633,7 @@ static int hvc_poll(struct hvc_struct *h
tty_insert_flip_char(tty, buf[i], 0);
}

- if (tty->flip.count)
+ if (tty->buf.tail->used)
tty_schedule_flip(tty);

/*