rpms/kernel/F-7 linux-2.6-futex-fix-traversal.patch, NONE, 1.1 linux-2.6-libata-pata-dma-disable-option.patch, NONE, 1.1 linux-2.6-libata-pata_it821x-dma.patch, NONE, 1.1 linux-2.6-libata-pata_via-cable-detect.patch, NONE, 1.1 linux-2.6-lvm-snapshot-deadlock-fix.patch, NONE, 1.1 linux-2.6-scsi-mpt-vmware-fix.patch, NONE, 1.1 linux-2.6-skb_copy_and_csum_datagram_iovec.patch, NONE, 1.1 linux-2.6-usb-allow-1-byte-replies.patch, NONE, 1.1 linux-2.6-usb-fixup-interval-lengths.patch, NONE, 1.1 linux-2.6-usb-linked-list-insertion.patch, NONE, 1.1 linux-2.6-usb-storage-initialize-huawei-e220-properly.patch, NONE, 1.1 patch-2.6.22.6.bz2.sign, NONE, 1.1 .cvsignore, 1.631, 1.632 kernel-2.6.spec, 1.3340, 1.3341 sources, 1.594, 1.595 upstream, 1.518, 1.519 patch-2.6.22.5.bz2.sign, 1.1, NONE patch-2.6.22.6-rc1.patch, 1.1, NONE

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Thu Sep 13 22:22:21 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17087

Modified Files:
	.cvsignore kernel-2.6.spec sources upstream 
Added Files:
	linux-2.6-futex-fix-traversal.patch 
	linux-2.6-libata-pata-dma-disable-option.patch 
	linux-2.6-libata-pata_it821x-dma.patch 
	linux-2.6-libata-pata_via-cable-detect.patch 
	linux-2.6-lvm-snapshot-deadlock-fix.patch 
	linux-2.6-scsi-mpt-vmware-fix.patch 
	linux-2.6-skb_copy_and_csum_datagram_iovec.patch 
	linux-2.6-usb-allow-1-byte-replies.patch 
	linux-2.6-usb-fixup-interval-lengths.patch 
	linux-2.6-usb-linked-list-insertion.patch 
	linux-2.6-usb-storage-initialize-huawei-e220-properly.patch 
	patch-2.6.22.6.bz2.sign 
Removed Files:
	patch-2.6.22.5.bz2.sign patch-2.6.22.6-rc1.patch 
Log Message:
* Wed Sep 12 2007 Chuck Ebbert <cebbert at redhat.com>
- Linux 2.6.22.6 (official)
- libata: add option to disable DMA on PATA devices
- libata: fix DMA on ATAPI devices with it821x (#242229)
- libata: fix cable detection on pata_via
- fix vmware's broken SCSI device emulation (#241935)
- fix init of huawei 220 modem (#253096)
- LVM: fix hang and lockups during snapshot (#269541)
- net: fix oops with zero-length packet (#253290)
- USB: three trivial fixes
- futex: fix compat list traversal


linux-2.6-futex-fix-traversal.patch:

--- NEW FILE linux-2.6-futex-fix-traversal.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=179c85ea53bef807621f335767e41e23f86f01df
Commit:     179c85ea53bef807621f335767e41e23f86f01df
Parent:     a570ab6f10462b062c28188b64377b8034235761
Author:     Arnd Bergmann <arnd at arndb.de>
AuthorDate: Tue Sep 11 15:23:49 2007 -0700
Committer:  Linus Torvalds <torvalds at woody.linux-foundation.org>
CommitDate: Tue Sep 11 17:21:20 2007 -0700

    futex_compat: fix list traversal bugs
    
    The futex list traversal on the compat side appears to have
    a bug.
    
    It's loop termination condition compares:
    
            while (compat_ptr(uentry) != &head->list)
    
    But that can't be right because "uentry" has the special
    "pi" indicator bit still potentially set at bit 0.  This
    is cleared by fetch_robust_entry() into the "entry"
    return value.
    
    What this seems to mean is that the list won't terminate
    when list iteration gets back to the the head.  And we'll
    also process the list head like a normal entry, which could
    cause all kinds of problems.
    
    So we should check for equality with "entry".  That pointer
    is of the non-compat type so we have to do a little casting
    to keep the compiler and sparse happy.
    
    The same problem can in theory occur with the 'pending'
    variable, although that has not been reported from users
    so far.
    
    Based on the original patch from David Miller.
    
    Acked-by: Ingo Molnar <mingo at elte.hu>
    Cc: Thomas Gleixner <tglx at linutronix.de>
    Cc: David Miller <davem at davemloft.net>
    Signed-off-by: Arnd Bergmann <arnd at arndb.de>
    Cc: <stable at kernel.org>
    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 kernel/futex_compat.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c
index f792136..7e52eb0 100644
--- a/kernel/futex_compat.c
+++ b/kernel/futex_compat.c
@@ -61,10 +61,10 @@ void compat_exit_robust_list(struct task_struct *curr)
 	if (fetch_robust_entry(&upending, &pending,
 			       &head->list_op_pending, &pip))
 		return;
-	if (upending)
+	if (pending)
 		handle_futex_death((void __user *)pending + futex_offset, curr, pip);
 
-	while (compat_ptr(uentry) != &head->list) {
+	while (entry != (struct robust_list __user *) &head->list) {
 		/*
 		 * A pending lock might already be on the list, so
 		 * dont process it twice:

linux-2.6-libata-pata-dma-disable-option.patch:

--- NEW FILE linux-2.6-libata-pata-dma-disable-option.patch ---
This is useful when debugging, handling problem systems, or for
distributions just to get the system installed so it can be sorted
out later.

This is a bit smarter than the old IDE one and lets you do

libata.pata_dma=0		Disable all PATA DMA like old IDE
libata.pata_dma=1		Disk DMA only
libata.pata_dma=2		ATAPI DMA only
libata.pata_dma=4		CF DMA only

(or combinations thereof - 0,1,3 being the useful ones I suspect)

(I've split CF as it seems to be a seperate case of pain and suffering
different to the others and caused by assorted PIO wired adapters etc)

SATA is not affected - for one its not clear it makes sense to disable
DMA for SATA if even always possible, for two we've seen no failure 
evidence to justify needing to support this kind of hammer on SATA.

Signed-off-by: Alan Cox <alan at redhat.com>

---
 Documentation/kernel-parameters.txt |    6 ++++++
 drivers/ata/libata-core.c           |   17 +++++++++++++++++
 2 files changed, 23 insertions(+)

--- linux-2.6.22.noarch.orig/drivers/ata/libata-core.c
+++ linux-2.6.22.noarch/drivers/ata/libata-core.c
@@ -93,6 +93,10 @@ static int ata_ignore_hpa = 0;
 module_param_named(ignore_hpa, ata_ignore_hpa, int, 0644);
 MODULE_PARM_DESC(ignore_hpa, "Ignore HPA limit (0=keep BIOS limits, 1=ignore limits, using full disk)");
 
+static int ata_pata_dma = ATA_DMA_MASK_ATA|ATA_DMA_MASK_ATAPI|ATA_DMA_MASK_CFA;
+module_param_named(pata_dma, ata_pata_dma, int, 0644);
+MODULE_PARM_DESC(pata_dma, "Use DMA on PATA devices");
+
 static int ata_probe_timeout = ATA_TMOUT_INTERNAL / HZ;
 module_param(ata_probe_timeout, int, 0444);
 MODULE_PARM_DESC(ata_probe_timeout, "Set ATA probing timeout (seconds)");
@@ -2821,16 +2825,29 @@ int ata_do_set_mode(struct ata_port *ap,
 	/* step 1: calculate xfer_mask */
 	for (i = 0; i < ATA_MAX_DEVICES; i++) {
 		unsigned int pio_mask, dma_mask;
+		unsigned int mode_mask;
 
 		dev = &ap->device[i];
 
 		if (!ata_dev_enabled(dev))
 			continue;
 
+		mode_mask = ATA_DMA_MASK_ATA;
+		if (dev->class == ATA_DEV_ATAPI)
+			mode_mask = ATA_DMA_MASK_ATAPI;
+		else if (ata_id_is_cfa(dev->id))
+			mode_mask = ATA_DMA_MASK_CFA;
+
 		ata_dev_xfermask(dev);
 
 		pio_mask = ata_pack_xfermask(dev->pio_mask, 0, 0);
 		dma_mask = ata_pack_xfermask(0, dev->mwdma_mask, dev->udma_mask);
+
+		if ((ata_pata_dma & mode_mask) || ap->cbl == ATA_CBL_SATA)
+			dma_mask = ata_pack_xfermask(0, dev->mwdma_mask, dev->udma_mask);
+		else
+			dma_mask = 0;
+
 		dev->pio_mode = ata_xfer_mask2mode(pio_mask);
 		dev->dma_mode = ata_xfer_mask2mode(dma_mask);
 
--- linux-2.6.22.noarch.orig/Documentation/kernel-parameters.txt
+++ linux-2.6.22.noarch/Documentation/kernel-parameters.txt
@@ -853,6 +853,12 @@ and is between 256 and 4096 characters. 
 	llsc*=		[IA64] See function print_params() in
 			arch/ia64/sn/kernel/llsc4.c.
 
+	libata.pata_dma= [LIBATA]
+		libata.pata_dma=0	Disable all PATA DMA like old IDE
+		libata.pata_dma=1	Disk DMA only
+		libata.pata_dma=2	ATAPI DMA only
+		libata.pata_dma=4	CF DMA only
+
 	load_ramdisk=	[RAM] List of ramdisks to load from floppy
 			See Documentation/ramdisk.txt.
 

linux-2.6-libata-pata_it821x-dma.patch:

--- NEW FILE linux-2.6-libata-pata_it821x-dma.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bce7d5e0e1fc0c1f1251b7f21a19cb48207408b6
Commit:     bce7d5e0e1fc0c1f1251b7f21a19cb48207408b6
Parent:     08ebd43d6b9b63de681b8f255c0fabae8033527c
Author:     Jeff Norden <jnorden at math.tntech.edu>
AuthorDate: Tue Sep 4 11:07:20 2007 -0500
Committer:  Jeff Garzik <jeff at garzik.org>
CommitDate: Mon Sep 10 21:53:00 2007 -0400

bz 242229

    pata_it821x: fix lost interrupt with atapi devices
    
    Fix "lost" interrupt problem when using dma with CD/DVD drives in some
    configurations.  This problem can make installing linux from media
    impossible for distro's that have switched to libata-only configurations.
    
    The simple fix is to eliminate the use of dma for reading drive status, etc,
    by checking the number of bytes to transferred.
    
    This change will only affect the behavior of atapi devices, not disks.
    There is more info at http://bugzilla.redhat.com/show_bug.cgi?id=242229
    This patch is for 2.6.22.1
    
    Signed-off-by: Jeff Norden <jnorden at math.tntech.edu>
    Reviewed-by: Alan Cox <alan at redhat.com>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>
---
 drivers/ata/pata_it821x.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-2.6.22.noarch.orig/drivers/ata/pata_it821x.c
+++ linux-2.6.22.noarch/drivers/ata/pata_it821x.c
@@ -533,6 +533,10 @@ static int it821x_check_atapi_dma(struct
 	struct ata_port *ap = qc->ap;
 	struct it821x_dev *itdev = ap->private_data;
 
+	/* Only use dma for transfers to/from the media. */
+	if (qc->nbytes < 2048)
+		return -EOPNOTSUPP;
+
 	/* No ATAPI DMA in smart mode */
 	if (itdev->smart)
 		return -EOPNOTSUPP;

linux-2.6-libata-pata_via-cable-detect.patch:

--- NEW FILE linux-2.6-libata-pata_via-cable-detect.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=08ebd43d6b9b63de681b8f255c0fabae8033527c
Commit:     08ebd43d6b9b63de681b8f255c0fabae8033527c
Parent:     897ee77bfba12b83752027427a41009961458ee6
Author:     Laurent Riffard <laurent.riffard at free.fr>
AuthorDate: Sun Sep 2 21:01:32 2007 +0200
Committer:  Jeff Garzik <jeff at garzik.org>
CommitDate: Mon Sep 10 21:50:24 2007 -0400

    Fix broken pata_via cable detection
    
    via_do_set_mode overwrites 80-wire cable detection bits. Let's
    preserve them.
    
    Signed-off-by: Laurent Riffard <laurent.riffard at free.fr>
    Acked-by: Alan Cox <alan at redhat.com>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>
---
 drivers/ata/pata_via.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

--- linux-2.6.22.noarch.orig/drivers/ata/pata_via.c
+++ linux-2.6.22.noarch/drivers/ata/pata_via.c
@@ -240,7 +240,6 @@ static void via_do_set_mode(struct ata_p
 	int ut;
 	int offset = 3 - (2*ap->port_no) - adev->devno;
 
-
 	/* Calculate the timing values we require */
 	ata_timing_compute(adev, mode, &t, T, UT);
 
@@ -287,9 +286,17 @@ static void via_do_set_mode(struct ata_p
 			ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07;
 			break;
 	}
+
 	/* Set UDMA unless device is not UDMA capable */
-	if (udma_type)
-		pci_write_config_byte(pdev, 0x50 + offset, ut);
+	if (udma_type) {
+		u8 cable80_status;
+
+		/* Get 80-wire cable detection bit */
+		pci_read_config_byte(pdev, 0x50 + offset, &cable80_status);
+		cable80_status &= 0x10;
+
+		pci_write_config_byte(pdev, 0x50 + offset, ut | cable80_status);
+	}
 }
 
 static void via_set_piomode(struct ata_port *ap, struct ata_device *adev)

linux-2.6-lvm-snapshot-deadlock-fix.patch:

--- NEW FILE linux-2.6-lvm-snapshot-deadlock-fix.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fcac03abd325e4f7a4cc8fe05fea2793b1c8eb75
Commit:     fcac03abd325e4f7a4cc8fe05fea2793b1c8eb75
Parent:     596f138eede0c113aa655937c8be85fc15ccd61c
Author:     Milan Broz <mbroz at redhat.com>
AuthorDate: Thu Jul 12 17:28:00 2007 +0100
Committer:  Linus Torvalds <torvalds at woody.linux-foundation.org>
CommitDate: Thu Jul 12 15:01:08 2007 -0700

bz 269541

    dm snapshot: fix invalidation deadlock
    
    Process persistent exception store metadata IOs in a separate thread.
    
    A snapshot may become invalid while inside generic_make_request().
    A synchronous write is then needed to update the metadata while still
    inside that function.  Since the introduction of
    md-dm-reduce-stack-usage-with-stacked-block-devices.patch this has to
    be performed by a separate thread to avoid deadlock.
    
    Signed-off-by: Milan Broz <mbroz at redhat.com>
    Signed-off-by: Alasdair G Kergon <agk at redhat.com>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 drivers/md/dm-exception-store.c |   48 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 43 insertions(+), 5 deletions(-)

--- linux-2.6.22.noarch.orig/drivers/md/dm-exception-store.c
+++ linux-2.6.22.noarch/drivers/md/dm-exception-store.c
@@ -125,6 +125,8 @@ struct pstore {
 	uint32_t callback_count;
 	struct commit_callback *callbacks;
 	struct dm_io_client *io_client;
+
+	struct workqueue_struct *metadata_wq;
 };
 
 static inline unsigned int sectors_to_pages(unsigned int sectors)
@@ -156,10 +158,24 @@ static void free_area(struct pstore *ps)
 	ps->area = NULL;
 }
 
+struct mdata_req {
+	struct io_region *where;
+	struct dm_io_request *io_req;
+	struct work_struct work;
+	int result;
+};
+
+static void do_metadata(struct work_struct *work)
+{
+	struct mdata_req *req = container_of(work, struct mdata_req, work);
+
+	req->result = dm_io(req->io_req, 1, req->where, NULL);
+}
+
 /*
  * Read or write a chunk aligned and sized block of data from a device.
  */
-static int chunk_io(struct pstore *ps, uint32_t chunk, int rw)
+static int chunk_io(struct pstore *ps, uint32_t chunk, int rw, int metadata)
 {
 	struct io_region where = {
 		.bdev = ps->snap->cow->bdev,
@@ -173,8 +189,23 @@ static int chunk_io(struct pstore *ps, u
 		.client = ps->io_client,
 		.notify.fn = NULL,
 	};
+	struct mdata_req req;
+
+	if (!metadata)
+		return dm_io(&io_req, 1, &where, NULL);
 
-	return dm_io(&io_req, 1, &where, NULL);
+	req.where = &where;
+	req.io_req = &io_req;
+
+	/*
+	 * Issue the synchronous I/O from a different thread
+	 * to avoid generic_make_request recursion.
+	 */
+	INIT_WORK(&req.work, do_metadata);
+	queue_work(ps->metadata_wq, &req.work);
+	flush_workqueue(ps->metadata_wq);
+
+	return req.result;
 }
 
 /*
@@ -189,7 +220,7 @@ static int area_io(struct pstore *ps, ui
 	/* convert a metadata area index to a chunk index */
 	chunk = 1 + ((ps->exceptions_per_area + 1) * area);
 
-	r = chunk_io(ps, chunk, rw);
+	r = chunk_io(ps, chunk, rw, 0);
 	if (r)
 		return r;
 
@@ -230,7 +261,7 @@ static int read_header(struct pstore *ps
 	if (r)
 		return r;
 
-	r = chunk_io(ps, 0, READ);
+	r = chunk_io(ps, 0, READ, 1);
 	if (r)
 		goto bad;
 
@@ -292,7 +323,7 @@ static int write_header(struct pstore *p
 	dh->version = cpu_to_le32(ps->version);
 	dh->chunk_size = cpu_to_le32(ps->snap->chunk_size);
 
-	return chunk_io(ps, 0, WRITE);
+	return chunk_io(ps, 0, WRITE, 1);
 }
 
 /*
@@ -409,6 +440,7 @@ static void persistent_destroy(struct ex
 {
 	struct pstore *ps = get_info(store);
 
+	destroy_workqueue(ps->metadata_wq);
 	dm_io_client_destroy(ps->io_client);
 	vfree(ps->callbacks);
 	free_area(ps);
@@ -589,6 +621,12 @@ int dm_create_persistent(struct exceptio
 	atomic_set(&ps->pending_count, 0);
 	ps->callbacks = NULL;
 
+	ps->metadata_wq = create_singlethread_workqueue("ksnaphd");
+	if (!ps->metadata_wq) {
+		DMERR("couldn't start header metadata update thread");
+		return -ENOMEM;
+	}
+
 	store->destroy = persistent_destroy;
 	store->read_metadata = persistent_read_metadata;
 	store->prepare_exception = persistent_prepare;

linux-2.6-scsi-mpt-vmware-fix.patch:

--- NEW FILE linux-2.6-scsi-mpt-vmware-fix.patch ---
The attached patch is a workaround for a bug in VMWare's emulated LSI
Fusion SCSI HBA.  The emulated firmware returns zero for the maximum
number of attached devices; the real firmware returns a positive
number.  Therefore, the kernel that boots and works fine on bare metal
will fail on VMWare because this firmware value is handed to the SCSI
midlayer, which then skips the entire bus scan.

F7 bz 241935

The patch below was submitted by Eric Moore of LSI to the linux-scsi
mailing list:

http://marc.info/?l=linux-scsi&m=117432237404247

then immediately rejected by Christoph Hellwig, who prefers that
VMWare fix their emulation instead.

---
 drivers/message/fusion/mptbase.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

--- linux-2.6.22.noarch.orig/drivers/message/fusion/mptbase.c
+++ linux-2.6.22.noarch/drivers/message/fusion/mptbase.c
@@ -2573,8 +2573,19 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
 	pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs);
 	pfacts->MaxLanBuckets = le16_to_cpu(pfacts->MaxLanBuckets);
 
-	max_id = (ioc->bus_type == SAS) ? pfacts->PortSCSIID :
-	    pfacts->MaxDevices;
+	switch (ioc->bus_type) {
+	case SAS:
+		max_id = pfacts->PortSCSIID;
+		break;
+	case FC:
+		max_id = pfacts->MaxDevices;
+		break;
+	case SPI:
+	default:
+		max_id = MPT_MAX_SCSI_DEVICES;
+		break;
+	}
+
 	ioc->devices_per_bus = (max_id > 255) ? 256 : max_id;
 	ioc->number_of_buses = (ioc->devices_per_bus < 256) ? 1 : max_id/256;
 

linux-2.6-skb_copy_and_csum_datagram_iovec.patch:

--- NEW FILE linux-2.6-skb_copy_and_csum_datagram_iovec.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ef8aef55ce61fd0e2af798695f7386ac756ae1e7
Commit:     ef8aef55ce61fd0e2af798695f7386ac756ae1e7
Parent:     2fbe43f6f631dd7ce19fb1499d6164a5bdb34568
Author:     Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Thu Sep 6 14:06:35 2007 +0100
Committer:  David S. Miller <davem at kimchee.(none)>
CommitDate: Tue Sep 11 10:29:07 2007 +0200

    [NET]: Do not dereference iov if length is zero
    
    When msg_iovlen is zero we shouldn't try to dereference
    msg_iov.  Right now the only thing that tries to do so
    is skb_copy_and_csum_datagram_iovec.  Since the total
    length should also be zero if msg_iovlen is zero, it's
    sufficient to check the total length there and simply
    return if it's zero.
    
    Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
    Signed-off-by: David S. Miller <davem at davemloft.net>
---
 net/core/datagram.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/core/datagram.c b/net/core/datagram.c
index cb056f4..029b93e 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -450,6 +450,9 @@ int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
 	__wsum csum;
 	int chunk = skb->len - hlen;
 
+	if (!chunk)
+		return 0;
+
 	/* Skip filled elements.
 	 * Pretty silly, look at memcpy_toiovec, though 8)
 	 */

linux-2.6-usb-allow-1-byte-replies.patch:

--- NEW FILE linux-2.6-usb-allow-1-byte-replies.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=46dede4690bbb23a2c9d60561e2e4fdc3e6bee61
Commit:     46dede4690bbb23a2c9d60561e2e4fdc3e6bee61
Parent:     f095137e799ddb6a7c2bf0e4c73cda193ab9df41
Author:     Alan Stern <stern at rowland.harvard.edu>
AuthorDate: Tue Aug 14 10:56:10 2007 -0400
Committer:  Greg Kroah-Hartman <gregkh at suse.de>
CommitDate: Wed Aug 22 14:27:49 2007 -0700

    USB: accept 1-byte Device Status replies, fixing some b0rken devices
    
    Some devices have a bug which causes them to send a 1-byte reply to
    Get-Device-Status requests instead of 2 bytes as required by the
    spec.  This doesn't play well with autosuspend, since we look for a
    valid status reply to make sure the device is still present when it
    resumes.  Without both bytes, we assume the device has been
    disconnected.
    
    Lack of the second byte shouldn't matter much, since the spec requires
    it always to be equal to 0.  Hence this patch (as959) causes
    finish_port_resume() to accept a 1-byte reply as valid.
    
    Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
    Acked-by: David Brownell <david-b at pacbell.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>

    [<cebbert at redhat.com>: reworked for 2.6.22]
    [<cebbert at redhat.com>: made test more careful]
---
 drivers/usb/core/hub.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.22.noarch.orig/drivers/usb/core/hub.c
+++ linux-2.6.22.noarch/drivers/usb/core/hub.c
@@ -1719,7 +1719,7 @@ int usb_port_suspend(struct usb_device *
 static int finish_port_resume(struct usb_device *udev)
 {
 	int	status;
-	u16	devstatus;
+	u16	devstatus = 0;
 
 	/* caller owns the udev device lock */
 	dev_dbg(&udev->dev, "finish resume\n");
@@ -1739,7 +1739,7 @@ static int finish_port_resume(struct usb
 	 */
 	status = usb_get_status(udev, USB_RECIP_DEVICE, 0, &devstatus);
 	if (status >= 0)
-		status = (status == 2 ? 0 : -ENODEV);
+		status = (status == 2 || status == 1) ? 0 : -ENODEV;
 
 	if (status)
 		dev_dbg(&udev->dev,

linux-2.6-usb-fixup-interval-lengths.patch:

--- NEW FILE linux-2.6-usb-fixup-interval-lengths.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=300871cd963e24a68aaa9b762f4a10403697d9be
Commit:     300871cd963e24a68aaa9b762f4a10403697d9be
Parent:     87d093e25d73249ae92b28ae88db92eaea7df70f
Author:     Laurent Pinchart <laurent.pinchart at skynet.be>
AuthorDate: Tue Jun 12 21:47:17 2007 +0200
Committer:  Greg Kroah-Hartman <gregkh at suse.de>
CommitDate: Thu Jul 12 16:34:37 2007 -0700

    USB: Fix up full-speed bInterval values in high-speed interrupt descriptor
    
    Many device manufacturers are using full-speed bInterval values in high-speed
    interrupt endpoint descriptors. If the bInterval value is greater than 16,
    assume the device uses full-speed descriptors and fix the value accordingly.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart at skynet.be>
    Acked-by: Alan Stern <stern at rowland.harvard.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
 drivers/usb/core/config.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 9152e12..5e113db 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -85,15 +85,21 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
 	memcpy(&endpoint->desc, d, n);
 	INIT_LIST_HEAD(&endpoint->urb_list);
 
-	/* If the bInterval value is outside the legal range,
-	 * set it to a default value: 32 ms */
+	/* Fix up bInterval values outside the legal range. Use 32 ms if no
+	 * proper value can be guessed. */
 	i = 0;		/* i = min, j = max, n = default */
 	j = 255;
 	if (usb_endpoint_xfer_int(d)) {
 		i = 1;
 		switch (to_usb_device(ddev)->speed) {
 		case USB_SPEED_HIGH:
-			n = 9;		/* 32 ms = 2^(9-1) uframes */
+			/* Many device manufacturers are using full-speed
+			 * bInterval values in high-speed interrupt endpoint
+			 * descriptors. Try to fix those and fall back to a
+			 * 32 ms default value otherwise. */
+			n = fls(d->bInterval*8);
+			if (n == 0)
+				n = 9;	/* 32 ms = 2^(9-1) uframes */
 			j = 16;
 			break;
 		default:		/* USB_SPEED_FULL or _LOW */

linux-2.6-usb-linked-list-insertion.patch:

--- NEW FILE linux-2.6-usb-linked-list-insertion.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e5dd01154c1e9ca2400f4682602d1a4fa54c25dd
Commit:     e5dd01154c1e9ca2400f4682602d1a4fa54c25dd
Parent:     ce05916f6bf9906fba88853078715f9a4d300237
Author:     Nathael Pajani <nathael.pajani at cpe.fr>
AuthorDate: Tue Sep 4 11:46:23 2007 +0200
Committer:  Greg Kroah-Hartman <gregkh at suse.de>
CommitDate: Tue Sep 11 07:48:15 2007 -0700

    USB: fix linked list insertion bugfix for usb core
    
    This patch fixes the order of list_add_tail() arguments in
    usb_store_new_id() so the list can have more than one single element.
    
    Signed-off-by: Nathael Pajani <nathael.pajani at cpe.fr>
    Cc: stable <stable at kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
 drivers/usb/core/driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index a1ad11d..63b1243 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -60,7 +60,7 @@ ssize_t usb_store_new_id(struct usb_dynids *dynids,
 	dynid->id.match_flags = USB_DEVICE_ID_MATCH_DEVICE;
 
 	spin_lock(&dynids->lock);
-	list_add_tail(&dynids->list, &dynid->node);
+	list_add_tail(&dynid->node, &dynids->list);
 	spin_unlock(&dynids->lock);
 
 	if (get_driver(driver)) {

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",


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

iD8DBQBG17R8yGugalF9Dw4RAnFOAJ9oLLhlBcFaSr/lBib0QoQJ+2mhlwCeLrUk
j84LtxB51tt2Mxnvkl8kzUU=
=/XAz
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/.cvsignore,v
retrieving revision 1.631
retrieving revision 1.632
diff -u -r1.631 -r1.632
--- .cvsignore	23 Aug 2007 18:20:55 -0000	1.631
+++ .cvsignore	13 Sep 2007 22:21:49 -0000	1.632
@@ -3,4 +3,4 @@
 temp-*
 kernel-2.6.22
 linux-2.6.22.tar.bz2
-patch-2.6.22.5.bz2
+patch-2.6.22.6.bz2


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3340
retrieving revision 1.3341
diff -u -r1.3340 -r1.3341
--- kernel-2.6.spec	12 Sep 2007 22:35:48 -0000	1.3340
+++ kernel-2.6.spec	13 Sep 2007 22:21:49 -0000	1.3341
@@ -30,7 +30,7 @@
 ## If this is a released kernel ##
 %if 0%{?released_kernel}
 # Do we have a 2.6.x.y update to apply?
-%define stable_update 5
+%define stable_update 6
 # Set rpm version accordingly
 %if 0%{?stable_update}
 %define stablerev .%{stable_update}
@@ -498,7 +498,8 @@
 
 %if !%{nopatches}
 
-Patch02: patch-2.6.22.6-rc1.patch
+# -stable RC
+# Patch02: patch-2.6.22.6-rc1.patch
 
 # Revert -stable pieces we get from elsewhere
 Patch05: linux-2.6-softmac-fix-essid-problem_R.patch
@@ -564,14 +565,20 @@
 Patch350: linux-2.6-devmem.patch
 Patch370: linux-2.6-crash-driver.patch
 Patch390: linux-2.6-dev-get-driver-properly.patch
+
 Patch400: linux-2.6-scsi-cpqarray-set-master.patch
 Patch401: linux-2.6-aacraid-ioctl-security.patch
 Patch402: linux-2.6-scsi-async-scanning.patch
 Patch403: linux-2.6-scsi-3w_9xxx-fix-dma-mask.patch
+Patch404: linux-2.6-scsi-mpt-vmware-fix.patch
+
 Patch420: linux-2.6-squashfs.patch
 Patch422: linux-2.6-gfs2-update.patch
 Patch423: linux-2.6-gfs-locking-exports.patch
+
 Patch430: linux-2.6-net-silence-noisy-printks.patch
+Patch435: linux-2.6-skb_copy_and_csum_datagram_iovec.patch
+
 Patch440: linux-2.6-sha_alignment.patch
 Patch450: linux-2.6-input-kill-stupid-messages.patch
 Patch460: linux-2.6-serial-460800.patch
@@ -586,14 +593,21 @@
 Patch610: linux-2.6-defaults-fat-utf8.patch
 Patch620: linux-2.6-defaults-unicode-vt.patch
 Patch630: linux-2.6-defaults-nonmi.patch
+
+Patch650: linux-2.6-lvm-snapshot-deadlock-fix.patch
+
 Patch660: linux-2.6-libata-ali-atapi-dma.patch
 Patch662: linux-2.6-ata-update-noncq.patch
 Patch663: linux-2.6-ata-quirk.patch
 Patch667: linux-2.6-libata-ata_piix_fix_pio-mwdma-programming.patch
 Patch670: linux-2.6-libata-pata_hpt37x-fix-2.6.22-clock-pll.patch
 Patch671: linux-2.6-libata-pata_ali-fix-hp-detect.patch
-Patch673: linux-2.6-libata-simplify-init.patch
-Patch674: linux-2.6-ppc-pegasos-via-ata-legacy-irq.patch
+Patch672: linux-2.6-libata-pata-dma-disable-option.patch
+Patch673: linux-2.6-libata-pata_it821x-dma.patch
+Patch674: linux-2.6-libata-pata_via-cable-detect.patch
+Patch675: linux-2.6-libata-simplify-init.patch
+Patch676: linux-2.6-ppc-pegasos-via-ata-legacy-irq.patch
+
 Patch680: linux-2.6-rtl8187.patch
 Patch681: linux-2.6-wireless.patch
 Patch682: linux-2.6-wireless-pending.patch
@@ -614,7 +628,13 @@
 Patch742: linux-2.6-sdhci-clear-error-interrupt.patch
 Patch760: linux-2.6-v4l-dvb-fix-airstar-hd5000-tuner.patch
 Patch770: linux-2.6-irda-smc-remove-quirk.patch
-#Patch780: linux-2.6-clockevents-fix-resume-logic.patch
+Patch771: linux-2.6-futex-fix-traversal.patch
+
+Patch780: linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
+Patch781: linux-2.6-usb-allow-1-byte-replies.patch
+Patch782: linux-2.6-usb-fixup-interval-lengths.patch
+Patch783: linux-2.6-usb-linked-list-insertion.patch
+
 Patch800: linux-2.6-wakeups-hdaps.patch
 Patch801: linux-2.6-wakeups.patch
 Patch900: linux-2.6-sched-cfs-v2.6.22.5-v20.5.patch
@@ -1079,8 +1099,8 @@
 # builds (as used in the buildsystem).
 ApplyPatch linux-2.6-build-nonintconfig.patch
 
-# stable RC patch
-ApplyPatch patch-2.6.22.6-rc1.patch
+# -stable RC
+# ApplyPatch patch-2.6.22.6-rc1.patch
 
 %if !%{nopatches}
 
@@ -1237,6 +1257,8 @@
 ApplyPatch linux-2.6-scsi-async-scanning.patch
 # fix 3ware 9000 DMA fallback
 ApplyPatch linux-2.6-scsi-3w_9xxx-fix-dma-mask.patch
+# fix vmware's broken emulation of SCSI controller
+ApplyPatch linux-2.6-scsi-mpt-vmware-fix.patch
 
 # Filesystem patches.
 # Squashfs
@@ -1249,6 +1271,8 @@
 # Networking
 # Disable easy to trigger printk's.
 ApplyPatch linux-2.6-net-silence-noisy-printks.patch
+# fix oops when skb has zero length
+ApplyPatch linux-2.6-skb_copy_and_csum_datagram_iovec.patch
 
 # Misc fixes
 # Fix SHA1 alignment problem on ia64
@@ -1286,6 +1310,9 @@
 # Disable NMI watchdog by default.
 ApplyPatch linux-2.6-defaults-nonmi.patch
 
+# fix LVM deadlock
+ApplyPatch linux-2.6-lvm-snapshot-deadlock-fix.patch
+
 # Disable ATAPI DMA on ALI chipsets.
 ApplyPatch linux-2.6-libata-ali-atapi-dma.patch
 # libata: don't initialize sg in ata_exec_internal() if DMA_NONE
@@ -1299,6 +1326,12 @@
 ApplyPatch linux-2.6-libata-pata_hpt37x-fix-2.6.22-clock-pll.patch
 # fix wrong DMI detect logic for HP notebook
 ApplyPatch linux-2.6-libata-pata_ali-fix-hp-detect.patch
+# add libata.pata_dma kernel option
+ApplyPatch linux-2.6-libata-pata-dma-disable-option.patch
+# fix DMA on ATAPI devices with it821x
+ApplyPatch linux-2.6-libata-pata_it821x-dma.patch
+# fix cable detection on pata_via
+ApplyPatch linux-2.6-libata-pata_via-cable-detect.patch
 # fix Pegasos libata glitches
 ApplyPatch linux-2.6-libata-simplify-init.patch
 ApplyPatch linux-2.6-ppc-pegasos-via-ata-legacy-irq.patch
@@ -1351,9 +1384,18 @@
 ApplyPatch linux-2.6-v4l-dvb-fix-airstar-hd5000-tuner.patch
 # irda: remove smc quirk that breaks hp 6000 notebooks
 ApplyPatch linux-2.6-irda-smc-remove-quirk.patch
+# futex: fix compat list traveral
+ApplyPatch linux-2.6-futex-fix-traversal.patch
 
 # USB
 #
+# fix init of huawei device
+ApplyPatch linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
+# trivial USB fixes
+ApplyPatch linux-2.6-usb-allow-1-byte-replies.patch
+ApplyPatch linux-2.6-usb-fixup-interval-lengths.patch
+ApplyPatch linux-2.6-usb-linked-list-insertion.patch
+
 
 # ACPI patches
 
@@ -2310,6 +2352,18 @@
 
 %changelog
 * Wed Sep 12 2007 Chuck Ebbert <cebbert at redhat.com>
+- Linux 2.6.22.6 (official)
+- libata: add option to disable DMA on PATA devices
+- libata: fix DMA on ATAPI devices with it821x (#242229)
+- libata: fix cable detection on pata_via
+- fix vmware's broken SCSI device emulation (#241935)
+- fix init of huawei 220 modem (#253096)
+- LVM: fix hang and lockups during snapshot (#269541)
+- net: fix oops with zero-length packet (#253290)
+- USB: three trivial fixes
+- futex: fix compat list traversal
+
+* Wed Sep 12 2007 Chuck Ebbert <cebbert at redhat.com>
 - update CFS scheduler
 
 * Tue Sep 11 2007 Roland McGrath <roland at redhat.com>


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/sources,v
retrieving revision 1.594
retrieving revision 1.595
diff -u -r1.594 -r1.595
--- sources	23 Aug 2007 18:20:55 -0000	1.594
+++ sources	13 Sep 2007 22:21:49 -0000	1.595
@@ -1,2 +1,2 @@
 2e230d005c002fb3d38a3ca07c0200d0  linux-2.6.22.tar.bz2
-27544a58763bbd4ce497a77658af744a  patch-2.6.22.5.bz2
+f2948e364ab3e4736b9e34f02173472f  patch-2.6.22.6.bz2


Index: upstream
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/upstream,v
retrieving revision 1.518
retrieving revision 1.519
diff -u -r1.518 -r1.519
--- upstream	23 Aug 2007 18:20:55 -0000	1.518
+++ upstream	13 Sep 2007 22:21:49 -0000	1.519
@@ -1,2 +1,2 @@
 linux-2.6.22.tar.bz2
-patch-2.6.22.5.bz2
+patch-2.6.22.6.bz2


--- patch-2.6.22.5.bz2.sign DELETED ---


--- patch-2.6.22.6-rc1.patch DELETED ---




More information about the fedora-extras-commits mailing list