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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Reduce the SHPC hotplug driver's dependence on ACPI. We don't
walk the acpi namespace anymore to build a list of bridges and
devices. The remaining interaction with ACPI is to run the
_OSHP method to transition control of hotplug hardware from
system BIOS to the shpc hotplug driver, and to run the _HPP
method to get hotplug device parameters like cache line size,
latency timer and SERR/PERR enable from BIOS.
Note that one of the side effects of this patch is that shpchp
does not enable the hot-added device or its DMA bus mastering
automatically now. It expects the device driver to do that.
This may break some drivers and we will have to fix them as
they are reported.
Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Info about resources assigned to PCI devices is already available
through sysfs and pci utilities. There's no need for shpchp to
create another sysfs file to display the same information.
Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch converts the standard hotplug controller driver to use
the PCI core for resource management. This eliminates a whole lot
of duplicated code, and integrates shpchp in the system's normal
PCI handling code.
Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
One more SMBus unhiding quirk, this time for the HP D530. Requested and
successfully tested by Ben Cranston.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a minor patch to the ppc64 PCI hotplug code; it makes the call to
rpaphp_unconfig_pci_adapter() symmetric with respect to the call to
rpaphp_config_pci_adapter(). I discussed this with John Rose, who
had provided the last round of changes for these functions; he
appearently had this patch but somehow failed to mail it out.
Tested. (added/removed device).
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
drivers/pci/hotplug/rpaphp.h | 3 ++-
drivers/pci/hotplug/rpaphp_core.c | 5 ++++-
drivers/pci/hotplug/rpaphp_pci.c | 11 +++--------
3 files changed, 9 insertions(+), 10 deletions(-)
This patch unhides hidden SMBus on ICH6 chipset installed in
Asus M6V notebook. I would like to thank Michal Mleczko for
testing and help.
Signed-Off-By: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/quirks.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
Add pci_{enable,disable}_device() calls. Without pci_enable_device(),
dev->irq is garbage, and cpqphp relies on it.
This fixes a problem reported by Bruno Redondi. He reported a flood
of ACPI interrupts, that caused kacpid to run 100% of the time:
http://bugzilla.kernel.org/show_bug.cgi?id=5312
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/cpqphp_core.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
Add pci_{enable,disable}_device() calls. Without pci_enable_device(),
dev->irq is garbage, and cpcihp_zt5550 relies on it.
Compiled but untested, since I don't have the hardware.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Scott Murray <scottm@somanetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/cpcihp_zt5550.c | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
Cleanup the need_restore switch statement in
pci_set_power_state(). This makes it more safe by explicitly handling
all the PCI power states instead of handling them as the default
case. It also reads a little better IMHO.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
IPR scsi adapter have an exposure today in that they issue BIST to the adapter
to reset the card. If, during the time it takes to complete BIST, userspace
attempts to access PCI config space, the host bus bridge will master abort the
access since the ipr adapter does not respond on the PCI bus for a brief
period of time when running BIST. On PPC64 hardware, this master abort
results in the host PCI bridge isolating that PCI device from the rest of the
system, making the device unusable until Linux is rebooted. This patch makes
use of some newly added PCI layer APIs that allow for protection from
userspace accessing config space of a device in scenarios such as this.
Signed-off-by: Brian King <brking@us.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/ipr.c | 2 ++
1 file changed, 2 insertions(+)
Some PCI adapters (eg. ipr scsi adapters) have an exposure today in that they
issue BIST to the adapter to reset the card. If, during the time it takes to
complete BIST, userspace attempts to access PCI config space, the host bus
bridge will master abort the access since the ipr adapter does not respond on
the PCI bus for a brief period of time when running BIST. On PPC64 hardware,
this master abort results in the host PCI bridge isolating that PCI device
from the rest of the system, making the device unusable until Linux is
rebooted. This patch is an attempt to close that exposure by introducing some
blocking code in the PCI code. When blocked, writes will be humored and reads
will return the cached value. Ben Herrenschmidt has also mentioned that he
plans to use this in PPC power management.
Signed-off-by: Brian King <brking@us.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/access.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++
drivers/pci/pci-sysfs.c | 20 +++++-----
drivers/pci/pci.h | 7 +++
drivers/pci/proc.c | 28 +++++++--------
drivers/pci/syscall.c | 14 +++----
include/linux/pci.h | 7 +++
6 files changed, 134 insertions(+), 31 deletions(-)
This patch just adds ACPI and GPIO regions to its LPC bridge, similar
way as ICH4 did. I would like to thank Michal Mleczko for testing.
Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/quirks.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
Change the way IPoIB handles RX packets when it can't allocate a new
receive skbuff. If the allocation of a new receive skb fails, we now
drop the packet we just received and repost the original receive skb.
This means that the receive ring always stays full and we don't have
to monkey around with trying to schedule a refill task for later.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
I'm using this card in a RAID1 with 2 new SATA drives with no problems.
Card - SATA 300 TX2plus PDC40775 (3d73)
Signed-off-by: Ed Kear <ed@kear.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
The SMSC LPC47M997 Super-I/O chip seems to be compatible with the
LPC47M192, so it is supported by the smsc47m1 driver.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Update the I2C addresses for the ADM1032 and ADT7461 chips.
Also update the links to the Analog Devices web site.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add PEC support to the lm90 driver. Only the ADM1032 chip supports it,
and in a rather tricky way, which is why this patch comes with
documentation reinforcements. At least, this demonstrates that the new
PEC support logic in i2c-core can properly deal with chips with partial
PEC support.
As enabling PEC causes a significant performance drop, it can be
disabled through a sysfs file (unsurprisingly named "pec").
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Preparatory patch to add PEC support to the lm90 driver. We need a
centralized function to read register values, where the PEC code will
be later inserted. A positive side effect is that read errors are now
handled properly.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The tests leading to the use of hardware PEC in the i2c-i801 driver
can be simplified.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The new SMBus PEC implementation doesn't support PEC emulation on
non-PEC non-I2C SMBus masters, so we can drop all related code.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is my rewrite of the SMBus PEC support. The original
implementation was known to have bugs (credits go to Hideki Iwamoto
for reporting many of them recently), and was incomplete due to a
conceptual limitation.
The rewrite affects only software PEC. Hardware PEC needs very little
code and is mostly untouched.
Technically, both implementations differ in that the original one
was emulating PEC in software by modifying the contents of an
i2c_smbus_data union (changing the transaction to a different type),
while the new one works one level lower, on i2c_msg structures (working
on message contents). Due to the definition of the i2c_smbus_data union,
not all SMBus transactions could be handled (at least not without
changing the definition of this union, which would break user-space
compatibility), and those which could had to be implemented
individually. At the opposite, adding PEC to an i2c_msg structure
can be done on any SMBus transaction with common code.
Advantages of the new implementation:
* It's about twice as small (from ~136 lines before to ~70 now, only
counting i2c-core, including blank and comment lines). The memory
used by i2c-core is down by ~640 bytes (~3.5%).
* Easier to validate, less tricky code. The code being common to all
transactions by design, the risk that a bug can stay uncovered is
lower.
* All SMBus transactions have PEC support in I2C emulation mode
(providing the non-PEC transaction is also implemented). Transactions
which have no emulation code right now will get PEC support for free
when they finally get implemented.
* Allows for code simplifications in header files and bus drivers
(patch follows).
Drawbacks (I guess there had to be at least one):
* PEC emulation for non-PEC capable non-I2C SMBus masters was dropped.
It was based on SMBus tricks and doesn't quite fit in the new design.
I don't think it's really a problem, as the benefit was certainly
not worth the additional complexity, but it's only fair that I at
least mention it.
Lastly, let's note that the new implementation does slightly affect
compatibility (both in kernel and user-space), but doesn't actually
break it. Some defines will be dropped, but the code can always be
changed in a way that will work with both the old and the new
implementations. It shouldn't be a problem as there doesn't seem to be
many users of SMBus PEC to date anyway.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Discard I2C_FUNC_SMBUS_*_PEC defines. i2c clients are not supposed to
check for PEC support of i2c bus drivers on individual SMBus
transactions, and i2c bus drivers are not supposed to advertise them.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Update the documented list of devices supported by the i2c-i810
driver.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix several redefinitions of i2c IDs. i2c IDs must not be defined
outside of i2c-id.h.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Henk Vergonet <henk@god.dyndns.org>
Acked-by: Mark McClelland <mark@alpha.dyndns.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix functions declared static and then implemented
without the static in drivers/i2c/chips.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixup functions that have been declared static
and then actually defined without the static on.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
lm78.c and lm85.c have a number of items declared static
then implemented without the static on them. The following
patch fixes these sparse errors.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
eeprom_detect is first declared static and then when
the function is actually implemented, there is no static.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use kzalloc instead of kmalloc in the S4882 SMBus multiplexing driver.
I guess it's safer that way.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Drop useless casts on kzalloc returned values, as suggested by
Jiri Slaby.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use kzalloc instead of kmalloc+memset in all remaining i2c bus and
chip drivers.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use kzalloc instead of kmalloc+memset in all hardware monitoring
drivers.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use kzalloc instead of kmalloc+memzero in the ixp2000 and ixp4xx
I2C bus drivers.
Signed-off-by: Deepak Saxena <dsaxena@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
New driver for the Xicor X1205 RTC chip.
Signed-off-by: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The atxp1 and ds1621 drivers should make sure they do not probe
non-hwmon i2c adapters.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds a new ID to the SMSC LPC47B397-NC hardware
monitoring driver - for a chip that is claimed to be 100%
compatible otherwise.
Signed-off-by: Bryan Young (Utilitek Systems, Inc.)
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
In function i2c_isa_add_driver, copied driver should inherit the owner
field as well as the name field.
Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch updates the .owner field for the i2c core struct xxxx_driver
variables.
Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch updates the .owner field for various struct xxxx_driver
variables which are available on PPC_MAC arch.
This one was _not_ even compile-tested...
Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch updates the .owner field for various struct xxxx_driver variables,
other than pci_driver.
Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Deepak Saxena <dsaxena@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch updates .owner field for various struct pci_driver variables.
Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cleanups to the i2c-elektor driver:
* Set the i2c_adapter name field to "i2c-elektor" and use this string
in all resource requests and printks.
* Change space-padding for tab indentation, kill trailing white space,
remove space before comma.
* Use dev_info, pr_info and pr_debug instead of printk.
* Lines chopped to 80 columns.
Signed-off-by: Stig Telfer <stig@lizardlogic.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch updates the i2c-elektor driver, enabling it to compile
cleanly, load and run. The key change is that it uses the new
__iomem/iowrite8/ioread8 functions to abstract the direct or
memory-mapped variants of register access. Also, the original driver
would crash on module load on the Alpha because the PCI memory region
was not remapped into kernel memory.
I have managed the following testing:
* compiled and tested it on my Alpha UP2000+ system.
* compiles cleanly for x86 but I don't have the hardware to test.
Signed-off-by: Stig Telfer <stig@lizardlogic.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I2C_DF_NOTIFY is an i2c_driver flag, using it as an i2c_client flag
doesn't make any sense.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Acked-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
It's a bit confusing to name a variable the same as an unrelated
structure. The compiler doesn't complain, but it certainly makes the
code harder to understand, and could confuse grep and LXR among
others.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Drop I2C_SMBUS_I2C_BLOCK_MAX, use I2C_SMBUS_BLOCK_MAX instead.
I2C_SMBUS_I2C_BLOCK_MAX has always been defined to the same value as
I2C_SMBUS_BLOCK_MAX, and this will never change: setting it to a lower
value would make no sense, setting it to a higher value would break
i2c_smbus_data compatibility. There is no point in changing
i2c_smbus_data to support larger block transactions in SMBus mode, as
no SMBus hardware supports more than 32 byte blocks. Thus, for larger
transactions, direct I2C transfers are the way to go.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Drop a useless initialization step in the w83627hf driver. The comment
says that the W83627HF PWM2 can be disabled, but it can't. I suppose
this is a leftover from the w83781d driver (from which the w83627hf
driver is derived), as for example the W83782D had the ability to
disable PWM2.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Drop legacy ISA address support from the it87 driver. All supported
chips are Super-I/O chips, so the device ISA address can be safely read
from Super-I/O space rather than blindly assumed.
Two nearby inaccurate documentation statements have been fixed as well:
* The IT8705F doesn't have an SMBus interface.
* The SiS950 doesn't have a distinct prefix.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
No more need to check for PEC support being available now that both
the i2c-core and the i2c-i801 drivers are part of the Linux kernel
source tree. It's just there.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch changes w83627hf and w83627ehf drivers to reserve only ports
0x295-0x296, instead of full 0x290-0x297 range. While some other
sensors chips respond to all addresses in 0x290-0x297 range, Winbond
chips respond to 0x295-0x296 only (this behavior is implied by
documentation, and matches behavior observed on real systems). This is
not problem alone, as no BIOS was found to put something at these unused
addresses, and sensors chip itself provides nothing there as well.
But in addition to only respond to these two addresses, also BIOS
vendors report in their ACPI-PnP structures that there is some resource
at I/O address 0x295 of length 2. And when later this hwmon driver
attempts to request region with base 0x290/length 8, it fails as one
request_region cannot span more than one device.
Due to this we have to ask only for region this hardware really
occupies, otherwise driver cannot be loaded on systems with ACPI-PnP
enabled.
Signed-off-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cleanup the ioctl debug message in i2c-dev. In particular, the minor
number is redundant now that the minor number and the adapter number
are kept in sync.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The ixp4xx and ixp2000 i2c bus drivers omit to fill the required
i2c_adapter name field. Copy the device driver name field there.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
It's not nice to put #ifdef in the middle of functions.
CC: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-viapro.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Improve the register dump used to debug the i2c-viapro driver. The
original dump was missing the HSTSTS register and the block data
buffer.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-viapro.c | 38 ++++++++++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 8 deletions(-)
By slightly shifting the interface between vt596_access and
vt596_transaction, we can save two I/O accesses per SMBus transaction.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-viapro.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
Make it clearer which chips are supported by the i2c-viapro driver,
and which support I2C block transactions.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/i2c/busses/i2c-viapro | 12 ++++++------
drivers/i2c/busses/i2c-viapro.c | 22 +++++++++++++---------
2 files changed, 19 insertions(+), 15 deletions(-)
Cleanups to the i2c-viapro driver:
* Kill unused defines.
* Kill interrupt-related code, as the driver doesn't use interrupts.
* Fix broken comments (some copied from i2c-piix4.)
* Centralize the unsupported command error case in vt596_access.
That way we'll catch all unsupported commands, not only
I2C_SMBUS_PROC_CALL.
* Refactor some code.
* Convert some dev_dbg into dev_err. Errors better be reported even in
non-debug mode.
* Do not verify that the final reset succeeded. It'll be checked at
the beginning of the next transaction anyway.
* Use the driver name to reserve the I/O region.
* Do not print the contents of the SMBREV register, it reads 0 on all
chips I've seen so far.
* Some other minor fixes all over the place.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-viapro.c | 122 +++++++++++++---------------------------
1 file changed, 41 insertions(+), 81 deletions(-)
Implement the I2C block transactions on VIA chips which support them:
VT82C686B, VT8233, VT8233A, VT8235 and VT8237R. This speeds up EEPROM
accesses by a factor 10 or so.
I would like to thank Antonino A. Daplas, Hinko Kocevar, Salah Coronya
and Andreas Henriksson for their help in testing this new feature.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/i2c/busses/i2c-viapro | 7 +++++-
drivers/i2c/busses/i2c-viapro.c | 39 +++++++++++++++++++++++++++++++++---
2 files changed, 42 insertions(+), 4 deletions(-)
Before I go on cleaning up and improving the i2c-viapro driver, let's
fix all the coding style issues: mostly trailing white space, and
spaces used where tabs should be.
Signed-off-by: Jean Delvare <khali@linux-fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/i2c/busses/i2c-viapro | 12 ++---
drivers/i2c/busses/i2c-viapro.c | 76 ++++++++++++++++++------------------
2 files changed, 43 insertions(+), 45 deletions(-)
Move the check for SMBUS_QUICK in i2c_probe() after the forced
addresses have been handled. This makes it possible for a driver to
leave the probed address lists empty, only providing forced addresses,
and get i2c_probe to work even if the bus doesn't support SMBUS_QUICK.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/i2c-core.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
Using s8 instead of u8 to store temperature register values saves a
few instructions on sysfs file read. The very same was done for
several other drivers a while ago (lm63, lm83, lm90...)
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/w83l785ts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Convert the w83l785ts driver to use dynamic sysfs callbacks. This is a
small driver so the benefit is thin, but still worth it.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/w83l785ts.c | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
Clean up name string usage in 12 i2c bus drivers:
* Use the i2c_adapter name for requesting the I/O region rather than
redefining a new string.
* Do not initialize the i2c_adapter name to "unset".
This should save a few data bytes here and there.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-ali1535.c | 6 +++---
drivers/i2c/busses/i2c-ali1563.c | 6 ++++--
drivers/i2c/busses/i2c-ali15x3.c | 5 +++--
drivers/i2c/busses/i2c-amd756.c | 5 ++---
drivers/i2c/busses/i2c-amd8111.c | 4 +++-
drivers/i2c/busses/i2c-i801.c | 4 ++--
drivers/i2c/busses/i2c-nforce2.c | 4 ++--
drivers/i2c/busses/i2c-piix4.c | 4 ++--
drivers/i2c/busses/i2c-sis5595.c | 5 +++--
drivers/i2c/busses/i2c-sis630.c | 6 ++++--
drivers/i2c/busses/i2c-sis96x.c | 5 +++--
drivers/i2c/busses/i2c-via.c | 4 ++--
12 files changed, 33 insertions(+), 25 deletions(-)
Discard a common out-of-date comment in 5 hardware monitoring drivers.
The hardware monitoring chip drivers are no more setting sensor limits
at initialization time, for quite some time already.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/lm78.c | 1 -
drivers/hwmon/via686a.c | 1 -
drivers/hwmon/w83627hf.c | 1 -
drivers/hwmon/w83781d.c | 1 -
drivers/hwmon/w83792d.c | 1 -
5 files changed, 5 deletions(-)
Do not enable the VIA VT82C686A/B integrated sensors by default, as
disabled sensors usually means that this feature is not used so the
values won't make any sense. This has been confusing many users in the
past:
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=1786http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=1811http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=2052
It is still possible to forcibly enable the sensors by using the
force_addr module parameter.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/hwmon/via686a | 17 +++++++++++++++--
drivers/hwmon/via686a.c | 18 +++++++++++-------
2 files changed, 26 insertions(+), 9 deletions(-)
We can save 0.5kB of data in the via686a driver.
From: Denis Vlasenko <vda@ilport.com.ua>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
hwmon: adm9240 update 2/2: convert to use dynamic sysfs accessors
This patch converts adm9240 to use Yani Ioannou's dynamic sysfs callbacks,
reducing driver memory footprint from 16312 to 14104 bytes on 2.6.14-rc1,
removing the old driver macro mess.
Run tested on Intel SE440BX-2 mobo.
Signed-off-by: Grant Coady <gcoady@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
hwmon: adm9240 update 1/2: cleanups:
o remove i2c read/write wrapper interface as it does nothing,
o change kmalloc + memset to kzalloc
Signed-off-by: Grant Coady <gcoady@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The ipw2200 driver code in current GIT contains a kmalloc() followed by
a memset() without handling a possible memory allocation failure.
Signed-off-by: Panagiotis Issaris <panagiotis.issaris@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
1) Forgotten counter incrementation in sis900_rx() in case
it doesn't get memory for skb, that leads to whole interface failure.
Problem is accompanied with messages:
eth0: Memory squeeze,deferring packet.
eth0: NULL pointer encountered in Rx ring, skipping
2) If counter cur_rx overflows and there'll be temporary memory problems
buffer can't be recreated later, when memory IS available.
3) Limit the work in handler to prevent the endless packets processing
if new packets are generated faster then handled.
Signed-off-by: Konstantin Khorenko <khorenko@sw.ru>
Signed-off-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch replaces current PowerPC 4xx EMAC driver with
new, re-written from the scratch version. This patch is quite big
(~234K) because there is virtualy 0% of common code between old and
new version.
New driver uses NAPI, it solves stability problems under heavy packet
load and low memory, corrects chip register access and fixes numerous
small bugs I don't even remember now.
This patch has been tested on all supported in 2.6 PPC 4xx boards.
It's been used in production for almost a year now on custom
4xx hardware. PPC32 specific parts are already upstream.
Patch was acked by the current EMAC driver maintainer (Matt Porter). I
will be maintaining this new version.
Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
--
Kconfig | 72
ibm_emac/Makefile | 13
ibm_emac/ibm_emac.h | 418 +++--
ibm_emac/ibm_emac_core.c | 3414 ++++++++++++++++++++++++----------------------
ibm_emac/ibm_emac_core.h | 313 ++--
ibm_emac/ibm_emac_debug.c | 377 ++---
ibm_emac/ibm_emac_debug.h | 63
ibm_emac/ibm_emac_mal.c | 674 +++++----
ibm_emac/ibm_emac_mal.h | 336 +++-
ibm_emac/ibm_emac_phy.c | 335 ++--
ibm_emac/ibm_emac_phy.h | 105 -
ibm_emac/ibm_emac_rgmii.c | 201 ++
ibm_emac/ibm_emac_rgmii.h | 68
ibm_emac/ibm_emac_tah.c | 111 +
ibm_emac/ibm_emac_tah.h | 96 -
ibm_emac/ibm_emac_zmii.c | 255 +++
ibm_emac/ibm_emac_zmii.h | 114 -
17 files changed, 4114 insertions(+), 2851 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Under heavy PCI bus load, ports of the DFE-580TX 4-ethernet port board stop
working, with currently no other cure than a powercycle. Here is a tested
fix. By the way, I also fixed some references and attribution.
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Proper handling of suspend/resume in the wbsd driver.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
IXDP2x01 systems can be built without PCI network cards, so we should not
require NET_PCI to build CS89x0 on these systems.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
If the interface is not used right away after being probed it wastes
power needlessly. Noted by Holger Schurig.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Here is a patch that changes the way the MAC filter is computed for the
multicast addresses. The computation is taken from the SiS GPL driver.
This patch is necessary to get IPv6 working.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Looks like someone used the MII constants instead of the ethtool constants.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
The documentation about s2io is available at
Documentation/networking/s2io.txt.
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
prism54 is leaking information when passing transmits to the firmware.
There is no requirement to adjust the length to >= ETH_ZLEN.
Just pass the skb length (after possible adjustment).
Signed-off-by: Roger While <simrw@sim-basis.de>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Some older DL10019 based cards need to setup
the auto-negotiation-advertisement register
to advertise 100Full,100Half,10Full and 10Half.
Signed-off-by: <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch fixes a bug that happens when the hypervisor can't add a
buffer. The old code wrote IBM_VETH_INVALID_MAP into the free_map
array, so next time the index was used, a ibmveth_assert() caught it and
called BUG(). The patch writes the right value into the free_map array
so that the index can be reused.
Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch adds the lockless TX feature to the ibmveth driver. The
hypervisor has its own locking so the only change that is necessary is
to protect the statistics counters.
Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch removes the allocation of RX skb's buffers from a workqueue
to be called directly at RX processing time. This change was suggested
by Dave Miller when the driver was starving the RX buffers and
deadlocking under heavy traffic:
> Allocating RX SKBs via tasklet is, IMHO, the worst way to
> do it. It is no surprise that there are starvation cases.
>
> If tasklets or work queues get delayed in any way, you lose,
> and it's very easy for a card to catch up with the driver RX'ing
> packets very fast, no matter how aggressive you make the
> replenishing. By the time you detect that you need to be
> "more aggressive" it is already too late.
> The only pseudo-reliable way is to allocate at RX processing time.
>
Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch changes the way the ibmveth driver handles the receive
buffers. The old code mallocs and maps all the buffers in the pools
regardless of MTU size and it also limits the number of buffer pools to
three. This patch makes the driver malloc and map the buffers necessary
to support the current MTU. It also changes the hardcoded names of the
buffer pool number, size, and elements to arrays to make it easier to
change (with the hope of making them runtime parameters in the future).
Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch updates dev->trans_start and dev->last_rx so that the ibmveth
driver can be used with the ARP monitor in the bonding driver.
Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Update version and reldate and add more sanity checking to
tg3_set_settings().
Signed-off-by: Gary Zambrano <zambrano@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Change the ASF heart beat to 5 seconds for faster detection of system
crash. The driver sends the heartbeat every 2 seconds and the ASF
firmware will timeout and reset the device if no heartbeat is received
after 5 seconds. The old scheme of 2 minutes is ineffective.
tg3_write_mem_fast() is added to speed up the IO to send the heartbeat.
When no workaround is needed, it will use direct MMIO to memory space
to write to memory.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Add complete support for 5714/5715. These chips are very similar to
5780 so the changes are very trivial. A TG3_FLG2_5780_CLASS flag is
added to identify these chips.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
- move default mode pages to the front of libata-scsi.c
so various functions can access them
- partial annotation of these pages, point out divergence
from sat-r06
- replace various mode page magic numbers with defines
- strengthen MODE SENSE command decoding: handle DBD
bit in cdb, yield block descriptor (per sat-r06) and
handle mode sub pages
Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
If a BPA 100/105 device contains more then one interface then ignore the
additional interfaces, because they are unused.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This patch contains the big cleanup of the HCI UART driver. The uneeded
header files are removed and their structure declarations are moved into
the protocol implementations.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.
Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There are a number of sparse warnings from the latest sparse
snapshot being generated from the drivers/base build. The
main culprits are due to the initialisation functions not
being declared in a header file.
Also, the firmware.c file should include <linux/device.h>
to get the prototype of firmware_register() and
firmware_unregister().
This patch moves the init function declerations from the
init.c file to the base.h, and ensures it is included in
all the relevant c sources. It also adds <linux/device.h>
to the included headers for firmware.c.
The patch does not solve all the sparse errors generated,
but reduces the count significantly.
drivers/base/core.c:161:1: warning: symbol 'devices_subsys' was not declared. Should it be static?
drivers/base/core.c:417:12: warning: symbol 'devices_init' was not declared. Should it be static?
drivers/base/sys.c:253:6: warning: symbol 'sysdev_shutdown' was not declared. Should it be static?
drivers/base/sys.c:326:5: warning: symbol 'sysdev_suspend' was not declared. Should it be static?
drivers/base/sys.c:428:5: warning: symbol 'sysdev_resume' was not declared. Should it be static?
drivers/base/sys.c:450:12: warning: symbol 'system_bus_init' was not declared. Should it be static?
drivers/base/bus.c:133:1: warning: symbol 'bus_subsys' was not declared. Should it be static?
drivers/base/bus.c:667:12: warning: symbol 'buses_init' was not declared. Should it be static?
drivers/base/class.c:759:12: warning: symbol 'classes_init' was not declared. Should it be static?
drivers/base/platform.c:313:12: warning: symbol 'platform_bus_init' was not declared. Should it be static?
drivers/base/cpu.c:110:12: warning: symbol 'cpu_dev_init' was not declared. Should it be static?
drivers/base/firmware.c:17:5: warning: symbol 'firmware_register' was not declared. Should it be static?
drivers/base/firmware.c:23:6: warning: symbol 'firmware_unregister' was not declared. Should it be static?
drivers/base/firmware.c:28:12: warning: symbol 'firmware_init' was not declared. Should it be static?
drivers/base/init.c:28:13: warning: symbol 'driver_init' was not declared. Should it be static?
drivers/base/dmapool.c:174:10: warning: implicit cast from nocast type
drivers/base/attribute_container.c:439:1: warning: symbol 'attribute_container_init' was not declared. Should it be static?
drivers/base/power/runtime.c:76:6: warning: symbol 'dpm_set_power_state' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Input: remove custom-made hotplug handler
Now that all input devices are registered with sysfs we can remove
old custom-made hotplug handler and crate a standard one.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This creates symlinks in /sys/class/input/ to the nested class devices
to help userspace cope with the nesting.
Unfortunatly udev still needs to be updated as it can't handle symlinks
properly here :(
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Input: show sysfs path in /proc/bus/input/devices
Show that sysfs and phys path are different objects.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The previous patch adding the ability to nest struct class_device
changed the paramaters to the call class_device_create(). This patch
fixes up all in-kernel users of the function.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch allows struct class_device to be nested, so that another
struct class_device can be the parent of a new one, instead of only
having the struct class be the parent. This will allow us to
(hopefully) fix up the input and video class subsystem mess.
But please people, don't go crazy and start making huge trees of class
devices, you should only need 2 levels deep to get everything to work
(remember to use a class_interface to get notification of a new class
device being added to the system.)
Oh, this also allows us to have the possibility of potentially, someday,
moving /sys/block into /sys/class. The main hindrance is that pesky
/dev numberspace issue...
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A "coldplug + udevstart" can be simple like this:
for i in /sys/block/*/*/uevent; do echo 1 > $i; done
for i in /sys/class/*/*/uevent; do echo 1 > $i; done
for i in /sys/bus/*/devices/*/uevent; do echo 1 > $i; done
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Driver core: pass interface to class intreface methods
Pass interface as argument to add() and remove() class interface
methods. This way a subsystem can implement generic add/remove
handlers and then call interface-specific ones.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I2O: cleanup - remove i2o_device_class
I2O devices reside on their own bus so there should be no reason
to also have i2c_device class that mirros i2o bus.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I2O: remove i2o_device_class_interface misuse
The intent of class interfaces was to provide different
'views' at the same object, not just run some code every
time a new class device is registered. Kill interface
structure, make class core register default attributes
and set up sysfs links right when registering class
devices.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Move call to kobject_hotplug() above code that adds interfaces
to a class device, otherwise children's hotplug events may reach
userspace first.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch teaches "usb_device" about the new driver model wakeup support:
- It updates device wakeup capabilities when entering a configuration
with the WAKEUP attribute;
- During suspend processing it consults the policy bit to see
whether it should enable wakeup for that device. (This resolves
a FIXME to not assume the answer is always "yes"; some devices
lie about supporting remote wakeup.)
Support for root hubs and the HCDs is separate (and more complex).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a refresh of an earlier patch to add "wakeup" support to the
PM core model. This provides per-device bus-neutral control of the
use of wakeup events.
* "struct device_pm_info" has two bits that are initialized as
part of setting up the enclosing struct device:
- "can_wakeup", reflecting hardware capabilities
- "may_wakeup", the policy setting (when CONFIG_PM)
* There's a writeable sysfs "wakeup" file, with one of two values:
- "enabled", when the policy is to allow wakeup
- "disabled", when the policy is not to allow it
- "" if the device can't currently issue wakeups
By default, wakeup is enabled on all devices that support it. If its
driver doesn't support it ... treat it as a bug. :)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I was recently given an old Travan tape drive and asked to do something
useful with it. The ide-scsi + st (+serverworks ide controller) combo
results in a hard lockup of the machine which I have not had the energy to
debug, so I turned to ide-tape (which seems to work). The system in
question debian stable, using udev to manage /dev.
The following patch to ide-tape.c allows udev to create the cdev nodes for
my drive.
Cc: Gadi Oxman <gadio@netvision.net.il>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use get_unaligned for possibly-unaligned multi-byte accesses to the
ATA device identify response buffer.
Patch from Nicolas Pitre
This is the PXA2xx common IRDA driver, plus platform support
for Lubbock and Mainstone.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Patch from Jon Ringle
This adds support for the RTC and nvram on the Comdial MP1000
Signed-off-by: Jon Ringle
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Patch from Jon Ringle
This patch gives support for the CS8900A ethernet chip on the Comdial MP1000
Signed-off-by: Jon Ringle
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Patch from Jon Ringle
Updated 2898/1 per comments:
- Removed fixup
- Moved code in mach-mp1000/ to mach-clps711x/
- Cleaned up code in mp1000-seprom.c. Eliminated code that displayed the contents of the eeprom
Please comment.
Signed-off-by: Jon Ringle
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Patch from Ian Campbell
The sparse warning initially surfaced in sound/arm/pxa2xx-ac97.c
because it was using u32 * variables to hold the unsigned long *
register addresses.
I submitted an ALSA patch for this http://thread.gmane.org/gmane.linux.alsa.devel/27804 issue and it was suggested that it might be preferable to change the register
definitions to use u32.
Most other subarches seem to use u32 for their register type, at least
the ones which use a __REG macro (like the PXA) do. Nico indicated in
the thread above that he wouldn't mind this patch.
Changing the type required fixes for opposite warnings in the pxa2xx usb
gadget code but that was the only new warning introduced on defconfig
or lubbock, mainstone and our own PXA255 boards.
Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix sparse warnings in arch/arm/kernel/module.c,
arch/arm/mm/consistent.c, drivers/pcmcia/sa1111_generic.c,
and platform support files.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
EBSA110 only requires hardware.h to be included for a couple of
files. Move the include there.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- 100msec sleep is a little excessive, lots of requests can complete
in that timeframe. Use 10msec instead.
- Rename QUEUE_FLAG_BYPASS to QUEUE_FLAG_ELVSWITCH to indicate what
is going on.
Signed-off-by: Jens Axboe <axboe@suse.de>
This patch reimplements elevator switch. This patch assumes generic
dispatch queue patchset is applied.
* Each request is tagged with REQ_ELVPRIV flag if it has its elevator
private data set.
* Requests which doesn't have REQ_ELVPRIV flag set never enter
iosched. They are always directly back inserted to dispatch queue.
Of course, elevator_put_req_fn is called only for requests which
have its REQ_ELVPRIV set.
* Request queue maintains the current number of requests which have
its elevator data set (elevator_set_req_fn called) in
q->rq->elvpriv.
* If a request queue has QUEUE_FLAG_BYPASS set, elevator private data
is not allocated for new requests.
To switch to another iosched, we set QUEUE_FLAG_BYPASS and wait until
elvpriv goes to zero; then, we attach the new iosched and clears
QUEUE_FLAG_BYPASS. New implementation is much simpler and main code
paths are less cluttered, IMHO.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
This patch kills max_back_kb handling from elv_dispatch_sort() and
kills max_back_kb field from struct request_queue.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>