lkml.org 
[lkml]   [2006]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6] Altix - ioc3 serial support
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..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-05 01:13    [W:2.597 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site