[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20110104.093100.71129805.davem@davemloft.net>
Date: Tue, 04 Jan 2011 09:31:00 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: mkl@...gutronix.de
Cc: kurt.van.dijck@....be, socketcan-core@...ts.berlios.de,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
From: Marc Kleine-Budde <mkl@...gutronix.de>
Date: Tue, 04 Jan 2011 11:54:42 +0100
> There's ioread() and get_unaligned(). Do we have a combination of this?
No. And there will never be.
Because it's never well defined whether it is safe to break up an
I/O operation into two sub-operations, nor in what order those
sub-operations can be done in.
For example, just reading one byte of a two-byte register might
clear the status bits in other byte if the two bytes are read in
the wrong order.
On some chips, avoiding losing information might be completely
impossible.
You have to do it by hand in your driver, because only you know
what implementation will work correctly.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists