rpms/kernel-xen/devel linux-2.6-acpi-acpica-20051202.patch, NONE, 1.1.2.1 linux-2.6.14-xen-guest-enable-char-devices.patch, NONE, 1.1.2.1 patch-2.6.15-rc6.bz2.sign, NONE, 1.1.2.1 .cvsignore, 1.3.2.5, 1.3.2.6 kernel-xen.spec, 1.13.2.13, 1.13.2.14 linux-2.6-ub.patch, 1.1.2.1, 1.1.2.2 sources, 1.3.2.5, 1.3.2.6 upstream, 1.1.2.4, 1.1.2.5 patch-2.6.15-rc5.bz2.sign, 1.1.2.1, NONE xen-modular-devices.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Dec 20 15:56:40 UTC 2005


Author: quintela

Update of /cvs/dist/rpms/kernel-xen/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv11872

Modified Files:
      Tag: private-kernel-xen-2_6_12-1_13_FC5-sct-branch
	.cvsignore kernel-xen.spec linux-2.6-ub.patch sources upstream 
Added Files:
      Tag: private-kernel-xen-2_6_12-1_13_FC5-sct-branch
	linux-2.6-acpi-acpica-20051202.patch 
	linux-2.6.14-xen-guest-enable-char-devices.patch 
	patch-2.6.15-rc6.bz2.sign 
Removed Files:
      Tag: private-kernel-xen-2_6_12-1_13_FC5-sct-branch
	patch-2.6.15-rc5.bz2.sign xen-modular-devices.patch 
Log Message:
merge with rawhide 1.7776 & HIGMEM4G & enable char devices on xen guest & xennet is a module again

linux-2.6-acpi-acpica-20051202.patch:
 arch/ia64/kernel/acpi-ext.c        |   22 
 arch/ia64/pci/pci.c                |   10 
 arch/x86_64/kernel/io_apic.c       |   10 
 arch/x86_64/kernel/mpparse.c       |    8 
 drivers/acpi/acpi_memhotplug.c     |    4 
 drivers/acpi/dispatcher/dsinit.c   |   25 
 drivers/acpi/dispatcher/dsmethod.c |  337 ++++----
 drivers/acpi/dispatcher/dsutils.c  |   12 
 drivers/acpi/dispatcher/dswload.c  |  134 ++-
 drivers/acpi/ec.c                  |    4 
 drivers/acpi/events/evevent.c      |   42 +
 drivers/acpi/events/evgpe.c        |   18 
 drivers/acpi/events/evgpeblk.c     |  169 ++--
 drivers/acpi/events/evsci.c        |    4 
 drivers/acpi/events/evxface.c      |    4 
 drivers/acpi/events/evxfevnt.c     |    7 
 drivers/acpi/executer/exconvrt.c   |   12 
 drivers/acpi/executer/exdump.c     |  669 ++++++++++-------
 drivers/acpi/executer/exmisc.c     |   90 +-
 drivers/acpi/executer/exnames.c    |    6 
 drivers/acpi/executer/exoparg2.c   |   10 
 drivers/acpi/executer/exprep.c     |    4 
 drivers/acpi/executer/exregion.c   |   20 
 drivers/acpi/executer/exresop.c    |    2 
 drivers/acpi/executer/exstorob.c   |    4 
 drivers/acpi/executer/exutils.c    |    6 
 drivers/acpi/glue.c                |    8 
 drivers/acpi/hardware/hwacpi.c     |    8 
 drivers/acpi/motherboard.c         |   30 
 drivers/acpi/namespace/nsaccess.c  |    2 
 drivers/acpi/namespace/nsdump.c    |    4 
 drivers/acpi/namespace/nsnames.c   |    2 
 drivers/acpi/namespace/nsutils.c   |   12 
 drivers/acpi/namespace/nsxfeval.c  |    2 
 drivers/acpi/osl.c                 |    6 
 drivers/acpi/parser/psargs.c       |  152 +--
 drivers/acpi/parser/psparse.c      |   35 
 drivers/acpi/parser/psxface.c      |  142 +++
 drivers/acpi/pci_irq.c             |   48 -
 drivers/acpi/pci_link.c            |   96 +-
 drivers/acpi/pci_root.c            |    8 
 drivers/acpi/processor_idle.c      |   20 
 drivers/acpi/resources/Makefile    |    2 
 drivers/acpi/resources/rsaddr.c    | 1214 ++++++-------------------------
 drivers/acpi/resources/rscalc.c    |  815 +++++++-------------
 drivers/acpi/resources/rscreate.c  |   59 -
 drivers/acpi/resources/rsdump.c    | 1446 ++++++++++++++-----------------------
 drivers/acpi/resources/rsinfo.c    |  204 +++++
 drivers/acpi/resources/rsio.c      |  512 +++----------
 drivers/acpi/resources/rsirq.c     |  588 +++------------
 drivers/acpi/resources/rslist.c    |  524 ++-----------
 drivers/acpi/resources/rsmemory.c  |  521 +++----------
 drivers/acpi/resources/rsmisc.c    |  849 +++++++++++----------
 drivers/acpi/resources/rsutils.c   |  388 +++++++++
 drivers/acpi/resources/rsxface.c   |  228 ++++-
 drivers/acpi/scan.c                |    2 
 drivers/acpi/tables/tbconvrt.c     |    4 
 drivers/acpi/tables/tbgetall.c     |    4 
 drivers/acpi/tables/tbrsdt.c       |    2 
 drivers/acpi/tables/tbutils.c      |   13 
 drivers/acpi/tables/tbxfroot.c     |    2 
 drivers/acpi/utilities/Makefile    |    5 
 drivers/acpi/utilities/utalloc.c   |    8 
 drivers/acpi/utilities/utcopy.c    |   19 
 drivers/acpi/utilities/utglobal.c  |   78 +
 drivers/acpi/utilities/utmisc.c    |  131 +--
 drivers/acpi/utilities/utmutex.c   |    4 
 drivers/acpi/utilities/utresrc.c   |  429 ++++++++++
 drivers/acpi/utilities/utstate.c   |    2 
 drivers/acpi/utilities/utxface.c   |   52 -
 drivers/char/hpet.c                |   26 
 drivers/pnp/pnpacpi/rsparser.c     |  404 +++++-----
 drivers/serial/8250_acpi.c         |   22 
 include/acpi/acconfig.h            |   20 
 include/acpi/acdisasm.h            |   59 -
 include/acpi/acevents.h            |    6 
 include/acpi/acglobal.h            |   13 
 include/acpi/acinterp.h            |   46 +
 include/acpi/aclocal.h             |   70 +
 include/acpi/acmacros.h            |   91 ++
 include/acpi/acpi_drivers.h        |    4 
 include/acpi/acpiosxf.h            |    4 
 include/acpi/acpixf.h              |   11 
 include/acpi/acresrc.h             |  400 +++++-----
 include/acpi/actypes.h             |  301 ++++---
 include/acpi/acutils.h             |   24 
 include/acpi/amlresrc.h            |  271 +++---
 include/acpi/platform/acenv.h      |   12 
 include/acpi/platform/aclinux.h    |    4 
 include/asm-x86_64/mpspec.h        |    2 
 include/linux/acpi.h               |    2 
 91 files changed, 5823 insertions(+), 6282 deletions(-)

--- NEW FILE linux-2.6-acpi-acpica-20051202.patch ---
 arch/ia64/kernel/acpi-ext.c        |   24 
 arch/ia64/pci/pci.c                |   10 
 arch/x86_64/kernel/io_apic.c       |   10 
 arch/x86_64/kernel/mpparse.c       |    8 
 drivers/acpi/acpi_memhotplug.c     |    4 
 drivers/acpi/dispatcher/dsinit.c   |   25 
 drivers/acpi/dispatcher/dsmethod.c |  337 +-
 drivers/acpi/dispatcher/dsutils.c  |   12 
 drivers/acpi/dispatcher/dswload.c  |  134 -
 drivers/acpi/ec.c                  |    6 
 drivers/acpi/events/evevent.c      |   42 
 drivers/acpi/events/evgpe.c        |   18 
 drivers/acpi/events/evgpeblk.c     |  169 -
 drivers/acpi/events/evsci.c        |    4 
 drivers/acpi/events/evxface.c      |    4 
 drivers/acpi/events/evxfevnt.c     |    7 
 drivers/acpi/executer/exconvrt.c   |   12 
 drivers/acpi/executer/exdump.c     |  681 +++--
 drivers/acpi/executer/exmisc.c     |   90 
 drivers/acpi/executer/exnames.c    |    6 
 drivers/acpi/executer/exoparg2.c   |   10 
 drivers/acpi/executer/exprep.c     |    4 
 drivers/acpi/executer/exregion.c   |   20 
 drivers/acpi/executer/exresop.c    |    2 
 drivers/acpi/executer/exstorob.c   |    4 
 drivers/acpi/executer/exutils.c    |    6 
 drivers/acpi/glue.c                |   14 
 drivers/acpi/hardware/hwacpi.c     |    8 
 drivers/acpi/motherboard.c         |   34 
 drivers/acpi/namespace/nsaccess.c  |    2 
 drivers/acpi/namespace/nsdump.c    |    4 
 drivers/acpi/namespace/nsnames.c   |    2 
 drivers/acpi/namespace/nsutils.c   |   12 
 drivers/acpi/namespace/nsxfeval.c  |    2 
 drivers/acpi/osl.c                 |    6 
 drivers/acpi/parser/psargs.c       |  154 -
 drivers/acpi/parser/psparse.c      |   35 
 drivers/acpi/parser/psxface.c      |  144 +
 drivers/acpi/pci_irq.c             |   48 
 drivers/acpi/pci_link.c            |  102 
 drivers/acpi/pci_root.c            |   14 
 drivers/acpi/processor_idle.c      |   20 
 drivers/acpi/resources/Makefile    |    2 
 drivers/acpi/resources/rsaddr.c    | 1998 +++++------------
 drivers/acpi/resources/rscalc.c    | 1679 ++++++--------
 drivers/acpi/resources/rscreate.c  |   59 
 drivers/acpi/resources/rsdump.c    | 2918 +++++++++++--------------
 drivers/acpi/resources/rsinfo.c    |  218 -
 drivers/acpi/resources/rsio.c      |  864 ++-----
 drivers/acpi/resources/rsirq.c     |  986 ++------
 drivers/acpi/resources/rslist.c    | 1116 +++------
 drivers/acpi/resources/rsmemory.c  |  859 ++-----
 drivers/acpi/resources/rsmisc.c    | 1843 ++++++++-------
 drivers/acpi/resources/rsutils.c   |  816 +++++-
 drivers/acpi/resources/rsxface.c   |  232 +
 drivers/acpi/scan.c                |    2 
 drivers/acpi/tables/tbconvrt.c     |    4 
 drivers/acpi/tables/tbgetall.c     |    4 
 drivers/acpi/tables/tbrsdt.c       |    2 
 drivers/acpi/tables/tbutils.c      |   13 
 drivers/acpi/tables/tbxfroot.c     |    2 
 drivers/acpi/utilities/Makefile    |    5 
 drivers/acpi/utilities/utalloc.c   |    8 
 drivers/acpi/utilities/utcopy.c    |   19 
 drivers/acpi/utilities/utglobal.c  |   80 
 drivers/acpi/utilities/utmisc.c    |  417 +--
 drivers/acpi/utilities/utmutex.c   |    4 
 drivers/acpi/utilities/utresrc.c   |  447 +++
 drivers/acpi/utilities/utstate.c   |    2 
 drivers/acpi/utilities/utxface.c   |   52 
 drivers/char/hpet.c                |   28 
 drivers/pnp/pnpacpi/rsparser.c     |  422 +--
 drivers/serial/8250_acpi.c         |   28 
 include/acpi/acconfig.h            |   30 
 include/acpi/acdisasm.h            |   93 
 include/acpi/acevents.h            |    6 
 include/acpi/acglobal.h            |   15 
 include/acpi/acinterp.h            |   46 
 include/acpi/aclocal.h             |  106 
 include/acpi/acmacros.h            |   95 
 include/acpi/acpi_drivers.h        |    4 
 include/acpi/acpiosxf.h            |    4 
 include/acpi/acpixf.h              |   11 
 include/acpi/acresrc.h             |  800 +++---
 include/acpi/actypes.h             |  371 +--
 include/acpi/acutils.h             |   24 
 include/acpi/amlresrc.h            |  317 +-
 include/acpi/platform/acenv.h      |   12 
 include/acpi/platform/aclinux.h    |    4 
 include/asm-x86_64/mpspec.h        |    2 
 include/linux/acpi.h               |    2 
 91 files changed, 9317 insertions(+), 10004 deletions(-)
commit 28f55ebce5bd2fceec8adc7c8860953d3e4532a8
Author: Bob Moore <robert.moore at intel.com>
Date:   Fri Dec 2 18:27:00 2005 -0500

    [ACPI] ACPICA 20051202
    
    Modified the parsing of control methods to no longer
    create namespace objects during the first pass of the
    parse. Objects are now created only during the execute
    phase, at the moment the namespace creation operator
    is encountered in the AML (Name, OperationRegion,
    CreateByteField, etc.) This should eliminate ALREADY_EXISTS
    exceptions seen on some machines where reentrant control
    methods are protected by an AML mutex. The mutex will now
    correctly block multiple threads from attempting to create
    the same object more than once.
    
    Increased the number of available Owner Ids for namespace
    object tracking from 32 to 255. This should eliminate the
    OWNER_ID_LIMIT exceptions seen on some machines with a
    large number of ACPI tables (either static or dynamic).
    
    Enhanced the namespace dump routine to output the owner
    ID for each namespace object.
    
    Signed-off-by: Bob Moore <robert.moore at intel.com>
    Signed-off-by: Len Brown <len.brown at intel.com>

commit c51a4de85de720670f2fbc592a6f8040af72ad87
Author: Bob Moore <robert.moore at intel.com>
Date:   Thu Nov 17 13:07:00 2005 -0500

    [ACPI] ACPICA 20051117
    
    Fixed a problem in the AML parser where the method thread
    count could be decremented below zero if any errors
    occurred during the method parse phase. This should
    eliminate AE_AML_METHOD_LIMIT exceptions seen on some
    machines. This also fixed a related regression with the
    mechanism that detects and corrects methods that cannot
    properly handle reentrancy (related to the deployment of
    the new OwnerId mechanism.)
    
    Eliminated the pre-parsing of control methods (to detect
    errors) during table load. Related to the problem above,
    this was causing unwind issues if any errors occurred
    during the parse, and it seemed to be overkill. A table
    load should not be aborted if there are problems with
    any single control method, thus rendering this feature
    rather pointless.
    
    Fixed a problem with the new table-driven resource manager
    where an internal buffer overflow could occur for small
    resource templates.
    
    Implemented a new external interface, acpi_get_vendor_resource()
    This interface will find and return a vendor-defined
    resource descriptor within a _CRS or _PRS
    method via an ACPI 3.0 UUID match. (from Bjorn Helgaas)
    
    Removed the length limit (200) on string objects as
    per the upcoming ACPI 3.0A specification. This affects
    the following areas of the interpreter: 1) any implicit
    conversion of a Buffer to a String, 2) a String object
    result of the ASL Concatentate operator, 3) the String
    object result of the ASL ToString operator.
    
    Signed-off-by: Bob Moore <robert.moore at intel.com>
    Signed-off-by: Len Brown <len.brown at intel.com>

commit 96db255c8f014ae3497507104e8df809785a619f
Author: Bob Moore <robert.moore at intel.com>
Date:   Wed Nov 2 00:00:00 2005 -0500

    [ACPI] ACPICA 20051102
    
    Modified the subsystem initialization sequence to improve
    GPE support. The GPE initialization has been split into
    two parts in order to defer execution of the _PRW methods
    (Power Resources for Wake) until after the hardware is
    fully initialized and the SCI handler is installed. This
    allows the _PRW methods to access fields protected by the
    Global Lock. This will fix systems where a NO_GLOBAL_LOCK
    exception has been seen during initialization.
    
    Fixed a regression with the ConcatenateResTemplate()
    ASL operator introduced in the 20051021 release.
    
    Implemented support for "local" internal ACPI object
    types within the debugger "Object" command and the
    acpi_walk_namespace() external interfaces. These local
    types include RegionFields, BankFields, IndexFields, Alias,
    and reference objects.
    
    Moved common AML resource handling code into a new file,
    "utresrc.c". This code is shared by both the Resource
    Manager and the AML Debugger.
    
    Signed-off-by: Bob Moore <robert.moore at intel.com>
    Signed-off-by: Len Brown <len.brown at intel.com>

commit 0897831bb54eb36fd9e2a22da7f0f64be1b20d09
Author: Bob Moore <robert.moore at intel.com>
Date:   Fri Oct 21 00:00:00 2005 -0400

    [ACPI] ACPICA 20051021
    
[...16407 lines suppressed...]
-	u8 flags;
-	u8 specific_flags;
-	u16 granularity;
-	u16 address_min;
-	u16 address_max;
+struct aml_resource_address16 {
+	AML_RESOURCE_LARGE_HEADER_COMMON
+	    AML_RESOURCE_ADDRESS_COMMON u16 granularity;
+	u16 minimum;
+	u16 maximum;
 	u16 translation_offset;
 	u16 address_length;
-	u8 optional_fields[2];
 };
 
-struct asl_extended_xrupt_desc {
-	u8 descriptor_type;
-	u16 length;
-	u8 flags;
-	u8 table_length;
-	u32 interrupt_number[1];
+struct aml_resource_extended_irq {
+	AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
+	u8 interrupt_count;
+	u32 interrupts[1];
 	/* res_source_index, res_source optional fields follow */
 };
 
-struct asl_general_register_desc {
-	u8 descriptor_type;
-	u16 length;
-	u8 address_space_id;
+struct aml_resource_generic_register {
+	AML_RESOURCE_LARGE_HEADER_COMMON u8 address_space_id;
 	u8 bit_width;
 	u8 bit_offset;
-	u8 access_size;		/* ACPI 3.0, was Reserved */
+	u8 access_size;		/* ACPI 3.0, was previously Reserved */
 	u64 address;
 };
 
@@ -277,26 +263,39 @@ struct asl_general_register_desc {
 
 /* Union of all resource descriptors, so we can allocate the worst case */
 
-union asl_resource_desc {
-	struct asl_irq_format_desc irq;
-	struct asl_dma_format_desc dma;
-	struct asl_start_dependent_desc std;
-	struct asl_end_dependent_desc end;
-	struct asl_io_port_desc iop;
-	struct asl_fixed_io_port_desc fio;
-	struct asl_small_vendor_desc smv;
-	struct asl_end_tag_desc et;
-
-	struct asl_memory_24_desc M24;
-	struct asl_large_vendor_desc lgv;
-	struct asl_memory_32_desc M32;
-	struct asl_fixed_memory_32_desc F32;
-	struct asl_qword_address_desc qas;
-	struct asl_dword_address_desc das;
-	struct asl_word_address_desc was;
-	struct asl_extended_address_desc eas;
-	struct asl_extended_xrupt_desc exx;
-	struct asl_general_register_desc grg;
+union aml_resource {
+	/* Descriptor headers */
+
+	struct aml_resource_small_header small_header;
+	struct aml_resource_large_header large_header;
+
+	/* Small resource descriptors */
+
+	struct aml_resource_irq irq;
+	struct aml_resource_dma dma;
+	struct aml_resource_start_dependent start_dpf;
+	struct aml_resource_end_dependent end_dpf;
+	struct aml_resource_io io;
+	struct aml_resource_fixed_io fixed_io;
+	struct aml_resource_vendor_small vendor_small;
+	struct aml_resource_end_tag end_tag;
+
+	/* Large resource descriptors */
+
+	struct aml_resource_memory24 memory24;
+	struct aml_resource_generic_register generic_reg;
+	struct aml_resource_vendor_large vendor_large;
+	struct aml_resource_memory32 memory32;
+	struct aml_resource_fixed_memory32 fixed_memory32;
+	struct aml_resource_address16 address16;
+	struct aml_resource_address32 address32;
+	struct aml_resource_address64 address64;
+	struct aml_resource_extended_address64 ext_address64;
+	struct aml_resource_extended_irq extended_irq;
+
+	/* Utility overlays */
+
+	struct aml_resource_address address;
 	u32 u32_item;
 	u16 u16_item;
 	u8 U8item;
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 16609c1..53aa997 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -68,6 +68,7 @@
 #define ACPI_APPLICATION
 #define ACPI_DEBUGGER
 #define ACPI_DISASSEMBLER
+#define ACPI_MUTEX_DEBUG
 #endif
 
 #ifdef ACPI_ASL_COMPILER
@@ -205,6 +206,8 @@
  *
  *****************************************************************************/
 
+#define ACPI_IS_ASCII(c)  ((c) < 0x80)
+
 #ifdef ACPI_USE_SYSTEM_CLIBRARY
 /*
  * Use the standard C library headers.
@@ -234,7 +237,7 @@
 #define ACPI_STRCAT(d,s)        (void) strcat((d), (s))
 #define ACPI_STRNCAT(d,s,n)     strncat((d), (s), (acpi_size)(n))
 #define ACPI_STRTOUL(d,s,n)     strtoul((d), (s), (acpi_size)(n))
-#define ACPI_MEMCMP(s1,s2,n)    memcmp((s1), (s2), (acpi_size)(n))
+#define ACPI_MEMCMP(s1,s2,n)    memcmp((const char *)(s1), (const char *)(s2), (acpi_size)(n))
 #define ACPI_MEMCPY(d,s,n)      (void) memcpy((d), (s), (acpi_size)(n))
 #define ACPI_MEMSET(d,s,n)      (void) memset((d), (s), (acpi_size)(n))
 
@@ -246,7 +249,6 @@
 #define ACPI_IS_UPPER(i)        isupper((int) (i))
 #define ACPI_IS_PRINT(i)        isprint((int) (i))
 #define ACPI_IS_ALPHA(i)        isalpha((int) (i))
-#define ACPI_IS_ASCII(i)        isascii((int) (i))
 
 #else
 
@@ -273,8 +275,8 @@ typedef char *va_list;
 /*
  * Storage alignment properties
  */
-#define  _AUPBND                (sizeof (acpi_native_int) - 1)
-#define  _ADNBND                (sizeof (acpi_native_int) - 1)
+#define  _AUPBND                (sizeof (acpi_native_uint) - 1)
+#define  _ADNBND                (sizeof (acpi_native_uint) - 1)
 
 /*
  * Variable argument list macro definitions
@@ -296,7 +298,7 @@ typedef char *va_list;
 #define ACPI_STRCAT(d,s)        (void) acpi_ut_strcat ((d), (s))
 #define ACPI_STRNCAT(d,s,n)     acpi_ut_strncat ((d), (s), (acpi_size)(n))
 #define ACPI_STRTOUL(d,s,n)     acpi_ut_strtoul ((d), (s), (acpi_size)(n))
-#define ACPI_MEMCMP(s1,s2,n)    acpi_ut_memcmp((s1), (s2), (acpi_size)(n))
+#define ACPI_MEMCMP(s1,s2,n)    acpi_ut_memcmp((const char *)(s1), (const char *)(s2), (acpi_size)(n))
 #define ACPI_MEMCPY(d,s,n)      (void) acpi_ut_memcpy ((d), (s), (acpi_size)(n))
 #define ACPI_MEMSET(d,v,n)      (void) acpi_ut_memset ((d), (v), (acpi_size)(n))
 #define ACPI_TOUPPER            acpi_ut_to_upper
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index c93e656..1b9cbf0 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -71,6 +71,10 @@
 #define acpi_cache_t	kmem_cache_t
 #endif
 
+/* Full namespace pathname length limit - arbitrary */
+
+#define ACPI_PATHNAME_MAX              256
+
 #else				/* !__KERNEL__ */
 
 #include <stdarg.h>
diff --git a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h
index 6f8a17d..ac59045 100644
--- a/include/asm-x86_64/mpspec.h
+++ b/include/asm-x86_64/mpspec.h
@@ -188,7 +188,7 @@ extern void mp_register_lapic_address (u
 extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base);
 extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 gsi);
 extern void mp_config_acpi_legacy_irqs (void);
-extern int mp_register_gsi (u32 gsi, int edge_level, int active_high_low);
+extern int mp_register_gsi (u32 gsi, int triggering, int polarity);
 #endif /*CONFIG_X86_IO_APIC*/
 #endif
 
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 026c3c0..84d3d9f 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -435,7 +435,7 @@ extern int sbf_port ;
 
 #endif 	/* !CONFIG_ACPI */
 
-int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low);
+int acpi_register_gsi (u32 gsi, int triggering, int polarity);
 int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 
 /*

linux-2.6.14-xen-guest-enable-char-devices.patch:
 linux-2.6-xen.hg/drivers/Kconfig  |    3 +++
 linux-2.6.14/drivers/char/Kconfig |   15 +++++++++++++++
 2 files changed, 18 insertions(+)

--- NEW FILE linux-2.6.14-xen-guest-enable-char-devices.patch ---
Return-path: <xen-devel-bounces at lists.xensource.com>
Envelope-to: www-data at lists.xensource.com
Delivery-date: Mon, 12 Dec 2005 10:35:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xensource.com)
	by host-192-168-0-1-bcn-london with esmtp (Exim 4.50)
	id 1Ell1O-00073f-6w; Mon, 12 Dec 2005 10:35:06 +0000
Received: from [192.168.0.10] (helo=lists.xensource.com)
	by host-192-168-0-1-bcn-london with esmtp (Exim 4.50)
	id 1Ell19-0006x9-Km
	for xen-devel at lists.xensource.com; Mon, 12 Dec 2005 10:34:51 +0000
Received: from mx2.suse.de ([195.135.220.15])
	by 192.168.0.10 with esmtp (Exim 4.50) id 1Elkyj-000814-KZ
	for xen-devel at lists.xensource.com; Mon, 12 Dec 2005 10:32:22 +0000
Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 981AD1CBE8;
	Mon, 12 Dec 2005 11:33:43 +0100 (CET)
To: Hans-Christian Armingeon <johnny at wh-netz.de>
References: <1133474930.11038.27.camel at localhost.localdomain>
	<200512111748.24640.johnny at wh-netz.de>
From: Andi Kleen <ak at suse.de>
Date: 12 Dec 2005 08:05:05 -0700
In-Reply-To: <200512111748.24640.johnny at wh-netz.de>
Message-ID: <p73y82qnyou.fsf at verdi.suse.de>
Lines: 103
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-SA-Exim-Connect-IP: 195.135.220.15
X-SA-Exim-Mail-From: ak at suse.de
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on 192.168.0.10
X-Spam-Level: 
X-Spam-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,
	DATE_IN_FUTURE_03_06 autolearn=no version=3.1.0
X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100)
X-SA-Exim-Scanned: Yes (on 192.168.0.10)
Cc: xen-devel at lists.xensource.com
Subject: [Xen-devel] Re: No PTYs with linux-2.6-xen.hg
X-BeenThere: xen-devel at lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Xen developer discussion <xen-devel.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request at lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-devel at lists.xensource.com>
List-Help: <mailto:xen-devel-request at lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request at lists.xensource.com?subject=subscribe>
Sender: xen-devel-bounces at lists.xensource.com
Errors-To: xen-devel-bounces at lists.xensource.com


[mail will be delayed due to dumb mailing list policy]

Hans-Christian Armingeon <johnny at wh-netz.de> writes:

> Hi there,
> 
> I am having the same problem.
> Is anyone working on that issue?

This patch will fix it. It also reenables other useful
character drivers. Only softdog is still MIA.

However there are other problems still. e.g. current Xen
seems to have broken balloning again.

-Andi

diff -uNp linux-2.6.14/drivers/char/Kconfig.orig linux-2.6.14/drivers/char/Kconfig
--- linux-2.6.14/drivers/char/Kconfig.orig	2005-12-20 16:26:56.000000000 +0100
+++ linux-2.6.14/drivers/char/Kconfig	2005-12-20 16:46:03.000000000 +0100
@@ -4,6 +4,8 @@
 
 menu "Character devices"
 
+if !XEN || XEN_PHYSDEV_ACCESS
+
 config VT
 	bool "Virtual terminal" if EMBEDDED
 	select INPUT
@@ -415,6 +417,8 @@ config SGI_MBCS
 
 source "drivers/serial/Kconfig"
 
+endif
+
 config UNIX98_PTYS
 	bool "Unix98 PTY support" if EMBEDDED
 	default y
@@ -471,6 +475,8 @@ config LEGACY_PTY_COUNT
 	  When not in use, each legacy PTY occupies 12 bytes on 32-bit
 	  architectures and 24 bytes on 64-bit architectures.
 
+if !XEN || XEN_PHYSDEV_ACCESS
+
 config PRINTER
 	tristate "Parallel printer support"
 	depends on PARPORT
@@ -954,6 +960,8 @@ config GPIO_VR41XX
 	tristate "NEC VR4100 series General-purpose I/O Unit support"
 	depends on CPU_VR41XX
 
+endif
+
 config RAW_DRIVER
 	tristate "RAW driver (/dev/raw/rawN) (OBSOLETE)"
 	help
@@ -965,6 +973,8 @@ config RAW_DRIVER
           Applications should simply open the device (eg /dev/hda1)
           with the O_DIRECT flag.
 
+
+
 config MAX_RAW_DEVS
 	int "Maximum number of RAW devices to support (1-8192)"
 	depends on RAW_DRIVER
@@ -974,6 +984,8 @@ config MAX_RAW_DEVS
 	  Default is 256. Increase this number in case you need lots of
 	  raw devices.
 
+if !XEN || XEN_PHYSDEV_ACCESS
+
 config HPET
 	bool "HPET - High Precision Event Timer" if (X86 || IA64)
 	default n
@@ -1023,6 +1035,7 @@ config MMTIMER
 
 source "drivers/char/tpm/Kconfig"
 
+
 config TELCLOCK
 	tristate "Telecom clock driver for MPBL0010 ATCA SBC"
 	depends on EXPERIMENTAL
@@ -1035,5 +1048,7 @@ config TELCLOCK
 	  sysfs directory, /sys/devices/platform/telco_clock, with a number of
 	  files for controlling the behavior of this hardware.
 
+endif
+
 endmenu
 
diff -u linux-2.6-xen.hg/drivers/Kconfig-o linux-2.6-xen.hg/drivers/Kconfig
--- linux-2.6-xen.hg/drivers/Kconfig-o	2005-11-16 01:37:04.000000000 +0100
+++ linux-2.6-xen.hg/drivers/Kconfig	2005-12-12 07:11:52.000000000 +0100
@@ -49,9 +49,12 @@
 # input before char - char/joystick depends on it. As does USB.
 
 source "drivers/input/Kconfig"
+endif
 
 source "drivers/char/Kconfig"
 
+if !XEN || XEN_PHYSDEV_ACCESS
+
 source "drivers/i2c/Kconfig"
 
 source "drivers/w1/Kconfig"

_______________________________________________
Xen-devel mailing list
Xen-devel at lists.xensource.com
http://lists.xensource.com/xen-devel



--- NEW FILE patch-2.6.15-rc6.bz2.sign ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: See http://www.kernel.org/signature.html for info

iD8DBQBDplRcyGugalF9Dw4RArbzAJ9ZON4thSPCHVVeGLhVYMzoaNLB3ACghmDR
8S8icoxrtcmnGKAfU4J1M54=
=4ZN9
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/.cvsignore,v
retrieving revision 1.3.2.5
retrieving revision 1.3.2.6
diff -u -r1.3.2.5 -r1.3.2.6
--- .cvsignore	19 Dec 2005 12:52:57 -0000	1.3.2.5
+++ .cvsignore	20 Dec 2005 15:56:37 -0000	1.3.2.6
@@ -3,6 +3,4 @@
 kernel-xen-2.6.14
 linux-2.6.14.tar.bz2
 xen-20051206.tar.bz2
-patch-2.6.15-rc4.bz2
-patch-2.6.15-rc5-git7.bz2
-patch-2.6.15-rc5.bz2
+patch-2.6.15-rc6.bz2


Index: kernel-xen.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/kernel-xen.spec,v
retrieving revision 1.13.2.13
retrieving revision 1.13.2.14
diff -u -r1.13.2.13 -r1.13.2.14
--- kernel-xen.spec	19 Dec 2005 12:52:57 -0000	1.13.2.13
+++ kernel-xen.spec	20 Dec 2005 15:56:37 -0000	1.13.2.14
@@ -213,7 +213,7 @@
 #
 # Patches 0 through 100 are meant for core subsystem upgrades
 #
-Patch1: patch-2.6.15-rc5.bz2
+Patch1: patch-2.6.15-rc6.bz2
 Patch2: patch-2.6.15-rc5-git7.bz2
 
 # Patches 100 through 500 are meant for architecture patches
@@ -255,7 +255,7 @@
 Patch700: linux-2.6-xen-merge.patch
 Patch701: linux-2.6-xen-no-tls-warn.patch
 Patch703: linux-2.6-xen-kprobes.patch
-
+Patch704: linux-2.6.14-xen-guest-enable-char-devices.patch
 #
 # Patches 800 through 899 are reserved for bugfixes to the core system
 # and patches related to how RPMs are build
@@ -369,6 +369,7 @@
 
 # ACPI patches.
 Patch1800: linux-2.6-acpi-thinkpad-c2c3.patch
+Patch1801: linux-2.6-acpi-acpica-20051202.patch
 
 # Warn about usage of various obsolete functionality that may go away.
 Patch1900: linux-2.6-obsolete-idescsi-warning.patch
@@ -593,7 +594,7 @@
 
 # Update to latest upstream.
 %patch1 -p1
-%patch2 -p1
+#%patch2 -p1
 
 #
 # Patches 10 through 100 are meant for core subsystem upgrades
@@ -674,6 +675,7 @@
 %patch700 -p1
 %patch701 -p1
 %patch703 -p1
+%patch704 -p1
 %endif
 
 #
@@ -855,6 +857,8 @@
 # ACPI patches.
 # Blacklist another 'No C2/C3 states' Thinkpad R40e BIOS.
 %patch1800 -p1
+# ACPICA update
+%patch1801 -p1
 
 # Warn about obsolete functionality usage.
 %patch1900 -p1
@@ -1378,6 +1382,23 @@
 %endif
 
 %changelog
+* Tue Dec 20 2005 Juan Quintela <quintela at trasno.org> - 2.6.%{sublevel}-%(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})_FC5%{rhbsys}
+- xennet is a module again.
+- merge with rawhide 1.7776 kernel.
+- HIGHMEM4G is default now.
+
+* Tue Dec 20 2005 Dave Jones <davej at redhat.com>
+- Try to disable SMBFS again.
+  smbfs got hardly any fixing in the last 12 months, whilst
+  cifs is under constant improvement.  Hopefully things are
+  in better shape than they were last time we tried this
+  back in FC3.
+
+* Mon Dec 19 2005 Dave Jones <davej at redhat.com>
+- 2.6.15-rc6
+- Various ub stability improvements from Pete Zaitcev.
+- Update ACPICA.
+
 * Mon Dec 19 2005 David Woodhouse <dwmw2 at redhat.com>
 - Fix thermal overload on liquid-cooled G5s
 - Fix USB suspend

linux-2.6-ub.patch:
 drivers/block/ub.c                                            |  404 +++++++---
 linux-2.6.14-1.1674_FC5-ub/drivers/block/Kconfig              |    3 
 linux-2.6.14-1.1674_FC5-ub/drivers/block/ub.c                 |   23 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Kconfig        |   14 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Makefile       |    4 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/libusual.c     |  266 ++++++
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/protocol.h     |   14 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/transport.h    |   31 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/unusual_devs.h |   24 
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.c          |  123 ---
 linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.h          |   31 
 linux-2.6.14-1.1674_FC5-ub/include/linux/usb_usual.h          |  123 +++
 linux-2.6.14/drivers/usb/Makefile                             |    1 
 13 files changed, 773 insertions(+), 288 deletions(-)

Index: linux-2.6-ub.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/Attic/linux-2.6-ub.patch,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- linux-2.6-ub.patch	2 Dec 2005 22:11:30 -0000	1.1.2.1
+++ linux-2.6-ub.patch	20 Dec 2005 15:56:37 -0000	1.1.2.2
@@ -900,3 +900,736 @@
  
  obj-$(CONFIG_USB_AIPTEK)	+= input/
  obj-$(CONFIG_USB_ATI_REMOTE)	+= input/
+
+
+
+--- linux-2.6.14-1.1740_FC5/drivers/block/ub.c	2005-12-06 23:47:49.000000000 -0800
++++ linux-2.6.14-1.1740_FC5-rtr3/drivers/block/ub.c	2005-12-17 01:19:43.000000000 -0800
+@@ -9,7 +9,6 @@
+  *
+  * TODO (sorted by decreasing priority)
+  *  -- Kill first_open (Al Viro fixed the block layer now)
+- *  -- Do resets with usb_device_reset (needs a thread context, use khubd)
+  *  -- set readonly flag for CDs, set removable flag for CF readers
+  *  -- do inquiry and verify we got a disk and not a tape (for LUN mismatch)
+  *  -- special case some senses, e.g. 3a/0 -> no media present, reduce retries
+@@ -236,6 +235,13 @@ struct ub_scsi_cmd {
+ 	void *back;
+ };
+ 
++struct ub_request {
++	struct request *rq;
++	unsigned int current_try;
++	unsigned int nsg;		/* sgv[nsg] */
++	struct scatterlist sgv[UB_MAX_REQ_SG];
++};
++
+ /*
+  */
+ struct ub_capacity {
+@@ -331,6 +337,8 @@ struct ub_lun {
+ 	int readonly;
+ 	int first_open;			/* Kludge. See ub_bd_open. */
+ 
++	struct ub_request urq;
++
+ 	/* Use Ingo's mempool if or when we have more than one command. */
+ 	/*
+ 	 * Currently we never need more than one command for the whole device.
+@@ -351,6 +359,7 @@ struct ub_dev {
+ 	atomic_t poison;		/* The USB device is disconnected */
+ 	int openc;			/* protected by ub_lock! */
+ 					/* kref is too implicit for our taste */
++	int reset;			/* Reset is running */
+ 	unsigned int tagcnt;
+ 	char name[12];
+ 	struct usb_device *dev;
+@@ -378,6 +387,9 @@ struct ub_dev {
+ 	struct bulk_cs_wrap work_bcs;
+ 	struct usb_ctrlrequest work_cr;
+ 
++	struct work_struct reset_work;
++	wait_queue_head_t reset_wait;
++
+ 	int sg_stat[6];
+ 	struct ub_scsi_trace tr;
+ };
+@@ -386,12 +398,14 @@ struct ub_dev {
+  */
+ static void ub_cleanup(struct ub_dev *sc);
+ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq);
+-static int ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
+-    struct ub_scsi_cmd *cmd, struct request *rq);
+-static int ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
+-    struct ub_scsi_cmd *cmd, struct request *rq);
++static void ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
++    struct ub_scsi_cmd *cmd, struct ub_request *urq);
++static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
++    struct ub_scsi_cmd *cmd, struct ub_request *urq);
+ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
+ static void ub_end_rq(struct request *rq, int uptodate);
++static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
++    struct ub_request *urq, struct ub_scsi_cmd *cmd);
+ static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
+ static void ub_urb_complete(struct urb *urb, struct pt_regs *pt);
+ static void ub_scsi_action(unsigned long _dev);
+@@ -406,6 +420,8 @@ static void ub_state_sense(struct ub_dev
+ static int ub_submit_clear_stall(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
+     int stalled_pipe);
+ static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd);
++static void ub_reset_enter(struct ub_dev *sc);
++static void ub_reset_task(void *arg);
+ static int ub_sync_tur(struct ub_dev *sc, struct ub_lun *lun);
+ static int ub_sync_read_cap(struct ub_dev *sc, struct ub_lun *lun,
+     struct ub_capacity *ret);
+@@ -518,6 +534,9 @@ static ssize_t ub_diag_show(struct devic
+ 	spin_lock_irqsave(&sc->lock, flags);
+ 
+ 	cnt += sprintf(page + cnt,
++	    "poison %d reset %d\n",
++	    atomic_read(&sc->poison), sc->reset);
++	cnt += sprintf(page + cnt,
+ 	    "qlen %d qmax %d\n",
+ 	    sc->cmd_queue.qlen, sc->cmd_queue.qmax);
+ 	cnt += sprintf(page + cnt,
+@@ -766,7 +785,8 @@ static int ub_request_fn_1(struct ub_lun
+ {
+ 	struct ub_dev *sc = lun->udev;
+ 	struct ub_scsi_cmd *cmd;
+-	int rc;
++	struct ub_request *urq;
++	int n_elem;
+ 
+ 	if (atomic_read(&sc->poison) || lun->changed) {
+ 		blkdev_dequeue_request(rq);
+@@ -774,65 +794,70 @@ static int ub_request_fn_1(struct ub_lun
+ 		return 0;
+ 	}
+ 
++	if (lun->urq.rq != NULL)
++		return -1;
+ 	if ((cmd = ub_get_cmd(lun)) == NULL)
+ 		return -1;
+ 	memset(cmd, 0, sizeof(struct ub_scsi_cmd));
+ 
+ 	blkdev_dequeue_request(rq);
++
++	urq = &lun->urq;
++	memset(urq, 0, sizeof(struct ub_request));
++	urq->rq = rq;
++
++	/*
++	 * get scatterlist from block layer
++	 */
++	n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]);
++	if (n_elem < 0) {
++		printk(KERN_INFO "%s: failed request map (%d)\n",
++		    lun->name, n_elem); /* P3 */
++		goto drop;
++	}
++	if (n_elem > UB_MAX_REQ_SG) {	/* Paranoia */
++		printk(KERN_WARNING "%s: request with %d segments\n",
++		    lun->name, n_elem);
++		goto drop;
++	}
++	urq->nsg = n_elem;
++	sc->sg_stat[n_elem < 5 ? n_elem : 5]++;
++
+ 	if (blk_pc_request(rq)) {
+-		rc = ub_cmd_build_packet(sc, lun, cmd, rq);
++		ub_cmd_build_packet(sc, lun, cmd, urq);
+ 	} else {
+-		rc = ub_cmd_build_block(sc, lun, cmd, rq);
+-	}
+-	if (rc != 0) {
+-		ub_put_cmd(lun, cmd);
+-		ub_end_rq(rq, 0);
+-		return 0;
++		ub_cmd_build_block(sc, lun, cmd, urq);
+ 	}
+ 	cmd->state = UB_CMDST_INIT;
+ 	cmd->lun = lun;
+ 	cmd->done = ub_rw_cmd_done;
+-	cmd->back = rq;
++	cmd->back = urq;
+ 
+ 	cmd->tag = sc->tagcnt++;
+-	if (ub_submit_scsi(sc, cmd) != 0) {
+-		ub_put_cmd(lun, cmd);
+-		ub_end_rq(rq, 0);
+-		return 0;
+-	}
++	if (ub_submit_scsi(sc, cmd) != 0)
++		goto drop;
+ 
+ 	return 0;
++
++drop:
++	ub_put_cmd(lun, cmd);
++	ub_end_rq(rq, 0);
++	return 0;
+ }
+ 
+-static int ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
+-    struct ub_scsi_cmd *cmd, struct request *rq)
++static void ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
++    struct ub_scsi_cmd *cmd, struct ub_request *urq)
+ {
+-	int ub_dir;
+-	int n_elem;
++	struct request *rq = urq->rq;
+ 	unsigned int block, nblks;
+ 
+ 	if (rq_data_dir(rq) == WRITE)
+-		ub_dir = UB_DIR_WRITE;
++		cmd->dir = UB_DIR_WRITE;
+ 	else
+-		ub_dir = UB_DIR_READ;
+-	cmd->dir = ub_dir;
++		cmd->dir = UB_DIR_READ;
+ 
+-	/*
+-	 * get scatterlist from block layer
+-	 */
+-	n_elem = blk_rq_map_sg(lun->disk->queue, rq, &cmd->sgv[0]);
+-	if (n_elem <= 0) {
+-		printk(KERN_INFO "%s: failed request map (%d)\n",
+-		    sc->name, n_elem); /* P3 */
+-		return -1;		/* request with no s/g entries? */
+-	}
+-	if (n_elem > UB_MAX_REQ_SG) {	/* Paranoia */
+-		printk(KERN_WARNING "%s: request with %d segments\n",
+-		    sc->name, n_elem);
+-		return -1;
+-	}
+-	cmd->nsg = n_elem;
+-	sc->sg_stat[n_elem < 5 ? n_elem : 5]++;
++	cmd->nsg = urq->nsg;
++	memcpy(cmd->sgv, urq->sgv, sizeof(struct scatterlist) * cmd->nsg);
+ 
+ 	/*
+ 	 * build the command
+@@ -843,7 +868,7 @@ static int ub_cmd_build_block(struct ub_
+ 	block = rq->sector >> lun->capacity.bshift;
+ 	nblks = rq->nr_sectors >> lun->capacity.bshift;
+ 
+-	cmd->cdb[0] = (ub_dir == UB_DIR_READ)? READ_10: WRITE_10;
++	cmd->cdb[0] = (cmd->dir == UB_DIR_READ)? READ_10: WRITE_10;
+ 	/* 10-byte uses 4 bytes of LBA: 2147483648KB, 2097152MB, 2048GB */
+ 	cmd->cdb[2] = block >> 24;
+ 	cmd->cdb[3] = block >> 16;
+@@ -854,14 +879,12 @@ static int ub_cmd_build_block(struct ub_
+ 	cmd->cdb_len = 10;
+ 
+ 	cmd->len = rq->nr_sectors * 512;
+-
+-	return 0;
+ }
+ 
+-static int ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
+-    struct ub_scsi_cmd *cmd, struct request *rq)
++static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
++    struct ub_scsi_cmd *cmd, struct ub_request *urq)
+ {
+-	int n_elem;
++	struct request *rq = urq->rq;
+ 
+ 	if (rq->data_len == 0) {
+ 		cmd->dir = UB_DIR_NONE;
+@@ -870,40 +893,26 @@ static int ub_cmd_build_packet(struct ub
+ 			cmd->dir = UB_DIR_WRITE;
+ 		else
+ 			cmd->dir = UB_DIR_READ;
+-
+ 	}
+ 
+-	/*
+-	 * get scatterlist from block layer
+-	 */
+-	n_elem = blk_rq_map_sg(lun->disk->queue, rq, &cmd->sgv[0]);
+-	if (n_elem < 0) {
+-		printk(KERN_INFO "%s: failed request map (%d)\n",
+-		    sc->name, n_elem); /* P3 */
+-		return -1;
+-	}
+-	if (n_elem > UB_MAX_REQ_SG) {	/* Paranoia */
+-		printk(KERN_WARNING "%s: request with %d segments\n",
+-		    sc->name, n_elem);
+-		return -1;
+-	}
+-	cmd->nsg = n_elem;
+-	sc->sg_stat[n_elem < 5 ? n_elem : 5]++;
++	cmd->nsg = urq->nsg;
++	memcpy(cmd->sgv, urq->sgv, sizeof(struct scatterlist) * cmd->nsg);
+ 
+ 	memcpy(&cmd->cdb, rq->cmd, rq->cmd_len);
+ 	cmd->cdb_len = rq->cmd_len;
+ 
+ 	cmd->len = rq->data_len;
+-
+-	return 0;
+ }
+ 
+ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
+ {
+-	struct request *rq = cmd->back;
+ 	struct ub_lun *lun = cmd->lun;
++	struct ub_request *urq = cmd->back;
++	struct request *rq;
+ 	int uptodate;
+ 
++	rq = urq->rq;
++
+ 	if (cmd->error == 0) {
+ 		uptodate = 1;
+ 
+@@ -924,9 +933,16 @@ static void ub_rw_cmd_done(struct ub_dev
+ 				rq->errors = SAM_STAT_CHECK_CONDITION;
+ 			else
+ 				rq->errors = DID_ERROR << 16;
++		} else {
++			if (cmd->error == -EIO) {
++				if (ub_rw_cmd_retry(sc, lun, urq, cmd) == 0)
++					return;
++			}
+ 		}
+ 	}
+ 
++	urq->rq = NULL;
++
+ 	ub_put_cmd(lun, cmd);
+ 	ub_end_rq(rq, uptodate);
+ 	blk_start_queue(lun->disk->queue);
+@@ -941,6 +957,41 @@ static void ub_end_rq(struct request *rq
+ 	end_that_request_last(rq);
+ }
+ 
++static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
++    struct ub_request *urq, struct ub_scsi_cmd *cmd)
++{
++
++	if (atomic_read(&sc->poison))
++		return -ENXIO;
++
++	ub_reset_enter(sc);
++
++	if (urq->current_try >= 3)
++		return -EIO;
++	urq->current_try++;
++	/* P3 */ printk("%s: dir %c len/act %d/%d "
++	    "[sense %x %02x %02x] retry %d\n",
++	    sc->name, UB_DIR_CHAR(cmd->dir), cmd->len, cmd->act_len,
++	    cmd->key, cmd->asc, cmd->ascq, urq->current_try);
++
++	memset(cmd, 0, sizeof(struct ub_scsi_cmd));
++	ub_cmd_build_block(sc, lun, cmd, urq);
++
++	cmd->state = UB_CMDST_INIT;
++	cmd->lun = lun;
++	cmd->done = ub_rw_cmd_done;
++	cmd->back = urq;
++
++	cmd->tag = sc->tagcnt++;
++
++#if 0 /* Wasteful */
++	return ub_submit_scsi(sc, cmd);
++#else
++	ub_cmdq_add(sc, cmd);
++	return 0;
++#endif
++}
++
+ /*
+  * Submit a regular SCSI operation (not an auto-sense).
+  *
+@@ -1071,7 +1122,7 @@ static void ub_scsi_dispatch(struct ub_d
+ 	struct ub_scsi_cmd *cmd;
+ 	int rc;
+ 
+-	while ((cmd = ub_cmdq_peek(sc)) != NULL) {
++	while (!sc->reset && (cmd = ub_cmdq_peek(sc)) != NULL) {
+ 		if (cmd->state == UB_CMDST_DONE) {
+ 			ub_cmdq_pop(sc);
+ 			(*cmd->done)(sc, cmd);
+@@ -1094,11 +1145,12 @@ static void ub_scsi_urb_compl(struct ub_
+ {
+ 	struct urb *urb = &sc->work_urb;
+ 	struct bulk_cs_wrap *bcs;
++	int len;
+ 	int rc;
+ 
+ 	if (atomic_read(&sc->poison)) {
+-		/* A little too simplistic, I feel... */
+-		goto Bad_End;
++		ub_state_done(sc, cmd, -ENODEV);
++		return;
+ 	}
+ 
+ 	if (cmd->state == UB_CMDST_CLEAR) {
+@@ -1106,7 +1158,6 @@ static void ub_scsi_urb_compl(struct ub_
+ 			/*
+ 			 * STALL while clearning STALL.
+ 			 * The control pipe clears itself - nothing to do.
+-			 * XXX Might try to reset the device here and retry.
+ 			 */
+ 			printk(KERN_NOTICE "%s: stall on control pipe\n",
+ 			    sc->name);
+@@ -1125,11 +1176,6 @@ static void ub_scsi_urb_compl(struct ub_
+ 
+ 	} else if (cmd->state == UB_CMDST_CLR2STS) {
+ 		if (urb->status == -EPIPE) {
+-			/*
+-			 * STALL while clearning STALL.
+-			 * The control pipe clears itself - nothing to do.
+-			 * XXX Might try to reset the device here and retry.
+-			 */
+ 			printk(KERN_NOTICE "%s: stall on control pipe\n",
+ 			    sc->name);
+ 			goto Bad_End;
+@@ -1147,11 +1193,6 @@ static void ub_scsi_urb_compl(struct ub_
+ 
+ 	} else if (cmd->state == UB_CMDST_CLRRS) {
+ 		if (urb->status == -EPIPE) {
+-			/*
+-			 * STALL while clearning STALL.
+-			 * The control pipe clears itself - nothing to do.
+-			 * XXX Might try to reset the device here and retry.
+-			 */
+ 			printk(KERN_NOTICE "%s: stall on control pipe\n",
+ 			    sc->name);
+ 			goto Bad_End;
+@@ -1168,7 +1209,12 @@ static void ub_scsi_urb_compl(struct ub_
+ 		ub_state_stat_counted(sc, cmd);
+ 
+ 	} else if (cmd->state == UB_CMDST_CMD) {
+-		if (urb->status == -EPIPE) {
++		switch (urb->status) {
++		case 0:
++			break;
++		case -EOVERFLOW:
++			goto Bad_End;
++		case -EPIPE:
+ 			rc = ub_submit_clear_stall(sc, cmd, sc->last_pipe);
+ 			if (rc != 0) {
+ 				printk(KERN_NOTICE "%s: "
+@@ -1178,17 +1224,20 @@ static void ub_scsi_urb_compl(struct ub_
+ 				 * This is typically ENOMEM or some other such shit.
+ 				 * Retrying is pointless. Just do Bad End on it...
+ 				 */
+-				goto Bad_End;
++				ub_state_done(sc, cmd, rc);
++				return;
+ 			}
+ 			cmd->state = UB_CMDST_CLEAR;
+ 			ub_cmdtr_state(sc, cmd);
+ 			return;
+-		}
+-		if (urb->status != 0) {
++		case -ESHUTDOWN:	/* unplug */
++		case -EILSEQ:		/* unplug timeout on uhci */
++			ub_state_done(sc, cmd, -ENODEV);
++			return;
++		default:
+ 			goto Bad_End;
+ 		}
+ 		if (urb->actual_length != US_BULK_CB_WRAP_LEN) {
+-			/* XXX Must do reset here to unconfuse the device */
+ 			goto Bad_End;
+ 		}
+ 
+@@ -1207,11 +1256,8 @@ static void ub_scsi_urb_compl(struct ub_
+ 				printk(KERN_NOTICE "%s: "
+ 				    "unable to submit clear (%d)\n",
+ 				    sc->name, rc);
+-				/*
+-				 * This is typically ENOMEM or some other such shit.
+-				 * Retrying is pointless. Just do Bad End on it...
+-				 */
+-				goto Bad_End;
++				ub_state_done(sc, cmd, rc);
++				return;
+ 			}
+ 			cmd->state = UB_CMDST_CLR2STS;
+ 			ub_cmdtr_state(sc, cmd);
+@@ -1220,14 +1266,50 @@ static void ub_scsi_urb_compl(struct ub_
+ 		if (urb->status == -EOVERFLOW) {
+ 			/*
+ 			 * A babble? Failure, but we must transfer CSW now.
+-			 * XXX This is going to end in perpetual babble. Reset.
+ 			 */
+ 			cmd->error = -EOVERFLOW;	/* A cheap trick... */
+ 			ub_state_stat(sc, cmd);
+ 			return;
+ 		}
+-		if (urb->status != 0)
+-			goto Bad_End;
++
++		if (cmd->dir == UB_DIR_WRITE) {
++			/*
++			 * Do not continue writes in case of a failure.
++			 * Doing so would cause sectors to be mixed up,
++			 * which is worse than sectors lost.
++			 *
++			 * We must try to read the CSW, or many devices
++			 * get confused.
++			 */
++			len = urb->actual_length;
++			if (urb->status != 0 ||
++			    len != cmd->sgv[cmd->current_sg].length) {
++				cmd->act_len += len;
++				ub_cmdtr_act_len(sc, cmd);
++
++				cmd->error = -EIO;
++				ub_state_stat(sc, cmd);
++				return;
++			}
++
++		} else {
++			/*
++			 * If an error occurs on read, we record it, and
++			 * continue to fetch data in order to avoid bubble.
++			 *
++			 * As a small shortcut, we stop if we detect that
++			 * a CSW mixed into data.
++			 */
++			if (urb->status != 0)
++				cmd->error = -EIO;
++
++			len = urb->actual_length;
++			if (urb->status != 0 ||
++			    len != cmd->sgv[cmd->current_sg].length) {
++				if ((len & 0x1FF) == US_BULK_CS_WRAP_LEN)
++					goto Bad_End;
++			}
++		}
+ 
+ 		cmd->act_len += urb->actual_length;
+ 		ub_cmdtr_act_len(sc, cmd);
+@@ -1245,11 +1327,8 @@ static void ub_scsi_urb_compl(struct ub_
+ 				printk(KERN_NOTICE "%s: "
+ 				    "unable to submit clear (%d)\n",
+ 				    sc->name, rc);
+-				/*
+-				 * This is typically ENOMEM or some other such shit.
+-				 * Retrying is pointless. Just do Bad End on it...
+-				 */
+-				goto Bad_End;
++				ub_state_done(sc, cmd, rc);
++				return;
+ 			}
+ 
+ 			/*
+@@ -1262,14 +1341,8 @@ static void ub_scsi_urb_compl(struct ub_
+ 			ub_cmdtr_state(sc, cmd);
+ 			return;
+ 		}
+-		if (urb->status == -EOVERFLOW) {
+-			/*
+-			 * XXX We are screwed here. Retrying is pointless,
+-			 * because the pipelined data will not get in until
+-			 * we read with a big enough buffer. We must reset XXX.
+-			 */
+-			goto Bad_End;
+-		}
++
++		/* Catch everything, including -EOVERFLOW and other nasties. */
+ 		if (urb->status != 0)
+ 			goto Bad_End;
+ 
+@@ -1315,15 +1388,15 @@ static void ub_scsi_urb_compl(struct ub_
+ 			return;
+ 		}
+ 
+-		rc = le32_to_cpu(bcs->Residue);
+-		if (rc != cmd->len - cmd->act_len) {
++		len = le32_to_cpu(bcs->Residue);
++		if (len != cmd->len - cmd->act_len) {
+ 			/*
+ 			 * It is all right to transfer less, the caller has
+ 			 * to check. But it's not all right if the device
+ 			 * counts disagree with our counts.
+ 			 */
+ 			/* P3 */ printk("%s: resid %d len %d act %d\n",
+-			    sc->name, rc, cmd->len, cmd->act_len);
++			    sc->name, len, cmd->len, cmd->act_len);
+ 			goto Bad_End;
+ 		}
+ 
+@@ -1334,13 +1407,13 @@ static void ub_scsi_urb_compl(struct ub_
+ 			ub_state_sense(sc, cmd);
+ 			return;
+ 		case US_BULK_STAT_PHASE:
+-			/* XXX We must reset the transport here */
+ 			/* P3 */ printk("%s: status PHASE\n", sc->name);
+ 			goto Bad_End;
+ 		default:
+ 			printk(KERN_INFO "%s: unknown CSW status 0x%x\n",
+ 			    sc->name, bcs->Status);
+-			goto Bad_End;
++			ub_state_done(sc, cmd, -EINVAL);
++			return;
+ 		}
+ 
+ 		/* Not zeroing error to preserve a babble indicator */
+@@ -1360,7 +1433,8 @@ static void ub_scsi_urb_compl(struct ub_
+ 		printk(KERN_WARNING "%s: "
+ 		    "wrong command state %d\n",
+ 		    sc->name, cmd->state);
+-		goto Bad_End;
++		ub_state_done(sc, cmd, -EINVAL);
++		return;
+ 	}
+ 	return;
+ 
+@@ -1608,6 +1682,93 @@ static void ub_top_sense_done(struct ub_
+ }
+ 
+ /*
++ * Reset management
++ */
++
++static void ub_reset_enter(struct ub_dev *sc)
++{
++
++	if (sc->reset) {
++		/* This happens often on multi-LUN devices. */
++		return;
++	}
++	sc->reset = 1;
++
++#if 0 /* Not needed because the disconnect waits for us. */
++	unsigned long flags;
++	spin_lock_irqsave(&ub_lock, flags);
++	sc->openc++;
++	spin_unlock_irqrestore(&ub_lock, flags);
++#endif
++
++#if 0 /* We let them stop themselves. */
++	struct list_head *p;
++	struct ub_lun *lun;
++	list_for_each(p, &sc->luns) {
++		lun = list_entry(p, struct ub_lun, link);
++		blk_stop_queue(lun->disk->queue);
++	}
++#endif
++
++	schedule_work(&sc->reset_work);
++}
++
++static void ub_reset_task(void *arg)
++{
++	struct ub_dev *sc = arg;
++	unsigned long flags;
++	struct list_head *p;
++	struct ub_lun *lun;
++	int lkr, rc;
++
++	if (!sc->reset) {
++		printk(KERN_WARNING "%s: Running reset unrequested\n",
++		    sc->name);
++		return;
++	}
++
++	if (atomic_read(&sc->poison)) {
++		printk(KERN_NOTICE "%s: Not resetting disconnected device\n",
++		    sc->name); /* P3 This floods. Remove soon. XXX */
++	} else if (sc->dev->actconfig->desc.bNumInterfaces != 1) {
++		printk(KERN_NOTICE "%s: Not resetting multi-interface device\n",
++		    sc->name); /* P3 This floods. Remove soon. XXX */
++	} else {
++		if ((lkr = usb_lock_device_for_reset(sc->dev, sc->intf)) < 0) {
++			printk(KERN_NOTICE
++			    "%s: usb_lock_device_for_reset failed (%d)\n",
++			    sc->name, lkr);
++		} else {
++			rc = usb_reset_device(sc->dev);
++			if (rc < 0) {
++				printk(KERN_NOTICE "%s: "
++				    "usb_lock_device_for_reset failed (%d)\n",
++				    sc->name, rc);
++			}
++
++			if (lkr)
++				usb_unlock_device(sc->dev);
++		}
++	}
++
++	/*
++	 * In theory, no commands can be running while reset is active,
++	 * so nobody can ask for another reset, and so we do not need any
++	 * queues of resets or anything. We do need a spinlock though,
++	 * to interact with block layer.
++	 */
++	spin_lock_irqsave(&sc->lock, flags);
++	sc->reset = 0;
++	tasklet_schedule(&sc->tasklet);
++	list_for_each(p, &sc->luns) {
++		lun = list_entry(p, struct ub_lun, link);
++		blk_start_queue(lun->disk->queue);
++	}
++	wake_up(&sc->reset_wait);
++	spin_unlock_irqrestore(&sc->lock, flags);
++}
++
++/*
+  * This is called from a process context.
+  */
+ static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun)
+@@ -2142,7 +2303,7 @@ static int ub_get_pipes(struct ub_dev *s
+ 	if (ep_in == NULL || ep_out == NULL) {
+ 		printk(KERN_NOTICE "%s: failed endpoint check\n",
+ 		    sc->name);
+-		return -EIO;
++		return -ENODEV;
+ 	}
+ 
+ 	/* Calculate and store the pipe values */
+@@ -2180,6 +2341,8 @@ static int ub_probe(struct usb_interface
+ 	usb_init_urb(&sc->work_urb);
+ 	tasklet_init(&sc->tasklet, ub_scsi_action, (unsigned long)sc);
+ 	atomic_set(&sc->poison, 0);
++	INIT_WORK(&sc->reset_work, ub_reset_task, sc);
++	init_waitqueue_head(&sc->reset_wait);
+ 
+ 	init_timer(&sc->work_timer);
+ 	sc->work_timer.data = (unsigned long) sc;
+@@ -2200,7 +2363,8 @@ static int ub_probe(struct usb_interface
+ 
+ 	/* XXX Verify that we can handle the device (from descriptors) */
+ 
+-	ub_get_pipes(sc, sc->dev, intf);
++	if (ub_get_pipes(sc, sc->dev, intf) != 0)
++		goto err_dev_desc;
+ 
+ 	if (device_create_file(&sc->intf->dev, &dev_attr_diag) != 0)
+ 		goto err_diag;
+@@ -2271,6 +2435,7 @@ static int ub_probe(struct usb_interface
+ 
+ 	/* device_remove_file(&sc->intf->dev, &dev_attr_diag); */
+ err_diag:
++err_dev_desc:
+ 	usb_set_intfdata(intf, NULL);
+ 	// usb_put_intf(sc->intf);
+ 	usb_put_dev(sc->dev);
+@@ -2379,6 +2544,11 @@ static void ub_disconnect(struct usb_int
+ 	atomic_set(&sc->poison, 1);
+ 
+ 	/*
++	 * Wait for reset to end, if any.
++	 */
++	wait_event(sc->reset_wait, !sc->reset);
++
++	/*
+ 	 * Blow away queued commands.
+ 	 *
+ 	 * Actually, this never works, because before we get here
+@@ -2391,7 +2561,7 @@ static void ub_disconnect(struct usb_int
+ 	{
+ 		struct ub_scsi_cmd *cmd;
+ 		int cnt = 0;
+-		while ((cmd = ub_cmdq_pop(sc)) != NULL) {
++		while ((cmd = ub_cmdq_peek(sc)) != NULL) {
+ 			cmd->error = -ENOTCONN;
+ 			cmd->state = UB_CMDST_DONE;
+ 			ub_cmdtr_state(sc, cmd);
+


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/sources,v
retrieving revision 1.3.2.5
retrieving revision 1.3.2.6
diff -u -r1.3.2.5 -r1.3.2.6
--- sources	19 Dec 2005 12:52:57 -0000	1.3.2.5
+++ sources	20 Dec 2005 15:56:37 -0000	1.3.2.6
@@ -1,4 +1,3 @@
 66d02cbd723876c6d69846a067875a22  linux-2.6.14.tar.bz2
 04385c8abed5541c0710b15393b79020  xen-20051206.tar.bz2
-d14ab78f5bd1f920d9088a5e50a78d7d  patch-2.6.15-rc5.bz2
-601926b68e0e73ecb15f4d01e7a5dfab  patch-2.6.15-rc5-git7.bz2
+9c1d46fca842361a84e499e851c7548e  patch-2.6.15-rc6.bz2


Index: upstream
===================================================================
RCS file: /cvs/dist/rpms/kernel-xen/devel/Attic/upstream,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- upstream	19 Dec 2005 12:52:57 -0000	1.1.2.4
+++ upstream	20 Dec 2005 15:56:37 -0000	1.1.2.5
@@ -1,3 +1,3 @@
 linux-2.6.14.tar.bz2
-patch-2.6.15-rc5.bz2
+patch-2.6.15-rc6.bz2
 patch-2.6.15-rc5-git7.bz2


--- patch-2.6.15-rc5.bz2.sign DELETED ---


--- xen-modular-devices.patch DELETED ---




More information about the fedora-cvs-commits mailing list