linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Michael Ryan <lkml@lacklustre.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: STRIP Starmode Patch
Date: Sun, 9 Jan 2005 10:39:41 +0000	[thread overview]
Message-ID: <20050109103941.A5362@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050108174525.2cad37b1.lkml@lacklustre.net>; from lkml@lacklustre.net on Sat, Jan 08, 2005 at 05:45:25PM -0800

On Sat, Jan 08, 2005 at 05:45:25PM -0800, Michael Ryan wrote:
> The Linux kernel STRIP module was updated to support the newer series of
> Ricochet modems in January of 2002 by a person about whom I can find
> nothing more than a username of `abelits'. Anyway, he wasn't smart about
> it and didn't submit his patch to the LKML. When the existing drivers
> were migrated to the 2.6 tree, the old version of the module was migrated,
> and that's where the problems began.

strip also has other problems - it violates the layering of the kernel
subsystems and drivers in the get_baud() function:

        if ((tty->termios->c_cflag & CBAUD) == B38400 && tty->driver_data) {
                struct async_struct *info =
                    (struct async_struct *) tty->driver_data;	/* XXX */
                if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
                        return (B57600);
                if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
                        return (B115200);

There is no guarantee what tty->driver_data points at, and in fact
today the above code will be broken.

The best thing to happen here is to ignore the B38400 "hack" for fast
baud rates, and use the helper functions in the tty layer to get the
_numeric_ baud rate, which seems to be what the driver wants anyway:

        /* If the user has selected a baud rate above 38.4 see what magic we have to do */
        if (strip_info->user_baud > B38400) {

So, I don't think that this patch will be sufficient to resurect strip,
but I also don't think that it's an impossible task.  I'm just wondering
if it's really worth the effort given that we now have the vastly more
popular 802.11.

-- 
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

      reply	other threads:[~2005-01-09 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-09  1:45 STRIP Starmode Patch Michael Ryan
2005-01-09 10:39 ` Russell King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050109103941.A5362@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@lacklustre.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).