diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-12-23 10:38:32 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-12-23 10:38:32 -0800 |
commit | 358ab939884962f98c4143756a8c42943e77be12 (patch) | |
tree | 4fbd563bd3e8bddaf9553a99c22aa9db4cedfb2a /usb | |
parent | c0daf3a9bc6b3aaa611df9f6370fa493937fdf09 (diff) | |
download | patches-358ab939884962f98c4143756a8c42943e77be12.tar.gz |
added new usb drivers, dropped speakup as I don't have the time for it now.
Diffstat (limited to 'usb')
5 files changed, 177 insertions, 3 deletions
diff --git a/usb/usb-drivers-usb-core-message.c-make-usb_get_string-static.patch b/usb/usb-drivers-usb-core-message.c-make-usb_get_string-static.patch index 1f4a9a12229dd0..14b1c0a74a8097 100644 --- a/usb/usb-drivers-usb-core-message.c-make-usb_get_string-static.patch +++ b/usb/usb-drivers-usb-core-message.c-make-usb_get_string-static.patch @@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- gregkh-2.6.orig/include/linux/usb.h +++ gregkh-2.6/include/linux/usb.h -@@ -1005,8 +1005,6 @@ extern int usb_get_descriptor(struct usb +@@ -1018,8 +1018,6 @@ extern int usb_get_descriptor(struct usb unsigned char descindex, void *buf, int size); extern int usb_get_status(struct usb_device *dev, int type, int target, void *data); @@ -42,7 +42,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> { int i; int result; -@@ -1481,7 +1481,6 @@ EXPORT_SYMBOL(usb_sg_wait); +@@ -1487,7 +1487,6 @@ EXPORT_SYMBOL(usb_sg_wait); // synchronous control message convenience routines EXPORT_SYMBOL(usb_get_descriptor); EXPORT_SYMBOL(usb_get_status); diff --git a/usb/usb-ehci-fix-driver-model-wakeup-flags.patch b/usb/usb-ehci-fix-driver-model-wakeup-flags.patch new file mode 100644 index 00000000000000..7dad9885765a43 --- /dev/null +++ b/usb/usb-ehci-fix-driver-model-wakeup-flags.patch @@ -0,0 +1,32 @@ +From david-b@pacbell.net Thu Dec 22 17:09:44 2005 +From: David Brownell <david-b@pacbell.net> +To: Greg KH <greg@kroah.com> +Subject: USB: ehci fix driver model wakeup flags +Date: Thu, 22 Dec 2005 17:05:18 -0800 +Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, <gcoady@gmail.com>, Andrew Morton <akpm@osdl.org> +Message-Id: <200512221705.18618.david-b@pacbell.net> + +On some systems, EHCI seems to be getting IRQs too early during driver +setup ... before the root hub is allocated, in particular, making trouble +for any code chasing down root hub pointers! In this case, it seems to +be safe to just ignore the root hub setting. Thanks to Rafael J. Wysocki +for getting this properly tested. + +Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ehci-hcd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/usb/host/ehci-hcd.c ++++ gregkh-2.6/drivers/usb/host/ehci-hcd.c +@@ -617,7 +617,7 @@ static irqreturn_t ehci_irq (struct usb_ + } + + /* remote wakeup [4.3.1] */ +- if ((status & STS_PCD) && device_may_wakeup(&hcd->self.root_hub->dev)) { ++ if (status & STS_PCD) { + unsigned i = HCS_N_PORTS (ehci->hcs_params); + + /* resume root hub? */ diff --git a/usb/usb-export-ieee-1284-device-id-in-sysfs-for-usblp-devices.patch b/usb/usb-export-ieee-1284-device-id-in-sysfs-for-usblp-devices.patch new file mode 100644 index 00000000000000..b192bfe008a873 --- /dev/null +++ b/usb/usb-export-ieee-1284-device-id-in-sysfs-for-usblp-devices.patch @@ -0,0 +1,98 @@ +From SRS0+55afdd291c1d3a80d8b9+852+infradead.org+dwmw2@canuck.srs.infradead.org Fri Dec 23 08:44:57 2005 +From: David Woodhouse <dwmw2@infradead.org> +Subject: USB: Export IEEE-1284 device id in sysfs for usblp devices +To: greg@kroah.com +Cc: <twaugh@redhat.com>, <zaitcev@redhat.com> +Date: Fri, 23 Dec 2005 16:41:41 +0000 +Message-Id: <1135356101.6422.3.camel@pmac.infradead.org> + +I looked at the userspace code which uses the LPIOC_GET_DEVICE_ID ioctl +and I almost went blind. Let's export it in sysfs instead, and just as a +string instead of with a big-endian length at the beginning of it. + +This also prints the message about finding the printer _after_ we know +the minor device number it's going to have, rather than reporting all +printers as 'usblp0'. + +Signed-off-by: David Woodhouse <dwmw2@infradead.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/class/usblp.c | 35 ++++++++++++++++++++++++++--------- + 1 file changed, 26 insertions(+), 9 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/class/usblp.c ++++ gregkh-2.6/drivers/usb/class/usblp.c +@@ -850,6 +850,20 @@ static struct usb_class_driver usblp_cla + .minor_base = USBLP_MINOR_BASE, + }; + ++static ssize_t usblp_show_ieee1284_id(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ struct usb_interface *intf = to_usb_interface(dev); ++ struct usblp *usblp = usb_get_intfdata (intf); ++ ++ if (usblp->device_id_string[0] == 0 && ++ usblp->device_id_string[1] == 0) ++ return 0; ++ ++ return sprintf(buf, "%s", usblp->device_id_string+2); ++} ++ ++static DEVICE_ATTR(ieee1284_id, S_IRUGO, usblp_show_ieee1284_id, NULL); ++ + static int usblp_probe(struct usb_interface *intf, + const struct usb_device_id *id) + { +@@ -934,20 +948,12 @@ static int usblp_probe(struct usb_interf + + /* Retrieve and store the device ID string. */ + usblp_cache_device_id_string(usblp); ++ device_create_file(&intf->dev, &dev_attr_ieee1284_id); + + #ifdef DEBUG + usblp_check_status(usblp, 0); + #endif + +- info("usblp%d: USB %sdirectional printer dev %d " +- "if %d alt %d proto %d vid 0x%4.4X pid 0x%4.4X", +- usblp->minor, usblp->bidir ? "Bi" : "Uni", dev->devnum, +- usblp->ifnum, +- usblp->protocol[usblp->current_protocol].alt_setting, +- usblp->current_protocol, +- le16_to_cpu(usblp->dev->descriptor.idVendor), +- le16_to_cpu(usblp->dev->descriptor.idProduct)); +- + usb_set_intfdata (intf, usblp); + + usblp->present = 1; +@@ -958,11 +964,20 @@ static int usblp_probe(struct usb_interf + goto abort_intfdata; + } + usblp->minor = intf->minor; ++ info("usblp%d: USB %sdirectional printer dev %d " ++ "if %d alt %d proto %d vid 0x%4.4X pid 0x%4.4X", ++ usblp->minor, usblp->bidir ? "Bi" : "Uni", dev->devnum, ++ usblp->ifnum, ++ usblp->protocol[usblp->current_protocol].alt_setting, ++ usblp->current_protocol, ++ le16_to_cpu(usblp->dev->descriptor.idVendor), ++ le16_to_cpu(usblp->dev->descriptor.idProduct)); + + return 0; + + abort_intfdata: + usb_set_intfdata (intf, NULL); ++ device_remove_file(&intf->dev, &dev_attr_ieee1284_id); + abort: + if (usblp) { + if (usblp->writebuf) +@@ -1157,6 +1172,8 @@ static void usblp_disconnect(struct usb_ + BUG (); + } + ++ device_remove_file(&intf->dev, &dev_attr_ieee1284_id); ++ + down (&usblp_sem); + down (&usblp->sem); + usblp->present = 0; diff --git a/usb/usb-fix-usb-skeleton-limit-resource-usage-patch.patch b/usb/usb-fix-usb-skeleton-limit-resource-usage-patch.patch new file mode 100644 index 00000000000000..1ec556caae36e3 --- /dev/null +++ b/usb/usb-fix-usb-skeleton-limit-resource-usage-patch.patch @@ -0,0 +1,44 @@ +From sam@server1.gnuconsulting.com Thu Dec 22 16:15:04 2005 +Date: Thu, 22 Dec 2005 17:11:02 -0700 +From: Sam Bishop <sam@bishop.dhs.org> +To: Greg KH <greg@kroah.com> +Cc: <sbishop@micron.com> +Message-ID: <20051223001102.GA19026@server1.gnuconsulting.com> +Content-Disposition: inline +Subject: USB: fix usb-skeleton limit resource usage patch. + +From: Sam Bishop <sam@bishop.dhs.org> + +Prevents a compiler warning and uses down_interruptible() instead of down() in +process context. + +Signed-off-by: Sam Bishop <sam@bishop.dhs.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/usb-skeleton.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/usb-skeleton.c ++++ gregkh-2.6/drivers/usb/usb-skeleton.c +@@ -166,7 +166,7 @@ static ssize_t skel_write(struct file *f + int retval = 0; + struct urb *urb = NULL; + char *buf = NULL; +- size_t writesize = min(count, MAX_TRANSFER); ++ size_t writesize = min(count, (size_t)MAX_TRANSFER); + + dev = (struct usb_skel *)file->private_data; + +@@ -175,7 +175,10 @@ static ssize_t skel_write(struct file *f + goto exit; + + /* limit the number of URBs in flight to stop a user from using up all RAM */ +- down (&dev->limit_sem); ++ if (down_interruptible(&dev->limit_sem)) { ++ retval = -ERESTARTSYS; ++ goto exit; ++ } + + /* create a urb, and a buffer for it, and copy the data to the urb */ + urb = usb_alloc_urb(0, GFP_KERNEL); diff --git a/usb/usb-libusual.patch b/usb/usb-libusual.patch index 10fb446d3cac83..d4cc76dc8a2d50 100644 --- a/usb/usb-libusual.patch +++ b/usb/usb-libusual.patch @@ -904,7 +904,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +#endif /* __LINUX_USB_USUAL_H */ --- gregkh-2.6.orig/drivers/usb/Makefile +++ gregkh-2.6/drivers/usb/Makefile -@@ -20,6 +20,7 @@ obj-$(CONFIG_USB_ACM) += class/ +@@ -22,6 +22,7 @@ obj-$(CONFIG_USB_MIDI) += class/ obj-$(CONFIG_USB_PRINTER) += class/ obj-$(CONFIG_USB_STORAGE) += storage/ |