mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (150 commits) [PATCH] ipw2100: Update version ipw2100 stamp to 1.2.2 [PATCH] ipw2100: move mutex.h include from ipw2100.c to ipw2100.h [PATCH] ipw2100: semaphore to mutexes conversion [PATCH] ipw2100: Fix radiotap code gcc warning [PATCH] ipw2100: add radiotap headers to packtes captured in monitor mode [PATCH] ipw2x00: expend Copyright to 2006 [PATCH] drivers/net/wireless/ipw2200.c: fix an array overun [PATCH] ieee80211: Don't update network statistics from off-channel packets. [PATCH] ipw2200: Update ipw2200 version stamp to 1.1.1 [PATCH] ipw2200: switch to the new ipw2200-fw-3.0 image format [PATCH] ipw2200: wireless extension sensitivity threshold support [PATCH] ipw2200: Enables the "slow diversity" algorithm [PATCH] ipw2200: Set a meaningful silence threshold value [PATCH] ipw2200: export `debug' module param only if CONFIG_IPW2200_DEBUG [PATCH] ipw2200: Change debug level for firmware error logging [PATCH] ipw2200: Filter unsupported channels out in ad-hoc mode [PATCH] ipw2200: Fix ipw_sw_reset() implementation inconsistent with comment [PATCH] ipw2200: Fix rf_kill is activated after mode change with 'disable=1' [PATCH] ipw2200: remove the WPA card associates to non-WPA AP checking [PATCH] ipw2200: Add signal level to iwlist scan output ...
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
|
||||
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
||||
procfs-guide.xml writing_usb_driver.xml \
|
||||
sis900.xml kernel-api.xml journal-api.xml lsm.xml usb.xml \
|
||||
kernel-api.xml journal-api.xml lsm.xml usb.xml \
|
||||
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml
|
||||
|
||||
###
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -151,6 +151,13 @@ Who: Ralf Baechle <ralf@linux-mips.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: eepro100 network driver
|
||||
When: January 2007
|
||||
Why: replaced by the e100 driver
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Legacy /proc/pci interface (PCI_LEGACY_PROC)
|
||||
When: March 2006
|
||||
Why: deprecated since 2.5.53 in favor of lspci(8)
|
||||
|
||||
@@ -92,8 +92,6 @@ routing.txt
|
||||
- the new routing mechanism
|
||||
shaper.txt
|
||||
- info on the module that can shape/limit transmitted traffic.
|
||||
sis900.txt
|
||||
- SiS 900/7016 Fast Ethernet device driver info.
|
||||
sk98lin.txt
|
||||
- Marvell Yukon Chipset / SysKonnect SK-98xx compliant Gigabit
|
||||
Ethernet Adapter family driver info
|
||||
|
||||
@@ -3,18 +3,18 @@ Intel(R) PRO/Wireless 2100 Driver for Linux in support of:
|
||||
|
||||
Intel(R) PRO/Wireless 2100 Network Connection
|
||||
|
||||
Copyright (C) 2003-2005, Intel Corporation
|
||||
Copyright (C) 2003-2006, Intel Corporation
|
||||
|
||||
README.ipw2100
|
||||
|
||||
Version: 1.1.3
|
||||
Date : October 17, 2005
|
||||
Version: git-1.1.5
|
||||
Date : January 25, 2006
|
||||
|
||||
Index
|
||||
-----------------------------------------------
|
||||
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
||||
1. Introduction
|
||||
2. Release 1.1.3 Current Features
|
||||
2. Release git-1.1.5 Current Features
|
||||
3. Command Line Parameters
|
||||
4. Sysfs Helper Files
|
||||
5. Radio Kill Switch
|
||||
@@ -89,7 +89,7 @@ potential fixes and patches, as well as links to the development mailing list
|
||||
for the driver project.
|
||||
|
||||
|
||||
2. Release 1.1.3 Current Supported Features
|
||||
2. Release git-1.1.5 Current Supported Features
|
||||
-----------------------------------------------
|
||||
- Managed (BSS) and Ad-Hoc (IBSS)
|
||||
- WEP (shared key and open)
|
||||
@@ -270,7 +270,7 @@ For installation support on the ipw2100 1.1.0 driver on Linux kernels
|
||||
9. License
|
||||
-----------------------------------------------
|
||||
|
||||
Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.
|
||||
Copyright(c) 2003 - 2006 Intel Corporation. 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
|
||||
|
||||
@@ -10,7 +10,7 @@ both hardware adapters listed above. In this document the Intel(R)
|
||||
PRO/Wireless 2915ABG Driver for Linux will be used to reference the
|
||||
unified driver.
|
||||
|
||||
Copyright (C) 2004-2005, Intel Corporation
|
||||
Copyright (C) 2004-2006, Intel Corporation
|
||||
|
||||
README.ipw2200
|
||||
|
||||
@@ -26,9 +26,11 @@ Index
|
||||
1.2. Module parameters
|
||||
1.3. Wireless Extension Private Methods
|
||||
1.4. Sysfs Helper Files
|
||||
1.5. Supported channels
|
||||
2. Ad-Hoc Networking
|
||||
3. Interacting with Wireless Tools
|
||||
3.1. iwconfig mode
|
||||
3.2. iwconfig sens
|
||||
4. About the Version Numbers
|
||||
5. Firmware installation
|
||||
6. Support
|
||||
@@ -314,6 +316,35 @@ For the device level files, see /sys/bus/pci/drivers/ipw2200:
|
||||
running ifconfig and is therefore disabled by default.
|
||||
|
||||
|
||||
1.5. Supported channels
|
||||
-----------------------------------------------
|
||||
|
||||
Upon loading the Intel(R) PRO/Wireless 2915ABG Driver for Linux, a
|
||||
message stating the detected geography code and the number of 802.11
|
||||
channels supported by the card will be displayed in the log.
|
||||
|
||||
The geography code corresponds to a regulatory domain as shown in the
|
||||
table below.
|
||||
|
||||
Supported channels
|
||||
Code Geography 802.11bg 802.11a
|
||||
|
||||
--- Restricted 11 0
|
||||
ZZF Custom US/Canada 11 8
|
||||
ZZD Rest of World 13 0
|
||||
ZZA Custom USA & Europe & High 11 13
|
||||
ZZB Custom NA & Europe 11 13
|
||||
ZZC Custom Japan 11 4
|
||||
ZZM Custom 11 0
|
||||
ZZE Europe 13 19
|
||||
ZZJ Custom Japan 14 4
|
||||
ZZR Rest of World 14 0
|
||||
ZZH High Band 13 4
|
||||
ZZG Custom Europe 13 4
|
||||
ZZK Europe 13 24
|
||||
ZZL Europe 11 13
|
||||
|
||||
|
||||
2. Ad-Hoc Networking
|
||||
-----------------------------------------------
|
||||
|
||||
@@ -353,6 +384,15 @@ When configuring the mode of the adapter, all run-time configured parameters
|
||||
are reset to the value used when the module was loaded. This includes
|
||||
channels, rates, ESSID, etc.
|
||||
|
||||
3.2 iwconfig sens
|
||||
-----------------------------------------------
|
||||
|
||||
The 'iwconfig ethX sens XX' command will not set the signal sensitivity
|
||||
threshold, as described in iwconfig documentation, but rather the number
|
||||
of consecutive missed beacons that will trigger handover, i.e. roaming
|
||||
to another access point. At the same time, it will set the disassociation
|
||||
threshold to 3 times the given value.
|
||||
|
||||
|
||||
4. About the Version Numbers
|
||||
-----------------------------------------------
|
||||
@@ -408,7 +448,7 @@ For general information and support, go to:
|
||||
7. License
|
||||
-----------------------------------------------
|
||||
|
||||
Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.
|
||||
Copyright(c) 2003 - 2006 Intel Corporation. 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
|
||||
|
||||
@@ -1,257 +0,0 @@
|
||||
|
||||
SiS 900/7016 Fast Ethernet Device Driver
|
||||
|
||||
Ollie Lho
|
||||
|
||||
Lei Chun Chang
|
||||
|
||||
Copyright © 1999 by Silicon Integrated System Corp.
|
||||
|
||||
This document gives some information on installation and usage of SiS
|
||||
900/7016 device driver under Linux.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or (at
|
||||
your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
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
|
||||
_________________________________________________________________
|
||||
|
||||
Table of Contents
|
||||
1. Introduction
|
||||
2. Changes
|
||||
3. Tested Environment
|
||||
4. Files in This Package
|
||||
5. Installation
|
||||
|
||||
Building the driver as loadable module
|
||||
Building the driver into kernel
|
||||
|
||||
6. Known Problems and Bugs
|
||||
7. Revision History
|
||||
8. Acknowledgements
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 1. Introduction
|
||||
|
||||
This document describes the revision 1.06 and 1.07 of SiS 900/7016
|
||||
Fast Ethernet device driver under Linux. The driver is developed by
|
||||
Silicon Integrated System Corp. and distributed freely under the GNU
|
||||
General Public License (GPL). The driver can be compiled as a loadable
|
||||
module and used under Linux kernel version 2.2.x. (rev. 1.06) With
|
||||
minimal changes, the driver can also be used under 2.3.x and 2.4.x
|
||||
kernel (rev. 1.07), please see Chapter 5. If you are intended to use
|
||||
the driver for earlier kernels, you are on your own.
|
||||
|
||||
The driver is tested with usual TCP/IP applications including FTP,
|
||||
Telnet, Netscape etc. and is used constantly by the developers.
|
||||
|
||||
Please send all comments/fixes/questions to Lei-Chun Chang.
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 2. Changes
|
||||
|
||||
Changes made in Revision 1.07
|
||||
|
||||
1. Separation of sis900.c and sis900.h in order to move most constant
|
||||
definition to sis900.h (many of those constants were corrected)
|
||||
2. Clean up PCI detection, the pci-scan from Donald Becker were not
|
||||
used, just simple pci_find_*.
|
||||
3. MII detection is modified to support multiple mii transceiver.
|
||||
4. Bugs in read_eeprom, mdio_* were removed.
|
||||
5. Lot of sis900 irrelevant comments were removed/changed and more
|
||||
comments were added to reflect the real situation.
|
||||
6. Clean up of physical/virtual address space mess in buffer
|
||||
descriptors.
|
||||
7. Better transmit/receive error handling.
|
||||
8. The driver now uses zero-copy single buffer management scheme to
|
||||
improve performance.
|
||||
9. Names of variables were changed to be more consistent.
|
||||
10. Clean up of auo-negotiation and timer code.
|
||||
11. Automatic detection and change of PHY on the fly.
|
||||
12. Bug in mac probing fixed.
|
||||
13. Fix 630E equalier problem by modifying the equalizer workaround
|
||||
rule.
|
||||
14. Support for ICS1893 10/100 Interated PHYceiver.
|
||||
15. Support for media select by ifconfig.
|
||||
16. Added kernel-doc extratable documentation.
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 3. Tested Environment
|
||||
|
||||
This driver is developed on the following hardware
|
||||
|
||||
* Intel Celeron 500 with SiS 630 (rev 02) chipset
|
||||
* SiS 900 (rev 01) and SiS 7016/7014 Fast Ethernet Card
|
||||
|
||||
and tested with these software environments
|
||||
|
||||
* Red Hat Linux version 6.2
|
||||
* Linux kernel version 2.4.0
|
||||
* Netscape version 4.6
|
||||
* NcFTP 3.0.0 beta 18
|
||||
* Samba version 2.0.3
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 4. Files in This Package
|
||||
|
||||
In the package you can find these files:
|
||||
|
||||
sis900.c
|
||||
Driver source file in C
|
||||
|
||||
sis900.h
|
||||
Header file for sis900.c
|
||||
|
||||
sis900.sgml
|
||||
DocBook SGML source of the document
|
||||
|
||||
sis900.txt
|
||||
Driver document in plain text
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 5. Installation
|
||||
|
||||
Silicon Integrated System Corp. is cooperating closely with core Linux
|
||||
Kernel developers. The revisions of SiS 900 driver are distributed by
|
||||
the usuall channels for kernel tar files and patches. Those kernel tar
|
||||
files for official kernel and patches for kernel pre-release can be
|
||||
download at official kernel ftp site and its mirrors. The 1.06
|
||||
revision can be found in kernel version later than 2.3.15 and
|
||||
pre-2.2.14, and 1.07 revision can be found in kernel version 2.4.0. If
|
||||
you have no prior experience in networking under Linux, please read
|
||||
Ethernet HOWTO and Networking HOWTO available from Linux Documentation
|
||||
Project (LDP).
|
||||
|
||||
The driver is bundled in release later than 2.2.11 and 2.3.15 so this
|
||||
is the most easy case. Be sure you have the appropriate packages for
|
||||
compiling kernel source. Those packages are listed in Document/Changes
|
||||
in kernel source distribution. If you have to install the driver other
|
||||
than those bundled in kernel release, you should have your driver file
|
||||
sis900.c and sis900.h copied into /usr/src/linux/drivers/net/ first.
|
||||
There are two alternative ways to install the driver
|
||||
_________________________________________________________________
|
||||
|
||||
Building the driver as loadable module
|
||||
|
||||
To build the driver as a loadable kernel module you have to
|
||||
reconfigure the kernel to activate network support by
|
||||
|
||||
make menuconfig
|
||||
|
||||
Choose "Loadable module support --->", then select "Enable loadable
|
||||
module support".
|
||||
|
||||
Choose "Network Device Support --->", select "Ethernet (10 or
|
||||
100Mbit)". Then select "EISA, VLB, PCI and on board controllers", and
|
||||
choose "SiS 900/7016 PCI Fast Ethernet Adapter support" to "M".
|
||||
|
||||
After reconfiguring the kernel, you can make the driver module by
|
||||
|
||||
make modules
|
||||
|
||||
The driver should be compiled with no errors. After compiling the
|
||||
driver, the driver can be installed to proper place by
|
||||
|
||||
make modules_install
|
||||
|
||||
Load the driver into kernel by
|
||||
|
||||
insmod sis900
|
||||
|
||||
When loading the driver into memory, some information message can be
|
||||
view by
|
||||
|
||||
dmesg
|
||||
|
||||
or
|
||||
cat /var/log/message
|
||||
|
||||
If the driver is loaded properly you will have messages similar to
|
||||
this:
|
||||
|
||||
sis900.c: v1.07.06 11/07/2000
|
||||
eth0: SiS 900 PCI Fast Ethernet at 0xd000, IRQ 10, 00:00:e8:83:7f:a4.
|
||||
eth0: SiS 900 Internal MII PHY transceiver found at address 1.
|
||||
eth0: Using SiS 900 Internal MII PHY as default
|
||||
|
||||
showing the version of the driver and the results of probing routine.
|
||||
|
||||
Once the driver is loaded, network can be brought up by
|
||||
|
||||
/sbin/ifconfig eth0 IPADDR broadcast BROADCAST netmask NETMASK media TYPE
|
||||
|
||||
where IPADDR, BROADCAST, NETMASK are your IP address, broadcast
|
||||
address and netmask respectively. TYPE is used to set medium type used
|
||||
by the device. Typical values are "10baseT"(twisted-pair 10Mbps
|
||||
Ethernet) or "100baseT" (twisted-pair 100Mbps Ethernet). For more
|
||||
information on how to configure network interface, please refer to
|
||||
Networking HOWTO.
|
||||
|
||||
The link status is also shown by kernel messages. For example, after
|
||||
the network interface is activated, you may have the message:
|
||||
|
||||
eth0: Media Link On 100mbps full-duplex
|
||||
|
||||
If you try to unplug the twist pair (TP) cable you will get
|
||||
|
||||
eth0: Media Link Off
|
||||
|
||||
indicating that the link is failed.
|
||||
_________________________________________________________________
|
||||
|
||||
Building the driver into kernel
|
||||
|
||||
If you want to make the driver into kernel, choose "Y" rather than "M"
|
||||
on "SiS 900/7016 PCI Fast Ethernet Adapter support" when configuring
|
||||
the kernel. Build the kernel image in the usual way
|
||||
|
||||
make clean
|
||||
|
||||
make bzlilo
|
||||
|
||||
Next time the system reboot, you have the driver in memory.
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 6. Known Problems and Bugs
|
||||
|
||||
There are some known problems and bugs. If you find any other bugs
|
||||
please mail to lcchang@sis.com.tw
|
||||
|
||||
1. AM79C901 HomePNA PHY is not thoroughly tested, there may be some
|
||||
bugs in the "on the fly" change of transceiver.
|
||||
2. A bug is hidden somewhere in the receive buffer management code,
|
||||
the bug causes NULL pointer reference in the kernel. This fault is
|
||||
caught before bad things happen and reported with the message:
|
||||
eth0: NULL pointer encountered in Rx ring, skipping which can be
|
||||
viewed with dmesg or cat /var/log/message.
|
||||
3. The media type change from 10Mbps to 100Mbps twisted-pair ethernet
|
||||
by ifconfig causes the media link down.
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 7. Revision History
|
||||
|
||||
* November 13, 2000, Revision 1.07, seventh release, 630E problem
|
||||
fixed and further clean up.
|
||||
* November 4, 1999, Revision 1.06, Second release, lots of clean up
|
||||
and optimization.
|
||||
* August 8, 1999, Revision 1.05, Initial Public Release
|
||||
_________________________________________________________________
|
||||
|
||||
Chapter 8. Acknowledgements
|
||||
|
||||
This driver was originally derived form Donald Becker's pci-skeleton
|
||||
and rtl8139 drivers. Donald also provided various suggestion regarded
|
||||
with improvements made in revision 1.06.
|
||||
|
||||
The 1.05 revision was created by Jim Huang, AMD 79c901 support was
|
||||
added by Chin-Shan Li.
|
||||
@@ -319,11 +319,10 @@ static void __init hdpu_fixup_eth_pdata(struct platform_device *pd)
|
||||
struct mv643xx_eth_platform_data *eth_pd;
|
||||
eth_pd = pd->dev.platform_data;
|
||||
|
||||
eth_pd->port_serial_control =
|
||||
mv64x60_read(&bh, MV643XX_ETH_PORT_SERIAL_CONTROL_REG(pd->id) & ~1);
|
||||
|
||||
eth_pd->force_phy_addr = 1;
|
||||
eth_pd->phy_addr = pd->id;
|
||||
eth_pd->speed = SPEED_100;
|
||||
eth_pd->duplex = DUPLEX_FULL;
|
||||
eth_pd->tx_queue_size = 400;
|
||||
eth_pd->rx_queue_size = 800;
|
||||
}
|
||||
|
||||
+23
-47
@@ -100,6 +100,10 @@ static int max_interrupt_work = 10;
|
||||
static char versionA[] __initdata = DRV_NAME ".c:" DRV_VERSION " " DRV_RELDATE " becker@scyld.com\n";
|
||||
static char versionB[] __initdata = "http://www.scyld.com/network/3c509.html\n";
|
||||
|
||||
#if defined(CONFIG_PM) && (defined(CONFIG_MCA) || defined(CONFIG_EISA))
|
||||
#define EL3_SUSPEND
|
||||
#endif
|
||||
|
||||
#ifdef EL3_DEBUG
|
||||
static int el3_debug = EL3_DEBUG;
|
||||
#else
|
||||
@@ -174,9 +178,6 @@ struct el3_private {
|
||||
/* skb send-queue */
|
||||
int head, size;
|
||||
struct sk_buff *queue[SKB_QUEUE_SIZE];
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
struct pm_dev *pmdev;
|
||||
#endif
|
||||
enum {
|
||||
EL3_MCA,
|
||||
EL3_PNP,
|
||||
@@ -201,11 +202,15 @@ static void el3_tx_timeout (struct net_device *dev);
|
||||
static void el3_down(struct net_device *dev);
|
||||
static void el3_up(struct net_device *dev);
|
||||
static struct ethtool_ops ethtool_ops;
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
static int el3_suspend(struct pm_dev *pdev);
|
||||
static int el3_resume(struct pm_dev *pdev);
|
||||
static int el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data);
|
||||
#ifdef EL3_SUSPEND
|
||||
static int el3_suspend(struct device *, pm_message_t);
|
||||
static int el3_resume(struct device *);
|
||||
#else
|
||||
#define el3_suspend NULL
|
||||
#define el3_resume NULL
|
||||
#endif
|
||||
|
||||
|
||||
/* generic device remove for all device types */
|
||||
#if defined(CONFIG_EISA) || defined(CONFIG_MCA)
|
||||
static int el3_device_remove (struct device *device);
|
||||
@@ -229,7 +234,9 @@ static struct eisa_driver el3_eisa_driver = {
|
||||
.driver = {
|
||||
.name = "3c509",
|
||||
.probe = el3_eisa_probe,
|
||||
.remove = __devexit_p (el3_device_remove)
|
||||
.remove = __devexit_p (el3_device_remove),
|
||||
.suspend = el3_suspend,
|
||||
.resume = el3_resume,
|
||||
}
|
||||
};
|
||||
#endif
|
||||
@@ -262,6 +269,8 @@ static struct mca_driver el3_mca_driver = {
|
||||
.bus = &mca_bus_type,
|
||||
.probe = el3_mca_probe,
|
||||
.remove = __devexit_p(el3_device_remove),
|
||||
.suspend = el3_suspend,
|
||||
.resume = el3_resume,
|
||||
},
|
||||
};
|
||||
#endif /* CONFIG_MCA */
|
||||
@@ -362,10 +371,6 @@ static void el3_common_remove (struct net_device *dev)
|
||||
struct el3_private *lp = netdev_priv(dev);
|
||||
|
||||
(void) lp; /* Keep gcc quiet... */
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
if (lp->pmdev)
|
||||
pm_unregister(lp->pmdev);
|
||||
#endif
|
||||
#if defined(__ISAPNP__)
|
||||
if (lp->type == EL3_PNP)
|
||||
pnp_device_detach(to_pnp_dev(lp->dev));
|
||||
@@ -572,16 +577,6 @@ no_pnp:
|
||||
if (err)
|
||||
goto out1;
|
||||
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
/* register power management */
|
||||
lp->pmdev = pm_register(PM_ISA_DEV, card_idx, el3_pm_callback);
|
||||
if (lp->pmdev) {
|
||||
struct pm_dev *p;
|
||||
p = lp->pmdev;
|
||||
p->data = (struct net_device *)dev;
|
||||
}
|
||||
#endif
|
||||
|
||||
el3_cards++;
|
||||
lp->next_dev = el3_root_dev;
|
||||
el3_root_dev = dev;
|
||||
@@ -1480,20 +1475,17 @@ el3_up(struct net_device *dev)
|
||||
}
|
||||
|
||||
/* Power Management support functions */
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
#ifdef EL3_SUSPEND
|
||||
|
||||
static int
|
||||
el3_suspend(struct pm_dev *pdev)
|
||||
el3_suspend(struct device *pdev, pm_message_t state)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct net_device *dev;
|
||||
struct el3_private *lp;
|
||||
int ioaddr;
|
||||
|
||||
if (!pdev && !pdev->data)
|
||||
return -EINVAL;
|
||||
|
||||
dev = (struct net_device *)pdev->data;
|
||||
dev = pdev->driver_data;
|
||||
lp = netdev_priv(dev);
|
||||
ioaddr = dev->base_addr;
|
||||
|
||||
@@ -1510,17 +1502,14 @@ el3_suspend(struct pm_dev *pdev)
|
||||
}
|
||||
|
||||
static int
|
||||
el3_resume(struct pm_dev *pdev)
|
||||
el3_resume(struct device *pdev)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct net_device *dev;
|
||||
struct el3_private *lp;
|
||||
int ioaddr;
|
||||
|
||||
if (!pdev && !pdev->data)
|
||||
return -EINVAL;
|
||||
|
||||
dev = (struct net_device *)pdev->data;
|
||||
dev = pdev->driver_data;
|
||||
lp = netdev_priv(dev);
|
||||
ioaddr = dev->base_addr;
|
||||
|
||||
@@ -1536,20 +1525,7 @@ el3_resume(struct pm_dev *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data)
|
||||
{
|
||||
switch (rqst) {
|
||||
case PM_SUSPEND:
|
||||
return el3_suspend(pdev);
|
||||
|
||||
case PM_RESUME:
|
||||
return el3_resume(pdev);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PM_LEGACY */
|
||||
#endif /* EL3_SUSPEND */
|
||||
|
||||
/* Parameters that may be passed into the module. */
|
||||
static int debug = -1;
|
||||
|
||||
+5
-4
@@ -105,6 +105,7 @@
|
||||
#include <linux/mca-legacy.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/processor.h>
|
||||
@@ -658,7 +659,7 @@ static int init586(struct net_device *dev)
|
||||
|
||||
s = jiffies; /* warning: only active with interrupts on !! */
|
||||
while (!(cfg_cmd->cmd_status & STAT_COMPL)) {
|
||||
if (jiffies - s > 30*HZ/100)
|
||||
if (time_after(jiffies, s + 30*HZ/100))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -684,7 +685,7 @@ static int init586(struct net_device *dev)
|
||||
|
||||
s = jiffies;
|
||||
while (!(ias_cmd->cmd_status & STAT_COMPL)) {
|
||||
if (jiffies - s > 30*HZ/100)
|
||||
if (time_after(jiffies, s + 30*HZ/100))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -709,7 +710,7 @@ static int init586(struct net_device *dev)
|
||||
|
||||
s = jiffies;
|
||||
while (!(tdr_cmd->cmd_status & STAT_COMPL)) {
|
||||
if (jiffies - s > 30*HZ/100) {
|
||||
if (time_after(jiffies, s + 30*HZ/100)) {
|
||||
printk(KERN_WARNING "%s: %d Problems while running the TDR.\n", dev->name, __LINE__);
|
||||
result = 1;
|
||||
break;
|
||||
@@ -798,7 +799,7 @@ static int init586(struct net_device *dev)
|
||||
elmc_id_attn586();
|
||||
s = jiffies;
|
||||
while (!(mc_cmd->cmd_status & STAT_COMPL)) {
|
||||
if (jiffies - s > 30*HZ/100)
|
||||
if (time_after(jiffies, s + 30*HZ/100))
|
||||
break;
|
||||
}
|
||||
if (!(mc_cmd->cmd_status & STAT_COMPL)) {
|
||||
|
||||
+4
-3
@@ -258,6 +258,7 @@ static int vortex_debug = 1;
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/eisa.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <asm/irq.h> /* For NR_IRQS only. */
|
||||
#include <asm/io.h>
|
||||
#include <asm/uaccess.h>
|
||||
@@ -841,7 +842,7 @@ enum xcvr_types {
|
||||
XCVR_100baseFx, XCVR_MII=6, XCVR_NWAY=8, XCVR_ExtMII=9, XCVR_Default=10,
|
||||
};
|
||||
|
||||
static struct media_table {
|
||||
static const struct media_table {
|
||||
char *name;
|
||||
unsigned int media_bits:16, /* Bits to set in Wn4_Media register. */
|
||||
mask:8, /* The transceiver-present bit in Wn3_Config.*/
|
||||
@@ -1445,7 +1446,7 @@ static int __devinit vortex_probe1(struct device *gendev,
|
||||
}
|
||||
|
||||
{
|
||||
static const char * ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
|
||||
static const char * const ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
|
||||
unsigned int config;
|
||||
EL3WINDOW(3);
|
||||
vp->available_media = ioread16(ioaddr + Wn3_Options);
|
||||
@@ -2724,7 +2725,7 @@ boomerang_rx(struct net_device *dev)
|
||||
skb = dev_alloc_skb(PKT_BUF_SZ);
|
||||
if (skb == NULL) {
|
||||
static unsigned long last_jif;
|
||||
if ((jiffies - last_jif) > 10 * HZ) {
|
||||
if (time_after(jiffies, last_jif + 10 * HZ)) {
|
||||
printk(KERN_WARNING "%s: memory shortage\n", dev->name);
|
||||
last_jif = jiffies;
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/irq.h>
|
||||
#include <asm/irq.h>
|
||||
/* Used for the temporal inet entries and routing */
|
||||
#include <linux/socket.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
@@ -1276,7 +1276,7 @@ static int cp_change_mtu(struct net_device *dev, int new_mtu)
|
||||
}
|
||||
#endif /* BROKEN */
|
||||
|
||||
static char mii_2_8139_map[8] = {
|
||||
static const char mii_2_8139_map[8] = {
|
||||
BasicModeCtrl,
|
||||
BasicModeStatus,
|
||||
0,
|
||||
|
||||
@@ -229,7 +229,7 @@ typedef enum {
|
||||
|
||||
|
||||
/* indexed by board_t, above */
|
||||
static struct {
|
||||
static const struct {
|
||||
const char *name;
|
||||
u32 hw_flags;
|
||||
} board_info[] __devinitdata = {
|
||||
@@ -1192,7 +1192,7 @@ static int __devinit read_eeprom (void __iomem *ioaddr, int location, int addr_l
|
||||
#define mdio_delay() RTL_R8(Config4)
|
||||
|
||||
|
||||
static char mii_2_8139_map[8] = {
|
||||
static const char mii_2_8139_map[8] = {
|
||||
BasicModeCtrl,
|
||||
BasicModeStatus,
|
||||
0,
|
||||
|
||||
+1
-1
@@ -614,7 +614,7 @@ static void rebuild_rx_bufs(struct net_device *dev)
|
||||
static int init_i596_mem(struct net_device *dev)
|
||||
{
|
||||
struct i596_private *lp = dev->priv;
|
||||
#if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET)
|
||||
#if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET) || defined(ENABLE_APRICOT)
|
||||
short ioaddr = dev->base_addr;
|
||||
#endif
|
||||
unsigned long flags;
|
||||
|
||||
+13
-16
@@ -66,7 +66,7 @@ config BONDING
|
||||
'Trunking' by Sun, 802.3ad by the IEEE, and 'Bonding' in Linux.
|
||||
|
||||
The driver supports multiple bonding modes to allow for both high
|
||||
perfomance and high availability operation.
|
||||
performance and high availability operation.
|
||||
|
||||
Refer to <file:Documentation/networking/bonding.txt> for more
|
||||
information.
|
||||
@@ -698,8 +698,8 @@ config VORTEX
|
||||
depends on NET_VENDOR_3COM && (PCI || EISA)
|
||||
select MII
|
||||
---help---
|
||||
This option enables driver support for a large number of 10mbps and
|
||||
10/100mbps EISA, PCI and PCMCIA 3Com network cards:
|
||||
This option enables driver support for a large number of 10Mbps and
|
||||
10/100Mbps EISA, PCI and PCMCIA 3Com network cards:
|
||||
|
||||
"Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI
|
||||
"Boomerang" (EtherLink XL 3c900 or 3c905) PCI
|
||||
@@ -1021,7 +1021,7 @@ config EEXPRESS_PRO
|
||||
depends on NET_ISA
|
||||
---help---
|
||||
If you have a network (Ethernet) card of this type, say Y. This
|
||||
driver supports intel i82595{FX,TX} based boards. Note however
|
||||
driver supports Intel i82595{FX,TX} based boards. Note however
|
||||
that the EtherExpress PRO/100 Ethernet card has its own separate
|
||||
driver. Please read the Ethernet-HOWTO, available from
|
||||
<http://www.tldp.org/docs.html#howto>.
|
||||
@@ -1208,7 +1208,7 @@ config IBM_EMAC_RX_SKB_HEADROOM
|
||||
help
|
||||
Additional receive skb headroom. Note, that driver
|
||||
will always reserve at least 2 bytes to make IP header
|
||||
aligned, so usualy there is no need to add any additional
|
||||
aligned, so usually there is no need to add any additional
|
||||
headroom.
|
||||
|
||||
If unsure, set to 0.
|
||||
@@ -1372,8 +1372,8 @@ config B44
|
||||
called b44.
|
||||
|
||||
config FORCEDETH
|
||||
tristate "Reverse Engineered nForce Ethernet support (EXPERIMENTAL)"
|
||||
depends on NET_PCI && PCI && EXPERIMENTAL
|
||||
tristate "nForce Ethernet support"
|
||||
depends on NET_PCI && PCI
|
||||
help
|
||||
If you have a network (Ethernet) controller of this type, say Y and
|
||||
read the Ethernet-HOWTO, available from
|
||||
@@ -1614,11 +1614,7 @@ config SIS900
|
||||
---help---
|
||||
This is a driver for the Fast Ethernet PCI network cards based on
|
||||
the SiS 900 and SiS 7016 chips. The SiS 900 core is also embedded in
|
||||
SiS 630 and SiS 540 chipsets. If you have one of those, say Y and
|
||||
read the Ethernet-HOWTO, available at
|
||||
<http://www.tldp.org/docs.html#howto>. Please read
|
||||
<file:Documentation/networking/sis900.txt> and comments at the
|
||||
beginning of <file:drivers/net/sis900.c> for more information.
|
||||
SiS 630 and SiS 540 chipsets.
|
||||
|
||||
This driver also supports AMD 79C901 HomePNA so that you can use
|
||||
your phone line as a network cable.
|
||||
@@ -1934,7 +1930,7 @@ config MYRI_SBUS
|
||||
will be called myri_sbus. This is recommended.
|
||||
|
||||
config NS83820
|
||||
tristate "National Semiconduct DP83820 support"
|
||||
tristate "National Semiconductor DP83820 support"
|
||||
depends on PCI
|
||||
help
|
||||
This is a driver for the National Semiconductor DP83820 series
|
||||
@@ -2195,6 +2191,7 @@ config GFAR_NAPI
|
||||
config MV643XX_ETH
|
||||
tristate "MV-643XX Ethernet support"
|
||||
depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || MV64360 || MOMENCO_OCELOT_3 || PPC_MULTIPLATFORM
|
||||
select MII
|
||||
help
|
||||
This driver supports the gigabit Ethernet on the Marvell MV643XX
|
||||
chipset which is used in the Momenco Ocelot C and Jaguar ATX and
|
||||
@@ -2514,7 +2511,7 @@ config PPP_FILTER
|
||||
Say Y here if you want to be able to filter the packets passing over
|
||||
PPP interfaces. This allows you to control which packets count as
|
||||
activity (i.e. which packets will reset the idle timer or bring up
|
||||
a demand-dialled link) and which packets are to be dropped entirely.
|
||||
a demand-dialed link) and which packets are to be dropped entirely.
|
||||
You need to say Y here if you wish to use the pass-filter and
|
||||
active-filter options to pppd.
|
||||
|
||||
@@ -2702,8 +2699,8 @@ config SHAPER
|
||||
<file:Documentation/networking/shaper.txt> for more information.
|
||||
|
||||
An alternative to this traffic shaper is the experimental
|
||||
Class-Based Queueing (CBQ) scheduling support which you get if you
|
||||
say Y to "QoS and/or fair queueing" above.
|
||||
Class-Based Queuing (CBQ) scheduling support which you get if you
|
||||
say Y to "QoS and/or fair queuing" above.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called shaper. If unsure, say N.
|
||||
|
||||
+4
-3
@@ -36,6 +36,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/io.h>
|
||||
@@ -216,7 +217,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
|
||||
outb(inb(ioaddr + NE_RESET), ioaddr + NE_RESET);
|
||||
|
||||
while ((inb(ioaddr + NE_EN0_ISR) & ENISR_RESET) == 0)
|
||||
if (jiffies - reset_start_time > 2*HZ/100) {
|
||||
if (time_after(jiffies, reset_start_time + 2*HZ/100)) {
|
||||
printk(" not found (no reset ack).\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -382,7 +383,7 @@ apne_reset_8390(struct net_device *dev)
|
||||
|
||||
/* This check _should_not_ be necessary, omit eventually. */
|
||||
while ((inb(NE_BASE+NE_EN0_ISR) & ENISR_RESET) == 0)
|
||||
if (jiffies - reset_start_time > 2*HZ/100) {
|
||||
if (time_after(jiffies, reset_start_time + 2*HZ/100)) {
|
||||
printk("%s: ne_reset_8390() did not complete.\n", dev->name);
|
||||
break;
|
||||
}
|
||||
@@ -530,7 +531,7 @@ apne_block_output(struct net_device *dev, int count,
|
||||
dma_start = jiffies;
|
||||
|
||||
while ((inb(NE_BASE + NE_EN0_ISR) & ENISR_RDC) == 0)
|
||||
if (jiffies - dma_start > 2*HZ/100) { /* 20ms */
|
||||
if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */
|
||||
printk("%s: timeout waiting for Tx RDC.\n", dev->name);
|
||||
apne_reset_8390(dev);
|
||||
NS8390_init(dev,1);
|
||||
|
||||
@@ -68,10 +68,10 @@ config ARCNET_CAP
|
||||
packet is stuffed with an extra 4 byte "cookie" which doesn't
|
||||
actually appear on the network. After transmit the driver will send
|
||||
back a packet with protocol byte 0 containing the status of the
|
||||
transmition:
|
||||
transmission:
|
||||
0=no hardware acknowledge
|
||||
1=excessive nak
|
||||
2=transmition accepted by the reciever hardware
|
||||
2=transmission accepted by the receiver hardware
|
||||
|
||||
Received packets are also stuffed with the extra 4 bytes but it will
|
||||
be random data.
|
||||
|
||||
@@ -42,7 +42,7 @@ static int build_header(struct sk_buff *skb, struct net_device *dev,
|
||||
static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
|
||||
int bufnum);
|
||||
|
||||
struct ArcProto rawmode_proto =
|
||||
static struct ArcProto rawmode_proto =
|
||||
{
|
||||
.suffix = 'r',
|
||||
.mtu = XMTU,
|
||||
|
||||
@@ -97,25 +97,44 @@ static int __init arcrimi_probe(struct net_device *dev)
|
||||
"must specify the shmem and irq!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
if (dev->dev_addr[0] == 0) {
|
||||
BUGMSG(D_NORMAL, "You need to specify your card's station "
|
||||
"ID!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
/*
|
||||
* Grab the memory region at mem_start for BUFFER_SIZE bytes.
|
||||
* Grab the memory region at mem_start for MIRROR_SIZE bytes.
|
||||
* Later in arcrimi_found() the real size will be determined
|
||||
* and this reserve will be released and the correct size
|
||||
* will be taken.
|
||||
*/
|
||||
if (!request_mem_region(dev->mem_start, BUFFER_SIZE, "arcnet (90xx)")) {
|
||||
if (!request_mem_region(dev->mem_start, MIRROR_SIZE, "arcnet (90xx)")) {
|
||||
BUGMSG(D_NORMAL, "Card memory already allocated\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
if (dev->dev_addr[0] == 0) {
|
||||
release_mem_region(dev->mem_start, BUFFER_SIZE);
|
||||
BUGMSG(D_NORMAL, "You need to specify your card's station "
|
||||
"ID!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
return arcrimi_found(dev);
|
||||
}
|
||||
|
||||
static int check_mirror(unsigned long addr, size_t size)
|
||||
{
|
||||
void __iomem *p;
|
||||
int res = -1;
|
||||
|
||||
if (!request_mem_region(addr, size, "arcnet (90xx)"))
|
||||
return -1;
|
||||
|
||||
p = ioremap(addr, size);
|
||||
if (p) {
|
||||
if (readb(p) == TESTvalue)
|
||||
res = 1;
|
||||
else
|
||||
res = 0;
|
||||
iounmap(p);
|
||||
}
|
||||
|
||||
release_mem_region(addr, size);
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set up the struct net_device associated with this card. Called after
|
||||
@@ -125,19 +144,28 @@ static int __init arcrimi_found(struct net_device *dev)
|
||||
{
|
||||
struct arcnet_local *lp;
|
||||
unsigned long first_mirror, last_mirror, shmem;
|
||||
void __iomem *p;
|
||||
int mirror_size;
|
||||
int err;
|
||||
|
||||
p = ioremap(dev->mem_start, MIRROR_SIZE);
|
||||
if (!p) {
|
||||
release_mem_region(dev->mem_start, MIRROR_SIZE);
|
||||
BUGMSG(D_NORMAL, "Can't ioremap\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* reserve the irq */
|
||||
if (request_irq(dev->irq, &arcnet_interrupt, 0, "arcnet (RIM I)", dev)) {
|
||||
release_mem_region(dev->mem_start, BUFFER_SIZE);
|
||||
iounmap(p);
|
||||
release_mem_region(dev->mem_start, MIRROR_SIZE);
|
||||
BUGMSG(D_NORMAL, "Can't get IRQ %d!\n", dev->irq);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
shmem = dev->mem_start;
|
||||
isa_writeb(TESTvalue, shmem);
|
||||
isa_writeb(dev->dev_addr[0], shmem + 1); /* actually the node ID */
|
||||
writeb(TESTvalue, p);
|
||||
writeb(dev->dev_addr[0], p + 1); /* actually the node ID */
|
||||
|
||||
/* find the real shared memory start/end points, including mirrors */
|
||||
|
||||
@@ -146,17 +174,18 @@ static int __init arcrimi_found(struct net_device *dev)
|
||||
* 2k (or there are no mirrors at all) but on some, it's 4k.
|
||||
*/
|
||||
mirror_size = MIRROR_SIZE;
|
||||
if (isa_readb(shmem) == TESTvalue
|
||||
&& isa_readb(shmem - mirror_size) != TESTvalue
|
||||
&& isa_readb(shmem - 2 * mirror_size) == TESTvalue)
|
||||
mirror_size *= 2;
|
||||
if (readb(p) == TESTvalue
|
||||
&& check_mirror(shmem - MIRROR_SIZE, MIRROR_SIZE) == 0
|
||||
&& check_mirror(shmem - 2 * MIRROR_SIZE, MIRROR_SIZE) == 1)
|
||||
mirror_size = 2 * MIRROR_SIZE;
|
||||
|
||||
first_mirror = last_mirror = shmem;
|
||||
while (isa_readb(first_mirror) == TESTvalue)
|
||||
first_mirror = shmem - mirror_size;
|
||||
while (check_mirror(first_mirror, mirror_size) == 1)
|
||||
first_mirror -= mirror_size;
|
||||
first_mirror += mirror_size;
|
||||
|
||||
while (isa_readb(last_mirror) == TESTvalue)
|
||||
last_mirror = shmem + mirror_size;
|
||||
while (check_mirror(last_mirror, mirror_size) == 1)
|
||||
last_mirror += mirror_size;
|
||||
last_mirror -= mirror_size;
|
||||
|
||||
@@ -181,7 +210,8 @@ static int __init arcrimi_found(struct net_device *dev)
|
||||
* with the correct size. There is a VERY slim chance this could
|
||||
* fail.
|
||||
*/
|
||||
release_mem_region(shmem, BUFFER_SIZE);
|
||||
iounmap(p);
|
||||
release_mem_region(shmem, MIRROR_SIZE);
|
||||
if (!request_mem_region(dev->mem_start,
|
||||
dev->mem_end - dev->mem_start + 1,
|
||||
"arcnet (90xx)")) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user