rpms/kernel/F-7 linux-2.6-libata-correct-iordy-handling.patch, NONE, 1.1 linux-2.6-usb-huawei-fix-init-in-modem-mode.patch, NONE, 1.1 kernel-2.6.spec, 1.3391, 1.3392
Chuck Ebbert (cebbert)
fedora-extras-commits at redhat.com
Thu Nov 29 00:18:09 UTC 2007
- Previous message: rpms/kernel/devel kernel.spec, 1.263, 1.264 linux-2.6-drm-mm.patch, 1.2, 1.3
- Next message: rpms/kernel/F-8 linux-2.6-libata-correct-iordy-handling.patch, NONE, 1.1 linux-2.6-usb-huawei-fix-init-in-modem-mode.patch, NONE, 1.1 kernel.spec, 1.278, 1.279
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8141
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-libata-correct-iordy-handling.patch
linux-2.6-usb-huawei-fix-init-in-modem-mode.patch
Log Message:
* Wed Nov 28 2007 Chuck Ebbert <cebbert at redhat.com>
- Fix further bugs in init of Huawei USB modem
- Fix libata handling of IO ready test
linux-2.6-libata-correct-iordy-handling.patch:
--- NEW FILE linux-2.6-libata-correct-iordy-handling.patch ---
From: Alan Cox <alan at lxorguk.ukuu.org.uk>
Date: Tue, 31 Jul 2007 13:01:48 +0000 (+0100)
Subject: libata: Correct IORDY handling
X-Git-Tag: v2.6.24-rc1~1391^2~103
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=0bc2a79a2002e3cc1b514c100b6c576983da6a90
libata: Correct IORDY handling
Debugging a report of a problem with an ancient solid state disk showed
up some problems in the IORDY handling
1. We check the wrong bit to see if the device has IORDY
2. Even then some ancient creaking piles of crap don't support
SETXFER at all.
The cases it fixes are obscure and the risk of side effects is slight
but possible. This also moves us slightly closer to supporting original
MFM/RLL disks with libata.
Signed-off-by: Alan Cox <alan at redhat.com>
Signed-off-by: Jeff Garzik <jeff at garzik.org>
---
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 8a79b97..02425e4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2759,7 +2759,11 @@ static int ata_dev_set_mode(struct ata_device *dev)
/* Old CFA may refuse this command, which is just fine */
if (dev->xfer_shift == ATA_SHIFT_PIO && ata_id_is_cfa(dev->id))
err_mask &= ~AC_ERR_DEV;
-
+ /* Some very old devices and some bad newer ones fail any kind of
+ SET_XFERMODE request but support PIO0-2 timings and no IORDY */
+ if (dev->xfer_shift == ATA_SHIFT_PIO && !ata_id_has_iordy(dev->id) &&
+ dev->pio_mode <= XFER_PIO_2)
+ err_mask &= ~AC_ERR_DEV;
if (err_mask) {
ata_dev_printk(dev, KERN_ERR, "failed to set xfermode "
"(err_mask=0x%x)\n", err_mask);
diff --git a/include/linux/ata.h b/include/linux/ata.h
index c043c1c..40c7af0 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -358,7 +358,7 @@ struct ata_taskfile {
#define ata_id_removeable(id) ((id)[0] & (1 << 7))
#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
#define ata_id_iordy_disable(id) ((id)[49] & (1 << 10))
-#define ata_id_has_iordy(id) ((id)[49] & (1 << 9))
+#define ata_id_has_iordy(id) ((id)[49] & (1 << 11))
#define ata_id_u32(id,n) \
(((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
#define ata_id_u64(id,n) \
linux-2.6-usb-huawei-fix-init-in-modem-mode.patch:
--- NEW FILE linux-2.6-usb-huawei-fix-init-in-modem-mode.patch ---
bz #253096
diff -urp -X dontdiff linux-2.6.23.1-42.fc8/drivers/usb/serial/option.c linux-2.6.23.1-42.fc8.e220.1/drivers/usb/serial/option.c
--- linux-2.6.23.1-42.fc8/drivers/usb/serial/option.c 2007-10-09 13:31:38.000000000 -0700
+++ linux-2.6.23.1-42.fc8.e220.1/drivers/usb/serial/option.c 2007-11-27 21:36:11.000000000 -0800
@@ -448,7 +448,7 @@ static void option_indat_callback(struct
err = usb_submit_urb(urb, GFP_ATOMIC);
if (err)
printk(KERN_ERR "%s: resubmit read urb failed. "
- "(%d)", __FUNCTION__, err);
+ "(%d)\n", __FUNCTION__, err);
}
}
return;
@@ -728,6 +728,35 @@ static int option_send_setup(struct usb_
return 0;
}
+static void option_start_huawei(struct usb_serial *serial)
+{
+ struct usb_device *dev = serial->dev;
+ char *buf;
+ int rc;
+
+ if (!(le16_to_cpu(dev->descriptor.idVendor) == HUAWEI_VENDOR_ID &&
+ le16_to_cpu(dev->descriptor.idProduct) == HUAWEI_PRODUCT_E220))
+ return;
+
+ if ((buf = kmalloc(1, GFP_KERNEL)) == 0)
+ goto err_buf;
+
+ buf[0] = 0x1;
+ rc = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ USB_REQ_SET_FEATURE, USB_TYPE_STANDARD | USB_RECIP_DEVICE,
+ 0x01, 0x0, buf, 1, 1000);
+ if (rc) {
+ printk(KERN_ERR "%s: HUAWEI E220 setup failed (%d)\n",
+ __FUNCTION__, rc);
+ }
+
+ kfree(buf);
+ return;
+
+err_buf:
+ ;
+}
+
static int option_startup(struct usb_serial *serial)
{
int i, err;
@@ -736,6 +765,8 @@ static int option_startup(struct usb_ser
dbg("%s", __FUNCTION__);
+ option_start_huawei(serial);
+
/* Now setup per port private data */
for (i = 0; i < serial->num_ports; i++) {
port = serial->port[i];
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3391
retrieving revision 1.3392
diff -u -r1.3391 -r1.3392
--- kernel-2.6.spec 28 Nov 2007 00:51:42 -0000 1.3391
+++ kernel-2.6.spec 29 Nov 2007 00:17:36 -0000 1.3392
@@ -595,6 +595,7 @@
Patch664: linux-2.6-libata-dont-fail-revalidation-for-bad-gtf-methods.patch
Patch665: linux-2.6-libata-pata_serverworks-fix-drive-combinations.patch
Patch666: linux-2.6-ppc-pegasos-via-ata-legacy-irq.patch
+Patch667: linux-2.6-libata-correct-iordy-handling.patch
Patch680: linux-2.6-wireless.patch
Patch682: linux-2.6-bcm43xx-pci-neuter.patch
@@ -626,6 +627,7 @@
Patch780: linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
Patch781: linux-2.6-usb-autosuspend-default-disable.patch
Patch782: linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch
+Patch783: linux-2.6-usb-huawei-fix-init-in-modem-mode.patch
Patch800: linux-2.6-wakeups-hdaps.patch
Patch801: linux-2.6-wakeups.patch
@@ -1273,7 +1275,8 @@
ApplyPatch linux-2.6-libata-dont-fail-revalidation-for-bad-gtf-methods.patch
# serverworks is broken with some drive combinations
ApplyPatch linux-2.6-libata-pata_serverworks-fix-drive-combinations.patch
-
+# fix libata IORDY handling
+ApplyPatch linux-2.6-libata-correct-iordy-handling.patch
# post-2.6.23 wireless patches from upstream
ApplyPatch linux-2.6-wireless.patch
# pre-2.6.25 wireless patches from upstream
@@ -1324,6 +1327,7 @@
#
# fix init of huawei device
ApplyPatch linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
+ApplyPatch linux-2.6-usb-huawei-fix-init-in-modem-mode.patch
# ACPI patches
# suspend/resume fixes
@@ -2264,12 +2268,16 @@
%endif
%changelog
+* Wed Nov 28 2007 Chuck Ebbert <cebbert at redhat.com>
+- Fix further bugs in init of Huawei USB modem
+- Fix libata handling of IO ready test
+
* Tue Nov 27 2007 Kyle McMartin <kmcmartin at redhat.com>
- Some USB disks spin themselves down automatically and need
scsi_device.allow_restart enabled so they'll spin back up.
* Tue Nov 27 2007 John W. Linville <linville at redhat.com>
-* Fix NULL ptr reference in iwlwifi (CVE-2007-5938)
+- Fix NULL ptr reference in iwlwifi (CVE-2007-5938)
* Tue Nov 27 2007 Chuck Ebbert <cebbert at redhat.com>
- Fix SPDIF audio on AD1988 codec (#253777)
- Previous message: rpms/kernel/devel kernel.spec, 1.263, 1.264 linux-2.6-drm-mm.patch, 1.2, 1.3
- Next message: rpms/kernel/F-8 linux-2.6-libata-correct-iordy-handling.patch, NONE, 1.1 linux-2.6-usb-huawei-fix-init-in-modem-mode.patch, NONE, 1.1 kernel.spec, 1.278, 1.279
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list