lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 10 Feb 2021 03:52:48 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Michal Simek <michal.simek@...inx.com>
Cc:     linux-kernel@...r.kernel.org, monstr@...str.eu, git@...inx.com,
        linux-usb@...r.kernel.org,
        "Alexander A. Klimov" <grandmaster@...klimov.de>,
        Piyush Mehta <piyush.mehta@...inx.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Al Cooper <alcooperx@...il.com>,
        Alan Stern <stern@...land.harvard.edu>,
        Bastien Nocera <hadess@...ess.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/2] usb: misc: usb5744: Add support for USB hub
 controller

On Tue, Feb 09, 2021 at 10:53:20AM +0100, Michal Simek wrote:
> +static int usb5744_i2c_probe(struct i2c_client *client,
> +			     const struct i2c_device_id *id)
> +{
> +	struct device *dev = &client->dev;
> +	int ret;
> +
> +	/* Trigger gpio reset to the hub. */
> +	ret = usb5744_init_hw(dev);
> +	if (ret)
> +		return ret;
> +
> +	/* Send SMBus command to boot hub. */
> +	ret = i2c_smbus_write_word_data(client, 0xAA, swab16(0x5600));

Hi Michal

This is not my area of the kernel. But that swab16() stood out, and
made me wonder about endianness. Will this work correctly on big and
little endian hosts?

       Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ