NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: kern/50038: udl (DisplayLink GX-DVI_U2B) alignment fault on earmv6hf NETWALKER
The following reply was made to PR kern/50038; it has been noted by GNATS.
From: matthew green <mrg%eterna.com.au@localhost>
To: Nick Hudson <skrll%netbsd.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
MOCHIDA Shuji <mochid%netside.co.jp@localhost>, martin%duskware.de@localhost
Subject: re: kern/50038: udl (DisplayLink GX-DVI_U2B) alignment fault on earmv6hf NETWALKER
Date: Tue, 06 Dec 2016 19:07:44 +1100
> Now it's been shown that device/strongly ordered memory is the reason I
> think we should commit your diff...
>
> > --- udl.c.ORIG 2016-10-19 05:17:37.000000000 +0900
> > +++ udl.c 2016-11-15 02:59:21.000000000 +0900
> > @@ -187,8 +187,14 @@
> > static inline void
> > udl_cmd_add_2(struct udl_softc *sc, uint16_t val)
> > {
> > + uint8_t *p = sc->sc_cmd_buf;
> >
> > - be16enc(sc->sc_cmd_buf, val);
> > + if (ALIGNED_POINTER(p, uint16_t))
> > + be16enc(p, val);
> > + else {
> > + *p++ = (val >> 8) & 0xff;
> > + *p = val & 0xff;
> > + }
doesn't the else{} block assume little endianness?
.mrg.
Home |
Main Index |
Thread Index |
Old Index