On Fri, Aug 3, 2018 at 12:03 PM, Alexey Spirkov <alex...@astrosoft.ru> wrote:
> Existing code is not applicable to big-endian machines
> ctrlrequest fields received in USB endian - i.e. in little-endian
> and should be converted to cpu endianness before usage.

> -               epnum = (u8) ctrlrequest->wIndex;
> +               epnum = (u8) le16_to_cpu(ctrlrequest->wIndex);

> +       u16 reqval = le16_to_cpu(ctrlrequest->wValue);
> +       u16 reqidx = le16_to_cpu(ctrlrequest->wIndex);

I'm wondering, if you run make with C=1 CF=-D__CHECK_ENDIAN__ before
and after your change.


-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to