On 11/20/20 12:50 PM, Oliver Hartkopp wrote: >>>> The widely used open source firmware candleLight doesn't support this feature >>>> and exchanges the data in little endian byte order. This breaks if a device >>>> with candleLight firmware is used on big endianess systems. >>> >>> Looks like this problem showed up pretty late. >> >> There are not that many BE users out there... >> >>> Won't it be better to implement the feature in the candlelight firmware >>> so that only the big endian users need to upgrade the candlelight >>> firmware instead of disabling this nice feature? >> >> It's easier to update the Linux driver, for LE Linux host systems this is >> basically a no-op. > > Ok. And with these changes > > > struct gs_host_config { > > - u32 byte_order; > > + __le32 byte_order; > > } __packed; > > > > > > - hconf->byte_order = 0x0000beef; > > + hconf->byte_order = cpu_to_le32(0x0000beef); > > > > the original GS_USB hardware is pinned to always provide little endian, > right? ACK Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: OpenPGP digital signature