]> Git Repo - linux.git/log
linux.git
16 years agoUSB: test for NULL return from platform_get_resource() in ohci_hcd_sm501_drv_remove()
Jesper Juhl [Fri, 21 Mar 2008 21:55:45 +0000 (22:55 +0100)]
USB: test for NULL return from platform_get_resource() in ohci_hcd_sm501_drv_remove()

platform_get_resource() may return null, so although it seems it will never
do so here unless there's a bug elsewhere, it does no harm to be defensive
and test.

Signed-off-by: Jesper Juhl <[email protected]>
Acked-by: David Brownell <[email protected]>
Acked-by: Magnus Damm <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: serial: Remove obsolete contact addresses
Matti Linnanvuori [Sun, 23 Mar 2008 11:08:01 +0000 (04:08 -0700)]
USB: serial: Remove obsolete contact addresses

Remove obsolete contact addresses.

Signed-off-by: Matti Linnanvuori <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: fix comments of 2 functions in hcd.c
Ming Lei [Sun, 23 Mar 2008 12:58:28 +0000 (20:58 +0800)]
USB: fix comments of 2 functions in hcd.c

Remove useless @type note for rh_string() and @r note for usb_hcd_irq()
since this two parameters were removed.

Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agousb: u132-hcd driver: semaphore to mutex
Daniel Walker [Sun, 23 Mar 2008 07:00:02 +0000 (00:00 -0700)]
usb: u132-hcd driver: semaphore to mutex

Signed-off-by: Daniel Walker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agousb: u132-hcd driver style clean up
Daniel Walker [Sun, 23 Mar 2008 07:00:01 +0000 (00:00 -0700)]
usb: u132-hcd driver style clean up

I was converting a semaphore in this file to a mutex when I noticed that
this file has some fairly rampant style problems. Practically every line
has spaces instead of tabs .. Once I cleared that up, checkpatch.pl showed
a number of other problem.. I think this file might be a good one to review
for new style checks that could be added..

Below are the only two remaining which I didn't remove.

#5083: FILE: drivers/usb/host/u132-hcd.c:2907:
+               error:

WARNING: labels should not be indented
#5087: FILE: drivers/usb/host/u132-hcd.c:2911:
+               stall:

These labels are actually inside a switch statement, and they are right
under "default:". "default:" appears to be exempt and these other label
should be too, or default shouldn't be exempt.

I also deleted a few lines due to single statements inside { } ,

if (is_error()) {
return;
}

becomes,

if (is_error())
return;

with one line deleted.

Signed-off-by: Daniel Walker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: add usb-serial spcp8x5 driver
Greg Kroah-Hartman [Thu, 7 Feb 2008 22:59:03 +0000 (23:59 +0100)]
USB: add usb-serial spcp8x5 driver

Original version of the driver done by Linxb, changes by Harald, and
lots of cleanups by me in order to get it into a mergable state.

Cc: Linxb <[email protected]>
Cc: Harald Klein <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agousb/usb-serial-sierra-add-new-dev-group
Kevin Lloyd [Wed, 2 Apr 2008 18:24:56 +0000 (11:24 -0700)]
usb/usb-serial-sierra-add-new-dev-group

This patch is for the sierra driver and adds support for a new group of
devices that have a new USB configuration.
This targets kernel 2.6.25-rc7

Signed-off-by: Kevin Lloyd <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Serial: Sierra: C597 fix
Kevin Lloyd [Mon, 31 Mar 2008 17:20:54 +0000 (10:20 -0700)]
USB: Serial: Sierra: C597 fix

This patch is for the sierra driver and fixes a Compass 597 bug that
allows users to access the SD-Card.

This targets kernel 2.6.25-rc7

Signed-off-by: Kevin Lloyd <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Serial: Sierra: Clean up
Kevin Lloyd [Fri, 28 Mar 2008 17:05:08 +0000 (10:05 -0700)]
USB: Serial: Sierra: Clean up

This patch cleans up some of the sierra driver code. Please package this
with the other patches in this group as I would like the driver version
to reflect their changes as well.

Signed-off-by: Kevin Lloyd <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: increase cdc-acm write throughput
David Engraf [Thu, 20 Mar 2008 09:01:34 +0000 (10:01 +0100)]
USB: increase cdc-acm write throughput

the following patch uses 16 write urbs and a writsize of wMaxPacketSize
* 20.  With this patch I get the maximum througput from my linux system
with 20MB/sec read and 15 MB/sec write (full speed 1 MB/sec both)

I also deleted the flag URB_NO_FSBR for the writeurbs, because this
makes my full speed devices significant slower.

Signed-off-by: David Engraf <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: cdc-acm tell tty layer not to split things up.
David Engraf [Thu, 20 Mar 2008 09:53:52 +0000 (10:53 +0100)]
USB: cdc-acm tell tty layer not to split things up.

It ensures that the tty level do not split
the send buffer into 2KB blocks.

Signed-off-by: David Engraf <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agousbmon: restore mmap
Pete Zaitcev [Thu, 20 Mar 2008 05:29:51 +0000 (22:29 -0700)]
usbmon: restore mmap

Paolo asked to enable the mmap. I kept it off because I'm do not
entirely understand how it workse these days after ->nopage etc.
But it seems like working somewhat at least.

Signed-Off-By: Pete Zaitcev <[email protected]>
Cc: Paolo Abeni <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Fix "cut and paste" booboo in usbmon Makefile.
Robert P. J. Day [Sun, 9 Mar 2008 17:55:01 +0000 (13:55 -0400)]
USB: Fix "cut and paste" booboo in usbmon Makefile.

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Remove EXPERIMENTAL designation from USB_EHCI_ROOT_HUB_TT.
Robert P. J. Day [Sat, 8 Mar 2008 08:27:44 +0000 (03:27 -0500)]
USB: Remove EXPERIMENTAL designation from USB_EHCI_ROOT_HUB_TT.

According to David Brownell, this feature doesn't require an
experimental designation any longer.

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Remove EXPERIMENTAL from dynamic USB minor allocation.
Robert P. J. Day [Sat, 8 Mar 2008 08:12:44 +0000 (03:12 -0500)]
USB: Remove EXPERIMENTAL from dynamic USB minor allocation.

Since this USB feature seems non-experimental, remove that dependency.

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Remove EXPERIMENTAL designation from USB MDC800 support.
Robert P. J. Day [Sat, 8 Mar 2008 08:04:05 +0000 (03:04 -0500)]
USB: Remove EXPERIMENTAL designation from USB MDC800 support.

Since support for the USB Mustek MDC800 Digital Camera has apparently
been around since the beginning of the git repository, it's safe to
assume it's no longer experimental.

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Remove EXPERIMENTAL designation from USB serial/ Kconfig entries
Robert P. J. Day [Sat, 8 Mar 2008 08:00:04 +0000 (03:00 -0500)]
USB: Remove EXPERIMENTAL designation from USB serial/ Kconfig entries

Since nothing under the USB serial/ directory seems to be obviously
experimental, remove the EXPERIMENTAL dependency from all of those
Kconfig entries.

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Remove EXPERIMENTAL designation from USB misc/ Kconfig entries
Robert P. J. Day [Sat, 8 Mar 2008 07:46:57 +0000 (02:46 -0500)]
USB: Remove EXPERIMENTAL designation from USB misc/ Kconfig entries

Since nothing under the USB misc/ seems to be obviously experimental,
remove the EXPERIMENTAL dependency from those Kconfig entries.

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Remove EXPERIMENTAL tags from some USB gadget Kconfig entries.
Robert P. J. Day [Mon, 10 Mar 2008 19:09:51 +0000 (15:09 -0400)]
USB: Remove EXPERIMENTAL tags from some USB gadget Kconfig entries.

Based on a recent discussion on the Linux USB mailing list, remove the
designation of EXPERIMENTAL from some USB gadget entries, and tag some
of them as DEVELOPMENT.

just for fun, i added a bit of help for gadgetfs, explaining the
race condition.

Signed-off-by: Robert P. J. Day <[email protected]>
Acked-by: David Brownell <[email protected]>
16 years agoUSB: Remove EXPERIMENTAL designation from USB storage Kconfig entries.
Robert P. J. Day [Sat, 8 Mar 2008 07:17:55 +0000 (02:17 -0500)]
USB: Remove EXPERIMENTAL designation from USB storage Kconfig entries.

Since there seems to be little reason to mark the current USB storage
features as "EXPERIMENTAL," remove that dependency.

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: mass storage: emulation of sat scsi_pass_thru with ATACB
matthieu castet [Wed, 19 Mar 2008 18:40:52 +0000 (19:40 +0100)]
USB: mass storage: emulation of sat scsi_pass_thru with ATACB

I have got a cypress usb-ide bridge and I would like to tune or monitor
my disk with tools like hdparm, hddtemp or smartctl.

My controller support a way to send raw ATA command to the disk with
something call atacb (see
http://download.cypress.com.edgesuite.net/design_resources/datasheets/contents/cy7c68300c_8.pdf).

Atacb support can be added for each application, but there is some disadvantages :
- all application need to be patched
- A race is possible if there other accesses, because the emulation can
be split in 2 atacb scsi transactions. One for sending the command, one
for reading the register (if ck_cond is set).

I have implemented the emulation in usb-storage with a special proto_handler,
and an unsual entry.

Signed-off-by: Matthieu CASTET <[email protected]>
Signed-off-by: Matthew Dharm <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Standardize inclusion protection and add where missing.
Robert P. J. Day [Fri, 7 Mar 2008 18:45:32 +0000 (13:45 -0500)]
USB: Standardize inclusion protection and add where missing.

For the header files in include/linux/usb, add missing multiple
inclusion protection and standardize what's already there.  The
apparent standards:

  * macro name of __LINUX_USB_headerfile_H
  * inclusion protection placed after leading comment block
  * macro name added as a comment on the final #endif
  * any obvious trivial whitespace cleanup associated with the above

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: usb.h: reduce syslog clutter [v3]
Tilman Schmidt [Thu, 13 Mar 2008 18:51:42 +0000 (19:51 +0100)]
USB: usb.h: reduce syslog clutter [v3]

The the err() / info() / warn() macros in usb.h inserted __FILE__ at
the beginning of the message, which expands to the complete pathname
of the source file within the kernel tree, frequently taking up half
of an 80 character screen line before the actual message even begins.
Use the module name instead.

Signed-off-by: Tilman Schmidt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agodrivers/usb/core/devio.c: suppress warning with 64k PAGE_SIZE
Andrew Morton [Wed, 12 Mar 2008 20:32:24 +0000 (13:32 -0700)]
drivers/usb/core/devio.c: suppress warning with 64k PAGE_SIZE

drivers/usb/core/devio.c: In function 'proc_control':
drivers/usb/core/devio.c:657: warning: comparison is always false due to limited range of data type

Cc: Alan Stern <[email protected]>
Cc: Pete Zaitcev <[email protected]>
Cc: Oliver Neukum <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: cypress_m8: Speed handling
Alan Cox [Mon, 10 Mar 2008 21:59:28 +0000 (21:59 +0000)]
USB: cypress_m8: Speed handling

The recent changes to this driver cleaned it up a lot, follow that up
by sorting the speed side of things out as well

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: ehci: paranoia, reject large control transfers
David Brownell [Tue, 4 Mar 2008 23:11:07 +0000 (15:11 -0800)]
USB: ehci: paranoia, reject large control transfers

Some EHCI fault paths with large control transfers aren't coded.  Avoid
problems by rejecting transfers that may need two qTDs (16+ KB).  This is
mostly paranoia; even 4 KB transfers are rare, and most HCDs use lower
limits (so it's unlikely anyone would ever try such a thing).

Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: remove dev->power.power_state
Alan Stern [Thu, 6 Mar 2008 22:00:58 +0000 (17:00 -0500)]
USB: remove dev->power.power_state

power.power_state is scheduled for removal.  This patch (as1053)
removes all uses of that field from drivers/usb.  Almost all of them
were write-only, the most significant exceptions being sl811-hcd.c and
u132-hcd.c.

Part of this patch was written by Pavel Machek.

Signed-off-by: Alan Stern <[email protected]>
Cc: David Brownell <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: ipaq: fix devices having more than one endpoint
Matthias Geissert [Thu, 6 Mar 2008 21:00:33 +0000 (22:00 +0100)]
USB: ipaq: fix devices having more than one endpoint

The ipaq module  supports devices with one endpoint only. Some devices,
e.g. Yakumo Delta 300, have more than one endpoint.

This patch fixes support for devices having up to 2 endpoints which used
to work on older kernel versions.

Signed-off-by: Matthias Geissert <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: ehci: remove obsolete workaround for bogus IRQs
David Brownell [Thu, 6 Mar 2008 07:37:52 +0000 (23:37 -0800)]
USB: ehci: remove obsolete workaround for bogus IRQs

It was pointed out that we found and fixed the cause of the "bogus"
fatal IRQ reports some time ago ... this patch removes the code
which was working around that bug ("status" got clobbered), and a
comment which needlessly confused folk reading this code.

This also includes a minor cleanup to the code which fixed that bug.

Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: partial USB embedded host support
Robin Getz [Thu, 6 Mar 2008 07:17:38 +0000 (23:17 -0800)]
USB: partial USB embedded host support

This provides better support for USB "Embedded Host" functionality, which
is a subset of the USB OTG options:

 * External hub support can be disabled;

 * USB peripherals not whitelisted in "otg_whitelist.h" will be rejected
   during enumeration.

These options can allow some savings in software and support.

Signed-off-by: Robin Getz <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: io_ti.c: remove unneeded null tty check
Ray Lee [Tue, 4 Mar 2008 23:25:12 +0000 (15:25 -0800)]
USB: io_ti.c: remove unneeded null tty check

The Coverity checker (and Adrian Bunk) spotted an inconsistent NULL check of
port->tty (it's blindly dereferenced later without the check).

Alan Cox confirmed the check can go.

Signed-off-by: Ray Lee <[email protected]>
Cc: Adrian Bunk <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: use DIV_ROUND_UP
Julia Lawall [Tue, 4 Mar 2008 23:25:11 +0000 (15:25 -0800)]
USB: use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: io_ti: lock mcr and msr shadows properly
Alan Cox [Wed, 20 Feb 2008 21:38:32 +0000 (21:38 +0000)]
USB: io_ti: lock mcr and msr shadows properly

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: ti_usb_3410_5052: Extend locking to msr and shadow mcr
Alan Cox [Wed, 20 Feb 2008 21:41:40 +0000 (21:41 +0000)]
USB: ti_usb_3410_5052: Extend locking to msr and shadow mcr

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: kobil_sct: Get rid of unneeded priv->line_state
Alan Cox [Wed, 20 Feb 2008 21:40:34 +0000 (21:40 +0000)]
USB: kobil_sct: Get rid of unneeded priv->line_state

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: iuu_phoenix: lock priv->tiostatus properly
Alan Cox [Wed, 20 Feb 2008 21:39:25 +0000 (21:39 +0000)]
USB: iuu_phoenix: lock priv->tiostatus properly

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: serial: Note mos7480 and option don't lock modem status
Alan Cox [Wed, 20 Feb 2008 20:51:45 +0000 (20:51 +0000)]
USB: serial: Note mos7480 and option don't lock modem status

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: ftdi_sio: Note missing locking
Alan Cox [Wed, 20 Feb 2008 20:49:53 +0000 (20:49 +0000)]
USB: ftdi_sio: Note missing locking

The ftdi_sio driver has no internal locking on the dtr/rts state. Flag
that up for someone to fix.

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: usb-serial: Prepare for BKL push down
Alan Cox [Wed, 20 Feb 2008 20:47:56 +0000 (20:47 +0000)]
USB: usb-serial: Prepare for BKL push down

Take the lock in usb-serial instead. As it relies on the BKL internally
we can't push it any deeper yet.

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: minor ehci xITD simplifications
Karsten Wiese [Tue, 19 Feb 2008 20:31:49 +0000 (12:31 -0800)]
USB: minor ehci xITD simplifications

Remove two (or one) conditional tests in per-urb isochronous
transfer setup code paths.

Signed-off-by: Karsten Wiese <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: auerswald: Convert ccp->mutex in a mutex
[email protected] [Mon, 18 Feb 2008 19:45:36 +0000 (20:45 +0100)]
USB: auerswald: Convert ccp->mutex in a mutex

The semaphore ccp->mutex is used as mutex, convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <[email protected]>
Cc: Wolfgang Mües <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: auerswald: Convert ccp->readmutex in a mutex
[email protected] [Mon, 18 Feb 2008 19:45:35 +0000 (20:45 +0100)]
USB: auerswald: Convert ccp->readmutex in a mutex

The semaphore ccp->readmutex is used as mutex, convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <[email protected]>
Cc: Wolfgang Mües <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: auerswald: Convert stats_sem in a mutex
[email protected] [Mon, 18 Feb 2008 19:45:34 +0000 (20:45 +0100)]
USB: auerswald: Convert stats_sem in a mutex

The semaphore cp->mutex is used as mutex, convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <[email protected]>
Cc: Wolfgang Mües <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: cypress_m8: Limit baud rate to <=4800 for USB low speed devices
Mike Isely [Mon, 11 Feb 2008 02:23:32 +0000 (20:23 -0600)]
USB: cypress_m8: Limit baud rate to <=4800 for USB low speed devices

The cypress app note for the M8 states that for the USB low speed
version of the part, throughput is effectively limited to 800
bytes/sec.  So if we were to try a faster baud rate in such cases then
we risk overrun errors on receive.  Best to just identify this case
and limit the rate to 4800 baud or less (by ignoring any request to
set a faster rate).  The old baud rate setting code was somewhat
fragile; this change also hopefully makes it easier in the future to
better checking / limiting.

Signed-off-by: Mike Isely <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: cypress_m8: Get rid of pointless NULL check
Mike Isely [Mon, 11 Feb 2008 02:23:28 +0000 (20:23 -0600)]
USB: cypress_m8: Get rid of pointless NULL check

Remove a NULL check in cypress_m8; the check is useless in this
context because it is referenced earlier in the same code path thus
the kernel would be oops'ed before reaching this point anyway.  (And
it's really pointless here anyway; if this pointer somehow is NULL the
driver is going to have serious problems in many other places.)

Signed-off-by: Mike Isely <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: cypress_m8: Don't issue GET_CONFIG for certain devices
Mike Isely [Mon, 11 Feb 2008 02:23:24 +0000 (20:23 -0600)]
USB: cypress_m8: Don't issue GET_CONFIG for certain devices

Earthmate LT-20 devices (both "old" and "new" versions) can't tolerate
a GET_CONFIG command.  The original Earthmate has no trouble with
this.  Presumably other non-Earthmate devices are still OK as well.
This change disables the use of GET_CONFIG for cases where it is known
not to work.

Signed-off-by: Mike Isely <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: cypress_m8: Packet format is separate from characteristic size
Mike Isely [Mon, 11 Feb 2008 02:23:19 +0000 (20:23 -0600)]
USB: cypress_m8: Packet format is separate from characteristic size

cypress_m8: Packet format is separate from characteristic size

The Cypress app note states that when using an 8 byte packet buffer
size that the packet format is modified (to be more compact).  However
I have since discovered that newer DeLorme Earthmate LT-20 devices
(those that are low speed USB with 8 byte packet size) STILL use the
format that is really supposed to correspond to 32 byte packets.
Further confusing things is the subsequent discovery that there are
actually two different types of LT-20 - older LT-20's use 32 byte
packets which is probably why this issue wasn't originally
encountered.  The solution here is to flag the packet format
separately from the buffer size.  Then at initialization time,
identify the correct combination and set it up.  This is a critical
fix for anyone with a newer LT-20.  Older devices and non-Earthmate
devices should remain unaffected by this change.  (If other devices
behave in this, uh, unexpected manner, it's now just a simple 1 line
change to fix them as well (change the pkt_fmt member for that
device).  Default behavior with this patch is still to drive the
format as per the app-note; of course for Earthmate devices this is
overridden.

Signed-off-by: Mike Isely <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: cypress_m8: Feature buffer fixes
Mike Isely [Mon, 11 Feb 2008 02:23:14 +0000 (20:23 -0600)]
USB: cypress_m8: Feature buffer fixes

cypress_m8: Feature buffer fixes

From: Mike Isely <[email protected]>

Don't hardcode the feature buffer size; use sizeof() instead.  That
way we can easily specify the size in a single spot.  Speaking of the
feature buffer size, the Cypress app note (and further testing with a
DeLorme Earthmate) suggests that this size should be 5 not 8 bytes.

Signed-off-by: Mike Isely <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: io_ti.c: remove pointless eye-candy in debug statements
Andrew Morton [Tue, 5 Feb 2008 07:57:50 +0000 (23:57 -0800)]
USB: io_ti.c: remove pointless eye-candy in debug statements

These strings always come up as false positives whenever I'm doing
git-conflict fixups (ie: about 1000 times/day).

I don't think the zillion "<" and ">" characters are very useful and removing
them makes my life that little bit easier.

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: gadget: Hangup tty on g_serial disconnect
Savin Zlobec [Fri, 15 Feb 2008 12:42:01 +0000 (13:42 +0100)]
USB: gadget: Hangup tty on g_serial disconnect

On USB cable disconnect g_serial doesn't hangup the port tty,
which results in an endless read on the tty device. With the
following patch the read and select behave correctly when
the cable is unplugged.

Tested on at91rm9200

Signed-off-by: Savin Zlobec <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: EHCI: Refactor "if (handshake()) state = HC_STATE_HALT"
Karsten Wiese [Sat, 16 Feb 2008 21:44:42 +0000 (13:44 -0800)]
USB: EHCI: Refactor "if (handshake()) state = HC_STATE_HALT"

Refactor the EHCI "if (handshake()) state = HC_STATE_HALT" idiom,
which appears 4 times, by replacing it with calls to a new function
called handshake_on_error_set_halt().  Saves a few bytes too.

Signed-off-by: Karsten Wiese <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: m66592-udc: reduce size of data structure.
Paul Mundt [Wed, 13 Feb 2008 08:02:33 +0000 (17:02 +0900)]
USB: m66592-udc: reduce size of data structure.

Poking around with pahole, we see that m66592 handily shoves a u16 in
between larger types on 2 separate occasions leaving us with 2 2-byte
holes:

struct m66592 {
...

/* size: 1196, cachelines: 38 */
/* sum members: 1192, holes: 2, sum holes: 4 */
/* last cacheline: 12 bytes */
}; /* definitions: 1 */

Pairing them gets back 4-bytes:

struct m66592 {
...

/* size: 1192, cachelines: 38 */
/* last cacheline: 8 bytes */
}; /* definitions: 1 */

Unfortunately it's not enough to save a cacheline with this massive
structure, but every byte helps.

Signed-off-by: Paul Mundt <[email protected]>
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: ehci minor SOC bus glue fixes
David Brownell [Tue, 12 Feb 2008 02:40:46 +0000 (18:40 -0800)]
USB: ehci minor SOC bus glue fixes

Various minor fixes to some SOC bus glue for EHCI:

 - Remove a bogus copyright (by "me"!) which someone added to the FSL
   driver, and an irrelevant comment.

 - Un-break MODULE_ALIAS() directives after platform_bus hotplugging
   acquired a backwards-incompatible change.  (Which didn't fix ANY
   of the in-tree drivers it prevented from hotplugging -- sigh.)

 - Remove some bogus assignments of platform_bus_type; that's done by
   the platform_bus code.

 - Add some FIXMEs for drivers with that pointless two-level idiom for
   probe() and remove() routines.  ("Obfuscation" is a non-goal.)
   That should help avoid future bus glue which copies that idiom.

Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: ehci tolerates some buggy devices
David Brownell [Fri, 8 Feb 2008 23:08:44 +0000 (15:08 -0800)]
USB: ehci tolerates some buggy devices

This teaches EHCI how to to work around bugs in certain high speed
devices, by accomodating "bulk" packets that exceed the 512 byte
constant value required by the USB 2.0 specification.  (Have a
look at section 5.8.3, paragraphs 1 and 3.)

It also makes the descriptor parsing code warn when it encounters
such bugs.  (We've had reports of maybe two or three such devices,
all pretty recent.)

Such devices are nonconformant.  The proper fix is have the vendors
of those devices do the simple, obvious, and correct thing ... which
will let them be used with USB hosts that don't have workarounds for
this particular vendor bug.  But unless/until they do, we can at least
have one of the high speed HCDs work with such buggy devices.

Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: ohci: port reset paranoia timeout
David Brownell [Sat, 2 Feb 2008 10:42:52 +0000 (02:42 -0800)]
USB: ohci: port reset paranoia timeout

This limits how long the OHCI port reset loop waits for the hardware
to do its job, if the controller either (a) dies, or (b) can't finish
the reset.  Such limits are always a good idea.

Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: ehci: minor cleanups
David Brownell [Fri, 1 Feb 2008 19:42:05 +0000 (11:42 -0800)]
USB: ehci: minor cleanups

Minor cleanups to the EHCI code:  revision history is what source
code repositories should have.  Switch to a more standard way to
kick in verbose debugging -- don't be EHCI-specific.

Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: defines for USB "Link Power Management" (LPM) ECN
David Brownell [Sun, 10 Feb 2008 20:24:00 +0000 (12:24 -0800)]
USB: defines for USB "Link Power Management" (LPM) ECN

There's a new PM-related change notice for the USB 2.0 specification
called "Link Power Management" (LPM).  It defines a new "L1 Suspend"
state which resembles the current (L2) suspend state, except that it
can be entered and exited much more quickly.  It should thus be more
useful for runtime PM, even though it doesn't mandate reduced power
draw from VBUS.

This patch provides the relevant #defines for usbcore.  Actually
implementing these mechanisms requires host silicon that can generate
new USB packets, plus hubs handling some new requests and peripherals
which understand the new packets.

Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: usbatm: convert heavy init dances to kthread API
Pavel Emelyanov [Mon, 11 Feb 2008 12:26:09 +0000 (15:26 +0300)]
USB: usbatm: convert heavy init dances to kthread API

This is an attempt to kill two birds with one stone.

First, we kill one more user of kernel_thread, which is scheduled
for removal. Second - we kill one of the last users of kill_proc -
the function which is also to be removed, because it uses a pid_t
which is not safe now.

Signed-off-by: Pavel Emelyanov <[email protected]>
Signed-off-by: Duncan Sands <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: usb-ohci-sm501-driver: use the conventional convention for suspend and resume
Andrew Morton [Tue, 5 Feb 2008 07:57:48 +0000 (23:57 -0800)]
USB: usb-ohci-sm501-driver: use the conventional convention for suspend and resume

Cc: Alan Stern <[email protected]>
Cc: Magnus Damm <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: make USB_STORAGE_ONETOUCH available with PM
Adrian Bunk [Tue, 5 Feb 2008 07:57:45 +0000 (23:57 -0800)]
USB: make USB_STORAGE_ONETOUCH available with PM

As Torsten Kaiser pointed out, it seems the dependency of
USB_STORAGE_ONETOUCH on !PM should have been removed in commit
7931e1c6f8007d5fef8a0bb2dc71bd97315eeae9.

Signed-off-by: Adrian Bunk <[email protected]>
Cc: Matthew Dharm <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Torsten Kaiser <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: libusual: locking cleanup
Daniel Walker [Tue, 5 Feb 2008 07:57:42 +0000 (23:57 -0800)]
USB: libusual: locking cleanup

I converted the usu_init_notify semaphore to normal mutex usage, and it
should still prevent the request_module before the init routine is
complete.  Before it acted more like a complete, now the mutex protects two
distinct section from running at the same time.

Signed-off-by: Daniel Walker <[email protected]>
Cc: Pete Zaitcev <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: microtek: remove unused semaphore
Daniel Walker [Tue, 5 Feb 2008 07:57:42 +0000 (23:57 -0800)]
USB: microtek: remove unused semaphore

No current references, so removing it.

Signed-off-by: Daniel Walker <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: convert usb.h struct usb_device to kernel-doc
Randy Dunlap [Thu, 14 Feb 2008 02:33:15 +0000 (18:33 -0800)]
USB: convert usb.h struct usb_device to kernel-doc

Convert struct usb_device to use kernel-doc notation.
Please especially check the @filelist and @usb_classdev descriptions.

Signed-off-by: Randy Dunlap <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: add USB_DT_CS_RADIO_CONTROL define to ch9.h
Greg Kroah-Hartman [Tue, 8 Apr 2008 20:24:46 +0000 (13:24 -0700)]
USB: add USB_DT_CS_RADIO_CONTROL define to ch9.h

This is needed by the wireless usb developers, and is part of the USB spec.

Cc: Inaky Perez-Gonzalez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agocheckpatch: usb_free_urb() can take NULL
Greg Kroah-Hartman [Mon, 14 Apr 2008 21:17:29 +0000 (14:17 -0700)]
checkpatch: usb_free_urb() can take NULL

usb_free_urb() can take a NULL, so let's check and warn about that.

Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: enable USB-PERSIST by default
Alan Stern [Thu, 6 Mar 2008 16:04:13 +0000 (11:04 -0500)]
USB: enable USB-PERSIST by default

This patch (as1052) enables USB-PERSIST for all devices by default.
The user won't have to remember to enable it explicitly for devices
containing mounted filesystems.

Eventually userspace tools like hal may be able to set the persist
attribute automatically when a filesystem is mounted on a USB device.
When that time comes this patch can be reverted, if people think it
matters.

This approach has the advantage of giving the user the ability to turn
off USB-PERSIST for devices with mounted filesystems, rather than
making the kernel always assume it should be on.

Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: check serial-number string after device reset
Alan Stern [Mon, 3 Mar 2008 20:16:04 +0000 (15:16 -0500)]
USB: check serial-number string after device reset

This patch (as1048) extends the descriptor checking after a device is
reset.  Now the SerialNumber string descriptor is compared to its old
value, in addition to the device and configuration descriptors.

As a consequence, the kmalloc() call in usb_string() is now on the
error-handling pathway for usb-storage.  Hence its allocation type is
changed to GFO_NOIO.

Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: remove CONFIG_USB_PERSIST setting
Alan Stern [Mon, 3 Mar 2008 20:15:59 +0000 (15:15 -0500)]
USB: remove CONFIG_USB_PERSIST setting

This patch (as1047) removes the USB_PERSIST Kconfig option, enabling
it permanently.  It also prevents the power/persist attribute from
being created for hub devices; there's no point in having it since
USB-PERSIST is always turned on for hubs.

Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: make USB-PERSIST work after every system sleep
Alan Stern [Mon, 3 Mar 2008 20:15:51 +0000 (15:15 -0500)]
USB: make USB-PERSIST work after every system sleep

This patch (as1046) makes USB-PERSIST work more in accordance with
the documentation.  Currently it takes effect only in cases where the
root hub has lost power or been reset, but it is supposed to operate
whenever a power session was dropped during a system sleep.

A new hub_restart() routine carries out the duties required during a
reset or a reset-resume.  It checks to see whether occupied ports are
still enabled, and if they aren't then it clears the enable-change and
connect-change features (to prevent interference by khubd) and sets
the child device's reset_resume flag.  It also checks ports that are
supposed to be unoccupied to verify that the firmware hasn't left the
port in an enabled state.

Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: reorganize code in hub.c
Alan Stern [Mon, 3 Mar 2008 20:15:43 +0000 (15:15 -0500)]
USB: reorganize code in hub.c

This patch (as1045) reorganizes some code in the hub driver.
hub_port_status() is moved earlier in the file, and a new hub_stop()
routine is created to do the work currently in hub_preset() (i.e.,
disconnect all child devices and quiesce the hub).

There are no functional changes.

Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: EHCI: carry out port handover during each root-hub resume
Alan Stern [Mon, 3 Mar 2008 20:15:36 +0000 (15:15 -0500)]
USB: EHCI: carry out port handover during each root-hub resume

This patch (as1044) causes EHCI port handover for non-high-speed
devices to occur during every root-hub resume, not just in cases where
the controller lost power or was reset.  This is necessary because:

When some machines go into suspend, they remove power from
on-board USB devices while retaining suspend current for USB
controllers.

The user might well unplug a USB device while the system is
suspended and then plug it back in before resuming.

A corresponding change is made to the core resume routine; now
high-speed root hubs will always be resumed when the system wakes up,
even if they were suspended before the system went to sleep.  If this
weren't done then EHCI port handover wouldn't work, since it is called
when the EHCI root hub is resumed.

Finally, a comment is added to the hub driver explaining the khubd has
to be freezable; if it weren't frozen then it could interfere with
port handover.

Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Add HP hs2300 Broadband Wireless Module to sierra.c
Stefan Seyfried [Thu, 17 Apr 2008 05:47:34 +0000 (07:47 +0200)]
USB: Add HP hs2300 Broadband Wireless Module to sierra.c

Add the HP hs2300 Broadband Wireless Module (relabeled MC8775) USB IDs

Signed-off-by: Stefan Seyfried <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: Fix memory leak in mon_stat_release
Ming Lei [Mon, 14 Apr 2008 13:27:00 +0000 (21:27 +0800)]
USB: Fix memory leak in mon_stat_release

Fix the leak of the snap structure allocated in mon_stat_open().

Signed-off-by: Ming Lei <[email protected]>
Acked-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoUSB: CP2101 Add new device IDs
Craig Shelley [Sat, 12 Apr 2008 15:15:54 +0000 (16:15 +0100)]
USB: CP2101 Add new device IDs

Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agotcp: tcp_probe buffer overflow and incorrect return value
Tom Quetchenbach [Fri, 25 Apr 2008 04:11:58 +0000 (21:11 -0700)]
tcp: tcp_probe buffer overflow and incorrect return value

tcp_probe has a bounds-checking bug that causes many programs (less,
python) to crash reading /proc/net/tcp_probe. When it outputs a log
line to the reader, it only checks if that line alone will fit in the
reader's buffer, rather than that line and all the previous lines it
has already written.

tcpprobe_read also returns the wrong value if copy_to_user fails--it
just passes on the return value of copy_to_user (number of bytes not
copied), which makes a failure look like a success.

This patch fixes the buffer overflow and sets the return value to
-EFAULT if copy_to_user fails.

Patch is against latest net-2.6; tested briefly and seems to fix the
crashes in less and python.

Signed-off-by: Tom Quetchenbach <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
16 years agoniu: Add support for Neptune FEM/NEM cards for C10 server blades
Matheos Worku [Fri, 25 Apr 2008 04:09:20 +0000 (21:09 -0700)]
niu: Add support for Neptune FEM/NEM cards for C10 server blades

[ Minor coding style and whitespace corrections, also bump
  driver version and release date. -DaveM ]

Signed-off-by: Matheos Worku <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
16 years agoniu: Determine the # of ports from the card's VPD data
Matheos Worku [Fri, 25 Apr 2008 04:02:37 +0000 (21:02 -0700)]
niu: Determine the # of ports from the card's VPD data

[ Fix minor whitespace and coding style stuff... -DaveM ]

Signed-off-by: Matheos Worku <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
16 years agoethtool: EEPROM dump no longer works for tg3 and natsemi
Mandeep Singh Baines [Fri, 25 Apr 2008 03:55:56 +0000 (20:55 -0700)]
ethtool: EEPROM dump no longer works for tg3 and natsemi

In the ethtool user-space application, tg3 and natsemi over-ride the
default implementation of dump_eeprom(). In both tg3_dump_eeprom() and
natsemi_dump_eeprom(), there is a magic number check which is not
present in the default implementation.

Commit b131dd5d ("[ETHTOOL]: Add support for large eeproms") snipped
the code which copied the ethtool_eeprom structure back to
user-space. tg3 and natsemi are over-writing the magic number field
and then checking it in user-space. With the ethtool_eeprom copy
removed, the check is failing.

The fix is simple. Add the ethtool_eeprom copy back.

Signed-off-by: Mandeep Singh Baines <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
16 years agosata_sis: SCR accessors return -EINVAL when requested SCR isn't available
Tejun Heo [Thu, 24 Apr 2008 01:52:44 +0000 (10:52 +0900)]
sata_sis: SCR accessors return -EINVAL when requested SCR isn't available

sis_scr_cfg_read() can't access SError and was incorrectly returning
-1 instead of -EINVAL.  This went unnoticed because SError used to be
cleared in @postreset() and it didn't care about how scr_read() failed
but commit ac371987 moved SError clearing into sata_link_resume() and
SCR access failure other than -EINVAL is considered an error condition
and exposes the incorrect return value bug as detection failure.  Fix
it.

Also, scsi_scr_cfg_write() was incorrectly returning 0 after it
ignored the request to write to SError.  Make it also return -EINVAL.

This was bisected and reported by Patrick McHardy.

Signed-off-by: Tejun Heo <[email protected]>
Cc: Patrick McHardy <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
16 years agolibata: functions with definition should not be extern
Harvey Harrison [Fri, 25 Apr 2008 01:37:34 +0000 (18:37 -0700)]
libata: functions with definition should not be extern

Noticed by sparse
drivers/ata/libata-core.c:3380:12: warning: function 'ata_wait_after_reset' with external linkage has definition

Signed-off-by: Harvey Harrison <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
16 years agoaf_key: Fix af_key.c compiler warning
Brian Haley [Fri, 25 Apr 2008 03:38:31 +0000 (20:38 -0700)]
af_key: Fix af_key.c compiler warning

net/key/af_key.c: In function ‘pfkey_spddelete’:
net/key/af_key.c:2359: warning: ‘pol_ctx’ may be used uninitialized in
this function

When CONFIG_SECURITY_NETWORK_XFRM isn't set,
security_xfrm_policy_alloc() is an inline that doesn't set pol_ctx, so
this seemed like the easiest fix short of using *uninitialized_var(pol_ctx).

Signed-off-by: Brian Haley <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
16 years agoMerge branch 'master' into for-linus
Dmitry Torokhov [Fri, 25 Apr 2008 03:37:52 +0000 (23:37 -0400)]
Merge branch 'master' into for-linus

16 years agoInput: wacom - add support for Cintiq 20WSX
Ping Cheng [Fri, 25 Apr 2008 03:34:05 +0000 (23:34 -0400)]
Input: wacom - add support for Cintiq 20WSX

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
16 years ago[POWERPC] Add zImage.iseries to arch/powerpc/boot/.gitignore
Kumar Gala [Thu, 24 Apr 2008 16:39:22 +0000 (02:39 +1000)]
[POWERPC] Add zImage.iseries to arch/powerpc/boot/.gitignore

Signed-off-by: Kumar Gala <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
16 years agoleds: Add default-on trigger
Nick Forbes [Thu, 24 Apr 2008 23:06:52 +0000 (00:06 +0100)]
leds: Add default-on trigger

Add a trigger which allows LEDs to default to the full
brightness state.

Signed-off-by: Nick Forbes <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
16 years agoleds: Document the context brightness_set needs
Richard Purdie [Thu, 24 Apr 2008 22:49:30 +0000 (23:49 +0100)]
leds: Document the context brightness_set needs

Make sure there is no confusion about the contexts brightness_set
can be called under by documenting it.

Signed-off-by: Richard Purdie <[email protected]>
16 years agoleds: Add new driver for the LEDs on the Freecom FSG-3
Rod Whitby [Thu, 24 Apr 2008 22:43:09 +0000 (23:43 +0100)]
leds: Add new driver for the LEDs on the Freecom FSG-3

The LEDs on the Freecom FSG-3 are connected to an external
memory-mapped latch on the ixp4xx expansion bus, and therefore cannot
be supported by any of the existing LEDs drivers.

Signed-off-by: Rod Whitby <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
16 years agoleds: Add support to leds with readable status
Henrique de Moraes Holschuh [Tue, 18 Mar 2008 09:47:48 +0000 (09:47 +0000)]
leds: Add support to leds with readable status

Some led hardware allows drivers to query the led state, and this patch
adds a hook to let the led class take advantage of that information when
available.

Without this functionality, when access to the led hardware is not
exclusive (i.e. firmware or hardware might change its state behind the
kernel's back), reality goes out of sync with the led class' idea of what
the led is doing, which is annoying at best.

Behaviour for drivers that do not or cannot read the led status is
unchanged.

Signed-off-by: Henrique de Moraes Holschuh <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
16 years agoleds: enable support for blink_set() platform hook in leds-gpio
Herbert Valerio Riedel [Sun, 9 Mar 2008 23:48:25 +0000 (23:48 +0000)]
leds: enable support for blink_set() platform hook in leds-gpio

Enhance leds-gpio to provide hardware-based led flashing by passing
through the blink_set() call to a optionally set platform-specific
function pointer.

Signed-off-by: Herbert Valerio Riedel <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
16 years agoleds: Cleanup various whitespace and code style issues
Németh Márton [Sun, 9 Mar 2008 20:59:57 +0000 (20:59 +0000)]
leds: Cleanup various whitespace and code style issues

Break the lines which were more than 80 characters into more
lines; replace SPACEs with TABs; correct ident at switch-case;
change character encoding from ISO-8859-2 to UTF-8.

The order of the functions in led-triggers.c changed in order
the similar functions can still be together under titles
"Used by LED Class", "LED Trigger Interface" and "Simple
LED Tigger Interface" as was grouped before when exported
with EXPORT_SYMBOL.

Signed-off-by: Márton Németh <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
16 years agoleds: disable triggers on brightness set
Németh Márton [Sun, 9 Mar 2008 20:54:37 +0000 (20:54 +0000)]
leds: disable triggers on brightness set

Disable any active triggers when the brightness attribute is
set to zero.

Signed-off-by: Henrique de Moraes Holschuh <[email protected]>
Signed-off-by: Márton Németh <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
16 years agoleds: Add mail LED support for "Clevo D400P"
Mrton Nmeth [Sun, 9 Mar 2008 20:47:59 +0000 (20:47 +0000)]
leds: Add mail LED support for "Clevo D400P"

The leds-clevo-mail module also works with model "Clevo D400P",
add this model to the white list.

Signed-off-by: Mrton Nmeth <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
16 years agosched: fix share (re)distribution
Peter Zijlstra [Thu, 24 Apr 2008 22:25:08 +0000 (00:25 +0200)]
sched: fix share (re)distribution

fix __aggregate_redistribute_shares() related lockup reported by
David S. Miller.

The problem this code tries to solve is 'accurately' calculating the 'fair'
share of the group weight for each cpu. The current code falls back to a global
group rebalance in case the sched_domain's span it looks at has no shares, but
does have tasks.

The reason it gets stuck here, is because its inherently racy - if someone
steals the last task after we compute the agg->rq_weight, but before we
rebalance, we'll never get out of the loop.

We could of course go fix that, but while looking at this issue I found that
this 'fallback' wasn't nearly as rare as I'd hoped it to be. In fact its quite
common - and given it walks the whole machine, thats very bad.

The new approach is simple (why didn't I think of it before?), we set the
aggregate shares to the full task group weight, and each larger sched domain
that encounters an aggregate shares larger than the weight, clips it (it
already re-distributes anyway).

This nicely converges to the desired global picture where the sum of all
shares equals the task group weight.

Signed-off-by: Peter Zijlstra <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
16 years agosoftlockup: fix NOHZ wakeup
Ingo Molnar [Thu, 24 Apr 2008 22:25:08 +0000 (00:25 +0200)]
softlockup: fix NOHZ wakeup

David Miller reported:

|--------------->
the following commit:

| commit 27ec4407790d075c325e1f4da0a19c56953cce23
| Author: Ingo Molnar <[email protected]>
| Date:   Thu Feb 28 21:00:21 2008 +0100
|
|     sched: make cpu_clock() globally synchronous
|
|     Alexey Zaytsev reported (and bisected) that the introduction of
|     cpu_clock() in printk made the timestamps jump back and forth.
|
|     Make cpu_clock() more reliable while still keeping it fast when it's
|     called frequently.
|
|     Signed-off-by: Ingo Molnar <[email protected]>

causes watchdog triggers when a cpu exits NOHZ state when it has been
there for >= the soft lockup threshold, for example here are some
messages from a 128 cpu Niagara2 box:

[  168.106406] BUG: soft lockup - CPU#11 stuck for 128s! [dd:3239]
[  168.989592] BUG: soft lockup - CPU#21 stuck for 86s! [swapper:0]
[  168.999587] BUG: soft lockup - CPU#29 stuck for 91s! [make:4511]
[  168.999615] BUG: soft lockup - CPU#2 stuck for 85s! [swapper:0]
[  169.020514] BUG: soft lockup - CPU#37 stuck for 91s! [swapper:0]
[  169.020514] BUG: soft lockup - CPU#45 stuck for 91s! [sh:4515]
[  169.020515] BUG: soft lockup - CPU#69 stuck for 92s! [swapper:0]
[  169.020515] BUG: soft lockup - CPU#77 stuck for 92s! [swapper:0]
[  169.020515] BUG: soft lockup - CPU#61 stuck for 92s! [swapper:0]
[  169.112554] BUG: soft lockup - CPU#85 stuck for 92s! [swapper:0]
[  169.112554] BUG: soft lockup - CPU#101 stuck for 92s! [swapper:0]
[  169.112554] BUG: soft lockup - CPU#109 stuck for 92s! [swapper:0]
[  169.112554] BUG: soft lockup - CPU#117 stuck for 92s! [swapper:0]
[  169.171483] BUG: soft lockup - CPU#40 stuck for 80s! [dd:3239]
[  169.331483] BUG: soft lockup - CPU#13 stuck for 86s! [swapper:0]
[  169.351500] BUG: soft lockup - CPU#43 stuck for 101s! [dd:3239]
[  169.531482] BUG: soft lockup - CPU#9 stuck for 129s! [mkdir:4565]
[  169.595754] BUG: soft lockup - CPU#20 stuck for 93s! [swapper:0]
[  169.626787] BUG: soft lockup - CPU#52 stuck for 93s! [swapper:0]
[  169.626787] BUG: soft lockup - CPU#84 stuck for 92s! [swapper:0]
[  169.636812] BUG: soft lockup - CPU#116 stuck for 94s! [swapper:0]

It's simple enough to trigger this by doing a 10 minute sleep after a
fresh bootup then starting a parallel kernel build.

I suspect this might be reintroducing a problem we've had and fixed
before, see the thread:

http://marc.info/?l=linux-kernel&m=119546414004065&w=2
<---------------|

touch the softlockup watchdog when exiting NOHZ state - we are
obviously not locked up.

Signed-off-by: Ingo Molnar <[email protected]>
16 years agoseqlock: livelock fix
Ingo Molnar [Thu, 3 Apr 2008 07:06:13 +0000 (09:06 +0200)]
seqlock: livelock fix

Thomas Gleixner debugged a particularly ugly seqlock related livelock:
do not process the seq-read section if we know it beforehand that the
test at the end of the section will fail ...

Signed-off-by: Ingo Molnar <[email protected]>
16 years agoxen: add balloon driver
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:13 +0000 (10:54 -0700)]
xen: add balloon driver

The balloon driver allows memory to be dynamically added or removed from the domain,
in order to allow host memory to be balanced between multiple domains.

This patch introduces the Xen balloon driver, though it currently only
allows a domain to be shrunk from its initial size (and re-grown back to
that size).  A later patch will add the ability to grow a domain beyond
its initial size.

Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
16 years agoxen: allow compilation with non-flat memory
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:12 +0000 (10:54 -0700)]
xen: allow compilation with non-flat memory

There's no real reason we can't support sparsemem/discontigmem, so do so.
This is mostly useful to support hotplug memory.

Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
16 years agoxen: fold xen_sysexit into xen_iret
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:11 +0000 (10:54 -0700)]
xen: fold xen_sysexit into xen_iret

xen_sysexit and xen_iret were doing essentially the same thing.  Rather
than having a separate implementation for xen_sysexit, we can just strip
the stack back to an iret frame and jump into xen_iret.  This removes
a lot of code and complexity - specifically, another critical region.

Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
16 years agoxen: allow set_pte_at on init_mm to be lockless
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:10 +0000 (10:54 -0700)]
xen: allow set_pte_at on init_mm to be lockless

The usual pagetable locking protocol doesn't seem to apply to updates
to init_mm, so don't rely on preemption being disabled in xen_set_pte_at
on init_mm.

Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
16 years agoxen: disable preemption during tlb flush
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:09 +0000 (10:54 -0700)]
xen: disable preemption during tlb flush

Various places in the kernel flush the tlb even though preemption doens't
guarantee the tlb flush is happening on any particular CPU.  In many cases
this doesn't seem to matter, so don't make a fuss about it.

Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
This page took 0.110623 seconds and 4 git commands to generate.