Commit graph

640 commits

Author SHA1 Message Date
Alan Cox 33f0f88f1c [PATCH] TTY layer buffering revamp
The API and code have been through various bits of initial review by
serial driver people but they definitely need to live somewhere for a
while so the unconverted drivers can get knocked into shape, existing
drivers that have been updated can be better tuned and bugs whacked out.

This replaces the tty flip buffers with kmalloc objects in rings. In the
normal situation for an IRQ driven serial port at typical speeds the
behaviour is pretty much the same, two buffers end up allocated and the
kernel cycles between them as before.

When there are delays or at high speed we now behave far better as the
buffer pool can grow a bit rather than lose characters. This also means
that we can operate at higher speeds reliably.

For drivers that receive characters in blocks (DMA based, USB and
especially virtualisation) the layer allows a lot of driver specific
code that works around the tty layer with private secondary queues to be
removed. The IBM folks need this sort of layer, the smart serial port
people do, the virtualisers do (because a virtualised tty typically
operates at infinite speed rather than emulating 9600 baud).

Finally many drivers had invalid and unsafe attempts to avoid buffer
overflows by directly invoking tty methods extracted out of the innards
of work queue structs. These are no longer needed and all go away. That
fixes various random hangs with serial ports on overflow.

The other change in here is to optimise the receive_room path that is
used by some callers. It turns out that only one ldisc uses receive room
except asa constant and it updates it far far less than the value is
read. We thus make it a variable not a function call.

I expect the code to contain bugs due to the size alone but I'll be
watching and squashing them and feeding out new patches as it goes.

Because the buffers now dynamically expand you should only run out of
buffering when the kernel runs out of memory for real.  That means a lot of
the horrible hacks high performance drivers used to do just aren't needed any
more.

Description:

tty_insert_flip_char is an old API and continues to work as before, as does
tty_flip_buffer_push() [this is why many drivers dont need modification].  It
does now also return the number of chars inserted

There are also

tty_buffer_request_room(tty, len)

which asks for a buffer block of the length requested and returns the space
found.  This improves efficiency with hardware that knows how much to
transfer.

and tty_insert_flip_string_flags(tty, str, flags, len)

to insert a string of characters and flags

For a smart interface the usual code is

    len = tty_request_buffer_room(tty, amount_hardware_says);
    tty_insert_flip_string(tty, buffer_from_card, len);

More description!

At the moment tty buffers are attached directly to the tty.  This is causing a
lot of the problems related to tty layer locking, also problems at high speed
and also with bursty data (such as occurs in virtualised environments)

I'm working on ripping out the flip buffers and replacing them with a pool of
dynamically allocated buffers.  This allows both for old style "byte I/O"
devices and also helps virtualisation and smart devices where large blocks of
data suddenely materialise and need storing.

So far so good.  Lots of drivers reference tty->flip.*.  Several of them also
call directly and unsafely into function pointers it provides.  This will all
break.  Most drivers can use tty_insert_flip_char which can be kept as an API
but others need more.

At the moment I've added the following interfaces, if people think more will
be needed now is a good time to say

 int tty_buffer_request_room(tty, size)

Try and ensure at least size bytes are available, returns actual room (may be
zero).  At the moment it just uses the flipbuf space but that will change.
Repeated calls without characters being added are not cumulative.  (ie if you
call it with 1, 1, 1, and then 4 you'll have four characters of space.  The
other functions will also try and grow buffers in future but this will be a
more efficient way when you know block sizes.

 int tty_insert_flip_char(tty, ch, flag)

As before insert a character if there is room.  Now returns 1 for success, 0
for failure.

 int tty_insert_flip_string(tty, str, len)

Insert a block of non error characters.  Returns the number inserted.

 int tty_prepare_flip_string(tty, strptr, len)

Adjust the buffer to allow len characters to be added.  Returns a buffer
pointer in strptr and the length available.  This allows for hardware that
needs to use functions like insl or mencpy_fromio.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:59 -08:00
Jesper Juhl 3c6bee1d40 [PATCH] turn "const static" into "static const"
ICC likes to complain about storage class not being first, GCC doesn't
care much (except for cases like "inline static").
have a hard time seeing how it could break anything.

Thanks to Gabriel A. Devenyi for pointing out
http://linuxicc.sourceforge.net/ which is what made me create this patch.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:55 -08:00
Linus Torvalds 80c0531514 Merge master.kernel.org:/pub/scm/linux/kernel/git/mingo/mutex-2.6 2006-01-09 17:31:38 -08:00
Jes Sorensen 1b1dcc1b57 [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.

Modified-by: Ingo Molnar <mingo@elte.hu>

(finished the conversion)

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2006-01-09 15:59:24 -08:00
Jesper Juhl b3c29d85bf Small fixups to the EHCI Kconfig help text
Here's a small patch with a few tiny fixups for the EHCI Kconfig help
text. Please consider applying.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-10 00:35:22 +01:00
Adrian Bunk 93b1fae491 spelling: s/trough/through/
Additionally, one comment was reformulated by Joe Perches <joe@perches.com>.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-10 00:13:33 +01:00
Adrian Bunk 943ffb587c spelling: s/retreive/retrieve/
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-10 00:10:13 +01:00
Arnd Bergmann 0d0fbf8152 V4L (926_2): Moves compat32 functions from fs to v4l subsystem
This moves the 32 bit ioctl compatibility handlers for
Video4Linux into a new file and adds explicit calls to them
to each v4l device driver.

Unfortunately, there does not seem to be any code handling
the v4l2 ioctls, so quite often the code goes through two
separate conversions, first from 32 bit v4l to 64 bit v4l,
and from there to 64 bit v4l2. My patch does not change
that, so there is still much room for improvement.

Also, some drivers have additional ioctl numbers, for
which the conversion should be handled internally to
that driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-09 15:24:57 -02:00
Eric Dumazet 5160ee6fc8 [PATCH] shrink dentry struct
Some long time ago, dentry struct was carefully tuned so that on 32 bits
UP, sizeof(struct dentry) was exactly 128, ie a power of 2, and a multiple
of memory cache lines.

Then RCU was added and dentry struct enlarged by two pointers, with nice
results for SMP, but not so good on UP, because breaking the above tuning
(128 + 8 = 136 bytes)

This patch reverts this unwanted side effect, by using an union (d_u),
where d_rcu and d_child are placed so that these two fields can share their
memory needs.

At the time d_free() is called (and d_rcu is really used), d_child is known
to be empty and not touched by the dentry freeing.

Lockless lookups only access d_name, d_parent, d_lock, d_op, d_flags (so
the previous content of d_child is not needed if said dentry was unhashed
but still accessed by a CPU because of RCU constraints)

As dentry cache easily contains millions of entries, a size reduction is
worth the extra complexity of the ugly C union.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Paul Jackson <pj@sgi.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:58 -08:00
Tim Schmielau de25968cc8 [PATCH] fix more missing includes
Include fixes for 2.6.14-git11.  Should allow to remove sched.h from
module.h on i386, x86_64, arm, ia64, ppc, ppc64, and s390.  Probably more
to come since I haven't yet checked the other archs.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:45 -08:00
Linus Torvalds b9abaa3fb7 Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2006-01-07 11:29:51 -08:00
Russell King f8ce25476d [ARM] Move asm/hardware/clock.h to linux/clk.h
This is needs to be visible to other architectures using the AMBA
bus and peripherals.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-07 16:15:52 +00:00
Russell King 123656d4cc Merge with Linus' kernel. 2006-01-07 14:40:05 +00:00
Laurent Riffard 604f28e2b8 [PATCH] i2c: Drop i2c_driver.{owner,name}, 5 of 11
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.

This patch updates the drivers/media/video and usb/media drivers.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:23 -08:00
Michael Hanselmann 1f85145c58 Input: add missing keys from input.h to hid-debug.h
Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-05 23:00:26 -05:00
Dmitry Torokhov fed8bf19ec Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-01-05 22:25:13 -05:00
Dominik Brodowski f8cfa618dc [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback
Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

        int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);

        int (*suspend)          (struct pcmcia_device *dev);
        int (*resume)           (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:24 +01:00
Dominik Brodowski b463581154 [PATCH] pcmcia: remove dev_list from drivers
The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:20 +01:00
Dominik Brodowski cc3b4866be [PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:10 +01:00
Dominik Brodowski 98e4c28b7e [PATCH] pcmcia: new suspend core
Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-05 23:59:02 +01:00
Linus Torvalds db9edfd7e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Trivial manual merge fixup for usb_find_interface clashes.
2006-01-04 18:44:12 -08:00
Linus Torvalds 52347f4e81 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-01-04 16:34:57 -08:00
Kay Sievers 312c004d36 [PATCH] driver core: replace "hotplug" by "uevent"
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 16:18:08 -08:00
Sam Bishop c8dd7709c5 [PATCH] USB: fix usb-skeleton limit resource usage patch.
Prevents a compiler warning and uses down_interruptible() instead of down() in
process context.

Signed-off-by: Sam Bishop <sam@bishop.dhs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:45 -08:00
Olav Kongas cb5b3f6950 [PATCH] USB: fix buffer size limiting in skeleton driver
Fix buffer size limiting.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:45 -08:00
Pete Zaitcev f5691d70d4 [PATCH] USB: fix usb_find_interface for ppc64
Fix usb_find_interface. You cannot case pointers to int and long on
a big-endian 64-bitter without consequences.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
David Woodhouse a9714c845c [PATCH] USB: Export IEEE-1284 device id in sysfs for usblp devices
I looked at the userspace code which uses the LPIOC_GET_DEVICE_ID ioctl
and I almost went blind. Let's export it in sysfs instead, and just as a
string instead of with a big-endian length at the beginning of it.

This also prints the message about finding the printer _after_ we know
the minor device number it's going to have, rather than reporting all
printers as 'usblp0'.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Pete Zaitcev 318e479eb7 [PATCH] USB: ioctl compat for usblp.c
From: David Woodhouse <dwmw2>

David has a G5 with a printer. I am quite surprised that nobody else noticed
this before. Linus has a G5. Hackers hate printing in general, maybe.

We do not use BKL anymore, because one of code paths had a sleeping call,
so we had to use a semaphore. I am sure it's safe to use unlocked_ioctl.

The new ioctls return long and retval is int. It looks completely fine to me.
We never want these extra bits, and the sign extension ought to work right.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

--
2006-01-04 13:51:44 -08:00
Nathan Lynch a083dec0ed [PATCH] USB: zd1201: make sysfs device symlink
Noticed that my zd1201 adapter isn't "seen" by hal and NetworkManager.
The problem seems to be that unlike other network device drivers I
checked, zd1201 does not do a SET_NETDEV_DEV(), which makes it so a
"device" symlink is created under /sys/class/net/wlan0.

With the following patch the device symlink shows up, and now I am
happily using NetworkManager to control the adapter:

$ ls -l /sys/class/net/wlan0
total 0
-r--r--r--  1 root root 4096 Dec 18 13:42 address
-r--r--r--  1 root root 4096 Dec 18 13:42 addr_len
-r--r--r--  1 root root 4096 Dec 18 13:42 broadcast
-r--r--r--  1 root root 4096 Dec 18 13:42 carrier
lrwxrwxrwx  1 root root    0 Dec 18 13:42 device -> ../../../devices/pci0001:10/0001:10:1b.1/usb4/4-1
-r--r--r--  1 root root 4096 Dec 18 13:42 features

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Oliver Neukum ff90651883 [PATCH] USB: Limiting of resource use in skeleton driver
this introduces limits whose lack in the skeleton driver someone recently
complained about.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Pete Zaitcev aafbf24a11 [PATCH] USB: replace __setup("nousb") with __module_param_call
Fedora users complain that passing "nousbstorage" to the installer causes
the rest of the USB support to disappear. The installer uses kernel command
line as a way to pass options through Syslinux. The problem stems from the
use of strncmp() in obsolete_checksetup().

I used __module_param_call() instead of module_param because I wanted to
preserve the old syntax in grub.conf, and it's the only macro which allows
to remove the prefix.

The fix is tested to accept the option "nousb" correctly now.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
David Hollis 5e0f76c6bb [PATCH] USB: asix.c - Add Linksys USB200M Rev 2 ids
Attached patch adds device IDs for the Linksys USB200M Rev 2 device
which uses the AX88772 chipset.

Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Phil Dibowitz 3e220e9505 [PATCH] USB Storage: Fix unusual_devs.h order
Alan Stern pointed out there was an ordering issue in unusual_devs.h,
and this patch fixes it.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:44 -08:00
Daniel Marjamäki 6b495f4c5a [PATCH] USB: isp116x-hcd.c: Removed unused variable
Removed unused variable

Signed-off-by: Daniel Marjamäki <daniel.marjamaki@comhem.se>
Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Jesper Juhl 0e8eb0f06b [PATCH] USB: Remove unneeded kmalloc() return value casts
Remove kmalloc() return value casts that we don't need from
drivers/usb/*

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Ian Abbott 740a4282ed [PATCH] USB: ftdi_sio: new IDs for Teratronik devices
This patch adds vendor and product IDs to the ftdi_sio driver's device
ID table for two devices from teratronik.de.  The device IDs were
submitted by O. Wölfelschneider of Teratronik Elektronische Systeme
GmbH.

The charset of the patch is latin-1, same as the original files.

Please apply, thanks!  (I've tried to avoid a clash with Andrew Morton's
patch to add support for Posiflex PP-7700 printer to the same driver.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Pavel Fedin effac8be4e [PATCH] USB: Support for Posiflex PP-7000 retail printer in Linux
This little patch adds recognition of Posiflex PP-7000 retail printer to
ftdo_sio module. The printer uses FT232BM bridge programmed with custom
VID/PID.  The patch posted to lkml and sf.net was for 2.6.11.1 kernel,
here is one reworked for 2.6.12.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Ville Syrjälä 735b0cbb5b [PATCH] USB: add driver for ATI/Philips USB RF remotes
Summary: Driver for ATI/Philips USB RF remotes

This is a new input driver for ATI/Philips USB RF remotes (eg. ATI
Remote Wonder II).

Signed-off-by: Ville Syrjälä <syrjala@sci.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Tobias Klauser 52950ed40d [PATCH] USB: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of ARRAY_SIZE. Some trailing whitespaces are also removed.

Patch is compile-tested on i386.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Alan Stern f3d34ed48c [PATCH] USB: fix local variable clash
This patch (as621) fixes a local variable conflict I accidently
introduced into usb_set_configuration.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:42 -08:00
Paul Walmsley 3717f2952b [PATCH] USB: usb-storage: add debug entry for REPORT LUNS
Bugs involving the REPORT LUNS SCSI-3 command are much easier to track
down if usb-storage displays the command's name, rather than "(Unknown
command)".

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Cc: <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:42 -08:00
Matthew Dharm e80b0fade0 [PATCH] USB Storage: add alauda support
This patch adds another usb-storage subdriver, which supports two fairly
old dual-XD/SmartMedia reader-writers (USB1.1 devices).

This driver was written by Daniel Drake <dsd@gentoo.org> -- he notes
that he wrote this driver without specs, however a vendor-supplied GPL
driver for the previous generation of products ("sma03") did prove to be
quite useful, as did the sddr09 driver which also has to deal with
low-level physical block layout on SmartMedia.

The original patch has been reformed by me, as it clashed with the
libusual patches.

We really need to consolidate some of this common SmartMedia code, and
get together with the MTD guys to share it with them as well.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:42 -08:00
Matthew Dharm a6c976c6c4 [PATCH] USB Storage: more sddr09 cleanups
This is the third of three patches to prepare the sddr09 subdriver for
conversion to the Sim-SCSI framework.  This patch (as596) moves the
computation of the LBA to the start of the read/write routines, so that
addresses completely beyond the end of the device can be detected and
reported differently from transfers that are partially within the
device's capacity.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Andries Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:42 -08:00
Matthew Dharm 0dc08a3575 [PATCH] USB Storage: sddr09 cleanups
This is the second of three patches to prepare the sddr09 subdriver for
conversion to the Sim-SCSI framework.  This patch (as595) updates the
code to use standard error values for return codes instead of our
special-purpose USB_STOR_TRANSPORT_... codes.  The reverse update is
then needed in the transport routine, but with the Sim-SCSI framework
that routine will go away.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Andries Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Matthew Dharm f5b8cb9c91 [PATCH] USB Storage: cleanups of sddr09
This is the first of three patches to prepare the sddr09 subdriver for
conversion to the Sim-SCSI framework.  This patch (as594) straightens
out the initialization procedures and headers:

	Some ugly code from usb.c was moved into sddr09.c.

	Set-up of the private data structures was moved into the
	initialization routine.

	The connection between the "dpcm" version and the standalone
	version was clarified.

	A private declaration was moved from a header file into the
	subdriver's .c file.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Andries Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Matthew Dharm 7931e1c6f8 [PATCH] USB Storage: make OneTouch PM-aware
The OneTouch subdriver submits its own interrupt URB for notifications
about button presses.  Consequently it needs to know about suspend and
resume events, so it can cancel or restart the URB.

This patch (as593) adds a hook to struct us_data, to be used for
notifying subdrivers about Power Management events, and it implements
the hook in the OneTouch driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Nick Sillik <n.sillik@temple.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Pete Zaitcev b9b0942257 [PATCH] USB: Let usbmon collect less garbage
Alan Stern pointed out that (in 2.6 kernel) one successful submission results
in one callback, even for ISO-out transfers. Thus, the silly check can be
removed from usbmon. This reduces the amount of garbage printed in case
of ISO and Interrupt transfers.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Alan Stern 687f5f3428 [PATCH] USB: UHCI: edit some comments
This patch (as615b) edits a large number of comments in the uhci-hcd code,
mainly removing excess apostrophes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Alan Stern fa3465689f [PATCH] USB: UHCI: change uhci_explen macro
This patch (as616) changed the uhci_explen macro in uhci-hcd.h so that
it now accepts the desired length, rather than length - 1 with special
handling for 0.  This also fixes a minor bug that would show up only
when a driver submits a 0-length bulk URB.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Marcelo Feitoza Parisi f0b80fbf29 [PATCH] USB: ati_remote: use time_before() and friends
They deal with wrapping correctly and are nicer to read.

Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00