pandora-kernel.git
17 years agoFix misspellings of "agressive".
Robert P. J. Day [Sat, 17 Feb 2007 18:20:16 +0000 (19:20 +0100)]
Fix misspellings of "agressive".

Fix the various misspellings of "agressive", as well as a couple
other things on the same lines while we're there.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agodrivers/scsi/a100u2w.c: trivial typo patch
Robert P. J. Day [Sat, 17 Feb 2007 18:18:52 +0000 (19:18 +0100)]
drivers/scsi/a100u2w.c: trivial typo patch

Trivial typo fix.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoCorrect trivial typo in log2.h.
Robert P. J. Day [Sat, 17 Feb 2007 18:17:37 +0000 (19:17 +0100)]
Correct trivial typo in log2.h.

Single typo correction in include/linux/log2.h.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoRemove useless FIND_FIRST_BIT() macro from cardbus.c.
Robert P. J. Day [Sat, 17 Feb 2007 18:16:31 +0000 (19:16 +0100)]
Remove useless FIND_FIRST_BIT() macro from cardbus.c.

Delete the definition of the unused FIND_FIRST_BIT() macro.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoReplace remaining references to "driverfs" with "sysfs".
Robert P. J. Day [Sat, 17 Feb 2007 18:13:42 +0000 (19:13 +0100)]
Replace remaining references to "driverfs" with "sysfs".

Globally, s/driverfs/sysfs/g.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoUse ARRAY_SIZE() macro in i386 relocs.c file
Robert P. J. Day [Sat, 17 Feb 2007 18:10:01 +0000 (19:10 +0100)]
Use ARRAY_SIZE() macro in i386 relocs.c file

Change the explicit code in the relocs.c file to use ARRAY_SIZE()
and add a definition of ARRAY_SIZE() since this is a userspace program
and wouldn't include kernel.h.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoVarious typo fixes.
Robert P. J. Day [Sat, 17 Feb 2007 18:07:33 +0000 (19:07 +0100)]
Various typo fixes.

Correct mis-spellings of "algorithm", "appear", "consistent" and
(shame, shame) "kernel".

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agokbuild: Replace remaining "depends" with "depends on"
Robert P. J. Day [Sat, 17 Feb 2007 18:05:24 +0000 (19:05 +0100)]
kbuild: Replace remaining "depends" with "depends on"

Replace the very few remaining "depends" Kconfig directives with
"depends on".

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agorio: typo in bitwise AND expression.
Willy Tarreau [Sat, 17 Feb 2007 17:57:09 +0000 (18:57 +0100)]
rio: typo in bitwise AND expression.

The line :

    hp->Mode &= !RIO_PCI_INT_ENABLE;

is obviously wrong as RIO_PCI_INT_ENABLE=0x04 and is used as a bitmask
2 lines before. Getting no IRQ would not disable RIO_PCI_INT_ENABLE
but rather RIO_PCI_BOOT_FROM_RAM which equals 0x01.

Obvious fix is to change ! for ~.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoMerge branch 'master' into 85xx
Kumar Gala [Sat, 17 Feb 2007 16:18:34 +0000 (10:18 -0600)]
Merge branch 'master' into 85xx

17 years ago[POWERPC] 83xx: Renamed MPC8323 MDS dts and defconfig to match other boards
Kumar Gala [Sat, 17 Feb 2007 16:16:18 +0000 (10:16 -0600)]
[POWERPC] 83xx: Renamed MPC8323 MDS dts and defconfig to match other boards

Renamed the MPC8323 MDS and defconfig to match the naming convention followed
by other MDS boards.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: Updated and renamed MPC8360PB to MPC836x MDS
Kumar Gala [Sat, 17 Feb 2007 16:13:56 +0000 (10:13 -0600)]
[POWERPC] 83xx: Updated and renamed MPC8360PB to MPC836x MDS

The MPC836x PB board is really just one part of the MPC836x MDS.  We currently
name all other PB boards as MDS.  Removed all references to PB and replaced
with MDS.  Additionally renamed the .dts to match the defconfig (mpc836x_mds*).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: Use of_platform_bus_probe to setup QE devices
Kumar Gala [Sat, 17 Feb 2007 15:56:49 +0000 (09:56 -0600)]
[POWERPC] 83xx: Use of_platform_bus_probe to setup QE devices

Use of_platform_bus_probe to setup devices on the of_platform_bus since its
much cleaner.  We explicitly specify the bus ids since the we want to get rid
of the default mechanism in the future.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: use default value of loops_per_jiffy
Kumar Gala [Sat, 17 Feb 2007 15:42:18 +0000 (09:42 -0600)]
[POWERPC] 83xx: use default value of loops_per_jiffy

Use the default value setup by initialization of loops_per_jiffy, its close
enough for 83xx and will get fixed up by calibrate_delay().

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: Remove obsolete setting of ROOT_DEV.
Kumar Gala [Sat, 17 Feb 2007 15:25:57 +0000 (09:25 -0600)]
[POWERPC] 83xx: Remove obsolete setting of ROOT_DEV.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: Cleaning up machine probing and board initcalls
Kumar Gala [Sat, 17 Feb 2007 15:10:44 +0000 (09:10 -0600)]
[POWERPC] 83xx: Cleaning up machine probing and board initcalls

Cleaned up the probing functionality to be more consistent across all 83xx
boards and added machine_is() protection around board initcalls to ensure they
only do something if we are actually running on that board.

Additionally, removed some dead code on mpc832x_mds.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[ARM] 4221/1: S3C2443: DMA support
Ben Dooks [Sat, 17 Feb 2007 14:41:50 +0000 (15:41 +0100)]
[ARM] 4221/1: S3C2443: DMA support

Add initialisation and mappings for S3C2443 DMA
system

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4220/1: S3C24XX: DMA system initialised from sysdev
Ben Dooks [Sat, 17 Feb 2007 14:37:14 +0000 (15:37 +0100)]
[ARM] 4220/1: S3C24XX: DMA system initialised from sysdev

This patch gets the DMA system for the S3C24XX
ready for the S3C2443, which requires 6 dma channels
at a different stride, and different base IRQ.

The DMA system is now initialised from the same
drivers which apply the DMA mappings, as well
as removing the DMA sysdev intialisation out of
the main init code (which is now being called
from a sysdev probe, so cannot add a new sysdev)

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4219/1: S3C2443: DMA source definitions
Ben Dooks [Sat, 17 Feb 2007 14:05:17 +0000 (15:05 +0100)]
[ARM] 4219/1: S3C2443: DMA source definitions

Defines for the S3C2443 DMA source selection,
and update the maximum channels to 6 if the S3C2443
is selected.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4218/1: S3C2412: fix CONFIG_CPU_S3C2412_ONLY wrt to S3C2443
Ben Dooks [Sat, 17 Feb 2007 13:04:33 +0000 (14:04 +0100)]
[ARM] 4218/1: S3C2412: fix CONFIG_CPU_S3C2412_ONLY wrt to S3C2443

Update the Kconfig of arch/arm/mach-s3c2443 to
add the CONFIG_CPU_S3C2443 to the list of config
variabls which mean CONFIG_CPU_S3C2412_ONLY cannot
be set

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4217/1: S3C24XX: remove the dma channel show at startup
Ben Dooks [Sat, 17 Feb 2007 13:02:37 +0000 (14:02 +0100)]
[ARM] 4217/1: S3C24XX: remove the dma channel show at startup

Remove the DMA code's channel printing at startup
as this is firstly a waste of console output on
initialsaion, and secondly is going to be obsolete
once the S3C2443 DMA code has been merged

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoMerge branch 'master' into 83xx
Kumar Gala [Sat, 17 Feb 2007 14:59:00 +0000 (08:59 -0600)]
Merge branch 'master' into 83xx

17 years agoieee1394: fix another deadlock in nodemgr
Stefan Richter [Sat, 10 Feb 2007 21:06:18 +0000 (22:06 +0100)]
ieee1394: fix another deadlock in nodemgr

A "modprobe ohci1394; sleep 1.5; modprobe -r ohci1394" could get stuck
in uninterruptible state, especially if an external node was connected.
http://bugzilla.kernel.org/show_bug.cgi?id=7792

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: cycle timer read extension for raw1394
Pieter Palmers [Sat, 3 Feb 2007 16:44:39 +0000 (17:44 +0100)]
ieee1394: cycle timer read extension for raw1394

This implements the simultaneous read of the isochronous cycle timer and
the system clock (in usecs).  This allows to express the exact receive
time of an ISO packet as a system time with microsecond accuracy.
http://bugzilla.kernel.org/show_bug.cgi?id=7773

The counterpart patch for libraw1394 can be found at
http://thread.gmane.org/gmane.linux.kernel.firewire.devel/8934

Patch update (Stefan R.):  Disable preemption and local interrupts.
Prevent integer overflow.  Add paranoid error checks and kerneldoc to
hpsb_read_cycle_timer.  Move it to other ieee1394_core high-level API
functions.  Change comments.  Adjust whitespace.  Rename struct
_raw1394_cycle_timer.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Pieter Palmers <pieterp@joow.be>
Acked-by: Dan Dennedy <dan@dennedy.org>
17 years ago[ARM] 4090/2: avoid clash between PXA and SA1111 defines
Nicolas Pitre [Sat, 17 Feb 2007 02:18:39 +0000 (03:18 +0100)]
[ARM] 4090/2: avoid clash between PXA and SA1111 defines

The Lubbock platform uses both a PXA25x and a SA1111 at the same time.
Both chips have the same "Serial Audio Controller" registers although
the SA1111 one is never expected to be used in preference to the PXA25x
one. So let's disable the SA1111 defines whenever compilation is for a
PXA architecture and make the PXA defines always defined.

This removes a bunch of "already defined" warnings as well since the
current hack to prevent them depended on include ordering which wasn't
always right.

While at it, clean up the SA1111 defines allowing to get rid of the
__CCREG() macro.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4216/1: add .gitignore entries for ARM specific files
Nicolas Pitre [Sat, 17 Feb 2007 02:37:02 +0000 (03:37 +0100)]
[ARM] 4216/1: add .gitignore entries for ARM specific files

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4214/2: S3C2410: Add Armzone QT2410
Ben Dooks [Fri, 16 Feb 2007 23:52:37 +0000 (00:52 +0100)]
[ARM] 4214/2: S3C2410: Add Armzone QT2410

Patch from: Harald Welte <laforge@openmoko.org>

Add support for the Armzone QT2410 system, with
basic peripheral support for TFT display, SPI
and LEDs.

Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Ben Dooks <ben-linux@fluf.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4215/1: s3c2410 usb device: per-platform vbus_draw
Arnaud Patard [Fri, 16 Feb 2007 22:50:32 +0000 (23:50 +0100)]
[ARM] 4215/1: s3c2410 usb device:  per-platform vbus_draw

Introduce a platform_device (machine) specific callback function
which gets called when the amount of power we can draw from Vbus
has changed.

Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST
Arnaud Patard [Fri, 16 Feb 2007 21:19:48 +0000 (22:19 +0100)]
[ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST

Update S3C2410_ADCTSC_XY_PST macro to allow setting the ADCTSC_XY_PST
bits.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[POWERPC] Dispose irq mapping when done in mpc52xx_serial.c
Sylvain Munaut [Thu, 15 Feb 2007 22:18:08 +0000 (23:18 +0100)]
[POWERPC] Dispose irq mapping when done in mpc52xx_serial.c

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoPull bugzilla-7897 into release branch
Len Brown [Sat, 17 Feb 2007 03:12:04 +0000 (22:12 -0500)]
Pull bugzilla-7897 into release branch

17 years agoPull bugzilla-7887 into release branch
Len Brown [Sat, 17 Feb 2007 03:11:57 +0000 (22:11 -0500)]
Pull bugzilla-7887 into release branch

17 years agoPull bugzilla-7570 into release branch
Len Brown [Sat, 17 Feb 2007 03:11:50 +0000 (22:11 -0500)]
Pull bugzilla-7570 into release branch

17 years agoPull bugzilla-7200 into release branch
Len Brown [Sat, 17 Feb 2007 03:11:37 +0000 (22:11 -0500)]
Pull bugzilla-7200 into release branch

17 years agoPull bugzilla-7122 into release branch
Len Brown [Sat, 17 Feb 2007 03:11:31 +0000 (22:11 -0500)]
Pull bugzilla-7122 into release branch

17 years agoPull bugzilla-5534 into release branch
Len Brown [Sat, 17 Feb 2007 03:11:21 +0000 (22:11 -0500)]
Pull bugzilla-5534 into release branch

17 years agoPull remove-hotkey into release branch
Len Brown [Sat, 17 Feb 2007 03:11:02 +0000 (22:11 -0500)]
Pull remove-hotkey into release branch

17 years agoPull sony into release branch
Len Brown [Sat, 17 Feb 2007 03:10:55 +0000 (22:10 -0500)]
Pull sony into release branch

17 years agoPull fluff into release branch
Len Brown [Sat, 17 Feb 2007 03:10:32 +0000 (22:10 -0500)]
Pull fluff into release branch

Conflicts:

arch/x86_64/pci/mmconfig.c
drivers/acpi/bay.c

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: IA64: react to acpi_table_parse() return value change
John Keller [Fri, 16 Feb 2007 21:07:27 +0000 (15:07 -0600)]
ACPI: IA64: react to acpi_table_parse() return value change

acpi_boot_init() is making a bad check on the return
status from acpi_table_parse(). acpi_table_parse() now
returns zero on success, one on failure.

Signed-off-by: Aaron Young <ayoung@sgi.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: hotkey: remove driver, per feature-removal-schedule.txt
Len Brown [Sat, 10 Feb 2007 06:18:25 +0000 (01:18 -0500)]
ACPI: hotkey: remove driver, per feature-removal-schedule.txt

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoide: make ide_hwif_t.ide_dma_host_on void (v2)
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:26 +0000 (02:40 +0100)]
ide: make ide_hwif_t.ide_dma_host_on void (v2)

* since ide_hwif_t.ide_dma_host_on is called either when drive->using_dma == 1
  or when return value is discarded make it void, also drop "ide_" prefix
* make __ide_dma_host_on() void and drop "__" prefix

v2:
* while at it rename atiixp_ide_dma_host_on() to atiixp_dma_host_on()
  and sgiioc4_ide_dma_host_on() to sgiioc4_dma_host_on().
  [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2)
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:26 +0000 (02:40 +0100)]
ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2)

* since ide_hwif_t.ide_dma_{host_off,off_quietly} always return '0'
  make these functions void and while at it drop "ide_" prefix
* fix comment for __ide_dma_off_quietly()
* make __ide_dma_{host_off,off_quietly,off}() void and drop "__" prefix

v2:
* while at it rename atiixp_ide_dma_host_off() to atiixp_dma_host_off(),
  sgiioc4_ide_dma_{host_off,off_quietly}() to sgiioc4_dma_{host_off,off_quietly}()
  and sl82c105_ide_dma_off_quietly() to sl82c105_dma_off_quietly()
  [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_set_dma() helper (v2)
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:26 +0000 (02:40 +0100)]
ide: add ide_set_dma() helper (v2)

* add ide_set_dma() helper and make ide_hwif_t.ide_dma_check return
  -1 when DMA needs to be disabled (== need to call ->ide_dma_off_quietly)
   0 when DMA needs to be enabled  (== need to call ->ide_dma_on)
   1 when DMA setting shouldn't be changed
* fix IDE code to use ide_set_dma() instead if using ->ide_dma_check directly

v2:
* updated for scc_pata

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosgiioc4: fix sgiioc4_ide_dma_check() to enable/disable DMA properly
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:26 +0000 (02:40 +0100)]
sgiioc4: fix sgiioc4_ide_dma_check() to enable/disable DMA properly

* use sgiioc4_ide_dma_{on,off_quietly}() instead of changing
  drive->using_dma directly
* fix warning message
* add FIXME

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: disable DMA in ->ide_dma_check for "no IORDY" case (v2)
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:25 +0000 (02:40 +0100)]
ide: disable DMA in ->ide_dma_check for "no IORDY" case (v2)

If DMA is unsupported ->ide_dma_check should disable DMA.

v2:
* updated for scc_pata

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: convert ide_hwif_t.mmio into flag (v2)
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:25 +0000 (02:40 +0100)]
ide: convert ide_hwif_t.mmio into flag (v2)

All users of ->mmio == 1 are gone so convert ->mmio into flag.

Noticed by Alan Cox.

v2:
* updated for scc_pata

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: use PIO/MMIO operations directly where possible (v2)
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:25 +0000 (02:40 +0100)]
ide: use PIO/MMIO operations directly where possible (v2)

This results in smaller/faster/simpler code and allows future optimizations.
Also remove no longer needed ide[_mm]_{inl,outl}() and ide_hwif_t.{INL,OUTL}.

v2:
* updated for scc_pata

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_use_fast_pio() helper (v3)
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:25 +0000 (02:40 +0100)]
ide: add ide_use_fast_pio() helper (v3)

* add ide_use_fast_pio() helper for use by host drivers

* add DMA capability and hwif->autodma checks to ide_use_dma()

  - au1xxx-ide/it8213/it821x drivers didn't check for (id->capability & 1)

    [ for the IT8211/2 in SMART mode this check shouldn't be made but since
      in it821x_fixups() we set DMA bit explicitly:

               if(strstr(id->model, "Integrated Technology Express")) {
                       /* In raid mode the ident block is slightly buggy
                          We need to set the bits so that the IDE layer knows
                          LBA28. LBA48 and DMA ar valid */
                       id->capability |= 3;            /* LBA28, DMA */

       we are better off using generic helper if we can ]

  - ide-cris driver didn't set ->autodma

    [ before the patch hwif->autodma was only checked in the chipset specific
      hwif->ide_dma_check implementations, for ide-cris it is cris_dma_check()
      function so there no behavior change here ]

v2:
* updated patch description (thanks to Alan Cox for the feedback)

v3:
* updated for scc_pata driver

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: unexport ide_set_xfer_rate() (v2)
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:24 +0000 (02:40 +0100)]
ide: unexport ide_set_xfer_rate() (v2)

In cmd64x, siimage and scc_pata drivers:
* don't set drive->init_speed as it should be already
  set by successful execution of ide_set_xfer_rate()
* use hwif->speedproc functions directly

Above changes allows removal of EXPORT_SYMBOL_GPL(ide_set_xfer_rate).

v2:
* updated for scc_pata driver

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove ide_drive_t.usage
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:24 +0000 (02:40 +0100)]
ide: remove ide_drive_t.usage

This field is no longer used by the core IDE code so fix ide-{disk,floppy}
drivers to keep openers count in the driver specific objects and remove
it from ide-{cd,scsi,tape} drivers (it was write-only).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove ide_pci_device_t tables with only one entry
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:24 +0000 (02:40 +0100)]
ide: remove ide_pci_device_t tables with only one entry

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove write-only ide_hwif_t.no_dsc flag
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:24 +0000 (02:40 +0100)]
ide: remove write-only ide_hwif_t.no_dsc flag

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove write-only ide_pio_data_t.blacklisted
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:24 +0000 (02:40 +0100)]
ide: remove write-only ide_pio_data_t.blacklisted

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosis5513: sis5513_config_xfer_rate() cleanup
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:24 +0000 (02:40 +0100)]
sis5513: sis5513_config_xfer_rate() cleanup

* remove bogus comment for sis5513_config_xfer_rate()
* there is no need to call config_drive_art_rwp() because
  it is called by config_art_rwp_pio()
* remove needless wrapper
* remove stale "TODO" comment
  (IDE core should provide generic tuning code)

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopiix: cleanup
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:23 +0000 (02:40 +0100)]
piix: cleanup

* disable DMA masks if no_piix_dma is set and remove now
  not needed no_piix_dma_check from piix_config_drive_for_dma()
* there is no need to read register 0x55 in init_hwif_piix()
* move cable detection code to piix_cable_detect()
* remove unreachable 82371MX code from init_hwif_piix()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosvwks: small cleanup
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:23 +0000 (02:40 +0100)]
svwks: small cleanup

* remove redundant svwks_ide_dma_end() [ __ide_dma_end() is used by default ]
* remove init_dma_svwks() so the default ide_setup_dma() function is used
  [ init_setup_csb6() takes care of not initializing disabled channels ]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agocs5530: small cleanup
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:23 +0000 (02:40 +0100)]
cs5530: small cleanup

* BUG() on unknown DMA mode in cs5530_config_dma()
* there is no need to call hwif->ide_dma_host_{off,on}() in
  cs5530_config_dma() because hwif->ide_dma_host_{off,on}()
  is called by hwif->ide_dma_off_{quietly,on}()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: remove redundant check from init_dma_hpt366()
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:23 +0000 (02:40 +0100)]
hpt366: remove redundant check from init_dma_hpt366()

->init_dma() cannot be called with dmabase == 0
(see drivers/ide/setup-pci.c)

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agotrm290: remove redundant CONFIG_BLK_DEV_IDEDMA #ifdef-s
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:23 +0000 (02:40 +0100)]
trm290: remove redundant CONFIG_BLK_DEV_IDEDMA #ifdef-s

In drivers/ide/Kconfig BLK_DEV_TRM290 depends on
BLK_DEV_IDEDMA_PCI (on which is BLK_DEV_IDEDMA dependant on).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoau1xxx-ide: remove dead code
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:23 +0000 (02:40 +0100)]
au1xxx-ide: remove dead code

'speed' is always equal to 'mode' when ide_config_drive_speed() is called

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopdc202xx_old: remove dead code
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:23 +0000 (02:40 +0100)]
pdc202xx_old: remove dead code

CONFIG_PDC202XX_MASTER config option doesn't exist

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agodrivers/ide: PATA driver for Celleb
Kou Ishizaki [Sat, 17 Feb 2007 01:40:22 +0000 (02:40 +0100)]
drivers/ide: PATA driver for Celleb

This is the patch (based on 2.6.19-rc4) for PATA controller of
Toshiba Cell reference set(Celleb). The reference set consists
of Cell, 512MB memory, Super Companion Chip(SCC) and some
peripherals such as HDD, GbE, etc. You can see brief explanation
and picture of Cell reference set at following URLs.

    http://www.toshiba.co.jp/about/press/2005_09/pr2001.htm
    http://cell-industries.com/toshiba_announces.php

We use a drivers/ide driver because its design is more suitable for
SCC IDE controller than libata driver. Since SCC supports only 32bit
read/write, we must override many callbacks of ata_port_operations
by modifying generic helpers. Each time the libata common code is
updated, we must update those modified helpers. It is very hard for us.
But we will try to implement the libata driver as needed.

Signed-off-by: Kou Ishizaki <kou.ishizaki at toshiba.co.jp>
Signed-off-by: Akira Iguchi <akira2.iguchi at toshiba.co.jp>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosl82c105: DMA support fixes
Sergei Shtylyov [Sat, 17 Feb 2007 01:40:22 +0000 (02:40 +0100)]
sl82c105: DMA support fixes

Fix a number of issues with the DMA support code:

- driver claims support for all SW/MW DMA modes while supporting only MWDMA2;

- ide_dma_check() method tries to enable DMA on the "known good" drives which
  don't support MWDMA2;

- ide_dma_on() method upon failure to set drive to MWDMA2 re-tunes already
  tuned PIO mode and calls ide_dma_off() method instead of returning error;

- ide_dma_off() method sets drive->current_speed while it doesn't actually
  change (only the PIO timings are re-loaded into the chip's registers);

- init_hwif() method forcibly sets/resets both "drive DMA capable" bits while
  this is properly handled by ide_dma_{on,off}() methods being called later...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agopdc202xx_old: fix PIO mode setup
Sergei Shtylyov [Sat, 17 Feb 2007 01:40:22 +0000 (02:40 +0100)]
pdc202xx_old: fix PIO mode setup

Fix the driver's tuneproc() method to always set the PIO mode requested and not
pick the best possible one, rename it to pdc202xx_tune_drive(), and change the
calls to it accordingly; remove the preceding comment which has nothing to do
with the code.

Sergei Shtylyov wrote:
>     The tuneproc() method should take arg 255 for auto-selecting the best PIO
> mode, not 5 as it did here + this driver's method always auto-selected instead
> of setting the mode it's been told to -- issue typical to drivers/ide/...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosiimage: PIO1/2 taskfile transfer overclocking fix
Sergei Shtylyov [Sat, 17 Feb 2007 01:40:22 +0000 (02:40 +0100)]
siimage: PIO1/2 taskfile transfer overclocking fix

Fix two typos found by SiI680A documentation check.  They caused the taskfile
transfer overclocking:

- in PIO mode 1 as 0x2283 must be used for both data and taskfile transfers;

- in PIO mode 2 as data and taskfile timings are swapped when writing to the
  MMIO regs.

Fix coding style and trailing whitespace in enclosing statements while at it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
 drivers/ide/pci/siimage.c |   59 ++++++++++++++++++++++------------------------
 1 file changed, 29 insertions(+), 30 deletions(-)

17 years agoide: remove clearing bmdma status from cdrom_decode_status() (rev #4)
Albert Lee [Sat, 17 Feb 2007 01:40:22 +0000 (02:40 +0100)]
ide: remove clearing bmdma status from cdrom_decode_status() (rev #4)

patch 2/2:
  Remove clearing bmdma status from cdrom_decode_status() since ATA devices
  might need it as well.

  (http://lkml.org/lkml/2006/12/4/201 and http://lkml.org/lkml/2006/11/15/94)

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Adam W. Hawks" <awhawks@us.ibm.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: clear bmdma status in ide_intr() for ICHx controllers (revised #4)
Albert Lee [Sat, 17 Feb 2007 01:40:21 +0000 (02:40 +0100)]
ide: clear bmdma status in ide_intr() for ICHx controllers (revised #4)

patch 1/2 (revised):
- Fix drive->waiting_for_dma to work with CDB-intr devices.
- Do the dma status clearing in ide_intr() and add a new
  hwif->ide_dma_clear_irq for Intel ICHx controllers.

Revised per Alan, Sergei and Bart's advice.

Patch against 2.6.20-rc6. Tested ok on my ICH4 and pdc20275 adapters.
Please review/apply, thanks.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Adam W. Hawks" <awhawks@us.ibm.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide-floppy: Fix unformatted media crash
Alan Cox [Sat, 17 Feb 2007 01:40:20 +0000 (02:40 +0100)]
ide-floppy: Fix unformatted media crash

A ZIP or similar with unformatted media will cause crashes when attempts
are made to read/write it in some cases. This is because bs_factor is
zero and we divide by it causing an oops.

As the size of a non-accessible/non-existant media is really a bit of a
zen question it doesn't matter if non-existant media is 512 bytes per
sector or zero. Setting it to 1 causes us to generate 512 bytes/sector
accesses and error properly.

Based on a fix found lurking in an ancient bugzilla entry since about 2004 (ugghhh)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoatiixp/jmicron/triflex: fix PIO fallback
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:20 +0000 (02:40 +0100)]
atiixp/jmicron/triflex: fix PIO fallback

* atiixp: if DMA can't be used atiixp_config_drive_for_dma() should return 0,
  atiixp_dma_check() will tune the correct PIO mode anyway

* jmicron: if DMA can't be used config_chipset_for_dma() should return 0,
  micron_config_drive_for_dma() will tune the correct PIO mode anyway

  config_jmicron_chipset_for_pio(drive, !speed) doesn't program
  device transfer mode for speed != 0 (only wastes some CPU cycles
  on ide_get_best_pio_mode() call) so remove it

* triflex: if DMA can't be used triflex_config_drive_for_dma() should return 0,
  triflex_config_drive_xfer_rate() will tune correct PIO mode anyway

Above changes also fix (theoretical) issue when ->speedproc fails to set
device transfer mode (i.e. when ide_config_drive_speed() fails to program it)
but one of DMA transfer modes is already enabled on the device by the BIOS.
In such scenario ide_dma_enable() will incorrectly return true statement
and ->ide_dma_check will try to enable DMA on the device.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt34x: hpt34x_tune_chipset() (->speedproc) fix
Bartlomiej Zolnierkiewicz [Sat, 17 Feb 2007 01:40:20 +0000 (02:40 +0100)]
hpt34x: hpt34x_tune_chipset() (->speedproc) fix

* remember to clear reg2 bits for the current device before setting mode
* remove no longer needed hpt34x_clear_chipset()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoMerge branch '85xx' into for_paulus
Kumar Gala [Sat, 17 Feb 2007 00:21:18 +0000 (18:21 -0600)]
Merge branch '85xx' into for_paulus

17 years ago[POWERPC] 86xx: Add missing of_node_put() in mpc86xx_hpcn_init_irq().
Jon Loeliger [Fri, 16 Feb 2007 22:17:41 +0000 (16:17 -0600)]
[POWERPC] 86xx: Add missing of_node_put() in mpc86xx_hpcn_init_irq().

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 8[56]xx: Remove obsolete setting of ROOT_DEV for 85xx and 86xx platforms.
Jon Loeliger [Fri, 16 Feb 2007 22:14:15 +0000 (16:14 -0600)]
[POWERPC] 8[56]xx: Remove obsolete setting of ROOT_DEV for 85xx and 86xx platforms.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agoPull misc-for-upstream into release branch
Len Brown [Fri, 16 Feb 2007 23:52:41 +0000 (18:52 -0500)]
Pull misc-for-upstream into release branch

Conflicts:

drivers/usb/misc/appledisplay.c

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: bay: use IS_ERR for return of register_platform_device_simple
Henrique de Moraes Holschuh [Wed, 14 Feb 2007 12:55:00 +0000 (10:55 -0200)]
ACPI: bay: use IS_ERR for return of register_platform_device_simple

register_platform_device_simple returns ERR_PTR(foo), so test it with
IS_ERR(foo).

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: acpi_unload_table_id() always returns error
John Keller [Thu, 15 Feb 2007 20:08:30 +0000 (14:08 -0600)]
ACPI: acpi_unload_table_id() always returns error

acpi_unload_table_id() is always returning an error status.
Also, once the matching table is found, don't bother looking
for another match.

Signed-off-by: John Keller <jpk@sgi.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoUSB: at91-ohci, handle extra at91sam9261 ahb clock
Andrew Victor [Fri, 16 Feb 2007 18:18:58 +0000 (10:18 -0800)]
USB: at91-ohci, handle extra at91sam9261 ahb clock

The AT91SAM9261 needs to activate an AHB clock (HCK0) to use the USB Host
controller. Previously clock.c would just enable it at startup, but now
all the unused clocks are automatically disabled.

Based on patch from Nicolas Ferre.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: another id for cp2101 driver
Pozsar Balazs [Fri, 16 Feb 2007 11:47:49 +0000 (12:47 +0100)]
USB: another id for cp2101 driver

This patch adds another usb id to the cp2101. It seems to work well.

Please apply, thanks.

Signed-off-by: Pozsar Balazs <pozsy@uhulinux.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ueagle-atm.c needs sched.h
Randy Dunlap [Fri, 16 Feb 2007 09:47:33 +0000 (01:47 -0800)]
USB: ueagle-atm.c needs sched.h

Driver needs sched.h for try_to_freeze().

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: at91_udc, shrink runtime footprint
David Brownell [Fri, 16 Feb 2007 02:47:17 +0000 (18:47 -0800)]
USB: at91_udc, shrink runtime footprint

This is a runtime codespace shrink:  in most cases, platform devices should
put probe() should in the init section, and remove() in the exit section.
And I have no idea why the module init/exit routines were mismarked.
It also moves one function table into read-only data.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousbnet: add missing Kconfig for KC2190 cables
David Brownell [Fri, 16 Feb 2007 05:32:31 +0000 (21:32 -0800)]
usbnet: add missing Kconfig for KC2190 cables

Hmm, I noticed that support for one of the USB host-to-host cables
never got fully merged ... Kconfig wouldn't show it!  Fixed.

Also, changed the CDC Subset default to 'y' so that more of these
cables will work out-of-the-box.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousbnet: init fault (oops) cleanup, whitespace fixes
David Brownell [Fri, 16 Feb 2007 02:52:30 +0000 (18:52 -0800)]
usbnet: init fault (oops) cleanup, whitespace fixes

This cleans up some error handling paths in usbnet device probing;
one of them could cause oopsing, e.g. with some RNDIS devices.

It also removes some extraneous whitespace.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousbnet: recognize SiteCom CN-124
David Brownell [Fri, 16 Feb 2007 02:50:01 +0000 (18:50 -0800)]
usbnet: recognize SiteCom CN-124

Add Sitecom CN-124 device IDs to ALI M5632 usb host-to-host cable;
device IDs from Francois Barre <francois.barre@gmail.com>

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousb: Remove Airprime device from option.c
Kevin Lloyd [Thu, 15 Feb 2007 21:32:13 +0000 (13:32 -0800)]
usb: Remove Airprime device from option.c

from: Kevin Lloyd <linux@sierrawireless.com>

This patch removes the Airprime 5220 device (branded as Audiovox) from
the option.c driver. This device is already supported by the sierra.c
driver.

This was based off of the option.c driver found in kernel 2.6.20-git11.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: change __init to __devinit for isp116x_probe
Prarit Bhargava [Fri, 9 Feb 2007 09:51:15 +0000 (01:51 -0800)]
USB: change __init to __devinit for isp116x_probe

Change __init to __devinit for isp116x_probe.

Resolves MODPOST warning:

WARNING: drivers/usb/host/isp116x-hcd.o - Section mismatch: reference to
.init.text:isp116x_probe from .data.rel.local between 'isp116x_driver' (at
offset 0x0) and 'isp116x_hc_driver'

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ps3: don't call ps3_system_bus_driver_register on other platforms
Ishizaki Kou [Wed, 14 Feb 2007 07:04:17 +0000 (16:04 +0900)]
USB: ps3: don't call ps3_system_bus_driver_register on other platforms

ps3_system_bus_driver_register is PS3 platform specific function.
On other platforms, it triggers WARN_ON in kref_get.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: hid-core.c: Removes GTCO CalComp Interwrite IPanel PIDs from blacklist
Jeremy Roberson [Wed, 14 Feb 2007 23:14:19 +0000 (16:14 -0700)]
USB: hid-core.c: Removes GTCO CalComp Interwrite IPanel PIDs from blacklist

Removes our GTCO CalComp Interwrite IPanels from the hid-core.c blacklist
because the HID Driver properly handles them.

Signed-off-by: Jeremy A. Roberson <jroberson@gtcocalcomp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: kernel-doc fixes
Randy Dunlap [Sat, 10 Feb 2007 22:41:41 +0000 (14:41 -0800)]
USB: kernel-doc fixes

Fix kernel-doc warnings and in USB core.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: quirky device for cdc-acm
Oliver Neukum [Mon, 12 Feb 2007 07:50:03 +0000 (08:50 +0100)]
USB: quirky device for cdc-acm

here's a quirklist entry reported by Stephen Murphy.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: cdc-acm: fix incorrect throtteling, make set_control optional
Oliver Neukum [Mon, 12 Feb 2007 07:41:35 +0000 (08:41 +0100)]
USB: cdc-acm: fix incorrect throtteling, make set_control optional

this is Joris' fixes reshuffelled and features renamed as David requested.

- acm_set_control is not mandatory, honour that
- throtteling is reset upon open
- throtteling is read consistently when processing input data

Signed-off-by: Joris van Rantwijk <jorispubl@xs4all.nl>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: unconfigure devices which have config 0
Alan Stern [Thu, 8 Feb 2007 21:40:43 +0000 (16:40 -0500)]
USB: unconfigure devices which have config 0

Some USB devices do have a configuration 0, in contravention of the
USB spec.  Normally 0 is supposed to indicate that a device is
unconfigured.

While we can't change what the device is doing, we can change usbcore.
This patch (as852) allows usb_set_configuration() to accept a config
value of -1 as indicating that the device should be unconfigured.  The
request actually sent to the device will still contain 0 as the value.
But even if the device does have a configuration 0, dev->actconfig
will be set to NULL and dev->state will be set to USB_STATE_ADDRESS.

Without some sort of special-case handling like this, there is no way
to unconfigure these non-compliant devices.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: make usb_iso_packet_descriptor.status signed
Pete Zaitcev [Sun, 11 Feb 2007 21:56:13 +0000 (13:56 -0800)]
USB: make usb_iso_packet_descriptor.status signed

The status in usb_iso_packet_descriptor should be signed, for the benefit
of someone who casts to a long or makes other benign misstep (the principle
of least surprise).

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix g_serial small error
Bryan O'Donoghue [Sat, 27 Jan 2007 12:16:32 +0000 (12:16 +0000)]
USB: fix g_serial small error

A SET_LINE_CODING control request should return a zero length packet
as an ACK to the host, during the status phase of a USB transaction.

The return value of gs_setup_class() is treated as the number of
bytes to write in the status phase of the control request, by
gs_setup(). For this case, the value returned by gs_setup_class should
be zero for SET_LINE_CODING but, right now, appears to be
sizeof(struct usb_cdc_line_coding).

However, if after doing the memcpy of the line coding descriptor we
set the variable "ret" to be zero, we should return the appropiate ZLP
to the host as an ACK in the status phase of the control request.
I've tested this out using Linux as both host and slave and confirmed
that the following small change fixes the spurious return of
sizeof(struct usb_cdc_line_coding)/wLength bytes in the status phase
of a USB_CDC_REQ_SET_LINE_CODING request. It's not a huge bug but, it
is worth fixing.

Signed-off-by: Bryan O'Donoghue <bodonoghue@codehermit.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: use __u32 rather than u32 in userspace ioctls in usbdevice_fs.h
Mike Frysinger [Tue, 6 Feb 2007 00:41:03 +0000 (16:41 -0800)]
USB: use __u32 rather than u32 in userspace ioctls in usbdevice_fs.h

Use __u32 rather than u32 in userspace ioctl defines.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB Storage: US_FL_IGNORE_RESIDUE needed for Aiptek MP3 Player
Dylan Taft [Tue, 6 Feb 2007 00:41:01 +0000 (16:41 -0800)]
USB Storage: US_FL_IGNORE_RESIDUE needed for Aiptek MP3 Player

Device will not work as a mass storage device without US_FL_IGNORE_RESIDUE.

I bought this mp3 player that takes SD cards here

http://www.aiptek.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=AX4&Category_Code=MP3&Store_Code=AS

I can provide the errors in dmesg, if necessary, but this flag was
determined as necessary by doing a quick google on the errors that were
shown in dmesg.

Signed-off-by: Dylan Taft <d13f00l@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: Fix misspelled "USBNET_MII" kernel config option.
Robert P. J. Day [Tue, 6 Feb 2007 00:41:02 +0000 (16:41 -0800)]
USB: Fix misspelled "USBNET_MII" kernel config option.

Fix the misspelling of "USBNET_MII" to "USB_USBNET_MII".

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: input: HID: add CIDC USB device to HID blacklist
Zheng XiaoJun [Tue, 6 Feb 2007 00:40:57 +0000 (16:40 -0800)]
USB: input: HID: add CIDC USB device to HID blacklist

Add CIDC USB device to HID blacklist since it is actually a USB token
and has its own driver.

Signed-off-by: Zheng XiaoJun <zhengxiaojun@hsic.com.cn>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: USB_RTL8150 must select MII
Adrian Bunk [Tue, 6 Feb 2007 00:40:57 +0000 (16:40 -0800)]
USB: USB_RTL8150 must select MII

USB_RTL8150 must select MII to avoid link errors.

Stolen from a patch by Randy Dunlap.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB Storage: indistinguishable devices with broken and unbroken firmware
Oliver Neukum [Thu, 8 Feb 2007 08:04:48 +0000 (09:04 +0100)]
USB Storage: indistinguishable devices with broken and unbroken firmware

there's a USB mass storage device which exists in two version. One
reports the correct size and the other does not. Apart from that they
are identical and cannot be told apart. Here's a heuristic based on the
empirical finding that drives have even sizes.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>