rpms/kernel/devel linux-2.6-usb-storage-initialize-huawei-e220-properly.patch, NONE, 1.1 kernel.spec, 1.210, 1.211

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Wed Oct 10 17:13:35 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3894

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-usb-storage-initialize-huawei-e220-properly.patch 
Log Message:
* Wed Oct 10 2007 Chuck Ebbert <cebbert at redhat.com>
- Don't use incremental patches for -stable updates.
- Add USB modem fix from Fedora 7 kernel to Fedora 8.


linux-2.6-usb-storage-initialize-huawei-e220-properly.patch:

--- NEW FILE linux-2.6-usb-storage-initialize-huawei-e220-properly.patch ---
>From johann.wilhelm at student.tugraz.at  Sun Sep  9 08:19:38 2007
From: Johann Wilhelm <johann.wilhelm at student.tugraz.at>
Date: Wed, 05 Sep 2007 13:49:29 +0200
Subject: USB: usb-storage: Initialize Huawei E220 properly
To: linux-usb-devel at lists.sourceforge.net
Cc: greg at kroah.com, drussell at redhat.com
Message-ID: <20070905134929.5fv51ji2v40gkw0c at webmail.tugraz.at>
Content-Disposition: inline

bz 253096

From: Johann Wilhelm <johann.wilhelm at student.tugraz.at>

This is a reworked version of this patch:
http://www.mail-archive.com/linux-usb-devel%40lists.sourceforge.net/msg55094/activate_huawei_dev.patch

That properly initializes the HUAWEI E220 devices into multi-port mode.

Signed-off-by: Johann Wilhelm <johann.wilhelm at student.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>

---
 drivers/usb/storage/initializers.c |   14 ++++++++++++++
 drivers/usb/storage/initializers.h |    3 +++
 drivers/usb/storage/unusual_devs.h |   11 +++++++++++
 3 files changed, 28 insertions(+)

--- linux-2.6.22.noarch.orig/drivers/usb/storage/initializers.c
+++ linux-2.6.22.noarch/drivers/usb/storage/initializers.c
@@ -90,3 +90,17 @@ int usb_stor_ucr61s2b_init(struct us_dat
 
 	return (res ? -1 : 0);
 }
+
+/* This places the HUAWEI E220 devices in multi-port mode */
+int usb_stor_huawei_e220_init(struct us_data *us)
+{
+	int result;
+
+	us->iobuf[0] = 0x1;
+	result = usb_stor_control_msg(us, us->send_ctrl_pipe,
+				      USB_REQ_SET_FEATURE,
+				      USB_TYPE_STANDARD | USB_RECIP_DEVICE,
+				      0x01, 0x0, us->iobuf, 0x1, 1000);
+	US_DEBUGP("usb_control_msg performing result is %d\n", result);
+	return (result ? 0 : -1);
+}
--- linux-2.6.22.noarch.orig/drivers/usb/storage/initializers.h
+++ linux-2.6.22.noarch/drivers/usb/storage/initializers.h
@@ -47,3 +47,6 @@ int usb_stor_euscsi_init(struct us_data 
 /* This function is required to activate all four slots on the UCR-61S2B
  * flash reader */
 int usb_stor_ucr61s2b_init(struct us_data *us);
+
+/* This places the HUAWEI E220 devices in multi-port mode */
+int usb_stor_huawei_e220_init(struct us_data *us);
--- linux-2.6.22.noarch.orig/drivers/usb/storage/unusual_devs.h
+++ linux-2.6.22.noarch/drivers/usb/storage/unusual_devs.h
@@ -1394,6 +1394,17 @@ UNUSUAL_DEV(  0x1210, 0x0003, 0x0100, 0x
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_IGNORE_RESIDUE ),
 
+/* Reported by fangxiaozhi <fangxiaozhi60675 at huawei.com>
+ * and by linlei <linlei83 at huawei.com>
+ * Patch reworked by Johann Wilhelm <johann.wilhelm at student.tugraz.at>
+ * This brings the HUAWEI E220 devices into multi-port mode
+ */
+UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000,
+		"HUAWEI MOBILE",
+		"Mass Storage",
+		US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
+		0),
+
 /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
 UNUSUAL_DEV(  0x132b, 0x000b, 0x0001, 0x0001,
 		"Minolta",


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -r1.210 -r1.211
--- kernel.spec	9 Oct 2007 23:25:59 -0000	1.210
+++ kernel.spec	10 Oct 2007 17:13:00 -0000	1.211
@@ -524,15 +524,7 @@
 
 # For a stable release kernel
 %if 0%{?stable_update}
-Patch00: patch-2.6.%{base_sublevel}.1.bz2
-# at present, you'll have to manually uncomment needed incrementals
-# here to get up to 2.6.%{base_sublevel}.%{stable_update}, but they will
-# all be automatically applied
-#Patch01: patch-2.6.%{base_sublevel}.1-2.bz2
-#Patch02: patch-2.6.%{base_sublevel}.2-3.bz2
-#Patch03: patch-2.6.%{base_sublevel}.3-4.bz2
-#Patch04: patch-2.6.%{base_sublevel}.4-5.bz2
-#Patch05: patch-2.6.%{base_sublevel}.5-6.bz2
+Patch00: patch-2.6.%{base_sublevel}.%{stable_update}.bz2
 
 # non-released_kernel case
 # These are automagically defined by the rcrev and gitrev values set up
@@ -669,6 +661,7 @@
 Patch1220: linux-2.6-ps3-legacy-bootloader-hack.patch
 Patch1230: linux-2.6-powerpc-spu-vicinity.patch
 Patch1300: linux-2.6-usb-suspend-classes.patch
+Patch1305: linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
 Patch1400: linux-2.6-smarter-relatime.patch
 Patch1503: linux-2.6-xfs-optimize-away-dmapi-tests.patch
 Patch1504: linux-2.6-xfs-optimize-away-realtime-tests.patch
@@ -938,13 +931,7 @@
 # Update to latest upstream.
 # released_kernel with stable_update available case
 %if 0%{?stable_update}
-ApplyPatch patch-2.6.%{base_sublevel}.1.bz2
-if [ %{stable_update} -ge 2 ]; then
-  for p in `seq 2 %{stable_update}`; do
-    let o=p-1
-    ApplyPatch patch-2.6.%{base_sublevel}.$o-$p.bz2
-  done
-fi
+ApplyPatch patch-2.6.%{base_sublevel}.%{stable_update}.bz2
 
 # non-released_kernel case
 %else
@@ -1184,8 +1171,11 @@
 ApplyPatch linux-2.6-wakeups-hdaps.patch
 ApplyPatch linux-2.6-wakeups.patch
 
+# USB
 # Do USB suspend only on certain classes of device.
 ApplyPatch linux-2.6-usb-suspend-classes.patch
+# initialize strange modem/storage device properly (from F7 kernel)
+ApplyPatch linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
 
 # implement smarter atime updates support.
 ApplyPatch linux-2.6-smarter-relatime.patch
@@ -1818,6 +1808,10 @@
 
 
 %changelog
+* Wed Oct 10 2007 Chuck Ebbert <cebbert at redhat.com>
+- Don't use incremental patches for -stable updates.
+- Add USB modem fix from Fedora 7 kernel to Fedora 8.
+
 * Tue Oct 09 2007 Dave Jones <davej at redhat.com>
 - 2.6.23
 




More information about the fedora-extras-commits mailing list