kern/69006: [patch] Apple Cinema Display hangs USB ports
Mark Derbyshire
mark at taom.com
Tue Jul 13 13:30:44 PDT 2004
The following reply was made to PR kern/69006; it has been noted by GNATS.
From: Mark Derbyshire <mark at taom.com>
To: FreeBSD-gnats-submit at FreeBSD.org
Cc:
Subject: Re: kern/69006: [patch] Apple Cinema Display hangs USB ports
Date: Tue, 13 Jul 2004 14:25:11 -0600
After thinking about the apparent XFree86 hangs noted with the patch
described in the original report, I modified the patch to cause the
Cinema USB port to be disabled. This seems to have cured the XFree86
freezes. The updated patch follows.
--- usb_quirks.c.orig Sun Aug 24 11:55:55 2003
+++ usb_quirks.c Wed Mar 17 11:11:31 2004
@@ -93,6 +93,7 @@
{ USB_VENDOR_HP, USB_PRODUCT_HP_810C, ANY, {
UQ_BROKEN_BIDIR }},
{ USB_VENDOR_HP, USB_PRODUCT_HP_830C, ANY, {
UQ_BROKEN_BIDIR }},
{ USB_VENDOR_HP, USB_PRODUCT_HP_1220C, ANY, {
UQ_BROKEN_BIDIR }},
+ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_CINEMA_23, ANY, { UQ_IGNORE
}},
/* YAMAHA router's ucdDevice is the version of farmware and often
changes. */
{ USB_VENDOR_YAMAHA, USB_PRODUCT_YAMAHA_RTA54I,
ANY, { UQ_ASSUME_CM_OVER_DATA }},
--- usb_quirks.h.orig Tue Mar 16 15:37:24 2004
+++ usb_quirks.h Wed Mar 17 11:11:39 2004
@@ -54,6 +54,7 @@
#define UQ_AU_INP_ASYNC 0x0800 /* input is async despite claim
of adaptive */
#define UQ_ASSUME_CM_OVER_DATA 0x1000 /* modem device breaks on cm
over data */
#define UQ_BROKEN_BIDIR 0x2000 /* printer has broken bidir
mode */
+#define UQ_IGNORE 0x4000 /* ignore this screwed-up device */
};
extern const struct usbd_quirks usbd_no_quirk;
--- usb_subr.c.orig Mon Sep 1 01:47:42 2003
+++ usb_subr.c Tue Jul 13 11:06:46 2004
@@ -304,7 +304,7 @@
char product[USB_MAX_STRING_LEN];
int bcdDevice, bcdUSB;
- usbd_devinfo_vp(dev, vendor, product, 1);
+ usbd_devinfo_vp(dev, vendor, product, !(dev->quirks->uq_flags
& UQ_IGNORE));
cp += sprintf(cp, "%s %s", vendor, product);
if (showclass)
cp += sprintf(cp, ", class %d/%d",
@@ -1106,6 +1106,14 @@
DPRINTF(("usbd_new_device: new dev (addr %d), dev=%p,
parent=%p\n",
addr, dev, parent));
+
+ if (dev->quirks->uq_flags & UQ_IGNORE) {
+ char info[1024];
+ usbd_devinfo(dev, 0, info);
+ printf("usb: %s, device ignored\n", info);
+ usbd_remove_device(dev, up);
+ return (USBD_INVAL);
+ }
err = usbd_probe_and_attach(parent, dev, port, addr);
if (err) {
--- usbdevs.orig Sun Nov 16 05:05:11 2003
+++ usbdevs Wed Mar 17 11:12:09 2004
@@ -466,6 +466,7 @@
/* Apple Computer products */
product APPLE OPTMOUSE 0x0302 Optical mouse
product APPLE SPEAKERS 0x1101 Speakers
+product APPLE CINEMA_23 0x9218 Cinema Display 23 inch
/* Asahi Optical products */
product ASAHIOPTICAL OPTIO230 0x0004 Digital camera
More information about the freebsd-bugs
mailing list