Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 809b4e00 authored by Russell King's avatar Russell King
Browse files

Merge branch 'devel-stable' into devel

parents a0a55682 79a94c35
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -3554,12 +3554,12 @@ E: cvance@nai.com
D: portions of the Linux Security Module (LSM) framework and security modules
D: portions of the Linux Security Module (LSM) framework and security modules


N: Petr Vandrovec
N: Petr Vandrovec
E: vandrove@vc.cvut.cz
E: petr@vandrovec.name
D: Small contributions to ncpfs
D: Small contributions to ncpfs
D: Matrox framebuffer driver
D: Matrox framebuffer driver
S: Chudenicka 8
S: 21513 Conradia Ct
S: 10200 Prague 10, Hostivar
S: Cupertino, CA 95014
S: Czech Republic
S: USA


N: Thibaut Varene
N: Thibaut Varene
E: T-Bone@parisc-linux.org
E: T-Bone@parisc-linux.org
+2 −0
Original line number Original line Diff line number Diff line
@@ -6,6 +6,8 @@ Interrupts
	- ARM Interrupt subsystem documentation
	- ARM Interrupt subsystem documentation
IXP2000
IXP2000
	- Release Notes for Linux on Intel's IXP2000 Network Processor
	- Release Notes for Linux on Intel's IXP2000 Network Processor
msm
	- MSM specific documentation
Netwinder
Netwinder
	- Netwinder specific documentation
	- Netwinder specific documentation
Porting
Porting
+176 −0
Original line number Original line Diff line number Diff line
This document provides an overview of the msm_gpiomux interface, which
is used to provide gpio pin multiplexing and configuration on mach-msm
targets.

History
=======

The first-generation API for gpio configuration & multiplexing on msm
is the function gpio_tlmm_config().  This function has a few notable
shortcomings, which led to its deprecation and replacement by gpiomux:

The 'disable' parameter:  Setting the second parameter to
gpio_tlmm_config to GPIO_CFG_DISABLE tells the peripheral
processor in charge of the subsystem to perform a look-up into a
low-power table and apply the low-power/sleep setting for the pin.
As the msm family evolved this became problematic. Not all pins
have sleep settings, not all peripheral processors will accept requests
to apply said sleep settings, and not all msm targets have their gpio
subsystems managed by a peripheral processor. In order to get consistent
behavior on all targets, drivers are forced to ignore this parameter,
rendering it useless.

The 'direction' flag: for all mux-settings other than raw-gpio (0),
the output-enable bit of a gpio is hard-wired to a known
input (usually VDD or ground).  For those settings, the direction flag
is meaningless at best, and deceptive at worst.  In addition, using the
direction flag to change output-enable (OE) directly can cause trouble in
gpiolib, which has no visibility into gpio direction changes made
in this way.  Direction control in gpio mode should be made through gpiolib.

Key Features of gpiomux
=======================

- A consistent interface across all generations of msm.  Drivers can expect
the same results on every target.
- gpiomux plays nicely with gpiolib.  Functions that should belong to gpiolib
are left to gpiolib and not duplicated here.  gpiomux is written with the
intent that gpio_chips will call gpiomux reference-counting methods
from their request() and free() hooks, providing full integration.
- Tabular configuration.  Instead of having to call gpio_tlmm_config
hundreds of times, gpio configuration is placed in a single table.
- Per-gpio sleep.  Each gpio is individually reference counted, allowing only
those lines which are in use to be put in high-power states.
- 0 means 'do nothing': all flags are designed so that the default memset-zero
equates to a sensible default of 'no configuration', preventing users
from having to provide hundreds of 'no-op' configs for unused or
unwanted lines.

Usage
=====

To use gpiomux, provide configuration information for relevant gpio lines
in the msm_gpiomux_configs table.  Since a 0 equates to "unconfigured",
only those lines to be managed by gpiomux need to be specified.  Here
is a completely fictional example:

struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
	[12] = {
		.active = GPIOMUX_VALID | GPIOMUX_DRV_8MA | GPIOMUX_FUNC_1,
		.suspended = GPIOMUX_VALID | GPIOMUX_PULL_DOWN,
	},
	[34] = {
		.suspended = GPIOMUX_VALID | GPIOMUX_PULL_DOWN,
	},
};

To indicate that a gpio is in use, call msm_gpiomux_get() to increase
its reference count.  To decrease the reference count, call msm_gpiomux_put().

The effect of this configuration is as follows:

When the system boots, gpios 12 and 34 will be initialized with their
'suspended' configurations.  All other gpios, which were left unconfigured,
will not be touched.

When msm_gpiomux_get() is called on gpio 12 to raise its reference count
above 0, its active configuration will be applied.  Since no other gpio
line has a valid active configuration, msm_gpiomux_get() will have no
effect on any other line.

When msm_gpiomux_put() is called on gpio 12 or 34 to drop their reference
count to 0, their suspended configurations will be applied.
Since no other gpio line has a valid suspended configuration, no other
gpio line will be effected by msm_gpiomux_put().  Since gpio 34 has no valid
active configuration, this is effectively a no-op for gpio 34 as well,
with one small caveat, see the section "About Output-Enable Settings".

All of the GPIOMUX_VALID flags may seem like unnecessary overhead, but
they address some important issues.  As unused entries (all those
except 12 and 34) are zero-filled, gpiomux needs a way to distinguish
the used fields from the unused.  In addition, the all-zero pattern
is a valid configuration!  Therefore, gpiomux defines an additional bit
which is used to indicate when a field is used.  This has the pleasant
side-effect of allowing calls to msm_gpiomux_write to use '0' to indicate
that a value should not be changed:

  msm_gpiomux_write(0, GPIOMUX_VALID, 0);

replaces the active configuration of gpio 0 with an all-zero configuration,
but leaves the suspended configuration as it was.

Static Configurations
=====================

To install a static configuration, which is applied at boot and does
not change after that, install a configuration with a suspended component
but no active component, as in the previous example:

	[34] = {
		.suspended = GPIOMUX_VALID | GPIOMUX_PULL_DOWN,
	},

The suspended setting is applied during boot, and the lack of any valid
active setting prevents any other setting from being applied at runtime.
If other subsystems attempting to access the line is a concern, one could
*really* anchor the configuration down by calling msm_gpiomux_get on the
line at initialization to move the line into active mode.  With the line
held, it will never be re-suspended, and with no valid active configuration,
no new configurations will be applied.

But then, if having other subsystems grabbing for the line is truly a concern,
it should be reserved with gpio_request instead, which carries an implicit
msm_gpiomux_get.

gpiomux and gpiolib
===================

It is expected that msm gpio_chips will call msm_gpiomux_get() and
msm_gpiomux_put() from their request and free hooks, like this fictional
example:

static int request(struct gpio_chip *chip, unsigned offset)
{
        return msm_gpiomux_get(chip->base + offset);
}

static void free(struct gpio_chip *chip, unsigned offset)
{
        msm_gpiomux_put(chip->base + offset);
}

	...somewhere in a gpio_chip declaration...
	.request = request,
	.free    = free,

This provides important functionality:
- It guarantees that a gpio line will have its 'active' config applied
  when the line is requested, and will not be suspended while the line
  remains requested; and
- It guarantees that gpio-direction settings from gpiolib behave sensibly.
  See "About Output-Enable Settings."

This mechanism allows for "auto-request" of gpiomux lines via gpiolib
when it is suitable.  Drivers wishing more exact control are, of course,
free to also use msm_gpiomux_set and msm_gpiomux_get.

About Output-Enable Settings
============================

Some msm targets do not have the ability to query the current gpio
configuration setting.  This means that changes made to the output-enable
(OE) bit by gpiolib cannot be consistently detected and preserved by gpiomux.
Therefore, when gpiomux applies a configuration setting, any direction
settings which may have been applied by gpiolib are lost and the default
input settings are re-applied.

For this reason, drivers should not assume that gpio direction settings
continue to hold if they free and then re-request a gpio.  This seems like
common sense - after all, anybody could have obtained the line in the
meantime - but it needs saying.

This also means that calls to msm_gpiomux_write will reset the OE bit,
which means that if the gpio line is held by a client of gpiolib and
msm_gpiomux_write is called, the direction setting has been lost and
gpiolib's internal state has been broken.
Release gpio lines before reconfiguring them.
+96 −277

File changed.

Preview size limit exceeded, changes collapsed.

+302 −0
Original line number Original line Diff line number Diff line
Linux* Driver for Intel(R) Network Connection
===============================================================

Intel Gigabit Linux driver.
Copyright(c) 1999 - 2010 Intel Corporation.

Contents
========

- Identifying Your Adapter
- Command Line Parameters
- Additional Configurations
- Support

Identifying Your Adapter
========================

The e1000e driver supports all PCI Express Intel(R) Gigabit Network
Connections, except those that are 82575, 82576 and 82580-based*.

* NOTE: The Intel(R) PRO/1000 P Dual Port Server Adapter is supported by
  the e1000 driver, not the e1000e driver due to the 82546 part being used
  behind a PCI Express bridge.

For more information on how to identify your adapter, go to the Adapter &
Driver ID Guide at:

    http://support.intel.com/support/go/network/adapter/idguide.htm

For the latest Intel network drivers for Linux, refer to the following
website.  In the search field, enter your adapter name or type, or use the
networking link on the left to search for your adapter:

    http://support.intel.com/support/go/network/adapter/home.htm

Command Line Parameters
=======================

The default value for each parameter is generally the recommended setting,
unless otherwise noted.

NOTES:  For more information about the InterruptThrottleRate,
        RxIntDelay, TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay
        parameters, see the application note at:
        http://www.intel.com/design/network/applnots/ap450.htm

InterruptThrottleRate
---------------------
Valid Range:   0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,
                                   4=simplified balancing)
Default Value: 3

The driver can limit the amount of interrupts per second that the adapter
will generate for incoming packets. It does this by writing a value to the
adapter that is based on the maximum amount of interrupts that the adapter
will generate per second.

Setting InterruptThrottleRate to a value greater or equal to 100
will program the adapter to send out a maximum of that many interrupts
per second, even if more packets have come in. This reduces interrupt
load on the system and can lower CPU utilization under heavy load,
but will increase latency as packets are not processed as quickly.

The driver has two adaptive modes (setting 1 or 3) in which
it dynamically adjusts the InterruptThrottleRate value based on the traffic
that it receives. After determining the type of incoming traffic in the last
timeframe, it will adjust the InterruptThrottleRate to an appropriate value
for that traffic.

The algorithm classifies the incoming traffic every interval into
classes.  Once the class is determined, the InterruptThrottleRate value is
adjusted to suit that traffic type the best. There are three classes defined:
"Bulk traffic", for large amounts of packets of normal size; "Low latency",
for small amounts of traffic and/or a significant percentage of small
packets; and "Lowest latency", for almost completely small packets or
minimal traffic.

In dynamic conservative mode, the InterruptThrottleRate value is set to 4000
for traffic that falls in class "Bulk traffic". If traffic falls in the "Low
latency" or "Lowest latency" class, the InterruptThrottleRate is increased
stepwise to 20000. This default mode is suitable for most applications.

For situations where low latency is vital such as cluster or
grid computing, the algorithm can reduce latency even more when
InterruptThrottleRate is set to mode 1. In this mode, which operates
the same as mode 3, the InterruptThrottleRate will be increased stepwise to
70000 for traffic in class "Lowest latency".

In simplified mode the interrupt rate is based on the ratio of Tx and
Rx traffic.  If the bytes per second rate is approximately equal the
interrupt rate will drop as low as 2000 interrupts per second.  If the
traffic is mostly transmit or mostly receive, the interrupt rate could
be as high as 8000.

Setting InterruptThrottleRate to 0 turns off any interrupt moderation
and may improve small packet latency, but is generally not suitable
for bulk throughput traffic.

NOTE:  InterruptThrottleRate takes precedence over the TxAbsIntDelay and
       RxAbsIntDelay parameters.  In other words, minimizing the receive
       and/or transmit absolute delays does not force the controller to
       generate more interrupts than what the Interrupt Throttle Rate
       allows.

NOTE:  When e1000e is loaded with default settings and multiple adapters
       are in use simultaneously, the CPU utilization may increase non-
       linearly.  In order to limit the CPU utilization without impacting
       the overall throughput, we recommend that you load the driver as
       follows:

           modprobe e1000e InterruptThrottleRate=3000,3000,3000

       This sets the InterruptThrottleRate to 3000 interrupts/sec for
       the first, second, and third instances of the driver.  The range
       of 2000 to 3000 interrupts per second works on a majority of
       systems and is a good starting point, but the optimal value will
       be platform-specific.  If CPU utilization is not a concern, use
       RX_POLLING (NAPI) and default driver settings.

RxIntDelay
----------
Valid Range:   0-65535 (0=off)
Default Value: 0

This value delays the generation of receive interrupts in units of 1.024
microseconds.  Receive interrupt reduction can improve CPU efficiency if
properly tuned for specific network traffic.  Increasing this value adds
extra latency to frame reception and can end up decreasing the throughput
of TCP traffic.  If the system is reporting dropped receives, this value
may be set too high, causing the driver to run out of available receive
descriptors.

CAUTION:  When setting RxIntDelay to a value other than 0, adapters may
          hang (stop transmitting) under certain network conditions.  If
          this occurs a NETDEV WATCHDOG message is logged in the system
          event log.  In addition, the controller is automatically reset,
          restoring the network connection.  To eliminate the potential
          for the hang ensure that RxIntDelay is set to 0.

RxAbsIntDelay
-------------
Valid Range:   0-65535 (0=off)
Default Value: 8

This value, in units of 1.024 microseconds, limits the delay in which a
receive interrupt is generated.  Useful only if RxIntDelay is non-zero,
this value ensures that an interrupt is generated after the initial
packet is received within the set amount of time.  Proper tuning,
along with RxIntDelay, may improve traffic throughput in specific network
conditions.

TxIntDelay
----------
Valid Range:   0-65535 (0=off)
Default Value: 8

This value delays the generation of transmit interrupts in units of
1.024 microseconds.  Transmit interrupt reduction can improve CPU
efficiency if properly tuned for specific network traffic.  If the
system is reporting dropped transmits, this value may be set too high
causing the driver to run out of available transmit descriptors.

TxAbsIntDelay
-------------
Valid Range:   0-65535 (0=off)
Default Value: 32

This value, in units of 1.024 microseconds, limits the delay in which a
transmit interrupt is generated.  Useful only if TxIntDelay is non-zero,
this value ensures that an interrupt is generated after the initial
packet is sent on the wire within the set amount of time.  Proper tuning,
along with TxIntDelay, may improve traffic throughput in specific
network conditions.

Copybreak
---------
Valid Range:   0-xxxxxxx (0=off)
Default Value: 256

Driver copies all packets below or equaling this size to a fresh Rx
buffer before handing it up the stack.

This parameter is different than other parameters, in that it is a
single (not 1,1,1 etc.) parameter applied to all driver instances and
it is also available during runtime at
/sys/module/e1000e/parameters/copybreak

SmartPowerDownEnable
--------------------
Valid Range: 0-1
Default Value:  0 (disabled)

Allows PHY to turn off in lower power states. The user can set this parameter
in supported chipsets.

KumeranLockLoss
---------------
Valid Range: 0-1
Default Value: 1 (enabled)

This workaround skips resetting the PHY at shutdown for the initial
silicon releases of ICH8 systems.

IntMode
-------
Valid Range: 0-2 (0=legacy, 1=MSI, 2=MSI-X)
Default Value: 2

Allows changing the interrupt mode at module load time, without requiring a
recompile. If the driver load fails to enable a specific interrupt mode, the
driver will try other interrupt modes, from least to most compatible.  The
interrupt order is MSI-X, MSI, Legacy.  If specifying MSI (IntMode=1)
interrupts, only MSI and Legacy will be attempted.

CrcStripping
------------
Valid Range: 0-1
Default Value: 1 (enabled)

Strip the CRC from received packets before sending up the network stack.  If
you have a machine with a BMC enabled but cannot receive IPMI traffic after
loading or enabling the driver, try disabling this feature.

WriteProtectNVM
---------------
Valid Range: 0-1
Default Value: 1 (enabled)

Set the hardware to ignore all write/erase cycles to the GbE region in the
ICHx NVM (non-volatile memory).  This feature can be disabled by the
WriteProtectNVM module parameter (enabled by default) only after a hardware
reset, but the machine must be power cycled before trying to enable writes.

Note: the kernel boot option iomem=relaxed may need to be set if the kernel
config option CONFIG_STRICT_DEVMEM=y, if the root user wants to write the
NVM from user space via ethtool.

Additional Configurations
=========================

  Jumbo Frames
  ------------
  Jumbo Frames support is enabled by changing the MTU to a value larger than
  the default of 1500.  Use the ifconfig command to increase the MTU size.
  For example:

       ifconfig eth<x> mtu 9000 up

  This setting is not saved across reboots.

  Notes:

  - The maximum MTU setting for Jumbo Frames is 9216.  This value coincides
    with the maximum Jumbo Frames size of 9234 bytes.

  - Using Jumbo Frames at 10 or 100 Mbps is not supported and may result in
    poor performance or loss of link.

  - Some adapters limit Jumbo Frames sized packets to a maximum of
    4096 bytes and some adapters do not support Jumbo Frames.


  Ethtool
  -------
  The driver utilizes the ethtool interface for driver configuration and
  diagnostics, as well as displaying statistical information.  We
  strongly recommend downloading the latest version of Ethtool at:

  http://sourceforge.net/projects/gkernel.

  Speed and Duplex
  ----------------
  Speed and Duplex are configured through the Ethtool* utility. For
  instructions,  refer to the Ethtool man page.

  Enabling Wake on LAN* (WoL)
  ---------------------------
  WoL is configured through the Ethtool* utility. For instructions on
  enabling WoL with Ethtool, refer to the Ethtool man page.

  WoL will be enabled on the system during the next shut down or reboot.
  For this driver version, in order to enable WoL, the e1000e driver must be
  loaded when shutting down or rebooting the system.

  In most cases Wake On LAN is only supported on port A for multiple port
  adapters. To verify if a port supports Wake on LAN run ethtool eth<X>.


Support
=======

For general information, go to the Intel support website at:

    www.intel.com/support/

or the Intel Wired Networking project hosted by Sourceforge at:

    http://sourceforge.net/projects/e1000

If an issue is identified with the released source code on the supported
kernel with a supported adapter, email the specific information related
to the issue to e1000-devel@lists.sf.net
Loading