Commit Graph

109120 Commits (12b1c03df10da61e222b86f0e1ece9cdb2a909d6)

Author SHA1 Message Date
Takashi Iwai 1082c7487c ALSA: hda - Fix call of alc888_coef_init()
Using init_hook to call alc888_coef_init() is problematic for configurations
that already set another init_hook.  Better to put it in alc_init() as is
(although it looks a bit hackish).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-22 15:34:52 +02:00
Ingo Molnar 9754a5b840 x86: work around MTRR mask setting, v2
improve the debug printout:

- make it actually display something
- print it only once

would be nice to have a WARN_ONCE() facility, to feed such things to
kerneloops.org.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 14:12:31 +02:00
Marcin Slusarz c4bd1fdab0 x86: fix section mismatch warning - uv_cpu_init
WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init()
The function __cpuinit uv_cpu_init() references
a function __init uv_system_init().
If uv_system_init is only used by uv_cpu_init then
annotate uv_system_init with a matching annotation.

uv_system_init was ment to be called only once, so do it from codepath
(native_smp_prepare_cpus) which is called once, right before activation
of other cpus (smp_init).

Note: old code relied on uv_node_to_blade being initialized to 0,
but it'a not initialized from anywhere.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 14:12:20 +02:00
Jarek Poplawski f6e0b239a2 pkt_sched: Fix qdisc list locking
Since some qdiscs call qdisc_tree_decrease_qlen() (so qdisc_lookup())
without rtnl_lock(), adding and deleting from a qdisc list needs
additional locking. This patch adds global spinlock qdisc_list_lock
and wrapper functions for modifying the list. It is considered as a
temporary solution until hfsc_dequeue(), netem_dequeue() and
tbf_dequeue() (or qdisc_tree_decrease_qlen()) are redone.

With feedback from Herbert Xu and David S. Miller.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-22 03:31:39 -07:00
Jeff Garzik 4ef2818534 [libata] pata_it821x: fix warning
Reported by Andrew Morton:
drivers/ata/pata_it821x.c: In function 'it821x_port_start':
drivers/ata/pata_it821x.c:609: warning: 'mtype' may be used uninitialized in
this function

Pretty horrid fix, but so's a warning..

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:33:23 -04:00
Alan Cox b15b3ebae1 libata: Fix a large collection of DMA mode mismatches
Dave Müller sent a diff for the pata_oldpiix that highlighted a problem
where a lot of the ATA drivers assume dma_mode == 0 means "no DMA" while
the core code uses 0xFF.

This turns out to have other consequences such as code doing >= XFER_UDMA_0
also catching 0xFF as UDMAlots. Fortunately it doesn't generally affect
set_dma_mode, although some drivers call back into their own set mode code
from other points.

Having been through the drivers I've added helpers for using_udma/using_mwdma
dma_enabled so that people don't open code ranges that may change (eg if UDMA8
appears somewhere)

Thanks to David for the initial bits
[and added fix for pata_oldpiix from and signed-off-by Dave Mueller
 <dave.mueller@gmx.ch>  -jg]

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:27:49 -04:00
Tejun Heo 20e2de4a50 ahci: sis controllers actually can do PMP
SIS controllers were blacklisted for PMP as enabling it made device
detection fail whether the device was PMP or not - the natural
conclusion was the controller chokes on SRST w/ pmp==15.  However, it
turned out that the controller just didn't like issuing SRST after
hardreset w/o clearing SError first.  Interestingly, the SRST itself
succeeds but the following commands fail.

If SError is cleared between hardreset and SRST, which is the default
behavior now, everything works fine and SIS controllers work with PMPs
happily.

Remove PMP blacklisting for SIS AHCIs.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Piter PUNK <piterpunk@slackware.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:19:58 -04:00
Tejun Heo ff04715bd5 pata_via: clean up recent tf_load changes
Commit bfce5e0179 implemented custom
tf_load for pata_via.  This patch cleans it up a bit.

* Instead of duplicating whole body, copy tf and set ATA_TFLAG_DEVICE
  when necessary.

* Rename via_ata_tf_load() to via_tf_load().

* No need to set .tf_load in via_port_ops_noirq as it inherits from
  via_port_ops.

* Clean up indentation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:19:54 -04:00
Tejun Heo d127ea7b86 libata: restore SControl on detach
Save SControl during probing and restore it on detach.  This prevents
adjustments made by libata drivers to seep into the next driver which
gets attached (be it a libata one or not).

It's not clear whether SControl also needs to be restored on suspend.
The next system to have control (ACPI or kexec'd kernel) would
probably like to see the original SControl value but there's no
guarantee that a link is gonna keep working after SControl is adjusted
without a reset and adding a reset and modified recovery cycle soley
for this is an overkill.  For now, do it only for detach.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:19:46 -04:00
Tejun Heo da0e21d3fa libata: use ata_link_printk() when printing SError
SError belongs to link not port.  Use ata_link_printk() to print it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:19:44 -04:00
Tejun Heo 5dbfc9cb59 libata: always do follow-up SRST if hardreset returned -EAGAIN
As an optimization, follow-up SRST used to be skipped if
classification wasn't requested even when hardreset requested it via
-EAGAIN.  However, some hardresets can't wait for device readiness and
skipping SRST can cause timeout or other failures during revalidation.
Always perform follow-up SRST if hardreset returns -EAGAIN.  This
makes reset paths more predictable and thus less error-prone.

While at it, move hardreset error checking such that it's done right
after hardreset is finished.  This simplifies followup SRST condition
check a bit and makes the reset path easier to modify.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:19:41 -04:00
Tejun Heo a674050e06 libata: fix EH action overwriting in ata_eh_reset()
ehc->i.action got accidentally overwritten to ATA_EH_HARD/SOFTRESET in
ata_eh_reset().  The original intention was to clear reset action
which wasn't selected.  This can cause unexpected behavior when other
EH actions are scheduled together with reset.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:19:39 -04:00
Saeed Bishara eb3a55a9f4 sata_mv: add the Gen IIE flag to the SoC devices.
The SoC sata port is based on the 7042/6042 devices (Gen IIE). This patch
will fix various issues when working with PMP and/or NCQ.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:19:36 -04:00
Seth Heasley c6c6a1afef ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs
This patch adds the Intel Ibex Peak (PCH) IDE mode SATA Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:08:04 -04:00
Seth Heasley adcb5308dd ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs
Resend with proper whitespace.

This patch adds the Intel Ibex Peak (PCH) SATA RAID Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:07:56 -04:00
Tejun Heo 4bdee6c510 sata_mv: don't issue two DMA commands concurrently
sata_mv allowed issuing two DMA commands concurrently which the
hardware allows.  Unfortunately, libata core layer isn't ready for
this yet and spews ugly warning message and malfunctions on this.
Don't allow concurrent DMA commands for now.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:07:47 -04:00
Tejun Heo 05944bdf6f libata: implement no[hs]rst force params
Implement force params nohrst, nosrst and norst.  This is to work
around reset related problems and ease debugging.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-22 02:07:43 -04:00
Alok Kataria 3a6ddd5f18 x86: fix VMI for early params
while fixing a different bug i moved the call to vmi_init before
early params could be parsed.

This broke the vmi specific commandline parameters.
Fix that, by moving vmi initialization after kernel has got a chance to
parse early parameters.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 08:01:54 +02:00
Jan Beulich 9482ac6e34 x86: fix two modpost warnings in mm/init_64.c
early_io{re,un}map() are __init and hence can't be called from __meminit
functions.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 07:51:54 +02:00
Jan Beulich 8ae3a5a8df x86: fix 1:1 mapping init on 64-bit (memory hotplug case)
While I don't have a hotplug capable system at hand, I think two issues need
fixing:

- pud_phys (in kernel_physical_ampping_init()) would remain uninitialized in
  the after_bootmem case

- the locking done just around phys_pmd_{init,update}() would leave out pgd
  updates, and it was needlessly covering code portions that do allocations
  (perhaps using a more friendly gfp value in alloc_low_page() would then be
  possible)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 07:51:53 +02:00
Yinghai Lu 38cc1c3df7 x86: work around MTRR mask setting
Joshua Hoblitt reported that only 3 GB of his 16 GB of RAM is
usable. Booting with mtrr_show showed us the BIOS-initialized
MTRR settings - which are all wrong.

So the root cause is that the BIOS has not set the mask correctly:

>               [    0.429971]  MSR00000200: 00000000d0000000
>               [    0.433305]  MSR00000201: 0000000ff0000800
> should be ==> [    0.433305]  MSR00000201: 0000003ff0000800
>
>               [    0.436638]  MSR00000202: 00000000e0000000
>               [    0.439971]  MSR00000203: 0000000fe0000800
> should be ==> [    0.439971]  MSR00000203: 0000003fe0000800
>
>               [    0.443304]  MSR00000204: 0000000000000006
>               [    0.446637]  MSR00000205: 0000000c00000800
> should be ==> [    0.446637]  MSR00000205: 0000003c00000800
>
>               [    0.449970]  MSR00000206: 0000000400000006
>               [    0.453303]  MSR00000207: 0000000fe0000800
> should be ==> [    0.453303]  MSR00000207: 0000003fe0000800
>
>               [    0.456636]  MSR00000208: 0000000420000006
>               [    0.459970]  MSR00000209: 0000000ff0000800
> should be ==> [    0.459970]  MSR00000209: 0000003ff0000800

So detect this borkage and add the prefix 111.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22 05:49:35 +02:00
Linus Torvalds a22c50c302 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5212/1: pxa: fix build error when CPU_PXA310 is not defined
  [ARM] 5208/1: fsg-setup.c fixes
  [ARM] fix impd1.c build warning
  [ARM] e400 config use MFP
  [ARM] e740 config use MFP
  [ARM] Fix eseries IRQ limit
  [ARM] clocklib: Update users of aliases to new API
  [ARM] clocklib: Allow dynamic alias creation
  [ARM] eseries: whitespace fixes and cleanup
2008-08-21 16:31:08 -07:00
Linus Torvalds 61311e1bbc Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  pnp: fix "add acpi:* modalias entries"
  UIO: generic irq handling for some uio platform devices
  UIO: uio_pdrv: fix license specification
  UIO: uio_pdrv: fix memory leak
  block: drop references taken by class_find_device()
  block: fix partial read() of /proc/{partitions,diskstats}
  PM: Remove WARN_ON from device_pm_add
  driver core: add init_name to struct device
  PM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set
  driver model: anti-oopsing medicine
  dev_printk(): constify the `dev' argument
  drivers/base/driver.c: remove unused to_dev() macro
  Documentation: HOWTO-ja_JP-sync patch
  Japanese translation of Documentation/SubmitChecklist
  kobject: Replace ALL occurrences of '/' with '!' instead of only the first one.
2008-08-21 13:48:37 -07:00
Linus Torvalds 691a55998c Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp.
  USB: automatically enable RHSC interrupts
  USB: Don't rebind before "complete" callback
  USB: Add new PM callback methods for USB
  USB: Defer Set-Interface for suspended devices
  USB: Add udev argument to interface suspend/resume functions
  USB: cdc-acm: don't unlock acm->mutex on error path
  MUSB: Fix index register corruption seen with g_ether and Windows host
  usb: musb: get rid of MUSB_LOGLEVEL and use parameter
  usb: musb: get rid of procfs entry
  USB: Fix pxa27x_udc usb speed handling.
  USB: cdc-acm: quirk for Conexant CX93010 USB modem
  USB: fix bug in usb_unlink_anchored_urbs()
  usb-serial: option support HSDPA modem A2502
  USB: ISP1760: fixed trivial math in comment
2008-08-21 13:48:07 -07:00
Martin Schwidefsky cce7496d3d [S390] Update default configuration.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:42 +02:00
Gerald Schaefer 04f64b5756 [S390] dcssblk: fix race in dcssblk_add_store()
Concurrently adding the same segment may lead to duplicate device_register()
calls, which will trigger an error in kobject code:
"... don't try to register things with the same name in the same directory".
This patch adds a check to avoid this.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:42 +02:00
Peter Oberparleiter 91c36919a4 [S390] cio: call ccw driver notify function with lock held
Calling a ccw driver's notify function without the ccw device lock
held opens up a race window between discovery and handling of a change
in the device operational state. As a result, the device driver may
encounter unexpected device malfunction, leading to out-of-retry
situations or similar.

Remove race by extending the ccw device lock from state change
discovery to the calling of the notify function.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:41 +02:00
Stefan Weinhuber 49fd38bdaa [S390] dasd: fix data size for PSF/PRSSD command
The Perform Subsystem Function/Prepare for Read Subsystem Data
command requires 12 bytes of parameter data, but the respective data
structure dasd_psf_prssd_data has a length of 16 bytes.
Current storage servers ignore the obsolete bytes, but older models
fail to execute the command and report an incorrect length error.
This causes the device initilization for these devices to fail.
To fix this problem we need to correct the dasd_psf_prssd_data
structure and shorten it to the correct length.

Reported-by: Ivan Warren <ivan@vmfacility.fr>
Reviewed-by: Ivan Warren <ivan@vmfacility.fr>
Tested-by: Ivan Warren <ivan@vmfacility.fr>
CC: stable <stable@kernel.org>
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
2008-08-21 19:46:41 +02:00
Eric Sandeen 152382af40 [S390] fix ext2_find_next_bit
ext4 does not work on s390 because ext2_find_next_bit is broken. Fortunately
this function is only used by ext4. The function uses ffs which does not work
analog to ffz. The result of ffs has an offset of 1 which is not taken into
account. To fix this use the low level __ffs_word function directly instead
of the ill defined ffs.

In addition the patch improves find_next_zero_bit and ext2_find_next_zero_bit
by passing the bit offset into __ffz_word instead of adding it after the
function call returned.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:41 +02:00
Peter Oberparleiter 16f7f9564c [S390] cio: fix ccw group device cleanup
Fix ccw group device initialization: initialize device object before
using reference counting during cleanup.

Fixes the following message when group device initialization fails
(e.g. because too few devices where specified):

  kobject: '<NULL>' (..): is not initialized, yet kobject_put() is
           being called.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:40 +02:00
Jan Glauber 0686e402c3 [S390] qdio: remove the module_get & module_put pair
Increasing the qdio reference count for every used subchannel
is unnecessary since unloading qdio (if build as a module) is
only possible if other modules that use qdio are unloaded.
Unloading modules that use qdio in turn requires that these
modules shut down all qdio subchannels. Therefore the additional
module_get reference is not needed.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:40 +02:00
Jan Glauber 58eb27cd7f [S390] qdio: improve s390 debug feature usage
Improve s390 debug feature usage:
- log busy bit in dbf
- increase size of dbf views
- consistent logging of qdio api calls to setup view
- print subchannel number so one can associate the interface
  with the dbf data
- only log events to one view

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:40 +02:00
Jan Glauber 53b41ba7ce [S390] qdio: prevent oopsing if qdio_establish fails
If qdio_establish fails we call qdio_shutdown to cleanup the
qdio subchannel. The tiq_list entry may not be valid at that
time, therefore we must ignore queues with an invalid list entry
in tiqdio_remove_input_queues.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:39 +02:00
Heiko Carstens 8853e505a1 [S390] Remove unneeded spinlock initialization.
Remove the now unneeded s390_idle.lock spinlock initialization after
Josef Sipek did it the right way in arch/s390/kernel/process.c.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:39 +02:00
Josef 'Jeff' Sipek 3e972394f9 [S390] Fix uninitialized spinlock use
Ever since commit 43ca5c3a1c ([S390] Convert
monitor calls to function calls.), the kernel refused to IPL with spinlock
debugging enabled.

BUG: spinlock bad magic on CPU#0, swapper/0
 lock: 00000000003a4668, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
CPU: 0 Not tainted 2.6.25 #1
Process swapper (pid: 0, task: 000000000034f958, ksp: 0000000000377d60)
0000000000377ab8 0000000000352628 0000000000377d60 0000000000377d60
       0000000000016af4 00000000fffff7b5 0000000000377d60 0000000000000000
       0000000000000000 0000000000377a18 0000000000000009 0000000000377a18
       0000000000377a78 000000000023c920 0000000000016af4 0000000000377a18
       0000000000000005 0000000000000000 0000000000377b58 0000000000377ab8
Call Trace:
([<0000000000016a60>] show_trace+0xdc/0x108)
 [<0000000000016b4e>] show_stack+0xc2/0xfc
 [<0000000000016c9a>] dump_stack+0xb2/0xc0
 [<0000000000172dd4>]

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:39 +02:00
Julien Brunel 0983e56835 [S390] drivers/s390: Use an IS_ERR test rather than a NULL test
In case of error, functions dasd_kmalloc_request and idal_buffer_alloc
return an ERR pointer, but never return the NULL pointer. So after a
call to one of these functions, a NULL test should be replaced by an
IS_ERR test.

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

// <smpl>
@correct_null_test@
expression x,E;
statement S1, S2;
@@
x =
(
  dasd_kmalloc_request(...)
|
  idal_buffer_alloc(...)
)
<... when != x = E
if (
(
- x@p2 != NULL
+ ! IS_ERR ( x )
|
- x@p2 == NULL
+ IS_ERR( x )
)
 )
S1
else S2
...>
? x = E;
// </smpl>

Signed-off-by:  Julien Brunel <brunel@diku.dk>
Signed-off-by:  Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:39 +02:00
Stefan Lippers-Hollmann eaea04353e USB: sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp.
sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp.

usb 1-2: new high speed USB device using ehci_hcd and address 4
usb 1-2: configuration #1 chosen from 1 choice
usb 1-2: USB2VGA dongle found at address 4
usb 1-2: Allocated 8 output buffers
usb 1-2: 8MB 1 ch/1 r SDR SDRAM, bus width 32
usb 1-2: New USB device found, idVendor=0711, idProduct=0918
usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0

Signed-off-by: Stefan Lippers-Hollmann <s.L-H@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:39 -07:00
Alan Stern b5fb454f69 USB: automatically enable RHSC interrupts
This patch (as1069c) changes the way OHCI root-hub status-change
interrupts are enabled.  Currently a special HCD method,
hub_irq_enable(), is called when the hub driver is finished using a
root hub.  This approach turns out to be subject to races, resulting
in unnecessary polling.

The patch does away with the method entirely.  Instead, the driver
automatically enables the RHSC interrupt when no more status changes
are present.  This scheme is safe with controllers using
level-triggered semantics for their interrupt flags.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:38 -07:00
Alan Stern 5096aedcd2 USB: Don't rebind before "complete" callback
This patch (as1130) fixes an incompatibility between the new PM
infrastructure and USB power management.  We are not allowed to call
drivers' probe routines during a system sleep transition between the
"prepare" and "complete" callbacks, but that's exactly what we do when
a driver doesn't have full suspend/resume support.  Such drivers are
unbound during the "suspend" call and reprobed during the "resume" call.

The patch causes the reprobe step to be skipped if the "complete"
callback hasn't been issued yet, i.e., if the interface's
dev.power.status field is not equal to DPM_ON.  Thus during the
"resume" callback nothing bad will happen, and during the final
"complete" callback the reprobing will occur as desired.

This fixes the problem reported in Bugzilla #11263.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:37 -07:00
Alan Stern f2189c477c USB: Add new PM callback methods for USB
This patch (as1129) adds support for the new PM callbacks to usbcore.
The new callbacks merely invoke the same old USB power management
routines as the old ones did.

A minor improvement is that the callbacks are present only in the
"USB-device" device_type structure, rather than in the bus_type
structure.  This way they will be invoked only for USB devices, not
for USB interfaces.  The core USB PM routines automatically handle
suspending and resuming interfaces along with their devices.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:37 -07:00
Alan Stern 55151d7dab USB: Defer Set-Interface for suspended devices
This patch (as1128) fixes one of the problems related to the new PM
infrastructure.  We are not allowed to register new child devices
during the middle of a system sleep transition, but unbinding a USB
driver causes the core to automatically install altsetting 0 and
thereby create new endpoint pseudo-devices.

The patch fixes this problem (and the related problem that installing
altsetting 0 will fail if the device is suspended) by deferring the
Set-Interface call until some later time when it is legal and can
succeed.  Possible later times are: when a new driver is being probed
for the interface, and when the interface is being resumed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:36 -07:00
Alan Stern 65605ae8e5 USB: Add udev argument to interface suspend/resume functions
This patch (as1127) makes a minor change to the prototypes of the
usb_suspend_interface() and usb_resume_interface() routines.  Now the
usb_device structure is passed as an argument, instead of being
computed on-the-fly from the usb_interface argument.

It makes the code look simpler, even if it really isn't much different
from before.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:36 -07:00
Alexey Dobriyan 74573ee709 USB: cdc-acm: don't unlock acm->mutex on error path
On Wed, Jul 23, 2008 at 03:52:36PM +0300, Andrei Popa wrote:
> I installed gnokii-0.6.22-r2 and gave the command "gnokii --identify"
> and the kernel oopsed:
>
> BUG: unable to handle kernel NULL pointer dereference at 00000458
> IP: [<c0444b52>] mutex_unlock+0x0/0xb
>  [<c03830ae>] acm_tty_open+0x4c/0x214

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Tested-by: Andrei Popa <andrei.popa@i-neo.ro>
Cc: stable <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:35 -07:00
Anand Gadiyar fb85d99161 MUSB: Fix index register corruption seen with g_ether and Windows host
If Indexed Mode register accesses are enabled, the ep0_rxstate()
function calls musb_g_ep0_giveback() before writing to the CSR
register. When control returns to this ep0_rxstate, the index
register contents are over-written. This causes the CSR register
write to fail.

Fixed by writing the correct value into the index register before
writing to the CSR.

This was observed only in ep0_rxstate() with g_ether loaded and
the device connected to a MS Windows host PC. Anticipatively fixed
ep0_txstate() as well.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:34 -07:00
Felipe Balbi e8164f64ca usb: musb: get rid of MUSB_LOGLEVEL and use parameter
We can change debugging level on the fly via
/sys/module/musb_hdrc/parameters/debug.

We can also get rid of the LOGLEVEL facility in Kconfig
and rely only in module parameter.

Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:34 -07:00
Felipe Balbi 746cdd0b2d usb: musb: get rid of procfs entry
Drivers should not add procfs. The functionality in the old
procfs file will be moved to debugfs.

Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:33 -07:00
Robert Jarzmik bf31338bfd USB: Fix pxa27x_udc usb speed handling.
The new composite framework revealed a weakness in the
pxa27x_udc driver gadget register function. Instead of
checking if speed asked for was USB_LOW_SPEED upon
usb_gadget_register() to deny service, it checked only
for USB_FULL_SPEED, thus denying service to usb high
speed capable gadgets (like g_ether).

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:33 -07:00
Eric Sandeen c8fd2c37b9 USB: cdc-acm: quirk for Conexant CX93010 USB modem
This patch gets my Rosewill RNX-56USB USB modem (with Conexant CX93010
chipset) up and running to the point where I can send AT commands and
retrieve caller ID data, which is all I want to do with it.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:33 -07:00
Oliver Neukum 77571f05a4 USB: fix bug in usb_unlink_anchored_urbs()
Irqs must not accidentally be reenabled.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:32 -07:00
Hiroshi Miura f8033827d8 usb-serial: option support HSDPA modem A2502
This patch  support  NTT DoCoMo A2502 3G/HSDPA modem on option driver.
It is produced by AnyDATA Corp. and also sold as KT Freetelecom (Korea) ADU 620UW.

It support 3.6Mbps/7.2Mbps hight speed communication.
I have tested A2502 with NTT DoCoMo MoperaU ISP service.


Signed-off-by: Hiroshi Miura <miurahr@nttdata.co.jp>
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:32 -07:00