Re: [PATCH 01/16] hpsa: do readl after writel in main i/o path to ensure commands don't get lost.

From: Valdis . Kletnieks
Date: Wed May 04 2011 - 13:29:40 EST


On Wed, 04 May 2011 07:52:12 CDT, scameron@xxxxxxxxxxxxxxxxxx said:
> On Wed, May 04, 2011 at 01:15:50PM +0200, Tomas Henzl wrote:
> > On 05/03/2011 09:58 PM, Stephen M. Cameron wrote:
> > > From: Stephen M. Cameron <scameron@xxxxxxxxxxxxxxxxxx>

> > > dev_dbg(&h->pdev->dev, "Sending %x, tag = %x\n", c->busaddr,
> > > c->Header.Tag.lower);
> > > writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET);
> > > + (void) readl(h->vaddr + SA5_REQUEST_PORT_OFFSET);

> I just put it there to make it clear that it ignoring the return of readl is
> done intentionally, not accidentally. If this goes against some coding convention,
> whatever, I'm not super attached to the (void), but I did put it there on purpose,
> and would have done it in cciss as well, had I thought of it at the time.

This probably needs a comment like
/* don't care - dummy read just to force write posting to chipset */
or similar. I'm assuming it's just functioning as a barrier-type flush of some sort?



Attachment: pgp00000.pgp
Description: PGP signature