Re: [PATCH 2.6] Altix - ioc3 serial support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Gefre <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux