]> git.baikalelectronics.ru Git - kernel.git/commit
r8152: fix the checking of the usb speed
authorhayeswang <hayeswang@realtek.com>
Thu, 24 Jul 2014 08:37:43 +0000 (16:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Jul 2014 06:37:36 +0000 (23:37 -0700)
commitf0b8dd9a8d5d7fc110e11c510e4578719978d51d
treef58d45ef4e5c959c7bde7fee2a9c390f735f8ce4
parentd23eef2da82b012a7b26fedfab751f88552c139f
r8152: fix the checking of the usb speed

When the usb speed of the RTL8152 is not high speed, the USB_DEV_STAT[2:1]
should be equal to [0 1]. That is, the STAT_SPEED_FULL should be equal
to 2.

There is a easy way to check the usb speed by the speed field of the
struct usb_device. Use it to replace the original metheod.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Spotted-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c