I have made the following changes intended for : CE:Adaptation:N950-N9 / kernel-adaptation-n950
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/5423 Thank You, rojkov [This message was auto-generated] --- Request # 5423: Messages from BOSS: WARNING check_package_is_complete_sources (kernel-adaptation-n950) failed: Failed to get source file list from spec or dsc: Failed to parse spec file: can't parse specfile No dsc file found WARNING check_valid_changes (kernel-adaptation-n950) failed: Could not parse spec in kernel-adaptation-n950: can't parse specfile State: review at 2012-08-06T10:48:51 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:rojkov:branches:CE:Adaptation:N950-N9 / kernel-adaptation-n950 -> CE:Adaptation:N950-N9 / kernel-adaptation-n950 changes files: -------------- --- kernel-adaptation-n950.changes +++ kernel-adaptation-n950.changes @@ -0,0 +1,4 @@ +* Mon Aug 06 2012 Dmitry Rozhkov <[email protected]> - 2.6.32.20112201 +- Backported g_ffs module from 2.6.35 in patch 0001-backport-g_ffs-from-2.6.35.patch +- Enabled CONFIG_USB_FUNCTIONFS=m + new: ---- 0001-backport-g_ffs-from-2.6.35.patch spec files: ----------- --- kernel-adaptation-n950.spec +++ kernel-adaptation-n950.spec @@ -274,6 +274,9 @@ # Fix for NEMO#46 Patch97: linux-2.6.38-tty-add-active-sysfs-attribute-to-tty0-and-console-d.patch +# backport of g_ffs from 2.6.35 +Patch98: 0001-backport-g_ffs-from-2.6.35.patch + @@ -595,6 +598,10 @@ # linux-2.6.38-tty-add-active-sysfs-attribute-to-tty0-and-console-d.patch %patch97 -p1 +# backport of g_ffs from 2.6.35 +# 0001-backport-g_ffs-from-2.6.35.patch +%patch98 -p1 + # Drop some necessary files from the source dir into the buildroot # HARMATTAN: no build-time config file generation, copy ready-made config file cp $RPM_SOURCE_DIR/kernel-*config . other changes: -------------- ++++++ 0001-backport-g_ffs-from-2.6.35.patch (new) --- 0001-backport-g_ffs-from-2.6.35.patch +++ 0001-backport-g_ffs-from-2.6.35.patch @@ -0,0 +1,3350 @@ +From b537253267d1856e99bf2c30aaf50e97a022d2ef Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov <[email protected]> +Date: Wed, 1 Aug 2012 21:48:11 +0300 +Subject: [PATCH] backport g_ffs from 2.6.35 + +--- + drivers/usb/gadget/Kconfig | 37 + + drivers/usb/gadget/Makefile | 2 + + drivers/usb/gadget/f_fs.c | 2442 ++++++++++++++++++++++++++++++++++++++++ + drivers/usb/gadget/g_ffs.c | 437 +++++++ + include/linux/usb/functionfs.h | 199 ++++ + include/linux/wait.h | 149 +++ + kernel/sched.c | 1 + + 7 files changed, 3267 insertions(+) + create mode 100644 drivers/usb/gadget/f_fs.c + create mode 100644 drivers/usb/gadget/g_ffs.c + create mode 100644 include/linux/usb/functionfs.h + +diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig +index e9d7cb8..eddcc9f 100644 +--- a/drivers/usb/gadget/Kconfig ++++ b/drivers/usb/gadget/Kconfig +@@ -710,6 +710,43 @@ config USB_GADGETFS + Say "y" to link the driver statically, or "m" to build a + dynamically linked module called "gadgetfs". + ++config USB_FUNCTIONFS ++ tristate "Function Filesystem (EXPERIMENTAL)" ++ depends on EXPERIMENTAL ++ help ++ The Function Filesystem (FunctioFS) lets one create USB ++ composite functions in user space in the same way as GadgetFS ++ lets one create USB gadgets in user space. This allows creation ++ of composite gadgets such that some of the functions are ++ implemented in kernel space (for instance Ethernet, serial or ++ mass storage) and other are implemented in user space. ++ ++ Say "y" to link the driver statically, or "m" to build ++ a dynamically linked module called "g_ffs". ++ ++config USB_FUNCTIONFS_ETH ++ bool "Include CDC ECM (Ethernet) function" ++ depends on USB_FUNCTIONFS && NET ++ help ++ Include an CDC ECM (Ethernet) funcion in the CDC ECM (Funcion) ++ Filesystem. If you also say "y" to the RNDIS query below the ++ gadget will have two configurations. ++ ++config USB_FUNCTIONFS_RNDIS ++ bool "Include RNDIS (Ethernet) function" ++ depends on USB_FUNCTIONFS && NET ++ help ++ Include an RNDIS (Ethernet) funcion in the Funcion Filesystem. ++ If you also say "y" to the CDC ECM query above the gadget will ++ have two configurations. ++ ++config USB_FUNCTIONFS_GENERIC ++ bool "Include 'pure' configuration" ++ depends on USB_FUNCTIONFS && (USB_FUNCTIONFS_ETH || USB_FUNCTIONFS_RNDIS) ++ help ++ Include a configuration with FunctionFS and no Ethernet ++ configuration. ++ + config USB_FILE_STORAGE + tristate "File-backed Storage Gadget" + depends on BLOCK +diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile +index e8207dd..7b368ab 100644 +--- a/drivers/usb/gadget/Makefile ++++ b/drivers/usb/gadget/Makefile +@@ -51,6 +51,8 @@ obj-$(CONFIG_USB_ZERO) += g_zero.o + obj-$(CONFIG_USB_AUDIO) += g_audio.o + obj-$(CONFIG_USB_ETH) += g_ether.o + obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o ++obj-$(CONFIG_USB_FUNCTIONFS) += g_ffs.o ++obj-$(CONFIG_USB_ETH_FUNCTIONFS) += g_eth_ffs.o + obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o + obj-$(CONFIG_USB_MASS_STORAGE) += g_mass_storage.o + obj-$(CONFIG_USB_G_SERIAL) += g_serial.o +diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c +new file mode 100644 +index 0000000..2aaa0f7 +--- /dev/null ++++ b/drivers/usb/gadget/f_fs.c +@@ -0,0 +1,2442 @@ ++/* ++ * f_fs.c -- user mode filesystem api for usb composite funtcion controllers ++ * ++ * Copyright (C) 2010 Samsung Electronics ++ * Author: Michal Nazarewicz <[email protected]> ++ * ++ * Based on inode.c (GadgetFS): ++ * Copyright (C) 2003-2004 David Brownell ++ * Copyright (C) 2003 Agilent Technologies ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++ ++/* #define DEBUG */ ++/* #define VERBOSE_DEBUG */ ++ ++#include <linux/blkdev.h> ++#include <linux/pagemap.h> ++#include <asm/unaligned.h> ++#include <linux/smp_lock.h> ++ ++#include <linux/usb/composite.h> ++#include <linux/usb/functionfs.h> ++ ++ ++#define FUNCTIONFS_MAGIC 0xa647361 /* Chosen by a honest dice roll ;) */ ++ ++ ++/* Debuging *****************************************************************/ ++ ++#define ffs_printk(level, fmt, args...) printk(level "f_fs: " fmt "\n", ## args) ++ ++#define FERR(...) ffs_printk(KERN_ERR, __VA_ARGS__) ++#define FINFO(...) ffs_printk(KERN_INFO, __VA_ARGS__) ++ ++#ifdef DEBUG ++# define FDBG(...) ffs_printk(KERN_DEBUG, __VA_ARGS__) ++#else ++# define FDBG(...) do { } while (0) ++#endif /* DEBUG */ ++ ++#ifdef VERBOSE_DEBUG ++# define FVDBG FDBG ++#else ++# define FVDBG(...) do { } while (0) ++#endif /* VERBOSE_DEBUG */ ++ ++#define ENTER() FVDBG("%s()", __func__) ++ ++#ifdef VERBOSE_DEBUG ++# define ffs_dump_mem(prefix, ptr, len) \ ++ print_hex_dump_bytes("f_fs" prefix ": ", DUMP_PREFIX_NONE, ptr, len) ++#else ++# define ffs_dump_mem(prefix, ptr, len) do { } while (0) ++#endif ++ ++ ++/* The data structure and setup file ****************************************/ ++ ++enum ffs_state { ++ /* Waiting for descriptors and strings. */ ++ /* In this state no open(2), read(2) or write(2) on epfiles ++ * may succeed (which should not be the problem as there ++ * should be no such files opened in the firts place). */ ++ FFS_READ_DESCRIPTORS, ++ FFS_READ_STRINGS, ++ ++ /* We've got descriptors and strings. We are or have called ++ * functionfs_ready_callback(). functionfs_bind() may have ++ * been called but we don't know. */ ++ /* This is the only state in which operations on epfiles may ++ * succeed. */ ++ FFS_ACTIVE, ++ ++ /* All endpoints have been closed. This state is also set if ++ * we encounter an unrecoverable error. The only ++ * unrecoverable error is situation when after reading strings ++ * from user space we fail to initialise EP files or ++ * functionfs_ready_callback() returns with error (<0). */ ++ /* In this state no open(2), read(2) or write(2) (both on ep0 ++ * as well as epfile) may succeed (at this point epfiles are ++ * unlinked and all closed so this is not a problem; ep0 is ++ * also closed but ep0 file exists and so open(2) on ep0 must ++ * fail). */ ++ FFS_CLOSING ++}; ++ ++ ++enum ffs_setup_state { ++ /* There is no setup request pending. */ ++ FFS_NO_SETUP, ++ /* User has read events and there was a setup request event ++ * there. The next read/write on ep0 will handle the ++ * request. */ ++ FFS_SETUP_PENDING, ++ /* There was event pending but before user space handled it ++ * some other event was introduced which canceled existing ++ * setup. If this state is set read/write on ep0 return ++ * -EIDRM. This state is only set when adding event. */ ++ FFS_SETUP_CANCELED ++}; (3151 more lines skipped) ++++++ kernel-adaptation-n950.config --- kernel-adaptation-n950.config +++ kernel-adaptation-n950.config @@ -1611,6 +1611,7 @@ CONFIG_USB_ETH_RNDIS=y # CONFIG_USB_ETH_EEM is not set # CONFIG_USB_GADGETFS is not set +CONFIG_USB_FUNCTIONFS=m CONFIG_USB_FILE_STORAGE=m # CONFIG_USB_FILE_STORAGE_TEST is not set # CONFIG_USB_MASS_STORAGE is not set ++++++ series --- series +++ series @@ -124,3 +124,6 @@ # Fix for NEMO#46 linux-2.6.38-tty-add-active-sysfs-attribute-to-tty0-and-console-d.patch + +# backport of g_ffs from 2.6.35 +0001-backport-g_ffs-from-2.6.35.patch
