lost.
It wouldn't be surprising to find lots of USB HID devices suffering
from this kind of problem.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
, list_empty(anchor-urb_list),
timeout * HZ / 1000);
What's wrong with msecs_to_jiffies()?
Ironically, it wants its argument to be an unsigned int!
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2
workqueue. It already exists, is
freezable, and is used for suspending and resuming USB devices.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control
usb_wait_anchor_empty_timeout(struct usb_anchor *anchor,
unsigned long timeout);
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML
On Wed, 23 May 2007, Jiri Kosina wrote:
On Wed, 23 May 2007, Alan Stern wrote:
I suspect it is keyboard-dependent. For example, the keyboard's
internal buffer might be able to hold no more than one event, because
the designers expected the host to poll frequently. Since the polling
was disconnected, which doesn't make much sense.
Anyway, this looks like a good place to use cancel_work_sync(). The
patch below is highly untested, so Andrew, you're the guinea pig. :-)
If it seems to help, I'll submit it with a proper Changelog entry.
Alan Stern
Index: usb-2.6/drivers/usb/core
On Wed, 23 May 2007, Oleg Nesterov wrote:
On 05/23, Alan Stern wrote:
Okay, it's clear that the two threads are in deadlock. It's not clear
how the deadlock arose to begin with -- apparently there was a remote
wakeup request for a root hub at the same time as a device below
to these changes (and their consequent code
simplifications), the patch fixes a use-after-free bug in adutux and a
race between open() and release() in iowarrior.
Signed-off-by: Alan Stern [EMAIL PROTECTED]
---
Index: usb-2.6/drivers/usb/core/file.c
This patch (as881b) makes the ksuspend_usb_wq workqueue freezable. We
don't want a rogue workqueue thread running around, unexpectedly
suspending or resuming USB devices in the middle of a system sleep
transition.
This fixes Bugzilla #8498.
Signed-off-by: Alan Stern [EMAIL PROTECTED]
---
Greg
On Tue, 22 May 2007, Pandita, Vikram wrote:
From: Alan Stern [mailto:[EMAIL PROTECTED]
On Mon, 21 May 2007, David Brownell wrote:
On Monday 21 May 2007, Vikram Pandita wrote:
---
diff -purN -X ./dontdiff a/drivers/usb/core/hub.c
b/drivers/usb/core/hub.c
--- a/drivers/usb/core
-(which is 256, 512 or 1024 ms).
As I said to Dave, 256 ms is a perfectly reasonable minimum. Assuming
we agree to support this at all.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE
for
this?
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net
On Tue, 22 May 2007, Oliver Neukum wrote:
Am Mittwoch, 16. Mai 2007 17:30 schrieb Alan Stern:
This won't build because you forgot to export usb_unanchor_urb().
You could make usb_init_anchor() non-inline. I'm not sure where
tradeoff lies, but you might be over the limit.
I
writers, but performances might be impacted.
It isn't the streaming as such which makes coherent DMA mappings
attractive; it's the constant re-use of existing buffers.
Alan Stern
-
This SF.net email is sponsored by DB2
different).
It would be simpler and less objectionable to just change the name of
the routine. If it were called usb_alloc_coherent_DMA_buffer() then
people wouldn't be tempted to think it was a general-purpose allocator.
Alan Stern
This patch (as906) improves the error handling for the USB power/level
attribute file. If an error occurs, the original power-level settings
will be restored.
Signed-off-by: Alan Stern [EMAIL PROTECTED]
---
Index: usb-2.6/drivers/usb/core/sysfs.c
This patch (as911) replaces some C++-style commented-out debugging
lines in driver.c with a new verbose debugging macro. It makes the
code look cleaner, and it's easier to turn the debugging on or off.
Signed-off-by: Alan Stern [EMAIL PROTECTED]
---
Index: usb-2.6/drivers/usb/core/driver.c
This patch (as910) fixes a ratelimit modification so that the
original error-handling path will be followed even when the log-rate
limitation kicks in.
Signed-off-by: Alan Stern [EMAIL PROTECTED]
---
Index: usb-2.6/drivers/usb/core/hub.c
a simpler approach:
echo on /sys/bus/usb/devices/.../power/level
If the device has already been suspended, this will wake it up.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE
? qh_completions() ?
Part of your trouble is because some of these situations are handled
outside the EHCI driver. Take a look at the usb_sg_* routines in
drivers/usb/core/message.c. Also read the kerneldoc comments in
drivers/usb/core/urb.c and read Documentation/usb/error-codes.txt.
Alan Stern
to the device.
Instructions are in the kernel source file
Documentation/usb/usbmon.txt.
You won't see any data received from the device, because the computer
didn't receive any data.
Alan Stern
-
This SF.net email is sponsored
,
even people not familiar with the input subsystem.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click
On Tue, 22 May 2007, Alan Stern wrote:
- adapt to hibernate
What adaptations are needed?
Do I need to kill remote wakeup?
No. It should be handled at a higher level. (Right now we don't
really handle it properly; this is partly the fault of the PM core.)
This isn't is bad
...
Look again -- the question assumes that the first 4K URB comes up short
and then asks what would happen to the 8K URB.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version
On Mon, 21 May 2007, Oliver Neukum wrote:
I don't like the way you combined the error handling in usb-skeleton
with the anchor stuff. Better to keep the two things in separate
patches.
Problems with the packaging or the code?
Just the packaging.
Alan Stern
drivers failing during autoresume.
reset_resume() methods will return void. Normal resume methods do
return a status code, but we ignore it. So we should be okay.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
On Mon, 21 May 2007, Oliver Neukum wrote:
Am Mittwoch, 16. Mai 2007 17:20 schrieb Alan Stern:
@@ -592,8 +604,21 @@ static int hid_get_class_descriptor(stru
int usbhid_open(struct hid_device *hid)
{
struct usbhid_device *usbhid = hid-driver_data;
+ int res
On Mon, 21 May 2007, Oliver Neukum wrote:
Am Montag, 21. Mai 2007 17:15 schrieb Alan Stern:
On Mon, 21 May 2007, Oliver Neukum wrote:
How to avoid it? If the original driver fails, I see no alternative but to
yield to other drivers and usbfs.
Well, you don't really want to yield
-- and like you say, we'll never be
perfect. So there's probably no point in worrying too much about it.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express
is different). Since there still is a device connected to
the port, we don't want to break out of the loop.
Did you notice any particular example where the port was unconnected
and the code still tried to enumerate three times?
Alan Stern
to
__usb_port_suspend in the OTG part of usb_new_device. (I'm not clear
on why it doesn't call usb_port_suspend instead.) But it still isn't
trying to suspend a root hub, so the proposed changes should be okay.
Alan Stern
-
This SF.net
the
small amount can be. My feeling is that all HCDs should guarantee
that anything up to 1 second will be acceptable. What do you think?
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C
On Sat, 19 May 2007, Greg KH wrote:
On Sat, May 19, 2007 at 11:16:44AM -0400, Alan Stern wrote:
Greg:
The patch in $SUBJECT (already in your development tree) fixes a problem
with system suspend in 2.6.22-rc1, as described in
http://bugzilla.kernel.org/show_bug.cgi?id=8498
On Mon, 21 May 2007, David Brownell wrote:
On Monday 21 May 2007, Alan Stern wrote:
Dave:
The situation with regard to start_frame is a mess. Although the name
and the documentation refer to frame numbers, for high speed devices
the value stored there is a microframe number instead
is:
- don't autosuspend
- on resume, disconnect the driver
And then rebind the same driver back again?
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
or resume. (But I don't know what any of them could do...)
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data
the
__warn_unused_result attribute from pci_set_mwi(), so this warning
doesn't bother anyone else in the future?
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2
Gadget WILL have only one configuration.
This behavior is useful when modprobe'ing g_ether as the first
usb_function due to the RNDIS and CDC Configurations.
How does this patchset differ from your earlier versions?
Alan Stern
:00:02.0: error -16
Please turn on CONFIG_USB_DEBUG and post the resulting dmesg log.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control
kernel thread freezable.)
Can you please expedite getting it sent up to Linus?
Thanks,
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control
at the end of the page group.
Another way to describe this is as follows: For each scatterlist entry
after the first, we should always have .offset = 0. For each scatterlist
entry before the last, we should always have (.offset + .length) is a
multiple of the page size.
Alan Stern
of the callbacks rely on interrupts being disabled.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click
fails with pci_device_suspend():
usb_hcd_pci_suspend+0x0/0x160 [usbcore]() returns -16
?
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
);
+ return retval;
+ }
usb_reset_configuration() doesn't do a device reset; it does a
Set-Config. Is that what you want? Or do you want to call
usb_reset_device()?
Alan Stern
-
This SF.net email is sponsored by DB2
might try going through the
BIOS setup and turning off support for Legacy USB or anything else
which might cause the BIOS to interfere with USB operations.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download
performance to the USB development mailing list?
Don't you realize it is completely Off-Topic?
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
-- that is, whenever the
stack sends a Set-Configuration or Set-Interface request.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML
-2007 14:41-
gregkh-05-driver-class/ 10-May-2007 14:41-
Apparently adding or removing i2c threw all the higher numbers off by
one.
Alan Stern
-
This SF.net email is sponsored by DB2
by the fact that the
drivers themselves frequently do not know in advance the buffer sizes
they will use.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express
log closely to see how everything behaves.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get
page.
The beginning is subject only to the alignment specified by the
blk_queue_dma_alignment() setting. Hence it might not lie on a page
boundary.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2
in the list (except possibly the last),
.offset + .length is equal to the total size of the pages
mapped by the entry, and hence the buffer ends at a page
boundary.
Alan Stern
-
This SF.net email
with a later version
of the kernel on the host? 2.6.11 is quite old...
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just
happen.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar
available. But that's also true for
early, blocking allocations; there's nothing special about late,
non-blocking malloc.
With pre-allocation you might fail at the beginning, and with late
allocation you might fail in the middle. Either way, you fail. So
what's the big deal?
Alan Stern
, or the device's USB
interface may have stopped running.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data
On Thu, 17 May 2007, Hans Petter Selasky wrote:
Hi,
On Thursday 17 May 2007 19:03, Alan Stern wrote:
On Thu, 17 May 2007, Hans Petter Selasky wrote:
In Linux, the USB callbacks are generally atomic. Does that answer
your question?
Yes. So you protect the callback with a lock
On Thu, 17 May 2007, Pete Zaitcev wrote:
On Thu, 17 May 2007 14:26:18 -0400 (EDT), Alan Stern [EMAIL PROTECTED]
wrote:
As it happens, USB callbacks cannot be interrupted. That's a somewhat
artificial restriction; in theory there's no reason we couldn't allow
interrupts.
Do you
of contiguous memory made the box swap out and
become very slow.
Obviously the driver should be smart enough not to try and get such a
large buffer. It should allocate several smaller buffers instead.
Alan Stern
On Tue, 15 May 2007, Laurent Pinchart wrote:
Hi everybody,
following the discussion about the split bulk transfers, Alan Stern and David
Brownell told me I shouldn't use usb_buffer_alloc as a generic purpose URB
buffer allocated. However, Documentation/usb/dma.txt contradicts this. Should
On Wed, 16 May 2007, Oliver Neukum wrote:
Am Dienstag, 15. Mai 2007 23:49 schrieb Alan Stern:
On Tue, 15 May 2007, Oliver Neukum wrote:
I think we're getting off the point here. Suppose the usbhid driver
gets a powerloss_resume call for a mouse. What do you want it to do
that we
clearly that drivers should
NOT use these facilities by default and only use them when
memory pressure invokes these URBs
This is something which, I think, only Greg Kroah can decide on doing
or not doing.
I am not in favor of such a large change.
Alan Stern
suspending the interface drivers and before
suspending the device. Do we need to?
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML
patches.
There's no need for the version of skel_draw_down() which acquires the
mutex. You use it only in skel_flush(), so you might as well acquire
the mutex in the caller.
Alan Stern
-
This SF.net email is sponsored by DB2
than
is really needed.
I wonder... ub does away with thread complexity by using a complex
state machine. Ultimately the complexity lies in the USB mass-storage
protocol and in error handling; we can't get away from it no matter how
we try.
Alan Stern
On Wed, 16 May 2007, Pete Zaitcev wrote:
On Wed, 16 May 2007 10:57:04 -0400 (EDT), Alan Stern [EMAIL PROTECTED]
wrote:
It's worth pointing out that there already are drivers which
preallocate URBs and memory buffers and then share them among multiple
endpoints. One example is usb
data space.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net
-storage devices people
would want higher transfer rates.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data
On Wed, 16 May 2007, Hans Petter Selasky wrote:
On Wednesday 16 May 2007 18:25, Alan Stern wrote:
On Wed, 16 May 2007, Hans Petter Selasky wrote:
It is very clear to me that non-blocking memory allocation at the point
of starting an USB transfer will require extra error handling
On Tue, 15 May 2007, Oliver Neukum wrote:
Am Montag, 14. Mai 2007 22:09 schrieb Alan Stern:
On Mon, 14 May 2007, Oliver Neukum wrote:
Am Montag, 14. Mai 2007 20:14 schrieb Alan Stern:
On Mon, 14 May 2007, Oliver Neukum wrote:
Worse. A driver may _lack_ a post_reset() method
break this up into two patches? If the first adds the queuing
code and the second adds autosuspend support, it will be much easier to
appraise and test them.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
, but the hub dies whenever it tries to
resume the first one. That's what the log seems to say. More precise
information can be obtained by using the usbmon facility for your usb3
bus (instructions are in the kernel source file
Documentation/usb/usbmon.txt).
Alan Stern
be troublesome only in cases where the driver sets
.supports_autosuspend and yet doesn't define both a resume() and a
reset_resume() method. In such cases we could skip the rebinding.
Alan Stern
-
This SF.net email is sponsored
On Tue, 15 May 2007, Oliver Neukum wrote:
Am Dienstag, 15. Mai 2007 20:40 schrieb Alan Stern:
On Tue, 15 May 2007, Oliver Neukum wrote:
Fourthly, some drivers cannot do it in principal, because they cannot
restore a device's state, eg. printer, scanner, ...
Yes. Conversely, some
This patch (as907) prevents us from trying to allocate 0 bytes
when an interface has no endpoint descriptors.
Signed-off-by: Alan Stern [EMAIL PROTECTED]
---
On Tue, 15 May 2007, Andrew Morton wrote:
Guys, can we teach USB to avoid the zero-sized kmalloc in
usb_get_configuration()
please
don't want it. Imagine
trying to live with an interrupt request each and every millisecond!
(Or 8 interrupts every millisecond for high-speed.)
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C
lock. So what do you want to do then?
powerloss_resume will happen only when waking up from a system sleep,
and since it won't be an autoresume we will own the device lock. Hence
we will be able to rebind drivers.
Alan Stern
a different disc gets put in the drive before you resume -- then what
happens to your mounted filesystem?
It's a general problem and it needs to be handled at the filesystem layer.
Adding USB persistence doesn't really make it any worse.
Alan Stern
, or unplug the
device) when you want to use the camera. Or plug the camera into a
different USB controller from the Bluetooth device.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C
On Mon, 14 May 2007, Oliver Neukum wrote:
Am Montag, 14. Mai 2007 16:16 schrieb Alan Stern:
Well, we have again a distinction between device and interface
persistance. Some drivers and therefore interfaces will be unable
to support persistance. It must be possible to resurrect only some
On Mon, 14 May 2007, Oliver Neukum wrote:
Am Montag, 14. Mai 2007 20:14 schrieb Alan Stern:
On Mon, 14 May 2007, Oliver Neukum wrote:
Worse. A driver may _lack_ a post_reset() method.
In which case its resume() method gets called, in lieu of anything better.
Drivers like
On Sat, 12 May 2007, Pete Zaitcev wrote:
On Sat, 12 May 2007 15:40:45 -0400 (EDT), Alan Stern [EMAIL PROTECTED]
wrote:
timestamp, which would not depend on HC implementing SOF number
as a monotonously increasing counter (I think, it's not guaranteed).
The frame numbers
On Sun, 13 May 2007, Oliver Neukum wrote:
Am Samstag, 12. Mai 2007 21:26 schrieb Alan Stern:
It could be controlled by both a Kconfig option and a writable module
parameter. I'm not sure that would satisfy everybody. But maybe there
_is_ no way to satisfy everyone...
I agree
the error occurs.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http
it off!
It could be controlled by both a Kconfig option and a writable module
parameter. I'm not sure that would satisfy everybody. But maybe there
_is_ no way to satisfy everyone...
Alan Stern
-
This SF.net email is sponsored
transaction in each frame (and also because interrupt-out transfers
will be retried in another frame if they fail).
The frame numbers are guaranteed to be monotonically increasing until they
roll over from 2047 to 0 (see 8.3.3, 8.4.3, and 10.2.3 in the USB spec).
Alan Stern
packets even after it has received the data.
This mail may be huge. Since I am not able to understand the behavior
I wanted to give the full details of the issue.
Note: I am running Linux 2.6 on MPC 8270 with Philips PCI - USB converter
2.6.what?
Alan Stern
less power if the UHCI host controller were suspended.
But obviously it cannot be suspended while devices attached to it (such as
the USB keyboard and the appletouch device) remain active.
Alan Stern
-
This SF.net email
On Thu, 10 May 2007, Greg KH wrote:
On Fri, May 04, 2007 at 11:56:18AM -0400, Alan Stern wrote:
From: Danny Budik [EMAIL PROTECTED]
This patch (as899) adds a new ioctl to usbfs: USBDEVFS_GETFRAMENUM.
It allows user programs to obtain the current Start-Of-Frame number on
a USB bus
On Thu, 10 May 2007, Greg KH wrote:
On Thu, May 10, 2007 at 02:10:07PM -0400, Alan Stern wrote:
Greg:
You have applied most of the patches I sent, but not the USB-persist
ones. Any particular reason?
The main reason is that I'm still on the road, and I really want to
spend
. And
now we know of one case where it actually hurts: The device can't meet
the short timeout and then it gets terminally confused.
This fixes Bugzilla #8444.
Signed-off-by: Alan Stern [EMAIL PROTECTED]
---
Index: usb-2.6/drivers/usb/core/hub.c
get used. So
far nobody seems to have needed it.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click
disconnecting
the modem, which isn't exactly what we want.
As I said.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits
() informs the driver that the
device has finished being reset. The driver isn't asked to do anything,
so it shouldn't return anything.
If you wish, I will write a usb_rebind_interface() routine -- provided you
can give an example of a driver (other than usb-skeleton) which will use
it!
Alan Stern
On Fri, 11 May 2007, Oliver Neukum wrote:
Am Freitag, 11. Mai 2007 20:15 schrieb Alan Stern:
On the contrary. This propblem usually occurs during probe() where it is
handled exactly this way. You return an error.
The situations aren't parallel. During probe() the driver is supposed
On Fri, 11 May 2007, Alan Stern wrote:
Maybe they don't bother to do so; I'm not familiar with those drivers. So
all right, I'll write the routine for you.
And here you go. Better check with Greg to see if there's any objection
to exporting driver_probe_device() from the driver core.
I
doing that experiment? If it doesn't work then send the dmesg
log.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits
there and also in
2.6.21. Shouldn't that suffice?
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get
This patch (as904) adds code to check for endpoint descriptor bInterval
values outside the legal limits. Illegal values are set to 32 ms, which
seems like a reasonable default.
This fixes Bugzilla #8432.
Signed-off-by: Alan Stern [EMAIL PROTECTED]
---
Index: usb-2.6/drivers/usb/core/config.c
infrastructure and send it along
with the quirks code first? Then adding USB-persist on top would be a
relatively small change.
Alan Stern
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE
401 - 500 of 6192 matches
Mail list logo