[kernel] r18062 - in dists/trunk/linux-2.6/debian: . patches/features/x86 patches/series

Ben Hutchings benh at alioth.debian.org
Thu Sep 8 14:40:24 UTC 2011


Author: benh
Date: Thu Sep  8 14:40:22 2011
New Revision: 18062

Log:
[i386] libertas: prioritize usb8388_olpc.bin firmware on OLPC machines

Added:
   dists/trunk/linux-2.6/debian/patches/features/x86/libertas-prioritize-usb8388_olpc.bin-firmware-on-OLPC-machines.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/base

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	Wed Sep  7 13:27:44 2011	(r18061)
+++ dists/trunk/linux-2.6/debian/changelog	Thu Sep  8 14:40:22 2011	(r18062)
@@ -4,6 +4,7 @@
 
   [ Ben Hutchings ]
   * [ia64] Disable GENERIC_GPIO (fixes FTBFS)
+  * [i386] libertas: prioritize usb8388_olpc.bin firmware on OLPC machines
 
  -- Ben Hutchings <ben at decadent.org.uk>  Mon, 05 Sep 2011 04:18:43 +0100
 

Added: dists/trunk/linux-2.6/debian/patches/features/x86/libertas-prioritize-usb8388_olpc.bin-firmware-on-OLPC-machines.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/x86/libertas-prioritize-usb8388_olpc.bin-firmware-on-OLPC-machines.patch	Thu Sep  8 14:40:22 2011	(r18062)
@@ -0,0 +1,56 @@
+Subject: [v2] libertas: prioritize usb8388_olpc.bin firmware on OLPC machines
+Date: Thu, 04 Aug 2011 23:06:52 -0000
+From: Andres Salomon <dilinger at queued.net>
+
+Normally, the v9 firmware will be loaded if it's available.  However, on
+OLPC XO-1 machines, the olpc-specific firmware supports extra functionality.
+This makes the libertas driver attempt to load the custom firmware first
+if the machine is an OLPC machine; if that fails (or it's not an OLPC
+machine), fall back to attempting to load the other firmwares.
+
+Signed-off-by: Andres Salomon <dilinger at queued.net>
+Signed-off-by: Dan Williams <dcbw at redhat.com>
+[bwh: Add "libertas/" to path]
+---
+drivers/net/wireless/libertas/if_usb.c |   21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
+index b5acc39..527cb11 100644
+--- a/drivers/net/wireless/libertas/if_usb.c
++++ b/drivers/net/wireless/libertas/if_usb.c
+@@ -973,6 +973,23 @@ static const struct {
+ 	{ MODEL_8682, "libertas/usb8682.bin" }
+ };
+ 
++#ifdef CONFIG_OLPC
++
++static int try_olpc_fw(struct if_usb_card *cardp)
++{
++	int retval = -ENOENT;
++
++	/* try the OLPC firmware first; fall back to fw_table list */
++	if (machine_is_olpc() && cardp->model == MODEL_8388)
++		retval = request_firmware(&cardp->fw, "libertas/usb8388_olpc.bin",
++				&cardp->udev->dev);
++	return retval;
++}
++
++#else
++static int try_olpc_fw(struct if_usb_card *cardp) { return -ENOENT; }
++#endif /* !CONFIG_OLPC */
++
+ static int get_fw(struct if_usb_card *cardp, const char *fwname)
+ {
+ 	int i;
+@@ -981,6 +998,10 @@ static int get_fw(struct if_usb_card *cardp, const char *fwname)
+ 	if (fwname)
+ 		return request_firmware(&cardp->fw, fwname, &cardp->udev->dev);
+ 
++	/* Handle OLPC firmware */
++	if (try_olpc_fw(cardp) == 0)
++		return 0;
++
+ 	/* Otherwise search for firmware to use */
+ 	for (i = 0; i < ARRAY_SIZE(fw_table); i++) {
+ 		if (fw_table[i].model != cardp->model)

Modified: dists/trunk/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/base	Wed Sep  7 13:27:44 2011	(r18061)
+++ dists/trunk/linux-2.6/debian/patches/series/base	Thu Sep  8 14:40:22 2011	(r18062)
@@ -42,3 +42,4 @@
 + bugfix/ia64/nouveau-ACPI-support-is-dependent-on-X86.patch
 + bugfix/alpha/alpha-gpio-GENERIC_GPIO-default-must-be-n.patch
 + bugfix/ia64/ia64-gpio-GENERIC_GPIO-default-must-be-n.patch
++ features/x86/libertas-prioritize-usb8388_olpc.bin-firmware-on-OLPC-machines.patch



More information about the Kernel-svn-changes mailing list