Commit graph

10997 commits

Author SHA1 Message Date
David Brownell 5edbfb7c8a [PATCH] stop exporting two functions
The way we're looking at USB suspend lately doesn't expect drivers to
call usb_suspend_device() or usb_resume_device() directly; that'll
be implicit when no interfaces are in use.

This patch removes those APIs from visibility outside usbcore.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

 drivers/usb/core/hub.c |   12 ++++--------
 drivers/usb/core/usb.h |    4 ++++
 include/linux/usb.h    |    5 -----
 3 files changed, 8 insertions(+), 13 deletions(-)
2005-10-28 16:47:41 -07:00
David Brownell ccdcf77ae3 [PATCH] ISP116x PM updates
This makes the isp116x driver stop using usb_suspend_device() and
usb_resume_device() ... usbcore now calls to the root hub methods,
removing the need for this.  It also switches from keventd to khubd
for remote wakeup.  (Compile tested.)

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

 drivers/usb/host/isp116x-hcd.c |   29 ++++-------------------------
 drivers/usb/host/isp116x.h     |    1 -
 2 files changed, 4 insertions(+), 26 deletions(-)
2005-10-28 16:47:41 -07:00
David Brownell a7f72abe8f [PATCH] UHCI PM updates
This removes suspend and resume path recursion in UHCI.

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

 drivers/usb/host/uhci-hcd.c |    9 ---------
 1 file changed, 9 deletions(-)
2005-10-28 16:47:40 -07:00
David Brownell f2cb36c1df [PATCH] update PCI early-handoff handling for OHCI
The PCI "early usb handoff" quirk logic didn't work like "ohci-hcd" ...
This patch makes it do so by:

  - Resetting the controller after kicking BIOS off, matching the
    normal "chip in hardware reset" startup mode;

  - Reporting any BIOS that borks this simple handoff; it's likely
    got a few other surprises for us too.

  - Ignoring that handoff on HPPA;

The diagnostic string is mostly shared with EHCI, saving a few bytes.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/pci-quirks.c |   22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)
2005-10-28 16:47:40 -07:00
David Brownell f197b2c54b [PATCH] OHCI PM updates
This simplifies the OHCI root hub suspend logic:

 - Uses new usbcore root hub calls to make autosuspend work again:
	* Uses a newish usbcore root hub wakeup mechanism,
	  making requests to khubd not keventd.
	* Uses an even newer sibling suspend hook.

 - Expect someone always made usbcore call ohci_hub_suspend() before bus
   glue fires; and that ohci_hub_resume() is only called after that bus
   glue ran.  Previously, only CONFIG_USB_SUSPEND promised those things.
   (Includes updates to PCI and OMAP bus glue.)

 - Handle a not-noticed-before special case during resume from one of
   the swsusp snapshots when using "usb-handoff":  the controller isn't
   left in RESET state.  (A bug to fix in the usb-handoff code...)

Also cleans up a minor debug printk glitch, and switches an mdelay over
to an msleep (how did that stick around for so long?).

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

 drivers/usb/host/ohci-dbg.c  |    4 ----
 drivers/usb/host/ohci-hcd.c  |    2 +-
 drivers/usb/host/ohci-hub.c  |   42 ++++++++++++------------------------------
 drivers/usb/host/ohci-mem.c  |    1 -
 drivers/usb/host/ohci-omap.c |   36 ++++++++++++------------------------
 drivers/usb/host/ohci-pci.c  |   40 ++++++++--------------------------------
 drivers/usb/host/ohci.h      |    1 -
 7 files changed, 33 insertions(+), 93 deletions(-)
2005-10-28 16:47:40 -07:00
David Brownell 5f827ea3c3 [PATCH] usbcore PCI glue updates for PM
This updates the PCI glue to address the new and simplified usbcore suspend
semantics, where CONFIG_USB_SUSPEND becomes irrelevant to HCDs because
hcd->hub_suspend() will always be called.

  - Removes now-unneeded recursion support

  - Go back to ignoring faults reported by the wakeup calls; we expect them
    to fail sometimes, and that's just fine.

The PCI HCDs will need simple changes to catch up to this, like being able
to ignore the setting of CONFIG_USB_SUSPEND.

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

 drivers/usb/core/hcd-pci.c |  106 +++++++++++++++++++++------------------------
 drivers/usb/core/hcd.h     |    6 +-
 2 files changed, 53 insertions(+), 59 deletions(-)
2005-10-28 16:47:40 -07:00
David Brownell f3f3253d64 [PATCH] root hub updates (greater half)
This patch associates hub suspend and resume logic (including for root hubs)
with CONFIG_PM -- instead of CONFIG_USB_SUSPEND as before -- thereby unifying
two troublesome versions of suspend logic into just one.  It'll be easier to
keep things right from now on.

  - Now usbcore _always_ calls hcd->hub_suspend as needed, instead of
    only when USB_SUSPEND is enabled:
     * Those root hub methods are now called from hub suspend/resume;
       no more skipping between layers during device suspend/resume;
     * It now handles cases allowed by sysfs or autosuspended root hubs,
       by forcing the hub interface to resume too.

  - All devices, including virtual root hubs, now get the same treatment
    on their resume paths ... including re-activating all their interfaces.

Plus it gets rid of those stub copies of usb_{suspend,resume}_device(), and
updates the Kconfig to match the new definition of USB_SUSPEND:  it provides
(a) selective suspend, downstream from hubs; and (b) remote wakeup, upstream
from any device configuration which supports it.

This calls for minor followup patches for most HCDs (and their PCI glue).

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

 drivers/usb/core/Kconfig |   11 ++-
 drivers/usb/core/hub.c   |  163 +++++++++++++++++++++++++----------------------
 2 files changed, 97 insertions(+), 77 deletions(-)
2005-10-28 16:47:40 -07:00
David Brownell 979d5199fe [PATCH] root hub changes (lesser half)
This patch collects various small updates related to root hubs, to shrink
later patches which build on them.

  - For root hub suspend/resume support:
     * Make the existing usb_hcd_resume_root_hub() routine respect pmcore
       locking, exporting and using the dpm_runtime_resume() method.
     * Add a new usb_hcd_suspend_root_hub() to pair with that routine.
       (Essential to make OHCI autosuspend behave again...)
     * HC_SUSPENDED by itself only refers to the root hub's downstream ports.
       So let HCDs see root hub URBs unless the parent device is suspended.

  - Remove an assertion we no longer need (and now, also don't want).

  - Generic suspend/resume updates to work better with swsusp.
     * Ignore the FREEZE vs SUSPEND distinction for hardware; trying to
       use it breaks the swsusp snapshots it's supposed to help (sigh).
     * On resume, mark devices as resumed right away, but then
       do nothing else if the device is marked NOTATTACHED.

These changes shouldn't be very noticable by themselves.

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

 drivers/base/power/runtime.c |    1
 drivers/usb/core/hcd.c       |   64 ++++++++++++++++++++++++++++++++++++++-----
 drivers/usb/core/hcd.h       |    1
 drivers/usb/core/hub.c       |   45 ++++++++++++++++++++++++------
 drivers/usb/core/usb.c       |   20 +++++++++----
 drivers/usb/core/usb.h       |    1
 6 files changed, 111 insertions(+), 21 deletions(-)
2005-10-28 16:47:40 -07:00
David Brownell 9293677af3 [PATCH] all HCDs provide root hub suspend/resume methods
This cleans up a small recent FIXME, ensuring that all the HCDs provide
root hub suspend/resume methods.  It also wraps the calls to those root
suspend routines just like on the PCI "USB_SUSPEND not defined" cases,
so non-PCI bus glue won't be as tempted to behave very differently.

Several of the SOC based OHCI drivers forgot to list those methods;
the patch also adds those missing declarations.

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

 drivers/usb/core/hcd.c          |   42 +++++++++++++++++++++++++---------------
 drivers/usb/host/ohci-au1xxx.c  |    5 ++++
 drivers/usb/host/ohci-lh7a404.c |    5 ++++
 drivers/usb/host/ohci-pxa27x.c  |    1
 drivers/usb/host/ohci-s3c2410.c |    1
 drivers/usb/host/ohci-sa1111.c  |    1
 6 files changed, 40 insertions(+), 15 deletions(-)
2005-10-28 16:47:40 -07:00
Matt Porter 7ff71d6adf [PATCH] EHCI, split out PCI glue
This splits BIOS and PCI specific support out of ehci-hcd.c into
ehci-pci.c.  It follows the model already used in the OHCI driver
so support for non-PCI EHCI controllers can be more easily added.

Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/ehci-hcd.c |  543 ++++++--------------------------------------
 drivers/usb/host/ehci-pci.c |  414 +++++++++++++++++++++++++++++++++
 drivers/usb/host/ehci.h     |    1
 3 files changed, 492 insertions(+), 466 deletions(-)
2005-10-28 16:47:39 -07:00
David Brownell e9b7bd4ee7 [PATCH] one less word in struct device
This saves a word from "struct device" ... there's a refcounting mechanism
stub that's rather ineffective (the values are never even tested!), which
can safely be deleted.  With this patch it uses normal device refcounting,
so any potential users of the pm_parent mechanism will be more correct.
(That mechanism is actually unusable for now though; it does nothing.)

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

 drivers/base/power/main.c |   26 +++-----------------------
 include/linux/pm.h        |    1 -
 2 files changed, 3 insertions(+), 24 deletions(-)
2005-10-28 16:47:39 -07:00
Alan Stern a1d59ce842 [PATCH] USB: UHCI: Split apart the physical and logical framelist arrays
This patch (as563) splits the physical and logical framelist arrays in
uhci-hcd into two separate pieces.  This will allow slightly better memory
utilization, since each piece is no larger than a single page whereas
before the whole thing was a little bigger than two pages.  It also allows
the logical array to be allocated in non-DMA-coherent memory.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:39 -07:00
Alan Stern 8b4cd42134 [PATCH] USB: UHCI: Remove unused fields and unneeded tests for NULL
This patch (as562) removes from the uhci-hcd driver a few unused fields
and some unnecessary tests against NULL and assignments to NULL.  In fact
it wasn't until fairly recently that the tests became unnecessary.
Before last winter it was possible that the driver's stop() routine would
get called even if the start() routine returned an error, but now that
can't happen.  Hence there's no longer any need to check for partial
initialization.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:39 -07:00
Matt Porter e08fb39b77 [PATCH] USB: Fix usb hub build
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/core/hub.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2005-10-28 16:47:39 -07:00
David Brownell 8ad7fe16df [PATCH] remove some USB_SUSPEND dependencies
This simplifies some of the PM-related #ifdeffing by recognizing
that USB_SUSPEND depends on PM.  Also, OHCI drivers were often
testing for USB_SUSPEND when they should have tested just PM.

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

 drivers/usb/core/hcd.c          |    2 ++
 drivers/usb/host/ohci-hcd.c     |    2 +-
 drivers/usb/host/ohci-hub.c     |    4 ++--
 drivers/usb/host/ohci-omap.c    |    2 +-
 drivers/usb/host/ohci-pci.c     |    2 +-
 drivers/usb/host/ohci-ppc-soc.c |    4 ++--
 drivers/usb/host/ohci-pxa27x.c  |    2 +-
 drivers/usb/host/ohci-s3c2410.c |    3 +--
 drivers/usb/host/ohci-sa1111.c  |    2 +-
 9 files changed, 12 insertions(+), 11 deletions(-)
2005-10-28 16:47:39 -07:00
David Brownell dbc3887e7d [PATCH] remove duplicated resume path code
This gets rid of some inconsistently duplicated logic to resume interfaces.
Similar code was in both finish_port_resume() and in usb_generic_resume().
Now there is just one copy of that code, accessed regardless of whether
CONFIG_USB_SUSPEND is enabled.  Fault handling is also more consistent.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:39 -07:00
David Brownell 390a8c345e [PATCH] remove usb_suspend_device() parameter
This patch removes the extra usb_suspend_device() parameter.  The original
reason to pass that parameter was so that this routine could suspend any
active children.  A previous patch removed that functionality ... leaving
no reason to pass the parameter.  A close analogy is pci_set_power_state,
which doesn't need a pm_message_t either.

On the internal code path that comes through the driver model, the parameter
is now used to distinguish cases where USB devices need to "freeze" but not
suspend.   It also checks for an error case that's accessible through sysfs:
attempting to suspend a device before its interfaces (or for hubs, ports).

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

 drivers/usb/core/hub.c         |   34 +++++++++++++++++++++-------------
 drivers/usb/core/usb.c         |   23 +++++++++++++++++++++--
 drivers/usb/host/ehci-hcd.c    |    2 +-
 drivers/usb/host/isp116x-hcd.c |    2 +-
 drivers/usb/host/ohci-pci.c    |    2 +-
 include/linux/usb.h            |    2 +-
 6 files changed, 46 insertions(+), 19 deletions(-)
2005-10-28 16:47:38 -07:00
David Brownell c9f89fa40c [PATCH] remove suspend-path recursion
This patch removes some recursion in the CONFIG_USB_SUSPEND logic, which
suspended children (of devices or hubs) that weren't already suspended.
When it sees such cases, suspend now just fails cleanly.

That logic was not needed during system-wide sleep state transitions; and
given the current notions of how to manage selective suspend transitions,
we don't want it there either.  Where it was particularly handy was coping
with various limitations of the sysfs "echo -n N > power/state" support.
(These include assuming that "N" is always meaningful to the driver; and
that drivers can only transition to state N from state zero.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:38 -07:00
David Brownell db69087437 [PATCH] usb_interface power state
This updates the handling of power state for USB interfaces.

  - Formalizes an existing invariant:  interface "power state" is a boolean:
    ON when I/O is allowed, and FREEZE otherwise.  It does so by defining
    some inlined helpers, then using them.

  - Adds a useful invariant:  the only interfaces marked active are those
    bound to non-suspended drivers.  Later patches build on this invariant.

  - Simplifies the interface driver API (and removes some error paths) by
    removing the requirement that they record power state changes during
    suspend and resume callbacks.  Now usbcore does that.

A few drivers were simplified to address that last change.

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

 drivers/usb/core/hub.c       |   33 +++++++++------------
 drivers/usb/core/message.c   |    1
 drivers/usb/core/usb.c       |   65 +++++++++++++++++++++++++++++++++----------
 drivers/usb/core/usb.h       |   18 +++++++++++
 drivers/usb/input/hid-core.c |    2 -
 drivers/usb/misc/usbtest.c   |   10 ------
 drivers/usb/net/pegasus.c    |    2 -
 drivers/usb/net/usbnet.c     |    2 -
 8 files changed, 85 insertions(+), 48 deletions(-)
2005-10-28 16:47:38 -07:00
David Brownell 7586269c0b [PATCH] USB: move handoff code
This moves the PCI quirk handling for USB host controllers from the
PCI directory to the USB directory.  Follow-on patches will need to:

(a) merge these copies with the originals in the HCD reset methods.
they don't wholly agree, despite doing the very same thing; and

(b) eventually change it so "usb-handoff" is the default, to help
get more robust USB/BIOS/input/... interactions.

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

 drivers/Makefile              |    2
 drivers/pci/quirks.c          |  253 ---------------------------------------
 drivers/usb/Makefile          |    1
 drivers/usb/host/Makefile     |    5
 drivers/usb/host/pci-quirks.c |  272 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 280 insertions(+), 253 deletions(-)
2005-10-28 16:47:38 -07:00
Pete Zaitcev 38ffdd62b0 [PATCH] ub: suppress gcc warnings for pointer casts
When building on a 64-bit platform, gcc produces a warning
"cast of a pointer to an integer of a different size".
The scatterlist.offset on the LHS is unsigned int, so I used
that originally.

Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/block/ub.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
2005-10-28 16:47:38 -07:00
Greg Kroah-Hartman e639dd3f4e [PATCH] USB: add more snooping hooks in devio.c
Now we can log the urbs travelling through usbfs

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:38 -07:00
Greg Kroah-Hartman d6e5bcf4a7 [PATCH] devfs: Remove the mode field from usb_class_driver as it's no longer needed
Also fixes all drivers that set this field, and removes some other devfs
specfic USB logic.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/class/usblp.c           |    3 +--
 drivers/usb/core/file.c             |   19 ++++---------------
 drivers/usb/image/mdc800.c          |    3 +--
 drivers/usb/input/aiptek.c          |    2 +-
 drivers/usb/input/hiddev.c          |    3 +--
 drivers/usb/media/dabusb.c          |    3 +--
 drivers/usb/misc/auerswald.c        |    3 +--
 drivers/usb/misc/idmouse.c          |    5 ++---
 drivers/usb/misc/legousbtower.c     |    5 ++---
 drivers/usb/misc/rio500.c           |    3 +--
 drivers/usb/misc/sisusbvga/sisusb.c |    5 -----
 drivers/usb/misc/usblcd.c           |    9 ++++-----
 drivers/usb/usb-skeleton.c          |    3 +--
 include/linux/usb.h                 |    7 ++-----
 14 files changed, 22 insertions(+), 51 deletions(-)
2005-10-28 16:47:37 -07:00
Greg Kroah-Hartman 094f164957 [PATCH] USB: add endpoint information to sysfs
This patch adds endpoint information for both devices and interfaces to
sysfs.  Previously it was only possible to get the endpoint information
from usbfs, and never possible to get any information on endpoint 0.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/core/sysfs.c |  195 ++++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/usb.h      |    4
 2 files changed, 197 insertions(+), 2 deletions(-)
2005-10-28 16:47:37 -07:00
Greg Kroah-Hartman 8da608caa0 [PATCH] USB: disable tasklet if rtl8150 device is removed while active.
This fixes a oops seen in the wild.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:37 -07:00
Rui Santos c9c7746dd3 [PATCH] USB: ftdi: Artemis and ATIK based USB astronomical CCD cameras
This patch enables direct kernel support for the Artemis
and ATIK astronomical based USB CCD cameras.
Since all communications with this camera are done via an
FTDI 245BM chip, it was only needed to specify the
ProductID and VendorID of all three devices.
In what tests are concerned, data was transfered from and
to the FTDI at the chips Top speed (360KB/s).

Signed-off-by: Rui Santos <rsantos@grupopie.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/serial/ftdi_sio.c |    3 +++
 drivers/usb/serial/ftdi_sio.h |   13 +++++++++++++
 2 files changed, 16 insertions(+)
2005-10-28 16:47:37 -07:00
David Brownell 72f30b6f2f [PATCH] USB: ehci.patch (earlier irq disable)
This tweaks the EHCI reboot notifier to also halt the EHCI controller, and
makes that halt code force IRQs off.  Both should always have been done.

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

 drivers/usb/host/ehci-hcd.c |    8 ++++++++
 1 file changed, 8 insertions(+)
2005-10-28 16:47:37 -07:00
Linus Torvalds 89fbb69c4f Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2005-10-28 16:47:34 -07:00
Roland Dreier 4cce3390c9 [IB] fix up class_device_create() calls
Fix class_device_create() calls to match the new prototype which
takes a parent device pointer.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2005-10-28 16:38:15 -07:00
Linus Torvalds 7efe5d7c3e Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2005-10-28 15:57:32 -07:00
Linus Torvalds dbe0580d0d Merge master.kernel.org:/home/rmk/linux-2.6-mmc 2005-10-28 15:54:06 -07:00
Tony Luck 0e1f606092 [IA64] fix warning unused variable `g'
4ac0068f44 forgot to delete
the declaration of this variable which is no longer used.

Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-28 15:52:13 -07:00
Roland Dreier a4da0628ef Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2005-10-28 15:50:51 -07:00
Ivan Skytte Jorgensen 64a0c1c81e [SCTP] Do not allow unprivileged programs initiating new associations on
privileged ports.

Signed-off-by: Ivan Skytte Jorgensen <isj-sctp@i1.dk>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
2005-10-28 15:39:02 -07:00
Roland Dreier 70a30e16a8 [IB] uverbs: Fix device lifetime problems
Move ib_uverbs module to using cdev_alloc() and class_device_create()
so that we can handle device lifetime properly.  Now we can make sure
we keep all of our data structures around until the last way to reach
them is gone.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2005-10-28 15:38:26 -07:00
Roland Dreier a74968f8c3 [IB] umad: Fix device lifetime problems
Move ib_umad module to using cdev_alloc() and class_device_create() so
that we can handle device lifetime properly.  Now we can make sure we
keep all of our data structures around until the last way to reach
them is gone.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2005-10-28 15:37:23 -07:00
Jesse Barnes f8977d0a9b [PATCH] PCI fixup for Toshiba laptops and ohci1394
This is a fix for a bug I see on my Toshiba laptop, where the ohci1394
controller gets initialized improperly.  The patch adds two PCI fixups
to arch/i386/pci/fixup.c, one that happens early on to cache the value
of the PCI_CACHE_LINE_SIZE config register, and another that later
restores the value, along with a valid IRQ number and some BAR values.
I've tested it on my laptop, and it prevents me from running into what I
consider to be a major bug: IRQ 11 is disabled by the IRQ debug code,
causing my wireless to break.

Thanks to Rob for the original patch to ohci1394.c and Stefan for lots
of proofreading (and a last minute bug caught in review!) and additional
information collection.  I think the DMI system list is correct, but we
may need to add some more PCI IDs to the PCI_FIXUP macros over time.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:02 -07:00
Grant Coady 2f028234f2 [PATCH] pci_ids: cleanup comments
pci_ids.h cleanup: convert // comment to /* comment */

Signed-off-by: Grant Coady <gcoady@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:02 -07:00
Randy Dunlap 8f7020d363 [PATCH] kernel-doc: PCI fixes
PCI: add descriptions for missing function parameters.
Eliminate all kernel-doc warnings here.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:01 -07:00
Randy Dunlap f05aab8ef6 [PATCH] kernel-doc: fix PCI hotplug
PCI hotplug.c: does not contain kernel-doc, so don't process it for now.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:01 -07:00
Kristen Accardi 8e5dce3522 [PATCH] acpiphp: allocate resources for adapters with bridges
Allocate resources for adapters with bridges on them.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:01 -07:00
Russell King 5457b6a601 [PATCH] PCI: Convert megaraid to use pci_driver shutdown method
Convert megaraid to use pci_driver's shutdown method rather than
the generic device_driver shutdown method.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:01 -07:00
Russell King a1720fdbd0 [PATCH] PCI: Fixup PCI driver shutdown
Add a warning to pci driver registration code so that we know
whether we have drivers using the obsolete driver shutdown
method.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:01 -07:00
Andrew Morton d10211b278 [PATCH] PCI: fix edac drivers for radisys 82600 borkage
I told you that the pci_ids.h cleanup was a bad idea ;)

Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:01 -07:00
rajesh.shah@intel.com c2608a111b [PATCH] shpchp: fix oops at driver unload
At unload time, the shpchp driver does not remove sysfs files
it had created in the driver's probe entry point. This patch
fixes this problem.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:01 -07:00
rajesh.shah@intel.com 7c8942f993 [PATCH] shpchp: reduce debug message verbosity
Reduce the number of debug messages generated if shpchp debug is
enabled. I tried to restrict this to removing debug messages that
are either early-driver-debug type messages, or print information
that can be inferred through other debug prints.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:00 -07:00
rajesh.shah@intel.com ee138334d5 [PATCH] shpchp: miscellaneous cleanups
Remove un-necessary header includes, remove dead code, remove
some type casts, receive function return in the correct data
type...

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:00 -07:00
rajesh.shah@intel.com 2178bfad9c [PATCH] shpchp: remove redundant data structures
State information is currently stored in per-slot as well as
per-pci-function data structures in shpchp. There's a lot of
overlap in the information kept, and some of it is never used.
This patch consolidates the state information to per-slot and
eliminates unused data structures. The biggest change is to
eliminate the pci_func structure and the code around managing
its lists.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:00 -07:00
rajesh.shah@intel.com 70b6091946 [PATCH] shpchp: dont save PCI config for hotplug slots/devices
This patch eliminates saving the PCI config header for devices
in hotplug capable slots. We now use the PCI core to get the
specific parts of the config header as required.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:00 -07:00
rajesh.shah@intel.com 1410dc1cef [PATCH] shpchp: detect SHPC capability before doing a lot of work
The shpc driver registers its probe function for all pci-pci
bridges in the system. Not all of them will be shpc capable, so
look for this capability early in the probe function and return
if there's no work to do on this bridge. The old shpc driver
did some initialization work on all bridges before detecting
that shpc is not supported and unwinds the work it's already done
in that case.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 15:37:00 -07:00