[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080516100642.GA18884@infradead.org>
Date: Fri, 16 May 2008 06:06:42 -0400
From: Christoph Hellwig <hch@...radead.org>
To: Ilpo J?rvinen <ilpo.jarvinen@...sinki.fi>
Cc: Subbu Seetharaman <subbus@...verengines.com>,
Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/15] BE NIC driver - header and initialization
functions
On Fri, May 16, 2008 at 12:54:11PM +0300, Ilpo J?rvinen wrote:
> > + pnob->event_q_pa = virt_to_phys(pnob->event_q);
> > + pnob->event_q_pa = cpu_to_le64(pnob->event_q_pa);
>
> ...First of all, points from using standard converters instead of
> inventing your own :-).
>
> But alas, it won't be accepted by sparse. You need to use appropriate
> le/be8/16/32/64 types when dealing with endianesses and then make sparse
> happy too by using conversion in proper places.
And virt_to_phys is a big no-way. The driver needs to use the proper
dma api helpers to deal with iommus and other non-trivial hardware.
--
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