netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hso driver fix for big endian machines.
@ 2009-01-12 14:59 Denis Joseph Barrow
       [not found] ` <496B5ABE.2060406-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Joseph Barrow @ 2009-01-12 14:59 UTC (permalink / raw)
  To: Linux netdev Mailing list, Linux USB kernel mailing list,
	Paul Hardwick

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

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.
Signed-off-by: Denis Joseph Barrow <D.Barow-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
---
Index: linux-2.6/drivers/net/usb/hso.c
===================================================================
--- linux-2.6.orig/drivers/net/usb/hso.c	2009-01-12 15:49:57.000000000 +0100
+++ linux-2.6/drivers/net/usb/hso.c	2009-01-12 15:50:33.000000000 +0100
@@ -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 */

-- 
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
d.barow-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org
www.option.com

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

[-- Attachment #2: hso_big_endian.patch --]
[-- Type: text/x-diff, Size: 727 bytes --]

A patch needed to make the hso driver work on big endian machines.
Signed-off-by: Denis Joseph Barrow <D.Barow-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
---
Index: linux-2.6/drivers/net/usb/hso.c
===================================================================
--- linux-2.6.orig/drivers/net/usb/hso.c	2009-01-12 15:49:57.000000000 +0100
+++ linux-2.6/drivers/net/usb/hso.c	2009-01-12 15:50:33.000000000 +0100
@@ -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 */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hso driver fix for big endian machines.
       [not found] ` <496B5ABE.2060406-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
@ 2009-01-12 15:04   ` Oliver Neukum
  2009-01-13  5:56     ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Neukum @ 2009-01-12 15:04 UTC (permalink / raw)
  To: Denis Joseph Barrow
  Cc: Linux netdev Mailing list, Linux USB kernel mailing list,
	Paul Hardwick

Am Monday 12 January 2009 15:59:10 schrieb Denis Joseph Barrow:
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hso driver fix for big endian machines.
  2009-01-12 15:04   ` Oliver Neukum
@ 2009-01-13  5:56     ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-01-13  5:56 UTC (permalink / raw)
  To: oliver; +Cc: D.Barow, netdev, linux-usb, P.Hardwick

From: Oliver Neukum <oliver@neukum.org>
Date: Mon, 12 Jan 2009 16:04:40 +0100

> Am Monday 12 January 2009 15:59:10 schrieb Denis Joseph Barrow:
> > 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-13  5:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 14:59 [PATCH] hso driver fix for big endian machines Denis Joseph Barrow
     [not found] ` <496B5ABE.2060406-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
2009-01-12 15:04   ` Oliver Neukum
2009-01-13  5:56     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).