]> err.no Git - linux-2.6/log
linux-2.6
18 years agopc87360: Move some code around
Jim Cromie [Sun, 24 Sep 2006 19:01:56 +0000 (21:01 +0200)]
pc87360: Move some code around

pc87360: Move some code around

Moves code for get-set-decl tuples for 3 items: cpu0_vid, vrm, alarms_in
up, to just after the get-set-decl tuple for voltages.
These items are already 'activated' together with the rest of the
voltage attributes, so the move tightens the grouping that's made
explicit in next patch.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agohwmon: Fix unchecked return status, batch 1
Mark M. Hoffman [Sun, 24 Sep 2006 18:59:49 +0000 (20:59 +0200)]
hwmon: Fix unchecked return status, batch 1

hwmon: Fix unchecked return status, batch 1

Fix up some hwmon drivers so that they no longer ignore return status
from device_create_file().

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agovt1211: Document module parameters
Juerg Haefliger [Sun, 24 Sep 2006 18:55:34 +0000 (20:55 +0200)]
vt1211: Document module parameters

vt1211: Document module parameters

Add a description of the module parameters to the documentation of
the vt1211 driver.

Signed-off-by: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agovt1211: Add documentation
Juerg Haefliger [Sun, 24 Sep 2006 18:54:46 +0000 (20:54 +0200)]
vt1211: Add documentation

vt1211: Add documentation

Add documentation for the new vt1211 hardware monitoring driver.

Signed-off-by: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agohwmon: New driver for the VIA VT1211
Juerg Haefliger [Sun, 24 Sep 2006 18:54:04 +0000 (20:54 +0200)]
hwmon: New driver for the VIA VT1211

hwmon: New driver for the VIA VT1211

This is a new driver for the VIA VT1211 Super-IO chip. It is a rewrite
of the existing vt1211 driver (by Mark D. Studebaker and Lars Ekman)
which has been around for a while but never made it into the main
kernel tree.

It is implemented as a platform driver and therefore requires
lm_sensors 2.10.1 to function properly.

Signed-off-by: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agow83791d: Documentation update
Charles Spirakis [Sun, 24 Sep 2006 18:53:04 +0000 (20:53 +0200)]
w83791d: Documentation update

w83791d: Documentation update

The alarm bits and the beep enable bits are in different positions in
the hardware. Document the problem and leave it to the user-space code
to handle the situation. When this driver is updated to the standardized
sysfs alarm/beep methodology, this won't be a problem.

This is a documentation only change.

Signed-off by: Charles Spirakis <bezaur@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agohwmon: Add individual alarm files to 4 drivers
Jean Delvare [Sun, 24 Sep 2006 18:52:15 +0000 (20:52 +0200)]
hwmon: Add individual alarm files to 4 drivers

hwmon: Add individual alarm files to 4 drivers

Add individual sysfs files for all f71805f, lm63, lm83 and lm90 alarm
and fault conditions. This is a requirement for the planned
chip-independent libsensors. Almost all other hwmon drivers will need
the same improvement.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agohwmon: Make a dozen drivers no more experimental
Jean Delvare [Sun, 24 Sep 2006 18:51:37 +0000 (20:51 +0200)]
hwmon: Make a dozen drivers no more experimental

hwmon: Make a dozen drivers no more experimental

Remove the EXPERIMENTAL tag from a dozen hardware monitoring drivers.
They are in the tree for quite a long time, so we would know by now if
they were causing trouble.

Also make it clearer that the VT8231 is a VIA chip.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agok8temp: Add documentation
Rudolf Marek [Sun, 24 Sep 2006 18:50:57 +0000 (20:50 +0200)]
k8temp: Add documentation

k8temp: Add documentation

Add promised documentation for the k8temp driver.

Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoabituguru: Add suspend/resume support
Hans de Goede [Mon, 28 Aug 2006 12:42:24 +0000 (14:42 +0200)]
abituguru: Add suspend/resume support

This patch contains rudimentary suspend / resume support for the uguru,
this protects the uguru and the driver against suspend / resume cycles,
so there is no reason to unload the driver in your suspend / resume
scripts.

Only include suspend / resume functions when CONFIG_PM is set.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agok8temp: Enable automatic loading
Jean Delvare [Mon, 28 Aug 2006 12:41:03 +0000 (14:41 +0200)]
k8temp: Enable automatic loading

Let the k8temp driver load automatically.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agohwmon: New driver k8temp
Rudolf Marek [Mon, 28 Aug 2006 12:40:17 +0000 (14:40 +0200)]
hwmon: New driver k8temp

Add support for the temperature sensor(s) found in AMD K8 CPUs.

Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoit87: Copyright update
Jean Delvare [Mon, 28 Aug 2006 12:39:26 +0000 (14:39 +0200)]
it87: Copyright update

it87: Copyright update

I think my contributions to the it87 driver over the past two
years qualify me as a co-author of this driver.

Also drop old comments of dubious usefulness.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoit87: Overwrite broken default limits
Jean Delvare [Mon, 28 Aug 2006 12:37:54 +0000 (14:37 +0200)]
it87: Overwrite broken default limits

it87: Overwrite broken default limits

Some IT8716F chips where seen with unreasonable defaults for low
voltage and high temperature limits. Overwrite them with sane defaults
so as to not generate meaningless alarms.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoit87: Add support for the IT8718F
Jean Delvare [Mon, 28 Aug 2006 12:37:19 +0000 (14:37 +0200)]
it87: Add support for the IT8718F

it87: Add support for the IT8718F

The IT8718F is a Super-I/O chip with integrated hardware monitoring
functions. It is very similar to the IT8716F, so adding support to the
it87 driver was pretty straightforward. The most significant difference
is that the IT8718F has up to 8 VID pins, instead of 6 for the older
chips.

For the IT8718F, the VID value can only be read from Super-I/O space.

Userspace support is already in lm_sensors SVN (to be soon released
as 2.10.1.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoit87: Cleanup set_fan_div
Jean Delvare [Mon, 28 Aug 2006 12:35:46 +0000 (14:35 +0200)]
it87: Cleanup set_fan_div

it87: Cleanup set_fan_div

We only change one fan clock divider at a time, so there is only one
fan min which needs to be saved and restored.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoit87: in8 has no limit registers
Jean Delvare [Mon, 28 Aug 2006 12:27:25 +0000 (14:27 +0200)]
it87: in8 has no limit registers

it87: in8 has no limit registers

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoit87: Prevent overflow on fan clock divider write
Jean Delvare [Mon, 28 Aug 2006 12:26:22 +0000 (14:26 +0200)]
it87: Prevent overflow on fan clock divider write

it87: Prevent overflow on fan clock divider write

The highest possible clock divider for fan1 and fan2 is 128.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoit87: No sysfs files for disabled fans
Jean Delvare [Mon, 28 Aug 2006 12:24:17 +0000 (14:24 +0200)]
it87: No sysfs files for disabled fans

it87: No sysfs files for disabled fans

Only create the fan attributes for enabled fan tachometers. Some
motherboards have a nice BIOS which only enables the fan inputs which
are wired to a fan header on the board. This makes the configuration
easier for the user.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoit87: Add support for the IT8716F
Jean Delvare [Mon, 28 Aug 2006 12:23:46 +0000 (14:23 +0200)]
it87: Add support for the IT8716F

it87: Add support for the IT8716F

The IT8716F is a Super-I/O chip with integrated hardware monitoring
functions. It is very similar to the IT8712F, so adding support to the
it87 driver was pretty straightforward. The most significant change here
is that the IT8716F has 16-bit fan speed counters, so the user no more
needs to tweak the fan clock dividers to get the best readings.

Userspace support is already in lm_sensors SVN (to be soon released
as 2.10.1.)

Thanks to Stian Oksavik, Olivier Nicolas, Prakash Punnoor and
Juergen Kilb for testing the early versions of this patch.

Thanks also to ITE for providing datasheets and answering my questions.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agosmsc47m1: dev_warn fix
Jean Delvare [Mon, 28 Aug 2006 12:22:34 +0000 (14:22 +0200)]
smsc47m1: dev_warn fix

smsc47m1: dev_warn fix

We can't use dev_warn on an i2c client before it is attached.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agohdaps: Handle errors from input_register_device
Dmitry Torokhov [Mon, 28 Aug 2006 12:21:42 +0000 (14:21 +0200)]
hdaps: Handle errors from input_register_device

HDAPS: handle errors from input_register_device()

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoatxp1: Signed/unsigned char bug fix
Alexey Dobriyan [Mon, 28 Aug 2006 12:18:14 +0000 (14:18 +0200)]
atxp1: Signed/unsigned char bug fix

vid_to_reg() can return -1 and char can be unsigned.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agohwmon: Documentation update for w83627ehf
Rudolf Marek [Wed, 5 Jul 2006 16:15:31 +0000 (18:15 +0200)]
hwmon: Documentation update for w83627ehf

Add documentation for the w83627ehf hardware monitoring driver.

Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agohwmon: Add fan speed control features to w83627ehf
Rudolf Marek [Wed, 5 Jul 2006 16:14:31 +0000 (18:14 +0200)]
hwmon: Add fan speed control features to w83627ehf

This patch adds long-awaited support for automatic fan modes. Based on
the work of Yuan Mu from Winbond, I finished the support with the great
help of David Hubbard.

Signed-off-by: Yuan Mu <Ymu@Winbond.com.tw>
Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: David Hubbard <david.c.hubbard@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[S390] Inline assembly cleanup.
Martin Schwidefsky [Thu, 28 Sep 2006 14:56:43 +0000 (16:56 +0200)]
[S390] Inline assembly cleanup.

Major cleanup of all s390 inline assemblies. They now have a common
coding style. Quite a few have been shortened, mainly by using register
asm variables. Use of the EX_TABLE macro helps  as well. The atomic ops,
bit ops and locking inlines new use the Q-constraint if a newer gcc
is used.  That results in slightly better code.

Thanks to Christian Borntraeger for proof reading the changes.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years ago[S390] Whitespace cleanup.
Heiko Carstens [Thu, 28 Sep 2006 14:56:37 +0000 (16:56 +0200)]
[S390] Whitespace cleanup.

Huge s390 assembly files whitespace cleanup.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years ago[S390] user readable uninitialised kernel memory.
Martin Schwidefsky [Thu, 28 Sep 2006 14:56:03 +0000 (16:56 +0200)]
[S390] user readable uninitialised kernel memory.

A user space program can read uninitialised kernel memory
by appending to a file from a bad address and then reading
the result back. The cause is the copy_from_user function
that does not clear the remaining bytes of the kernel
buffer after it got a fault on the user space address.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years ago[S390] init_timer in tty3270.
Jan Glauber [Thu, 28 Sep 2006 14:55:53 +0000 (16:55 +0200)]
[S390] init_timer in tty3270.

Call init_timer only once fpr tp->timer in tty3270.

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years ago[S390] config option for z9-109 code generation.
Christian Borntraeger [Thu, 28 Sep 2006 14:55:46 +0000 (16:55 +0200)]
[S390] config option for z9-109 code generation.

Add a kernel config option for the IBM System z9. This will produce
faster code on newer compilers using the -march=z9-109 option.

Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years ago[S390] __div64_32 for 31 bit.
Martin Schwidefsky [Thu, 28 Sep 2006 14:55:39 +0000 (16:55 +0200)]
[S390] __div64_32 for 31 bit.

The clocksource infrastructure introduced with commit
ad596171ed635c51a9eef829187af100cbf8dcf7 broke 31 bit s390.
The reason is that the do_div() primitive for 31 bit always
had a restriction: it could only divide an unsigned 64 bit
integer by an unsigned 31 bit integer. The clocksource code
now uses do_div() with a base value that has the most
significant bit set. The result is that clock->cycle_interval
has a funny value which causes the linux time to jump around
like mad.
The solution is "obvious": implement a proper __div64_32
function for 31 bit s390.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years ago[S390] remove unnecessary includes.
Christian Borntraeger [Thu, 28 Sep 2006 14:55:33 +0000 (16:55 +0200)]
[S390] remove unnecessary includes.

Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years ago[S390] hypfs sparse warnings.
Michael Holzheu [Thu, 28 Sep 2006 14:55:28 +0000 (16:55 +0200)]
[S390] hypfs sparse warnings.

sparse complains, if we use bitwise operations on enums. Cast enum to
long in order to fix that problem!

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years ago[S390] Avoid static struct initializations in appldata.
Gerald Schaefer [Thu, 28 Sep 2006 14:55:23 +0000 (16:55 +0200)]
[S390] Avoid static struct initializations in appldata.

Don't use static initialization for struct members containing
variables because gcc would generate more code and use double space
on stack.

Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years ago[S390] init task memory faults.
Akinobu Mita [Thu, 28 Sep 2006 14:55:18 +0000 (16:55 +0200)]
[S390] init task memory faults.

Lock for mmap_sem is missing on page fault retry for init task
when it fails due to out of memory.

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
18 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 27 Sep 2006 21:41:24 +0000 (14:41 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (48 commits)
  [PATCH] bonding: update version number
  [PATCH] git-netdev-all: pc300_tty build fix
  [PATCH] Make PC300 WAN driver compile again
  [PATCH] Modularize generic HDLC
  [PATCH] more s2io __iomem annotations
  [PATCH] restore __iomem annotations in e1000
  [PATCH] 64bit bugs in s2io
  [PATCH] bonding: Fix primary selection error at enslavement time
  [PATCH] bonding: Don't mangle LACPDUs
  [PATCH] bonding: Validate probe replies in ARP monitor
  [PATCH] bonding: Don't release slaves when master is admin down
  [PATCH] bonding: Add priv_flag to avoid event mishandling
  [PATCH] bonding: Handle large hard_header_len
  [PATCH] bonding: Remove unneeded NULL test
  [PATCH] bonding: Format fix in seq_printf call
  [PATCH] bonding: Convert delay value from s16 to int
  [PATCH] bonding: Allow bonding to enslave a 10 Gig adapter
  Delete unused drivers/net/gt64240eth.h
  [PATCH] skge: fiber support
  [PATCH] fix possible NULL ptr deref in forcedeth
  ...

18 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 27 Sep 2006 21:41:00 +0000 (14:41 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] Don't use old-EH ->eng_timeout() hook when not needed
  [libata] sata_mv: fix oops by filling in missing hook
  [libata] One more s/15/ATA_SECONDARY_IRQ/ substitution
  [libata] pata_serverworks: fill in ->irq_clear hook
  [PATCH] pata_serverworks: correct PCI ID in cable detection table
  [PATCH] libata-sff: use our IRQ defines
  [PATCH] libata-eh: Remove layering violation and duplication when handling absent ports
  [PATCH] libata: tighten rules for legacy dependancies
  [PATCH] libata: refuse to register IRQless ports

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Wed, 27 Sep 2006 21:40:30 +0000 (14:40 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (129 commits)
  [PATCH] USB Storage: fix Rio Karma eject support build error
  USB: Airprime driver improvements to allow full speed EvDO transfers
  USB: remove OTG build warning
  USB: EHCI update VIA workaround
  USB: force root hub resume after power loss
  USB: ohci_usb can oops on shutdown
  USB: Dealias -110 code (more complete)
  USB: Remove unneeded void * casts in core files
  USB: u132-hcd: host controller driver for ELAN U132 adapter
  USB: ftdi-elan: client driver for ELAN Uxxx adapters
  usb serial: support Alcor Micro Corp. USB 2.0 TO RS-232 through pl2303 driver
  USB: Moschip 7840 USB-Serial Driver
  USB: add PlayStation 2 Trance Vibrator driver
  USB: Add ADU support for Ontrak ADU devices
  aircable: fix printk format warnings
  Add AIRcable USB Bluetooth Dongle Driver
  cypress_m8: implement graceful failure handling
  cypress_m8: improve control endpoint error handling
  cypress_m8: use usb_fill_int_urb where appropriate
  cypress_m8: use appropriate URB polling interval
  ...

18 years ago[PATCH] i386: Use early clobbers for semaphores now
Andi Kleen [Wed, 27 Sep 2006 19:38:56 +0000 (21:38 +0200)]
[PATCH] i386: Use early clobbers for semaphores now

The new code does clobber the result early, so make sure to tell
gcc to not put it into the same register as a input argument

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@osdl.org>
Acked-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] bonding: update version number
Jay Vosburgh [Tue, 26 Sep 2006 17:55:00 +0000 (10:55 -0700)]
[PATCH] bonding: update version number

I neglected to properly update the version number in the recent
patch series; this sets it to something reasonable.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
18 years ago[PATCH] git-netdev-all: pc300_tty build fix
Andrew Morton [Wed, 27 Sep 2006 07:40:36 +0000 (00:40 -0700)]
[PATCH] git-netdev-all: pc300_tty build fix

In file included from drivers/net/wan/pc300_tty.c:59:
drivers/net/wan/pc300.h:335: error: field 'pppdev' has incomplete type

Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
18 years ago[PATCH] USB Storage: fix Rio Karma eject support build error
Andrew Morton [Tue, 26 Sep 2006 00:00:52 +0000 (17:00 -0700)]
[PATCH] USB Storage: fix Rio Karma eject support build error

In file included from drivers/usb/storage/usb.c:180:
drivers/usb/storage/unusual_devs.h:221: error: 'US_PR_KARMA' undeclared here (not in a function)
drivers/usb/storage/unusual_devs.h:221: error: 'rio_karma_init' undeclared here (not in a function)

Cc: Keith Bennett <keith@mcs.st-and.ac.uk>
Acked-by: Bob Copeland <me@bobcopeland.com>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: Airprime driver improvements to allow full speed EvDO transfers
Andy Gay [Mon, 3 Jul 2006 22:43:01 +0000 (18:43 -0400)]
USB: Airprime driver improvements to allow full speed EvDO transfers

Adapted from an earlier patch by Greg KH <gregkh@suse.de>.
That patch added multiple read urbs and larger transfer buffers to allow
data transfers at full EvDO speed.

This version includes additional device IDs and fixes a memory leak in
the transfer buffer allocation.

Some (maybe all?) of the supported devices present multiple bulk endpoints,
the additional EPs can be used for control and status functions,
This version allocates 3 EPs by default, that can be changed using
the 'endpoints' module parameter.

Tested with Sierra Wireless EM5625 and MC5720 embedded modules.

Device ID (0x0c88, 0x17da) for the Kyocera Wireless KPC650/Passport
was added but is not yet tested.

From: Andy Gay <andy@andynet.net>
Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: remove OTG build warning
David Brownell [Mon, 18 Sep 2006 23:53:26 +0000 (16:53 -0700)]
USB: remove OTG build warning

Somewhere along the line, a variable in a USB-OTG codepath
stopped being used; this removes the relevant compiler warning.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: EHCI update VIA workaround
David Brownell [Tue, 19 Sep 2006 00:03:16 +0000 (17:03 -0700)]
USB: EHCI update VIA workaround

This revamps handling of the hardware "async advance" IRQ, and its watchdog
timer.  Basically it dis-entangles that important timeout from the others,
simplifying the associated state and code to make it more robust.

This reportedly improves behavior of EHCI on some systems with VIA chips,
and AFAIK won't affect non-VIA hardware.  VIA systems need this code to
recover from silcon bugs whereby the "async advance" IRQ isn't issued.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: force root hub resume after power loss
Alan Stern [Tue, 19 Sep 2006 14:07:58 +0000 (10:07 -0400)]
USB: force root hub resume after power loss

This patch(as785) forces the PM core to resume a root hub after a
power loss during system sleep.  If the root hub had been suspended
before the system sleep then normally the PM core would not resume it
afterward.  Without this resume, various sorts of wakeup events (like
port change events) can get lost.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: ohci_usb can oops on shutdown
Pete Zaitcev [Tue, 19 Sep 2006 05:57:22 +0000 (22:57 -0700)]
USB: ohci_usb can oops on shutdown

When ohci-hcd is shutting down (for rmmod or PC-card removal), there is
a window when the device is shut down, HC communication area (->hcca)
is freed, but the core has not called "free_irq" yet. If another device
triggers a shared interrupt in this window, we oops when trying to
access the freed ->hcca.

This patch removes the window by calling free_irq before ->hcca is freed.

The patch is tested at the PC hotplug test rig at Stratus, and with
rmmod by Rafael Wysocki.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: Dealias -110 code (more complete)
Pete Zaitcev [Tue, 19 Sep 2006 05:49:02 +0000 (22:49 -0700)]
USB: Dealias -110 code (more complete)

The purpose of this patch is to split off the case when a device does
not reply on the lower level (which is reported by HC hardware), and
a case when the device accepted the request, but does not reply at
upper level. This redefinition allows to diagnose issues easier,
without asking the user if the -110 happened "immediately".

The usbmon splits such cases already thanks to its timestamp, but
it's not always available.

I adjusted all drivers which I found affected (by searching for "urb").
Out of tree drivers may suffer a little bit, but I do not expect much
breakage. At worst they may print a few messages.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: Remove unneeded void * casts in core files
Tobias Klauser [Wed, 13 Sep 2006 19:38:41 +0000 (21:38 +0200)]
USB: Remove unneeded void * casts in core files

The patch removes unneeded casts for the following (void *) pointers:
 - struct file: private
 - struct urb: context
 - struct usb_bus: hcpriv
 - return value of kmalloc()

The patch also contains some whitespace cleanup in the relevant areas.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: u132-hcd: host controller driver for ELAN U132 adapter
Tony Olech [Wed, 13 Sep 2006 10:27:35 +0000 (11:27 +0100)]
USB: u132-hcd: host controller driver for ELAN U132 adapter

This "u132-hcd" module is one half of the "driver" for
ELAN's U132 which is a USB to CardBus OHCI controller
adapter. This module needs the "ftdi-elan" module in
order to communicate to CardBus OHCI controller inserted
into the U132 adapter.

When the "ftdi-elan" module detects a supported CardBus
OHCI controller in the U132 adapter it loads this "u132-hcd"
module.

Upon a successful device probe() the single workqueue
is started up which does all the processing of commands
from the USB core that implement the host controller.

The workqueue maintains the urb queues and issues commands
via the functions exported by the "ftdi-elan" module. Each
such command will result in a callback.

Note that the "ftdi-elan" module is a USB client driver.

Note that this "u132-hcd" module is a (cut-down OHCI)
host controller.

Thus we have a topology with the parent of a host controller
being a USB client! This really stresses the USB subsystem
semaphore/mutex handling in the module removal.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: ftdi-elan: client driver for ELAN Uxxx adapters
Tony Olech [Wed, 13 Sep 2006 10:26:04 +0000 (11:26 +0100)]
USB: ftdi-elan: client driver for ELAN Uxxx adapters

This "ftdi-elan" module is one half of the "driver" for
ELAN's Uxxx series adapters which are USB to PCMCIA CardBus
adapters. Currently only the U132 adapter is available and
it's module is called "u132-hcd".

When the USB hot plug subsystem detects a Uxxx series adapter
it should load this module.

Upon a successful device probe() the jtag device file interface
is created and the status workqueue started up.

The jtag device file interface exists for the purpose of
updating the firmware in the Uxxx series adapter, but as
yet it had never been used.

The status workqueue initializes the Uxxx and then sits there
polling the Uxxx until a supported PCMCIA CardBus device is
detected it will start the command and respond workqueues
and then load the module that handles the device. This will
initially be only the u132-hcd module. The status workqueue
then just polls the Uxxx looking for card ejects.

The command and respond workqueues implement a command
sequencer for communicating with the firmware on the other
side of the FTDI chip in the Uxxx. This "ftdi-elan" module
exports some functions to interface with the sequencer.

Note that this module is a USB client driver.

Note that the "u132-hcd" module is a (cut-down OHCI)
host controller.

Thus we have a topology with the parent of a host controller
being a USB client! This really stresses the USB subsystem
semaphore/mutex handling in the module removal.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousb serial: support Alcor Micro Corp. USB 2.0 TO RS-232 through pl2303 driver
Johannes Steingraeber [Sat, 16 Sep 2006 14:17:34 +0000 (16:17 +0200)]
usb serial: support Alcor Micro Corp. USB 2.0 TO RS-232 through pl2303 driver

Patch to add support for Alcor Micro Corp. USB 2.0 TO RS-232 converter.
This patch adds VID and PID to pl2303.[ch], adds it to the "HORRIBLE
HACK FOR PL2303" in usb-serial.c and also prevents cdc-acm to claim
driving this device by blacklisting it in hid-core.

Signed-off-by: Johannes Steingraeber <Jo_Stein@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: Moschip 7840 USB-Serial Driver
Paul B Schroeder [Fri, 1 Sep 2006 00:41:47 +0000 (19:41 -0500)]
USB: Moschip 7840 USB-Serial Driver

Signed-off-by: Paul B Schroeder <pschroeder@uplogix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: add PlayStation 2 Trance Vibrator driver
Sam Hocevar [Wed, 30 Aug 2006 00:34:56 +0000 (02:34 +0200)]
USB: add PlayStation 2 Trance Vibrator driver

This patch is a driver for the PlayStation 2 specific Trance Vibrator
device. The only thing that device can do is vibrate at various speeds.

Signed-off-by: Sam Hocevar <sam@zoy.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: Add ADU support for Ontrak ADU devices
Steven Haigh [Tue, 8 Aug 2006 21:42:06 +0000 (07:42 +1000)]
USB: Add ADU support for Ontrak ADU devices

This patch adds support for Ontrak ADU USB devices.

Fixed for printk issues by Randy Dunlap <rdunlap@xenotime.net>

Signed-off-by: Steven Haigh <netwiz@crc.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoaircable: fix printk format warnings
Randy Dunlap [Sat, 26 Aug 2006 17:56:10 +0000 (10:56 -0700)]
aircable: fix printk format warnings

Fix printk format warnings:
drivers/usb/serial/aircable.c:221: warning: format â€˜%Zd’ expects type â€˜signed size_t’, but argument 4 has type â€˜int’
drivers/usb/serial/aircable.c:283: warning: format â€˜%Zd’ expects type â€˜signed size_t’, but argument 4 has type â€˜int’

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoAdd AIRcable USB Bluetooth Dongle Driver
Manuel Francisco Naranjo [Wed, 9 Aug 2006 19:35:12 +0000 (16:35 -0300)]
Add AIRcable USB Bluetooth Dongle Driver

Add driver for AIRcable USB Bluetooth dongle.

Signed-off-by: Naranjo, Manuel Francisco <naranjo.manuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agocypress_m8: implement graceful failure handling
Mike Isely [Wed, 30 Aug 2006 03:07:11 +0000 (22:07 -0500)]
cypress_m8: implement graceful failure handling

When receiving a fatal error from the USB core, e.g. EILSEQ (which can
happen if the polling interval is too short), fail gracefully.
Previously the driver would fill the log with useless error messages
or (more alarmingly) silently spin forever trying to write updated
control information to the device.  This change implements a new flag
which if cleared indicates that the driver has failed.  The flag will
be set on initialization, cleared on fatal errors, and anything else
that touches the USB port in the driver will abort if the flag is
clear.  When the flag is cleared, a message will be logged indicating
that the driver has failed.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agocypress_m8: improve control endpoint error handling
Mike Isely [Wed, 30 Aug 2006 03:07:07 +0000 (22:07 -0500)]
cypress_m8: improve control endpoint error handling

Fix usb core function error return checks to look for negative errno
values, not positive errno values.  This bug had rendered those checks
useless.  Also remove attempted error recovery on control endpoints
for EPIPE - with control endpoints EPIPE does not indicate a halted
endpoint so trying to recover with usb_clear_halt() is not the correct
action.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agocypress_m8: use usb_fill_int_urb where appropriate
Mike Isely [Wed, 30 Aug 2006 03:07:04 +0000 (22:07 -0500)]
cypress_m8: use usb_fill_int_urb where appropriate

Rather than directly filling in URB fields, it's safer to use
usb_fill_int_urb().  This improves robustness of the driver; URB
changes in the future will not go uninitialized here.  That point not
withstanding, this driver should at least be self-consistent.  Either
use usb_fill_int_urb() everywhere or don't bother with it all.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agocypress_m8: use appropriate URB polling interval
Mike Isely [Wed, 30 Aug 2006 03:06:59 +0000 (22:06 -0500)]
cypress_m8: use appropriate URB polling interval

The polling interval for the device can't always be 1msec.  If it is
too quick, the device can fail causing a fatal (to the driver) EILSEQ
error from the USB core.  The actual correct value is reported by the
device as part of its configuration data, so use that value as the
default.  On a DeLorme Earthmate for example, the device reports that
it wants a 6msec interval.  As part of this fix, the "interval" module
option has been fixed as well; the device's default can be overridden
by specifying interval=<value> as a module option.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix __must_check warnings in drivers/usb/serial/
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
USB: fix __must_check warnings in drivers/usb/serial/

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix __must_check warnings in drivers/usb/host/
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
USB: fix __must_check warnings in drivers/usb/host/

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix __must_check warnings in drivers/usb/input/
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
USB: fix __must_check warnings in drivers/usb/input/

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix __must_check warnings in drivers/usb/class/
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
USB: fix __must_check warnings in drivers/usb/class/

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix __must_check warnings in drivers/usb/atm/
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
USB: fix __must_check warnings in drivers/usb/atm/

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix __must_check warnings in drivers/usb/misc/
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
USB: fix __must_check warnings in drivers/usb/misc/

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix __must_check warnings in drivers/usb/core/
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
USB: fix __must_check warnings in drivers/usb/core/

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix root-hub resume when CONFIG_USB_SUSPEND is not set
Alan Stern [Tue, 19 Sep 2006 14:08:43 +0000 (10:08 -0400)]
USB: fix root-hub resume when CONFIG_USB_SUSPEND is not set

This patch (as786) removes a redundant test and fixes a problem
involving repeated system sleeps when CONFIG_USB_SUSPEND is not set.
During the first wakeup, the root hub's dev.power.power_state.event
field doesn't get updated, causing it not to be suspended during the
second sleep transition.

This takes care of the issue raised by Rafael J. Wysocki and Mattia
Dongili.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousbcore: remove usb_suspend_root_hub
Alan Stern [Wed, 30 Aug 2006 19:47:11 +0000 (15:47 -0400)]
usbcore: remove usb_suspend_root_hub

This patch (as740) removes the existing support for autosuspend of
root hubs.  That support fit in rather awkwardly with the rest of
usbcore and it was used only by ohci-hcd.  It won't be needed any more
since the hub driver will take care of autosuspending all hubs, root
or external.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousbcore: non-hub-specific uses of autosuspend
Alan Stern [Wed, 30 Aug 2006 19:47:18 +0000 (15:47 -0400)]
usbcore: non-hub-specific uses of autosuspend

This patch (as741) makes the non-hub parts of usbcore actually use the
autosuspend facilities added by an earlier patch.

Devices opened through usbfs are autoresumed and then
autosuspended upon close.

Likewise for usb-skeleton.

Devices are autoresumed for usb_set_configuration.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousbcore: add autosuspend/autoresume infrastructure
Alan Stern [Wed, 30 Aug 2006 19:47:02 +0000 (15:47 -0400)]
usbcore: add autosuspend/autoresume infrastructure

This patch (as739) adds the basic infrastructure for USB autosuspend
and autoresume.  The main features are:

PM usage counters added to struct usb_device and struct
usb_interface, indicating whether it's okay to autosuspend
them or they are currently in use.

Flag added to usb_device indicating whether the current
suspend/resume operation originated from outside or as an
autosuspend/autoresume.

Flag added to usb_driver indicating whether the driver
supports autosuspend.  If not, no device bound to the driver
will be autosuspended.

Mutex added to usb_device for protecting PM operations.
Unlike the device semaphore, the locking rule for the pm_mutex
is that you must acquire the locks going _up_ the device tree.

New routines handling autosuspend/autoresume requests for
interfaces and devices.

Suspend and resume requests are propagated up the device tree
(but not outside the USB subsystem).

work_struct added to usb_device, for carrying out delayed
autosuspend requests.

Autoresume added (and autosuspend prevented) during probe and
disconnect.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousbcore: store each usb_device's level in the tree
Alan Stern [Wed, 30 Aug 2006 19:46:48 +0000 (15:46 -0400)]
usbcore: store each usb_device's level in the tree

This patch (as778) adds a field to struct usb_device to store the
device's level in the USB tree.  In itself this number isn't really
important.  But the overhead is very low, and in a later patch it will
be used for preventing bogus warnings from the lockdep checker.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: UB: Let cdrecord to see a device with media absent
Pete Zaitcev [Thu, 7 Sep 2006 23:54:22 +0000 (16:54 -0700)]
USB: UB: Let cdrecord to see a device with media absent

The command "cdrecord dev=/dev/uba x.iso" prints nasty garbage if a blank
is not in the drive. This happens because drivers have to set req->errors
separately from just returning zero uptodate with end_that_request_first,
end_that_request_last. These functions only set error in BIO, but sg_io()
ignores it.

Since we're on it, let cdrecord access a device when ->changed is set.
It's useful if someone wants to know device capabilities without burning
anything.

Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: usb/input/usbmouse.c: whitespace cleanup
Reiner Herrmann [Wed, 6 Sep 2006 00:37:21 +0000 (02:37 +0200)]
USB: usb/input/usbmouse.c: whitespace cleanup

Replace spaces with tab and change comment indention for better readability.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: ohci-at91, two one-liners
David Brownell [Sun, 3 Sep 2006 19:21:50 +0000 (12:21 -0700)]
USB: ohci-at91, two one-liners

This includes two one-liners forwarded to me for the OHCI support on at91:

 - KB920x (and other boards with CPUs in non-BGA packages) need a slightly
   different way to say "ignore that port, it's not pinned out";

 - On resume, if we turn clocks on, record that we did so.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: net2280: update dma buffer allocation
David Brownell [Sat, 2 Sep 2006 10:13:45 +0000 (03:13 -0700)]
USB: net2280: update dma buffer allocation

This updates the code handling dma-coherent buffer allocations, basically
reusing code from the musb_hdrc driver.  Instead of trying to work around two
significant limitations of the dma framework (memory wastage for buffers
smaller than a page, and inconsistency between calling context requirements
for allocation and free) this just works around one of them (the latter).

So count this as two steps forward (bugfixes:  the latter issue could cause
errors on some platforms, and some MIPS changes broke code for the former),
and one step back (increasing cross-platform memory wastage).

Plus linelength and whitespace fixes; and minor data segment shrinkage.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: usb serial gadget smp related bug
Eugeny S. Mints [Sat, 2 Sep 2006 10:59:19 +0000 (03:59 -0700)]
USB: usb serial gadget smp related bug

Adjust dev->dev_lock spinlock lock/unlock calls to be safe for SMP case.
Otherwise the following sequence may lead to a deadlock in SMP case:

gs_send()->usb_ep_queue()
->(in case a request is satisfied immediatly) gs_write_complete()

for ex for pxa2xx_udc.c:
usb_ep_queue()->pxa2xx_ep_queue()->write_fifo()->done()->gs_write_complete()
(through req.complete pointer)

Signed-off-by: Eugeny S. Mints <emints@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: replace kernel_thread() with kthread_run() in libusual.c
Matthew Dharm [Thu, 31 Aug 2006 20:37:29 +0000 (13:37 -0700)]
USB: replace kernel_thread() with kthread_run() in libusual.c

Replaced kernel_thread() with kthread_run() since kernel_thread() is
deprecated in drivers/modules.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agogadgetfs patch for ep0out
Skip Hansen [Fri, 1 Sep 2006 22:26:27 +0000 (15:26 -0700)]
gadgetfs patch for ep0out

For ep0out transfers (rare), be sure to copy the right data to userspace.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: EHCI whitespace fixes (cosmetic)
David Brownell [Wed, 30 Aug 2006 21:50:06 +0000 (14:50 -0700)]
USB: EHCI whitespace fixes (cosmetic)

[ ... when you have an editor set to remind you of whitespace bugs ... ]

Cosmetic EHCI changes: remove end-of-line whitespace, spaces before tabs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: ethernet gadget avoids zlps for musb_hdrc
David Brownell [Wed, 30 Aug 2006 20:24:56 +0000 (13:24 -0700)]
USB: ethernet gadget avoids zlps for musb_hdrc

For systems using the Mentor HDRC controllers we get better TX DMA throughput
if we can avoid falling back to PIO to write zero length packets ... so tell
the driver to avoid ZLPs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousbmon: don't call mon_dmapeek if DMA isn't being used
Alan Stern [Wed, 30 Aug 2006 15:35:21 +0000 (11:35 -0400)]
usbmon: don't call mon_dmapeek if DMA isn't being used

This patch (as755b) fixes a bug in usbmon.  Rather than assuming all
USB host controllers use DMA, the code will check the usb_bus data
structure.  If DMA isn't used, we don't want to try peeking into a
non-existent DMA buffer!

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousbcore: trim down usb_bus structure
Alan Stern [Wed, 30 Aug 2006 15:32:52 +0000 (11:32 -0400)]
usbcore: trim down usb_bus structure

As part of the ongoing program to flatten out the HCD bus-glue layer,
this patch (as771b) eliminates the hcpriv, release, and kref fields
from struct usb_bus.  hcpriv and release were not being used for
anything worthwhile, and kref has been moved into the enclosing
usb_hcd structure.

Along with those changes, the patch gets rid of usb_bus_get and
usb_bus_put, replacing them with usb_get_hcd and usb_put_hcd.

The one interesting aspect is that the dev_set_drvdata call was
removed from usb_put_hcd, where it clearly doesn't belong.  This means
the driver private data won't get reset to NULL.  It shouldn't cause
any problems, since the private data is undefined when no driver is
bound.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousbcore: Add flag for whether a host controller uses DMA
Alan Stern [Wed, 30 Aug 2006 15:29:56 +0000 (11:29 -0400)]
usbcore: Add flag for whether a host controller uses DMA

This patch (as770b) introduces a new field to usb_bus: a flag
indicating whether or not the host controller uses DMA.  This serves
to encapsulate the computation.  It also means we will have only one
spot to update if the DMA API changes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: remove struct usb_operations
Alan Stern [Wed, 30 Aug 2006 15:27:36 +0000 (11:27 -0400)]
USB: remove struct usb_operations

All of the currently-supported USB host controller drivers use the HCD
bus-glue framework.  As part of the program for flattening out the glue
layer, this patch (as769) removes the usb_operations structure.  All
function calls now go directly to the HCD routines (slightly renamed
to remain within the "usb_" namespace).

The patch also removes usb_alloc_bus(), because it's not useful in the
HCD framework and it wasn't referenced anywhere.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: usb-hub-driver-improve-use-of-ifdef fix
Andrew Morton [Tue, 15 Aug 2006 06:11:02 +0000 (23:11 -0700)]
USB: usb-hub-driver-improve-use-of-ifdef fix

Fix CONFIG_PM=n build.

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: Turn usb_resume_both() into static inline
Alexey Dobriyan [Sun, 20 Aug 2006 14:58:42 +0000 (18:58 +0400)]
USB: Turn usb_resume_both() into static inline

drivers/usb/core/hub.c: In function `hub_events':
drivers/usb/core/hub.c:2591: warning: statement with no effect

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousbcore: help drivers to change device configs
Alan Stern [Mon, 21 Aug 2006 16:08:19 +0000 (12:08 -0400)]
usbcore: help drivers to change device configs

It's generally a bad idea for USB interface drivers to try to change a
device's configuration, and usbcore doesn't provide any way for them
to do it.  However in a few exceptional circumstances it can make
sense.  This patch (as767) adds a roundabout mechanism to help drivers
that may need it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousb-storage: fix for UFI LUN detection
Alan Stern [Mon, 21 Aug 2006 16:00:53 +0000 (12:00 -0400)]
usb-storage: fix for UFI LUN detection

The UFI specification doesn't permit devices to indicate non-existent
LUNs in the manner prescribed by the SCSI spec.  This patch (as773)
sets a special flag so that the SCSI scanner will recognize these
devices and treat them specially.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix typo in drivers/usb/gadget/Kconfig
Jules Villard [Tue, 22 Aug 2006 20:40:15 +0000 (22:40 +0200)]
USB: fix typo in drivers/usb/gadget/Kconfig

This tiny patch fixes a typo in drivers/usb/gadget/Kconfig. The typo
is present in 2.6.18-rc4 and in the corresponding -mm tree (and AFAIK,
FYI and FWIW was present in previous kernel versions as well).

From: Jules Villard <jvillard@ens-lyon.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB: fix signedness issue in drivers/usb/gadget/ether.c
Eric Sesterhenn [Mon, 21 Aug 2006 22:31:05 +0000 (15:31 -0700)]
USB: fix signedness issue in drivers/usb/gadget/ether.c

another gcc 4.1 signdness warning:

drivers/usb/gadget/ether.c:2028: warning: comparison of unsigned expression < 0 is always false

length is assigned the value of usb_ep_queue() which returns an int.
Directly after this it is checked for < 0, which can never be true.  Making
length an int makes the error check work again.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB core: Use const where possible.
Luiz Fernando N. Capitulino [Sun, 27 Aug 2006 02:48:11 +0000 (23:48 -0300)]
USB core: Use const where possible.

This patch marks some USB core's functions parameters as const. This
improves the design (we're saying to the caller that its parameter is
not going to be modified) and may help in compiler's optimisation work.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agowusb: pretty print new wireless USB devices when they connect
Inaky Perez-Gonzalez [Sat, 26 Aug 2006 02:35:31 +0000 (19:35 -0700)]
wusb: pretty print new wireless USB devices when they connect

New code being pushed to linuxuwb.org requires this patch to connect
WUSB devices.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agowusb: handle wusb device ep0 speed settings
Inaky Perez-Gonzalez [Sat, 26 Aug 2006 02:35:30 +0000 (19:35 -0700)]
wusb: handle wusb device ep0 speed settings

This patch teaches the USB stack handling of WUSB devices (those whose
speed is USB_SPEED_VARIABLE). For these devices, we need to set ep0's
maxpacketsize to 512 (even though the device descriptor reports it as
0xff).

New code being pushed to linuxuwb.org requires this patch to connect WUSB
devices.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agowusb: hub code recognizes wusb ports
Inaky Perez-Gonzalez [Sat, 26 Aug 2006 02:35:29 +0000 (19:35 -0700)]
wusb: hub code recognizes wusb ports

This patch enables the USB stack to recognize WUSB devices (from a
WUSB HCD) and assigns them the proper speed setting
(USB_SPEED_VARIABLE).

1. Introduce usb_hcd->wireless to mark a host controller instance as
   being wireless, and thus having wireless 'fake' ports.

   [discarded previous model of using a reserved bit in the port_stat
   struct to do this; thanks to Alan Stern for indicating the
   proper way to do it].

2. Introduce hub.c:hub_is_wusb() that tests if a hub is a WUSB root
   hub (WUSB doesn't have non-root hubs).

New code being pushed to linuxuwb.org requires this patch to connect WUSB
devices.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousb: deal with broken config descriptors
Inaky Perez-Gonzalez [Sat, 26 Aug 2006 02:35:28 +0000 (19:35 -0700)]
usb: deal with broken config descriptors

Change usb_get_configuration() so that it is more tolerant to devices
with bad configuration descriptors (it'll make it ignore
configurations that fail to load).

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoUSB Storage: add rio karma eject support
Matthew Dharm [Mon, 14 Aug 2006 00:30:14 +0000 (17:30 -0700)]
USB Storage: add rio karma eject support

This changeset from Keith Bennett (via Bob Copeland) moves the Karma
initializer to its own file and adds trapping of the START_STOP command to
enable eject of the device.

Signed-off-by: Keith Bennett <keith@mcs.st-and.ac.uk>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousb-skeleton: small update
Luiz Fernando N. Capitulino [Tue, 15 Aug 2006 01:44:29 +0000 (22:44 -0300)]
usb-skeleton: small update

o CodingStyle fixes
o Removes trailing spaces
o Do not make not needed initialiation of automatic variables
o Use usb_endpoint_* functions
o If we get an error in the write URB callback print an error message instead
  of a debug one

(Pretty unrelated changes, but spliting this up doesn't pay off as our main
changes are just CodingStyle fixes).

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agousbcore: khubd and busy-port handling
Alan Stern [Fri, 11 Aug 2006 20:52:39 +0000 (16:52 -0400)]
usbcore: khubd and busy-port handling

We don't want khubd to start interfering in the device-resume process
merely because the PORT_STATUS_C_SUSPEND feature happens to be set.
Ports need to be marked as busy while a resume is taking place.

In addition, so long as ports are marked as busy, khubd won't be able to
clear their various status-change features.  On an interrupt-driven root
hub this could lead to an interrupt storm.  Root hub IRQs should not be
re-enabled until the busy_bits value is equal to 0.

This patch (as765) fixes these two potential problems.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>