Date: Thu, 8 Jan 2015 15:55:18 -0700 From: Warner Losh <imp@bsdimp.com> To: Adrian Chadd <adrian@FreeBSD.org> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: RFC: figuring out bus behaviour on these mips32r2 chips Message-ID: <B54C22FD-1EF2-4ABE-8ACF-002619ECA4EB@bsdimp.com> In-Reply-To: <CAJ-Vmo=SY8q7fnycbjj_HVkLj0QdHymNftKXsmm1teussdMOrw@mail.gmail.com> References: <CAJ-Vmo=SY8q7fnycbjj_HVkLj0QdHymNftKXsmm1teussdMOrw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_4C9D7E15-07E5-4239-9CA4-E0C2B2C7DEB8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 7, 2015, at 6:03 PM, Adrian Chadd <adrian@FreeBSD.org> wrote: >=20 > Hi, >=20 > I found that the new QCA955x chip (and some of the QCA934x things in > shipping products versus what I have on my desk at home) behave poorly > unless I do ye olde "write to register; read from register to flush" > paradigm. >=20 > In this specific instance, it's the MDIO controller on each MAC - if I > do a read-after-write to those registers, everything is peachy. > Without it - and even with a call to wmb() - it still barfs. >=20 > Now, I went digging through the mips code, and wmb() -> mips_sync() -> > just a sync operation. It doesn't do any other kind of barrier. >=20 > So - what's the mips32r2 spec require us to do for ensuring device IO > has made it out to devices and we enforce ordering? Are we missing > something in our mips_sync() implementation? SYNC is supposed to be SYNC. An absolute barrier, but that may have = weakened to being merely a strong ordering instruction such that all = writes before it happen before all writes after it. Warner --Apple-Mail=_4C9D7E15-07E5-4239-9CA4-E0C2B2C7DEB8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUrwrWAAoJEGwc0Sh9sBEA0UcP+welGEUTosfVgi0nsAu2D3Bj lQblfrMKBXaQRUI9z05WoXaEmdEQCuemlK78HAM79ELKohsa8NUd2FS1ZhtbRhGQ OGln8OWIZ/8FxMRN7zDRgo0X4EqVHU2jXSrqxDCdnzmcypWE68KOpGjCWSux6k3N bdVez32dkqWkaa9Xv+azdqHfQPFWmNrIXxJFJMlSaviWusd4d+ZuCLzjNGlpELr1 7dSLzXMoxIv7Kor1zd2AQ1MSVmUd/niSVcKBG5+X1Ci/PD+Gz/v25Po/jqh19SHW 2Y0YD78r0mJeEVhkMdpQ2Yg607usyoOkTd4F1GNkEEdJFd8MTB8LGHVh7N2JzCNA xZg2Bq6KNwOlgLlpx3dVHjnnNoBc52B8d4GCoCEf/kcV5e7drfAlYkvaw1H/EZl3 P5Gl40em9fmX81Lx7QHwimXJwCdH4M4WEdT4jn5KFcvKGKPX+uXceNn8CuMa0ONi 6ZwMITz824yOsCR59oVcl619c3Y6O64ZKBz1aW+PrfK2MyLze+t6BHQdR9HzHLLN cyAKfhBLIrtdZ7hFOYo3GBY9M92vUOsAZTgrxJ56SlSAwCjRqZiy0nGypBRyMc2x LmR3H1jjyNy9FluSa78glc1JSMFZ2sm1g0cxZYOtJsP9J8sY5baOwFsUb3qzVH7O bB/JFVCBbUc3Fpert57M =vWA2 -----END PGP SIGNATURE----- --Apple-Mail=_4C9D7E15-07E5-4239-9CA4-E0C2B2C7DEB8--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B54C22FD-1EF2-4ABE-8ACF-002619ECA4EB>