rpms/kernel/F-10 linux-2.6-usb-ehci-fix-sb700-subsystem-hang.patch, NONE, 1.1 linux-2.6-usb-usbmon-fix-read.patch, NONE, 1.1 kernel.spec, 1.1162, 1.1163

Chuck Ebbert cebbert at fedoraproject.org
Tue Nov 25 16:39:02 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17609

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-usb-ehci-fix-sb700-subsystem-hang.patch 
	linux-2.6-usb-usbmon-fix-read.patch 
Log Message:
Two USB patches scheduled for the next -stable release.

linux-2.6-usb-ehci-fix-sb700-subsystem-hang.patch:

--- NEW FILE linux-2.6-usb-ehci-fix-sb700-subsystem-hang.patch ---
From: Andiry Xu <andiry.xu at amd.com>
Date: Fri, 14 Nov 2008 03:42:29 +0000 (+0800)
Subject: USB: fix SB700 usb subsystem hang bug
X-Git-Tag: v2.6.28-rc6~2^2~7
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=b09bc6cbae4dd3a2d35722668ef2c502a7b8b093

USB: fix SB700 usb subsystem hang bug

This patch is required for AMD SB700 south bridge revision A12 and A13 to avoid
USB subsystem hang symptom. The USB subsystem hang symptom is observed when the
system has multiple USB devices connected to it. In some cases a USB hub may be
required to observe this symptom.

This patch works around the problem by correcting the internal register setting
that will help by changing the behavior of the internal logic to avoid the
USB subsystem hang issue. The change in the behavior of the logic does not
impact the normal operation of the USB subsystem.

Reported-by: Volker Armin Hemmann <volker.armin.hemmann at tu-clausthal.de>
Tested-by: Volker Armin Hemmann <volker.armin.hemmann at tu-clausthal.de>
Signed-off-by: Andiry Xu <andiry.xu at amd.com>
Signed-off-by: Libin Yang <libin.yang at amd.com>
Cc: stable <stable at kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---

diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index c46a58f..9d0ea57 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -66,6 +66,8 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
 {
 	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);
 	struct pci_dev		*pdev = to_pci_dev(hcd->self.controller);
+	struct pci_dev		*p_smbus;
+	u8			rev;
 	u32			temp;
 	int			retval;
 
@@ -166,6 +168,25 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
 			pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
 		}
 		break;
+	case PCI_VENDOR_ID_ATI:
+		/* SB700 old version has a bug in EHCI controller,
+		 * which causes usb devices lose response in some cases.
+		 */
+		if (pdev->device == 0x4396) {
+			p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
+						 PCI_DEVICE_ID_ATI_SBX00_SMBUS,
+						 NULL);
+			if (!p_smbus)
+				break;
+			rev = p_smbus->revision;
+			if ((rev == 0x3a) || (rev == 0x3b)) {
+				u8 tmp;
+				pci_read_config_byte(pdev, 0x53, &tmp);
+				pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
+			}
+			pci_dev_put(p_smbus);
+		}
+		break;
 	}
 
 	ehci_reset(ehci);

linux-2.6-usb-usbmon-fix-read.patch:

--- NEW FILE linux-2.6-usb-usbmon-fix-read.patch ---
From: Pete Zaitcev <zaitcev at redhat.com>
Date: Fri, 14 Nov 2008 16:47:41 +0000 (-0700)
Subject: USB: usbmon: fix read(2)
X-Git-Tag: v2.6.28-rc6~2^2~1
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=f1c0a2a3aff53698f4855968d576464041d49b39

USB: usbmon: fix read(2)

There's a bug in the usbmon binary reader: When using read() to fetch
the packets and a packet's data is partially read, the next read call
will once again return up to len_cap bytes of data. The b_read counter
is not regarded when determining the remaining chunk size.

So, when dumping USB data with "cat /dev/usbmon0 > usbmon.trace" while
reading from a USB storage device and analyzing the dump file
afterwards it will get out of sync after a couple of packets.

Signed-off-by: Ingo van Lil <inguin at gmx.de>
Signed-off-by: Pete Zaitcev <zaitcev at redhat.com>
Cc: stable <stable at kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---

diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index c9de3f0..e06810a 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -687,7 +687,10 @@ static ssize_t mon_bin_read(struct file *file, char __user *buf,
 	}
 
 	if (rp->b_read >= sizeof(struct mon_bin_hdr)) {
-		step_len = min(nbytes, (size_t)ep->len_cap);
+		step_len = ep->len_cap;
+		step_len -= rp->b_read - sizeof(struct mon_bin_hdr);
+		if (step_len > nbytes)
+			step_len = nbytes;
 		offset = rp->b_out + PKT_SIZE;
 		offset += rp->b_read - sizeof(struct mon_bin_hdr);
 		if (offset >= rp->b_size)


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1162
retrieving revision 1.1163
diff -u -r1.1162 -r1.1163
--- kernel.spec	25 Nov 2008 16:33:45 -0000	1.1162
+++ kernel.spec	25 Nov 2008 16:38:31 -0000	1.1163
@@ -709,6 +709,10 @@
 
 # make USB EHCI driver respect "nousb" parameter
 Patch2300: linux-2.6-usb-ehci-hcd-respect-nousb.patch
+# fix hang on older sb700
+Patch2301: linux-2.6-usb-ehci-fix-sb700-subsystem-hang.patch
+# fix usbmon reads
+Patch2302: linux-2.6-usb-usbmon-fix-read.patch
 
 # Add fips_enable flag
 Patch2400: linux-2.6-crypto-fips_enable.patch
@@ -1163,6 +1167,9 @@
 
 # USB
 ApplyPatch linux-2.6-usb-ehci-hcd-respect-nousb.patch
+# scheduled for 2.6.27.8
+ApplyPatch linux-2.6-usb-ehci-fix-sb700-subsystem-hang.patch
+ApplyPatch linux-2.6-usb-usbmon-fix-read.patch
 
 # Add the ability to turn FIPS-compliant mode on or off at boot
 ApplyPatch linux-2.6-crypto-fips_enable.patch
@@ -1926,6 +1933,9 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Tue Nov 25 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.7-127
+- Two USB patches scheduled for the next -stable release.
+
 * Tue Nov 25 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.7-126
 - Fix Zepto notebook multimedia keys (F9#460237)
 - Fix Dell XPS 1530 trackpad (F9#448656)




More information about the fedora-extras-commits mailing list