From: "Bjørn Mork" <bjorn@mork.no>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check
Date: Thu, 11 Sep 2014 12:02:02 +0200 [thread overview]
Message-ID: <87fvfytqzp.fsf@nemi.mork.no> (raw)
In-Reply-To: <1410426372-10151-1-git-send-email-hdegoede@redhat.com> (Hans de Goede's message of "Thu, 11 Sep 2014 11:06:12 +0200")
Hans de Goede <hdegoede@redhat.com> writes:
> --- a/drivers/usb/storage/uas-detect.h
> +++ b/drivers/usb/storage/uas-detect.h
> @@ -73,8 +73,8 @@ static int uas_use_uas_driver(struct usb_interface *intf,
> * broken on the ASM1051, use the number of streams to differentiate.
> * New ASM1053-s also support 32 streams, but have a different prod-id.
> */
> - if (udev->descriptor.idVendor == 0x174c &&
> - udev->descriptor.idProduct == 0x55aa) {
> + if (le16_to_cpu(udev->descriptor.idVendor) == 0x174c &&
> + le16_to_cpu(udev->descriptor.idProduct) == 0x55aa) {
> if (udev->speed < USB_SPEED_SUPER) {
> /* No streams info, assume ASM1051 */
> flags |= US_FL_IGNORE_UAS;
Not that it matters much in this case, but I believe converting the
constants is preferred so that this can be resolved at build time
instead of runtime.
I.e.
if (udev->descriptor.idVendor == cpu_to_le16(0x174c) &&
etc
Bjørn
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-09-11 10:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 9:06 [PATCH] uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check Hans de Goede
2014-09-11 10:02 ` Bjørn Mork [this message]
2014-09-11 21:21 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fvfytqzp.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox