Re: [PATCH 05/07] sata_mv: mv_fill_sg fixes

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

 



Grant Grundler wrote:
On Fri, Jan 30, 2009 at 3:50 PM, Mark Lord <liml@xxxxxx> wrote:
..

       if (likely(last_sg))
               last_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL);
+       mb(); /* ensure data structure is visible to the chipset */

It's not obvious to me what you are racing against here.
Normally the mb() is to prevent the above store from getting executed
*after* some MMIO read or write that would tell the chip to read the
flags_size field (or anything recently stored in that data structure).

I guess I'm asking for the comment to indicate which MMIO write it's
racing with.
..

It's exactly the same as the generic routine in libata-sff,
which has a mb() in the same place for the same reason:
To ensure the PRD table is visible to the chipset
before we trigger the I/O operation.

Pretty standard.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux