From: Andrew Morton <akpm@osdl.org>
To: Patrick Gefre <pfg@sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6] Altix - ioc3 serial support
Date: Wed, 4 Jan 2006 16:13:20 -0800 [thread overview]
Message-ID: <20060104161320.28756e24.akpm@osdl.org> (raw)
In-Reply-To: <43BC377E.3050603@sgi.com>
Patrick Gefre <pfg@sgi.com> wrote:
>
> The following patch adds driver support for a 2 port PCI IOC3-based
> serial card on Altix boxes:
>
> ftp://oss.sgi.com/projects/sn2/sn2-update/044-ioc3-support
>
> +struct ring_entry {
> + union {
> + struct {
> + uint32_t alldata;
> + uint32_t allsc;
> + } all;
> + struct {
> + char data[4]; /* data bytes */
> + char sc[4]; /* status/control */
> + } s;
> + } u;
> +};
> +
> +/* Test the valid bits in any of the 4 sc chars using "allsc" member */
> +#define RING_ANY_VALID \
> + ((uint32_t)(RXSB_MODEM_VALID | RXSB_DATA_VALID) * 0x01010101)
> +
> +#define ring_sc u.s.sc
> +#define ring_data u.s.data
> +#define ring_allsc u.all.allsc
>
You no longer need to go through this pain - we plan on dropping gcc-2.95
support this cycle, so anonymous unions and anonymous structs can be used
in-kernel.
The above looks a bit dodgy wrt endianness..
> + writeb((unsigned char)divisor, &uart->iu_dll);
> + writeb((unsigned char)(divisor >> 8), &uart->iu_dlm);
> + writeb((unsigned char)prediv, &uart->iu_scr);
> + writeb((unsigned char)lcr, &uart->iu_lcr);
Are those casts needed?
ioc3uart_intr_one() has two callsites and should not be inlined. Although
the compiler could conceivably do something sneaky with it. Needs checking.
nic_read_bit() should be uninlined.
nic_write_bit() should be uninlined.
write_ireg() should be uninlined.
This driver will break when tty-layer-buffering-revamp.patch is merged,
which looks like it'll be 1-2 weeks hence. A fixup patch against next -mm
would suit..
prev parent reply other threads:[~2006-01-05 0:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-16 22:33 Pat Gefre
2005-12-16 23:42 ` Russell King
2005-12-20 21:27 ` Pat Gefre
2006-01-04 21:00 ` Patrick Gefre
2006-01-04 22:50 ` Russell King
2006-01-04 23:52 ` Patrick Gefre
2006-01-07 16:41 ` Russell King
2006-01-05 0:13 ` Andrew Morton [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=20060104161320.28756e24.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pfg@sgi.com \
/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
all inboxes | Powered by JetHome®