Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matisse
android_kernel_samsung_matisse
Commits
e3ee3b78
Commit
e3ee3b78
authored
19 years ago
by
Jeff Garzik
Browse files
Options
Download
Plain Diff
/spare/repo/netdev-2.6 branch 'master'
parents
91cb70c1
6b39374a
Changes
1000
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
877 additions
and
54 deletions
+877
-54
Documentation/feature-removal-schedule.txt
Documentation/feature-removal-schedule.txt
+12
-0
Documentation/networking/cxgb.txt
Documentation/networking/cxgb.txt
+352
-0
Documentation/networking/phy.txt
Documentation/networking/phy.txt
+288
-0
Documentation/sound/alsa/ALSA-Configuration.txt
Documentation/sound/alsa/ALSA-Configuration.txt
+1
-0
Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+11
-4
MAINTAINERS
MAINTAINERS
+6
-0
Makefile
Makefile
+2
-2
arch/alpha/kernel/signal.c
arch/alpha/kernel/signal.c
+5
-6
arch/arm/Kconfig
arch/arm/Kconfig
+2
-37
arch/arm/common/Kconfig
arch/arm/common/Kconfig
+3
-0
arch/arm/common/Makefile
arch/arm/common/Makefile
+1
-0
arch/arm/common/gic.c
arch/arm/common/gic.c
+166
-0
arch/arm/kernel/signal.c
arch/arm/kernel/signal.c
+3
-2
arch/arm/mach-ixp4xx/coyote-setup.c
arch/arm/mach-ixp4xx/coyote-setup.c
+1
-1
arch/arm/mach-ixp4xx/gtwx5715-setup.c
arch/arm/mach-ixp4xx/gtwx5715-setup.c
+1
-1
arch/arm/mach-ixp4xx/ixdp425-setup.c
arch/arm/mach-ixp4xx/ixdp425-setup.c
+1
-1
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/assabet.c
+7
-0
arch/arm/mach-sa1100/cerf.c
arch/arm/mach-sa1100/cerf.c
+7
-0
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/generic.c
+5
-0
arch/arm/mach-sa1100/generic.h
arch/arm/mach-sa1100/generic.h
+3
-0
No files found.
Too many changes to show.
To preserve performance only
1000 of 1000+
files are displayed.
Plain diff
Email patch
Documentation/feature-removal-schedule.txt
View file @
e3ee3b78
...
...
@@ -135,3 +135,15 @@ Why: With the 16-bit PCMCIA subsystem now behaving (almost) like a
pcmciautils package available at
http://kernel.org/pub/linux/utils/kernel/pcmcia/
Who: Dominik Brodowski <linux@brodo.de>
---------------------------
What: ip_queue and ip6_queue (old ipv4-only and ipv6-only netfilter queue)
When: December 2005
Why: This interface has been obsoleted by the new layer3-independent
"nfnetlink_queue". The Kernel interface is compatible, so the old
ip[6]tables "QUEUE" targets still work and will transparently handle
all packets into nfnetlink queue number 0. Userspace users will have
to link against API-compatible library on top of libnfnetlink_queue
instead of the current 'libipq'.
Who: Harald Welte <laforge@netfilter.org>
This diff is collapsed.
Click to expand it.
Documentation/networking/cxgb.txt
0 → 100644
View file @
e3ee3b78
Chelsio N210 10Gb Ethernet Network Controller
Driver Release Notes for Linux
Version 2.1.1
June 20, 2005
CONTENTS
========
INTRODUCTION
FEATURES
PERFORMANCE
DRIVER MESSAGES
KNOWN ISSUES
SUPPORT
INTRODUCTION
============
This document describes the Linux driver for Chelsio 10Gb Ethernet Network
Controller. This driver supports the Chelsio N210 NIC and is backward
compatible with the Chelsio N110 model 10Gb NICs.
FEATURES
========
Adaptive Interrupts (adaptive-rx)
---------------------------------
This feature provides an adaptive algorithm that adjusts the interrupt
coalescing parameters, allowing the driver to dynamically adapt the latency
settings to achieve the highest performance during various types of network
load.
The interface used to control this feature is ethtool. Please see the
ethtool manpage for additional usage information.
By default, adaptive-rx is disabled.
To enable adaptive-rx:
ethtool -C <interface> adaptive-rx on
To disable adaptive-rx, use ethtool:
ethtool -C <interface> adaptive-rx off
After disabling adaptive-rx, the timer latency value will be set to 50us.
You may set the timer latency after disabling adaptive-rx:
ethtool -C <interface> rx-usecs <microseconds>
An example to set the timer latency value to 100us on eth0:
ethtool -C eth0 rx-usecs 100
You may also provide a timer latency value while disabling adpative-rx:
ethtool -C <interface> adaptive-rx off rx-usecs <microseconds>
If adaptive-rx is disabled and a timer latency value is specified, the timer
will be set to the specified value until changed by the user or until
adaptive-rx is enabled.
To view the status of the adaptive-rx and timer latency values:
ethtool -c <interface>
TCP Segmentation Offloading (TSO) Support
-----------------------------------------
This feature, also known as "large send", enables a system's protocol stack
to offload portions of outbound TCP processing to a network interface card
thereby reducing system CPU utilization and enhancing performance.
The interface used to control this feature is ethtool version 1.8 or higher.
Please see the ethtool manpage for additional usage information.
By default, TSO is enabled.
To disable TSO:
ethtool -K <interface> tso off
To enable TSO:
ethtool -K <interface> tso on
To view the status of TSO:
ethtool -k <interface>
PERFORMANCE
===========
The following information is provided as an example of how to change system
parameters for "performance tuning" an what value to use. You may or may not
want to change these system parameters, depending on your server/workstation
application. Doing so is not warranted in any way by Chelsio Communications,
and is done at "YOUR OWN RISK". Chelsio will not be held responsible for loss
of data or damage to equipment.
Your distribution may have a different way of doing things, or you may prefer
a different method. These commands are shown only to provide an example of
what to do and are by no means definitive.
Making any of the following system changes will only last until you reboot
your system. You may want to write a script that runs at boot-up which
includes the optimal settings for your system.
Setting PCI Latency Timer:
setpci -d 1425:* 0x0c.l=0x0000F800
Disabling TCP timestamp:
sysctl -w net.ipv4.tcp_timestamps=0
Disabling SACK:
sysctl -w net.ipv4.tcp_sack=0
Setting large number of incoming connection requests:
sysctl -w net.ipv4.tcp_max_syn_backlog=3000
Setting maximum receive socket buffer size:
sysctl -w net.core.rmem_max=1024000
Setting maximum send socket buffer size:
sysctl -w net.core.wmem_max=1024000
Set smp_affinity (on a multiprocessor system) to a single CPU:
echo 1 > /proc/irq/<interrupt_number>/smp_affinity
Setting default receive socket buffer size:
sysctl -w net.core.rmem_default=524287
Setting default send socket buffer size:
sysctl -w net.core.wmem_default=524287
Setting maximum option memory buffers:
sysctl -w net.core.optmem_max=524287
Setting maximum backlog (# of unprocessed packets before kernel drops):
sysctl -w net.core.netdev_max_backlog=300000
Setting TCP read buffers (min/default/max):
sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"
Setting TCP write buffers (min/pressure/max):
sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"
Setting TCP buffer space (min/pressure/max):
sysctl -w net.ipv4.tcp_mem="10000000 10000000 10000000"
TCP window size for single connections:
The receive buffer (RX_WINDOW) size must be at least as large as the
Bandwidth-Delay Product of the communication link between the sender and
receiver. Due to the variations of RTT, you may want to increase the buffer
size up to 2 times the Bandwidth-Delay Product. Reference page 289 of
"TCP/IP Illustrated, Volume 1, The Protocols" by W. Richard Stevens.
At 10Gb speeds, use the following formula:
RX_WINDOW >= 1.25MBytes * RTT(in milliseconds)
Example for RTT with 100us: RX_WINDOW = (1,250,000 * 0.1) = 125,000
RX_WINDOW sizes of 256KB - 512KB should be sufficient.
Setting the min, max, and default receive buffer (RX_WINDOW) size:
sysctl -w net.ipv4.tcp_rmem="<min> <default> <max>"
TCP window size for multiple connections:
The receive buffer (RX_WINDOW) size may be calculated the same as single
connections, but should be divided by the number of connections. The
smaller window prevents congestion and facilitates better pacing,
especially if/when MAC level flow control does not work well or when it is
not supported on the machine. Experimentation may be necessary to attain
the correct value. This method is provided as a starting point fot the
correct receive buffer size.
Setting the min, max, and default receive buffer (RX_WINDOW) size is
performed in the same manner as single connection.
DRIVER MESSAGES
===============
The following messages are the most common messages logged by syslog. These
may be found in /var/log/messages.
Driver up:
Chelsio Network Driver - version 2.1.1
NIC detected:
eth#: Chelsio N210 1x10GBaseX NIC (rev #), PCIX 133MHz/64-bit
Link up:
eth#: link is up at 10 Gbps, full duplex
Link down:
eth#: link is down
KNOWN ISSUES
============
These issues have been identified during testing. The following information
is provided as a workaround to the problem. In some cases, this problem is
inherent to Linux or to a particular Linux Distribution and/or hardware
platform.
1. Large number of TCP retransmits on a multiprocessor (SMP) system.
On a system with multiple CPUs, the interrupt (IRQ) for the network
controller may be bound to more than one CPU. This will cause TCP
retransmits if the packet data were to be split across different CPUs
and re-assembled in a different order than expected.
To eliminate the TCP retransmits, set smp_affinity on the particular
interrupt to a single CPU. You can locate the interrupt (IRQ) used on
the N110/N210 by using ifconfig:
ifconfig <dev_name> | grep Interrupt
Set the smp_affinity to a single CPU:
echo 1 > /proc/irq/<interrupt_number>/smp_affinity
It is highly suggested that you do not run the irqbalance daemon on your
system, as this will change any smp_affinity setting you have applied.
The irqbalance daemon runs on a 10 second interval and binds interrupts
to the least loaded CPU determined by the daemon. To disable this daemon:
chkconfig --level 2345 irqbalance off
By default, some Linux distributions enable the kernel feature,
irqbalance, which performs the same function as the daemon. To disable
this feature, add the following line to your bootloader:
noirqbalance
Example using the Grub bootloader:
title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance
initrd /initrd-2.4.21-27.ELsmp.img
2. After running insmod, the driver is loaded and the incorrect network
interface is brought up without running ifup.
When using 2.4.x kernels, including RHEL kernels, the Linux kernel
invokes a script named "hotplug". This script is primarily used to
automatically bring up USB devices when they are plugged in, however,
the script also attempts to automatically bring up a network interface
after loading the kernel module. The hotplug script does this by scanning
the ifcfg-eth# config files in /etc/sysconfig/network-scripts, looking
for HWADDR=<mac_address>.
If the hotplug script does not find the HWADDRR within any of the
ifcfg-eth# files, it will bring up the device with the next available
interface name. If this interface is already configured for a different
network card, your new interface will have incorrect IP address and
network settings.
To solve this issue, you can add the HWADDR=<mac_address> key to the
interface config file of your network controller.
To disable this "hotplug" feature, you may add the driver (module name)
to the "blacklist" file located in /etc/hotplug. It has been noted that
this does not work for network devices because the net.agent script
does not use the blacklist file. Simply remove, or rename, the net.agent
script located in /etc/hotplug to disable this feature.
3. Transport Protocol (TP) hangs when running heavy multi-connection traffic
on an AMD Opteron system with HyperTransport PCI-X Tunnel chipset.
If your AMD Opteron system uses the AMD-8131 HyperTransport PCI-X Tunnel
chipset, you may experience the "133-Mhz Mode Split Completion Data
Corruption" bug identified by AMD while using a 133Mhz PCI-X card on the
bus PCI-X bus.
AMD states, "Under highly specific conditions, the AMD-8131 PCI-X Tunnel
can provide stale data via split completion cycles to a PCI-X card that
is operating at 133 Mhz", causing data corruption.
AMD's provides three workarounds for this problem, however, Chelsio
recommends the first option for best performance with this bug:
For 133Mhz secondary bus operation, limit the transaction length and
the number of outstanding transactions, via BIOS configuration
programming of the PCI-X card, to the following:
Data Length (bytes): 1k
Total allowed outstanding transactions: 2
Please refer to AMD 8131-HT/PCI-X Errata 26310 Rev 3.08 August 2004,
section 56, "133-MHz Mode Split Completion Data Corruption" for more
details with this bug and workarounds suggested by AMD.
It may be possible to work outside AMD's recommended PCI-X settings, try
increasing the Data Length to 2k bytes for increased performance. If you
have issues with these settings, please revert to the "safe" settings
and duplicate the problem before submitting a bug or asking for support.
NOTE: The default setting on most systems is 8 outstanding transactions
and 2k bytes data length.
4. On multiprocessor systems, it has been noted that an application which
is handling 10Gb networking can switch between CPUs causing degraded
and/or unstable performance.
If running on an SMP system and taking performance measurements, it
is suggested you either run the latest netperf-2.4.0+ or use a binding
tool such as Tim Hockin's procstate utilities (runon)
<http://www.hockin.org/~thockin/procstate/>.
Binding netserver and netperf (or other applications) to particular
CPUs will have a significant difference in performance measurements.
You may need to experiment which CPU to bind the application to in
order to achieve the best performance for your system.
If you are developing an application designed for 10Gb networking,
please keep in mind you may want to look at kernel functions
sched_setaffinity & sched_getaffinity to bind your application.
If you are just running user-space applications such as ftp, telnet,
etc., you may want to try the runon tool provided by Tim Hockin's
procstate utility. You could also try binding the interface to a
particular CPU: runon 0 ifup eth0
SUPPORT
=======
If you have problems with the software or hardware, please contact our
customer support team via email at support@chelsio.com or check our website
at http://www.chelsio.com
===============================================================================
Chelsio Communications
370 San Aleso Ave.
Suite 100
Sunnyvale, CA 94085
http://www.chelsio.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Copyright (c) 2003-2005 Chelsio Communications. All rights reserved.
===============================================================================
This diff is collapsed.
Click to expand it.
Documentation/networking/phy.txt
0 → 100644
View file @
e3ee3b78
-------
PHY Abstraction Layer
(Updated 2005-07-21)
Purpose
Most network devices consist of set of registers which provide an interface
to a MAC layer, which communicates with the physical connection through a
PHY. The PHY concerns itself with negotiating link parameters with the link
partner on the other side of the network connection (typically, an ethernet
cable), and provides a register interface to allow drivers to determine what
settings were chosen, and to configure what settings are allowed.
While these devices are distinct from the network devices, and conform to a
standard layout for the registers, it has been common practice to integrate
the PHY management code with the network driver. This has resulted in large
amounts of redundant code. Also, on embedded systems with multiple (and
sometimes quite different) ethernet controllers connected to the same
management bus, it is difficult to ensure safe use of the bus.
Since the PHYs are devices, and the management busses through which they are
accessed are, in fact, busses, the PHY Abstraction Layer treats them as such.
In doing so, it has these goals:
1) Increase code-reuse
2) Increase overall code-maintainability
3) Speed development time for new network drivers, and for new systems
Basically, this layer is meant to provide an interface to PHY devices which
allows network driver writers to write as little code as possible, while
still providing a full feature set.
The MDIO bus
Most network devices are connected to a PHY by means of a management bus.
Different devices use different busses (though some share common interfaces).
In order to take advantage of the PAL, each bus interface needs to be
registered as a distinct device.
1) read and write functions must be implemented. Their prototypes are:
int write(struct mii_bus *bus, int mii_id, int regnum, u16 value);
int read(struct mii_bus *bus, int mii_id, int regnum);
mii_id is the address on the bus for the PHY, and regnum is the register
number. These functions are guaranteed not to be called from interrupt
time, so it is safe for them to block, waiting for an interrupt to signal
the operation is complete
2) A reset function is necessary. This is used to return the bus to an
initialized state.
3) A probe function is needed. This function should set up anything the bus
driver needs, setup the mii_bus structure, and register with the PAL using
mdiobus_register. Similarly, there's a remove function to undo all of
that (use mdiobus_unregister).
4) Like any driver, the device_driver structure must be configured, and init
exit functions are used to register the driver.
5) The bus must also be declared somewhere as a device, and registered.
As an example for how one driver implemented an mdio bus driver, see
drivers/net/gianfar_mii.c and arch/ppc/syslib/mpc85xx_devices.c
Connecting to a PHY
Sometime during startup, the network driver needs to establish a connection
between the PHY device, and the network device. At this time, the PHY's bus
and drivers need to all have been loaded, so it is ready for the connection.
At this point, there are several ways to connect to the PHY:
1) The PAL handles everything, and only calls the network driver when
the link state changes, so it can react.
2) The PAL handles everything except interrupts (usually because the
controller has the interrupt registers).
3) The PAL handles everything, but checks in with the driver every second,
allowing the network driver to react first to any changes before the PAL
does.
4) The PAL serves only as a library of functions, with the network device
manually calling functions to update status, and configure the PHY
Letting the PHY Abstraction Layer do Everything
If you choose option 1 (The hope is that every driver can, but to still be
useful to drivers that can't), connecting to the PHY is simple:
First, you need a function to react to changes in the link state. This
function follows this protocol:
static void adjust_link(struct net_device *dev);
Next, you need to know the device name of the PHY connected to this device.
The name will look something like, "phy0:0", where the first number is the
bus id, and the second is the PHY's address on that bus.
Now, to connect, just call this function:
phydev = phy_connect(dev, phy_name, &adjust_link, flags);
phydev is a pointer to the phy_device structure which represents the PHY. If
phy_connect is successful, it will return the pointer. dev, here, is the
pointer to your net_device. Once done, this function will have started the
PHY's software state machine, and registered for the PHY's interrupt, if it
has one. The phydev structure will be populated with information about the
current state, though the PHY will not yet be truly operational at this
point.
flags is a u32 which can optionally contain phy-specific flags.
This is useful if the system has put hardware restrictions on
the PHY/controller, of which the PHY needs to be aware.
Now just make sure that phydev->supported and phydev->advertising have any
values pruned from them which don't make sense for your controller (a 10/100
controller may be connected to a gigabit capable PHY, so you would need to
mask off SUPPORTED_1000baseT*). See include/linux/ethtool.h for definitions
for these bitfields. Note that you should not SET any bits, or the PHY may
get put into an unsupported state.
Lastly, once the controller is ready to handle network traffic, you call
phy_start(phydev). This tells the PAL that you are ready, and configures the
PHY to connect to the network. If you want to handle your own interrupts,
just set phydev->irq to PHY_IGNORE_INTERRUPT before you call phy_start.
Similarly, if you don't want to use interrupts, set phydev->irq to PHY_POLL.
When you want to disconnect from the network (even if just briefly), you call
phy_stop(phydev).
Keeping Close Tabs on the PAL
It is possible that the PAL's built-in state machine needs a little help to
keep your network device and the PHY properly in sync. If so, you can
register a helper function when connecting to the PHY, which will be called
every second before the state machine reacts to any changes. To do this, you
need to manually call phy_attach() and phy_prepare_link(), and then call
phy_start_machine() with the second argument set to point to your special
handler.
Currently there are no examples of how to use this functionality, and testing
on it has been limited because the author does not have any drivers which use
it (they all use option 1). So Caveat Emptor.
Doing it all yourself
There's a remote chance that the PAL's built-in state machine cannot track
the complex interactions between the PHY and your network device. If this is
so, you can simply call phy_attach(), and not call phy_start_machine or
phy_prepare_link(). This will mean that phydev->state is entirely yours to
handle (phy_start and phy_stop toggle between some of the states, so you
might need to avoid them).
An effort has been made to make sure that useful functionality can be
accessed without the state-machine running, and most of these functions are
descended from functions which did not interact with a complex state-machine.
However, again, no effort has been made so far to test running without the
state machine, so tryer beware.
Here is a brief rundown of the functions:
int phy_read(struct phy_device *phydev, u16 regnum);
int phy_write(struct phy_device *phydev, u16 regnum, u16 val);
Simple read/write primitives. They invoke the bus's read/write function
pointers.
void phy_print_status(struct phy_device *phydev);
A convenience function to print out the PHY status neatly.
int phy_clear_interrupt(struct phy_device *phydev);
int phy_config_interrupt(struct phy_device *phydev, u32 interrupts);
Clear the PHY's interrupt, and configure which ones are allowed,
respectively. Currently only supports all on, or all off.
int phy_enable_interrupts(struct phy_device *phydev);
int phy_disable_interrupts(struct phy_device *phydev);
Functions which enable/disable PHY interrupts, clearing them
before and after, respectively.
int phy_start_interrupts(struct phy_device *phydev);
int phy_stop_interrupts(struct phy_device *phydev);
Requests the IRQ for the PHY interrupts, then enables them for
start, or disables then frees them for stop.
struct phy_device * phy_attach(struct net_device *dev, const char *phy_id,
u32 flags);
Attaches a network device to a particular PHY, binding the PHY to a generic
driver if none was found during bus initialization. Passes in
any phy-specific flags as needed.
int phy_start_aneg(struct phy_device *phydev);
Using variables inside the phydev structure, either configures advertising
and resets autonegotiation, or disables autonegotiation, and configures
forced settings.
static inline int phy_read_status(struct phy_device *phydev);
Fills the phydev structure with up-to-date information about the current
settings in the PHY.
void phy_sanitize_settings(struct phy_device *phydev)
Resolves differences between currently desired settings, and
supported settings for the given PHY device. Does not make
the changes in the hardware, though.
int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd);
int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd);
Ethtool convenience functions.
int phy_mii_ioctl(struct phy_device *phydev,
struct mii_ioctl_data *mii_data, int cmd);
The MII ioctl. Note that this function will completely screw up the state
machine if you write registers like BMCR, BMSR, ADVERTISE, etc. Best to
use this only to write registers which are not standard, and don't set off
a renegotiation.
PHY Device Drivers
With the PHY Abstraction Layer, adding support for new PHYs is
quite easy. In some cases, no work is required at all! However,
many PHYs require a little hand-holding to get up-and-running.
Generic PHY driver
If the desired PHY doesn't have any errata, quirks, or special
features you want to support, then it may be best to not add
support, and let the PHY Abstraction Layer's Generic PHY Driver
do all of the work.
Writing a PHY driver
If you do need to write a PHY driver, the first thing to do is
make sure it can be matched with an appropriate PHY device.
This is done during bus initialization by reading the device's
UID (stored in registers 2 and 3), then comparing it to each
driver's phy_id field by ANDing it with each driver's
phy_id_mask field. Also, it needs a name. Here's an example:
static struct phy_driver dm9161_driver = {
.phy_id = 0x0181b880,
.name = "Davicom DM9161E",
.phy_id_mask = 0x0ffffff0,
...
}
Next, you need to specify what features (speed, duplex, autoneg,
etc) your PHY device and driver support. Most PHYs support
PHY_BASIC_FEATURES, but you can look in include/mii.h for other
features.
Each driver consists of a number of function pointers:
config_init: configures PHY into a sane state after a reset.
For instance, a Davicom PHY requires descrambling disabled.
probe: Does any setup needed by the driver
suspend/resume: power management
config_aneg: Changes the speed/duplex/negotiation settings
read_status: Reads the current speed/duplex/negotiation settings
ack_interrupt: Clear a pending interrupt
config_intr: Enable or disable interrupts
remove: Does any driver take-down
Of these, only config_aneg and read_status are required to be
assigned by the driver code. The rest are optional. Also, it is
preferred to use the generic phy driver's versions of these two
functions if at all possible: genphy_read_status and
genphy_config_aneg. If this is not possible, it is likely that
you only need to perform some actions before and after invoking
these functions, and so your functions will wrap the generic
ones.
Feel free to look at the Marvell, Cicada, and Davicom drivers in
drivers/net/phy/ for examples (the lxt and qsemi drivers have
not been tested as of this writing)
This diff is collapsed.
Click to expand it.
Documentation/sound/alsa/ALSA-Configuration.txt
View file @
e3ee3b78
...
...
@@ -132,6 +132,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
mpu_irq - IRQ # for MPU-401 UART (PnP setup)
dma1 - first DMA # for AD1816A chip (PnP setup)
dma2 - second DMA # for AD1816A chip (PnP setup)
clockfreq - Clock frequency for AD1816A chip (default = 0, 33000Hz)
Module supports up to 8 cards, autoprobe and PnP.
...
...
This diff is collapsed.
Click to expand it.
Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
View file @
e3ee3b78
...
...
@@ -3422,10 +3422,17 @@ struct _snd_pcm_runtime {
<para>
The
<structfield>
iface
</structfield>
field specifies the type of
the control,
<constant>
SNDRV_CTL_ELEM_IFACE_XXX
</constant>
. There are
<constant>
MIXER
</constant>
,
<constant>
PCM
</constant>
,
<constant>
CARD
</constant>
, etc.
the control,
<constant>
SNDRV_CTL_ELEM_IFACE_XXX
</constant>
, which
is usually
<constant>
MIXER
</constant>
.
Use
<constant>
CARD
</constant>
for global controls that are not
logically part of the mixer.
If the control is closely associated with some specific device on
the sound card, use
<constant>
HWDEP
</constant>
,
<constant>
PCM
</constant>
,
<constant>
RAWMIDI
</constant>
,
<constant>
TIMER
</constant>
, or
<constant>
SEQUENCER
</constant>
, and
specify the device number with the
<structfield>
device
</structfield>
and
<structfield>
subdevice
</structfield>
fields.
</para>
<para>
...
...
This diff is collapsed.
Click to expand it.
MAINTAINERS
View file @
e3ee3b78
...
...
@@ -2092,6 +2092,12 @@ M: support@simtec.co.uk
W: http://www.simtec.co.uk/products/EB2410ITX/
S: Supported
SIS 190 ETHERNET DRIVER
P: Francois Romieu
M: romieu@fr.zoreil.com
L: netdev@vger.kernel.org
S: Maintained
SIS 5513 IDE CONTROLLER DRIVER
P: Lionel Bouton
M: Lionel.Bouton@inet6.fr
...
...
This diff is collapsed.
Click to expand it.
Makefile
View file @
e3ee3b78
VERSION
=
2
PATCHLEVEL
=
6
SUBLEVEL
=
13
EXTRAVERSION
=
-rc7
NAME
=
Woozy Numbat
EXTRAVERSION
=
NAME
=
Affluent Albatross
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
...
...
This diff is collapsed.
Click to expand it.
arch/alpha/kernel/signal.c
View file @
e3ee3b78
...
...
@@ -566,13 +566,12 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
if
(
ka
->
sa
.
sa_flags
&
SA_RESETHAND
)
ka
->
sa
.
sa_handler
=
SIG_DFL
;
if
(
!
(
ka
->
sa
.
sa_flags
&
SA_NODEFER
))
{
s
pin_lock_irq
(
&
current
->
sighand
->
sigloc
k
);
sigorsets
(
&
current
->
blocked
,
&
current
->
blocked
,
&
ka
->
sa
.
sa_mask
);
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
s
igorsets
(
&
current
->
blocked
,
&
current
->
blocked
,
&
ka
->
sa
.
sa_mas
k
);
if
(
!
(
ka
->
sa
.
sa_flags
&
SA_NODEFER
))
sigaddset
(
&
current
->
blocked
,
sig
);
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
}
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
}
static
inline
void
...
...
This diff is collapsed.
Click to expand it.
arch/arm/Kconfig
View file @
e3ee3b78
...
...
@@ -635,10 +635,6 @@ config PM
and the Battery Powered Linux mini-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.
Note that, even if you say N here, Linux on the x86 architecture
will issue the hlt instruction if nothing is to be done, thereby
sending the processor to sleep and saving power.
config APM
tristate "Advanced Power Management Emulation"
depends on PM
...
...
@@ -650,12 +646,6 @@ config APM
battery status information, and user-space programs will receive
notification of APM "events" (e.g. battery status change).
If you select "Y" here, you can disable actual use of the APM
BIOS by passing the "apm=off" option to the kernel at boot time.
Note that the APM support is almost completely disabled for
machines with more than one CPU.
In order to use APM, you will need supporting software. For location
and more information, read <file:Documentation/pm.txt> and the
Battery Powered Linux mini-HOWTO, available from
...
...
@@ -665,39 +655,12 @@ config APM
manpage ("man 8 hdparm") for that), and it doesn't turn off
VESA-compliant "green" monitors.
This driver does not support the TI 4000M TravelMate and the ACER
486/DX4/75 because they don't have compliant BIOSes. Many "green"
desktop machines also don't have compliant BIOSes, and this driver
may cause those machines to panic during the boot phase.
Generally, if you don't have a battery in your machine, there isn't
much point in using this driver and you should say N. If you get
random kernel OOPSes or reboots that don't seem to be related to
anything, try disabling/enabling this option (or disabling/enabling
APM in your BIOS).
Some other things you should try when experiencing seemingly random,
"weird" problems:
1) make sure that you have enough swap space and that it is
enabled.
2) pass the "no-hlt" option to the kernel
3) switch on floating point emulation in the kernel and pass
the "no387" option to the kernel
4) pass the "floppy=nodma" option to the kernel
5) pass the "mem=4M" option to the kernel (thereby disabling
all but the first 4 MB of RAM)
6) make sure that the CPU is not over clocked.
7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
8) disable the cache from your BIOS settings
9) install a fan for the video card or exchange video RAM
10) install a better fan for the CPU
11) exchange RAM chips
12) exchange the motherboard.
To compile this driver as a module, choose M here: the
module will be called apm.
endmenu
source "net/Kconfig"
...
...
@@ -752,6 +715,8 @@ source "drivers/hwmon/Kconfig"
source "drivers/misc/Kconfig"
source "drivers/mfd/Kconfig"
source "drivers/media/Kconfig"
source "drivers/video/Kconfig"
...
...
This diff is collapsed.
Click to expand it.
arch/arm/common/Kconfig
View file @
e3ee3b78
config ICST525
bool
config ARM_GIC
bool
config ICST307
bool
...
...
This diff is collapsed.
Click to expand it.
arch/arm/common/Makefile
View file @
e3ee3b78
...
...
@@ -4,6 +4,7 @@
obj-y
+=
rtctime.o
obj-$(CONFIG_ARM_AMBA)
+=
amba.o
obj-$(CONFIG_ARM_GIC)
+=
gic.o
obj-$(CONFIG_ICST525)
+=
icst525.o
obj-$(CONFIG_ICST307)
+=
icst307.o
obj-$(CONFIG_SA1111)
+=
sa1111.o
...
...
This diff is collapsed.
Click to expand it.
arch/arm/common/gic.c
0 → 100644
View file @
e3ee3b78
/*
* linux/arch/arm/common/gic.c
*
* Copyright (C) 2002 ARM Limited, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Interrupt architecture for the GIC:
*
* o There is one Interrupt Distributor, which receives interrupts
* from system devices and sends them to the Interrupt Controllers.
*
* o There is one CPU Interface per CPU, which sends interrupts sent
* by the Distributor, and interrupts generated locally, to the
* associated CPU.
*
* Note that IRQs 0-31 are special - they are local to each CPU.
* As such, the enable set/clear, pending set/clear and active bit
* registers are banked per-cpu for these sources.
*/
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/smp.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/mach/irq.h>
#include <asm/hardware/gic.h>
static
void
__iomem
*
gic_dist_base
;
static
void
__iomem
*
gic_cpu_base
;
/*
* Routines to acknowledge, disable and enable interrupts
*
* Linux assumes that when we're done with an interrupt we need to
* unmask it, in the same way we need to unmask an interrupt when
* we first enable it.
*
* The GIC has a seperate notion of "end of interrupt" to re-enable
* an interrupt after handling, in order to support hardware
* prioritisation.
*
* We can make the GIC behave in the way that Linux expects by making
* our "acknowledge" routine disable the interrupt, then mark it as
* complete.
*/
static
void
gic_ack_irq
(
unsigned
int
irq
)
{
u32
mask
=
1
<<
(
irq
%
32
);
writel
(
mask
,
gic_dist_base
+
GIC_DIST_ENABLE_CLEAR
+
(
irq
/
32
)
*
4
);
writel
(
irq
,
gic_cpu_base
+
GIC_CPU_EOI
);
}
static
void
gic_mask_irq
(
unsigned
int
irq
)
{
u32
mask
=
1
<<
(
irq
%
32
);
writel
(
mask
,
gic_dist_base
+
GIC_DIST_ENABLE_CLEAR
+
(
irq
/
32
)
*
4
);
}
static
void
gic_unmask_irq
(
unsigned
int
irq
)
{
u32
mask
=
1
<<
(
irq
%
32
);
writel
(
mask
,
gic_dist_base
+
GIC_DIST_ENABLE_SET
+
(
irq
/
32
)
*
4
);
}
static
void
gic_set_cpu
(
struct
irqdesc
*
desc
,
unsigned
int
irq
,
unsigned
int
cpu
)
{
void
__iomem
*
reg
=
gic_dist_base
+
GIC_DIST_TARGET
+
(
irq
&
~
3
);
unsigned
int
shift
=
(
irq
%
4
)
*
8
;
u32
val
;
val
=
readl
(
reg
)
&
~
(
0xff
<<
shift
);
val
|=
1
<<
(
cpu
+
shift
);
writel
(
val
,
reg
);
}
static
struct
irqchip
gic_chip
=
{
.
ack
=
gic_ack_irq
,
.
mask
=
gic_mask_irq
,
.
unmask
=
gic_unmask_irq
,
#ifdef CONFIG_SMP
.
set_cpu
=
gic_set_cpu
,
#endif
};
void
__init
gic_dist_init
(
void
__iomem
*
base
)
{
unsigned
int
max_irq
,
i
;
u32
cpumask
=
1
<<
smp_processor_id
();
cpumask
|=
cpumask
<<
8
;
cpumask
|=
cpumask
<<
16
;
gic_dist_base
=
base
;
writel
(
0
,
base
+
GIC_DIST_CTRL
);
/*
* Find out how many interrupts are supported.
*/
max_irq
=
readl
(
base
+
GIC_DIST_CTR
)
&
0x1f
;
max_irq
=
(
max_irq
+
1
)
*
32
;
/*
* The GIC only supports up to 1020 interrupt sources.
* Limit this to either the architected maximum, or the
* platform maximum.
*/
if
(
max_irq
>
max
(
1020
,
NR_IRQS
))
max_irq
=
max
(
1020
,
NR_IRQS
);
/*
* Set all global interrupts to be level triggered, active low.
*/
for
(
i
=
32
;
i
<
max_irq
;
i
+=
16
)
writel
(
0
,
base
+
GIC_DIST_CONFIG
+
i
*
4
/
16
);
/*
* Set all global interrupts to this CPU only.
*/
for
(
i
=
32
;
i
<
max_irq
;
i
+=
4
)
writel
(
cpumask
,
base
+
GIC_DIST_TARGET
+
i
*
4
/
4
);
/*
* Set priority on all interrupts.
*/
for
(
i
=
0
;
i
<
max_irq
;
i
+=
4
)
writel
(
0xa0a0a0a0
,
base
+
GIC_DIST_PRI
+
i
*
4
/
4
);
/*
* Disable all interrupts.
*/
for
(
i
=
0
;
i
<
max_irq
;
i
+=
32
)
writel
(
0xffffffff
,
base
+
GIC_DIST_ENABLE_CLEAR
+
i
*
4
/
32
);
/*
* Setup the Linux IRQ subsystem.
*/
for
(
i
=
29
;
i
<
max_irq
;
i
++
)
{
set_irq_chip
(
i
,
&
gic_chip
);
set_irq_handler
(
i
,
do_level_IRQ
);
set_irq_flags
(
i
,
IRQF_VALID
|
IRQF_PROBE
);
}
writel
(
1
,
base
+
GIC_DIST_CTRL
);
}
void
__cpuinit
gic_cpu_init
(
void
__iomem
*
base
)
{
gic_cpu_base
=
base
;
writel
(
0xf0
,
base
+
GIC_CPU_PRIMASK
);
writel
(
1
,
base
+
GIC_CPU_CTRL
);
}
#ifdef CONFIG_SMP
void
gic_raise_softirq
(
cpumask_t
cpumask
,
unsigned
int
irq
)
{
unsigned
long
map
=
*
cpus_addr
(
cpumask
);
writel
(
map
<<
16
|
irq
,
gic_dist_base
+
GIC_DIST_SOFTINT
);
}
#endif
This diff is collapsed.
Click to expand it.
arch/arm/kernel/signal.c
View file @
e3ee3b78
...
...
@@ -658,11 +658,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
/*
* Block the signal if we were unsuccessful.
*/
if
(
ret
!=
0
||
!
(
ka
->
sa
.
sa_flags
&
SA_NODEFER
)
)
{
if
(
ret
!=
0
)
{
spin_lock_irq
(
&
tsk
->
sighand
->
siglock
);
sigorsets
(
&
tsk
->
blocked
,
&
tsk
->
blocked
,
&
ka
->
sa
.
sa_mask
);
sigaddset
(
&
tsk
->
blocked
,
sig
);
if
(
!
(
ka
->
sa
.
sa_flags
&
SA_NODEFER
))
sigaddset
(
&
tsk
->
blocked
,
sig
);
recalc_sigpending
();
spin_unlock_irq
(
&
tsk
->
sighand
->
siglock
);
}
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-ixp4xx/coyote-setup.c
View file @
e3ee3b78
...
...
@@ -36,7 +36,7 @@ static struct flash_platform_data coyote_flash_data = {
static
struct
resource
coyote_flash_resource
=
{
.
start
=
COYOTE_FLASH_BASE
,
.
end
=
COYOTE_FLASH_BASE
+
COYOTE_FLASH_SIZE
,
.
end
=
COYOTE_FLASH_BASE
+
COYOTE_FLASH_SIZE
-
1
,
.
flags
=
IORESOURCE_MEM
,
};
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-ixp4xx/gtwx5715-setup.c
View file @
e3ee3b78
...
...
@@ -114,7 +114,7 @@ static struct flash_platform_data gtwx5715_flash_data = {
static
struct
resource
gtwx5715_flash_resource
=
{
.
start
=
GTWX5715_FLASH_BASE
,
.
end
=
GTWX5715_FLASH_BASE
+
GTWX5715_FLASH_SIZE
,
.
end
=
GTWX5715_FLASH_BASE
+
GTWX5715_FLASH_SIZE
-
1
,
.
flags
=
IORESOURCE_MEM
,
};
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-ixp4xx/ixdp425-setup.c
View file @
e3ee3b78
...
...
@@ -36,7 +36,7 @@ static struct flash_platform_data ixdp425_flash_data = {
static
struct
resource
ixdp425_flash_resource
=
{
.
start
=
IXDP425_FLASH_BASE
,
.
end
=
IXDP425_FLASH_BASE
+
IXDP425_FLASH_SIZE
,
.
end
=
IXDP425_FLASH_BASE
+
IXDP425_FLASH_SIZE
-
1
,
.
flags
=
IORESOURCE_MEM
,
};
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-sa1100/assabet.c
View file @
e3ee3b78
...
...
@@ -35,6 +35,7 @@
#include <asm/mach/map.h>
#include <asm/mach/serial_sa1100.h>
#include <asm/arch/assabet.h>
#include <asm/arch/mcp.h>
#include "generic.h"
...
...
@@ -198,6 +199,11 @@ static struct irda_platform_data assabet_irda_data = {
.
set_speed
=
assabet_irda_set_speed
,
};
static
struct
mcp_plat_data
assabet_mcp_data
=
{
.
mccr0
=
MCCR0_ADM
,
.
sclk_rate
=
11981000
,
};
static
void
__init
assabet_init
(
void
)
{
/*
...
...
@@ -246,6 +252,7 @@ static void __init assabet_init(void)
sa11x0_set_flash_data
(
&
assabet_flash_data
,
assabet_flash_resources
,
ARRAY_SIZE
(
assabet_flash_resources
));
sa11x0_set_irda_data
(
&
assabet_irda_data
);
sa11x0_set_mcp_data
(
&
assabet_mcp_data
);
}
/*
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-sa1100/cerf.c
View file @
e3ee3b78
...
...
@@ -29,6 +29,7 @@
#include <asm/mach/serial_sa1100.h>
#include <asm/arch/cerf.h>
#include <asm/arch/mcp.h>
#include "generic.h"
static
struct
resource
cerfuart2_resources
[]
=
{
...
...
@@ -116,10 +117,16 @@ static void __init cerf_map_io(void)
GPDR
|=
CERF_GPIO_CF_RESET
;
}
static
struct
mcp_plat_data
cerf_mcp_data
=
{
.
mccr0
=
MCCR0_ADM
,
.
sclk_rate
=
11981000
,
};
static
void
__init
cerf_init
(
void
)
{
platform_add_devices
(
cerf_devices
,
ARRAY_SIZE
(
cerf_devices
));
sa11x0_set_flash_data
(
&
cerf_flash_data
,
&
cerf_flash_resource
,
1
);
sa11x0_set_mcp_data
(
&
cerf_mcp_data
);
}
MACHINE_START
(
CERF
,
"Intrinsyc CerfBoard/CerfCube"
)
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-sa1100/generic.c
View file @
e3ee3b78
...
...
@@ -221,6 +221,11 @@ static struct platform_device sa11x0mcp_device = {
.
resource
=
sa11x0mcp_resources
,
};
void
sa11x0_set_mcp_data
(
struct
mcp_plat_data
*
data
)
{
sa11x0mcp_device
.
dev
.
platform_data
=
data
;
}
static
struct
resource
sa11x0ssp_resources
[]
=
{
[
0
]
=
{
.
start
=
0x80070000
,
...
...
This diff is collapsed.
Click to expand it.
arch/arm/mach-sa1100/generic.h
View file @
e3ee3b78
...
...
@@ -34,5 +34,8 @@ struct resource;
extern
void
sa11x0_set_flash_data
(
struct
flash_platform_data
*
flash
,
struct
resource
*
res
,
int
nr
);
struct
sa11x0_ssp_plat_ops
;
extern
void
sa11x0_set_ssp_data
(
struct
sa11x0_ssp_plat_ops
*
ops
);
struct
irda_platform_data
;
void
sa11x0_set_irda_data
(
struct
irda_platform_data
*
irda
);
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
…
50
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment