Re: Installing DKMS driver on Ubuntu 26.04
dave penkler <[email protected]> Thu, 4 Jun 2026 23:41:24 +0200
| Newsgroups | gmane.linux.hardware.gpib.general |
|---|---|
| Message-ID | <CAL=kjP2OZqsk1q9KEV3yAjpN0B3j7C8ALZZ=fZtMjVoyZrBy4w@mail.gmail.com> |
--===============3915430999392569902== Content-Type: multipart/alternative; boundary="00000000000092beea0653746884" --00000000000092beea0653746884 Content-Type: text/plain; charset="UTF-8" On Thu, 4 Jun 2026 at 22:09, David Gravereaux <[email protected]> wrote: > ... Regarding > /usr/src/linux-gpib-4.3.7/drivers/gpib/tnt4882/tnt4882_gpib.c:63 for > tnt_paged_readb(), would this be more correct or am I just thinking this > all wrong? > > static inline unsigned int tnt_paged_readb(struct tnt4882_priv *priv, > unsigned long offset) { > unsigned int val; > > // 1. Write the page-in command > iowrite8(AUX_PAGEIN, priv->nec7210_priv.mmiobase + AUXMR * > priv->nec7210_priv.offset); > > // 2. Force full synchronization: Write MUST complete before Read > starts > mb(); > > // 3. Read the data from the newly established page > val = ioread8(priv->nec7210_priv.mmiobase + offset); > > // 4. Force Read completion before the function returns or next > instructions run > rmb(); > > return val; > } > > iowrite8 calls writeb <https://elixir.bootlin.com/linux/v7.0.10/source/include/asm-generic/io.h#L260> which has a barrier before the __raw_writeb same for ioread8 This driver has been working fine without the mb()'s --00000000000092beea0653746884 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class= =3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, 4 Jun 2026 a= t 22:09, David Gravereaux <<a href=3D"mailto:[email protected]" target= =3D"_blank">[email protected]</a>> wrote:<br></div><blockquote class=3D= "gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2= 04,204,204);padding-left:1ex">...</blockquote><blockquote class=3D"gmail_qu= ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20= 4);padding-left:1ex">Regarding <br> /usr/src/linux-gpib-4.3.7/drivers/gpib/tnt4882/tnt4882_gpib.c:63 for <br> tnt_paged_readb(), would this be more correct or am I just thinking this <b= r> all wrong?<br> <br> static inline unsigned int tnt_paged_readb(struct tnt4882_priv *priv, <br> unsigned long offset) {<br> =C2=A0 =C2=A0 =C2=A0unsigned int val;<br> <br> =C2=A0 =C2=A0 =C2=A0// 1. Write the page-in command<br> =C2=A0 =C2=A0 =C2=A0iowrite8(AUX_PAGEIN, priv->nec7210_priv.mmiobase + A= UXMR * <br> priv->nec7210_priv.offset);<br> <br> =C2=A0 =C2=A0 =C2=A0// 2. Force full synchronization: Write MUST complete b= efore Read <br> starts<br> =C2=A0 =C2=A0 =C2=A0mb();<br> <br> =C2=A0 =C2=A0 =C2=A0// 3. Read the data from the newly established page<br> =C2=A0 =C2=A0 =C2=A0val =3D ioread8(priv->nec7210_priv.mmiobase + offset= );<br> <br> =C2=A0 =C2=A0 =C2=A0// 4. Force Read completion before the function returns= or next <br> instructions run<br> =C2=A0 =C2=A0 =C2=A0rmb();<br> <br> =C2=A0 =C2=A0 =C2=A0return val;<br> }<br><br></blockquote><div>iowrite8 calls=C2=A0<a href=3D"https://elixir.bo= otlin.com/linux/v7.0.10/source/include/asm-generic/io.h#L260" target=3D"_bl= ank">writeb</a>=C2=A0which has a barrier before the __raw_writeb same for i= oread8</div><div>This driver has been working fine without the mb()'s</= div><div><br></div></div></div> </div> --00000000000092beea0653746884-- --===============3915430999392569902== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============3915430999392569902== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-gpib-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-gpib-general --===============3915430999392569902==--