Skip to content

Commit c010b2f

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (82 commits) ipw2200: Call netif_*_queue() interfaces properly. netxen: Needs to include linux/vmalloc.h [netdrvr] atl1d: fix !CONFIG_PM build r6040: rework init_one error handling r6040: bump release number to 0.18 r6040: handle RX fifo full and no descriptor interrupts r6040: change the default waiting time r6040: use definitions for magic values in descriptor status r6040: completely rework the RX path r6040: call napi_disable when puting down the interface and set lp->dev accordingly. mv643xx_eth: fix NETPOLL build r6040: rework the RX buffers allocation routine r6040: fix scheduling while atomic in r6040_tx_timeout r6040: fix null pointer access and tx timeouts r6040: prefix all functions with r6040 rndis_host: support WM6 devices as modems at91_ether: use netstats in net_device structure sfc: Create one RX queue and interrupt per CPU package by default sfc: Use a separate workqueue for resets sfc: I2C adapter initialisation fixes ...
2 parents 6069fb2 + 521c4d9 commit c010b2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+13458
-7143
lines changed

Documentation/networking/e1000.txt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -513,21 +513,11 @@ Additional Configurations
513513
Intel(R) PRO/1000 PT Dual Port Server Connection
514514
Intel(R) PRO/1000 PT Dual Port Server Adapter
515515
Intel(R) PRO/1000 PF Dual Port Server Adapter
516-
Intel(R) PRO/1000 PT Quad Port Server Adapter
516+
Intel(R) PRO/1000 PT Quad Port Server Adapter
517517

518518
NAPI
519519
----
520-
NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled
521-
or disabled based on the configuration of the kernel. To override
522-
the default, use the following compile-time flags.
523-
524-
To enable NAPI, compile the driver module, passing in a configuration option:
525-
526-
make CFLAGS_EXTRA=-DE1000_NAPI install
527-
528-
To disable NAPI, compile the driver module, passing in a configuration option:
529-
530-
make CFLAGS_EXTRA=-DE1000_NO_NAPI install
520+
NAPI (Rx polling mode) is enabled in the e1000 driver.
531521

532522
See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.
533523

Documentation/networking/udplite.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
getsockopt(sockfd, SOL_SOCKET, SO_NO_CHECK, &value, ...);
149149

150150
is meaningless (as in TCP). Packets with a zero checksum field are
151-
illegal (cf. RFC 3828, sec. 3.1) will be silently discarded.
151+
illegal (cf. RFC 3828, sec. 3.1) and will be silently discarded.
152152

153153
4) Fragmentation
154154

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3533,7 +3533,7 @@ S: Supported
35333533

35343534
S390 NETWORK DRIVERS
35353535
P: Ursula Braun
3536-
3536+
M: ursula.braun@de.ibm.com
35373537
P: Frank Blaschka
35383538
35393539
@@ -3553,7 +3553,7 @@ S: Supported
35533553

35543554
S390 IUCV NETWORK LAYER
35553555
P: Ursula Braun
3556-
3556+
M: ursula.braun@de.ibm.com
35573557
35583558
35593559
W: http://www.ibm.com/developerworks/linux/linux390/

drivers/net/8139too.c

Lines changed: 74 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
#include <linux/compiler.h>
9999
#include <linux/pci.h>
100100
#include <linux/init.h>
101-
#include <linux/ioport.h>
102101
#include <linux/netdevice.h>
103102
#include <linux/etherdevice.h>
104103
#include <linux/rtnetlink.h>
@@ -120,11 +119,6 @@
120119
NETIF_MSG_LINK)
121120

122121

123-
/* enable PIO instead of MMIO, if CONFIG_8139TOO_PIO is selected */
124-
#ifdef CONFIG_8139TOO_PIO
125-
#define USE_IO_OPS 1
126-
#endif
127-
128122
/* define to 1, 2 or 3 to enable copious debugging info */
129123
#define RTL8139_DEBUG 0
130124

@@ -156,6 +150,13 @@
156150
static int media[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
157151
static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
158152

153+
/* Whether to use MMIO or PIO. Default to MMIO. */
154+
#ifdef CONFIG_8139TOO_PIO
155+
static int use_io = 1;
156+
#else
157+
static int use_io = 0;
158+
#endif
159+
159160
/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
160161
The RTL chips use a 64 element hash table based on the Ethernet CRC. */
161162
static int multicast_filter_limit = 32;
@@ -614,6 +615,8 @@ MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver");
614615
MODULE_LICENSE("GPL");
615616
MODULE_VERSION(DRV_VERSION);
616617

618+
module_param(use_io, int, 0);
619+
MODULE_PARM_DESC(use_io, "Force use of I/O access mode. 0=MMIO 1=PIO");
617620
module_param(multicast_filter_limit, int, 0);
618621
module_param_array(media, int, NULL, 0);
619622
module_param_array(full_duplex, int, NULL, 0);
@@ -709,13 +712,8 @@ static void __rtl8139_cleanup_dev (struct net_device *dev)
709712
assert (tp->pci_dev != NULL);
710713
pdev = tp->pci_dev;
711714

712-
#ifdef USE_IO_OPS
713-
if (tp->mmio_addr)
714-
ioport_unmap (tp->mmio_addr);
715-
#else
716715
if (tp->mmio_addr)
717716
pci_iounmap (pdev, tp->mmio_addr);
718-
#endif /* USE_IO_OPS */
719717

720718
/* it's ok to call this even if we have no regions to free */
721719
pci_release_regions (pdev);
@@ -790,32 +788,33 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
790788
DPRINTK("PIO region size == 0x%02X\n", pio_len);
791789
DPRINTK("MMIO region size == 0x%02lX\n", mmio_len);
792790

793-
#ifdef USE_IO_OPS
794-
/* make sure PCI base addr 0 is PIO */
795-
if (!(pio_flags & IORESOURCE_IO)) {
796-
dev_err(&pdev->dev, "region #0 not a PIO resource, aborting\n");
797-
rc = -ENODEV;
798-
goto err_out;
799-
}
800-
/* check for weird/broken PCI region reporting */
801-
if (pio_len < RTL_MIN_IO_SIZE) {
802-
dev_err(&pdev->dev, "Invalid PCI I/O region size(s), aborting\n");
803-
rc = -ENODEV;
804-
goto err_out;
805-
}
806-
#else
807-
/* make sure PCI base addr 1 is MMIO */
808-
if (!(mmio_flags & IORESOURCE_MEM)) {
809-
dev_err(&pdev->dev, "region #1 not an MMIO resource, aborting\n");
810-
rc = -ENODEV;
811-
goto err_out;
812-
}
813-
if (mmio_len < RTL_MIN_IO_SIZE) {
814-
dev_err(&pdev->dev, "Invalid PCI mem region size(s), aborting\n");
815-
rc = -ENODEV;
816-
goto err_out;
791+
retry:
792+
if (use_io) {
793+
/* make sure PCI base addr 0 is PIO */
794+
if (!(pio_flags & IORESOURCE_IO)) {
795+
dev_err(&pdev->dev, "region #0 not a PIO resource, aborting\n");
796+
rc = -ENODEV;
797+
goto err_out;
798+
}
799+
/* check for weird/broken PCI region reporting */
800+
if (pio_len < RTL_MIN_IO_SIZE) {
801+
dev_err(&pdev->dev, "Invalid PCI I/O region size(s), aborting\n");
802+
rc = -ENODEV;
803+
goto err_out;
804+
}
805+
} else {
806+
/* make sure PCI base addr 1 is MMIO */
807+
if (!(mmio_flags & IORESOURCE_MEM)) {
808+
dev_err(&pdev->dev, "region #1 not an MMIO resource, aborting\n");
809+
rc = -ENODEV;
810+
goto err_out;
811+
}
812+
if (mmio_len < RTL_MIN_IO_SIZE) {
813+
dev_err(&pdev->dev, "Invalid PCI mem region size(s), aborting\n");
814+
rc = -ENODEV;
815+
goto err_out;
816+
}
817817
}
818-
#endif
819818

820819
rc = pci_request_regions (pdev, DRV_NAME);
821820
if (rc)
@@ -825,28 +824,28 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
825824
/* enable PCI bus-mastering */
826825
pci_set_master (pdev);
827826

828-
#ifdef USE_IO_OPS
829-
ioaddr = ioport_map(pio_start, pio_len);
830-
if (!ioaddr) {
831-
dev_err(&pdev->dev, "cannot map PIO, aborting\n");
832-
rc = -EIO;
833-
goto err_out;
834-
}
835-
dev->base_addr = pio_start;
836-
tp->mmio_addr = ioaddr;
837-
tp->regs_len = pio_len;
838-
#else
839-
/* ioremap MMIO region */
840-
ioaddr = pci_iomap(pdev, 1, 0);
841-
if (ioaddr == NULL) {
842-
dev_err(&pdev->dev, "cannot remap MMIO, aborting\n");
843-
rc = -EIO;
844-
goto err_out;
827+
if (use_io) {
828+
ioaddr = pci_iomap(pdev, 0, 0);
829+
if (!ioaddr) {
830+
dev_err(&pdev->dev, "cannot map PIO, aborting\n");
831+
rc = -EIO;
832+
goto err_out;
833+
}
834+
dev->base_addr = pio_start;
835+
tp->regs_len = pio_len;
836+
} else {
837+
/* ioremap MMIO region */
838+
ioaddr = pci_iomap(pdev, 1, 0);
839+
if (ioaddr == NULL) {
840+
dev_err(&pdev->dev, "cannot remap MMIO, trying PIO\n");
841+
pci_release_regions(pdev);
842+
use_io = 1;
843+
goto retry;
844+
}
845+
dev->base_addr = (long) ioaddr;
846+
tp->regs_len = mmio_len;
845847
}
846-
dev->base_addr = (long) ioaddr;
847848
tp->mmio_addr = ioaddr;
848-
tp->regs_len = mmio_len;
849-
#endif /* USE_IO_OPS */
850849

851850
/* Bring old chips out of low-power mode. */
852851
RTL_W8 (HltClk, 'R');
@@ -952,6 +951,14 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
952951
"Use the \"8139cp\" driver for improved performance and stability.\n");
953952
}
954953

954+
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
955+
pdev->device == PCI_DEVICE_ID_REALTEK_8139 &&
956+
pdev->subsystem_vendor == PCI_VENDOR_ID_ATHEROS &&
957+
pdev->subsystem_device == PCI_DEVICE_ID_REALTEK_8139) {
958+
printk(KERN_INFO "8139too: OQO Model 2 detected. Forcing PIO\n");
959+
use_io = 1;
960+
}
961+
955962
i = rtl8139_init_board (pdev, &dev);
956963
if (i < 0)
957964
return i;
@@ -2381,28 +2388,31 @@ static void rtl8139_set_msglevel(struct net_device *dev, u32 datum)
23812388
np->msg_enable = datum;
23822389
}
23832390

2384-
/* TODO: we are too slack to do reg dumping for pio, for now */
2385-
#ifdef CONFIG_8139TOO_PIO
2386-
#define rtl8139_get_regs_len NULL
2387-
#define rtl8139_get_regs NULL
2388-
#else
23892391
static int rtl8139_get_regs_len(struct net_device *dev)
23902392
{
2391-
struct rtl8139_private *np = netdev_priv(dev);
2393+
struct rtl8139_private *np;
2394+
/* TODO: we are too slack to do reg dumping for pio, for now */
2395+
if (use_io)
2396+
return 0;
2397+
np = netdev_priv(dev);
23922398
return np->regs_len;
23932399
}
23942400

23952401
static void rtl8139_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *regbuf)
23962402
{
2397-
struct rtl8139_private *np = netdev_priv(dev);
2403+
struct rtl8139_private *np;
2404+
2405+
/* TODO: we are too slack to do reg dumping for pio, for now */
2406+
if (use_io)
2407+
return;
2408+
np = netdev_priv(dev);
23982409

23992410
regs->version = RTL_REGS_VER;
24002411

24012412
spin_lock_irq(&np->lock);
24022413
memcpy_fromio(regbuf, np->mmio_addr, regs->len);
24032414
spin_unlock_irq(&np->lock);
24042415
}
2405-
#endif /* CONFIG_8139TOO_MMIO */
24062416

24072417
static int rtl8139_get_sset_count(struct net_device *dev, int sset)
24082418
{

drivers/net/Kconfig

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,20 +1926,6 @@ config E1000
19261926
To compile this driver as a module, choose M here. The module
19271927
will be called e1000.
19281928

1929-
config E1000_NAPI
1930-
bool "Use Rx Polling (NAPI)"
1931-
depends on E1000
1932-
help
1933-
NAPI is a new driver API designed to reduce CPU and interrupt load
1934-
when the driver is receiving lots of packets from the card. It is
1935-
still somewhat experimental and thus not yet enabled by default.
1936-
1937-
If your estimated Rx load is 10kpps or more, or if the card will be
1938-
deployed on potentially unfriendly networks (e.g. in a firewall),
1939-
then say Y here.
1940-
1941-
If in doubt, say N.
1942-
19431929
config E1000_DISABLE_PACKET_SPLIT
19441930
bool "Disable Packet Split for PCI express adapters"
19451931
depends on E1000
@@ -2304,6 +2290,17 @@ config ATL1
23042290
To compile this driver as a module, choose M here. The module
23052291
will be called atl1.
23062292

2293+
config ATL1E
2294+
tristate "Atheros L1E Gigabit Ethernet support (EXPERIMENTAL)"
2295+
depends on PCI && EXPERIMENTAL
2296+
select CRC32
2297+
select MII
2298+
help
2299+
This driver supports the Atheros L1E gigabit ethernet adapter.
2300+
2301+
To compile this driver as a module, choose M here. The module
2302+
will be called atl1e.
2303+
23072304
endif # NETDEV_1000
23082305

23092306
#

drivers/net/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ obj-$(CONFIG_EHEA) += ehea/
1515
obj-$(CONFIG_CAN) += can/
1616
obj-$(CONFIG_BONDING) += bonding/
1717
obj-$(CONFIG_ATL1) += atlx/
18+
obj-$(CONFIG_ATL1E) += atl1e/
1819
obj-$(CONFIG_GIANFAR) += gianfar_driver.o
1920
obj-$(CONFIG_TEHUTI) += tehuti.o
2021

0 commit comments

Comments
 (0)