[linux-usb-devel] Re: [patch 2.5.60-test2] usb root hubs need longer timeout

2003-08-01 Thread Greg KH
On Thu, Jul 31, 2003 at 04:31:38PM -0700, David Brownell wrote:
 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!
 
 Please merge.

Applied, thanks.

greg k-h


---
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: (as75) Rename probe and unbind functions

2003-08-01 Thread Greg KH
On Thu, Jul 31, 2003 at 04:25:10PM -0400, Alan Stern wrote:
 Greg:
 
 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.

Thanks a lot for splitting these up.

Applied, thanks.

greg k-h


---
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: (as74) More unusual_devs.h stuff

2003-08-01 Thread Greg KH
On Thu, Jul 31, 2003 at 04:10:50PM -0400, Alan Stern wrote:
 Greg:
 
 Here are updates to unusual_devs.h sent in by users.  They apply to both 
 2.4.22 and 2.6.0.

Applied, thanks.

greg k-h


---
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: (as76) Add functions to enable/disable endpoints, interfaces

2003-08-01 Thread Greg KH
On Thu, Jul 31, 2003 at 04:35:44PM -0400, Alan Stern wrote:
 Greg:
 
 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.

Applied, thanks.

greg k-h


---
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: (as63) Small fixes for usbtest

2003-08-01 Thread Greg KH
On Thu, Jul 31, 2003 at 04:05:51PM -0400, Alan Stern wrote:
 Greg:
 
 I sent this patch in (and David Brownell approved it) during the time you 
 were busy with OLS.  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.
 
 Please apply.

Applied, thanks.

greg k-h


---
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] Patch : Select other-than-default configuration when no driver available for the default configuration

2003-08-01 Thread Bertin Philippe
'Llo All,

The title seems contradictory : who would want to select
another-than-default configuration ? Is the default configuration not
_default_, are there no drivers for even the default configuration ? Well,
this is indeed not always the case. When a Windows driver e.g. NEEDS the
first configuration to be RNDIS (I'd doubt that it's legally even permitted
to make an RNDIS driver for Linux - read the RNDIS spec, first para of 1.1
...), there is to be a means to select the second USB configuration (being a
CDC- one). Well, usb.c does not foresee this (I'm speaking of the 2.4.20-
version).

This patch switches to the second (and so on, and so on ...) configuration
when there is no driver available for this configuration. It is made against
the (old) 2.4.20. I hope I don't make anyone furious about it ;)   I can
make it against the 2.6 too, if it gets granted. This patch works on SuSE
8.2 on Dell Laptop 8100.

Regards,

Philippe Bertin.


 usb.c.diff 


usb.c.diff
Description: Binary data


RE: [linux-usb-devel] Patch : Select other-than-default configuration when no driver available for the default configuration

2003-08-01 Thread Bertin Philippe
True, but imagine what the situation was before : there was no checking at
all if the call to usb_find_drivers succeeded yes or no. So there, the
situation was not any better, was it ? It just supposed the 'default' driver
was available.

With the patch, there is still no checking whether there will, in the end,
be a loaded driver. But at least it gives the chance to the other drivers to
take a ticket ...

Regards,

Philippe Bertin.

-Original Message-
From: Oliver Neukum [mailto:[EMAIL PROTECTED]
Sent: vrijdag 1 augustus 2003 10:58
To: Bertin Philippe; '[EMAIL PROTECTED]'
Subject: Re: [linux-usb-devel] Patch : Select other-than-default
configuration when no driver available for the default configuration


 
 This patch switches to the second (and so on, and so on ...) configuration
 when there is no driver available for this configuration. It is made
against
 the (old) 2.4.20. I hope I don't make anyone furious about it ;)   I can
 make it against the 2.6 too, if it gets granted. This patch works on SuSE
 8.2 on Dell Laptop 8100.

How do you cope with the driver not being present at hotplug time?
With this scheme the device is in a random configuration when the
legitimate driver is loaded.

Regards
Oliver


---
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] PATCH: (as78) Remove usb_set_maxpacket()

2003-08-01 Thread Alan Stern
Greg:

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().

Alan Stern


# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.5 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#  ChangeSet1.1661  - 1.1662 
#   drivers/usb/core/message.c  1.52- 1.53   
#   drivers/usb/core/hub.c  1.114   - 1.115  
#   drivers/usb/core/hcd.h  1.54- 1.55   
#
# The following is the BitKeeper ChangeSet Log
# 
# 03/08/01  [EMAIL PROTECTED]   1.1662
# Remove usb_set_maxpacket().  Make usb_physical_reset_device() call
# usb_set_configuration() instead.
# 
#
diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
--- a/drivers/usb/core/hcd.hFri Aug  1 12:03:12 2003
+++ b/drivers/usb/core/hcd.hFri Aug  1 12:03:12 2003
@@ -251,7 +251,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 12:03:12 2003
+++ b/drivers/usb/core/hub.cFri Aug  1 12:03:12 2003
@@ -1324,9 +1324,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 12:03:12 2003
+++ b/drivers/usb/core/message.cFri Aug  1 12:03:12 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; idev-actconfig-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; eas-desc.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


Re: [linux-usb-devel] Patch : Select other-than-default configuration when no driver av ailable for the default configuration

2003-08-01 Thread Greg KH
On Fri, Aug 01, 2003 at 10:25:54AM +0200, Bertin Philippe wrote:
 
 This patch switches to the second (and so on, and so on ...) configuration
 when there is no driver available for this configuration. It is made against
 the (old) 2.4.20. I hope I don't make anyone furious about it ;)   I can
 make it against the 2.6 too, if it gets granted. This patch works on SuSE
 8.2 on Dell Laptop 8100.

Can you take a look at Documentation/CodingStyle and
Documentation/SubmittingPatches and clean up the patch to at least
follow those rules?

Also, a 2.6 patch is necessary first, before I can even consider
anything for 2.4.

thanks,

greg k-h


---
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] 2.6.0-test2 - ftdi_sio - additional pids

2003-08-01 Thread Greg KH
On Thu, Jul 31, 2003 at 11:12:39AM +0100, Ian Abbott wrote:
 Patch against 2.6.0-test2:
 
 [This is an update of an earlier patch against 2.6.0-test1.  
 Re-diffed against 2.6.0-test2 at the request of Greg KH.]
 
 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.

Applied, thanks.

greg k-h


---
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: (as78) Remove usb_set_maxpacket()

2003-08-01 Thread Greg KH
On Fri, Aug 01, 2003 at 12:12:04PM -0400, Alan Stern wrote:
 Greg:
 
 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().

Applied.  Thanks again for splitting this up, it makes a lot more sense
now :)

greg k-h


---
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


Re: [linux-usb-devel] OHCI problems with suspend/resume

2003-08-01 Thread David Brownell
Pavel Machek wrote:
Hi!


Here's a patch that makes things slightly better. 

Where better means that it seems functional after the
first suspend/resume cycle, and re-enumerates the device
that's connected ... but there's still strangeness.  And
I can see how some of it would be generic.
For me it:

reports problem after first suspend, and ohci stops working
When you say reports problem, what do you mean?

I can see problems _during_ the suspend, before any USB
suspend calls are even made.  Only if the controller has
work to do, so it's scanning the schedules (DMA) ... it's
fine until the suspend starts, then the controller gets
an Unrecoverable Error IRQ, which I'm used to seeing
for DMA errors.  (As if something started shutting down
hardware before the driver had a chance to clean up.)
If there's no DMA action before the suspend starts, the
current code behaved OK for me -- on an APM D3cold
suspend/resume cycle, which isn't so different from what
you'll see with swsusp.
That makes me think I'll be better off waiting for some
of those PM updates to get merged, before I spend much
more time looking at the usb parts of these issues.

oopses in hcd_panic during second suspend (IIRC).
Likely because resuming a halted controller is nonsense,
and the code needs to reject such attempts.
Of course, if the controller weren't going bonkers before
it's told to start suspending, these particular faults
wouldn't be happening ... :)
- Dave





---
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] Oops when unplugging a USB2.0 pccard

2003-08-01 Thread Oliver Neukum
Hi,

this is with 2.6.0-test2, no devices attached to the bus, on UP.
Is it a known problem?

Regards
Oliver

Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: device removed!
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: shutdown :02:00.0 urb 
d9521ec0 pipe 40408180, current status -115
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: device removed!
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: shutdown :02:00.1 urb 
d95219c0 pipe 40408180, current status -115
Aug  1 15:01:45 vermuden kernel: ehci_hcd :02:00.2: device removed
Aug  1 15:01:45 vermuden kernel: ehci_hcd :02:00.2: reset command  park=3 
ithresh=63 LReset IAAD Async Periodic period=?? R
Aug  1 15:01:45 vermuden kernel: ehci_hcd :02:00.2: shutdown :02:00.2 urb 
d9521440 pipe 40408180, current status -115
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: stop operational controller 
(disabled)
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: OHCI controller state
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: OHCI 3.15, with legacy support 
registers
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: control 0x RWE RWC IR 
HCFS=suspend BLE CLE IE PLE CBSR=3
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: cmdstatus 0x SOC=3 OCR 
BLF CLF HCR
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: intrstatus 0x MIE OC 
RHSC FNO UE RD SF WDH SO
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: intrenable 0x MIE OC 
RHSC FNO UE RD SF WDH SO
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: ed_periodcurrent 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: ed_controlhead 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: ed_controlcurrent 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: ed_bulkhead 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: ed_bulkcurrent 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: donehead 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: hcca frame #dce7
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: stop operational controller 
(disabled)
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: OHCI controller state
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: OHCI 3.15, with legacy support 
registers
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: control 0x RWE RWC IR 
HCFS=suspend BLE CLE IE PLE CBSR=3
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: cmdstatus 0x SOC=3 OCR 
BLF CLF HCR
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: intrstatus 0x MIE OC 
RHSC FNO UE RD SF WDH SO
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: intrenable 0x MIE OC 
RHSC FNO UE RD SF WDH SO
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: ed_periodcurrent 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: ed_controlhead 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: ed_controlcurrent 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: ed_bulkhead 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: ed_bulkcurrent 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: donehead 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.1: hcca frame #d85f
Aug  1 15:01:45 vermuden kernel: ehci_hcd :02:00.2: stop
Aug  1 15:01:45 vermuden kernel: ehci_hcd :02:00.2: reset command  park=3 
ithresh=63 LReset IAAD Async Periodic period=?? R
Aug  1 15:01:45 vermuden kernel: ehci_hcd :02:00.2: irq normal 0 err 0 reclaim 0 
(lost 0)
Aug  1 15:01:45 vermuden kernel: ehci_hcd :02:00.2: complete 0 unlink 0
Aug  1 15:01:45 vermuden kernel: ehci_hcd :02:00.2: ehci_stop completed status 
 Async Periodic Recl Halt IAA FATAL FLR PCD 
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: remove, state 0
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: roothub graceful disconnect
Aug  1 15:01:45 vermuden kernel: usb usb5: USB disconnect, address 1
Aug  1 15:01:45 vermuden kernel: drivers/usb/core/usb.c: nuking urbs assigned to usb5
Aug  1 15:01:45 vermuden kernel: usb usb5: unregistering interfaces
Aug  1 15:01:45 vermuden kernel: drivers/usb/core/usb.c: nuking urbs assigned to usb5
Aug  1 15:01:45 vermuden kernel: usb usb5: hcd_unlink_urb d9521ec0 fail -16
Aug  1 15:01:45 vermuden kernel: drivers/usb/core/usb.c: usb_hotplug
Aug  1 15:01:45 vermuden kernel: usb usb5: unregistering device
Aug  1 15:01:45 vermuden kernel: drivers/usb/core/usb.c: usb_hotplug
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: stop operational controller 
(disabled)
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: OHCI controller state
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: OHCI 3.15, with legacy support 
registers
Aug  1 15:01:45 vermuden kernel: ohci-hcd :02:00.0: control 0x RWE 

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

2003-08-01 Thread Greg KH
Hi,

Here are a bunch of USB fixes for 2.6.0-test2.  There are a lot of audit
patches from Oliver Neukum and Daniele Bellucci.  I've also fixed up the
usb_interface bugs that I introduced when moving to the driver model a
while ago.  David Brownell and Alan Stern have a bunch of host
controller driver and USB core fixes, getting rid of a number of error
messages and stack traces that people are running accross quite
frequently (like when removing a USB device from the system.)

And there are a few other documentation updates and other minor bug
fixes.

Please pull from:  bk://kernel.bkbits.net/gregkh/linux/linus-2.6

Patches will be posted to linux-usb-devel as a follow-up thread for
those who want to see them.

thanks,

greg k-h

 Documentation/usb/usb-serial.txt|3 
 drivers/media/video/cpia_usb.c  |2 
 drivers/usb/Makefile|3 
 drivers/usb/class/audio.c   |   37 +--
 drivers/usb/class/bluetty.c |  178 +---
 drivers/usb/class/cdc-acm.c |   14 -
 drivers/usb/class/usb-midi.c|   12 -
 drivers/usb/class/usblp.c   |   22 +-
 drivers/usb/core/config.c   |   94 +---
 drivers/usb/core/devices.c  |2 
 drivers/usb/core/devio.c|   17 -
 drivers/usb/core/hcd-pci.c  |   21 +
 drivers/usb/core/hcd.c  |   14 -
 drivers/usb/core/hcd.h  |4 
 drivers/usb/core/hub.c  |   19 +
 drivers/usb/core/message.c  |  257 
 drivers/usb/core/urb.c  |   27 +-
 drivers/usb/core/usb-debug.c|2 
 drivers/usb/core/usb.c  |  137 +---
 drivers/usb/core/usb.h  |   13 +
 drivers/usb/gadget/net2280.c|2 
 drivers/usb/host/ehci-dbg.c |   41 +++
 drivers/usb/host/ehci-hcd.c |   37 +--
 drivers/usb/host/ehci-q.c   |   18 -
 drivers/usb/host/ehci-sched.c   |2 
 drivers/usb/host/hc_sl811_rh.c  |5 
 drivers/usb/host/ohci-hcd.c |1 
 drivers/usb/host/ohci-pci.c |2 
 drivers/usb/host/uhci-hcd.c |3 
 drivers/usb/image/scanner.c |2 
 drivers/usb/input/aiptek.c  |   10 
 drivers/usb/input/usbkbd.c  |7 
 drivers/usb/input/usbmouse.c|7 
 drivers/usb/input/wacom.c   |7 
 drivers/usb/input/xpad.c|7 
 drivers/usb/media/ibmcam.c  |4 
 drivers/usb/media/konicawc.c|2 
 drivers/usb/media/ov511.c   |2 
 drivers/usb/media/pwc-ctrl.c|   40 ---
 drivers/usb/media/pwc-if.c  |  381 
 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 +-
 drivers/usb/misc/auerswald.c|3 
 drivers/usb/misc/brlvger.c  |2 
 drivers/usb/misc/emi26.c|7 
 drivers/usb/misc/usbtest.c  |   11 -
 drivers/usb/net/ax8817x.c   |  136 ++--
 drivers/usb/net/catc.c  |7 
 drivers/usb/net/usbnet.c|  151 +++---
 drivers/usb/serial/ftdi_sio.c   |   33 ++-
 drivers/usb/serial/ftdi_sio.h   |   10 
 drivers/usb/serial/io_ti.c  |2 
 drivers/usb/serial/kobil_sct.c  |2 
 drivers/usb/serial/pl2303.c |8 
 drivers/usb/serial/usb-serial.c |5 
 drivers/usb/serial/visor.c  |   10 
 drivers/usb/storage/shuttle_usbat.c |  186 ++---
 drivers/usb/storage/unusual_devs.h  |9 
 include/linux/usb.h |7 
 include/linux/usb_gadget.h  |6 
 sound/usb/usbaudio.c|  242 +++---
 sound/usb/usbmixer.c|4 
 65 files changed, 1269 insertions(+), 1079 deletions(-)
-

ian.abbott:mev.co.uk:
  o USB: ftdi_sio - additional pids

Alan Stern:
  o USB: Remove usb_set_maxpacket()
  o USB: Use the new enable/disable routines
  o USB: Add functions to enable/disable endpoints, interfaces
  o USB: Rename probe and unbind functions
  o USB: More unusual_devs.h stuff
  o USB: Small fixes for usbtest
  o USB: Rename usb_connect() to usb_choose_address()
  o USB: Fix irq problem in hcd_endpoint_disable()
  o USB:  Proper I/O buffering for the shuttle_usbat subdriver

Daniele Bellucci:
  o USB: Audit usb_register() in drivers/usb/net/catc.c
  o USB: Audit usb_register in usbmouse_init()
  o USB: Audit usb_register() in drivers/usb/input/aiptek.c
  o USB: Audit usb_register() in drivers/usb/input/usbkbd.c
  o USB: Audit usb_register in drivers/usb/input/xpad.c
  o USB: Audit usb_register() in drivers/usb/input/wacom.c
  o USB: Audit usb_register() in drivers/usb/misc/emi26.c
  o USB: Audit usb_register in drivers/usb/class/audio.c

David Brownell:
  o USB: hcd initialization fix
  o USB: usb root hubs need longer timeout
  o USB: ehci-hcd 

Re: [linux-usb-devel] Patch : Select other-than-default configurationwhen no driver av ailable for the default configuration

2003-08-01 Thread David Brownell
Bertin Philippe wrote:
'Llo All,

This patch switches to the second (and so on, and so on ...) configuration
when there is no driver available for this configuration. It is made against
the (old) 2.4.20. I hope I don't make anyone furious about it ;)   I can
make it against the 2.6 too, 


For 2.6, patches have already been circulated to completely export
this policy decision to userspace, through a writable syfs file.
So for example a hotplug script would be able to notice a Brand-X
Model FOO, and the set the configuration to match the drivers that
were installed on that system.  (I think I sent them around against
the 2.5.67 kernel.  Recent test2 patches have changed some of the
affected code, and I'll submit some of the updates.)
I don't think it's right to have the kernel make the particular
policy decision you're proposing.  As Oliver noted, even the way
it's done is troublesome for a typical case:  where the drivers
can't have been modprobed yet by the time your patch concluded
that there were no drivers for that configuration.
There are a lot of other updates needed, within usbcore, to make
changing configurations safe; since usbcore (and the HCDs) keep
lots of state around, and only the more recent 2.6 kernels
synchronize it properly with config change events (including
set_interface).  I'd be cautious with changing 2.4 kernels too.
- Dave



---
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;
 
/*
 * hw default: 1K periodic list heads, one per frame.
@@ 

[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; idev-actconfig-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; eas-desc.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.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 linux/config.h
+
+#ifdef CONFIG_USB_DEBUG
+   #define DEBUG
+#else
+   #undef DEBUG
+#endif
+
 #include linux/pci.h /* for scatterlist macros */
 #include linux/usb.h
 #include linux/module.h
@@ -11,6 +19,7 @@
 #include asm/byteorder.h
 
 #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);

[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.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] [PATCH] USB fixes for 2.6.0-test2

2003-08-01 Thread Greg KH
ChangeSet 1.1595.7.1, 2003/07/29 11:36:46-07:00, [EMAIL PROTECTED]

[PATCH] USB: fix stupid kobject coding error with regards to struct usb_interface

Added a release callback, as is required, otherwise we can easily oops
if a user grabs a sysfs file and the device is removed from the system.


 drivers/usb/core/config.c |   94 +-
 include/linux/usb.h   |5 +-
 2 files changed, 57 insertions(+), 42 deletions(-)


diff -Nru a/drivers/usb/core/config.c b/drivers/usb/core/config.c
--- a/drivers/usb/core/config.c Fri Aug  1 10:57:02 2003
+++ b/drivers/usb/core/config.c Fri Aug  1 10:57:02 2003
@@ -98,6 +98,32 @@
return parsed;
 }
 
+static void usb_release_intf(struct device *dev)
+{
+   struct usb_interface *intf;
+   int j;
+   int k;
+
+   intf = to_usb_interface(dev);
+
+   if (intf-altsetting) {
+   for (j = 0; j  intf-num_altsetting; j++) {
+   struct usb_host_interface *as = intf-altsetting[j];
+   if (as-extra)
+   kfree(as-extra);
+
+   if (as-endpoint) {
+   for (k = 0; k  as-desc.bNumEndpoints; k++)
+   if (as-endpoint[k].extra)
+   kfree(as-endpoint[k].extra);
+   kfree(as-endpoint);
+   }
+   }
+   kfree(intf-altsetting);
+   }
+   kfree(intf);
+}
+
 static int usb_parse_interface(struct usb_interface *interface, unsigned char 
*buffer, int size)
 {
int i, len, numskipped, retval, parsed = 0;
@@ -109,7 +135,11 @@
interface-num_altsetting = 0;
interface-max_altsetting = USB_ALTSETTINGALLOC;
device_initialize(interface-dev);
+   interface-dev.release = usb_release_intf;
 
+   /* put happens in usb_destroy_configuration */
+   get_device(interface-dev);
+   
interface-altsetting = kmalloc(sizeof(*interface-altsetting) * 
interface-max_altsetting,
GFP_KERNEL);

@@ -253,30 +283,33 @@
 
 int usb_parse_configuration(struct usb_host_config *config, char *buffer)
 {
-   int i, retval, size;
+   int i, size;
+   int retval = -EINVAL;
struct usb_descriptor_header *header;
 
memcpy(config-desc, buffer, USB_DT_CONFIG_SIZE);
le16_to_cpus(config-desc.wTotalLength);
size = config-desc.wTotalLength;
 
+   for (i = 0; i  USB_MAXINTERFACES; ++i)
+   config-interface[i] = NULL;
+
if (config-desc.bNumInterfaces  USB_MAXINTERFACES) {
warn(too many interfaces);
-   return -1;
+   goto error;
}
 
-   config-interface = (struct usb_interface *)
-   kmalloc(config-desc.bNumInterfaces *
-   sizeof(struct usb_interface), GFP_KERNEL);
-   dbg(kmalloc IF %p, numif %i, config-interface, config-desc.bNumInterfaces);
-   if (!config-interface) {
-   err(out of memory);
-   return -1;  
+   for (i = 0; i  config-desc.bNumInterfaces; ++i) {
+   config-interface[i] = kmalloc(sizeof(struct usb_interface), 
GFP_KERNEL);
+   dbg(kmalloc IF %p, numif %i, config-interface[i], i);
+   if (!config-interface[i]) {
+   err(out of memory);
+   retval = -ENOMEM;
+   goto error;
+   }
+   memset(config-interface[i], 0x00, sizeof(struct usb_interface));
}
 
-   memset(config-interface, 0,
-  config-desc.bNumInterfaces * sizeof(struct usb_interface));
-
buffer += config-desc.bLength;
size -= config-desc.bLength;

@@ -334,7 +367,7 @@
}
}
 
-   retval = usb_parse_interface(config-interface + i, buffer, size);
+   retval = usb_parse_interface(config-interface[i], buffer, size);
if (retval  0)
return retval;
 
@@ -343,13 +376,17 @@
}
 
return size;
+error:
+   for (i = 0; i  USB_MAXINTERFACES; ++i)
+   kfree(config-interface[i]);
+   return retval;
 }
 
 // hub-only!! ... and only exported for reset/reinit path.
 // otherwise used internally on disconnect/destroy path
 void usb_destroy_configuration(struct usb_device *dev)
 {
-   int c, i, j, k;
+   int c, i;

if (!dev-config)
return;
@@ -368,34 +405,9 @@
break;
 
for (i = 0; i  cf-desc.bNumInterfaces; i++) {
-   struct usb_interface *ifp =
-   cf-interface[i];
-   
-   if (!ifp-altsetting)
-   break;
-
-   for (j = 0; j  

[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.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 

[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.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.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 +560,16 @@
 
for (j = 0; j  cfacm-desc.bNumInterfaces - 1; j++) {


[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.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.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.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.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.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.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.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.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.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.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.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.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.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; idev-actconfig-desc.bNumInterfaces; i++) {
-   struct usb_interface *ifp = dev-actconfig-interface + i;
+   struct usb_interface *ifp = dev-actconfig-interface[i];
   

[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.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 linux/slab.h
@@ -69,7 +75,7 @@
 #include linux/version.h
 
 /* 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.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.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; i1200+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 (status0x01) { // 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 (status0x20) // device fault
+   if (*status  0x20) // device fault
return USB_STOR_TRANSPORT_FAILED;
 
-   if ((status0x80)==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; inum_registers; i++) {
-   data[i1] = registers[i];
-   data[1+(i1)] = data_out[i];
-   }
+  

[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: 2.4.22-pre10 compile failure USB HID

2003-08-01 Thread Samuel Flory
Greg KH wrote:

On Fri, Aug 01, 2003 at 12:31:24PM -0700, Samuel Flory wrote:
 

I'm seeing a linking issue when I compile USB HID support directly 
into the kernel.  Looking at my kernel config it looks like it might 
have something to do with the fact that I'm compiling CONFIG_INPUT, 
CONFIG_INPUT_KEYBDEV, and CONFIG_INPUT_MOUSEDEV as modules.  Should 
CONFIG_USB_HID depend on one, or all of the above.
   

Yes, that configuration will not work.  I think this has been discussed
many times on the lists in the past, and the end agreement is, Don't
try to do that. :)
It's not an easy configuration language fix from what I remember.

 

 I'll take a look it.  It seems to work if you compile in the rest of 
the HID stuff.

--
Once you have their hardware. Never give it back.
(The First Rule of Hardware Acquisition)
Sam Flory  [EMAIL PROTECTED]


---
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] ScanMail Message: To Recipient virus found or matched file blocking setting.

2003-08-01 Thread System Attendant
ScanMail for Microsoft Exchange has taken action on the message, please
refer to the contents of this message for further details.

Sender = [EMAIL PROTECTED]
Recipient(s) = [EMAIL PROTECTED];
Subject = [linux-usb-devel] your account izgicaec
Scanning Time = 08/01/2003 15:53:10
Engine/Pattern = 6.510-1002/597

Action on message:
The attachment message.zip contained WORM_MIMAIL.A virus. ScanMail has taken
the Deleted action. 

Exchange Server: OTTONEXC1
Folder Name: Inbox
Scan Type: real-time scan
File/Action: message.zip/Deleted 


---
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] Seeking pointers realted to Oracle

2003-08-01 Thread Mike Ni
Folks,


Does anyone happen to know any development tool for
Oracle or any other relational database out there?

Is there anything similiar to the Oracle's Tuxedo from
the open souce code community?

THanks in advance
MIkey 

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


---
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: Zio! compactflash doesn't work

2003-08-01 Thread Wakko Warner
  What about this one:
  Bus 001 Device 002: ID 0781:0005 SanDisk Corp. SDDR-05b (CF II) ImageMate
  CompactFlash Reader
 
 That is reported to work with the unusual dev patch
 
 +/* glc: Greg Corcoran gregc at spidex.com  -- tested with SDDR-05b */
 +UNUSUAL_DEV(  0x0781, 0x0005, 0x0005, 0x0005,
 +   Sandisk,
 +   ImageMate SDDR-05b,
 +   US_SC_SCSI, US_PR_ZIOCF, init_ziocf,
 +   US_FL_START_STOP | US_FL_SINGLE_LUN),
 +
 
 together with the Zio! driver at sourceforge, maybe
 
   http://usbat2.sourceforge.net/index.html
 
 if I recall correctly.

I checked the link.  Doesn't look like the drive is ready for 2.6 which is
what I planned on using this with.  The chip on the device definately says
usbat-2.  Unfortuantely, I'm not well versed in kernel hacking so I'll
have to wait til they port it.

-- 
 Lab tests show that use of micro$oft causes cancer in lab animals


---
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