[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.29, 2003/07/31 22:49:25-07:00, [EMAIL PROTECTED]

[PATCH] USB: Rename probe and unbind functions

The is the first part of what used to be as66c.  It simply renames
usb_device_probe() and usb_device_remove() to usb_probe_interface() and
usb_unbind_interface().  And since they're not needed outside of usbcore,
it stops exporting them.


 drivers/usb/core/devio.c |7 ---
 drivers/usb/core/usb.c   |   11 ---
 drivers/usb/core/usb.h   |3 ++-
 include/linux/usb.h  |2 --
 4 files changed, 10 insertions(+), 13 deletions(-)


diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c  Fri Aug  1 10:54:07 2003
+++ b/drivers/usb/core/devio.c  Fri Aug  1 10:54:07 2003
@@ -47,6 +47,7 @@
 #include 
 
 #include "hcd.h"   /* for usbcore internals */
+#include "usb.h"
 
 struct async {
struct list_head asynclist;
@@ -726,7 +727,7 @@
 
err ("%s - this function is broken", __FUNCTION__);
if (intf->driver && ps->dev) {
-   usb_device_probe (&intf->dev);
+   usb_probe_interface (&intf->dev);
}
}
 
@@ -1105,7 +1106,7 @@
if (driver) {
dbg ("disconnect '%s' from dev %d interface %d",
 driver->name, ps->dev->devnum, ctrl.ifno);
-   usb_device_remove(&ifp->dev);
+   usb_unbind_interface(&ifp->dev);
} else
retval = -ENODATA;
unlock_kernel();
@@ -1114,7 +1115,7 @@
/* let kernel drivers try to (re)bind to the interface */
case USBDEVFS_CONNECT:
lock_kernel();
-   retval = usb_device_probe (&ifp->dev);
+   retval = usb_probe_interface (&ifp->dev);
unlock_kernel();
break;
 
diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.cFri Aug  1 10:54:07 2003
+++ b/drivers/usb/core/usb.cFri Aug  1 10:54:07 2003
@@ -98,7 +98,7 @@
 }
 
 /* needs to be called with BKL held */
-int usb_device_probe(struct device *dev)
+int usb_probe_interface(struct device *dev)
 {
struct usb_interface * intf = to_usb_interface(dev);
struct usb_driver * driver = to_usb_driver(dev->driver);
@@ -123,7 +123,7 @@
return error;
 }
 
-int usb_device_remove(struct device *dev)
+int usb_unbind_interface(struct device *dev)
 {
struct usb_interface *intf;
struct usb_driver *driver;
@@ -170,8 +170,8 @@
 
new_driver->driver.name = (char *)new_driver->name;
new_driver->driver.bus = &usb_bus_type;
-   new_driver->driver.probe = usb_device_probe;
-   new_driver->driver.remove = usb_device_remove;
+   new_driver->driver.probe = usb_probe_interface;
+   new_driver->driver.remove = usb_unbind_interface;
 
init_MUTEX(&new_driver->serialize);
 
@@ -1585,9 +1585,6 @@
 EXPORT_SYMBOL(usb_register);
 EXPORT_SYMBOL(usb_deregister);
 EXPORT_SYMBOL(usb_disabled);
-
-EXPORT_SYMBOL(usb_device_probe);
-EXPORT_SYMBOL(usb_device_remove);
 
 EXPORT_SYMBOL(usb_alloc_dev);
 EXPORT_SYMBOL(usb_put_dev);
diff -Nru a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
--- a/drivers/usb/core/usb.hFri Aug  1 10:54:07 2003
+++ b/drivers/usb/core/usb.hFri Aug  1 10:54:07 2003
@@ -2,4 +2,5 @@
 
 extern void usb_create_driverfs_dev_files (struct usb_device *dev);
 extern void usb_create_driverfs_intf_files (struct usb_interface *intf);
-
+extern int usb_probe_interface (struct device *dev);
+extern int usb_unbind_interface (struct device *dev);
diff -Nru a/include/linux/usb.h b/include/linux/usb.h
--- a/include/linux/usb.h   Fri Aug  1 10:54:07 2003
+++ b/include/linux/usb.h   Fri Aug  1 10:54:07 2003
@@ -487,8 +487,6 @@
 extern void usb_deregister_dev(struct usb_interface *intf,
   struct usb_class_driver *class_driver);
 
-extern int usb_device_probe(struct device *dev);
-extern int usb_device_remove(struct device *dev);
 extern int usb_disabled(void);
 
 /* -- */



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.21, 2003/07/30 14:02:58-07:00, [EMAIL PROTECTED]

[PATCH] USB: ax8817x.c - Fix flags to greatly increase rx performance

The attached patch fixes the flags used on the receive URBs and greatly
increases throughput (especially on EHCI).  On EHCI before the patch,
receives came in around 460KB/s and after I am in the 10-11MB/s range
which is about the same speed I am able to achieve using my Intel nics.
Now transmit is actually the bottleneck on EHCI (only getting around 6MB/s).


 drivers/usb/net/ax8817x.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/net/ax8817x.c b/drivers/usb/net/ax8817x.c
--- a/drivers/usb/net/ax8817x.c Fri Aug  1 10:54:43 2003
+++ b/drivers/usb/net/ax8817x.c Fri Aug  1 10:54:43 2003
@@ -1,7 +1,7 @@
 /*
  * ASIX AX8817x USB 2.0 10/100/HomePNA Ethernet controller driver
  *
- * $Id: ax8817x.c,v 1.17 2003/07/23 20:46:13 dhollis Exp $
+ * $Id: ax8817x.c,v 1.18 2003/07/24 11:08:17 dhollis Exp $
  *
  * Copyright (c) 2002-2003 TiVo Inc.
  *
@@ -10,6 +10,9 @@
  *
  * History 
  *
+ * 2003-07-24 - Dave Hollis <[EMAIL PROTECTED]>  2.0.2
+ * * Minor fix that greatly increases rx performance
+ 
  * 2003-07-22 - Dave Hollis <[EMAIL PROTECTED]>  2.0.1
  * * Add Intellinet USB ids
  * * Fix mii/ethtool support - link check works!
@@ -75,7 +78,7 @@
 #include 
 
 /* Version Information */
-#define DRIVER_VERSION "v2.0.1"
+#define DRIVER_VERSION "v2.0.2"
 #define DRIVER_AUTHOR "TiVo, Inc."
 #define DRIVER_DESC "ASIX AX8817x USB Ethernet driver"
 #define DRIVER_NAME "ax8817x"
@@ -758,7 +761,7 @@
break;
}
if (n_rx_urbs > 1) {
-   urb->transfer_flags |= URB_NO_INTERRUPT;/* 
FIXME: Was USB_QUEUE_BULK */
+   urb->transfer_flags |= URB_ZERO_PACKET;
}
}
ret = ax_refill_rx_urb(ax_info, urb);



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.6, 2003/07/30 12:43:00-07:00, [EMAIL PROTECTED]

[PATCH] USB: remove funny characters from visor driver after much prodding.


 drivers/usb/serial/visor.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
--- a/drivers/usb/serial/visor.cFri Aug  1 10:55:48 2003
+++ b/drivers/usb/serial/visor.cFri Aug  1 10:55:48 2003
@@ -169,7 +169,7 @@
  */
 #define DRIVER_VERSION "v2.1"
 #define DRIVER_AUTHOR "Greg Kroah-Hartman <[EMAIL PROTECTED]>"
-#define DRIVER_DESC "USB HandSpring Visor, Palm m50x, Sony Clié driver"
+#define DRIVER_DESC "USB HandSpring Visor / Palm OS driver"
 
 /* function prototypes for a handspring visor */
 static int  visor_open (struct usb_serial_port *port, struct file *filp);
@@ -275,7 +275,7 @@
 /* All of the device info needed for the Handspring Visor, and Palm 4.0 devices */
 static struct usb_serial_device_type handspring_device = {
.owner =THIS_MODULE,
-   .name = "Handspring Visor / Treo / Palm 4.0 / Clié 4.x",
+   .name = "Handspring Visor / Palm OS",
.short_name =   "visor",
.id_table = id_table,
.num_interrupt_in = NUM_DONT_CARE,
@@ -303,7 +303,7 @@
 /* device info for the Sony Clie OS version 3.5 */
 static struct usb_serial_device_type clie_3_5_device = {
.owner =THIS_MODULE,
-   .name = "Sony Clié 3.5",
+   .name = "Sony Clie 3.5",
.short_name =   "clie_3.5",
.id_table = clie_id_3_5_table,
.num_interrupt_in = 0,



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.10, 2003/07/30 13:00:47-07:00, [EMAIL PROTECTED]

[PATCH] USB: Audit usb_register in usbmouse_init()


 drivers/usb/input/usbmouse.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c
--- a/drivers/usb/input/usbmouse.c  Fri Aug  1 10:55:30 2003
+++ b/drivers/usb/input/usbmouse.c  Fri Aug  1 10:55:30 2003
@@ -247,9 +247,10 @@
 
 static int __init usb_mouse_init(void)
 {
-   usb_register(&usb_mouse_driver);
-   info(DRIVER_VERSION ":" DRIVER_DESC);
-   return 0;
+   int retval = usb_register(&usb_mouse_driver);
+   if (retval == 0) 
+   info(DRIVER_VERSION ":" DRIVER_DESC);
+   return retval;
 }
 
 static void __exit usb_mouse_exit(void)



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.33, 2003/07/31 22:51:23-07:00, [EMAIL PROTECTED]

[PATCH] USB: ehci-hcd, show microframe schedules

This updates the ehci periodic schedule dumping code to be
more useful when displaying the interrupt transfer tree:

  - includes start/complete split frame mask in QH
  - gets rid of some needless output (more terse)
  - shows whether IN or OUT tds are queued, and how many

The microframe info isn't yet very interesting, but it's
helpful when a microframe scheduler is in use.  (Which will
be a patch some other time!)


 drivers/usb/host/ehci-dbg.c |   41 +
 1 files changed, 33 insertions(+), 8 deletions(-)


diff -Nru a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
--- a/drivers/usb/host/ehci-dbg.c   Fri Aug  1 10:53:51 2003
+++ b/drivers/usb/host/ehci-dbg.c   Fri Aug  1 10:53:51 2003
@@ -476,28 +476,53 @@
do {
switch (tag) {
case Q_TYPE_QH:
-   temp = snprintf (next, size, " qh%d/%p",
-   p.qh->period, p.qh);
+   temp = snprintf (next, size, " qh%d-%04x/%p",
+   p.qh->period,
+   le32_to_cpup (&p.qh->hw_info2)
+   /* uframe masks */
+   & 0x,
+   p.qh);
size -= temp;
next += temp;
+   /* don't repeat what follows this qh */
for (temp = 0; temp < seen_count; temp++) {
-   if (seen [temp].ptr == p.ptr)
-   break;
+   if (seen [temp].ptr != p.ptr)
+   continue;
+   if (p.qh->qh_next.ptr)
+   temp = snprintf (next, size,
+   " ...");
+   p.ptr = 0;
+   break;
}
/* show more info the first time around */
if (temp == seen_count) {
u32 scratch = cpu_to_le32p (
&p.qh->hw_info1);
+   struct ehci_qtd *qtd;
+   char*type = "";
+
+   /* count tds, get ep direction */
+   temp = 0;
+   list_for_each_entry (qtd,
+   &p.qh->qtd_list,
+   qtd_list) {
+   temp++;
+   switch (0x03 & (le32_to_cpu (
+   qtd->hw_token) >> 8)) {
+   case 0: type = "out"; continue;
+   case 1: type = "in"; continue;
+   }
+   }
 
temp = snprintf (next, size,
-   " (%cs dev%d ep%d [%d/%d] %d)",
+   " (%c%d ep%d%s "
+   "[%d/%d] q%d p%d)",
speed_char (scratch),
scratch & 0x007f,
-   (scratch >> 8) & 0x000f,
+   (scratch >> 8) & 0x000f, type,
p.qh->usecs, p.qh->c_usecs,
+   temp,
0x7ff & (scratch >> 16));
-
-   /* FIXME TD info too */
 
if (seen_count < DBG_SCHED_LIMIT)
seen [seen_count++].qh = p.qh;



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscr

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.28, 2003/07/31 22:48:49-07:00, [EMAIL PROTECTED]

[PATCH] USB: More unusual_devs.h stuff

Here are updates to unusual_devs.h sent in by users.  They apply to both
2.4.22 and 2.6.0.


 drivers/usb/storage/unusual_devs.h |9 -
 1 files changed, 8 insertions(+), 1 deletion(-)


diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.hFri Aug  1 10:54:11 2003
+++ b/drivers/usb/storage/unusual_devs.hFri Aug  1 10:54:11 2003
@@ -407,7 +407,7 @@
 UNUSUAL_DEV(  0x0781, 0x0002, 0x0009, 0x0009, 
"Sandisk",
"ImageMate SDDR-31",
-   US_SC_SCSI, US_PR_BULK, NULL,
+   US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_IGNORE_SER ),
 
 UNUSUAL_DEV(  0x0781, 0x0100, 0x0100, 0x0100,
@@ -604,6 +604,13 @@
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0 ),
 #endif
+
+/* Submitted by Antoine Mairesse <[EMAIL PROTECTED]> */
+UNUSUAL_DEV( 0x0ed1, 0x6660, 0x0100, 0x0300,
+   "USB",
+   "Solid state disk",
+   US_SC_DEVICE, US_PR_DEVICE, NULL,
+   US_FL_FIX_INQUIRY ),
 
 /* Reported by Kevin Cernekee <[EMAIL PROTECTED]>
  * Tested on hardware version 1.10.



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.4, 2003/07/29 22:23:21-07:00, [EMAIL PROTECTED]

[PATCH] USB: Audit usb_register in drivers/usb/input/xpad.c


 drivers/usb/input/xpad.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
--- a/drivers/usb/input/xpad.c  Fri Aug  1 10:56:34 2003
+++ b/drivers/usb/input/xpad.c  Fri Aug  1 10:56:34 2003
@@ -342,9 +342,10 @@
 
 static int __init usb_xpad_init(void)
 {
-   usb_register(&xpad_driver);
-   info(DRIVER_DESC ":" DRIVER_VERSION);
-   return 0;
+   int result = usb_register(&xpad_driver);
+   if (result == 0)
+   info(DRIVER_DESC ":" DRIVER_VERSION);
+   return result;
 }
 
 static void __exit usb_xpad_exit(void)



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.27, 2003/07/31 22:47:24-07:00, [EMAIL PROTECTED]

[PATCH] USB: Small fixes for usbtest

It fixes a few minor problems in the usbtest driver:

Unlinks are done in the expected order, preventing some
inappropriate error messages.

The driver would wait for an URB to complete, even if the URB
got an error on submission.

There was a surprising memory leak: the driver didn't kfree()
its private data structure.


 drivers/usb/misc/usbtest.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
--- a/drivers/usb/misc/usbtest.cFri Aug  1 10:54:16 2003
+++ b/drivers/usb/misc/usbtest.cFri Aug  1 10:54:16 2003
@@ -695,8 +695,9 @@
 */
 
/* unlink whatever's still pending */
-   for (i = 0; i < ctx->param->sglen; i++) {
-   struct urb  *u = ctx->urb [i];
+   for (i = 1; i < ctx->param->sglen; i++) {
+   struct urb  *u = ctx->urb [
+   (i + subcase->number) % ctx->param->sglen];
 
if (u == urb || !u->dev)
continue;
@@ -893,7 +894,8 @@
/* FIXME  set timer and time out; provide a disconnect hook */
 
/* wait for the last one to complete */
-   wait_for_completion (&context.complete);
+   if (context.pending > 0)
+   wait_for_completion (&context.complete);
 
 cleanup:
for (i = 0; i < param->sglen; i++) {
@@ -1374,6 +1376,7 @@
 
usb_set_intfdata (intf, NULL);
info ("unbound %s", dev->id);
+   kfree (dev);
 }
 
 /* Basic testing only needs a device that can source or sink bulk traffic.



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.9, 2003/07/30 10:36:26-07:00, [EMAIL PROTECTED]

[PATCH] USB: Fix irq problem in hcd_endpoint_disable()

The recent change made to the irq handling in hcd_endpoint_disable()
caused a problem.  The statement

local_irq_save (flags);

needs to be outside the rescan loop.  Otherwise, on loop iterations after
the first, flags is always set to indicate that interrupts are disabled.

In fact, since the routine ends with might_sleep() anyway, I don't see any
reason to save the interrupt state at all.  My patch just disables
interrupts at the start and enables them at the end.  I'm not sure that's
how you intended it to work, so you may want to change it a little.


 drivers/usb/core/hcd.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.cFri Aug  1 10:56:13 2003
+++ b/drivers/usb/core/hcd.cFri Aug  1 10:56:13 2003
@@ -1273,7 +1273,6 @@
  */
 static void hcd_endpoint_disable (struct usb_device *udev, int endpoint)
 {
-   unsigned long   flags;
struct hcd_dev  *dev;
struct usb_hcd  *hcd;
struct urb  *urb;
@@ -1282,6 +1281,8 @@
dev = udev->hcpriv;
hcd = udev->bus->hcpriv;
 
+   local_irq_disable ();
+
 rescan:
/* (re)block new requests, as best we can */
if (endpoint & USB_DIR_IN) {
@@ -1293,7 +1294,6 @@
}
 
/* then kill any current requests */
-   local_irq_save (flags);
spin_lock (&hcd_data_lock);
list_for_each_entry (urb, &dev->urb_list, urb_list) {
int tmp = urb->pipe;
@@ -1342,7 +1342,7 @@
goto rescan;
}
spin_unlock (&hcd_data_lock);
-   local_irq_restore (flags);
+   local_irq_enable ();
 
/* synchronize with the hardware, so old configuration state
 * clears out immediately (and will be freed).



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.10, 2003/07/30 10:37:51-07:00, [EMAIL PROTECTED]

[PATCH] USB: remove improper use of devinitdata markings for device ids.


 drivers/usb/gadget/net2280.c  |2 +-
 drivers/usb/host/ehci-hcd.c   |2 +-
 drivers/usb/host/ohci-pci.c   |2 +-
 drivers/usb/host/uhci-hcd.c   |2 +-
 drivers/usb/misc/emi26.c  |4 ++--
 drivers/usb/net/ax8817x.c |2 +-
 drivers/usb/serial/ftdi_sio.c |2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)


diff -Nru a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
--- a/drivers/usb/gadget/net2280.c  Fri Aug  1 10:56:09 2003
+++ b/drivers/usb/gadget/net2280.c  Fri Aug  1 10:56:09 2003
@@ -2664,7 +2664,7 @@
 
 /*-*/
 
-static struct pci_device_id __devinitdata pci_ids [] = { {
+static struct pci_device_id pci_ids [] = { {
.class =((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
.class_mask =   ~0,
.vendor =   0x17cc,
diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c   Fri Aug  1 10:56:09 2003
+++ b/drivers/usb/host/ehci-hcd.c   Fri Aug  1 10:56:09 2003
@@ -974,7 +974,7 @@
 /* EHCI spec says PCI is required. */
 
 /* PCI driver selection metadata; PCI hotplugging uses this */
-static struct pci_device_id __devinitdata pci_ids [] = { {
+static struct pci_device_id pci_ids [] = { {
 
/* handle any USB 2.0 EHCI controller */
 
diff -Nru a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
--- a/drivers/usb/host/ohci-pci.c   Fri Aug  1 10:56:09 2003
+++ b/drivers/usb/host/ohci-pci.c   Fri Aug  1 10:56:09 2003
@@ -351,7 +351,7 @@
 /*-*/
 
 
-static const struct pci_device_id __devinitdata pci_ids [] = { {
+static const struct pci_device_id pci_ids [] = { {
 
/* handle any USB OHCI controller */
.class =(PCI_CLASS_SERIAL_USB << 8) | 0x10,
diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c   Fri Aug  1 10:56:09 2003
+++ b/drivers/usb/host/uhci-hcd.c   Fri Aug  1 10:56:09 2003
@@ -2503,7 +2503,7 @@
.hub_control =  uhci_hub_control,
 };
 
-static const struct pci_device_id __devinitdata uhci_pci_ids[] = { {
+static const struct pci_device_id uhci_pci_ids[] = { {
 
/* handle any USB UHCI controller */
.class =((PCI_CLASS_SERIAL_USB << 8) | 0x00),
diff -Nru a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c
--- a/drivers/usb/misc/emi26.c  Fri Aug  1 10:56:09 2003
+++ b/drivers/usb/misc/emi26.c  Fri Aug  1 10:56:09 2003
@@ -201,7 +201,7 @@
return err;
 }
 
-static __devinitdata struct usb_device_id id_table [] = {
+static struct usb_device_id id_table [] = {
{ USB_DEVICE(EMI26_VENDOR_ID, EMI26_PRODUCT_ID) },
{ } /* Terminating entry */
 };
@@ -231,7 +231,7 @@
.name   = "emi26 - firmware loader",
.probe  = emi26_probe,
.disconnect = emi26_disconnect,
-   .id_table   = NULL,
+   .id_table   = id_table,
 };
 
 static int __init emi26_init (void)
diff -Nru a/drivers/usb/net/ax8817x.c b/drivers/usb/net/ax8817x.c
--- a/drivers/usb/net/ax8817x.c Fri Aug  1 10:56:09 2003
+++ b/drivers/usb/net/ax8817x.c Fri Aug  1 10:56:09 2003
@@ -158,7 +158,7 @@
 };
 
 
-const struct usb_device_id ax8817x_id_table[] __devinitdata = {
+const struct usb_device_id ax8817x_id_table[] = {
/* Linksys USB200M */
   {USB_DEVICE(0x077b, 0x2226), driver_info:0x00130103},
/* Hawking UF200, TRENDnet TU2-ET100 */
diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
--- a/drivers/usb/serial/ftdi_sio.c Fri Aug  1 10:56:09 2003
+++ b/drivers/usb/serial/ftdi_sio.c Fri Aug  1 10:56:09 2003
@@ -392,7 +392,7 @@
 };
 
 
-static __devinitdata struct usb_device_id id_table_combined [] = {
+static struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.14, 2003/07/30 13:11:32-07:00, [EMAIL PROTECTED]

[PATCH] USB: usbnet: zaurus c-750, motorola

This patch:

   - Makes the cdc code handle a Motorola cable modem that stores
 CDC descriptors in the wrong place.  The workaround might be
 helpful for other hardware too.  (This was a 2.4 regression.)

   - Recognizes another Zaurus (PXA 255 based clamshell, not yet
 sold by Sharp in the US).

   - Cleaned the Zaurus stuff up a bit.  Rather than expecting
 a new driver_info struct (or re-using the right one) for
 each new pxa based product, they all use the same one.  So
 patches for new products only need new usb_device_id entries.
 (Also notes the issue that every Zaurus model will need to be
 blacklisted for CDC if the Z code isn't enabled.)


 drivers/usb/net/usbnet.c |   67 +--
 1 files changed, 36 insertions(+), 31 deletions(-)


diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c  Fri Aug  1 10:55:11 2003
+++ b/drivers/usb/net/usbnet.c  Fri Aug  1 10:55:11 2003
@@ -519,7 +519,17 @@
if (sizeof dev->data < sizeof *info)
return -EDOM;
 
-   /* expect strict spec conformance for the descriptors */
+   /* expect strict spec conformance for the descriptors, but
+* cope with firmware which stores them in the wrong place
+*/
+   if (len == 0 && dev->udev->config->extralen) {
+   /* Motorola SB4100 (and maybe others) put
+* CDC descriptors here
+*/
+   buf = dev->udev->config->extra;
+   len = dev->udev->config->extralen;
+   }
+
memset (info, 0, sizeof *info);
info->control = intf;
while (len > 3) {
@@ -606,7 +616,7 @@
return 0;
 
 bad_desc:
-   // devdbg (dev, "bad CDC descriptors");
+   dev_info (&dev->udev->dev, "bad CDC descriptors\n");
return -ENODEV;
 }
 
@@ -1645,6 +1655,9 @@
  * crc32, added to help detect when some sa1100 usb-to-memory DMA errata
  * haven't been fully worked around.
  *
+ * PXA based models use the same framing, and also can't implement
+ * set_interface properly.
+ *
  *-*/
 
 static struct sk_buff *
@@ -1684,34 +1697,14 @@
.unbind =   cdc_unbind,
.tx_fixup = zaurus_tx_fixup,
 };
-static const struct driver_infozaurus_sla300_info = {
-   .description =  "Sharp Zaurus SL-A300",
+static const struct driver_infozaurus_pxa_info = {
+   .description =  "Sharp Zaurus, PXA-2xx based",
.flags =FLAG_FRAMING_Z,
.check_connect = always_connected,
.tx_fixup = zaurus_tx_fixup,
 
.in = 1, .out = 2,
 };
-static const struct driver_infozaurus_slb500_info = {
-   /* Japanese B500 ~= US SL-5600 */
-   .description =  "Sharp Zaurus SL-B500",
-   .flags =FLAG_FRAMING_Z,
-   .check_connect = always_connected,
-   .tx_fixup = zaurus_tx_fixup,
-
-   .in = 1, .out = 2,
-};
-static const struct driver_info zaurus_slc700_info = {
-.description =  "Sharp Zaurus SL-C700",
-.flags =FLAG_FRAMING_Z,
-.check_connect = always_connected,
-.tx_fixup = zaurus_tx_fixup,
-
-.in = 1, .out = 2,
-};
-
-
-// SL-5600 and C-700 are PXA based; should resemble A300
 
 #endif
 
@@ -2731,6 +2724,8 @@
 /*
  * SA-1100 based Sharp Zaurus ("collie"), or compatible.
  * Same idea as above, but different framing.
+ *
+ * PXA-2xx based models are also lying-about-cdc.
  */
 {
.match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
@@ -2746,29 +2741,38 @@
.match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
  | USB_DEVICE_ID_MATCH_DEVICE, 
.idVendor   = 0x04DD,
-   .idProduct  = 0x8005,
+   .idProduct  = 0x8005,   /* A-300 */
.bInterfaceClass= 0x02,
.bInterfaceSubClass = 0x0a,
.bInterfaceProtocol = 0x00,
-   .driver_info =  (unsigned long) &zaurus_sla300_info,
+   .driver_info =  (unsigned long) &zaurus_pxa_info,
 }, {
.match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
  | USB_DEVICE_ID_MATCH_DEVICE, 
.idVendor   = 0x04DD,
-   .idProduct  = 0x8006,
+   .idProduct  = 0x8006,   /* B-500/SL-5600 */
.bInterfaceClass= 0x02,
.bInterfaceSubClass = 0x0a,
.bInterfaceProtocol = 0x00,
-   .driver_info =  (unsigned long) &zaurus_slb500_info,
+   .driver_info =  (unsigned long) &zaurus_pxa_info,
 }, {
.match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
  | USB_DEVICE_ID_MATCH_DEVICE,
-   .idVendor   = 0x04DD,
-   .idProduct  = 0x8007,
+   .idVendor   = 0x04DD,
+   .idProduct  = 0x8007, 

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.7, 2003/07/30 10:34:49-07:00, [EMAIL PROTECTED]

[PATCH] USB:  Proper I/O buffering for the shuttle_usbat subdriver

This patch makes the shuttle_usbat subdriver use proper DMA I/O buffering.
Although I try to be careful with these changes, I can't test them.  So I
urge you to read through it carefully to verify that nothing seems to be
wrong.


 drivers/usb/storage/shuttle_usbat.c |  186 ++--
 1 files changed, 115 insertions(+), 71 deletions(-)


diff -Nru a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
--- a/drivers/usb/storage/shuttle_usbat.c   Fri Aug  1 10:56:21 2003
+++ b/drivers/usb/storage/shuttle_usbat.c   Fri Aug  1 10:56:21 2003
@@ -103,10 +103,16 @@
 unsigned char subcountL) {
 
int result;
-   unsigned char command[8] = {
-   0x40, 0x81, epp_control, external_trigger,
-   test_pattern, mask_byte, subcountL, subcountH
-   };
+   unsigned char *command = us->iobuf;
+
+   command[0] = 0x40;
+   command[1] = 0x81;
+   command[2] = epp_control;
+   command[3] = external_trigger;
+   command[4] = test_pattern;
+   command[5] = mask_byte;
+   command[6] = subcountL;
+   command[7] = subcountH;
 
result = usb_stor_ctrl_transfer(us,
us->send_ctrl_pipe,
@@ -128,14 +134,20 @@
 int use_sg) {
 
int result;
-   unsigned char command[8] = {
-   0xC0, access|0x02, reg, 0x00, 0x00, 0x00, 
-   LSB_of(len), MSB_of(len)
-   };
+   unsigned char *command = us->iobuf;
 
if (!len)
return USB_STOR_TRANSPORT_GOOD;
 
+   command[0] = 0xC0;
+   command[1] = access | 0x02;
+   command[2] = reg;
+   command[3] = 0;
+   command[4] = 0;
+   command[5] = 0;
+   command[6] = LSB_of(len);
+   command[7] = MSB_of(len);
+
result = usb_stor_ctrl_transfer(us,
us->send_ctrl_pipe,
0x80,
@@ -164,7 +176,7 @@
 
int i;
int result;
-   unsigned char status;
+   unsigned char *status = us->iobuf;
 
/* Synchronizing cache on a CDR could take a heck of a long time,
 * but probably not more than 10 minutes or so. On the other hand,
@@ -174,18 +186,18 @@
 
for (i=0; i<1200+minutes*60; i++) {
 
-   result = usbat_read(us, USBAT_ATA, 0x17, &status);
+   result = usbat_read(us, USBAT_ATA, 0x17, status);
 
if (result!=USB_STOR_XFER_GOOD)
return USB_STOR_TRANSPORT_ERROR;
-   if (status&0x01) { // check condition
-   result = usbat_read(us, USBAT_ATA, 0x10, &status);
+   if (*status & 0x01) { // check condition
+   result = usbat_read(us, USBAT_ATA, 0x10, status);
return USB_STOR_TRANSPORT_FAILED;
}
-   if (status&0x20) // device fault
+   if (*status & 0x20) // device fault
return USB_STOR_TRANSPORT_FAILED;
 
-   if ((status&0x80)==0x00) { // not busy
+   if ((*status & 0x80)==0x00) { // not busy
US_DEBUGP("Waited not busy for %d steps\n", i);
return USB_STOR_TRANSPORT_GOOD;
}
@@ -214,14 +226,20 @@
 int minutes) {
 
int result;
-   unsigned char command[8] = {
-   0x40, access|0x03, reg, 0x00, 0x00, 0x00, 
-   LSB_of(len), MSB_of(len)
-   };
+   unsigned char *command = us->iobuf;
 
if (!len)
return USB_STOR_TRANSPORT_GOOD;
 
+   command[0] = 0x40;
+   command[1] = access | 0x03;
+   command[2] = reg;
+   command[3] = 0;
+   command[4] = 0;
+   command[5] = 0;
+   command[6] = LSB_of(len);
+   command[7] = MSB_of(len);
+
result = usb_stor_ctrl_transfer(us,
us->send_ctrl_pipe,
0x80,
@@ -265,23 +283,13 @@
// Not really sure the 0x07, 0x17, 0xfc, 0xe7 is necessary here,
// but that's what came out of the trace every single time.
 
-   unsigned char command[16] = {
-   0x40, access|0x07, 0x07, 0x17, 0xfc, 0xe7,
-   LSB_of(num_registers*2), MSB_of(num_registers*2),
-   (direction==SCSI_DATA_WRITE ? 0x40 : 0xC0), 
-   access|(direction==SCSI_DATA_WRITE ? 0x05 : 0x04), 
-   data_reg, status_reg,
-   timeout, qualifier, LSB_of(len), MSB_of(len)
-   };
+   unsigned char *command = us->iobuf;
+   int i, j;
+   int cmdlen;
+   unsigned char *data = us->iobuf;
+   unsigned char *status = us->iobuf;
 
-   int i;
-   unsigned char data[num_registers*2];
-   unsigned char status;
-
-   for (i=0; i US_IOBUF_SIZE/2);
 
for (i=0; i<20; i++) {
 
@@ -296,20 +304,48 @@
 * that

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.12, 2003/07/30 13:08:25-07:00, [EMAIL PROTECTED]

[PATCH] USB: Audit usb_register() in drivers/usb/net/catc.c


 drivers/usb/net/catc.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/net/catc.c b/drivers/usb/net/catc.c
--- a/drivers/usb/net/catc.cFri Aug  1 10:55:22 2003
+++ b/drivers/usb/net/catc.cFri Aug  1 10:55:22 2003
@@ -989,9 +989,10 @@
 
 static int __init catc_init(void)
 {
-   info(DRIVER_VERSION " " DRIVER_DESC);
-   usb_register(&catc_driver);
-   return 0;
+   int result = usb_register(&catc_driver);
+   if (result == 0)
+   info(DRIVER_VERSION " " DRIVER_DESC);
+   return result;
 }
 
 static void __exit catc_exit(void)



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.12, 2003/07/30 10:57:24-07:00, [EMAIL PROTECTED]

[PATCH] USB: AX8817x (USB ethernet) problem in 2.6.0-test1

>From [EMAIL PROTECTED]

My Netgear FA120 USB2 ethernet adaptor isn't working properly with
Linux 2.6.0-test1.  First off, I had to modify it slightly (patch
below) to make it work at all with USB2.  Now I can send data at the
full expected speed (~11 MB/s).


 drivers/usb/net/ax8817x.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/usb/net/ax8817x.c b/drivers/usb/net/ax8817x.c
--- a/drivers/usb/net/ax8817x.c Fri Aug  1 10:56:01 2003
+++ b/drivers/usb/net/ax8817x.c Fri Aug  1 10:56:01 2003
@@ -1239,7 +1239,7 @@
 
usb_fill_int_urb(ax_info->int_urb, usb, usb_rcvintpipe(usb, 1),
 ax_info->int_buf, 8, ax_int_callback, ax_info,
-100);
+usb->speed == USB_SPEED_HIGH? 8: 100);
 
ret = usb_submit_urb(ax_info->int_urb, GFP_ATOMIC);
if (ret < 0) {



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.20, 2003/07/30 13:47:44-07:00, [EMAIL PROTECTED]

[PATCH] USB: AX8817x mii/ethtool fixes among others

This patch:
Adds the Intellinet device IDs
Adds msg_level support (to be utilized in the future)
Fixes ethtool/mii support so link checking actually works
Changed timeout on usb_fill_int_urb to support High Speed ([EMAIL PROTECTED])
Added devdbg/err/info defines borrowed from usbnet
Changed strlcpy to strncpy

Key issue not currently resolved (as brought up by [EMAIL PROTECTED]) is
that the receive performance is terrible on OHCI.  I ran a set of tests
with ttcp and transmit performance achieved 6146.16 KB/sec  but receive
only yielded 466.26 KB/sec which really sucks (sorry for the technical
jargon).  In porting the driver to 2.5 I had to pull the transmit
queueing that Tivo had originally used for the driver to even function.
My initial attempts at pulling the receive queueing met with many
Ooopses thus I backed off.  Looks like I will need to dig in again on
that one.


 drivers/usb/net/ax8817x.c |  123 +-
 1 files changed, 58 insertions(+), 65 deletions(-)


diff -Nru a/drivers/usb/net/ax8817x.c b/drivers/usb/net/ax8817x.c
--- a/drivers/usb/net/ax8817x.c Fri Aug  1 10:54:47 2003
+++ b/drivers/usb/net/ax8817x.c Fri Aug  1 10:54:47 2003
@@ -1,7 +1,7 @@
 /*
  * ASIX AX8817x USB 2.0 10/100/HomePNA Ethernet controller driver
  *
- * $Id: ax8817x.c,v 1.11 2003/06/15 19:00:02 dhollis Exp $
+ * $Id: ax8817x.c,v 1.17 2003/07/23 20:46:13 dhollis Exp $
  *
  * Copyright (c) 2002-2003 TiVo Inc.
  *
@@ -10,6 +10,12 @@
  *
  * History 
  *
+ * 2003-07-22 - Dave Hollis <[EMAIL PROTECTED]>  2.0.1
+ * * Add Intellinet USB ids
+ * * Fix mii/ethtool support - link check works!
+ * * Add msglevel support
+ * * Shamelessly 'borrowed' devdbg/err/info macros from usbnet
+ * * Change strlcpy to strncpy
  * 2003-06-15 - Dave Hollis <[EMAIL PROTECTED]>  2.0.0
  * * Remove crc32 inline function, use core kernel instead
  * * Set sane defaults for rx_buffers
@@ -50,7 +56,7 @@
  * Known Issues
  *
  * Todo
- * Fix mii/ethtool output
+ * Fix receive performance on OHCI
 */
 
 #include 
@@ -69,7 +75,7 @@
 #include 
 
 /* Version Information */
-#define DRIVER_VERSION "v2.0.0"
+#define DRIVER_VERSION "v2.0.1"
 #define DRIVER_AUTHOR "TiVo, Inc."
 #define DRIVER_DESC "ASIX AX8817x USB Ethernet driver"
 #define DRIVER_NAME "ax8817x"
@@ -95,6 +101,7 @@
 #define AX_RX_MAX   ETH_FRAME_LEN
 #define AX_TIMEOUT_CMD  ( HZ / 10 )
 #define AX_TIMEOUT_TX   ( HZ * 2 )
+#define AX_MCAST_FILTER_SIZE8
 #define AX_MAX_MCAST64
 
 #define AX_DRV_STATE_INITIALIZING   0x00
@@ -155,6 +162,7 @@
u8 phy_id;
u8 phy_state;
u8 drv_state;
+   int msg_level;
 };
 
 
@@ -167,12 +175,27 @@
   {USB_DEVICE(0x0846, 0x1040), driver_info:0x00130103},
/* D-Link DUB-E100 */
   {USB_DEVICE(0x2001, 0x1a00), driver_info:0x009f9d9f},
-
+/* Intellinet USB Ethernet */
+  {USB_DEVICE(0x0b95, 0x1720), driver_info:0x00130103},
{}
 };
 
 MODULE_DEVICE_TABLE(usb, ax8817x_id_table);
 
+#ifdef DEBUG
+#define devdbg(ax_info, fmt, arg...) \
+   printk(KERN_DEBUG "%s: " fmt "\n" , (ax_info)->net->name, ## arg)
+#else
+#define devdbg(ax_info, fmt, arg...) do {} while(0)
+#endif
+
+#define deverr(ax_info, fmt, arg...) \
+   printk(KERN_ERR "%s: " fmt "\n", (ax_info)->net->name, ## arg)
+   
+#define devinfo(ax_info, fmt, arg...) \
+   do { if ((ax_info)->msg_level >= 1) \
+   printk(KERN_INFO "%s: " fmt "\n", (ax_info)->net->name, ## arg); \
+   } while (0)
 
 static void ax_run_ctl_queue(struct ax8817x_info *, struct ax_cmd_req *,
 int);
@@ -880,14 +903,14 @@
u32 crc_bits;
int i;
 
-   multi_filter = kmalloc(8, GFP_ATOMIC);
+   multi_filter = kmalloc(AX_MCAST_FILTER_SIZE, GFP_ATOMIC);
if (multi_filter == NULL) {
/* Oops, couldn't allocate a DMA buffer for setting the 
multicast
   filter. Try all multi mode, although the ax_write_cmd_async
   will almost certainly fail, too... (but it will printk). */
rx_ctl |= 0x02;
} else {
-   memset(multi_filter, 0, 8);
+   memset(multi_filter, 0, AX_MCAST_FILTER_SIZE);
 
/* Build the multicast hash filter. */
for (i = 0; i < net->mc_count; i++) {
@@ -901,7 +924,7 @@
 
ax_write_cmd_async(ax_info,
   AX_CMD_WRITE_MULTI_FILTER, 0, 0,
-  8, multi_filter);
+  AX_MCAST_FILTER_SIZE, multi_filter);
 
 

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.1, 2003/07/29 22:21:46-07:00, [EMAIL PROTECTED]

[PATCH] USB: Audit usb_register in drivers/usb/class/audio.c


 drivers/usb/class/audio.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c
--- a/drivers/usb/class/audio.c Fri Aug  1 10:56:45 2003
+++ b/drivers/usb/class/audio.c Fri Aug  1 10:56:45 2003
@@ -3872,9 +3872,10 @@
 
 static int __init usb_audio_init(void)
 {
-   usb_register(&usb_audio_driver);
-   info(DRIVER_VERSION ":" DRIVER_DESC);
-   return 0;
+   int result = usb_register(&usb_audio_driver);
+   if (result == 0) 
+   info(DRIVER_VERSION ":" DRIVER_DESC);
+   return result;
 }
 
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.26, 2003/07/31 22:46:56-07:00, [EMAIL PROTECTED]

[PATCH] USB: usb_gadget.h doc fix

The "automagic control completion" has been gone for some
time now, except for the documentation fixed in this patch.
It mentions the "deferred response" mode that's used when
some context (like a gadgetfs thread) other than the IRQ
handler is responding to control requests.


 include/linux/usb_gadget.h |6 +-
 1 files changed, 5 insertions(+), 1 deletion(-)


diff -Nru a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h
--- a/include/linux/usb_gadget.hFri Aug  1 10:54:20 2003
+++ b/include/linux/usb_gadget.hFri Aug  1 10:54:20 2003
@@ -301,9 +301,13 @@
  * toggle differently.
  *
  * Control endpoints ... after getting a setup() callback, the driver queues
- * one response (optional if it would be zero length).  That enables the
+ * one response (even if it would be zero length).  That enables the
  * status ack, after transfering data as specified in the response.  Setup
  * functions may return negative error codes to generate protocol stalls.
+ * (Note that some USB device controllers disallow protocol stall responses
+ * in some cases.)  When control responses are deferred (the response is
+ * written after the setup callback returns), then usb_ep_set_halt() may be
+ * used on ep0 to trigger protocol stalls.
  *
  * For periodic endpoints, like interrupt or isochronous ones, the usb host
  * arranges to poll once per interval, and the gadget driver usually will



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.2, 2003/07/29 11:40:03-07:00, [EMAIL PROTECTED]

[PATCH] USB: core cleanups for struct usb_interface changes

Also set usb_device.dev.release right after initialization to catch any
early devices being destroyed.  I still think there's a few error paths
to correct, but this catches a lot of previous errors.


 drivers/usb/core/devices.c |2 -
 drivers/usb/core/devio.c   |   10 +++---
 drivers/usb/core/hub.c |6 ++--
 drivers/usb/core/message.c |2 -
 drivers/usb/core/usb.c |   65 ++---
 5 files changed, 42 insertions(+), 43 deletions(-)


diff -Nru a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
--- a/drivers/usb/core/devices.cFri Aug  1 10:56:57 2003
+++ b/drivers/usb/core/devices.cFri Aug  1 10:56:57 2003
@@ -309,7 +309,7 @@
return start + sprintf(start, "(null Cfg. desc.)\n");
start = usb_dump_config_descriptor(start, end, &config->desc, active);
for (i = 0; i < config->desc.bNumInterfaces; i++) {
-   interface = config->interface + i;
+   interface = config->interface[i];
if (!interface)
break;
for (j = 0; j < interface->num_altsetting; j++) {
diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c  Fri Aug  1 10:56:57 2003
+++ b/drivers/usb/core/devio.c  Fri Aug  1 10:56:57 2003
@@ -360,7 +360,7 @@
/* already claimed */
if (test_bit(intf, &ps->ifclaimed))
return 0;
-   iface = &dev->actconfig->interface[intf];
+   iface = dev->actconfig->interface[intf];
err = -EBUSY;
lock_kernel();
if (!usb_interface_claimed(iface)) {
@@ -384,7 +384,7 @@
dev = ps->dev;
down(&dev->serialize);
if (dev && test_and_clear_bit(intf, &ps->ifclaimed)) {
-   iface = &dev->actconfig->interface[intf];
+   iface = dev->actconfig->interface[intf];
usb_driver_release_interface(&usbdevfs_driver, iface);
err = 0;
}
@@ -414,7 +414,7 @@
if (ep & ~(USB_DIR_IN|0xf))
return -EINVAL;
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
-   iface = &dev->actconfig->interface[i];
+   iface = dev->actconfig->interface[i];
for (j = 0; j < iface->num_altsetting; j++) {
 alts = &iface->altsetting[j];
for (e = 0; e < alts->desc.bNumEndpoints; e++) {
@@ -436,7 +436,7 @@
if (ifn & ~0xff)
return -EINVAL;
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
-   iface = &dev->actconfig->interface[i];
+   iface = dev->actconfig->interface[i];
for (j = 0; j < iface->num_altsetting; j++) {
 alts = &iface->altsetting[j];
if (alts->desc.bInterfaceNumber == ifn)
@@ -718,7 +718,7 @@
return ret;
 
for (i = 0; i < ps->dev->actconfig->desc.bNumInterfaces; i++) {
-   struct usb_interface *intf = &ps->dev->actconfig->interface[i];
+   struct usb_interface *intf = ps->dev->actconfig->interface[i];
 
/* Don't simulate interfaces we've claimed */
if (test_bit(i, &ps->ifclaimed))
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.cFri Aug  1 10:56:57 2003
+++ b/drivers/usb/core/hub.cFri Aug  1 10:56:57 2003
@@ -60,7 +60,7 @@
 /* for dev_info, dev_dbg, etc */
 static inline struct device *hubdev (struct usb_device *dev)
 {
-   return &dev->actconfig->interface [0].dev;
+   return &dev->actconfig->interface[0]->dev;
 }
 
 /* USB 2.0 spec Section 11.24.4.5 */
@@ -691,7 +691,7 @@
 static int hub_port_status(struct usb_device *dev, int port,
   u16 *status, u16 *change)
 {
-   struct usb_hub *hub = usb_get_intfdata (dev->actconfig->interface);
+   struct usb_hub *hub = usb_get_intfdata(dev->actconfig->interface[0]);
int ret;
 
ret = get_port_status(dev, port + 1, &hub->status->port);
@@ -1340,7 +1340,7 @@
}
 
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
-   struct usb_interface *intf = &dev->actconfig->interface[i];
+   struct usb_interface *intf = dev->actconfig->interface[i];
struct usb_interface_descriptor *as;
 
as = &intf->altsetting[intf->act_altsetting].desc;
diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.cFri Aug  1 10:56:57 2003
+++ b/drivers/usb/core/message.cFri Aug  1 10:56:57 2003
@@ -675,7 +675,7 @@
 
/* NOTE:  affects all endpoints _except_ ep0 */
for (i=0; iactconfig->desc.bNumInterfaces; i++) {
-   struct usb_interface *ifp = dev->actconfig->interf

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.5, 2003/07/29 22:23:53-07:00, [EMAIL PROTECTED]

[PATCH] USB: Audit usb_register() in drivers/usb/input/usbkbd.c


 drivers/usb/input/usbkbd.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/input/usbkbd.c b/drivers/usb/input/usbkbd.c
--- a/drivers/usb/input/usbkbd.cFri Aug  1 10:56:30 2003
+++ b/drivers/usb/input/usbkbd.cFri Aug  1 10:56:30 2003
@@ -366,9 +366,10 @@
 
 static int __init usb_kbd_init(void)
 {
-   usb_register(&usb_kbd_driver);
-   info(DRIVER_VERSION ":" DRIVER_DESC);
-   return 0;
+   int result = usb_register(&usb_kbd_driver);
+   if (result == 0)
+   info(DRIVER_VERSION ":" DRIVER_DESC);
+   return result;
 }
 
 static void __exit usb_kbd_exit(void)



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.22, 2003/07/30 14:05:29-07:00, [EMAIL PROTECTED]

[PATCH] USB: PWC 8.11

Attached are two patches, one for 2.4.21 and 2.5.75 for the PWC driver. I
assume the 2.5.75 patch will go into 2.6.0-test* without problems (I hope
this driver can make it into the kernel before the 'real' 2.6.0).

 From the ChangeLog:

* 20 dev_hints (per request)
* Hot unplugging should be better, no more dangling pointers or memory leaks
* Added reserved Logitech webcam IDs
* Device now remembers size & fps between close()/open()
* Removed palette stuff altogether

I have two open issues, though: Oliver Neukem pointed out that I should
resubmit URBs in the 2.5. kernel even in case of USB errors, which I did.
However, I never got a patch so I'm not 100% if this is the solution that
he had in mind.

Second... I've been thinking long and hard about the problem of properly
deregistering the video device when the cam gets unplugged while it is in
use. Various schemes failed; immediately deregistering while in the
disconnect routine causes crashes because the videodev layer sets some
pointer to null but still uses it later. A deregister in close() causes
hangs because of locked mutexes...

My current implemententation is to set an errorflag in the disconnect
routine, then wait there (using schedule()) until close() is being called
(I assume the application will immediately close the device when it gets a
serious error). So far it doesn't crash :-)


 drivers/usb/media/pwc-ctrl.c   |   40 ---
 drivers/usb/media/pwc-if.c |  379 -
 drivers/usb/media/pwc-ioctl.h  |2 
 drivers/usb/media/pwc-misc.c   |3 
 drivers/usb/media/pwc-uncompress.c |   17 -
 drivers/usb/media/pwc-uncompress.h |2 
 drivers/usb/media/pwc.h|   25 +-
 7 files changed, 191 insertions(+), 277 deletions(-)


diff -Nru a/drivers/usb/media/pwc-ctrl.c b/drivers/usb/media/pwc-ctrl.c
--- a/drivers/usb/media/pwc-ctrl.c  Fri Aug  1 10:54:39 2003
+++ b/drivers/usb/media/pwc-ctrl.c  Fri Aug  1 10:54:39 2003
@@ -1,7 +1,7 @@
 /* Driver for Philips webcam
Functions that send various control messages to the webcam, including
video modes.
-   (C) 1999-2002 Nemosoft Unv. ([EMAIL PROTECTED])
+   (C) 1999-2003 Nemosoft Unv. ([EMAIL PROTECTED])
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -452,7 +452,7 @@
pdev->view.x = width;
pdev->view.y = height;
pwc_set_image_buffer_size(pdev);
-   Trace(TRACE_SIZE, "Set viewport to %dx%d, image size is %dx%d, palette = 
%d.\n", width, height, pwc_image_sizes[size].x, pwc_image_sizes[size].y, 
pdev->vpalette);
+   Trace(TRACE_SIZE, "Set viewport to %dx%d, image size is %dx%d.\n", width, 
height, pwc_image_sizes[size].x, pwc_image_sizes[size].y);
return 0;
 }
 
@@ -461,38 +461,8 @@
 {
int factor, i, filler = 0;
 
-   switch(pdev->vpalette) {
-   case VIDEO_PALETTE_RGB32 | 0x80:
-   case VIDEO_PALETTE_RGB32:
-   factor = 16;
-   filler = 0;
-   break;
-   case VIDEO_PALETTE_RGB24 | 0x80:
-   case VIDEO_PALETTE_RGB24:
-   factor = 12;
-   filler = 0;
-   break;
-   case VIDEO_PALETTE_YUYV:
-   case VIDEO_PALETTE_YUV422:
-   factor = 8;
-   filler = 128;
-   break;
-   case VIDEO_PALETTE_YUV420:
-   case VIDEO_PALETTE_YUV420P:
-   factor = 6;
-   filler = 128;
-   break;
-#if PWC_DEBUG  
-   case VIDEO_PALETTE_RAW:
-   pdev->image.size = pdev->frame_size;
-   pdev->view.size = pdev->frame_size;
-   return;
-   break;
-#endif 
-   default:
-   factor = 0;
-   break;
-   }
+   factor = 6;
+   filler = 128;
 
/* Set sizes in bytes */
pdev->image.size = pdev->image.x * pdev->image.y * factor / 4;
@@ -1355,7 +1325,7 @@
{
struct pwc_probe *probe = arg;

-   strcpy(probe->name, pdev->vdev->name);
+   strcpy(probe->name, pdev->vdev.name);
probe->type = pdev->type;
break;
}
diff -Nru a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c
--- a/drivers/usb/media/pwc-if.cFri Aug  1 10:54:39 2003
+++ b/drivers/usb/media/pwc-if.cFri Aug  1 10:54:39 2003
@@ -1,6 +1,6 @@
 /* Linux driver for Philips webcam 
USB and Video4Linux interface part.
-   (C) 1999-2002 Nemosoft Unv.
+   (C) 1999-2003 Nemosoft Unv.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -74,14 +74,21 @@
{ USB_DEVICE(0x0471, 0x0310) },
{ USB_DEVICE(0x0471, 0x0311) },
{ USB_DEVICE(0x0471, 0x0312) },
+   

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.3, 2003/07/29 22:22:50-07:00, [EMAIL PROTECTED]

[PATCH] USB: Audit usb_register() in drivers/usb/input/wacom.c


 drivers/usb/input/wacom.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c
--- a/drivers/usb/input/wacom.c Fri Aug  1 10:56:38 2003
+++ b/drivers/usb/input/wacom.c Fri Aug  1 10:56:38 2003
@@ -629,9 +629,10 @@
 
 static int __init wacom_init(void)
 {
-   usb_register(&wacom_driver);
-   info(DRIVER_VERSION ":" DRIVER_DESC);
-   return 0;
+   int result = usb_register(&wacom_driver);
+   if (result == 0)
+   info(DRIVER_VERSION ":" DRIVER_DESC);
+   return result;
 }
 
 static void __exit wacom_exit(void)



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.9, 2003/07/30 13:00:31-07:00, [EMAIL PROTECTED]

[PATCH] USB: error return codes in usblp

an unknown ioctl shall return ENOTTY, not EINVAL.


 drivers/usb/class/usblp.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c Fri Aug  1 10:55:34 2003
+++ b/drivers/usb/class/usblp.c Fri Aug  1 10:55:34 2003
@@ -573,7 +573,7 @@
break;
 
default:
-   retval = -EINVAL;
+   retval = -ENOTTY;
}
else/* old-style ioctl value */
switch (cmd) {
@@ -590,7 +590,7 @@
break;
 
default:
-   retval = -EINVAL;
+   retval = -ENOTTY;
}
 
 done:



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.19, 2003/07/30 13:39:38-07:00, [EMAIL PROTECTED]

[PATCH] USB: visor.h[c] USB device IDs documentation


 Documentation/usb/usb-serial.txt |3 +++
 1 files changed, 3 insertions(+)


diff -Nru a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
--- a/Documentation/usb/usb-serial.txt  Fri Aug  1 10:54:51 2003
+++ b/Documentation/usb/usb-serial.txt  Fri Aug  1 10:54:51 2003
@@ -84,6 +84,9 @@
   necessary.  Some devices need this before they can talk to the USB port
   properly.
   
+  Devices that are not compiled into the kernel can be specified with module
+  parameters.  e.g. modprobe visor vendor=0x54c product=0x66
+  
   There is a webpage and mailing lists for this portion of the driver at:
   http://usbvisor.sourceforge.net/
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.34, 2003/07/31 22:51:51-07:00, [EMAIL PROTECTED]

[PATCH] USB: ehci-hcd and period=1frame hs interrupts

This resolves the slowdown Bernd Porr noticed, where rather a lot
of useless work got done.   It should apply to 2.4 too.


 drivers/usb/host/ehci-sched.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
--- a/drivers/usb/host/ehci-sched.c Fri Aug  1 10:53:47 2003
+++ b/drivers/usb/host/ehci-sched.c Fri Aug  1 10:53:47 2003
@@ -397,7 +397,7 @@
if (status == 0)
break;
}
-   } while (status && --frame);
+   } while (status && frame--);
if (status)
goto done;
qh->start = frame;



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.35, 2003/07/31 22:52:18-07:00, [EMAIL PROTECTED]

[PATCH] USB: usb root hubs need longer timeout

Root hubs should use 50 msec timeouts, not 10 msec.  This will
if nothing else eliminate some messages when using EHCI, which
insists on the whole timeout!


 drivers/usb/core/hub.c |7 +++
 1 files changed, 7 insertions(+)


diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.cFri Aug  1 10:53:43 2003
+++ b/drivers/usb/core/hub.cFri Aug  1 10:53:43 2003
@@ -708,6 +708,7 @@
 
 #define HUB_RESET_TRIES5
 #define HUB_PROBE_TRIES2
+#define HUB_ROOT_RESET_TIME50  /* times are in msec */
 #define HUB_SHORT_RESET_TIME   10
 #define HUB_LONG_RESET_TIME200
 #define HUB_RESET_TIMEOUT  500
@@ -902,6 +903,12 @@
hub_port_disable(hub, port);
return;
}
+
+   /* root hub ports have a slightly longer reset period
+* (from USB 2.0 spec, section 7.1.7.5)
+*/
+   if (!hub->parent)
+   delay = HUB_ROOT_RESET_TIME;
 
/* Some low speed devices have problems with the quick delay, so */
/*  be a bit pessimistic with those devices. RHbug #23670 */



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.7, 2003/07/30 12:46:03-07:00, [EMAIL PROTECTED]

[PATCH] USB: ehci needs a readb() on IDP425 PCI (ARM)

This is a one-line "obviously correct" patch that Lutz reports
is needed on one ARM platform.


 drivers/usb/host/ehci-hcd.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c   Fri Aug  1 10:55:44 2003
+++ b/drivers/usb/host/ehci-hcd.c   Fri Aug  1 10:55:44 2003
@@ -331,7 +331,8 @@
spin_lock_init (&ehci->lock);
 
ehci->caps = (struct ehci_caps *) hcd->regs;
-   ehci->regs = (struct ehci_regs *) (hcd->regs + ehci->caps->length);
+   ehci->regs = (struct ehci_regs *) (hcd->regs +
+   readb (&ehci->caps->length));
dbg_hcs_params (ehci, "ehci_start");
dbg_hcc_params (ehci, "ehci_start");
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.18, 2003/07/30 13:33:37-07:00, [EMAIL PROTECTED]

[PATCH] USB: ehci-hcd, TT fixup

I noticed that some cases where USB produced lots of TT messages
were clearly wrong, since the transactions completed cleanly
(with a stall) and the TT buffer cleanup is only supposed to
be needed when a CSPLIT transaction fails (for control or bulk).

This patch makes the TT buffer cleanup happen only in the rarer
cases where there was an error that might really need it.


 drivers/usb/host/ehci-q.c |   18 ++
 1 files changed, 10 insertions(+), 8 deletions(-)


diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
--- a/drivers/usb/host/ehci-q.c Fri Aug  1 10:54:55 2003
+++ b/drivers/usb/host/ehci-q.c Fri Aug  1 10:54:55 2003
@@ -161,16 +161,18 @@
usb_endpoint_halt (urb->dev,
usb_pipeendpoint (pipe),
usb_pipeout (pipe));
-   if (urb->dev->tt && !usb_pipeint (pipe)) {
+
+   /* if async CSPLIT failed, try cleaning out the TT buffer */
+   } else if (urb->dev->tt && !usb_pipeint (urb->pipe)
+   && QTD_CERR(token) == 0) {
 #ifdef DEBUG
-   struct usb_device *tt = urb->dev->tt->hub;
-   dbg ("clear tt %s-%s p%d buffer, a%d ep%d",
-   tt->bus->bus_name, tt->devpath,
-   urb->dev->ttport, urb->dev->devnum,
-   usb_pipeendpoint (pipe));
+   struct usb_device *tt = urb->dev->tt->hub;
+   dev_dbg (&tt->dev,
+   "clear tt buffer port %d, a%d ep%d t%08x\n",
+   urb->dev->ttport, urb->dev->devnum,
+   usb_pipeendpoint (urb->pipe), token);
 #endif /* DEBUG */
-   usb_hub_tt_clear_buffer (urb->dev, pipe);
-   }
+   usb_hub_tt_clear_buffer (urb->dev, urb->pipe);
}
}
 }



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.16, 2003/07/30 13:19:01-07:00, [EMAIL PROTECTED]

[PATCH] USB: cleanup of usblp (release and poll)

this cleans up locking and freeing in usblp_release and
poll.


 drivers/usb/class/usblp.c |   10 --
 1 files changed, 4 insertions(+), 6 deletions(-)


diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c Fri Aug  1 10:55:03 2003
+++ b/drivers/usb/class/usblp.c Fri Aug  1 10:55:03 2003
@@ -383,7 +383,7 @@
usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
usblp->writebuf, usblp->writeurb->transfer_dma);
usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
-   usblp->readbuf, usblp->writeurb->transfer_dma);
+   usblp->readbuf, usblp->readurb->transfer_dma);
kfree (usblp->device_id_string);
kfree (usblp->statusbuf);
usb_free_urb(usblp->writeurb);
@@ -403,14 +403,12 @@
struct usblp *usblp = file->private_data;
 
down (&usblp->sem);
-   lock_kernel();
usblp->used = 0;
if (usblp->present) {
usblp_unlink_urbs(usblp);
up(&usblp->sem);
} else  /* finish cleanup from disconnect */
usblp_cleanup (usblp);
-   unlock_kernel();
return 0;
 }
 
@@ -419,8 +417,8 @@
 {
struct usblp *usblp = file->private_data;
poll_wait(file, &usblp->wait, wait);
-   return ((!usblp->bidir || usblp->readurb->status  == -EINPROGRESS) ? 0 : 
POLLIN  | POLLRDNORM)
-  | (usblp->writeurb->status == -EINPROGRESS  ? 0 : 
POLLOUT | POLLWRNORM);
+   return ((!usblp->bidir || !usblp->rcomplete) ? 0 : POLLIN  | POLLRDNORM)
+  | (!usblp->wcomplete ? 0 : POLLOUT | POLLWRNORM);
 }
 
 static int usblp_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 
unsigned long arg)
@@ -738,7 +736,7 @@
usblp->readurb->dev = usblp->dev;
usblp->readcount = 0;
if (usb_submit_urb(usblp->readurb, GFP_KERNEL) < 0)
-   dbg("error submitting urb"); 
+   dbg("error submitting urb");
count = -EIO;
goto done;
}



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.32, 2003/07/31 22:50:47-07:00, [EMAIL PROTECTED]

[PATCH] USB: usb_unlink_urb() kerneldoc

This been sitting in my queue for ages now ... it just
clarifies three points about unlink semantics.  Basically,

  - You can only unlink once per submission.

  - For synchronous unlink: urb completes, then unlink returns.

  - For async unlink: the order is unspecified; although usually
the completion happens after unlink returns.


 drivers/usb/core/urb.c |   27 ---
 1 files changed, 16 insertions(+), 11 deletions(-)


diff -Nru a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
--- a/drivers/usb/core/urb.cFri Aug  1 10:53:55 2003
+++ b/drivers/usb/core/urb.cFri Aug  1 10:53:55 2003
@@ -379,24 +379,29 @@
  * usb_unlink_urb - abort/cancel a transfer request for an endpoint
  * @urb: pointer to urb describing a previously submitted request
  *
- * This routine cancels an in-progress request.  The requests's
- * completion handler will be called with a status code indicating
- * that the request has been canceled, and that control of the URB
- * has been returned to that device driver.
+ * This routine cancels an in-progress request.  URBs complete only
+ * once per submission, and may be canceled only once per submission.
+ * Successful cancelation means the requests's completion handler will
+ * be called with a status code indicating that the request has been
+ * canceled (rather than any other code) and will quickly be removed
+ * from host controller data structures.
  *
  * When the URB_ASYNC_UNLINK transfer flag for the URB is clear, this
  * request is synchronous.  Success is indicated by returning zero,
- * at which time the urb will have been unlinked,
- * and the completion function will see status -ENOENT.  Failure is
- * indicated by any other return value.  This mode may not be used
+ * at which time the urb will have been unlinked and its completion
+ * handler will have been called with urb->status -ENOENT.  Failure is
+ * indicated by any other return value.
+ *
+ * The synchronous cancelation mode may not be used
  * when unlinking an urb from an interrupt context, such as a bottom
- * half or a completion handler,
+ * half or a completion handler; or when holding a spinlock; or in
+ * other cases when the caller can't schedule().
  *
  * When the URB_ASYNC_UNLINK transfer flag for the URB is set, this
  * request is asynchronous.  Success is indicated by returning -EINPROGRESS,
- * at which time the urb will normally not have been unlinked,
- * and the completion function will see status -ECONNRESET.  Failure is
- * indicated by any other return value.
+ * at which time the urb will normally not have been unlinked.
+ * The completion function will see urb->status -ECONNRESET.  Failure
+ * is indicated by any other return value.
  */
 int usb_unlink_urb(struct urb *urb)
 {



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.13, 2003/07/30 13:10:37-07:00, [EMAIL PROTECTED]

Cset exclude: [EMAIL PROTECTED]|ChangeSet|20030730200104|44589


 drivers/usb/net/usbnet.c |9 -
 1 files changed, 9 deletions(-)


diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c  Fri Aug  1 10:55:15 2003
+++ b/drivers/usb/net/usbnet.c  Fri Aug  1 10:55:15 2003
@@ -2769,15 +2769,6 @@
.bInterfaceSubClass = 0x0a,
.bInterfaceProtocol = 0x00,
.driver_info =  (unsigned long) &zaurus_slc700_info,
-}, {
-   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
-| USB_DEVICE_ID_MATCH_DEVICE,
-   .idVendor   = 0x04DD,
-   .idProduct  = 0x9031,
-   .bInterfaceClass= 0x02,
-   .bInterfaceSubClass = 0x0a,
-   .bInterfaceProtocol = 0x00,
-   .driver_info =  (unsigned long) &zaurus_sla300_info,
 },
 #endif
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.2, 2003/07/29 22:22:13-07:00, [EMAIL PROTECTED]

[PATCH] USB: Audit usb_register() in drivers/usb/misc/emi26.c


 drivers/usb/misc/emi26.c |3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


diff -Nru a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c
--- a/drivers/usb/misc/emi26.c  Fri Aug  1 10:56:41 2003
+++ b/drivers/usb/misc/emi26.c  Fri Aug  1 10:56:41 2003
@@ -236,8 +236,7 @@
 
 static int __init emi26_init (void)
 {
-   usb_register (&emi26_driver);
-   return 0;
+   return usb_register(&emi26_driver);
 }
 
 static void __exit emi26_exit (void)



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.11, 2003/07/30 10:56:50-07:00, [EMAIL PROTECTED]

[PATCH] USB: Compile AX8817x driver

>From [EMAIL PROTECTED]

This trivial Makefile patch causes the AX8817x driver to actually be
built.


 drivers/usb/Makefile |1 +
 1 files changed, 1 insertion(+)


diff -Nru a/drivers/usb/Makefile b/drivers/usb/Makefile
--- a/drivers/usb/Makefile  Fri Aug  1 10:56:05 2003
+++ b/drivers/usb/Makefile  Fri Aug  1 10:56:05 2003
@@ -35,6 +35,7 @@
 obj-$(CONFIG_USB_STV680)   += media/
 obj-$(CONFIG_USB_VICAM)+= media/
 
+obj-$(CONFIG_USB_AX8817X)  += net/
 obj-$(CONFIG_USB_CATC) += net/
 obj-$(CONFIG_USB_KAWETH)   += net/
 obj-$(CONFIG_USB_PEGASUS)  += net/



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.6, 2003/07/29 22:24:20-07:00, [EMAIL PROTECTED]

[PATCH] USB: Audit usb_register() in drivers/usb/input/aiptek.c


 drivers/usb/input/aiptek.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)


diff -Nru a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
--- a/drivers/usb/input/aiptek.cFri Aug  1 10:56:25 2003
+++ b/drivers/usb/input/aiptek.cFri Aug  1 10:56:25 2003
@@ -367,10 +367,12 @@
 static int __init
 aiptek_init(void)
 {
-   usb_register(&aiptek_driver);
-   info(DRIVER_VERSION " " DRIVER_AUTHOR);
-   info(DRIVER_DESC);
-   return 0;
+   int result = usb_register(&aiptek_driver);
+   if (result == 0) {
+   info(DRIVER_VERSION " " DRIVER_AUTHOR);
+   info(DRIVER_DESC);
+   }
+   return result;
 }
 
 static void __exit



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.3, 2003/07/29 11:40:22-07:00, [EMAIL PROTECTED]

[PATCH] USB: changes due to struct usb_interface changing from a pointer to an array 
of pointers.


 drivers/media/video/cpia_usb.c  |2 +-
 drivers/usb/class/audio.c   |   14 +++---
 drivers/usb/class/cdc-acm.c |   14 +++---
 drivers/usb/class/usb-midi.c|   12 ++--
 drivers/usb/class/usblp.c   |2 +-
 drivers/usb/core/usb-debug.c|2 +-
 drivers/usb/image/scanner.c |2 +-
 drivers/usb/media/ibmcam.c  |4 ++--
 drivers/usb/media/konicawc.c|2 +-
 drivers/usb/media/ov511.c   |2 +-
 drivers/usb/media/pwc-if.c  |2 +-
 drivers/usb/misc/brlvger.c  |2 +-
 drivers/usb/net/usbnet.c|2 +-
 drivers/usb/serial/io_ti.c  |2 +-
 drivers/usb/serial/kobil_sct.c  |2 +-
 drivers/usb/serial/usb-serial.c |4 ++--
 sound/usb/usbaudio.c|   10 +-
 sound/usb/usbmixer.c|2 +-
 18 files changed, 41 insertions(+), 41 deletions(-)


diff -Nru a/drivers/media/video/cpia_usb.c b/drivers/media/video/cpia_usb.c
--- a/drivers/media/video/cpia_usb.cFri Aug  1 10:56:51 2003
+++ b/drivers/media/video/cpia_usb.cFri Aug  1 10:56:51 2003
@@ -621,7 +621,7 @@
 
udev = interface_to_usbdev(intf);
usb_driver_release_interface(&cpia_driver,
-&udev->actconfig->interface[0]);
+udev->actconfig->interface[0]);
 
ucpia->curbuff = ucpia->workbuff = NULL;
 
diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c
--- a/drivers/usb/class/audio.c Fri Aug  1 10:56:51 2003
+++ b/drivers/usb/class/audio.c Fri Aug  1 10:56:51 2003
@@ -1524,7 +1524,7 @@
 
if (u->interface < 0 || u->interface >= config->desc.bNumInterfaces)
return 0;
-   iface = &config->interface[u->interface];
+   iface = config->interface[u->interface];
 
fmtnr = find_format(as->fmtin, as->numfmtin, d->format, d->srate);
if (fmtnr < 0) {
@@ -1612,7 +1612,7 @@
 
if (u->interface < 0 || u->interface >= config->desc.bNumInterfaces)
return 0;
-   iface = &config->interface[u->interface];
+   iface = config->interface[u->interface];
 
fmtnr = find_format(as->fmtout, as->numfmtout, d->format, d->srate);
if (fmtnr < 0) {
@@ -2704,7 +2704,7 @@
if (file->f_mode & FMODE_WRITE) {
usbout_stop(as);
if (dev && as->usbout.interface >= 0) {
-   iface = &dev->actconfig->interface[as->usbout.interface];
+   iface = dev->actconfig->interface[as->usbout.interface];
usb_set_interface(dev, 
iface->altsetting->desc.bInterfaceNumber, 0);
}
dmabuf_release(&as->usbout.dma);
@@ -2713,7 +2713,7 @@
if (file->f_mode & FMODE_READ) {
usbin_stop(as);
if (dev && as->usbin.interface >= 0) {
-   iface = &dev->actconfig->interface[as->usbin.interface];
+   iface = dev->actconfig->interface[as->usbin.interface];
usb_set_interface(dev, 
iface->altsetting->desc.bInterfaceNumber, 0);
}
dmabuf_release(&as->usbin.dma);
@@ -2866,7 +2866,7 @@
/* search for input formats */
if (asifin >= 0) {
as->usbin.flags = FLG_CONNECTED;
-   iface = &config->interface[asifin];
+   iface = config->interface[asifin];
for (i = 0; i < iface->num_altsetting; i++) {
alts = &iface->altsetting[i];
if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || 
alts->desc.bInterfaceSubClass != 2)
@@ -2947,7 +2947,7 @@
/* search for output formats */
if (asifout >= 0) {
as->usbout.flags = FLG_CONNECTED;
-   iface = &config->interface[asifout];
+   iface = config->interface[asifout];
for (i = 0; i < iface->num_altsetting; i++) {
alts = &iface->altsetting[i];
if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || 
alts->desc.bInterfaceSubClass != 2)
@@ -3684,7 +3684,7 @@
   dev->devnum, ctrlif, j);
continue;
}
-   iface = &config->interface[j];
+   iface = config->interface[j];
if (iface->altsetting[0].desc.bInterfaceClass != USB_CLASS_AUDIO) {
printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u 
interface %u is not an AudioClass interface\n",
   dev->devnum, ctrlif, j);
diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
--- a/drivers/usb/class/cdc-acm.c   Fri Aug  1 10:56:51 2003
+++ b/drivers/usb/class/cdc-acm.c   Fri Aug  1 10:56:51 2003
@@ -560,16 +

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.8.8, 2003/07/30 10:35:28-07:00, [EMAIL PROTECTED]

[PATCH] USB: usb audio, remove garbage warning

There are two places where the audio driver checks for
endpoint-less interfaces, but the second one doesn't
filter out a garbage warning (without this patch).

Likely it'd be better to remove these warnings from
the driver, and maybe just place them in usbcore if
they'd ever be useful.  But this at least gets rid
of one class of "is this device broken" questions.


 drivers/usb/class/audio.c |2 ++
 1 files changed, 2 insertions(+)


diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c
--- a/drivers/usb/class/audio.c Fri Aug  1 10:56:17 2003
+++ b/drivers/usb/class/audio.c Fri Aug  1 10:56:17 2003
@@ -2953,6 +2953,8 @@
if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || 
alts->desc.bInterfaceSubClass != 2)
continue;
if (alts->desc.bNumEndpoints < 1) {
+   /* altsetting 0 should never have iso EPs */
+   if (alts->desc.bAlternateSetting != 0)
printk(KERN_ERR "usbaudio: device %u interface %u 
altsetting %u does not have an endpoint\n", 
   dev->devnum, asifout, i);
continue;



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1625, 2003/08/01 10:52:27-07:00, [EMAIL PROTECTED]

USB: fix up ALSA merge due to struct usb_interface changes.


 sound/usb/usbaudio.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
--- a/sound/usb/usbaudio.c  Fri Aug  1 10:53:26 2003
+++ b/sound/usb/usbaudio.c  Fri Aug  1 10:53:26 2003
@@ -1182,7 +1182,7 @@
struct usb_host_config *config = subs->dev->actconfig;
struct usb_host_interface *alts;
struct usb_interface *iface;
-   iface = &config->interface[fmt->iface];
+   iface = config->interface[fmt->iface];
alts = &iface->altsetting[fmt->altset_idx];
ret = init_usb_sample_rate(subs->dev, subs->interface, alts, fmt, 
rate);
if (ret < 0)



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.15, 2003/07/30 13:15:39-07:00, [EMAIL PROTECTED]

[PATCH] USB: fix memory leak in auerswald driver.

Thanks to Joilnen Leite <[EMAIL PROTECTED]> for pointing this out.


 drivers/usb/misc/auerswald.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
--- a/drivers/usb/misc/auerswald.c  Fri Aug  1 10:55:07 2003
+++ b/drivers/usb/misc/auerswald.c  Fri Aug  1 10:55:07 2003
@@ -774,7 +774,7 @@
 /* requirement: auerbuf_init() */
 static int auerbuf_setup (pauerbufctl_t bcp, unsigned int numElements, unsigned int 
bufsize)
 {
-pauerbuf_t bep;
+pauerbuf_t bep = NULL;
 
 dbg ("auerbuf_setup called with %d elements of %d bytes", numElements, 
bufsize);
 
@@ -801,6 +801,7 @@
 
 bl_fail:/* not enough memory. Free allocated elements */
 dbg ("auerbuf_setup: no more memory");
+   kfree(bep);
 auerbuf_free_buffers (bcp);
 return -ENOMEM;
 }



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.24, 2003/07/31 13:46:45-07:00, [EMAIL PROTECTED]

[PATCH] USB: added support for TIOCM_RI and TIOCM_CD to pl2303 driver and fix stupid 
bug.

Thanks to Paulo Marques <[EMAIL PROTECTED]> for finding this.


 drivers/usb/serial/pl2303.c |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
--- a/drivers/usb/serial/pl2303.c   Fri Aug  1 10:54:28 2003
+++ b/drivers/usb/serial/pl2303.c   Fri Aug  1 10:54:28 2003
@@ -61,7 +61,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v0.9"
+#define DRIVER_VERSION "v0.10"
 #define DRIVER_DESC "Prolific PL2303 USB to serial adaptor driver"
 
 
@@ -550,7 +550,9 @@
result = ((mcr & CONTROL_DTR)   ? TIOCM_DTR : 0)
  | ((mcr & CONTROL_RTS)? TIOCM_RTS : 0)
  | ((status & UART_CTS)? TIOCM_CTS : 0)
- | ((status & UART_DSR)? TIOCM_DSR : 0);
+ | ((status & UART_DSR)? TIOCM_DSR : 0)
+ | ((status & UART_RING)   ? TIOCM_RI  : 0)
+ | ((status & UART_DCD)? TIOCM_CD  : 0);
 
dbg("%s - result = %x", __FUNCTION__, result);
 
@@ -637,7 +639,7 @@
 
usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, 
urb->transfer_buffer);
 
-   if (urb->actual_length > UART_STATE)
+   if (urb->actual_length < UART_STATE)
goto exit;
 
/* Save off the uart status for others to look at */



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.25, 2003/07/31 22:46:30-07:00, [EMAIL PROTECTED]

[PATCH] USB: ftdi_sio - additional pids

Wayne Wylupski sent some more PIDs (in a patch, but I've modified
it) for the ftdi_sio driver to the ftdi-usb-sio-devel list.  These
PIDs were for additional CrystalFontz LCD displays.

An earlier patch from David Glance for the DSS-20 SyncStation was
applied to the 2.6 tree.  This did not have a changelog entry in
the file header comment of ftdi_sio.c, so I have retroactively
added one in the attached patch.


 drivers/usb/serial/ftdi_sio.c |   31 ---
 drivers/usb/serial/ftdi_sio.h |   10 --
 2 files changed, 36 insertions(+), 5 deletions(-)


diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
--- a/drivers/usb/serial/ftdi_sio.c Fri Aug  1 10:54:23 2003
+++ b/drivers/usb/serial/ftdi_sio.c Fri Aug  1 10:54:23 2003
@@ -17,6 +17,13 @@
  * See http://ftdi-usb-sio.sourceforge.net for upto date testing info
  * and extra documentation
  *
+ * (23/Jul/2003) Ian Abbott
+ *  Added PIDs for CrystalFontz 547, 633, 631, 635, 640 and 640 from
+ *  Wayne Wylupski.
+ *
+ * (10/Jul/2003) David Glance
+ *  Added PID for DSS-20 SyncStation cradle for Sony-Ericsson P800.
+ *
  * (27/Jun/2003) Ian Abbott
  * Reworked the urb handling logic.  We have no more pool, but dynamically
  * allocate the urb and the transfer buffer on the fly.  In testing this
@@ -254,8 +261,14 @@
{ USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0, 0x3ff) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0, 0x3ff) },
{ USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0, 0x3ff) },
-   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_634_PID, 0, 0x3ff) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0, 0x3ff) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_634_PID, 0, 0x3ff) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_547_PID, 0, 0x3ff) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_633_PID, 0, 0x3ff) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_631_PID, 0, 0x3ff) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_635_PID, 0, 0x3ff) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_640_PID, 0, 0x3ff) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_642_PID, 0, 0x3ff) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_VNHCPCUSB_D_PID, 0, 0x3ff) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_DSS20_PID, 0, 0x3ff) },
{ USB_DEVICE_VER(FTDI_MTXORB_VID, FTDI_MTXORB_0_PID, 0, 0x3ff) },
@@ -319,8 +332,14 @@
{ USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0x400, 0x) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0x400, 0x) },
{ USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0x400, 0x) },
-   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_634_PID, 0x400, 0x) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0x400, 0x) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_634_PID, 0x400, 0x) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_547_PID, 0x400, 0x) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_633_PID, 0x400, 0x) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_631_PID, 0x400, 0x) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_635_PID, 0x400, 0x) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_640_PID, 0x400, 0x) },
+   { USB_DEVICE_VER(FTDI_VID, FTDI_XF_642_PID, 0x400, 0x) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_VNHCPCUSB_D_PID, 0x400, 0x) },
{ USB_DEVICE_VER(FTDI_VID, FTDI_DSS20_PID, 0x400, 0x) },
{ USB_DEVICE_VER(FTDI_MTXORB_VID, FTDI_MTXORB_0_PID, 0x400, 0x) },
@@ -396,8 +415,14 @@
{ USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
-   { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
+   { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
+   { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
+   { USB_DEVICE(FTDI_VID, FTDI_XF_633_PID) },
+   { USB_DEVICE(FTDI_VID, FTDI_XF_631_PID) },
+   { USB_DEVICE(FTDI_VID, FTDI_XF_635_PID) },
+   { USB_DEVICE(FTDI_VID, FTDI_XF_640_PID) },
+   { USB_DEVICE(FTDI_VID, FTDI_XF_642_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_DSS20_PID) },
{ USB_DEVICE(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_VNHCPCUSB_D_PID) },
diff -Nru a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
--- a/drivers/usb/serial/ftdi_sio.h Fri Aug  1 10:54:23 2003
+++ b/drivers/usb/serial/ftdi_sio.h Fri Aug  1 10:54:23 2003
@@ -32,8 +32,14 @@
 
 /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */
 /* they use the ftdi chipset for the USB interface and the vendor id is the same */
-#define FTDI_XF_634_PID  0xFC09/* Four line device */
-#define FTDI_XF_632_PID  0xFC08/* Two line device */
+#define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */
+#define FTDI_XF_634_PID 0xFC09 /* 634: 20x4 Charact

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.17, 2003/07/30 13:19:15-07:00, [EMAIL PROTECTED]

[PATCH] USB: fix race condition in usblp_write

  - fix timeout handling


 drivers/usb/class/usblp.c |6 ++
 1 files changed, 6 insertions(+)


diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c Fri Aug  1 10:54:58 2003
+++ b/drivers/usb/class/usblp.c Fri Aug  1 10:54:58 2003
@@ -626,6 +626,12 @@
}
}
remove_wait_queue(&usblp->wait, &wait);
+   if (!timeout) {
+   /* we timed out and need to bail out cleanly */
+   usb_unlink_urb(usblp->writeurb);
+   return writecount ? writecount : -EIO;
+   }
+
}
 
down (&usblp->sem);



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.5, 2003/07/30 12:37:29-07:00, [EMAIL PROTECTED]

USB: fix bug if open() fails in usb-serial device.


 drivers/usb/serial/usb-serial.c |1 +
 1 files changed, 1 insertion(+)


diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c   Fri Aug  1 10:55:52 2003
+++ b/drivers/usb/serial/usb-serial.c   Fri Aug  1 10:55:52 2003
@@ -489,6 +489,7 @@
if (retval) {
port->open_count = 0;
module_put(serial->type->owner);
+   kobject_put(&serial->kobj);
}
}
 bailout:



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.11, 2003/07/30 13:01:04-07:00, [EMAIL PROTECTED]

[PATCH] USB: Support sharp zaurus C-750

>From [EMAIL PROTECTED]

This adds support for another handheld from sharp to 2.6.0-test1


 drivers/usb/net/usbnet.c |9 +
 1 files changed, 9 insertions(+)


diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c  Fri Aug  1 10:55:26 2003
+++ b/drivers/usb/net/usbnet.c  Fri Aug  1 10:55:26 2003
@@ -2769,6 +2769,15 @@
.bInterfaceSubClass = 0x0a,
.bInterfaceProtocol = 0x00,
.driver_info =  (unsigned long) &zaurus_slc700_info,
+}, {
+   .match_flags=   USB_DEVICE_ID_MATCH_INT_INFO
+| USB_DEVICE_ID_MATCH_DEVICE,
+   .idVendor   = 0x04DD,
+   .idProduct  = 0x9031,
+   .bInterfaceClass= 0x02,
+   .bInterfaceSubClass = 0x0a,
+   .bInterfaceProtocol = 0x00,
+   .driver_info =  (unsigned long) &zaurus_sla300_info,
 },
 #endif
 



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.31, 2003/07/31 22:50:19-07:00, [EMAIL PROTECTED]

[PATCH] USB: Use the new enable/disable routines

This is the third part of what used to be as66c.  The patch makes several
changes in the routines that handle unbinding and selecting altsettings
and configurations.

Upon unbinding a driver, don't nuke all the URBs for the device
-- only kill the ones on the driver's interface.  Afterwards,
reinitialize the interface by selecting altsetting 0 (the
default).

When changing an altsetting, if the interface has only one
altsetting it is allowed to STALL the request.  Attempt to carry
out the equivalent initialization by clearing the HALT feature
on each of the interface's endpoints.

When changing configurations, mark each interface as being in
altsetting 0.

In general, use the new disable/enable routines instead of doing
everything by hand.


 drivers/usb/core/message.c |   93 ++---
 drivers/usb/core/usb.c |   50 
 2 files changed, 65 insertions(+), 78 deletions(-)


diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.cFri Aug  1 10:53:59 2003
+++ b/drivers/usb/core/message.cFri Aug  1 10:53:59 2003
@@ -922,9 +922,8 @@
 int usb_set_interface(struct usb_device *dev, int interface, int alternate)
 {
struct usb_interface *iface;
-   struct usb_host_interface *iface_as;
-   int i, ret;
-   void (*disable)(struct usb_device *, int) = dev->bus->op->disable;
+   int ret;
+   int manual = 0;
 
iface = usb_ifnum_to_if(dev, interface);
if (!iface) {
@@ -932,22 +931,23 @@
return -EINVAL;
}
 
-   /* 9.4.10 says devices don't need this, if the interface
-  only has one alternate setting */
-   if (iface->num_altsetting == 1) {
-   dbg("ignoring set_interface for dev %d, iface %d, alt %d",
-   dev->devnum, interface, alternate);
-   return 0;
-   }
-
if (alternate < 0 || alternate >= iface->num_altsetting)
return -EINVAL;
 
-   if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+   ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
   USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE,
   iface->altsetting[alternate]
.desc.bAlternateSetting,
-  interface, NULL, 0, HZ * 5)) < 0)
+  interface, NULL, 0, HZ * 5);
+
+   /* 9.4.10 says devices don't need this and are free to STALL the
+* request if the interface only has one alternate setting.
+*/
+   if (ret == -EPIPE && iface->num_altsetting == 1) {
+   dbg("manual set_interface for dev %d, iface %d, alt %d",
+   dev->devnum, interface, alternate);
+   manual = 1;
+   } else if (ret < 0)
return ret;
 
/* FIXME drivers shouldn't need to replicate/bugfix the logic here
@@ -957,20 +957,32 @@
 */
 
/* prevent submissions using previous endpoint settings */
-   iface_as = iface->altsetting + iface->act_altsetting;
-   for (i = 0; i < iface_as->desc.bNumEndpoints; i++) {
-   u8  ep = iface_as->endpoint [i].desc.bEndpointAddress;
-   int out = !(ep & USB_DIR_IN);
-
-   /* clear out hcd state, then usbcore state */
-   if (disable)
-   disable (dev, ep);
-   ep &= USB_ENDPOINT_NUMBER_MASK;
-   (out ? dev->epmaxpacketout : dev->epmaxpacketin ) [ep] = 0;
-   }
+   usb_disable_interface(dev, iface);
+
iface->act_altsetting = alternate;
 
-   /* 9.1.1.5: reset toggles for all endpoints affected by this iface-as
+   /* If the interface only has one altsetting and the device didn't
+* accept the request, we attempt to carry out the equivalent action
+* by manually clearing the HALT feature for each endpoint in the
+* new altsetting.
+*/
+   if (manual) {
+   struct usb_host_interface *iface_as =
+   &iface->altsetting[alternate];
+   int i;
+
+   for (i = 0; i < iface_as->desc.bNumEndpoints; i++) {
+   unsigned int epaddr =
+   iface_as->endpoint[i].desc.bEndpointAddress;
+   unsigned int pipe =
+   __create_pipe(dev, USB_ENDPOINT_NUMBER_MASK & epaddr)
+   | (usb_endpoint_out(epaddr) ? USB_DIR_OUT : USB_DIR_IN);
+
+   usb_clear_halt(dev, pipe);
+   }
+   }
+
+   /* 9.1.1.5: reset toggles for all endpoints in the new altsetting
 *
 * Note:
 * Despite 

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.8, 2003/07/30 12:52:21-07:00, [EMAIL PROTECTED]

[PATCH] USB: bluetty: remove write_urb_pool logic, fixing locking issues.

Now we just throw urbs at the device as fast as we can.


 drivers/usb/class/bluetty.c |  178 +---
 1 files changed, 55 insertions(+), 123 deletions(-)


diff -Nru a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c
--- a/drivers/usb/class/bluetty.c   Fri Aug  1 10:55:40 2003
+++ b/drivers/usb/class/bluetty.c   Fri Aug  1 10:55:40 2003
@@ -190,7 +190,6 @@
int bulk_in_buffer_size;
 
int bulk_out_buffer_size;
-   struct urb *write_urb_pool[NUM_BULK_URBS];
__u8bulk_out_endpointAddress;
 
wait_queue_head_t   write_wait;
@@ -408,7 +407,6 @@
 static void bluetooth_close (struct tty_struct *tty, struct file * filp)
 {
struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth 
*)tty->driver_data, __FUNCTION__);
-   int i;
 
if (!bluetooth) {
return;
@@ -427,9 +425,7 @@
if (bluetooth->open_count <= 0) {
bluetooth->open_count = 0;
 
-   /* shutdown any bulk reads and writes that might be going on */
-   for (i = 0; i < NUM_BULK_URBS; ++i)
-   usb_unlink_urb (bluetooth->write_urb_pool[i]);
+   /* shutdown any in-flight urbs that we know about */
usb_unlink_urb (bluetooth->read_urb);
usb_unlink_urb (bluetooth->interrupt_in_urb);
}
@@ -443,9 +439,7 @@
struct urb *urb = NULL;
unsigned char *temp_buffer = NULL;
const unsigned char *current_buffer;
-   const unsigned char *current_position;
-   int bytes_sent;
-   int buffer_size;
+   unsigned char *urb_buffer;
int i;
int retval = 0;
 
@@ -506,54 +500,46 @@
break;
 
case ACL_PKT:
-   current_position = current_buffer;
-   ++current_position;
+   ++current_buffer;
--count;
-   bytes_sent = 0;
 
-   while (count > 0) {
-   urb = NULL;
+   urb_buffer = kmalloc (count, GFP_ATOMIC);
+   if (!urb_buffer) {
+   dev_err(&bluetooth->dev->dev, "out of memory\n");
+   retval = -ENOMEM;
+   goto exit;
+   }
 
-   /* try to find a free urb in our list */
-   for (i = 0; i < NUM_BULK_URBS; ++i) {
-   if (bluetooth->write_urb_pool[i]->status != 
-EINPROGRESS) {
-   urb = bluetooth->write_urb_pool[i];
-   break;
-   }
-   }
-   if (urb == NULL) {
-   dbg ("%s - no free urbs", __FUNCTION__);
-   retval = bytes_sent;
-   goto exit;
-   }
-   
-
-   buffer_size = min (count, 
bluetooth->bulk_out_buffer_size);
-   memcpy (urb->transfer_buffer, current_position, 
buffer_size);
-
-   /* build up our urb */
-   usb_fill_bulk_urb (urb, bluetooth->dev, 
usb_sndbulkpipe(bluetooth->dev, bluetooth->bulk_out_endpointAddress),
-   urb->transfer_buffer, buffer_size, 
bluetooth_write_bulk_callback, bluetooth);
-
-   /* send it down the pipe */
-   retval = usb_submit_urb(urb, GFP_KERNEL);
-   if (retval) {
-   dbg("%s - usb_submit_urb(write bulk) failed 
with error = %d", __FUNCTION__, retval);
-   goto exit;
-   }
-#ifdef BTBUGGYHARDWARE
-   /* A workaround for the stalled data bug */
-   /* May or may not be needed...*/
-   if (count != 0) {
-   udelay(500);
-   }
-#endif
-   current_position += buffer_size;
-   bytes_sent += buffer_size;
-   count -= buffer_size;
+   urb = usb_alloc_urb(0, GFP_ATOMIC);
+   if (!urb) {
+   dev_err(&bluetooth->dev->dev, "no more free urbs\n");
+  

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.23, 2003/07/30 14:24:29-07:00, [EMAIL PROTECTED]

[PATCH] USB: Rename usb_connect() to usb_choose_address()

This revised patch includes the change that David Brownell asked for.  It
renames usb_connect() to usb_choose_address(), no longer exports the
function, and adds equivalent functionality to usb_register_root_hub().
It also removes the unnecessary (and incorrect) assignment to
bMaxPacketSize0.


 drivers/usb/core/hcd.c |8 +++-
 drivers/usb/core/hcd.h |2 +-
 drivers/usb/core/hub.c |2 +-
 drivers/usb/core/usb.c |   11 +++
 drivers/usb/host/ehci-hcd.c|1 -
 drivers/usb/host/hc_sl811_rh.c |5 -
 drivers/usb/host/ohci-hcd.c|1 -
 drivers/usb/host/uhci-hcd.c|1 -
 8 files changed, 16 insertions(+), 15 deletions(-)


diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.cFri Aug  1 10:54:34 2003
+++ b/drivers/usb/core/hcd.cFri Aug  1 10:54:34 2003
@@ -734,14 +734,20 @@
  * The USB host controller calls this function to register the root hub
  * properly with the USB subsystem.  It sets up the device properly in
  * the driverfs tree, and then calls usb_new_device() to register the
- * usb device.
+ * usb device.  It also assigns the root hub's USB address (always 1).
  */
 int usb_register_root_hub (struct usb_device *usb_dev, struct device *parent_dev)
 {
+   const int devnum = 1;
int retval;
 
sprintf (&usb_dev->dev.bus_id[0], "usb%d", usb_dev->bus->busnum);
usb_dev->state = USB_STATE_DEFAULT;
+
+   usb_dev->devnum = devnum;
+   usb_dev->bus->devnum_next = devnum + 1;
+   set_bit (devnum, usb_dev->bus->devmap.devicemap);
+
retval = usb_new_device (usb_dev, parent_dev);
if (retval)
dev_err (parent_dev, "can't register root hub for %s, %d\n",
diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
--- a/drivers/usb/core/hcd.hFri Aug  1 10:54:34 2003
+++ b/drivers/usb/core/hcd.hFri Aug  1 10:54:34 2003
@@ -246,7 +246,7 @@
 
 /* Enumeration is only for the hub driver, or HCD virtual root hubs */
 extern int usb_new_device(struct usb_device *dev, struct device *parent);
-extern void usb_connect(struct usb_device *dev);
+extern void usb_choose_address(struct usb_device *dev);
 extern void usb_disconnect(struct usb_device **);
 
 /* exported to hub driver ONLY to support usb_reset_device () */
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.cFri Aug  1 10:54:34 2003
+++ b/drivers/usb/core/hub.cFri Aug  1 10:54:34 2003
@@ -932,7 +932,7 @@
}
 
/* Find a new address for it */
-   usb_connect(dev);
+   usb_choose_address(dev);
 
/* Set up TT records, if needed  */
if (hub->tt) {
diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.cFri Aug  1 10:54:34 2003
+++ b/drivers/usb/core/usb.cFri Aug  1 10:54:34 2003
@@ -945,25 +945,21 @@
 }
 
 /**
- * usb_connect - pick device address (usbcore-internal)
+ * usb_choose_address - pick device address (usbcore-internal)
  * @dev: newly detected device (in DEFAULT state)
  *
  * Picks a device address.  It's up to the hub (or root hub) driver
  * to handle and manage enumeration, starting from the DEFAULT state.
- * Only hub drivers (including virtual root hub drivers for host
+ * Only hub drivers (but not virtual root hub drivers for host
  * controllers) should ever call this.
  */
-void usb_connect(struct usb_device *dev)
+void usb_choose_address(struct usb_device *dev)
 {
int devnum;
// FIXME needs locking for SMP!!
/* why? this is called only from the hub thread, 
 * which hopefully doesn't run on multiple CPU's simultaneously 8-)
-* ... it's also called from modprobe/rmmod/apmd threads as part
-* of virtual root hub init/reinit.  In the init case, the hub code 
-* won't have seen this, but not so for reinit ... 
 */
-   dev->descriptor.bMaxPacketSize0 = 8;  /* Start off at 8 bytes  */
 
/* Try to allocate the next devnum beginning at bus->devnum_next. */
devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, 
dev->bus->devnum_next);
@@ -1607,7 +1603,6 @@
 
 EXPORT_SYMBOL(usb_new_device);
 EXPORT_SYMBOL(usb_reset_device);
-EXPORT_SYMBOL(usb_connect);
 EXPORT_SYMBOL(usb_disconnect);
 
 EXPORT_SYMBOL(__usb_get_extra_descriptor);
diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c   Fri Aug  1 10:54:34 2003
+++ b/drivers/usb/host/ehci-hcd.c   Fri Aug  1 10:54:34 2003
@@ -497,7 +497,6 @@
 * Before this point the HC was idle/ready.  After, khubd
 * and device drivers may start it running.
 */
-   usb_connect (udev);
udev->speed = USB_SPEED_HIGH;
if (hcd_register_root (hcd) != 0) {
  

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.30, 2003/07/31 22:49:50-07:00, [EMAIL PROTECTED]

[PATCH] USB: Add functions to enable/disable endpoints, interfaces

This is the second part of what used to be as66c.  It fixes the
initialization of the debugging macros in core/message.c and adds routines
to enable/disable endpoints, interfaces, and entire devices.  The code
that _uses_ these routines will come in the next patch.

 # Initialize the debugging macros properly in message.c.
 #
 # Add usb_disable_endpoint(), usb_disable_interface(), usb_disable_device(),
 # usb_enable_endpoint(), and usb_enable_interface().


 drivers/usb/core/message.c |  127 +
 drivers/usb/core/usb.h |   10 +++
 2 files changed, 137 insertions(+)


diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.cFri Aug  1 10:54:03 2003
+++ b/drivers/usb/core/message.cFri Aug  1 10:54:03 2003
@@ -2,6 +2,14 @@
  * message.c - synchronous message handling
  */
 
+#include 
+
+#ifdef CONFIG_USB_DEBUG
+   #define DEBUG
+#else
+   #undef DEBUG
+#endif
+
 #include  /* for scatterlist macros */
 #include 
 #include 
@@ -11,6 +19,7 @@
 #include 
 
 #include "hcd.h"   /* for usbcore internals */
+#include "usb.h"
 
 struct usb_api_data {
wait_queue_head_t wqh;
@@ -757,6 +766,124 @@
usb_endpoint_running(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
 
return 0;
+}
+
+/**
+ * usb_disable_endpoint -- Disable an endpoint by address
+ * @dev: the device whose endpoint is being disabled
+ * @epaddr: the endpoint's address.  Endpoint number for output,
+ * endpoint number + USB_DIR_IN for input
+ *
+ * Deallocates hcd/hardware state for this endpoint ... and nukes all
+ * pending urbs.
+ *
+ * If the HCD hasn't registered a disable() function, this marks the
+ * endpoint as halted and sets its maxpacket size to 0 to prevent
+ * further submissions.
+ */
+void usb_disable_endpoint(struct usb_device *dev, unsigned int epaddr)
+{
+   if (dev && dev->bus && dev->bus->op && dev->bus->op->disable)
+   dev->bus->op->disable(dev, epaddr);
+   else {
+   unsigned int epnum = epaddr & USB_ENDPOINT_NUMBER_MASK;
+
+   if (usb_endpoint_out(epaddr)) {
+   usb_endpoint_halt(dev, epnum, 1);
+   dev->epmaxpacketout[epnum] = 0;
+   } else {
+   usb_endpoint_halt(dev, epnum, 0);
+   dev->epmaxpacketin[epnum] = 0;
+   }
+   }
+}
+
+/**
+ * usb_disable_interface -- Disable all endpoints for an interface
+ * @dev: the device whose interface is being disabled
+ * @intf: pointer to the interface descriptor
+ *
+ * Disables all the endpoints for the interface's current altsetting.
+ */
+void usb_disable_interface(struct usb_device *dev, struct usb_interface *intf)
+{
+   struct usb_host_interface *hintf =
+   &intf->altsetting[intf->act_altsetting];
+   int i;
+
+   for (i = 0; i < hintf->desc.bNumEndpoints; ++i) {
+   usb_disable_endpoint(dev,
+   hintf->endpoint[i].desc.bEndpointAddress);
+   }
+}
+
+/*
+ * usb_disable_device - Disable all the endpoints for a USB device
+ * @dev: the device whose endpoints are being disabled
+ * @skip_ep0: 0 to disable endpoint 0, 1 to skip it.
+ *
+ * Disables all the device's endpoints, potentially including endpoint 0.
+ * Deallocates hcd/hardware state for the endpoints ... and nukes all
+ * pending urbs.
+ */
+void usb_disable_device(struct usb_device *dev, int skip_ep0)
+{
+   int i;
+
+   dbg("nuking URBs for device %s", dev->dev.bus_id);
+   for (i = skip_ep0; i < 16; ++i) {
+   usb_disable_endpoint(dev, i);
+   usb_disable_endpoint(dev, i + USB_DIR_IN);
+   }
+}
+
+
+/*
+ * usb_enable_endpoint - Enable an endpoint for USB communications
+ * @dev: the device whose interface is being enabled
+ * @epd: pointer to the endpoint descriptor
+ *
+ * Marks the endpoint as running, resets its toggle, and stores
+ * its maxpacket value.  For control endpoints, both the input
+ * and output sides are handled.
+ */
+void usb_enable_endpoint(struct usb_device *dev,
+   struct usb_endpoint_descriptor *epd)
+{
+   int maxsize = epd->wMaxPacketSize;
+   unsigned int epaddr = epd->bEndpointAddress;
+   unsigned int epnum = epaddr & USB_ENDPOINT_NUMBER_MASK;
+   int is_control = ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
+   USB_ENDPOINT_XFER_CONTROL);
+
+   if (usb_endpoint_out(epaddr) || is_control) {
+   usb_endpoint_running(dev, epnum, 1);
+   usb_settoggle(dev, epnum, 1, 0);
+   dev->epmaxpacketout[epnum] = maxsize;
+   }
+   if (!usb_endpoint_out(epaddr) || is_control) {
+   usb_endpoint_running(dev, epnum, 0);
+   usb_settoggl

[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1624, 2003/08/01 10:08:22-07:00, [EMAIL PROTECTED]

[PATCH] USB: Remove usb_set_maxpacket()

This is the final part of as66c.  It removes the usb_set_maxpacket()
routine, since the same functionality now exists elsewhere.  The one place
it was used was in the device reset pathway for a device that has changed
somehow since the previous reset.  That code needs to be fixed up anyway;
for now it's enough just to have it call usb_set_configuration().


 drivers/usb/core/hcd.h |1 -
 drivers/usb/core/hub.c |4 +---
 drivers/usb/core/message.c |   35 ---
 3 files changed, 1 insertion(+), 39 deletions(-)


diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
--- a/drivers/usb/core/hcd.hFri Aug  1 10:53:30 2003
+++ b/drivers/usb/core/hcd.hFri Aug  1 10:53:30 2003
@@ -252,7 +252,6 @@
 
 /* exported to hub driver ONLY to support usb_reset_device () */
 extern int usb_get_configuration(struct usb_device *dev);
-extern void usb_set_maxpacket(struct usb_device *dev);
 extern void usb_destroy_configuration(struct usb_device *dev);
 extern int usb_set_address(struct usb_device *dev);
 
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.cFri Aug  1 10:53:30 2003
+++ b/drivers/usb/core/hub.cFri Aug  1 10:53:30 2003
@@ -1331,9 +1331,7 @@
return 1;
}
 
-   dev->actconfig = dev->config;
-   usb_set_maxpacket(dev);
-
+   usb_set_configuration(dev, dev->config[0].desc.bConfigurationValue);
return 1;
}
 
diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.cFri Aug  1 10:53:30 2003
+++ b/drivers/usb/core/message.cFri Aug  1 10:53:30 2003
@@ -675,41 +675,6 @@
HZ * USB_CTRL_GET_TIMEOUT);
 }
 
-
-// hub-only!! ... and only exported for reset/reinit path.
-// otherwise used internally, when setting up a config
-void usb_set_maxpacket(struct usb_device *dev)
-{
-   int i, b;
-
-   /* NOTE:  affects all endpoints _except_ ep0 */
-   for (i=0; iactconfig->desc.bNumInterfaces; i++) {
-   struct usb_interface *ifp = dev->actconfig->interface[i];
-   struct usb_host_interface *as = ifp->altsetting + ifp->act_altsetting;
-   struct usb_host_endpoint *ep = as->endpoint;
-   int e;
-
-   for (e=0; edesc.bNumEndpoints; e++) {
-   struct usb_endpoint_descriptor  *d;
-   d = &ep [e].desc;
-   b = d->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
-   if ((d->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
-   USB_ENDPOINT_XFER_CONTROL) {/* Control => 
bidirectional */
-   dev->epmaxpacketout[b] = d->wMaxPacketSize;
-   dev->epmaxpacketin [b] = d->wMaxPacketSize;
-   }
-   else if (usb_endpoint_out(d->bEndpointAddress)) {
-   if (d->wMaxPacketSize > dev->epmaxpacketout[b])
-   dev->epmaxpacketout[b] = d->wMaxPacketSize;
-   }
-   else {
-   if (d->wMaxPacketSize > dev->epmaxpacketin [b])
-   dev->epmaxpacketin [b] = d->wMaxPacketSize;
-   }
-   }
-   }
-}
-
 /**
  * usb_clear_halt - tells device to clear endpoint halt/stall condition
  * @dev: device whose endpoint is halted



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1623, 2003/08/01 10:08:08-07:00, [EMAIL PROTECTED]

[PATCH] USB: hcd initialization fix

This cleans up HCD initialization by adding an explicit
reset step, putting the device into a known state before
resources are allocated.  This step is implemented for
EHCI, since some BIOS firmware seems to act quirky there,
but nothing else yet.  (OHCI would be just easy too.)


 drivers/usb/core/hcd-pci.c  |   21 ++---
 drivers/usb/core/hcd.h  |1 +
 drivers/usb/host/ehci-hcd.c |   31 ++-
 3 files changed, 33 insertions(+), 20 deletions(-)


diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
--- a/drivers/usb/core/hcd-pci.cFri Aug  1 10:53:34 2003
+++ b/drivers/usb/core/hcd-pci.cFri Aug  1 10:53:34 2003
@@ -122,10 +122,9 @@
base = (void *) resource;
}
 
-   // driver->start(), later on, will transfer device from
+   // driver->reset(), later on, will transfer device from
// control by SMM/BIOS to control by Linux (if needed)
 
-   pci_set_master (dev);
hcd = driver->hcd_alloc ();
if (hcd == NULL){
dbg ("hcd alloc fail");
@@ -140,6 +139,9 @@
return retval;
}
}
+   hcd->regs = base;
+   hcd->region = region;
+
pci_set_drvdata (dev, hcd);
hcd->driver = driver;
hcd->description = driver->description;
@@ -157,22 +159,27 @@
 
dev_info (hcd->controller, "%s\n", hcd->product_desc);
 
+   /* till now HC has been in an indeterminate state ... */
+   if (driver->reset && (retval = driver->reset (hcd)) < 0) {
+   dev_err (hcd->controller, "can't reset\n");
+   goto clean_3;
+   }
+
+   pci_set_master (dev);
 #ifndef __sparc__
sprintf (buf, "%d", dev->irq);
 #else
bufp = __irq_itoa(dev->irq);
 #endif
-   if (request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ, hcd->description, hcd)
-   != 0) {
+   retval = request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ,
+   hcd->description, hcd);
+   if (retval != 0) {
dev_err (hcd->controller,
"request interrupt %s failed\n", bufp);
-   retval = -EBUSY;
goto clean_3;
}
hcd->irq = dev->irq;
 
-   hcd->regs = base;
-   hcd->region = region;
dev_info (hcd->controller, "irq %s, %s %p\n", bufp,
(driver->flags & HCD_MEMORY) ? "pci mem" : "io base",
base);
diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
--- a/drivers/usb/core/hcd.hFri Aug  1 10:53:34 2003
+++ b/drivers/usb/core/hcd.hFri Aug  1 10:53:34 2003
@@ -173,6 +173,7 @@
 #defineHCD_USB20x0020  /* USB 2.0 */
 
/* called to init HCD and root hub */
+   int (*reset) (struct usb_hcd *hcd);
int (*start) (struct usb_hcd *hcd);
 
/* called after all devices were suspended */
diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c   Fri Aug  1 10:53:34 2003
+++ b/drivers/usb/host/ehci-hcd.c   Fri Aug  1 10:53:34 2003
@@ -318,28 +318,21 @@
 
 /* called by khubd or root hub init threads */
 
-static int ehci_start (struct usb_hcd *hcd)
+static int ehci_hc_reset (struct usb_hcd *hcd)
 {
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
u32 temp;
-   struct usb_device   *udev;
-   struct usb_bus  *bus;
-   int retval;
-   u32 hcc_params;
-   u8  tempbyte;
 
spin_lock_init (&ehci->lock);
 
ehci->caps = (struct ehci_caps *) hcd->regs;
ehci->regs = (struct ehci_regs *) (hcd->regs +
readb (&ehci->caps->length));
-   dbg_hcs_params (ehci, "ehci_start");
-   dbg_hcc_params (ehci, "ehci_start");
-
-   hcc_params = readl (&ehci->caps->hcc_params);
+   dbg_hcs_params (ehci, "reset");
+   dbg_hcc_params (ehci, "reset");
 
/* EHCI 0.96 and later may have "extended capabilities" */
-   temp = HCC_EXT_CAPS (hcc_params);
+   temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params));
while (temp) {
u32 cap;
 
@@ -364,8 +357,18 @@
ehci->hcs_params = readl (&ehci->caps->hcs_params);
 
/* force HC to halt state */
-   if ((retval = ehci_halt (ehci)) != 0)
-   return retval;
+   return ehci_halt (ehci);
+}
+
+static int ehci_start (struct usb_hcd *hcd)
+{
+   struct ehci_hcd *ehci = hcd_to_ehci (hcd);
+   u32 temp;
+   struct usb_device   *udev;
+   struct usb_bus  *bus;
+   int retval;
+   u32 hcc_params;
+   u8  tempbyte;