platform/adaptation/renesas_rcar/renesas_kernel.git
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Thu, 8 Feb 2007 03:32:36 +0000 (19:32 -0800)]
Merge /pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (23 commits)
  ide-acpi support warning fix
  ACPI support for IDE devices
  IDE Driver for Delkin/Lexar/etc.. cardbus CF adapter
  ide: it8213 IDE driver update (version 2)
  ide: add it8213 IDE driver
  tc86c001: add missing __init tag for tc86c001_ide_init()
  tc86c001: mark init_chipset_tc86c001() with __devinit tag
  tc86c001: init_hwif_tc86c001() can be static
  ide: add Toshiba TC86C001 IDE driver (take 2)
  pdc202xx_new: remove check_in_drive_lists abomination
  pdc202xx_new: remove useless code
  slc90e66: carry over fixes from piix driver
  piix: tuneproc() fixes/cleanups
  piix: fix 82371MX enablebits
  hpt366: HPT36x PCI clock detection fix
  hpt366: init code rewrite
  hpt366: clean up DMA timeout handling for HPT370
  hpt366: merge HPT37x speedproc handlers
  hpt366: cache channel's MCR address
  hpt366: switch to using pci_get_slot
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
Linus Torvalds [Thu, 8 Feb 2007 03:23:44 +0000 (19:23 -0800)]
Merge /pub/scm/linux/kernel/git/gregkh/pci-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (41 commits)
  Revert "PCI: remove duplicate device id from ata_piix"
  msi: Make MSI useable more architectures
  msi: Kill the msi_desc array.
  msi: Remove attach_msi_entry.
  msi: Fix msi_remove_pci_irq_vectors.
  msi: Remove msi_lock.
  msi: Kill msi_lookup_irq
  MSI: Combine pci_(save|restore)_msi/msix_state
  MSI: Remove pci_scan_msi_device()
  MSI: Replace pci_msi_quirk with calls to pci_no_msi()
  PCI: remove duplicate device id from ipr
  PCI: remove duplicate device id from ata_piix
  PCI: power management: remove noise on non-manageable hw
  PCI: cleanup MSI code
  PCI: make isa_bridge Alpha-only
  PCI: remove quirk_sis_96x_compatible()
  PCI: Speed up the Intel SMBus unhiding quirk
  PCI Quirk: 1k I/O space IOBL_ADR fix on P64H2
  shpchp: delete trailing whitespace
  shpchp: remove DBG_XXX_ROUTINE
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Thu, 8 Feb 2007 03:23:21 +0000 (19:23 -0800)]
Merge /pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (70 commits)
  USB: remove duplicate device id from zc0301
  USB: remove duplicate device id from usb_storage
  USB: remove duplicate device id from keyspan
  USB: remove duplicate device id from ftdi_sio
  USB: remove duplicate device id from visor
  USB: a bit more coding style cleanup
  usbcore: trivial whitespace fixes
  usb-storage: use first bulk endpoints, not last
  EHCI: fix interrupt-driven remote wakeup
  USB: switch ehci-hcd to new polling scheme
  USB: autosuspend for usb printer driver
  USB Input: Added kernel module to support all GTCO CalComp USB InterWrite School products
  USB: Sierra Wireless auto set D0
  USB: usb ethernet gadget recognizes HUSB2DEV
  USB: list atmel husb2_udc gadget controller
  USB: gadgetfs AIO tweaks
  USB: gadgetfs behaves better on userspace init bug
  USB: gadgetfs race fix
  USB: gadgetfs simplifications
  USB: gadgetfs cleanups
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Thu, 8 Feb 2007 03:22:26 +0000 (19:22 -0800)]
Merge /pub/scm/linux/kernel/git/gregkh/driver-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (28 commits)
  sysfs: Shadow directory support
  Driver Core: Increase the default timeout value of the firmware subsystem
  Driver core: allow to delay the uevent at device creation time
  Driver core: add device_type to struct device
  Driver core: add uevent vars for devices of a class
  SYSFS: Fix missing include of list.h in sysfs.h
  HOWTO: Add a reference to Harbison and Steele
  sysfs: error handling in sysfs, fill_read_buffer()
  kobject: kobject_put cleanup
  sysfs: kobject_put cleanup
  sysfs: suppress lockdep warnings
  Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()
  driver core: Change function call order in device_bind_driver().
  driver core: Don't stop probing on ->probe errors.
  driver core fixes: device_register() retval check in platform.c
  driver core fixes: make_class_name() retval checks
  /sys/modules/*/holders
  USB: add the sysfs driver name to all modules
  SERIO: add the sysfs driver name to all modules
  PCI: add the sysfs driver name to all modules
  ...

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Thu, 8 Feb 2007 03:21:56 +0000 (19:21 -0800)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (116 commits)
  sk98lin: planned removal
  AT91: MACB support
  sky2: version 1.12
  sky2: add new chip ids
  sky2: Yukon Extreme support
  sky2: safer transmit timeout
  sky2: TSO support for EC_U
  sky2: use dev_err for error reports
  sky2: add Wake On Lan support
  fix unaligned exception in /drivers/net/wireless/orinoco.c
  Remove unused kernel config option DLCI_COUNT
  z85230: spinlock logic
  mips: declance: Driver model for the PMAD-A
  Spidernet: Rework RX linked list
  NET: turn local_save_flags() + local_irq_disable() into local_irq_save()
  NET-3c59x: turn local_save_flags() + local_irq_disable() into local_irq_save()
  hp100: convert pci_module_init() to pci_register_driver()
  NetXen: Added ethtool support for user level tools.
  NetXen: Firmware crb init changes.
  maintainers: add atl1 maintainers
  ...

17 years agoRevert "PCI: remove duplicate device id from ata_piix"
Greg Kroah-Hartman [Thu, 8 Feb 2007 00:17:27 +0000 (16:17 -0800)]
Revert "PCI: remove duplicate device id from ata_piix"

This reverts commit b11056355ea149c37edf0ef54976a49f5258cd54.

It was incorrect, the proper fix is coming through the SATA tree, sorry
about that.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosk98lin: planned removal
Stephen Hemminger [Wed, 7 Feb 2007 17:18:30 +0000 (09:18 -0800)]
sk98lin: planned removal

Document planned removal of sk98lin driver.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoAT91: MACB support
Andrew Victor [Wed, 7 Feb 2007 15:40:44 +0000 (16:40 +0100)]
AT91: MACB support

The Atmel MACB Ethernet peripheral is also integrated in the AT91SAM9260
and AT91SAM9263 processors.  The differences from the AVR32 version are:
      * Single peripheral clock.
      * MII/RMII selection bit is inverted.
      * Clock enable bit.

Original patch from Patrice Vilchez.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: version 1.12
Stephen Hemminger [Tue, 6 Feb 2007 18:45:45 +0000 (10:45 -0800)]
sky2: version 1.12

Updated version for WOL and new id's

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: add new chip ids
Stephen Hemminger [Tue, 6 Feb 2007 18:45:44 +0000 (10:45 -0800)]
sky2: add new chip ids

More new chip id's from vendor driver version 10.0.4.3

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: Yukon Extreme support
Stephen Hemminger [Tue, 6 Feb 2007 18:45:43 +0000 (10:45 -0800)]
sky2: Yukon Extreme support

This is basic support for the new Yukon Extreme
chip, extracted from the new vendor driver 10.0.4.3.

Since this is untested hardware, it has a big fat warning for now.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: safer transmit timeout
Stephen Hemminger [Tue, 6 Feb 2007 18:45:42 +0000 (10:45 -0800)]
sky2: safer transmit timeout

Rather than trying to be "smart" about possible transmit timeout
causes. Just clear all pending frames and reset the PHY.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: TSO support for EC_U
Stephen Hemminger [Tue, 6 Feb 2007 18:45:41 +0000 (10:45 -0800)]
sky2: TSO support for EC_U

The Yukon EC_U chipset apparently supports TSO but only for non-Jumbo
frame sizes because it lacks a Ram buffer.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: use dev_err for error reports
Stephen Hemminger [Tue, 6 Feb 2007 18:45:40 +0000 (10:45 -0800)]
sky2: use dev_err for error reports

Use the standard dev_xxx functions instead of printk directly for
error reports. Fix a bug where the initialization would return 0
if allocation of network device failed.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agomsi: Make MSI useable more architectures
Eric W. Biederman [Sun, 28 Jan 2007 19:56:37 +0000 (12:56 -0700)]
msi: Make MSI useable more architectures

The arch hooks arch_setup_msi_irq and arch_teardown_msi_irq are now
responsible for allocating and freeing the linux irq in addition to
setting up the the linux irq to work with the interrupt.

arch_setup_msi_irq now takes a pci_device and a msi_desc and returns
an irq.

With this change in place this code should be useable by all platforms
except those that won't let the OS touch the hardware like ppc RTAS.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomsi: Kill the msi_desc array.
Eric W. Biederman [Sun, 28 Jan 2007 19:52:03 +0000 (12:52 -0700)]
msi: Kill the msi_desc array.

We need to be able to get from an irq number to a struct msi_desc.
The msi_desc array in msi.c had several short comings the big one was
that it could not be used outside of msi.c.  Using irq_data in struct
irq_desc almost worked except on some architectures irq_data needs to
be used for something else.

So this patch adds a msi_desc pointer to irq_desc, adds the appropriate
wrappers and changes all of the msi code to use them.

The dynamic_irq_init/cleanup code was tweaked to ensure the new
field is left in a well defined state.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomsi: Remove attach_msi_entry.
Eric W. Biederman [Sun, 28 Jan 2007 19:47:52 +0000 (12:47 -0700)]
msi: Remove attach_msi_entry.

The attach_msi_entry has been reduced to a single simple assignment,
so for simplicity remove the abstraction and directory perform the
assignment.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomsi: Fix msi_remove_pci_irq_vectors.
Eric W. Biederman [Sun, 28 Jan 2007 19:45:54 +0000 (12:45 -0700)]
msi: Fix msi_remove_pci_irq_vectors.

Since msi_remove_pci_irq_vectors is designed to be called during
hotplug remove it is actively wrong to query the hardware and expect
meaningful results back.

To that end remove the pci_find_capability calls.  Testing
dev->msi_enabled and dev->msix_enabled gives us all of the information
we need.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomsi: Remove msi_lock.
Eric W. Biederman [Sun, 28 Jan 2007 19:44:21 +0000 (12:44 -0700)]
msi: Remove msi_lock.

With the removal of msi_lookup_irq all of the functions using msi_lock
operated on a single device and none of them could reasonably be
called on that device at the same time.

Since what little synchronization that needs to happen needs to happen
outside of the msi functions, msi_lock could never be contended and as
such is useless and just complicates the code.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomsi: Kill msi_lookup_irq
Eric W. Biederman [Sun, 28 Jan 2007 19:42:52 +0000 (12:42 -0700)]
msi: Kill msi_lookup_irq

The function msi_lookup_irq was horrible.  As a side effect of running
it changed dev->irq, and then the callers would need to change it
back.  In addition it does a global scan through all of the irqs,
which seems to be the sole justification of the msi_lock.

To remove the neede for msi_lookup_irq I added first_msi_irq to struct
pci_dev.  Then depending on the context I replaced msi_lookup_irq with
dev->first_msi_irq, dev->msi_enabled, or dev->msix_enabled.

msi_enabled and msix_enabled were already present in pci_dev for other
reasons.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoMSI: Combine pci_(save|restore)_msi/msix_state
Michael Ellerman [Thu, 25 Jan 2007 08:34:08 +0000 (19:34 +1100)]
MSI: Combine pci_(save|restore)_msi/msix_state

The PCI save/restore code doesn't need to care about MSI vs MSI-X, all
it really wants is to say "save/restore all MSI(-X) info for this device".

This is borne out in the code, we call the MSI and MSI-X save routines
side by side, and similarly with the restore routines.

So combine the MSI/MSI-X routines into pci_save_msi_state() and
pci_restore_msi_state(). It is up to those routines to decide what state
needs to be saved.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoMSI: Remove pci_scan_msi_device()
Michael Ellerman [Thu, 25 Jan 2007 08:34:08 +0000 (19:34 +1100)]
MSI: Remove pci_scan_msi_device()

pci_scan_msi_device() doesn't do anything anymore, so remove it.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoMSI: Replace pci_msi_quirk with calls to pci_no_msi()
Michael Ellerman [Thu, 25 Jan 2007 08:34:07 +0000 (19:34 +1100)]
MSI: Replace pci_msi_quirk with calls to pci_no_msi()

I don't see any reason why we need pci_msi_quirk, quirk code can just
call pci_no_msi() instead.

Remove the check of pci_msi_quirk in msi_init(). This is safe as all
calls to msi_init() are protected by calls to pci_msi_supported(),
which checks pci_msi_enable, which is disabled by pci_no_msi().

The pci_disable_msi routines didn't check pci_msi_quirk, only
pci_msi_enable, but as far as I can see that was a bug not a feature.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: remove duplicate device id from ipr
Greg Kroah-Hartman [Fri, 26 Jan 2007 00:15:24 +0000 (16:15 -0800)]
PCI: remove duplicate device id from ipr

As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: remove duplicate device id from ata_piix
Greg Kroah-Hartman [Fri, 26 Jan 2007 00:15:24 +0000 (16:15 -0800)]
PCI: remove duplicate device id from ata_piix

As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: power management: remove noise on non-manageable hw
Pavel Machek [Tue, 16 Jan 2007 11:17:13 +0000 (12:17 +0100)]
PCI: power management: remove noise on non-manageable hw

Return early from pci_set_power_state() if hardware does not support
power management. This way, we do not generate noise in the logs.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: cleanup MSI code
Satoru Takeuchi [Thu, 18 Jan 2007 04:50:05 +0000 (13:50 +0900)]
PCI: cleanup MSI code

Cleanup MSI code as follows:

 - fix some types
 - fix strange local variable definition
 - delete unnecessary blank line
 - add comment to #endif which is far from corresponding #ifdef

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: make isa_bridge Alpha-only
Adrian Bunk [Sat, 6 Jan 2007 20:48:41 +0000 (21:48 +0100)]
PCI: make isa_bridge Alpha-only

Since isa_bridge is neither assigned any value !NULL nor used on !Alpha,
there's no reason for providing it.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: remove quirk_sis_96x_compatible()
Adrian Bunk [Sun, 14 Jan 2007 13:46:32 +0000 (14:46 +0100)]
PCI: remove quirk_sis_96x_compatible()

Since 2.6.0-test10, all quirk_sis_96x_compatible() had any effect on
was a printk().

This patch therefore removes it.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: Speed up the Intel SMBus unhiding quirk
Jean Delvare [Fri, 5 Jan 2007 10:23:15 +0000 (11:23 +0100)]
PCI: Speed up the Intel SMBus unhiding quirk

Speed up the Intel SMBus PCI quirk by avoiding tests which can only
fail. This also makes the compiled code significantly smaller when
using gcc 3.2/3.4. gcc 4.x appears to optimize the code by itself so
this change doesn't make a difference there.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI Quirk: 1k I/O space IOBL_ADR fix on P64H2
Daniel Yeisley [Thu, 21 Dec 2006 19:34:57 +0000 (14:34 -0500)]
PCI Quirk: 1k I/O space IOBL_ADR fix on P64H2

There's an existing quirk for the kernel to use 1k IO space granularity
on the Intel P64H2.  It turns out however that pci_setup_bridge() in
drivers/pci/setup-bus.c reads in the IO base and limit address register
masks it off to the nearest 4k, and writes it back.  This causes the
kernel to be on 1k boundaries and the hardware to be 4k aligned.  The
patch below fixes the problem.

Signed-off-by: Dan Yeisley <dan.yeisley@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoshpchp: delete trailing whitespace
Kenji Kaneshige [Tue, 9 Jan 2007 21:03:10 +0000 (13:03 -0800)]
shpchp: delete trailing whitespace

This patch deletes trailing white space in SHPCHP driver. This has no
functional change.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoshpchp: remove DBG_XXX_ROUTINE
Kenji Kaneshige [Tue, 9 Jan 2007 21:03:01 +0000 (13:03 -0800)]
shpchp: remove DBG_XXX_ROUTINE

This patch removes DBG_ENTER_ROUTINE, DBG_LEAVE_ROUTINE and related
code.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoshpchp: remove CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE
Kenji Kaneshige [Tue, 9 Jan 2007 21:02:48 +0000 (13:02 -0800)]
shpchp: remove CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE

The CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE config option is not
needed because polling mechanism for shpc hotplug events can be
enabled through module option 'shpchp_poll_mode'. This patch removes
CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCIEHP: Add Electro Mechanical Interlock (EMI) support to the PCIE hotplug driver.
Kristen Carlson Accardi [Tue, 9 Jan 2007 21:02:36 +0000 (13:02 -0800)]
PCIEHP: Add Electro Mechanical Interlock (EMI) support to the PCIE hotplug driver.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopciehp: fix wait command completion
Kenji Kaneshige [Fri, 22 Dec 2006 01:01:10 +0000 (17:01 -0800)]
pciehp: fix wait command completion

This patch fixes this problem that pciehp driver will sleep
unnecessarily long when waiting for command completion. With this
patch, modprobe pciehp driver becomes very faster as follows for
instance.

  o Without this patch
    # time /sbin/modprobe pciehp

    real    0m4.976s
    user    0m0.000s
    sys     0m0.004s

  o With this patch
    # time /sbin/modprobe pciehp

    real    0m0.640s
    user    0m0.000s
    sys     0m0.004s

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopciehp: cleanup wait command completion
Kenji Kaneshige [Fri, 22 Dec 2006 01:01:09 +0000 (17:01 -0800)]
pciehp: cleanup wait command completion

This patch cleans up the code to wait for command completion.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopciehp: remove unused pcie_cap_base
Kenji Kaneshige [Fri, 22 Dec 2006 01:01:08 +0000 (17:01 -0800)]
pciehp: remove unused pcie_cap_base

This patch removes unused pcie_cap_base variable.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopciehp: cleanup pciehp.h
Kenji Kaneshige [Fri, 22 Dec 2006 01:01:07 +0000 (17:01 -0800)]
pciehp: cleanup pciehp.h

This patch cleans up pciehp.h. This has no functional change.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopciehp: cleanup register access
Kenji Kaneshige [Fri, 22 Dec 2006 01:01:06 +0000 (17:01 -0800)]
pciehp: cleanup register access

This patch cleans up register access functions. This has no functional
change.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopciehp: remove unused pci_bus from struct controller
Kenji Kaneshige [Fri, 22 Dec 2006 01:01:05 +0000 (17:01 -0800)]
pciehp: remove unused pci_bus from struct controller

This patch removes unused pci_bus member from struct controller.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopciehp: remove unnecessary php_ctlr
Kenji Kaneshige [Fri, 22 Dec 2006 01:01:04 +0000 (17:01 -0800)]
pciehp: remove unnecessary php_ctlr

The struct php_ctlr seems to be only for complicating codes. This
patch removes struct php_ctlr and related codes.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopciehp: cleanup slot list
Kenji Kaneshige [Fri, 22 Dec 2006 01:01:03 +0000 (17:01 -0800)]
pciehp: cleanup slot list

This patch cleans up slot list handling (use list_head). This has no
functional change.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopciehp: cleanup init_slot()
Kenji Kaneshige [Fri, 22 Dec 2006 01:01:02 +0000 (17:01 -0800)]
pciehp: cleanup init_slot()

This patch cleans up init_slots() in pciehp_core.c based on
pcihp_skeleton.c. This has no functional change.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: mark pci_find_device() as __deprecated
Adrian Bunk [Sat, 18 Nov 2006 00:06:29 +0000 (01:06 +0100)]
PCI: mark pci_find_device() as __deprecated

On Fri, Nov 17, 2006 at 09:32:36AM -0500, Alan Cox wrote:
>
> Soon we should deprecate pci_find_device as well

So let's mark it as __deprecated now, which also has the side effect
that noone can later whine that removing it might break some shiny
external modules.

Oh, and if anything starts complaining "But this adds some warnings to
my kernel build!", he should either first fix the 200 kB (sic) of
warnings I'm getting in 2.6.19-rc5-mm2 starting at MODPOST or go to hell.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: remove pci_find_device_reverse()
Adrian Bunk [Fri, 17 Nov 2006 14:21:45 +0000 (15:21 +0100)]
PCI: remove pci_find_device_reverse()

This patch removes the no longer used pci_find_device_reverse().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: quirks.c: cleanup
Adrian Bunk [Tue, 19 Dec 2006 04:13:15 +0000 (05:13 +0100)]
PCI: quirks.c: cleanup

This patch contains the following cleanups:
- move all EXPORT_SYMBOL's directly below the code they are exporting
- move all DECLARE_PCI_FIXUP_*'s directly below the functions they
  are calling

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: Use newly defined PCI channel offline routine
Linas Vepstas [Wed, 13 Dec 2006 00:29:15 +0000 (18:29 -0600)]
PCI: Use newly defined PCI channel offline routine

Use newly minted routine to access the PCI channel state.

Signed-off-by: Linas Vepstas <linas@linas.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: define inline for test of channel error state
Linas Vepstas [Tue, 12 Dec 2006 22:55:59 +0000 (16:55 -0600)]
PCI: define inline for test of channel error state

Add very simple routine to indicate the pci channel error state.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI : Add selected_regions funcs
Hidetoshi Seto [Mon, 18 Dec 2006 01:31:06 +0000 (10:31 +0900)]
PCI : Add selected_regions funcs

This patch adds the following changes into generic PCI code especially
for PCI legacy I/O port free drivers.

     - Added new pci_request_selected_regions() and
       pci_release_selected_regions() for PCI legacy I/O port free
       drivers in order to request/release only the selected regions.

     - Added helper routine pci_select_bars() which makes proper mask
       of BARs from the specified resource type. This would be very
       helpful for users of pci_enable_device_bars().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI : add extremely specialized __pci_reenable_device for default resume
Hidetoshi Seto [Mon, 18 Dec 2006 01:30:00 +0000 (10:30 +0900)]
PCI : add extremely specialized __pci_reenable_device for default resume

Original patch was posted as "PCI : Move pci_fixup_device and is_enabled".
This 3 of 3 patches does:

  - add __pci_reenable_device
    (recover former change of 1st patch)

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI : Move pci_fixup_device and is_enabled (originally intended change)
Hidetoshi Seto [Mon, 18 Dec 2006 01:28:43 +0000 (10:28 +0900)]
PCI : Move pci_fixup_device and is_enabled (originally intended change)

Original patch was posted as "PCI : Move pci_fixup_device and is_enabled".
This 2 of 3 patches does:

  - Move pci_fixup_device and enable_cnt
    (originally intended change)

  - relocate pci_fixup_device
    (recover latter change of 1st patch)

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI : remove too specialized __pci_enable_device for default resume
Hidetoshi Seto [Mon, 18 Dec 2006 01:27:45 +0000 (10:27 +0900)]
PCI : remove too specialized __pci_enable_device for default resume

Original patch was posted as "PCI : Move pci_fixup_device and is_enabled".
This 1 of 3 patches does:

  - reverts small part of Inaky's patch
    (remove __pci_enable_device)
    This change will be recovered by 3rd patch.

  - temporarily remove pci_fixup_device.
    This change will be recovered by 2nd patch.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: check szhi when sz is 0 when 64 bit iomem bigger than 4G
Yinghai Lu [Wed, 29 Nov 2006 21:53:10 +0000 (13:53 -0800)]
PCI: check szhi when sz is 0 when 64 bit iomem bigger than 4G

For pci mem resource that size is bigger than 4G, the sz returned by
pc_size will be 0.
So that resource is skipped, and register contained hi address will be
treated as another 32bit resource. We need to use sz64 and pci_sz64 for
64 bit resource for clear logical.  Typical usages for this: Opteron
system with co-processor and the co-processor could take more than 4G
RAM as pre-fetchable mem resource.

Signed-off-by: Yinghai Lu <yinghai.lu@amd.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosky2: add Wake On Lan support
Stephen Hemminger [Tue, 6 Feb 2007 18:45:39 +0000 (10:45 -0800)]
sky2: add Wake On Lan support

Adds basic magic packet wake on lan support to the sky2 driver.
Note: initial WOL value is based on BIOS settings.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agofix unaligned exception in /drivers/net/wireless/orinoco.c
Hennerich, Michael [Tue, 6 Feb 2007 00:41:35 +0000 (16:41 -0800)]
fix unaligned exception in /drivers/net/wireless/orinoco.c

Prevent an unaligned exception to occur.  (GCC 4.1) tmp is defined as char
pointer while it is later accessed as short.

Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoRemove unused kernel config option DLCI_COUNT
Robert P. J. Day [Tue, 6 Feb 2007 00:31:06 +0000 (16:31 -0800)]
Remove unused kernel config option DLCI_COUNT

Remove the unused kernel config option DLCI_COUNT.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Krzysztof Halasa {khc@pm.waw.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoz85230: spinlock logic
Alan Cox [Tue, 6 Feb 2007 00:31:03 +0000 (16:31 -0800)]
z85230: spinlock logic

At some point someone added a spin_lock(&dev->lock) to the IRQ handler for
the Z85230 driver.  This actually correctly fixes a bug but the necessary
changes to remove the chan->lock calls in the event handlers were not made
(c->lock is the same lock).

Simona Dascenzo reported the problem with the driver and this patch should
fix the problem he found.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agomips: declance: Driver model for the PMAD-A
Maciej W. Rozycki [Tue, 6 Feb 2007 00:28:27 +0000 (16:28 -0800)]
mips: declance: Driver model for the PMAD-A

This is a set of changes that converts the PMAD-A support to the driver model.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoSpidernet: Rework RX linked list
Linas Vepstas [Tue, 6 Feb 2007 00:29:43 +0000 (16:29 -0800)]
Spidernet: Rework RX linked list

Make the hardware perceive the RX descriptor ring as a null-terminated linked
list, instead of a circular ring.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoUSB: remove duplicate device id from zc0301
Greg Kroah-Hartman [Fri, 26 Jan 2007 00:15:24 +0000 (16:15 -0800)]
USB: remove duplicate device id from zc0301

As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: remove duplicate device id from usb_storage
Greg Kroah-Hartman [Fri, 26 Jan 2007 00:15:24 +0000 (16:15 -0800)]
USB: remove duplicate device id from usb_storage

As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: remove duplicate device id from keyspan
Greg Kroah-Hartman [Fri, 26 Jan 2007 00:15:24 +0000 (16:15 -0800)]
USB: remove duplicate device id from keyspan

As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: remove duplicate device id from ftdi_sio
Greg Kroah-Hartman [Fri, 26 Jan 2007 00:15:24 +0000 (16:15 -0800)]
USB: remove duplicate device id from ftdi_sio

As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: remove duplicate device id from visor
Greg Kroah-Hartman [Fri, 26 Jan 2007 00:15:24 +0000 (16:15 -0800)]
USB: remove duplicate device id from visor

As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: a bit more coding style cleanup
Oliver Neukum [Thu, 25 Jan 2007 10:17:41 +0000 (11:17 +0100)]
USB: a bit more coding style cleanup

I was sitting in a train threatened to be blocked by ice. I took this
as a hint to do some more boring work for the common good. Here's
a bit more for coding style.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousbcore: trivial whitespace fixes
Oliver Neukum [Tue, 23 Jan 2007 20:55:28 +0000 (15:55 -0500)]
usbcore: trivial whitespace fixes

This patch (as844) makes some trivial whitespace fixes to a few files
in usbcore.  Oliver did most of the work and Alan added some tidying up.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousb-storage: use first bulk endpoints, not last
Alan Stern [Mon, 22 Jan 2007 16:58:34 +0000 (11:58 -0500)]
usb-storage: use first bulk endpoints, not last

According to the Bulk-Only spec, usb-storage is supposed to use the
_first_ bulk-in and bulk-out endpoints it finds, not the _last_.  And
while we're at it, we ought to test the direction of the interrupt
endpoint as well.  This patch (as842) makes both changes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoEHCI: fix interrupt-driven remote wakeup
Alan Stern [Mon, 22 Jan 2007 21:08:53 +0000 (16:08 -0500)]
EHCI: fix interrupt-driven remote wakeup

Now that port status change notifications are interrupt-driven,
ehci-hcd needs to tell usbcore when a remote-wakeup resume operation
is finished -- we can no longer rely on the core to poll and find
out.  This patch (as843) uses the root-hub status timer to force a
poll after the resume is complete.

The patch also changes the test for detecting when the TDRSMDN resume
period has expired.  It's necessary to use time_after_eq() instead of
time_after(), since the polling is triggered precisely by a timer.
The same change is made for TDRSTR reset expiration, for consistency.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: switch ehci-hcd to new polling scheme
Marcelo Tosatti [Sun, 21 Jan 2007 21:45:59 +0000 (19:45 -0200)]
USB: switch ehci-hcd to new polling scheme

Switch ehci-hcd to use the new polling scheme, which reports root
hub status changes via the interrupt handler, in an asynchronous
fashion. Doing so disables polling for status changes (whose handler is
rh_timer_func).

Tested on a Geode GX machine, which is now capable of running at =~ 5
timer interrupts per second (in the -rt tree), resulting in significant
power savings.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: autosuspend for usb printer driver
Oliver Neukum [Thu, 18 Jan 2007 14:06:07 +0000 (15:06 +0100)]
USB: autosuspend for usb printer driver

this implements autosuspend for usb printers. It compiles and is tested.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB Input: Added kernel module to support all GTCO CalComp USB InterWrite School...
Jeremy Roberson [Thu, 18 Jan 2007 15:10:25 +0000 (08:10 -0700)]
USB Input: Added kernel module to support all GTCO CalComp USB InterWrite School products

Added a kernel module (gtco) to the USB Input subsystem.  This kernel
module adds support for all GTCO CalComp USB InterWrite School products.

Signed-off-by: Jeremy A. Roberson <jroberson@gtcocalcomp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: Sierra Wireless auto set D0
Kevin Lloyd [Thu, 18 Jan 2007 00:04:18 +0000 (16:04 -0800)]
USB: Sierra Wireless auto set D0

This patch ensures that the device is turned on when inserted into the system.
It also adds more VID/PIDs and matches the N_OUT_URB with the airprime driver.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: usb ethernet gadget recognizes HUSB2DEV
Håvard Skinnemoen [Mon, 27 Feb 2006 17:15:04 +0000 (18:15 +0100)]
USB: usb ethernet gadget recognizes HUSB2DEV

Define DEV_CONFIG_CDC when compiling for HUSB2DEV.

From: Håvard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: list atmel husb2_udc gadget controller
Håvard Skinnemoen [Wed, 17 Jan 2007 19:03:29 +0000 (11:03 -0800)]
USB: list atmel husb2_udc gadget controller

This identifies the driver for the Atmel HUSB2 Device Controller,
as integrated into the first AVR32 chip, the AT32AP700.

From: Håvard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: gadgetfs AIO tweaks
Alan Stern [Wed, 17 Jan 2007 07:28:48 +0000 (23:28 -0800)]
USB: gadgetfs AIO tweaks

This patch (as837) fixes several mistakes in the AIO interface of the
gadgetfs driver:

The ki_retry method is not supposed to do a put on the kiocb.
The extra call to aio_put_req() causes memory corruption.
(Note: This call was removed before, by patch as691, and then
mysteriously re-introduced later.)

Even if a read transfer is cancelled, we can and should send
to the user all the data that did manage to get transferred.

Testing for AIO cancellation in the I/O completion handler
is both racy and (now) unnecessary.  aio_complete() does its
own checking, in a safe manner.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: gadgetfs behaves better on userspace init bug
David Brownell [Wed, 17 Jan 2007 07:06:07 +0000 (23:06 -0800)]
USB: gadgetfs behaves better on userspace init bug

Resolve an initizlization issue that could come up if the userspace
driver wrote invalid descriptors to a dual-speed device.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: gadgetfs race fix
David Brownell [Wed, 17 Jan 2007 06:56:26 +0000 (22:56 -0800)]
USB: gadgetfs race fix

This resolves a race in gadgetfs associated with changing device/ep0
when processing control requests.  The fix is to change that state
earlier, when the control response is issued, so there's no window
in which userspace could see the wrong state; and enlarge the scope
of the spinlock during the ep0 request completion handler.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: gadgetfs simplifications
David Brownell [Wed, 17 Jan 2007 06:53:58 +0000 (22:53 -0800)]
USB: gadgetfs simplifications

This simplifies event reading by eliminating arithmetic and being
more direct/obvious, and tweaks some debug messages slightly.
The math elimination will change timings, sometimes enough to
allow a race to appear.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: gadgetfs cleanups
David Brownell [Wed, 17 Jan 2007 06:51:04 +0000 (22:51 -0800)]
USB: gadgetfs cleanups

Minor gadgetfs cleanups:

 - EP0 state constants become consistently STATE_DEV_* rather than
   sometimes omitting the "DEV_"; STATE_EP_* were already consistent.

 - Comment that ep0 state is protected by the spinlock, and update
   code that was neglecting that rule.

None of this is expected to change behavior.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: race fixes for usb-serial, step 3
Oliver Neukum [Sat, 13 Jan 2007 06:32:27 +0000 (07:32 +0100)]
USB: race fixes for usb-serial, step 3

- fix an error code returned if a device has been disconnected

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: race fixes for usb-serial, step 2
Oliver Neukum [Sat, 13 Jan 2007 06:31:27 +0000 (07:31 +0100)]
USB: race fixes for usb-serial, step 2

- take BKL before looking up a driver to associate with a device to make
  sure the module is not unloaded after looking up but before association
  & bumping module count

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: race fixes for usb-serial step 1
Oliver Neukum [Sat, 13 Jan 2007 06:29:26 +0000 (07:29 +0100)]
USB: race fixes for usb-serial step 1

- introduce a spinlock for serial_table to eliminate the window between
  looking up a device and getting a reference
- delay inscription of a new device into serial_table until it is fully
  initialised
- make sure disconnect() kills all URBs to avoid leckage across a soft unbind

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agofix for bugzilla #7544 (keyspan USB-to-serial converter)
Rainer Weikusat [Wed, 3 Jan 2007 14:36:25 +0000 (15:36 +0100)]
fix for bugzilla #7544 (keyspan USB-to-serial converter)

At least the Keyspan USA-19HS USB-to-serial converter supports
two different configurations, one where the input endpoints
have interrupt transfer type and one where they are bulk endpoints.
The default UHCI configuration uses the interrupt input endpoints.
The keyspan driver, OTOH, assumes that the device has only bulk
endpoints (all URBs are initialized by calling usb_fill_bulk_urb
in keyspan.c/ keyspan_setup_urb). This causes the interval field
of the input URBs to have a value of zero instead of one, which
'accidentally' worked with Linux at least up to 2.6.17.11 but
stopped to with 2.6.18, which changed the UHCI support code handling
URBs for interrupt endpoints. The patch below modifies to driver to
initialize its input URBs either as interrupt or as bulk URBs,
depending on the transfertype contained in the associated endpoint
descriptor (only tested with the default configuration) enabling
the driver to again receive data from the serial converter.

Greg K-H reworked the patch.

Signed-off-by: Rainer Weikusat <rweikusat@sncag.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: total removal of multithreaded probing in usb
Oliver Neukum [Thu, 11 Jan 2007 13:35:50 +0000 (14:35 +0100)]
USB: total removal of multithreaded probing in usb

The whole approach is simply wrong.  Forking a thread means that
  - errors are ignored
  - locking is ignored

Doing this correctly would require major surgery for questionable benefit.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: at91_udc wakeup event updates
David Brownell [Tue, 16 Jan 2007 20:46:39 +0000 (12:46 -0800)]
USB: at91_udc wakeup event updates

This updates the AT91 UDC driver's handling of wakeup events:

 - Fix a bug in the original scheme, which was never updated after
   the {enable,disable}_irq_wake() semantics were updated to address
   refcounting issues (i.e. behave for shared irqs).

 - Couple handling of both type of wakeup events, to be more direct.  The
   controller can be source of wakeup events for cases like bus reset
   and USB resume.  On some boards, VBUS sensing is also IRQ driven.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoEHCI: force high-speed devices to run at full speed
Alan Stern [Tue, 16 Jan 2007 16:59:45 +0000 (11:59 -0500)]
EHCI: force high-speed devices to run at full speed

This patch (as710) adds a sysfs class-device attribute file named
"companion" for EHCI controllers.  The file contains a list of port
numbers that are dedicated to the companion controller; by writing a
port number to the file the user can force a high-speed device
attached directly to the computer to run at full speed.  (As far as I
know it is not possible to do this for a device attached to an
external hub.)  A port is removed from the file by writing the
negative of its port number.

Several users have asked for this facility and it seems like a useful
thing to have.  Every now and then one runs across a device which
behaves much better at full speed than at high speed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoEHCI: don't hide ports owned by the companion
Alan Stern [Tue, 16 Jan 2007 16:58:47 +0000 (11:58 -0500)]
EHCI: don't hide ports owned by the companion

This patch (as709) changes the way ehci-hcd presents port status
values for ports owned by the companion controller.  It no longer
hides the information; in particular, it allows the core to see the
disconnect event that occurs when a full- or low-speed device is
switched over to the companion.  This is required for the next patch
in this series.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoEHCI: local variable for port status register
Alan Stern [Tue, 16 Jan 2007 16:58:00 +0000 (11:58 -0500)]
EHCI: local variable for port status register

This patch (as708) introduces a local variable to hold the port
status-register address in ehci-hub.c.  There's not much improvement
in the object code, but it sure is a lot easier to read.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousbcore: remove unused bandwith-related code
Alan Stern [Tue, 16 Jan 2007 16:57:13 +0000 (11:57 -0500)]
usbcore: remove unused bandwith-related code

This patch (as841) removes from usbcore a couple of support routines
meant to help with bandwidth allocation.  With the changes to uhci-hcd
in the previous patch, these routines are no longer used anywhere.
Also removed is the CONFIG_USB_BANDWIDTH option; it no longer does
anything and is no longer needed since the HCDs now handle bandwidth
issues correctly.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUHCI: fix bandwidth allocation
Alan Stern [Tue, 16 Jan 2007 16:56:32 +0000 (11:56 -0500)]
UHCI: fix bandwidth allocation

This patch (as840) fixes the bandwidth allocation mechanism in
uhci-hcd.  It has never worked correctly.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ps3 ohci bus glue
Geoff Levand [Tue, 16 Jan 2007 04:12:10 +0000 (20:12 -0800)]
USB: ps3 ohci bus glue

USB OHCI driver bus glue for the PS3 game console.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ohci error handling cleanup
Benjamin Herrenschmidt [Tue, 16 Jan 2007 04:12:06 +0000 (20:12 -0800)]
USB: ohci error handling cleanup

Restructure the ohci_hcd_mod_init error handling code in to better support
the multiple platform drivers.  This does not change the functionality.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ps3 controller hid quirk
Geoff Levand [Tue, 16 Jan 2007 04:11:52 +0000 (20:11 -0800)]
USB: ps3 controller hid quirk

Add the USB HID quirk HID_QUIRK_SONY_PS3_CONTROLLER.  This sends an
HID_REQ_GET_REPORT to the the PS3 controller to put the device into
'operational mode'.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ps3 ehci bus glue
Geoff Levand [Tue, 16 Jan 2007 04:11:47 +0000 (20:11 -0800)]
USB: ps3 ehci bus glue

USB EHCI driver bus glue for the PS3 game console.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: better ethtool support for kaweth
Oliver Neukum [Tue, 16 Jan 2007 11:01:26 +0000 (12:01 +0100)]
USB: better ethtool support for kaweth

this implements enough ethtool support to make NetworkManager happy.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: power management for kaweth
Oliver Neukum [Tue, 16 Jan 2007 08:47:12 +0000 (09:47 +0100)]
USB: power management for kaweth

- implements suspend when the network interface is down
- fixes a typo in comments
- adds debugging output for power management
- fixes a compiler warning

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousb: gadgetfs remove delayed init mode
Phil Endecott [Mon, 15 Jan 2007 19:35:01 +0000 (11:35 -0800)]
usb: gadgetfs remove delayed init mode

Gadgetfs had a mode in which endpoint descriptors were written by the user
program before connection.  This mode had some bugs, and hasn't seen much
(if any) use.  This patch removes that mode, leaving the mode of operation
where the user program waits for endpoint 0 to report a SET_CONFIGURATION,
and only then configures the endpoints.

From: "Phil Endecott" <spam_from_usb_devel@chezphil.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agousb: gadgetfs whitespace cleanup
David Brownell [Mon, 15 Jan 2007 19:30:28 +0000 (11:30 -0800)]
usb: gadgetfs whitespace cleanup

Remove some whitespace bugs in gadgetfs (mostly from someone's
patch updating the AIO support).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ohci-at91 refcount fix for irq wake enables
Marc Pignat [Tue, 9 Jan 2007 22:00:11 +0000 (14:00 -0800)]
USB: ohci-at91 refcount fix for irq wake enables

The attached patch fixes the unbalanced calls to enable_irq_wake() and
disable_irq_wake() in the AT91 USB Host driver.

It should resolve these kernel messages:
  Unbalanced IRQ x wake disable
  BUG: warning at kernel/irq/manage.c:167/set_irq_wake()

(The original code was debugged before a bug in the genirq wakeup irq
logic was fixed by adding the IRQ wake enable/disable refcounting.
Not all code yet uses the bugfixed model.)

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>