From: Chris Wright Date: Tue, 25 Mar 2008 18:46:46 +0000 (-0700) Subject: add usb and uio patches to 2.6.24 queue X-Git-Tag: v2.6.24.5~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44571db9d66a601f36f3585b1b47fb2d6031834d;p=thirdparty%2Fkernel%2Fstable-queue.git add usb and uio patches to 2.6.24 queue --- diff --git a/queue-2.6.24/series b/queue-2.6.24/series index bb0e0b2dd3f..6ec465708ee 100644 --- a/queue-2.6.24/series +++ b/queue-2.6.24/series @@ -3,3 +3,6 @@ kbuild-soften-modpost-checks-when-doing-cross-builds.patch mtd-memory-corruption-in-block2mtd.c.patch md-remove-the-super-sysfs-attribute-from-devices-in-an-md-array.patch v4l-ivtv-add-missing-sg_init_table.patch +uio-add-pgprot_noncached-to-uio-mmap-code.patch +usb-add-support-for-motorola-rokr-z6-cellphone-in-mass-storage-mode.patch +usb-new-quirk-flag-to-avoid-set-interface.patch diff --git a/queue-2.6.24/uio-add-pgprot_noncached-to-uio-mmap-code.patch b/queue-2.6.24/uio-add-pgprot_noncached-to-uio-mmap-code.patch new file mode 100644 index 00000000000..0bd0c6ebb63 --- /dev/null +++ b/queue-2.6.24/uio-add-pgprot_noncached-to-uio-mmap-code.patch @@ -0,0 +1,34 @@ +From stable-bounces@linux.kernel.org Tue Mar 25 10:38:23 2008 +Date: Tue, 25 Mar 2008 06:35:08 GMT +Message-Id: <200803250635.m2P6Z8VH015595@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: UIO: add pgprot_noncached() to UIO mmap code + +From: Jean-Samuel Chenard + +upstream commit: c9698d6b1a90929e427a165bd8283f803f57d9bd + +Mapping of physical memory in UIO needs pgprot_noncached() to ensure +that IO memory is not cached. Without pgprot_noncached(), it (accidentally) +works on x86 and arm, but fails on PPC. + +Signed-off-by: Jean-Samuel Chenard +Signed-off-by: Hans J Koch +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Chris Wright +--- + drivers/uio/uio.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/uio/uio.c ++++ b/drivers/uio/uio.c +@@ -447,6 +447,8 @@ static int uio_mmap_physical(struct vm_a + + vma->vm_flags |= VM_IO | VM_RESERVED; + ++ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); ++ + return remap_pfn_range(vma, + vma->vm_start, + idev->info->mem[mi].addr >> PAGE_SHIFT, diff --git a/queue-2.6.24/usb-add-support-for-motorola-rokr-z6-cellphone-in-mass-storage-mode.patch b/queue-2.6.24/usb-add-support-for-motorola-rokr-z6-cellphone-in-mass-storage-mode.patch new file mode 100644 index 00000000000..de69274f5d8 --- /dev/null +++ b/queue-2.6.24/usb-add-support-for-motorola-rokr-z6-cellphone-in-mass-storage-mode.patch @@ -0,0 +1,73 @@ +From stable-bounces@linux.kernel.org Tue Mar 25 10:39:20 2008 +Date: Tue, 25 Mar 2008 06:35:11 GMT +Message-Id: <200803250635.m2P6ZBg2015617@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: USB: add support for Motorola ROKR Z6 cellphone in mass storage mode + +From: Constantin Baranov + +upstream commit: cc36bdd47ae51b66780b317c1fa519221f894405 + +Motorola ROKR Z6 cellphone has bugs in its USB, so it is impossible to use +it as mass storage. Patch describes new "unusual" USB device for it with +FIX_INQUIRY and FIX_CAPACITY flags and new BULK_IGNORE_TAG flag. +Last flag relaxes check for equality of bcs->Tag and us->tag in +usb_stor_Bulk_transport routine. + +Signed-off-by: Constantin Baranov +Signed-off-by: Matthew Dharm +Signed-off-by: Daniel Drake +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Chris Wright +--- + drivers/usb/storage/transport.c | 3 ++- + drivers/usb/storage/unusual_devs.h | 11 +++++++++++ + include/linux/usb_usual.h | 4 +++- + 3 files changed, 16 insertions(+), 2 deletions(-) + +--- a/drivers/usb/storage/transport.c ++++ b/drivers/usb/storage/transport.c +@@ -1010,7 +1010,8 @@ int usb_stor_Bulk_transport(struct scsi_ + US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n", + le32_to_cpu(bcs->Signature), bcs->Tag, + residue, bcs->Status); +- if (bcs->Tag != us->tag || bcs->Status > US_BULK_STAT_PHASE) { ++ if (!(bcs->Tag == us->tag || (us->flags & US_FL_BULK_IGNORE_TAG)) || ++ bcs->Status > US_BULK_STAT_PHASE) { + US_DEBUGP("Bulk logical error\n"); + return USB_STOR_TRANSPORT_ERROR; + } +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -1557,6 +1557,17 @@ UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY), + ++/* ++ * Patch by Constantin Baranov ++ * Report by Andreas Koenecke. ++ * Motorola ROKR Z6. ++ */ ++UNUSUAL_DEV( 0x22b8, 0x6426, 0x0101, 0x0101, ++ "Motorola", ++ "MSnc.", ++ US_SC_DEVICE, US_PR_DEVICE, NULL, ++ US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY | US_FL_BULK_IGNORE_TAG), ++ + /* Reported by Radovan Garabik */ + UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, + "MPIO", +--- a/include/linux/usb_usual.h ++++ b/include/linux/usb_usual.h +@@ -50,7 +50,9 @@ + US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ + /* sometimes sizes is too big */ \ + US_FLAG(MAX_SECTORS_MIN,0x00002000) \ +- /* Sets max_sectors to arch min */ ++ /* Sets max_sectors to arch min */ \ ++ US_FLAG(BULK_IGNORE_TAG,0x00004000) \ ++ /* Ignore tag mismatch in bulk operations */ + + + #define US_FLAG(name, value) US_FL_##name = value , diff --git a/queue-2.6.24/usb-new-quirk-flag-to-avoid-set-interface.patch b/queue-2.6.24/usb-new-quirk-flag-to-avoid-set-interface.patch new file mode 100644 index 00000000000..597166256d7 --- /dev/null +++ b/queue-2.6.24/usb-new-quirk-flag-to-avoid-set-interface.patch @@ -0,0 +1,61 @@ +From stable-bounces@linux.kernel.org Tue Mar 25 10:40:05 2008 +Date: Tue, 25 Mar 2008 06:35:12 GMT +Message-Id: <200803250635.m2P6ZCr0015676@hera.kernel.org> +From: jejb@kernel.org +To: jejb@kernel.org, stable@kernel.org +Subject: USB: new quirk flag to avoid Set-Interface + +From: Alan Stern + +upstream commit: 392e1d9817d0024c96aae237c3c4349e47c976fd + +This patch (as1057) fixes a problem with the X-Rite/Gretag-Macbeth +Eye-One Pro display colorimeter; the device crashes when it receives a +Set-Interface request. A new quirk (USB_QUIRK_NO_SET_INTF) is +introduced and a quirks entry is created for this device. + +Signed-off-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman +[chrisw@sous-sol.org: backport to 2.6.24.4] +Signed-off-by: Chris Wright +--- + drivers/usb/core/message.c | 5 ++++- + drivers/usb/core/quirks.c | 3 +++ + include/linux/usb/quirks.h | 3 +++ + 3 files changed, 10 insertions(+), 1 deletion(-) + +--- a/drivers/usb/core/message.c ++++ b/drivers/usb/core/message.c +@@ -1189,7 +1189,10 @@ int usb_set_interface(struct usb_device + return -EINVAL; + } + +- ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ++ if (dev->quirks & USB_QUIRK_NO_SET_INTF) ++ ret = -EPIPE; ++ else ++ ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE, + alternate, interface, NULL, 0, 5000); + +--- a/drivers/usb/core/quirks.c ++++ b/drivers/usb/core/quirks.c +@@ -39,6 +39,9 @@ static const struct usb_device_id usb_qu + /* M-Systems Flash Disk Pioneers */ + { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, + ++ /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */ ++ { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF }, ++ + /* Philips PSC805 audio device */ + { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME }, + +--- a/include/linux/usb/quirks.h ++++ b/include/linux/usb/quirks.h +@@ -9,3 +9,6 @@ + + /* device can't resume correctly so reset it instead */ + #define USB_QUIRK_RESET_RESUME 0x00000002 ++ ++/* device can't handle Set-Interface requests */ ++#define USB_QUIRK_NO_SET_INTF 0x00000004