Re: [PATCH 28 of 39] IB/ipath - Fixes a bug where our delay for EEPROM no longer works due to compiler reordering

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

 



"Bryan O'Sullivan" <[email protected]> wrote:
>
> The mb() prevents the compiler from reordering on this function, with some versions
> of gcc and -Os optimization.   The result is random failures in the EEPROM read
> without this change.
> 
> 
> Signed-off-by: Dave Olson <[email protected]>
> Signed-off-by: Bryan O'Sullivan <[email protected]>
> 
> diff -r 7d22a8963bda -r 5f3c0b2d446d drivers/infiniband/hw/ipath/ipath_eeprom.c
> --- a/drivers/infiniband/hw/ipath/ipath_eeprom.c	Thu Jun 29 14:33:26 2006 -0700
> +++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c	Thu Jun 29 14:33:26 2006 -0700
> @@ -186,6 +186,7 @@ bail:
>   */
>  static void i2c_wait_for_writes(struct ipath_devdata *dd)
>  {
> +	mb();
>  	(void)ipath_read_kreg32(dd, dd->ipath_kregs->kr_scratch);
>  }
>  

That's a bit weird.  I wouldn't have expected the compiler to muck around
with a readl().

-
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