r8152: fix incorrect type in assignment
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Nov 22 17:59:05 EST 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=500b6d7e1ed80f697571cd976e385c3476effc86
Commit: 500b6d7e1ed80f697571cd976e385c3476effc86
Parent: dd1b119c835632f5d939f2a7351ad95001d9cb52
Author: hayeswang <hayeswang at realtek.com>
AuthorDate: Wed Nov 20 17:30:57 2013 +0800
Committer: David S. Miller <davem at davemloft.net>
CommitDate: Wed Nov 20 15:09:42 2013 -0500
r8152: fix incorrect type in assignment
The data from the hardware should be little endian. Correct the
declaration.
Signed-off-by: Hayes Wang <hayeswang at realtek.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
---
drivers/net/usb/r8152.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index f92e0cf..5107372 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -307,22 +307,22 @@ enum rtl8152_flags {
#define MCU_TYPE_USB 0x0000
struct rx_desc {
- u32 opts1;
+ __le32 opts1;
#define RX_LEN_MASK 0x7fff
- u32 opts2;
- u32 opts3;
- u32 opts4;
- u32 opts5;
- u32 opts6;
+ __le32 opts2;
+ __le32 opts3;
+ __le32 opts4;
+ __le32 opts5;
+ __le32 opts6;
};
struct tx_desc {
- u32 opts1;
+ __le32 opts1;
#define TX_FS (1 << 31) /* First segment of a packet */
#define TX_LS (1 << 30) /* Final segment of a packet */
#define TX_LEN_MASK 0x3ffff
- u32 opts2;
+ __le32 opts2;
#define UDP_CS (1 << 31) /* Calculate UDP/IP checksum */
#define TCP_CS (1 << 30) /* Calculate TCP/IP checksum */
#define IPV4_CS (1 << 29) /* Calculate IPv4 checksum */
@@ -877,7 +877,7 @@ static void write_bulk_callback(struct urb *urb)
static void intr_callback(struct urb *urb)
{
struct r8152 *tp;
- __u16 *d;
+ __le16 *d;
int status = urb->status;
int res;
More information about the linux-mtd-cvs
mailing list