Skip to contentSkip to conversation

hso driver fix for big endian machines.

PATCH In review Denis Joseph Barrow 3 participants 3 messages Jan 12, 2009 – Jan 13, 2009 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hso driver fix for big endian machines.

Hi there,
This patch is against 2.6.29-rc1 I hope it'll apply to other trees if neccessary. Filip Aben says this fix is neccessary for big endian machines.

If anybody has one & a hso device & a big endian machine I'd greatly appreciate if you tell me if this patch works.

A patch needed to make the hso driver work on big endian machines.

---

drivers/net/usb/hso.c +2 -2
Index: linux-2.6/drivers/net/usb/hso.c
===================================================================
@@ -1792,8 +1792,8 @@
 
 	/* initialize */
 	ctrl_req->wValue = 0;
-	ctrl_req->wIndex = hso_port_to_mux(port);
-	ctrl_req->wLength = size;
+	ctrl_req->wIndex = cpu_to_le16(hso_port_to_mux(port));
+	ctrl_req->wLength = cpu_to_le16(size);
 
 	if (type == USB_CDC_GET_ENCAPSULATED_RESPONSE) {
 		/* Reading command */
Signature · 13 lines
best regards,
D.J. Barrow

Linux Kernel Developer
Option NV, Gaston Geenslaan 14, 3001 Leuven, Belgium
 
T: +32 16 311 621
F: +32 16 207 164
[email protected]
www.option.com

Disclaimer:
http://www.option.com/company/disclaimer.shtml

A patch needed to make the hso driver work on big endian machines.

---

drivers/net/usb/hso.c +2 -2
Index: linux-2.6/drivers/net/usb/hso.c
===================================================================
@@ -1792,8 +1792,8 @@
 
 	/* initialize */
 	ctrl_req->wValue = 0;
-	ctrl_req->wIndex = hso_port_to_mux(port);
-	ctrl_req->wLength = size;
+	ctrl_req->wIndex = cpu_to_le16(hso_port_to_mux(port));
+	ctrl_req->wLength = cpu_to_le16(size);
 
 	if (type == USB_CDC_GET_ENCAPSULATED_RESPONSE) {
 		/* Reading command */

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Am Monday 12 January 2009 15:59:10 schrieb Denis Joseph Barrow:

Quoted 2 lines

This patch is against 2.6.29-rc1 I hope it'll apply to other trees if neccessary. Filip Aben says this fix is neccessary for big endian machines.

He's correct. They are needed.

Regards
Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#3 lore raw

From: Oliver Neukum <[email protected]>
Date: Mon, 12 Jan 2009 16:04:40 +0100

Quoted 5 lines

Am Monday 12 January 2009 15:59:10 schrieb Denis Joseph Barrow:

Quoted 2 lines

This patch is against 2.6.29-rc1 I hope it'll apply to other trees if neccessary. Filip Aben says this fix is neccessary for big endian machines.

He's correct. They are needed.

Patch applied, thanks everyone.