Re: [linux-usb-devel] usb_get_dev: really needed in probe?

2003-02-24 Thread Duncan Sands
On Monday 24 February 2003 21:11, Johannes Erdfelt wrote: > On Mon, Feb 24, 2003, Duncan Sands <[EMAIL PROTECTED]> wrote: > > --- bollux-2.5/drivers/usb/core/usb.c.orig 2003-02-24 13:52:49.0 > > +0100 +++ bollux-2.5/drivers/usb/core/usb.c 2003-02-24 13:56:20.0 > > +0100 @@ -701,12

Re: [linux-usb-devel] Death by usb_dec_dev_use

2003-02-24 Thread Duncan Sands
On Tuesday 25 February 2003 02:21, Greg KH wrote: > On Mon, Feb 24, 2003 at 12:26:30PM +0100, Duncan Sands wrote: > > Hi Greg, I went and got a new one for your debugging pleasure! It is > > the dev->bus->op->deallocate(dev) that kills things. What happens > > seems to be this: disconnect is call

[linux-usb-devel] another usb-storage (or higher level) oops

2003-02-24 Thread David Brownell
Looks to me like this 2.5.62+ kernel doesn't yet behave sanely during a "hot unplug" in usb ... did those scsi changes get into the 2.5.63 kernel? - Dave OOPS after powering off a usb2 disk disk was looping 'hdparm -tT /dev/sda1' USB core/hcd shutdown seems just fine.

Re: [linux-usb-devel] Death by usb_dec_dev_use

2003-02-24 Thread Greg KH
On Mon, Feb 24, 2003 at 12:26:30PM +0100, Duncan Sands wrote: > > Hi Greg, I went and got a new one for your debugging pleasure! It is > the dev->bus->op->deallocate(dev) that kills things. What happens > seems to be this: disconnect is called on the speedtch driver, then > uhci is unloaded, the

Re: [linux-usb-devel] Debugging client code with Linux-USB

2003-02-24 Thread Joshua Wise
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > IOC is Interrupt On Complete. That means something completed. Ok, but why would the ERROR bit be set? (Is there some way to get it to be more specific?) I find it interesting that it's completing... On the iPAQ side, it can only seem to echo the f

Re: [linux-usb-devel] Debugging client code with Linux-USB

2003-02-24 Thread Johannes Erdfelt
On Mon, Feb 24, 2003, Joshua Wise <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > *baff!!* Just sent this to myself, not checking the To: field. Good job me. :) > Anyway, here's another little piece: > > > What does this mean? I am unfamiliar with UHCI internals.

Re: [linux-usb-devel] Debugging client code with Linux-USB

2003-02-24 Thread Joshua Wise
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 *baff!!* Just sent this to myself, not checking the To: field. Good job me. :) Anyway, here's another little piece: > What does this mean? I am unfamiliar with UHCI internals. Sometimes it's > also status 2. Er, status 2 only occurs when the StrongA

[linux-usb-devel] Debugging client code with Linux-USB

2003-02-24 Thread Joshua Wise
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I am writing the USB client code for the handhelds.org iPAQ opensource bootloader. I have been having problems with getting more than one byte per packet to the device. This messages appear in dmesg when the problem happens: usb-uhci.c: interru

[linux-usb-devel] [patch 2.5.62+] ehci-hcd, partial VIA workaround

2003-02-24 Thread David Brownell
This patch resolves a FIXME, which happens to make many of the VIA problems act significantly less severe. The change defers unlinking any QH that just became idle, since it's not unlikely it'll be used again before many milliseconds pass. It reduces the number of unlink interrupts (IAA), and mean

Re: [linux-usb-devel] usb_get_dev: really needed in probe?

2003-02-24 Thread David Brownell
@@ -701,12 +701,6 @@ * usb_get_dev - increments the reference count of the usb device structure * @dev: the device being referenced * - * Each live reference to a device should be refcounted. - * - * Drivers for USB interfaces should normally record such references in - * their probe() methods,

[linux-usb-devel] [patch 2.5.62+] ohci: "registers" sysfs file

2003-02-24 Thread David Brownell
Hi, This is a slightly cleaned up version of Kevin's patch to add a "registers" sysfs debug file. Minor style and whitespace fixups, prints the other register, resolved config/build issues (minor). It also has two minor tweaks: a fix for a potential assertion violation on a "dead-hc" cleanup path

Re: [linux-usb-devel] usb_get_dev: really needed in probe?

2003-02-24 Thread Johannes Erdfelt
On Sun, Feb 23, 2003, David Brownell <[EMAIL PROTECTED]> wrote: > > >>Why should drivers use usb_get_dev in probe, and usb_put_dev in disconnect? > > > > > > No reason. A reference is already done by the core which covers the > > reference for that whole period of time. > > A reference which is

Re: [linux-usb-devel] usb_get_dev: really needed in probe?

2003-02-24 Thread Johannes Erdfelt
On Mon, Feb 24, 2003, Duncan Sands <[EMAIL PROTECTED]> wrote: > --- bollux-2.5/drivers/usb/core/usb.c.orig2003-02-24 13:52:49.0 +0100 > +++ bollux-2.5/drivers/usb/core/usb.c 2003-02-24 13:56:20.0 +0100 > @@ -701,12 +701,6 @@ > * usb_get_dev - increments the reference count of

Re: [linux-usb-devel] Death by usb_dec_dev_use

2003-02-24 Thread David Brownell
I just want to point out that from a pragmatic perspective, those changes ("bug" fixes if you insist) won't break drivers that have already been adhering to the stricter contract I described. Yes and no. The OHCI fix I sent was necessary even with your stricter contract. And how could that happe

[linux-usb-devel] Trivial patch for usb.h

2003-02-24 Thread Alan Stern
The usb_snddefctrl and usb_rcvdefctrl macros are wrong. This hasn't shown up until now because usb_rcvdefctrl isn't used anywhere at all, and usb_snddefctrl is used exactly once (in core/usb.c). This patch fixes the macros. It would be just as reasonable to remove them entirely and change the

[linux-usb-devel] Re: [PATCH] USB speedtouch: better proc info

2003-02-24 Thread Oliver Neukum
Am Montag, 24. Februar 2003 10:58 schrieb Duncan Sands: > Output the correct device name, show the state of the device (for > debugging) and of the ADSL line (anyone want to write a graphical utility > to show this, like under windows?). We no longer consult the usb_device > struct in udsl_atm_pro

Re: [linux-usb-devel] usb_get_dev: really needed in probe?

2003-02-24 Thread Duncan Sands
--- bollux-2.5/drivers/usb/core/usb.c.orig 2003-02-24 13:52:49.0 +0100 +++ bollux-2.5/drivers/usb/core/usb.c 2003-02-24 13:56:20.0 +0100 @@ -701,12 +701,6 @@ * usb_get_dev - increments the reference count of the usb device structure * @dev: the device being referenced *

Re: [linux-usb-devel] Death by usb_dec_dev_use

2003-02-24 Thread Duncan Sands
On Friday 21 February 2003 17:21, Greg KH wrote: > On Fri, Feb 21, 2003 at 12:34:13PM +0100, Duncan Sands wrote: > > I get an oops on shutdown with 2.4.20 (speedtouch driver). Here is what > > happens: > > > > probe method called: I take a reference to the usb device with > > usb_inc_dev_use > > >

[linux-usb-devel] [PATCH] USB speedtouch: better proc info

2003-02-24 Thread Duncan Sands
Output the correct device name, show the state of the device (for debugging) and of the ADSL line (anyone want to write a graphical utility to show this, like under windows?). We no longer consult the usb_device struct in udsl_atm_proc_read, so don't take a reference to it. Against Greg's curre