* [PATCH] uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check
@ 2014-09-11 9:06 Hans de Goede
2014-09-11 10:02 ` Bjørn Mork
2014-09-11 21:21 ` Greg Kroah-Hartman
0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2014-09-11 9:06 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-usb, linux-scsi, stable, Hans de Goede
Cc: stable@vger.kernel.org # 3.16
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/usb/storage/uas-detect.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h
index 1e298ec..8a6f371 100644
--- 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;
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check
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
2014-09-11 21:21 ` Greg Kroah-Hartman
1 sibling, 0 replies; 3+ messages in thread
From: Bjørn Mork @ 2014-09-11 10:02 UTC (permalink / raw)
To: Hans de Goede; +Cc: Greg Kroah-Hartman, linux-usb, linux-scsi, stable
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check
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
@ 2014-09-11 21:21 ` Greg Kroah-Hartman
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2014-09-11 21:21 UTC (permalink / raw)
To: Hans de Goede; +Cc: linux-usb, linux-scsi, stable
On Thu, Sep 11, 2014 at 11:06:12AM +0200, Hans de Goede wrote:
> Cc: stable@vger.kernel.org # 3.16
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/usb/storage/uas-detect.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
You forgot the reported-by line, I'll go add it...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-11 21:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2014-09-11 21:21 ` Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.