* [git patches] 2.6.x net driver updates
@ 2006-01-09 17:10 Jeff Garzik
0 siblings, 0 replies; 33+ messages in thread
From: Jeff Garzik @ 2006-01-09 17:10 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: netdev, linux-kernel
Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to receive the following updates:
Documentation/networking/bonding.txt | 2
MAINTAINERS | 1
drivers/net/3c503.c | 16 +--
drivers/net/Kconfig | 4
drivers/net/ac3200.c | 16 +--
drivers/net/bonding/bonding.h | 8 -
drivers/net/e1000/e1000_param.c | 10 +-
drivers/net/e2100.c | 14 +-
drivers/net/es3210.c | 14 +-
drivers/net/forcedeth.c | 164 +++++++++++++++++++++--------------
drivers/net/gianfar.h | 4
drivers/net/hp-plus.c | 12 +-
drivers/net/hp.c | 12 +-
drivers/net/ibm_emac/ibm_emac.h | 3
drivers/net/ibm_emac/ibm_emac_core.c | 2
drivers/net/lance.c | 22 ++--
drivers/net/lne390.c | 14 +-
drivers/net/mv643xx_eth.c | 2
drivers/net/ne.c | 18 +--
drivers/net/ne2.c | 16 +--
drivers/net/sk98lin/skge.c | 129 ++++++++++++++++-----------
drivers/net/smc-ultra.c | 24 ++---
drivers/net/tulip/tulip_core.c | 2
drivers/net/wd.c | 14 +-
drivers/net/wireless/ipw2100.c | 5 -
net/ieee80211/ieee80211_crypt_wep.c | 61 +++++++++----
net/ieee80211/ieee80211_tx.c | 2
net/ieee80211/ieee80211_wx.c | 2
28 files changed, 341 insertions(+), 252 deletions(-)
Adrian Bunk:
drivers/net/Kconfig: indentation fix
drivers/net/bonding/bonding.h: "extern inline" -> "static inline"
drivers/net/gianfar.h: "extern inline" -> "static inline"
Ayaz Abdulla:
forcedeth: TSO fix for large buffers
Christoph Dworzak:
tulip: enable multiport NIC BIOS fixups for x86_64
Dan Williams:
[patch] ipw2100: support WEXT-18 enc_capa v3
Denis Vlasenko:
fix a few "warning: 'cleanup_card' defined but not used"
Eric Paris:
update bonding.txt to not show ip address on slaves
Eugene Surovegin:
PPC44x EMAC driver: disable TX status deferral in half-duplex mode
Franck:
Add MIPS dependency for dm9000 driver
Johannes Berg:
ieee80211: enable hw wep where host has to build IV
Kenji Kaneshige:
e1000: Fix invalid memory reference
Olaf Hering:
remove bouncing mail address of mv643xx_eth maintainer
Stephen Hemminger:
sk98lin: routine called from probe marked __init
sk98lin: not doing high dma properly
sk98lin: error handling on dual port board
sk98lin: use kzalloc
sk98lin: error handling on probe
sk98lin: error handling of pci setup
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index b0fe41d..8d8b4e5 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -945,7 +945,6 @@ bond0 Link encap:Ethernet HWaddr 00
collisions:0 txqueuelen:0
eth0 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4
- inet addr:XXX.XXX.XXX.YYY Bcast:XXX.XXX.XXX.255 Mask:255.255.252.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:3573025 errors:0 dropped:0 overruns:0 frame:0
TX packets:1643167 errors:1 dropped:0 overruns:1 carrier:0
@@ -953,7 +952,6 @@ eth0 Link encap:Ethernet HWaddr 00
Interrupt:10 Base address:0x1080
eth1 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4
- inet addr:XXX.XXX.XXX.YYY Bcast:XXX.XXX.XXX.255 Mask:255.255.252.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:3651769 errors:0 dropped:0 overruns:0 frame:0
TX packets:1643480 errors:0 dropped:0 overruns:0 carrier:0
diff --git a/MAINTAINERS b/MAINTAINERS
index 76dc820..270e28c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1697,7 +1697,6 @@ S: Maintained
MARVELL MV64340 ETHERNET DRIVER
P: Manish Lachwani
-M: Manish_Lachwani@pmc-sierra.com
L: linux-mips@linux-mips.org
L: netdev@vger.kernel.org
S: Supported
diff --git a/drivers/net/3c503.c b/drivers/net/3c503.c
index 5c5eebd..dcc98af 100644
--- a/drivers/net/3c503.c
+++ b/drivers/net/3c503.c
@@ -148,14 +148,6 @@ el2_pio_probe(struct net_device *dev)
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- /* NB: el2_close() handles free_irq */
- release_region(dev->base_addr, EL2_IO_EXTENT);
- if (ei_status.mem)
- iounmap(ei_status.mem);
-}
-
#ifndef MODULE
struct net_device * __init el2_probe(int unit)
{
@@ -726,6 +718,14 @@ init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ /* NB: el2_close() handles free_irq */
+ release_region(dev->base_addr, EL2_IO_EXTENT);
+ if (ei_status.mem)
+ iounmap(ei_status.mem);
+}
+
void
cleanup_module(void)
{
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 1960961..733bc25 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -129,7 +129,7 @@ config NET_SB1000
If you don't have this card, of course say N.
- source "drivers/net/arcnet/Kconfig"
+source "drivers/net/arcnet/Kconfig"
source "drivers/net/phy/Kconfig"
@@ -844,7 +844,7 @@ config SMC9194
config DM9000
tristate "DM9000 support"
- depends on ARM && NET_ETHERNET
+ depends on (ARM || MIPS) && NET_ETHERNET
select CRC32
select MII
---help---
diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c
index 8a0af54..7952dc6 100644
--- a/drivers/net/ac3200.c
+++ b/drivers/net/ac3200.c
@@ -123,14 +123,6 @@ static int __init do_ac3200_probe(struct
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- /* Someday free_irq may be in ac_close_card() */
- free_irq(dev->irq, dev);
- release_region(dev->base_addr, AC_IO_EXTENT);
- iounmap(ei_status.mem);
-}
-
#ifndef MODULE
struct net_device * __init ac3200_probe(int unit)
{
@@ -406,6 +398,14 @@ init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ /* Someday free_irq may be in ac_close_card() */
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr, AC_IO_EXTENT);
+ iounmap(ei_status.mem);
+}
+
void
cleanup_module(void)
{
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 015c7f1..f20bb85 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -205,7 +205,7 @@ struct bonding {
*
* Caller must hold bond lock for read
*/
-extern inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct net_device *slave_dev)
+static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct net_device *slave_dev)
{
struct slave *slave = NULL;
int i;
@@ -219,7 +219,7 @@ extern inline struct slave *bond_get_sla
return slave;
}
-extern inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
+static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
{
if (!slave || !slave->dev->master) {
return NULL;
@@ -228,13 +228,13 @@ extern inline struct bonding *bond_get_b
return (struct bonding *)slave->dev->master->priv;
}
-extern inline void bond_set_slave_inactive_flags(struct slave *slave)
+static inline void bond_set_slave_inactive_flags(struct slave *slave)
{
slave->state = BOND_STATE_BACKUP;
slave->dev->flags |= IFF_NOARP;
}
-extern inline void bond_set_slave_active_flags(struct slave *slave)
+static inline void bond_set_slave_active_flags(struct slave *slave)
{
slave->state = BOND_STATE_ACTIVE;
slave->dev->flags &= ~IFF_NOARP;
diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c
index 38695d5..ccbbe5a 100644
--- a/drivers/net/e1000/e1000_param.c
+++ b/drivers/net/e1000/e1000_param.c
@@ -545,7 +545,7 @@ e1000_check_fiber_options(struct e1000_a
static void __devinit
e1000_check_copper_options(struct e1000_adapter *adapter)
{
- int speed, dplx;
+ int speed, dplx, an;
int bd = adapter->bd_number;
{ /* Speed */
@@ -641,8 +641,12 @@ e1000_check_copper_options(struct e1000_
.p = an_list }}
};
- int an = AutoNeg[bd];
- e1000_validate_option(&an, &opt, adapter);
+ if (num_AutoNeg > bd) {
+ an = AutoNeg[bd];
+ e1000_validate_option(&an, &opt, adapter);
+ } else {
+ an = opt.def;
+ }
adapter->hw.autoneg_advertised = an;
}
diff --git a/drivers/net/e2100.c b/drivers/net/e2100.c
index f5a4dd7..e5c5cd2 100644
--- a/drivers/net/e2100.c
+++ b/drivers/net/e2100.c
@@ -140,13 +140,6 @@ static int __init do_e2100_probe(struct
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- /* NB: e21_close() handles free_irq */
- iounmap(ei_status.mem);
- release_region(dev->base_addr, E21_IO_EXTENT);
-}
-
#ifndef MODULE
struct net_device * __init e2100_probe(int unit)
{
@@ -463,6 +456,13 @@ init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ /* NB: e21_close() handles free_irq */
+ iounmap(ei_status.mem);
+ release_region(dev->base_addr, E21_IO_EXTENT);
+}
+
void
cleanup_module(void)
{
diff --git a/drivers/net/es3210.c b/drivers/net/es3210.c
index 50f8e23..6b0ab1e 100644
--- a/drivers/net/es3210.c
+++ b/drivers/net/es3210.c
@@ -155,13 +155,6 @@ static int __init do_es_probe(struct net
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- free_irq(dev->irq, dev);
- release_region(dev->base_addr, ES_IO_EXTENT);
- iounmap(ei_status.mem);
-}
-
#ifndef MODULE
struct net_device * __init es_probe(int unit)
{
@@ -456,6 +449,13 @@ init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr, ES_IO_EXTENT);
+ iounmap(ei_status.mem);
+}
+
void
cleanup_module(void)
{
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index c39344a..3682ec6 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -101,6 +101,7 @@
* 0.46: 20 Oct 2005: Add irq optimization modes.
* 0.47: 26 Oct 2005: Add phyaddr 0 in phy scan.
* 0.48: 24 Dec 2005: Disable TSO, bugfix for pci_map_single
+ * 0.49: 10 Dec 2005: Fix tso for large buffers.
*
* Known bugs:
* We suspect that on some hardware no TX done interrupts are generated.
@@ -112,7 +113,7 @@
* DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few
* superfluous timer interrupts from the nic.
*/
-#define FORCEDETH_VERSION "0.48"
+#define FORCEDETH_VERSION "0.49"
#define DRV_NAME "forcedeth"
#include <linux/module.h>
@@ -349,6 +350,8 @@ typedef union _ring_type {
#define NV_TX2_VALID (1<<31)
#define NV_TX2_TSO (1<<28)
#define NV_TX2_TSO_SHIFT 14
+#define NV_TX2_TSO_MAX_SHIFT 14
+#define NV_TX2_TSO_MAX_SIZE (1<<NV_TX2_TSO_MAX_SHIFT)
#define NV_TX2_CHECKSUM_L3 (1<<27)
#define NV_TX2_CHECKSUM_L4 (1<<26)
@@ -408,15 +411,15 @@ typedef union _ring_type {
#define NV_WATCHDOG_TIMEO (5*HZ)
#define RX_RING 128
-#define TX_RING 64
+#define TX_RING 256
/*
* If your nic mysteriously hangs then try to reduce the limits
* to 1/0: It might be required to set NV_TX_LASTPACKET in the
* last valid ring entry. But this would be impossible to
* implement - probably a disassembly error.
*/
-#define TX_LIMIT_STOP 63
-#define TX_LIMIT_START 62
+#define TX_LIMIT_STOP 255
+#define TX_LIMIT_START 254
/* rx/tx mac addr + type + vlan + align + slack*/
#define NV_RX_HEADERS (64)
@@ -535,6 +538,7 @@ struct fe_priv {
unsigned int next_tx, nic_tx;
struct sk_buff *tx_skbuff[TX_RING];
dma_addr_t tx_dma[TX_RING];
+ unsigned int tx_dma_len[TX_RING];
u32 tx_flags;
};
@@ -935,6 +939,7 @@ static void nv_init_tx(struct net_device
else
np->tx_ring.ex[i].FlagLen = 0;
np->tx_skbuff[i] = NULL;
+ np->tx_dma[i] = 0;
}
}
@@ -945,30 +950,27 @@ static int nv_init_ring(struct net_devic
return nv_alloc_rx(dev);
}
-static void nv_release_txskb(struct net_device *dev, unsigned int skbnr)
+static int nv_release_txskb(struct net_device *dev, unsigned int skbnr)
{
struct fe_priv *np = netdev_priv(dev);
- struct sk_buff *skb = np->tx_skbuff[skbnr];
- unsigned int j, entry, fragments;
-
- dprintk(KERN_INFO "%s: nv_release_txskb for skbnr %d, skb %p\n",
- dev->name, skbnr, np->tx_skbuff[skbnr]);
-
- entry = skbnr;
- if ((fragments = skb_shinfo(skb)->nr_frags) != 0) {
- for (j = fragments; j >= 1; j--) {
- skb_frag_t *frag = &skb_shinfo(skb)->frags[j-1];
- pci_unmap_page(np->pci_dev, np->tx_dma[entry],
- frag->size,
- PCI_DMA_TODEVICE);
- entry = (entry - 1) % TX_RING;
- }
+
+ dprintk(KERN_INFO "%s: nv_release_txskb for skbnr %d\n",
+ dev->name, skbnr);
+
+ if (np->tx_dma[skbnr]) {
+ pci_unmap_page(np->pci_dev, np->tx_dma[skbnr],
+ np->tx_dma_len[skbnr],
+ PCI_DMA_TODEVICE);
+ np->tx_dma[skbnr] = 0;
+ }
+
+ if (np->tx_skbuff[skbnr]) {
+ dev_kfree_skb_irq(np->tx_skbuff[skbnr]);
+ np->tx_skbuff[skbnr] = NULL;
+ return 1;
+ } else {
+ return 0;
}
- pci_unmap_single(np->pci_dev, np->tx_dma[entry],
- skb->len - skb->data_len,
- PCI_DMA_TODEVICE);
- dev_kfree_skb_irq(skb);
- np->tx_skbuff[skbnr] = NULL;
}
static void nv_drain_tx(struct net_device *dev)
@@ -981,10 +983,8 @@ static void nv_drain_tx(struct net_devic
np->tx_ring.orig[i].FlagLen = 0;
else
np->tx_ring.ex[i].FlagLen = 0;
- if (np->tx_skbuff[i]) {
- nv_release_txskb(dev, i);
+ if (nv_release_txskb(dev, i))
np->stats.tx_dropped++;
- }
}
}
@@ -1021,68 +1021,105 @@ static void drain_ring(struct net_device
static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct fe_priv *np = netdev_priv(dev);
+ u32 tx_flags = 0;
u32 tx_flags_extra = (np->desc_ver == DESC_VER_1 ? NV_TX_LASTPACKET : NV_TX2_LASTPACKET);
unsigned int fragments = skb_shinfo(skb)->nr_frags;
- unsigned int nr = (np->next_tx + fragments) % TX_RING;
+ unsigned int nr = (np->next_tx - 1) % TX_RING;
+ unsigned int start_nr = np->next_tx % TX_RING;
unsigned int i;
+ u32 offset = 0;
+ u32 bcnt;
+ u32 size = skb->len-skb->data_len;
+ u32 entries = (size >> NV_TX2_TSO_MAX_SHIFT) + ((size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0);
+
+ /* add fragments to entries count */
+ for (i = 0; i < fragments; i++) {
+ entries += (skb_shinfo(skb)->frags[i].size >> NV_TX2_TSO_MAX_SHIFT) +
+ ((skb_shinfo(skb)->frags[i].size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0);
+ }
spin_lock_irq(&np->lock);
- if ((np->next_tx - np->nic_tx + fragments) > TX_LIMIT_STOP) {
+ if ((np->next_tx - np->nic_tx + entries - 1) > TX_LIMIT_STOP) {
spin_unlock_irq(&np->lock);
netif_stop_queue(dev);
return NETDEV_TX_BUSY;
}
- np->tx_skbuff[nr] = skb;
-
- if (fragments) {
- dprintk(KERN_DEBUG "%s: nv_start_xmit: buffer contains %d fragments\n", dev->name, fragments);
- /* setup descriptors in reverse order */
- for (i = fragments; i >= 1; i--) {
- skb_frag_t *frag = &skb_shinfo(skb)->frags[i-1];
- np->tx_dma[nr] = pci_map_page(np->pci_dev, frag->page, frag->page_offset, frag->size,
- PCI_DMA_TODEVICE);
+ /* setup the header buffer */
+ do {
+ bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;
+ nr = (nr + 1) % TX_RING;
+
+ np->tx_dma[nr] = pci_map_single(np->pci_dev, skb->data + offset, bcnt,
+ PCI_DMA_TODEVICE);
+ np->tx_dma_len[nr] = bcnt;
+
+ if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
+ np->tx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->tx_dma[nr]);
+ np->tx_ring.orig[nr].FlagLen = cpu_to_le32((bcnt-1) | tx_flags);
+ } else {
+ np->tx_ring.ex[nr].PacketBufferHigh = cpu_to_le64(np->tx_dma[nr]) >> 32;
+ np->tx_ring.ex[nr].PacketBufferLow = cpu_to_le64(np->tx_dma[nr]) & 0x0FFFFFFFF;
+ np->tx_ring.ex[nr].FlagLen = cpu_to_le32((bcnt-1) | tx_flags);
+ }
+ tx_flags = np->tx_flags;
+ offset += bcnt;
+ size -= bcnt;
+ } while(size);
+
+ /* setup the fragments */
+ for (i = 0; i < fragments; i++) {
+ skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
+ u32 size = frag->size;
+ offset = 0;
+
+ do {
+ bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;
+ nr = (nr + 1) % TX_RING;
+
+ np->tx_dma[nr] = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt,
+ PCI_DMA_TODEVICE);
+ np->tx_dma_len[nr] = bcnt;
if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
np->tx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->tx_dma[nr]);
- np->tx_ring.orig[nr].FlagLen = cpu_to_le32( (frag->size-1) | np->tx_flags | tx_flags_extra);
+ np->tx_ring.orig[nr].FlagLen = cpu_to_le32((bcnt-1) | tx_flags);
} else {
np->tx_ring.ex[nr].PacketBufferHigh = cpu_to_le64(np->tx_dma[nr]) >> 32;
np->tx_ring.ex[nr].PacketBufferLow = cpu_to_le64(np->tx_dma[nr]) & 0x0FFFFFFFF;
- np->tx_ring.ex[nr].FlagLen = cpu_to_le32( (frag->size-1) | np->tx_flags | tx_flags_extra);
+ np->tx_ring.ex[nr].FlagLen = cpu_to_le32((bcnt-1) | tx_flags);
}
-
- nr = (nr - 1) % TX_RING;
+ offset += bcnt;
+ size -= bcnt;
+ } while (size);
+ }
- if (np->desc_ver == DESC_VER_1)
- tx_flags_extra &= ~NV_TX_LASTPACKET;
- else
- tx_flags_extra &= ~NV_TX2_LASTPACKET;
- }
+ /* set last fragment flag */
+ if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
+ np->tx_ring.orig[nr].FlagLen |= cpu_to_le32(tx_flags_extra);
+ } else {
+ np->tx_ring.ex[nr].FlagLen |= cpu_to_le32(tx_flags_extra);
}
+ np->tx_skbuff[nr] = skb;
+
#ifdef NETIF_F_TSO
if (skb_shinfo(skb)->tso_size)
- tx_flags_extra |= NV_TX2_TSO | (skb_shinfo(skb)->tso_size << NV_TX2_TSO_SHIFT);
+ tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->tso_size << NV_TX2_TSO_SHIFT);
else
#endif
- tx_flags_extra |= (skb->ip_summed == CHECKSUM_HW ? (NV_TX2_CHECKSUM_L3|NV_TX2_CHECKSUM_L4) : 0);
+ tx_flags_extra = (skb->ip_summed == CHECKSUM_HW ? (NV_TX2_CHECKSUM_L3|NV_TX2_CHECKSUM_L4) : 0);
- np->tx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len-skb->data_len,
- PCI_DMA_TODEVICE);
-
+ /* set tx flags */
if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
- np->tx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->tx_dma[nr]);
- np->tx_ring.orig[nr].FlagLen = cpu_to_le32( (skb->len-skb->data_len-1) | np->tx_flags | tx_flags_extra);
+ np->tx_ring.orig[start_nr].FlagLen |= cpu_to_le32(tx_flags | tx_flags_extra);
} else {
- np->tx_ring.ex[nr].PacketBufferHigh = cpu_to_le64(np->tx_dma[nr]) >> 32;
- np->tx_ring.ex[nr].PacketBufferLow = cpu_to_le64(np->tx_dma[nr]) & 0x0FFFFFFFF;
- np->tx_ring.ex[nr].FlagLen = cpu_to_le32( (skb->len-skb->data_len-1) | np->tx_flags | tx_flags_extra);
+ np->tx_ring.ex[start_nr].FlagLen |= cpu_to_le32(tx_flags | tx_flags_extra);
}
- dprintk(KERN_DEBUG "%s: nv_start_xmit: packet packet %d queued for transmission. tx_flags_extra: %x\n",
- dev->name, np->next_tx, tx_flags_extra);
+ dprintk(KERN_DEBUG "%s: nv_start_xmit: packet %d (entries %d) queued for transmission. tx_flags_extra: %x\n",
+ dev->name, np->next_tx, entries, tx_flags_extra);
{
int j;
for (j=0; j<64; j++) {
@@ -1093,7 +1130,7 @@ static int nv_start_xmit(struct sk_buff
dprintk("\n");
}
- np->next_tx += 1 + fragments;
+ np->next_tx += entries;
dev->trans_start = jiffies;
spin_unlock_irq(&np->lock);
@@ -1140,7 +1177,6 @@ static void nv_tx_done(struct net_device
np->stats.tx_packets++;
np->stats.tx_bytes += skb->len;
}
- nv_release_txskb(dev, i);
}
} else {
if (Flags & NV_TX2_LASTPACKET) {
@@ -1156,9 +1192,9 @@ static void nv_tx_done(struct net_device
np->stats.tx_packets++;
np->stats.tx_bytes += skb->len;
}
- nv_release_txskb(dev, i);
}
}
+ nv_release_txskb(dev, i);
np->nic_tx++;
}
if (np->next_tx - np->nic_tx < TX_LIMIT_START)
@@ -2456,7 +2492,7 @@ static int __devinit nv_probe(struct pci
np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK;
dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG;
#ifdef NETIF_F_TSO
- /* disabled dev->features |= NETIF_F_TSO; */
+ dev->features |= NETIF_F_TSO;
#endif
}
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index 94a91da..cb9d66a 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -718,14 +718,14 @@ struct gfar_private {
uint32_t msg_enable;
};
-extern inline u32 gfar_read(volatile unsigned *addr)
+static inline u32 gfar_read(volatile unsigned *addr)
{
u32 val;
val = in_be32(addr);
return val;
}
-extern inline void gfar_write(volatile unsigned *addr, u32 val)
+static inline void gfar_write(volatile unsigned *addr, u32 val)
{
out_be32(addr, val);
}
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c
index 0abf5dd..74e167e 100644
--- a/drivers/net/hp-plus.c
+++ b/drivers/net/hp-plus.c
@@ -138,12 +138,6 @@ static int __init do_hpp_probe(struct ne
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- /* NB: hpp_close() handles free_irq */
- release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT);
-}
-
#ifndef MODULE
struct net_device * __init hp_plus_probe(int unit)
{
@@ -473,6 +467,12 @@ init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ /* NB: hpp_close() handles free_irq */
+ release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT);
+}
+
void
cleanup_module(void)
{
diff --git a/drivers/net/hp.c b/drivers/net/hp.c
index 59cf841..cf9fb36 100644
--- a/drivers/net/hp.c
+++ b/drivers/net/hp.c
@@ -102,12 +102,6 @@ static int __init do_hp_probe(struct net
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- free_irq(dev->irq, dev);
- release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT);
-}
-
#ifndef MODULE
struct net_device * __init hp_probe(int unit)
{
@@ -444,6 +438,12 @@ init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT);
+}
+
void
cleanup_module(void)
{
diff --git a/drivers/net/ibm_emac/ibm_emac.h b/drivers/net/ibm_emac/ibm_emac.h
index 644edbf..c2dae60 100644
--- a/drivers/net/ibm_emac/ibm_emac.h
+++ b/drivers/net/ibm_emac/ibm_emac.h
@@ -110,6 +110,7 @@ struct emac_regs {
#define EMAC_MR1_TFS_2K 0x00080000
#define EMAC_MR1_TR0_MULT 0x00008000
#define EMAC_MR1_JPSM 0x00000000
+#define EMAC_MR1_MWSW_001 0x00000000
#define EMAC_MR1_BASE(opb) (EMAC_MR1_TFS_2K | EMAC_MR1_TR0_MULT)
#else
#define EMAC_MR1_RFS_4K 0x00180000
@@ -130,7 +131,7 @@ struct emac_regs {
(freq) <= 83 ? EMAC_MR1_OBCI_83 : \
(freq) <= 100 ? EMAC_MR1_OBCI_100 : EMAC_MR1_OBCI_100P)
#define EMAC_MR1_BASE(opb) (EMAC_MR1_TFS_2K | EMAC_MR1_TR | \
- EMAC_MR1_MWSW_001 | EMAC_MR1_OBCI(opb))
+ EMAC_MR1_OBCI(opb))
#endif
/* EMACx_TMR0 */
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c
index 1da8a66..591c586 100644
--- a/drivers/net/ibm_emac/ibm_emac_core.c
+++ b/drivers/net/ibm_emac/ibm_emac_core.c
@@ -408,7 +408,7 @@ static int emac_configure(struct ocp_ene
/* Mode register */
r = EMAC_MR1_BASE(emac_opb_mhz()) | EMAC_MR1_VLE | EMAC_MR1_IST;
if (dev->phy.duplex == DUPLEX_FULL)
- r |= EMAC_MR1_FDE;
+ r |= EMAC_MR1_FDE | EMAC_MR1_MWSW_001;
dev->stop_timeout = STOP_TIMEOUT_10;
switch (dev->phy.speed) {
case SPEED_1000:
diff --git a/drivers/net/lance.c b/drivers/net/lance.c
index 1d75ca0..d1d714f 100644
--- a/drivers/net/lance.c
+++ b/drivers/net/lance.c
@@ -309,17 +309,6 @@ static void lance_tx_timeout (struct net
\f
-static void cleanup_card(struct net_device *dev)
-{
- struct lance_private *lp = dev->priv;
- if (dev->dma != 4)
- free_dma(dev->dma);
- release_region(dev->base_addr, LANCE_TOTAL_SIZE);
- kfree(lp->tx_bounce_buffs);
- kfree((void*)lp->rx_buffs);
- kfree(lp);
-}
-
#ifdef MODULE
#define MAX_CARDS 8 /* Max number of interfaces (cards) per module */
@@ -367,6 +356,17 @@ int init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ struct lance_private *lp = dev->priv;
+ if (dev->dma != 4)
+ free_dma(dev->dma);
+ release_region(dev->base_addr, LANCE_TOTAL_SIZE);
+ kfree(lp->tx_bounce_buffs);
+ kfree((void*)lp->rx_buffs);
+ kfree(lp);
+}
+
void cleanup_module(void)
{
int this_dev;
diff --git a/drivers/net/lne390.c b/drivers/net/lne390.c
index 309d254..646e89f 100644
--- a/drivers/net/lne390.c
+++ b/drivers/net/lne390.c
@@ -145,13 +145,6 @@ static int __init do_lne390_probe(struct
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- free_irq(dev->irq, dev);
- release_region(dev->base_addr, LNE390_IO_EXTENT);
- iounmap(ei_status.mem);
-}
-
#ifndef MODULE
struct net_device * __init lne390_probe(int unit)
{
@@ -440,6 +433,13 @@ int init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr, LNE390_IO_EXTENT);
+ iounmap(ei_status.mem);
+}
+
void cleanup_module(void)
{
int this_dev;
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 3cb9b3f..22c3a37 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -6,7 +6,7 @@
* Copyright (C) 2002 rabeeh@galileo.co.il
*
* Copyright (C) 2003 PMC-Sierra, Inc.,
- * written by Manish Lachwani (lachwani@pmc-sierra.com)
+ * written by Manish Lachwani
*
* Copyright (C) 2003 Ralf Baechle <ralf@linux-mips.org>
*
diff --git a/drivers/net/ne.c b/drivers/net/ne.c
index 0de8fdd..94f782d 100644
--- a/drivers/net/ne.c
+++ b/drivers/net/ne.c
@@ -212,15 +212,6 @@ static int __init do_ne_probe(struct net
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv;
- if (idev)
- pnp_device_detach(idev);
- free_irq(dev->irq, dev);
- release_region(dev->base_addr, NE_IO_EXTENT);
-}
-
#ifndef MODULE
struct net_device * __init ne_probe(int unit)
{
@@ -859,6 +850,15 @@ int init_module(void)
return -ENODEV;
}
+static void cleanup_card(struct net_device *dev)
+{
+ struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv;
+ if (idev)
+ pnp_device_detach(idev);
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr, NE_IO_EXTENT);
+}
+
void cleanup_module(void)
{
int this_dev;
diff --git a/drivers/net/ne2.c b/drivers/net/ne2.c
index 6d62ada..e6df375 100644
--- a/drivers/net/ne2.c
+++ b/drivers/net/ne2.c
@@ -278,14 +278,6 @@ static int __init do_ne2_probe(struct ne
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- mca_mark_as_unused(ei_status.priv);
- mca_set_adapter_procfn( ei_status.priv, NULL, NULL);
- free_irq(dev->irq, dev);
- release_region(dev->base_addr, NE_IO_EXTENT);
-}
-
#ifndef MODULE
struct net_device * __init ne2_probe(int unit)
{
@@ -812,6 +804,14 @@ int init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ mca_mark_as_unused(ei_status.priv);
+ mca_set_adapter_procfn( ei_status.priv, NULL, NULL);
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr, NE_IO_EXTENT);
+}
+
void cleanup_module(void)
{
int this_dev;
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index 9a76ac1..197edd7 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -282,26 +282,22 @@ SK_U32 Val) /* pointer to store the rea
* Description:
* This function initialize the PCI resources and IO
*
- * Returns: N/A
- *
+ * Returns:
+ * 0 - indicate everything worked ok.
+ * != 0 - error indication
*/
-int SkGeInitPCI(SK_AC *pAC)
+static __devinit int SkGeInitPCI(SK_AC *pAC)
{
struct SK_NET_DEVICE *dev = pAC->dev[0];
struct pci_dev *pdev = pAC->PciDev;
int retval;
- if (pci_enable_device(pdev) != 0) {
- return 1;
- }
-
dev->mem_start = pci_resource_start (pdev, 0);
pci_set_master(pdev);
- if (pci_request_regions(pdev, "sk98lin") != 0) {
- retval = 2;
- goto out_disable;
- }
+ retval = pci_request_regions(pdev, "sk98lin");
+ if (retval)
+ goto out;
#ifdef SK_BIG_ENDIAN
/*
@@ -320,9 +316,8 @@ int SkGeInitPCI(SK_AC *pAC)
* Remap the regs into kernel space.
*/
pAC->IoBase = ioremap_nocache(dev->mem_start, 0x4000);
-
- if (!pAC->IoBase){
- retval = 3;
+ if (!pAC->IoBase) {
+ retval = -EIO;
goto out_release;
}
@@ -330,8 +325,7 @@ int SkGeInitPCI(SK_AC *pAC)
out_release:
pci_release_regions(pdev);
- out_disable:
- pci_disable_device(pdev);
+ out:
return retval;
}
@@ -492,7 +486,7 @@ module_param_array(AutoSizing, charp, NU
* 0, if everything is ok
* !=0, on error
*/
-static int __init SkGeBoardInit(struct SK_NET_DEVICE *dev, SK_AC *pAC)
+static int __devinit SkGeBoardInit(struct SK_NET_DEVICE *dev, SK_AC *pAC)
{
short i;
unsigned long Flags;
@@ -529,7 +523,7 @@ SK_BOOL DualNet;
if (SkGeInit(pAC, pAC->IoBase, SK_INIT_DATA) != 0) {
printk("HWInit (0) failed.\n");
spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
- return(-EAGAIN);
+ return -EIO;
}
SkI2cInit( pAC, pAC->IoBase, SK_INIT_DATA);
SkEventInit(pAC, pAC->IoBase, SK_INIT_DATA);
@@ -551,7 +545,7 @@ SK_BOOL DualNet;
if (SkGeInit(pAC, pAC->IoBase, SK_INIT_IO) != 0) {
printk("sk98lin: HWInit (1) failed.\n");
spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
- return(-EAGAIN);
+ return -EIO;
}
SkI2cInit( pAC, pAC->IoBase, SK_INIT_IO);
SkEventInit(pAC, pAC->IoBase, SK_INIT_IO);
@@ -583,20 +577,20 @@ SK_BOOL DualNet;
} else {
printk(KERN_WARNING "sk98lin: Illegal number of ports: %d\n",
pAC->GIni.GIMacsFound);
- return -EAGAIN;
+ return -EIO;
}
if (Ret) {
printk(KERN_WARNING "sk98lin: Requested IRQ %d is busy.\n",
dev->irq);
- return -EAGAIN;
+ return Ret;
}
pAC->AllocFlag |= SK_ALLOC_IRQ;
/* Alloc memory for this board (Mem for RxD/TxD) : */
if(!BoardAllocMem(pAC)) {
printk("No memory for descriptor rings.\n");
- return(-EAGAIN);
+ return -ENOMEM;
}
BoardInitMem(pAC);
@@ -612,7 +606,7 @@ SK_BOOL DualNet;
DualNet)) {
BoardFreeMem(pAC);
printk("sk98lin: SkGeInitAssignRamToQueues failed.\n");
- return(-EAGAIN);
+ return -EIO;
}
return (0);
@@ -633,8 +627,7 @@ SK_BOOL DualNet;
* SK_TRUE, if all memory could be allocated
* SK_FALSE, if not
*/
-static SK_BOOL BoardAllocMem(
-SK_AC *pAC)
+static __devinit SK_BOOL BoardAllocMem(SK_AC *pAC)
{
caddr_t pDescrMem; /* pointer to descriptor memory area */
size_t AllocLength; /* length of complete descriptor area */
@@ -727,8 +720,7 @@ size_t AllocLength; /* length of comple
*
* Returns: N/A
*/
-static void BoardInitMem(
-SK_AC *pAC) /* pointer to adapter context */
+static __devinit void BoardInitMem(SK_AC *pAC)
{
int i; /* loop counter */
int RxDescrSize; /* the size of a rx descriptor rounded up to alignment*/
@@ -4776,32 +4768,47 @@ static int __devinit skge_probe_one(stru
struct net_device *dev = NULL;
static int boards_found = 0;
int error = -ENODEV;
+ int using_dac = 0;
char DeviceStr[80];
if (pci_enable_device(pdev))
goto out;
/* Configure DMA attributes. */
- if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) &&
- pci_set_dma_mask(pdev, DMA_32BIT_MASK))
- goto out_disable_device;
-
+ if (sizeof(dma_addr_t) > sizeof(u32) &&
+ !(error = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
+ using_dac = 1;
+ error = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+ if (error < 0) {
+ printk(KERN_ERR "sk98lin %s unable to obtain 64 bit DMA "
+ "for consistent allocations\n", pci_name(pdev));
+ goto out_disable_device;
+ }
+ } else {
+ error = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+ if (error) {
+ printk(KERN_ERR "sk98lin %s no usable DMA configuration\n",
+ pci_name(pdev));
+ goto out_disable_device;
+ }
+ }
- if ((dev = alloc_etherdev(sizeof(DEV_NET))) == NULL) {
- printk(KERN_ERR "Unable to allocate etherdev "
+ error = -ENOMEM;
+ dev = alloc_etherdev(sizeof(DEV_NET));
+ if (!dev) {
+ printk(KERN_ERR "sk98lin: unable to allocate etherdev "
"structure!\n");
goto out_disable_device;
}
pNet = netdev_priv(dev);
- pNet->pAC = kmalloc(sizeof(SK_AC), GFP_KERNEL);
+ pNet->pAC = kzalloc(sizeof(SK_AC), GFP_KERNEL);
if (!pNet->pAC) {
- printk(KERN_ERR "Unable to allocate adapter "
+ printk(KERN_ERR "sk98lin: unable to allocate adapter "
"structure!\n");
goto out_free_netdev;
}
- memset(pNet->pAC, 0, sizeof(SK_AC));
pAC = pNet->pAC;
pAC->PciDev = pdev;
@@ -4810,6 +4817,7 @@ static int __devinit skge_probe_one(stru
pAC->CheckQueue = SK_FALSE;
dev->irq = pdev->irq;
+
error = SkGeInitPCI(pAC);
if (error) {
printk(KERN_ERR "sk98lin: PCI setup failed: %i\n", error);
@@ -4844,19 +4852,25 @@ static int __devinit skge_probe_one(stru
#endif
}
+ if (using_dac)
+ dev->features |= NETIF_F_HIGHDMA;
+
pAC->Index = boards_found++;
- if (SkGeBoardInit(dev, pAC))
+ error = SkGeBoardInit(dev, pAC);
+ if (error)
goto out_free_netdev;
/* Read Adapter name from VPD */
if (ProductStr(pAC, DeviceStr, sizeof(DeviceStr)) != 0) {
+ error = -EIO;
printk(KERN_ERR "sk98lin: Could not read VPD data.\n");
goto out_free_resources;
}
/* Register net device */
- if (register_netdev(dev)) {
+ error = register_netdev(dev);
+ if (error) {
printk(KERN_ERR "sk98lin: Could not register device.\n");
goto out_free_resources;
}
@@ -4883,15 +4897,17 @@ static int __devinit skge_probe_one(stru
boards_found++;
+ pci_set_drvdata(pdev, dev);
+
/* More then one port found */
if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) {
- if ((dev = alloc_etherdev(sizeof(DEV_NET))) == 0) {
- printk(KERN_ERR "Unable to allocate etherdev "
+ dev = alloc_etherdev(sizeof(DEV_NET));
+ if (!dev) {
+ printk(KERN_ERR "sk98lin: unable to allocate etherdev "
"structure!\n");
- goto out;
+ goto single_port;
}
- pAC->dev[1] = dev;
pNet = netdev_priv(dev);
pNet->PortNr = 1;
pNet->NetNr = 1;
@@ -4920,20 +4936,28 @@ static int __devinit skge_probe_one(stru
#endif
}
- if (register_netdev(dev)) {
- printk(KERN_ERR "sk98lin: Could not register device for seconf port.\n");
+ if (using_dac)
+ dev->features |= NETIF_F_HIGHDMA;
+
+ error = register_netdev(dev);
+ if (error) {
+ printk(KERN_ERR "sk98lin: Could not register device"
+ " for second port. (%d)\n", error);
free_netdev(dev);
- pAC->dev[1] = pAC->dev[0];
- } else {
- memcpy(&dev->dev_addr,
- &pAC->Addr.Net[1].CurrentMacAddress, 6);
- memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
-
- printk("%s: %s\n", dev->name, DeviceStr);
- printk(" PrefPort:B RlmtMode:Dual Check Link State\n");
+ goto single_port;
}
+
+ pAC->dev[1] = dev;
+ memcpy(&dev->dev_addr,
+ &pAC->Addr.Net[1].CurrentMacAddress, 6);
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
+
+ printk("%s: %s\n", dev->name, DeviceStr);
+ printk(" PrefPort:B RlmtMode:Dual Check Link State\n");
}
+single_port:
+
/* Save the hardware revision */
pAC->HWRevision = (((pAC->GIni.GIPciHwRev >> 4) & 0x0F)*10) +
(pAC->GIni.GIPciHwRev & 0x0F);
@@ -4945,7 +4969,6 @@ static int __devinit skge_probe_one(stru
memset(&pAC->PnmiBackup, 0, sizeof(SK_PNMI_STRUCT_DATA));
memcpy(&pAC->PnmiBackup, &pAC->PnmiStruct, sizeof(SK_PNMI_STRUCT_DATA));
- pci_set_drvdata(pdev, dev);
return 0;
out_free_resources:
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c
index ba8593a..3db30cd 100644
--- a/drivers/net/smc-ultra.c
+++ b/drivers/net/smc-ultra.c
@@ -168,18 +168,6 @@ static int __init do_ultra_probe(struct
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- /* NB: ultra_close_card() does free_irq */
-#ifdef __ISAPNP__
- struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv;
- if (idev)
- pnp_device_detach(idev);
-#endif
- release_region(dev->base_addr - ULTRA_NIC_OFFSET, ULTRA_IO_EXTENT);
- iounmap(ei_status.mem);
-}
-
#ifndef MODULE
struct net_device * __init ultra_probe(int unit)
{
@@ -594,6 +582,18 @@ init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ /* NB: ultra_close_card() does free_irq */
+#ifdef __ISAPNP__
+ struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv;
+ if (idev)
+ pnp_device_detach(idev);
+#endif
+ release_region(dev->base_addr - ULTRA_NIC_OFFSET, ULTRA_IO_EXTENT);
+ iounmap(ei_status.mem);
+}
+
void
cleanup_module(void)
{
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index 125ed00..c67c912 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -1564,7 +1564,7 @@ static int __devinit tulip_init_one (str
dev->dev_addr, 6);
}
#endif
-#if defined(__i386__) /* Patch up x86 BIOS bug. */
+#if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */
if (last_irq)
irq = last_irq;
#endif
diff --git a/drivers/net/wd.c b/drivers/net/wd.c
index b03feae..7caa8dc 100644
--- a/drivers/net/wd.c
+++ b/drivers/net/wd.c
@@ -127,13 +127,6 @@ static int __init do_wd_probe(struct net
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- free_irq(dev->irq, dev);
- release_region(dev->base_addr - WD_NIC_OFFSET, WD_IO_EXTENT);
- iounmap(ei_status.mem);
-}
-
#ifndef MODULE
struct net_device * __init wd_probe(int unit)
{
@@ -538,6 +531,13 @@ init_module(void)
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr - WD_NIC_OFFSET, WD_IO_EXTENT);
+ iounmap(ei_status.mem);
+}
+
void
cleanup_module(void)
{
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 44cd3fc..cf05661 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -7153,7 +7153,7 @@ static int ipw2100_wx_get_range(struct n
/* Set the Wireless Extension versions */
range->we_version_compiled = WIRELESS_EXT;
- range->we_version_source = 16;
+ range->we_version_source = 18;
// range->retry_capa; /* What retry options are supported */
// range->retry_flags; /* How to decode max/min retry limit */
@@ -7184,6 +7184,9 @@ static int ipw2100_wx_get_range(struct n
IW_EVENT_CAPA_MASK(SIOCGIWAP));
range->event_capa[1] = IW_EVENT_CAPA_K_1;
+ range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |
+ IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;
+
IPW_DEBUG_WX("GET Range\n");
return 0;
diff --git a/net/ieee80211/ieee80211_crypt_wep.c b/net/ieee80211/ieee80211_crypt_wep.c
index 073aebd..f8dca31 100644
--- a/net/ieee80211/ieee80211_crypt_wep.c
+++ b/net/ieee80211/ieee80211_crypt_wep.c
@@ -75,22 +75,14 @@ static void prism2_wep_deinit(void *priv
kfree(priv);
}
-/* Perform WEP encryption on given skb that has at least 4 bytes of headroom
- * for IV and 4 bytes of tailroom for ICV. Both IV and ICV will be transmitted,
- * so the payload length increases with 8 bytes.
- *
- * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))
- */
-static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
+/* Add WEP IV/key info to a frame that has at least 4 bytes of headroom */
+static int prism2_wep_build_iv(struct sk_buff *skb, int hdr_len, void *priv)
{
struct prism2_wep_data *wep = priv;
- u32 crc, klen, len;
- u8 key[WEP_KEY_LEN + 3];
- u8 *pos, *icv;
- struct scatterlist sg;
-
- if (skb_headroom(skb) < 4 || skb_tailroom(skb) < 4 ||
- skb->len < hdr_len)
+ u32 klen, len;
+ u8 *pos;
+
+ if (skb_headroom(skb) < 4 || skb->len < hdr_len)
return -1;
len = skb->len - hdr_len;
@@ -112,15 +104,47 @@ static int prism2_wep_encrypt(struct sk_
}
/* Prepend 24-bit IV to RC4 key and TX frame */
- *pos++ = key[0] = (wep->iv >> 16) & 0xff;
- *pos++ = key[1] = (wep->iv >> 8) & 0xff;
- *pos++ = key[2] = wep->iv & 0xff;
+ *pos++ = (wep->iv >> 16) & 0xff;
+ *pos++ = (wep->iv >> 8) & 0xff;
+ *pos++ = wep->iv & 0xff;
*pos++ = wep->key_idx << 6;
+ return 0;
+}
+
+/* Perform WEP encryption on given skb that has at least 4 bytes of headroom
+ * for IV and 4 bytes of tailroom for ICV. Both IV and ICV will be transmitted,
+ * so the payload length increases with 8 bytes.
+ *
+ * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))
+ */
+static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
+{
+ struct prism2_wep_data *wep = priv;
+ u32 crc, klen, len;
+ u8 *pos, *icv;
+ struct scatterlist sg;
+ u8 key[WEP_KEY_LEN + 3];
+
+ /* other checks are in prism2_wep_build_iv */
+ if (skb_tailroom(skb) < 4)
+ return -1;
+
+ /* add the IV to the frame */
+ if (prism2_wep_build_iv(skb, hdr_len, priv))
+ return -1;
+
+ /* Copy the IV into the first 3 bytes of the key */
+ memcpy(key, skb->data + hdr_len, 3);
+
/* Copy rest of the WEP key (the secret part) */
memcpy(key + 3, wep->key, wep->key_len);
+
+ len = skb->len - hdr_len - 4;
+ pos = skb->data + hdr_len + 4;
+ klen = 3 + wep->key_len;
- /* Append little-endian CRC32 and encrypt it to produce ICV */
+ /* Append little-endian CRC32 over only the data and encrypt it to produce ICV */
crc = ~crc32_le(~0, pos, len);
icv = skb_put(skb, 4);
icv[0] = crc;
@@ -231,6 +255,7 @@ static struct ieee80211_crypto_ops ieee8
.name = "WEP",
.init = prism2_wep_init,
.deinit = prism2_wep_deinit,
+ .build_iv = prism2_wep_build_iv,
.encrypt_mpdu = prism2_wep_encrypt,
.decrypt_mpdu = prism2_wep_decrypt,
.encrypt_msdu = NULL,
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c
index 445f206..e5b33c8 100644
--- a/net/ieee80211/ieee80211_tx.c
+++ b/net/ieee80211/ieee80211_tx.c
@@ -288,7 +288,7 @@ int ieee80211_xmit(struct sk_buff *skb,
/* Determine total amount of storage required for TXB packets */
bytes = skb->len + SNAP_SIZE + sizeof(u16);
- if (host_encrypt)
+ if (host_encrypt || host_build_iv)
fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA |
IEEE80211_FCTL_PROTECTED;
else
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
index 181755f..406d5b9 100644
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -284,7 +284,7 @@ int ieee80211_wx_set_encode(struct ieee8
};
int i, key, key_provided, len;
struct ieee80211_crypt_data **crypt;
- int host_crypto = ieee->host_encrypt || ieee->host_decrypt;
+ int host_crypto = ieee->host_encrypt || ieee->host_decrypt || ieee->host_build_iv;
IEEE80211_DEBUG_WX("SET_ENCODE\n");
^ permalink raw reply related [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-14 2:29 ` Adrian Bunk
@ 2006-01-14 5:05 ` Randy.Dunlap
0 siblings, 0 replies; 33+ messages in thread
From: Randy.Dunlap @ 2006-01-14 5:05 UTC (permalink / raw)
To: Adrian Bunk
Cc: sam, axboe, akpm, torvalds, jgarzik, netdev, linux-kernel, zippel
On Sat, 14 Jan 2006 03:29:49 +0100 Adrian Bunk wrote:
> On Fri, Jan 13, 2006 at 08:28:13PM +0100, Sam Ravnborg wrote:
> > On Fri, Jan 13, 2006 at 08:23:16PM +0100, Jens Axboe wrote:
> > >
> > > 'select' is really cool as a concept, but when you can't figure out why
> > > you cannot disable CONFIG_FOO because CONFIG_BAR selects it it's really
> > > annoying. Would be nice to actually be able to see if another option has
> > > selected this option.
> >
> > In menuconfig:
> >
> > Typing '?' on CONFIG_HOTPLUG revealed:
> > Selected by: PCCARD || HOTPLUG_PCI && PCI && EXPERIMENTAL || FW_LOADER
> >...
>
> Is there any trick to see them all when they are longer than the line in
> the terminal (e.g. what selects FW_LOADER?)?
Use the right/left arrow keys to scroll horizontally.
---
~Randy
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-13 19:28 ` Sam Ravnborg
2006-01-13 19:36 ` Jens Axboe
@ 2006-01-14 2:29 ` Adrian Bunk
2006-01-14 5:05 ` Randy.Dunlap
1 sibling, 1 reply; 33+ messages in thread
From: Adrian Bunk @ 2006-01-14 2:29 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Jens Axboe, Andrew Morton, Linus Torvalds, jgarzik, netdev,
linux-kernel, Roman Zippel
On Fri, Jan 13, 2006 at 08:28:13PM +0100, Sam Ravnborg wrote:
> On Fri, Jan 13, 2006 at 08:23:16PM +0100, Jens Axboe wrote:
> >
> > 'select' is really cool as a concept, but when you can't figure out why
> > you cannot disable CONFIG_FOO because CONFIG_BAR selects it it's really
> > annoying. Would be nice to actually be able to see if another option has
> > selected this option.
>
> In menuconfig:
>
> Typing '?' on CONFIG_HOTPLUG revealed:
> Selected by: PCCARD || HOTPLUG_PCI && PCI && EXPERIMENTAL || FW_LOADER
>...
Is there any trick to see them all when they are longer than the line in
the terminal (e.g. what selects FW_LOADER?)?
> Sam
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-13 19:28 ` Sam Ravnborg
@ 2006-01-13 19:36 ` Jens Axboe
2006-01-14 2:29 ` Adrian Bunk
1 sibling, 0 replies; 33+ messages in thread
From: Jens Axboe @ 2006-01-13 19:36 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Andrew Morton, Linus Torvalds, jgarzik, netdev, linux-kernel,
Roman Zippel
On Fri, Jan 13 2006, Sam Ravnborg wrote:
> On Fri, Jan 13, 2006 at 08:23:16PM +0100, Jens Axboe wrote:
> >
> > 'select' is really cool as a concept, but when you can't figure out why
> > you cannot disable CONFIG_FOO because CONFIG_BAR selects it it's really
> > annoying. Would be nice to actually be able to see if another option has
> > selected this option.
>
> In menuconfig:
>
> Typing '?' on CONFIG_HOTPLUG revealed:
> Selected by: PCCARD || HOTPLUG_PCI && PCI && EXPERIMENTAL || FW_LOADER
>
> Then use '/' to search for the CONFIG_ symbols to see where they are
> defined.
Live and learn, thanks, didn't know you could do that!
--
Jens Axboe
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-13 19:23 ` Jens Axboe
@ 2006-01-13 19:28 ` Sam Ravnborg
2006-01-13 19:36 ` Jens Axboe
2006-01-14 2:29 ` Adrian Bunk
0 siblings, 2 replies; 33+ messages in thread
From: Sam Ravnborg @ 2006-01-13 19:28 UTC (permalink / raw)
To: Jens Axboe
Cc: Andrew Morton, Linus Torvalds, jgarzik, netdev, linux-kernel,
Roman Zippel
On Fri, Jan 13, 2006 at 08:23:16PM +0100, Jens Axboe wrote:
>
> 'select' is really cool as a concept, but when you can't figure out why
> you cannot disable CONFIG_FOO because CONFIG_BAR selects it it's really
> annoying. Would be nice to actually be able to see if another option has
> selected this option.
In menuconfig:
Typing '?' on CONFIG_HOTPLUG revealed:
Selected by: PCCARD || HOTPLUG_PCI && PCI && EXPERIMENTAL || FW_LOADER
Then use '/' to search for the CONFIG_ symbols to see where they are
defined.
Sam
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-12 22:39 ` Andrew Morton
2006-01-12 22:46 ` Linus Torvalds
@ 2006-01-13 19:23 ` Jens Axboe
2006-01-13 19:28 ` Sam Ravnborg
1 sibling, 1 reply; 33+ messages in thread
From: Jens Axboe @ 2006-01-13 19:23 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, jgarzik, netdev, linux-kernel, Roman Zippel
On Thu, Jan 12 2006, Andrew Morton wrote:
> Linus Torvalds <torvalds@osdl.org> wrote:
> >
> > On Thu, 12 Jan 2006, Jeff Garzik wrote:
> > >
> > > dann frazier:
> > > CONFIG_AIRO needs CONFIG_CRYPTO
> >
> > I think this is done wrong.
> >
> > It should "select CRYPTO" rather than "depends on CRYPTO".
> >
> > Otherwise people won't see it just because they don't have crypto enabled,
> > which is not very user-friendly.
> >
>
> Yes, I think that's much more Aunt-Nellie-friendly, but Roman considers it
> abuse of the Kconfig system in ways which I never completely understood?
'select' is really cool as a concept, but when you can't figure out why
you cannot disable CONFIG_FOO because CONFIG_BAR selects it it's really
annoying. Would be nice to actually be able to see if another option has
selected this option.
--
Jens Axboe
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-12 22:46 ` Linus Torvalds
@ 2006-01-13 17:56 ` Roman Zippel
0 siblings, 0 replies; 33+ messages in thread
From: Roman Zippel @ 2006-01-13 17:56 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, jgarzik, netdev, linux-kernel
Hi,
On Thu, 12 Jan 2006, Linus Torvalds wrote:
> > Yes, I think that's much more Aunt-Nellie-friendly, but Roman considers it
> > abuse of the Kconfig system in ways which I never completely understood?
>
> Hmm. If Roman dislikes it, he must dislike the fact that we already do
> exactly this for a ton of different things. There's something like 2000+
> "select" statements in the kernel Kconfig tree, and just grepping for
> "select.*CRYPTO" gets 52 hits..
The basic problem is that it overrides any other dependencies and it makes
easy to screw them up.
The basic rule should be to use select only to include library
functionality, which is mostly independent and has no other dependencies.
Selecting larger subsystem, which may require more configuration itself,
should be avoided.
bye, Roman
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-12 22:42 ` Jeff Garzik
@ 2006-01-12 23:14 ` Adrian Bunk
0 siblings, 0 replies; 33+ messages in thread
From: Adrian Bunk @ 2006-01-12 23:14 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Linus Torvalds, Andrew Morton, netdev, linux-kernel
On Thu, Jan 12, 2006 at 05:42:27PM -0500, Jeff Garzik wrote:
> On Thu, Jan 12, 2006 at 02:30:19PM -0800, Linus Torvalds wrote:
> >
> >
> > On Thu, 12 Jan 2006, Jeff Garzik wrote:
> > >
> > > dann frazier:
> > > CONFIG_AIRO needs CONFIG_CRYPTO
> >
> > I think this is done wrong.
> >
> > It should "select CRYPTO" rather than "depends on CRYPTO".
>
> OK
>...
What was wrong with my patch [1] that did not only this, but also fixes
the same bug with AIRO_CS and removes all the #ifdef's for the
non-compiling CRYPTO=n case from the driver?
> Jeff
cu
Adrian
[1] http://lkml.org/lkml/2006/1/10/328
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-12 22:39 ` Andrew Morton
@ 2006-01-12 22:46 ` Linus Torvalds
2006-01-13 17:56 ` Roman Zippel
2006-01-13 19:23 ` Jens Axboe
1 sibling, 1 reply; 33+ messages in thread
From: Linus Torvalds @ 2006-01-12 22:46 UTC (permalink / raw)
To: Andrew Morton; +Cc: jgarzik, netdev, linux-kernel, Roman Zippel
On Thu, 12 Jan 2006, Andrew Morton wrote:
>
> Yes, I think that's much more Aunt-Nellie-friendly, but Roman considers it
> abuse of the Kconfig system in ways which I never completely understood?
Hmm. If Roman dislikes it, he must dislike the fact that we already do
exactly this for a ton of different things. There's something like 2000+
"select" statements in the kernel Kconfig tree, and just grepping for
"select.*CRYPTO" gets 52 hits..
So this isn't new..
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-12 22:30 ` Linus Torvalds
2006-01-12 22:39 ` Andrew Morton
@ 2006-01-12 22:42 ` Jeff Garzik
2006-01-12 23:14 ` Adrian Bunk
1 sibling, 1 reply; 33+ messages in thread
From: Jeff Garzik @ 2006-01-12 22:42 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, netdev, linux-kernel
On Thu, Jan 12, 2006 at 02:30:19PM -0800, Linus Torvalds wrote:
>
>
> On Thu, 12 Jan 2006, Jeff Garzik wrote:
> >
> > dann frazier:
> > CONFIG_AIRO needs CONFIG_CRYPTO
>
> I think this is done wrong.
>
> It should "select CRYPTO" rather than "depends on CRYPTO".
OK
> Otherwise people won't see it just because they don't have crypto enabled,
> which is not very user-friendly.
>
> Btw, why are these casts there? Either the functions are of the right
> type, or they aren't. In neither case is the cast correct.
>
> I do realize that there are comments in <net/iw_handler.h> that says that
> you should do the cast, but that's no excuse for crap or stupid code.
>
> If it's an issue of trying to make greppable code, why not have
> just the comment?
>
> > @@ -2378,6 +2566,15 @@ static const iw_handler atmel_handler[]
> > (iw_handler) atmel_get_encode, /* SIOCGIWENCODE */
> > (iw_handler) atmel_set_power, /* SIOCSIWPOWER */
> > (iw_handler) atmel_get_power, /* SIOCGIWPOWER */
> > + (iw_handler) NULL, /* -- hole -- */
> > + (iw_handler) NULL, /* -- hole -- */
> ...
>
> Hmm?
Welcome to the awful wireless driver API. This type crapola is a key
thing that needs changing, but its not the only thing. There are also
some nasty wireless APIs which do casts based on variable (passed-in)
struct offsets...
This needs to change to a type-safe thingy like struct ethtool_ops, but
the above is what we were lumped with.
Jeff
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-12 22:30 ` Linus Torvalds
@ 2006-01-12 22:39 ` Andrew Morton
2006-01-12 22:46 ` Linus Torvalds
2006-01-13 19:23 ` Jens Axboe
2006-01-12 22:42 ` Jeff Garzik
1 sibling, 2 replies; 33+ messages in thread
From: Andrew Morton @ 2006-01-12 22:39 UTC (permalink / raw)
To: Linus Torvalds; +Cc: jgarzik, netdev, linux-kernel, Roman Zippel
Linus Torvalds <torvalds@osdl.org> wrote:
>
> On Thu, 12 Jan 2006, Jeff Garzik wrote:
> >
> > dann frazier:
> > CONFIG_AIRO needs CONFIG_CRYPTO
>
> I think this is done wrong.
>
> It should "select CRYPTO" rather than "depends on CRYPTO".
>
> Otherwise people won't see it just because they don't have crypto enabled,
> which is not very user-friendly.
>
Yes, I think that's much more Aunt-Nellie-friendly, but Roman considers it
abuse of the Kconfig system in ways which I never completely understood?
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2006-01-12 22:13 Jeff Garzik
@ 2006-01-12 22:30 ` Linus Torvalds
2006-01-12 22:39 ` Andrew Morton
2006-01-12 22:42 ` Jeff Garzik
0 siblings, 2 replies; 33+ messages in thread
From: Linus Torvalds @ 2006-01-12 22:30 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, netdev, linux-kernel
On Thu, 12 Jan 2006, Jeff Garzik wrote:
>
> dann frazier:
> CONFIG_AIRO needs CONFIG_CRYPTO
I think this is done wrong.
It should "select CRYPTO" rather than "depends on CRYPTO".
Otherwise people won't see it just because they don't have crypto enabled,
which is not very user-friendly.
Btw, why are these casts there? Either the functions are of the right
type, or they aren't. In neither case is the cast correct.
I do realize that there are comments in <net/iw_handler.h> that says that
you should do the cast, but that's no excuse for crap or stupid code.
If it's an issue of trying to make greppable code, why not have
just the comment?
> @@ -2378,6 +2566,15 @@ static const iw_handler atmel_handler[]
> (iw_handler) atmel_get_encode, /* SIOCGIWENCODE */
> (iw_handler) atmel_set_power, /* SIOCSIWPOWER */
> (iw_handler) atmel_get_power, /* SIOCGIWPOWER */
> + (iw_handler) NULL, /* -- hole -- */
> + (iw_handler) NULL, /* -- hole -- */
...
Hmm?
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* [git patches] 2.6.x net driver updates
@ 2006-01-12 22:13 Jeff Garzik
2006-01-12 22:30 ` Linus Torvalds
0 siblings, 1 reply; 33+ messages in thread
From: Jeff Garzik @ 2006-01-12 22:13 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: netdev, linux-kernel
Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to receive the following updates:
drivers/net/bonding/bond_alb.c | 4
drivers/net/bonding/bonding.h | 4
drivers/net/e100.c | 32 +++++
drivers/net/gianfar.c | 6 -
drivers/net/gianfar_mii.c | 5
drivers/net/phy/mdio_bus.c | 2
drivers/net/phy/phy.c | 2
drivers/net/tulip/uli526x.c | 6 -
drivers/net/via-velocity.c | 2
drivers/net/wireless/Kconfig | 2
drivers/net/wireless/atmel.c | 227 ++++++++++++++++++++++++++++++++++++++++-
include/linux/fsl_devices.h | 6 -
include/linux/phy.h | 3
include/net/ieee80211.h | 6 -
14 files changed, 281 insertions(+), 26 deletions(-)
Dan Williams:
wireless/atmel: add IWENCODEEXT, IWAUTH, and association event support
dann frazier:
CONFIG_AIRO needs CONFIG_CRYPTO
Eric Sesterhenn / snakebyte:
replace MODULE_PARM in tulip/uli526x.c
Jay Vosburgh:
bonding: UPDATED hash-table corruption in bond_alb.c
Johannes Berg:
fix wrong comments in ieee80211.h
John W. Linville:
via-velocity: use NETIF_F_IP_CSUM (hardware only support IPv4)
Kumar Gala:
gfar: fix compile error
gianfar mii: Use proper resource for MII memory region
phy: Added a macro to represent the string format used to match a phy device
gianfar: Use new PHY_ID_FMT macro
ODonnell, Michael:
corruption during e100 MDI register access
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 854ddfb..f2a6318 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -169,9 +169,9 @@ static void tlb_clear_slave(struct bondi
index = next_index;
}
- _unlock_tx_hashtbl(bond);
-
tlb_init_slave(slave);
+
+ _unlock_tx_hashtbl(bond);
}
/* Must be called before starting the monitor timer */
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index f20bb85..3dd78d0 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -22,8 +22,8 @@
#include "bond_3ad.h"
#include "bond_alb.h"
-#define DRV_VERSION "3.0.0"
-#define DRV_RELDATE "November 8, 2005"
+#define DRV_VERSION "3.0.1"
+#define DRV_RELDATE "January 9, 2006"
#define DRV_NAME "bonding"
#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 22cd045..23de226 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -132,6 +132,10 @@
* TODO:
* o several entry points race with dev->close
* o check for tx-no-resources/stop Q races with tx clean/wake Q
+ *
+ * FIXES:
+ * 2005/12/02 - Michael O'Donnell <Michael.ODonnell at stratus dot com>
+ * - Stratus87247: protect MDI control register manipulations
*/
#include <linux/config.h>
@@ -578,6 +582,7 @@ struct nic {
u16 leds;
u16 eeprom_wc;
u16 eeprom[256];
+ spinlock_t mdio_lock;
};
static inline void e100_write_flush(struct nic *nic)
@@ -876,15 +881,35 @@ static u16 mdio_ctrl(struct nic *nic, u3
{
u32 data_out = 0;
unsigned int i;
+ unsigned long flags;
+
+ /*
+ * Stratus87247: we shouldn't be writing the MDI control
+ * register until the Ready bit shows True. Also, since
+ * manipulation of the MDI control registers is a multi-step
+ * procedure it should be done under lock.
+ */
+ spin_lock_irqsave(&nic->mdio_lock, flags);
+ for (i = 100; i; --i) {
+ if (readl(&nic->csr->mdi_ctrl) & mdi_ready)
+ break;
+ udelay(20);
+ }
+ if (unlikely(!i)) {
+ printk("e100.mdio_ctrl(%s) won't go Ready\n",
+ nic->netdev->name );
+ spin_unlock_irqrestore(&nic->mdio_lock, flags);
+ return 0; /* No way to indicate timeout error */
+ }
writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl);
- for(i = 0; i < 100; i++) {
+ for (i = 0; i < 100; i++) {
udelay(20);
- if((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready)
+ if ((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready)
break;
}
-
+ spin_unlock_irqrestore(&nic->mdio_lock, flags);
DPRINTK(HW, DEBUG,
"%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n",
dir == mdi_read ? "READ" : "WRITE", addr, reg, data, data_out);
@@ -2562,6 +2587,7 @@ static int __devinit e100_probe(struct p
/* locks must be initialized before calling hw_reset */
spin_lock_init(&nic->cb_lock);
spin_lock_init(&nic->cmd_lock);
+ spin_lock_init(&nic->mdio_lock);
/* Reset the device before pci_set_master() in case device is in some
* funky state and has an interrupt pending - hint: we don't have the
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 146f951..0c18dbd 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -84,6 +84,7 @@
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/udp.h>
+#include <linux/in.h>
#include <asm/io.h>
#include <asm/irq.h>
@@ -398,12 +399,15 @@ static int init_phy(struct net_device *d
priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ?
SUPPORTED_1000baseT_Full : 0;
struct phy_device *phydev;
+ char phy_id[BUS_ID_SIZE];
priv->oldlink = 0;
priv->oldspeed = 0;
priv->oldduplex = -1;
- phydev = phy_connect(dev, priv->einfo->bus_id, &adjust_link, 0);
+ snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id);
+
+ phydev = phy_connect(dev, phy_id, &adjust_link, 0);
if (IS_ERR(phydev)) {
printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index 04a462c..74e52fc 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -128,6 +128,7 @@ int gfar_mdio_probe(struct device *dev)
struct gianfar_mdio_data *pdata;
struct gfar_mii *regs;
struct mii_bus *new_bus;
+ struct resource *r;
int err = 0;
if (NULL == dev)
@@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev)
return -ENODEV;
}
+ r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
/* Set the PHY base address */
- regs = (struct gfar_mii *) ioremap(pdata->paddr,
+ regs = (struct gfar_mii *) ioremap(r->start,
sizeof (struct gfar_mii));
if (NULL == regs) {
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 02940c0..459443b 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -81,7 +81,7 @@ int mdiobus_register(struct mii_bus *bus
phydev->dev.parent = bus->dev;
phydev->dev.bus = &mdio_bus_type;
- sprintf(phydev->dev.bus_id, "phy%d:%d", bus->id, i);
+ snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, i);
phydev->bus = bus;
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index b8686e4..1474b7c 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -42,7 +42,7 @@
*/
void phy_print_status(struct phy_device *phydev)
{
- pr_info("%s: Link is %s", phydev->dev.bus_id,
+ pr_info("PHY: %s - Link is %s", phydev->dev.bus_id,
phydev->link ? "Up" : "Down");
if (phydev->link)
printk(" - %d/%s", phydev->speed,
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index 1a43163..9839816 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -1689,9 +1689,9 @@ MODULE_AUTHOR("Peer Chen, peer.chen@uli.
MODULE_DESCRIPTION("ULi M5261/M5263 fast ethernet driver");
MODULE_LICENSE("GPL");
-MODULE_PARM(debug, "i");
-MODULE_PARM(mode, "i");
-MODULE_PARM(cr6set, "i");
+module_param(debug, int, 0644);
+module_param(mode, int, 0);
+module_param(cr6set, int, 0);
MODULE_PARM_DESC(debug, "ULi M5261/M5263 enable debugging (0-1)");
MODULE_PARM_DESC(mode, "ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8: HomePNA");
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 82c6b75..c2d5907 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -791,7 +791,7 @@ static int __devinit velocity_found1(str
#endif
if (vptr->flags & VELOCITY_FLAGS_TX_CSUM) {
- dev->features |= NETIF_F_HW_CSUM;
+ dev->features |= NETIF_F_IP_CSUM;
}
ret = register_netdev(dev);
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 24f7967..c1a6e69 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -243,7 +243,7 @@ config IPW2200_DEBUG
config AIRO
tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards"
- depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN)
+ depends on NET_RADIO && ISA_DMA_API && CRYPTO && (PCI || BROKEN)
---help---
This is the standard Linux driver to support Cisco/Aironet ISA and
PCI 802.11 wireless cards.
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index e4729dd..f0ccfef 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -1407,6 +1407,17 @@ static int atmel_close(struct net_device
{
struct atmel_private *priv = netdev_priv(dev);
+ /* Send event to userspace that we are disassociating */
+ if (priv->station_state == STATION_STATE_READY) {
+ union iwreq_data wrqu;
+
+ wrqu.data.length = 0;
+ wrqu.data.flags = 0;
+ wrqu.ap_addr.sa_family = ARPHRD_ETHER;
+ memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
+ wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
+ }
+
atmel_enter_state(priv, STATION_STATE_DOWN);
if (priv->bus_type == BUS_TYPE_PCCARD)
@@ -1780,10 +1791,10 @@ static int atmel_set_encode(struct net_d
priv->wep_is_on = 1;
priv->exclude_unencrypted = 1;
if (priv->wep_key_len[index] > 5) {
- priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64;
+ priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128;
priv->encryption_level = 2;
} else {
- priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128;
+ priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64;
priv->encryption_level = 1;
}
}
@@ -1853,6 +1864,181 @@ static int atmel_get_encode(struct net_d
return 0;
}
+static int atmel_set_encodeext(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu,
+ char *extra)
+{
+ struct atmel_private *priv = netdev_priv(dev);
+ struct iw_point *encoding = &wrqu->encoding;
+ struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
+ int idx, key_len;
+
+ /* Determine and validate the key index */
+ idx = encoding->flags & IW_ENCODE_INDEX;
+ if (idx) {
+ if (idx < 1 || idx > WEP_KEYS)
+ return -EINVAL;
+ idx--;
+ } else
+ idx = priv->default_key;
+
+ if ((encoding->flags & IW_ENCODE_DISABLED) ||
+ ext->alg == IW_ENCODE_ALG_NONE) {
+ priv->wep_is_on = 0;
+ priv->encryption_level = 0;
+ priv->pairwise_cipher_suite = CIPHER_SUITE_NONE;
+ }
+
+ if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
+ priv->default_key = idx;
+
+ /* Set the requested key */
+ switch (ext->alg) {
+ case IW_ENCODE_ALG_NONE:
+ break;
+ case IW_ENCODE_ALG_WEP:
+ if (ext->key_len > 5) {
+ priv->wep_key_len[idx] = 13;
+ priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128;
+ priv->encryption_level = 2;
+ } else if (ext->key_len > 0) {
+ priv->wep_key_len[idx] = 5;
+ priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64;
+ priv->encryption_level = 1;
+ } else {
+ return -EINVAL;
+ }
+ priv->wep_is_on = 1;
+ memset(priv->wep_keys[idx], 0, 13);
+ key_len = min ((int)ext->key_len, priv->wep_key_len[idx]);
+ memcpy(priv->wep_keys[idx], ext->key, key_len);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return -EINPROGRESS;
+}
+
+static int atmel_get_encodeext(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu,
+ char *extra)
+{
+ struct atmel_private *priv = netdev_priv(dev);
+ struct iw_point *encoding = &wrqu->encoding;
+ struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
+ int idx, max_key_len;
+
+ max_key_len = encoding->length - sizeof(*ext);
+ if (max_key_len < 0)
+ return -EINVAL;
+
+ idx = encoding->flags & IW_ENCODE_INDEX;
+ if (idx) {
+ if (idx < 1 || idx > WEP_KEYS)
+ return -EINVAL;
+ idx--;
+ } else
+ idx = priv->default_key;
+
+ encoding->flags = idx + 1;
+ memset(ext, 0, sizeof(*ext));
+
+ if (!priv->wep_is_on) {
+ ext->alg = IW_ENCODE_ALG_NONE;
+ ext->key_len = 0;
+ encoding->flags |= IW_ENCODE_DISABLED;
+ } else {
+ if (priv->encryption_level > 0)
+ ext->alg = IW_ENCODE_ALG_WEP;
+ else
+ return -EINVAL;
+
+ ext->key_len = priv->wep_key_len[idx];
+ memcpy(ext->key, priv->wep_keys[idx], ext->key_len);
+ encoding->flags |= IW_ENCODE_ENABLED;
+ }
+
+ return 0;
+}
+
+static int atmel_set_auth(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
+{
+ struct atmel_private *priv = netdev_priv(dev);
+ struct iw_param *param = &wrqu->param;
+
+ switch (param->flags & IW_AUTH_INDEX) {
+ case IW_AUTH_WPA_VERSION:
+ case IW_AUTH_CIPHER_PAIRWISE:
+ case IW_AUTH_CIPHER_GROUP:
+ case IW_AUTH_KEY_MGMT:
+ case IW_AUTH_RX_UNENCRYPTED_EAPOL:
+ case IW_AUTH_PRIVACY_INVOKED:
+ /*
+ * atmel does not use these parameters
+ */
+ break;
+
+ case IW_AUTH_DROP_UNENCRYPTED:
+ priv->exclude_unencrypted = param->value ? 1 : 0;
+ break;
+
+ case IW_AUTH_80211_AUTH_ALG: {
+ if (param->value & IW_AUTH_ALG_SHARED_KEY) {
+ priv->exclude_unencrypted = 1;
+ } else if (param->value & IW_AUTH_ALG_OPEN_SYSTEM) {
+ priv->exclude_unencrypted = 0;
+ } else
+ return -EINVAL;
+ break;
+ }
+
+ case IW_AUTH_WPA_ENABLED:
+ /* Silently accept disable of WPA */
+ if (param->value > 0)
+ return -EOPNOTSUPP;
+ break;
+
+ default:
+ return -EOPNOTSUPP;
+ }
+ return -EINPROGRESS;
+}
+
+static int atmel_get_auth(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
+{
+ struct atmel_private *priv = netdev_priv(dev);
+ struct iw_param *param = &wrqu->param;
+
+ switch (param->flags & IW_AUTH_INDEX) {
+ case IW_AUTH_DROP_UNENCRYPTED:
+ param->value = priv->exclude_unencrypted;
+ break;
+
+ case IW_AUTH_80211_AUTH_ALG:
+ if (priv->exclude_unencrypted == 1)
+ param->value = IW_AUTH_ALG_SHARED_KEY;
+ else
+ param->value = IW_AUTH_ALG_OPEN_SYSTEM;
+ break;
+
+ case IW_AUTH_WPA_ENABLED:
+ param->value = 0;
+ break;
+
+ default:
+ return -EOPNOTSUPP;
+ }
+ return 0;
+}
+
+
static int atmel_get_name(struct net_device *dev,
struct iw_request_info *info,
char *cwrq,
@@ -2289,13 +2475,15 @@ static int atmel_set_wap(struct net_devi
{
struct atmel_private *priv = netdev_priv(dev);
int i;
- static const u8 bcast[] = { 255, 255, 255, 255, 255, 255 };
+ static const u8 any[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+ static const u8 off[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
unsigned long flags;
if (awrq->sa_family != ARPHRD_ETHER)
return -EINVAL;
- if (memcmp(bcast, awrq->sa_data, 6) == 0) {
+ if (!memcmp(any, awrq->sa_data, 6) ||
+ !memcmp(off, awrq->sa_data, 6)) {
del_timer_sync(&priv->management_timer);
spin_lock_irqsave(&priv->irqlock, flags);
atmel_scan(priv, 1);
@@ -2378,6 +2566,15 @@ static const iw_handler atmel_handler[]
(iw_handler) atmel_get_encode, /* SIOCGIWENCODE */
(iw_handler) atmel_set_power, /* SIOCSIWPOWER */
(iw_handler) atmel_get_power, /* SIOCGIWPOWER */
+ (iw_handler) NULL, /* -- hole -- */
+ (iw_handler) NULL, /* -- hole -- */
+ (iw_handler) NULL, /* SIOCSIWGENIE */
+ (iw_handler) NULL, /* SIOCGIWGENIE */
+ (iw_handler) atmel_set_auth, /* SIOCSIWAUTH */
+ (iw_handler) atmel_get_auth, /* SIOCGIWAUTH */
+ (iw_handler) atmel_set_encodeext, /* SIOCSIWENCODEEXT */
+ (iw_handler) atmel_get_encodeext, /* SIOCGIWENCODEEXT */
+ (iw_handler) NULL, /* SIOCSIWPMKSA */
};
static const iw_handler atmel_private_handler[] =
@@ -2924,6 +3121,8 @@ static void associate(struct atmel_priva
u16 ass_id = le16_to_cpu(ass_resp->ass_id);
u16 rates_len = ass_resp->length > 4 ? 4 : ass_resp->length;
+ union iwreq_data wrqu;
+
if (frame_len < 8 + rates_len)
return;
@@ -2954,6 +3153,14 @@ static void associate(struct atmel_priva
priv->station_is_associated = 1;
priv->station_was_associated = 1;
atmel_enter_state(priv, STATION_STATE_READY);
+
+ /* Send association event to userspace */
+ wrqu.data.length = 0;
+ wrqu.data.flags = 0;
+ memcpy(wrqu.ap_addr.sa_data, priv->CurrentBSSID, ETH_ALEN);
+ wrqu.ap_addr.sa_family = ARPHRD_ETHER;
+ wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
+
return;
}
@@ -3632,6 +3839,7 @@ static int reset_atmel_card(struct net_d
struct atmel_private *priv = netdev_priv(dev);
u8 configuration;
+ int old_state = priv->station_state;
/* data to add to the firmware names, in priority order
this implemenents firmware versioning */
@@ -3792,6 +4000,17 @@ static int reset_atmel_card(struct net_d
else
build_wep_mib(priv);
+ if (old_state == STATION_STATE_READY)
+ {
+ union iwreq_data wrqu;
+
+ wrqu.data.length = 0;
+ wrqu.data.flags = 0;
+ wrqu.ap_addr.sa_family = ARPHRD_ETHER;
+ memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
+ wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
+ }
+
return 1;
}
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 934aa9b..a9f1cfd 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -50,14 +50,12 @@ struct gianfar_platform_data {
/* board specific information */
u32 board_flags;
- const char *bus_id;
+ u32 bus_id;
+ u32 phy_id;
u8 mac_addr[6];
};
struct gianfar_mdio_data {
- /* device specific information */
- u32 paddr;
-
/* board specific information */
int irq[32];
};
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 92a9696..331521a 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -53,6 +53,9 @@
#define PHY_MAX_ADDR 32
+/* Used when trying to connect to a specific phy (mii bus id:phy device id) */
+#define PHY_ID_FMT "%x:%02x"
+
/* The Bus class for PHYs. Devices which provide access to
* PHYs should register using this structure */
struct mii_bus {
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index cde2f4f..df05f46 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -363,8 +363,9 @@ enum ieee80211_reasoncode {
#define IEEE80211_OFDM_SHIFT_MASK_A 4
/* NOTE: This data is for statistical purposes; not all hardware provides this
- * information for frames received. Not setting these will not cause
- * any adverse affects. */
+ * information for frames received.
+ * For ieee80211_rx_mgt, you need to set at least the 'len' parameter.
+ */
struct ieee80211_rx_stats {
u32 mac_time;
s8 rssi;
@@ -1088,6 +1089,7 @@ extern int ieee80211_tx_frame(struct iee
/* ieee80211_rx.c */
extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats);
+/* make sure to set stats->len */
extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
struct ieee80211_hdr_4addr *header,
struct ieee80211_rx_stats *stats);
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [git patches] 2.6.x net driver updates
@ 2006-01-03 16:41 Jeff Garzik
0 siblings, 0 replies; 33+ messages in thread
From: Jeff Garzik @ 2006-01-03 16:41 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
Just sent this to Andrew and Linus:
Please pull from 'upstream' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to receive the following updates:
drivers/net/sk98lin/skproc.c | 265 --
drivers/net/wan/lmc/lmc_prot.h | 15
Documentation/networking/gianfar.txt | 72
drivers/net/8139too.c | 86
drivers/net/Kconfig | 17
drivers/net/Makefile | 7
drivers/net/bonding/Makefile | 2
drivers/net/bonding/bond_3ad.c | 106
drivers/net/bonding/bond_3ad.h | 13
drivers/net/bonding/bond_alb.c | 75
drivers/net/bonding/bond_alb.h | 9
drivers/net/bonding/bond_main.c | 781 +------
drivers/net/bonding/bond_sysfs.c | 1358 ++++++++++++
drivers/net/bonding/bonding.h | 52
drivers/net/chelsio/sge.c | 19
drivers/net/chelsio/sge.h | 2
drivers/net/e1000/e1000.h | 4
drivers/net/e1000/e1000_ethtool.c | 111 -
drivers/net/e1000/e1000_hw.c | 67
drivers/net/e1000/e1000_hw.h | 4
drivers/net/e1000/e1000_main.c | 64
drivers/net/gianfar.c | 233 +-
drivers/net/gianfar.h | 69
drivers/net/gianfar_ethtool.c | 2
drivers/net/gianfar_mii.h | 1
drivers/net/gianfar_sysfs.c | 311 ++
drivers/net/ixp2000/Kconfig | 6
drivers/net/ixp2000/Makefile | 3
drivers/net/ixp2000/caleb.c | 137 +
drivers/net/ixp2000/caleb.h | 22
drivers/net/ixp2000/enp2611.c | 245 ++
drivers/net/ixp2000/ixp2400-msf.c | 213 +
drivers/net/ixp2000/ixp2400-msf.h | 115 +
drivers/net/ixp2000/ixp2400_rx.uc | 408 +++
drivers/net/ixp2000/ixp2400_rx.ucode | 130 +
drivers/net/ixp2000/ixp2400_tx.uc | 272 ++
drivers/net/ixp2000/ixp2400_tx.ucode | 98
drivers/net/ixp2000/ixpdev.c | 421 +++
drivers/net/ixp2000/ixpdev.h | 27
drivers/net/ixp2000/ixpdev_priv.h | 57
drivers/net/ixp2000/pm3386.c | 334 +++
drivers/net/ixp2000/pm3386.h | 28
drivers/net/s2io.c | 200 +
drivers/net/s2io.h | 3
drivers/net/sis900.c | 73
drivers/net/sis900.h | 45
drivers/net/sk98lin/Makefile | 3
drivers/net/sk98lin/h/skdrv2nd.h | 9
drivers/net/sk98lin/h/skvpd.h | 8
drivers/net/sk98lin/skethtool.c | 48
drivers/net/sk98lin/skge.c | 212 -
drivers/net/skge.c | 80
drivers/net/skge.h | 73
drivers/net/sky2.c | 3262 ++++++++++++++++++++++++++++++
drivers/net/sky2.h | 1922 +++++++++++++++++
drivers/net/wireless/Kconfig | 6
drivers/net/wireless/airo.c | 15
drivers/net/wireless/atmel.c | 1490 +++++++------
drivers/net/wireless/hostap/Makefile | 1
drivers/net/wireless/hostap/hostap_main.c | 0
drivers/net/wireless/ipw2100.c | 40
drivers/net/wireless/ipw2100.h | 2
drivers/net/wireless/ipw2200.c | 21
drivers/net/wireless/ipw2200.h | 6
include/linux/netdevice.h | 11
net/core/dev.c | 3
net/core/utils.c | 2
67 files changed, 11405 insertions(+), 2391 deletions(-)
Adrian Bunk:
drivers/net/sk98lin/skge.c: make SkPciWriteCfgDWord() a static inline
hostap: rename hostap.c to hostap_main.c
Ananda Raju:
s2io: UFO support
Andrew Morton:
sky2 needs dma_mapping.h
git-netdev-all: s2io warning fix
Andy Fleming:
Gianfar update and sysfs support
Brice Goglin:
Duplicate IPW_DEBUG option for ipw2100 and 2200
Carlo Perassi:
atmel: CodingStyle cleanup
Christophe Lucas:
atmel: audit return code of create_proc_read_entry
Dan Streetman:
airo.c: add support for IW_ENCODE_TEMP (i.e. xsupplicant)
Daniele Venzano:
Add Wake on LAN support to sis900 (2)
Jeff Garzik:
[netdrvr 8139too] replace hand-crafted kernel thread with workqueue
[netdrvr 8139too] use cancel_rearming_delayed_work() to cancel thread
[netdrvr 8139too] use rtnl_shlock_nowait() rather than rtnl_lock_interruptible()
[netdrvr 8139too] fast poll for thread, if an unlikely race occurs
[bonding] Remove superfluous changelog.
Jeff Kirsher:
e1000: Fixes for 8357x
Jens Osterkamp:
spidernet: fix Kconfig after BPA->CELL rename
John W. Linville:
skge: fix warning from inlining SkPciWriteCfgDWord()
e1000: avoid leak when e1000_setup_loopback_test fails
e1000: zero-out pointers in e1000_free_desc_rings
Lennert Buytenhek:
intel ixp2000 network driver
ixp2000: register netdevices last
pm3386: zero stats properly
pm3386: remove unnecessary udelays
caleb/pm3386: include proper header files
ixp2000: use netif_rx_schedule_test
enp2611: don't check netif_running() in link status timer
enp2611: use 'dev' in link status timer
enp2611: report link up/down events
ixp2000: report MAC addresses for each port on init
pm3386: add hook for setting MAC address
pm3386: add hook for setting carrier
pm3386: implement reset
enp2611: disable/enable SERDES carrier on interface down/up
ixp2000: add netpoll support
ixp2000: add driver version, bump version to 0.2
Mitch Williams:
net: allow newline terminated IP addresses in in_aton
net: make dev_valid_name public
bonding: add bond name to all error messages
bonding: expand module param descriptions
bonding: Add transmit policy to /proc
bonding: get slave name from actual slave instead of param list
bonding: move kmalloc out of spinlock in ALB init
bonding: explicitly clear RLB flag during ALB init
bonding: expose some structs
bonding: make functions not static
bonding: move bond creation into separate function
bonding: make bond_init not __init
bonding: Allow ARP target table to have empty entries
bonding: add ARP entries to /proc
bonding: add sysfs functionality to bonding (large)
bonding: version update
bonding: spelling and whitespace corrections
bonding: comments and changelog
shemminger@osdl.org:
sky2: changing mtu doesn't have to reset link
sky2: cleanup interrupt processing
sky2: add hardware VLAN acceleration support
sky2: explicit set power state
sky2: version 0.6
sky2: remove unused definitions
sky2: use kzalloc
sky2: spelling fixes
sky2: fix NAPI and receive handling
sky2: version 0.7
sky2: eliminate special case for EC-A1
sky2: add MII support
sky2: fix receive flush/pause issues
sky2: improve receive performance
sky2: add Yukon-EC ultra support
sky2: handle DMA boundary crossing
sky2: change netif_rx_schedule_test to __netif_schedule_prep
sky2: race with MTU change
sky2: dual port tx completion
sky2: byteorder annotation
sky2: remove pci-express hacks
sky2: use pci_register_driver
sky2: update version number
sk98lin: allow ethtool checksum on/off per port
sk98lin: remove redundant fields in device info
sk98lin: remove /proc interface
Stephen Hemminger:
sky2: new experimental Marvell Yukon2 driver
sky2: driver update.
sky2: fix FIFO DMA alignment problems
sky2: allow ethtool debug access to all of PCI space
sky2: version 0.5
sky2: nway reset (BONUS FEATURE)
sky2: add permanent address support.
ixp2000: change netif_schedule_test to __netif_schedule_prep
sky2: interrupt not cleared.
sky2: don't die if we see chip rev 0xb5
sky2: device structure alignment
sky2: copy threshold as module parameter
sky2: ethtool get/set interrupt coalescing
sky2: phy processing in workqueue rather than tasklet
sky2: no irq disable needed during tx
sky2: ring distance optimization
sky2: map length optimization
sky2: tx/rx ring data structure split
sky2: transmit logic fixes
sky2: transmit complete index optimization
sky2: transmit complete routine optimization
sky2: interrupt/poll optimization
sky2: interrupt coalescing tuning
sky2: handle tx timeout
sky2: quiet ring full message in case of race
sky2: prefetch tuning
sky2: turn on tx flow control
sky2: disable rx checksum on Yukon XL
sky2: version 0.10
chelsio: transmit routine return values
skge: avoid up/down on speed changes
skge: avoid up/down on pause param changes
skge: handle out of memory on MTU size changes
skge: get rid of Yukon2 defines
skge: handle out of memory on ring parameter change
skge: version number (1.3)
skge: error handling on resume
sky2: handle out of memory on admin changes
sky2: don't lose multicast addresses
sky2: handle hardware packet overrun
sky2: version 0.11
Takis:
ipw2200: kzalloc conversion and Kconfig dependency fix
Tobias Klauser:
Remove drivers/net/wan/lmc/lmc_prot.h
^ permalink raw reply [flat|nested] 33+ messages in thread
* [git patches] 2.6.x net driver updates
@ 2005-11-09 6:53 Jeff Garzik
0 siblings, 0 replies; 33+ messages in thread
From: Jeff Garzik @ 2005-11-09 6:53 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: netdev, linux-kernel
Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to receive the following updates, including a big ipw wireless update:
include/linux/eeprom.h | 136
Documentation/networking/README.ipw2100 | 119
Documentation/networking/README.ipw2200 | 194
MAINTAINERS | 18
arch/um/drivers/net_kern.c | 36
arch/xtensa/platform-iss/network.c | 33
drivers/net/Kconfig | 2
drivers/net/b44.c | 177
drivers/net/b44.h | 75
drivers/net/bonding/bond_main.c | 32
drivers/net/bonding/bonding.h | 7
drivers/net/cris/eth_v10.c | 149
drivers/net/dgrs.c | 16
drivers/net/e100.c | 6
drivers/net/ns83820.c | 13
drivers/net/s2io.c | 43
drivers/net/skge.c | 267 -
drivers/net/skge.h | 2
drivers/net/wireless/airo.c | 36
drivers/net/wireless/airo_cs.c | 6
drivers/net/wireless/atmel.c | 2
drivers/net/wireless/atmel_cs.c | 6
drivers/net/wireless/ipw2100.c | 2862 ++++++------
drivers/net/wireless/ipw2100.h | 171
drivers/net/wireless/ipw2200.c | 6861 +++++++++++++++++++++++-------
drivers/net/wireless/ipw2200.h | 592 +-
drivers/net/wireless/prism54/isl_38xx.c | 12
drivers/net/wireless/prism54/islpci_eth.c | 10
drivers/net/wireless/wavelan_cs.c | 3
drivers/net/wireless/wl3501_cs.c | 3
include/net/ieee80211.h | 2
include/net/ieee80211_crypt.h | 1
net/ieee80211/ieee80211_crypt.c | 156
net/ieee80211/ieee80211_rx.c | 2
net/ieee80211/ieee80211_wx.c | 14
35 files changed, 8273 insertions(+), 3791 deletions(-)
Adrian Bunk:
fix NET_RADIO=n, IEEE80211=y compile
kill include/linux/eeprom.h
drivers/net/s2io.c: make functions static
Alexey Dobriyan:
atmel: memset correct range
Ashutosh Naik:
dgrs: fix warnings when CONFIG_ISA and CONFIG_PCI are not enabled
Ben Cahill:
Fixes missed beacon logic in relation to on-network AP roaming.
Benoit Boissinot:
Fix 'Driver using old /proc/net/wireless support, please fix driver !' message.
Christoph Hellwig:
ieee80211: cleanup crypto list handling, other minor cleanups.
cris v10 eth: use ethtool_ops
xtensa platform-iss network: remove no-op ioctl handler
uml_net: use ethtool_ops
Francois Romieu:
b44: b44_start_xmit returns with a lock held when it fails allocating
b44: miscellaneous cleanup
b44: expose counters through ethtool
b44: s/spin_lock_irqsave/spin_lock/ in b44_interrupt
b44: late request_irq in b44_open
b44: replace B44_FLAG_INIT_COMPLETE with netif_running()
b44: race on device closing
b44: increase version number
Hong Liu:
Fixes the ad-hoc network WEP key list issue.
[Bug 455] Fix frequent channel change generates firmware fatal error.
Don't set hardware WEP if we are actually using TKIP/AES.
Mixed PTK/GTK CCMP/TKIP support.
Card with WEP enabled and using shared-key auth will have firmware
Fixes problem with WEP not working (association succeeds, but no Tx/Rx)
Fixes WEP firmware error condition.
Fixed problem with not being able to send broadcast packets.
James Ketrenos:
scripts/Lindent on ieee80211 subsystem.
Update version ieee80211 stamp to 1.1.7
Ran scripts/Lindent on drivers/net/wireless/ipw2{1,2}00.{c,h}
Catch ipw2200 up to equivelancy with v1.0.1
Catch ipw2200 up to equivelancy with v1.0.2
Catch ipw2200 up to equivelancy with v1.0.3
Catch ipw2200 up to equivelancy with v1.0.4
Catch ipw2100 up to equivelancy with v1.1.1
Catch ipw2200 up to equivelancy with v1.0.5
Changed default # of missed beacons to miss before disassociation to 24
Updated to support ieee80211 callback to is_queue_full for 802.11e
Fixed some compiler issues if CONFIG_IPW2200_QOS is enabled.
Added more useful geography encoding so people's experience with
Modified ipw_config and STATUS_INIT setting to correct race condition
Switched firmware error dumping so that it will capture a log available
Changed all of the ipw_send_cmd() calls to return any ipw_send_cmd error
Added cmdlog in non-debug systems.
Updated ipw2200 to use the new ieee80211 callbacks
Added wait_state wakeup on scan completion.
Fixed problem with get_cmd_string not existing if CONFIG_IPW_DEBUG disabled.
Removed PF_SYNCTHREAD legacy.
Updated driver version stamps for ipw2100 (1.1.3) and ipw2200 (1.0.7)
Pulled out a stray KERNEL_VERSION check around the suspend handler.
Removed legacy WIRELESS_EXT checks from ipw2200.c
Removed warning about TKIP not being configured if countermeasures are
Added channel support for ipw2200 cards identified as 'ZZR'
Fixed parameter reordering in firmware log routine.
Updated firmware version stamp to 2.4 from 2.3 so it will use the latest firmware.
Update version ipw2200 stamp to 1.0.8
Updated READMEs and MAINTAINERS for the ipw2100 and ipw2200 drivers.
Jay Vosburgh:
bonding: fix feature consolidation
Jeff Garzik:
Merge branch 'master'
Merge git://git.tuxdriver.com/git/netdev-jwl
Merge rsync://bughost.org/repos/ieee80211-delta/
Merge rsync://bughost.org/repos/ipw-delta/
[wireless ipw2100] kill unused-var warnings for debug-disabled code
jketreno@io.(none):
Fixed WEP on ipw2100 (priv->sec was being used instead of
Liu Hong:
[Bug 339] Fix ipw2100 iwconfig set/get txpower.
[Bug 637] Set tx power for A band.
Migrated some of the channel verification code back into the driver to
Luiz Fernando Capitulino:
Fix sparse warning in e100 driver.
Mike Kershaw:
Adds radiotap support to ipw2200 in monitor mode..
Panagiotis Issaris:
wireless net: Conversions of kmalloc/memset to kzalloc
Peter Jones:
Make all the places the firmware fails to load showerrors (in decimal,
Fixed is_network_packet() to include checking for broadcast packets.
Ralf Baechle:
IOC: And don't mark the things as broken Cowboy.
Roger While:
prism54 : Unused variable / extraneous udelay
prism54 : Transmit stats updated in wrong place
Stephen Hemminger:
skge: clear PCI PHY COMA mode on boot
skge: use kzalloc
skge: add mii ioctl support
skge: goto low power mode on shutdown
skge: use prefetch on receive
skge: spelling fixes
skge: increase version number
Volker Braun:
Fix problem with WEP unicast key > index 0
Zhu Yi:
IPW_DEBUG has already included DRV_NAME, remove double prefix print.
Move code from ipw2100_wpa_enable to IPW2100_PARAM_DROP_UNENCRYPTED to
Fix hardware encryption (both WEP and AES) doesn't work with fragmentation.
Fix is_duplicate_packet() bug for fragmentation number setting.
[bug 667] Fix the notorious "No space for Tx" bug.
Workaround kernel BUG_ON panic caused by unexpected duplicate packets.
Disable host fragmentation in open mode since IPW2200/2915 hardware
[Bug 792] Fix WPA-PSK AES both for -Dipw and -Dwext.
[Bug 701] Fix a misuse of ieee->mode with ieee->iw_mode.
Fix ipw_wx_get_txpow shows wrong disabled value.
Fix firmware error when setting tx_power.
[Bug 760] Fix setting WEP key in monitor mode causes IV lost.
[Fix bug# 771] Too many (8) bytes recieved when using AES/hwcrypto
[patch snipped due to size]
^ permalink raw reply [flat|nested] 33+ messages in thread
* [git patches] 2.6.x net driver updates
@ 2005-11-05 19:58 Jeff Garzik
0 siblings, 0 replies; 33+ messages in thread
From: Jeff Garzik @ 2005-11-05 19:58 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: netdev, linux-kernel
Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to receive the following updates:
Documentation/networking/s2io.txt | 195 ++++++--
MAINTAINERS | 9
drivers/net/Kconfig | 13
drivers/net/fec_8xx/Kconfig | 8
drivers/net/fec_8xx/fec_mii.c | 42 +
drivers/net/fs_enet/fs_enet-main.c | 21
drivers/net/ibm_emac/ibm_emac.h | 22 -
drivers/net/ibm_emac/ibm_emac_core.c | 20
drivers/net/ibm_emac/ibm_emac_mal.h | 5
drivers/net/ibm_emac/ibm_emac_phy.c | 12
drivers/net/pcnet32.c | 87 ++-
drivers/net/phy/mdio_bus.c | 3
drivers/net/s2io.c | 762 ++++++++++++++++++-----------------
drivers/net/s2io.h | 91 ++--
drivers/net/wireless/airo.c | 2
include/linux/phy.h | 3
16 files changed, 791 insertions(+), 504 deletions(-)
Ananda Raju:
S2io: Multi buffer mode support
Don Fry:
pcnet32: show name of failing device
pcnet32: AT2700/2701 and Bugzilla 2699 & 4551
pcnet32: Prevent hang with 79c976
Eugene Surovegin:
PPC 44x EMAC driver: add 440SPe support
PPC 44x EMAC driver: add 440GR support
PPC 4xx EMAC driver: fix VSC8201 PHY initialization
Gabriel A. Devenyi:
drivers/net/wireless/airo.c unsigned comparason
Matt Porter:
phy address mask support for generic phy layer
Pantelis Antoniou:
Maintainers for fs_enet
fs_enet: Fix dma_unmap_single calls
fec_8xx: Remove dependency on NETTA & NETPHONE
fec_8xx: Add support for Intel PHY LX971
Ravinandan Arakali:
S2io: Updated documentation
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt
index 6726b52..bd528ff 100644
--- a/Documentation/networking/s2io.txt
+++ b/Documentation/networking/s2io.txt
@@ -1,48 +1,153 @@
-S2IO Technologies XFrame 10 Gig adapter.
--------------------------------------------
+Release notes for Neterion's (Formerly S2io) Xframe I/II PCI-X 10GbE driver.
-I. Module loadable parameters.
-When loaded as a module, the driver provides a host of Module loadable
-parameters, so the device can be tuned as per the users needs.
-A list of the Module params is given below.
-(i) ring_num: This can be used to program the number of
- receive rings used in the driver.
-(ii) ring_len: This defines the number of descriptors each ring
- can have. There can be a maximum of 8 rings.
-(iii) frame_len: This is an array of size 8. Using this we can
- set the maximum size of the received frame that can
- be steered into the corrsponding receive ring.
-(iv) fifo_num: This defines the number of Tx FIFOs thats used in
- the driver.
-(v) fifo_len: Each element defines the number of
- Tx descriptors that can be associated with each
- corresponding FIFO. There are a maximum of 8 FIFOs.
-(vi) tx_prio: This is a bool, if module is loaded with a non-zero
- value for tx_prio multi FIFO scheme is activated.
-(vii) rx_prio: This is a bool, if module is loaded with a non-zero
- value for tx_prio multi RING scheme is activated.
-(viii) latency_timer: The value given against this param will be
- loaded into the latency timer register in PCI Config
- space, else the register is left with its reset value.
-
-II. Performance tuning.
- By changing a few sysctl parameters.
- Copy the following lines into a file and run the following command,
- "sysctl -p <file_name>"
-### IPV4 specific settings
-net.ipv4.tcp_timestamps = 0 # turns TCP timestamp support off, default 1, reduces CPU use
-net.ipv4.tcp_sack = 0 # turn SACK support off, default on
-# on systems with a VERY fast bus -> memory interface this is the big gainer
-net.ipv4.tcp_rmem = 10000000 10000000 10000000 # sets min/default/max TCP read buffer, default 4096 87380 174760
-net.ipv4.tcp_wmem = 10000000 10000000 10000000 # sets min/pressure/max TCP write buffer, default 4096 16384 131072
-net.ipv4.tcp_mem = 10000000 10000000 10000000 # sets min/pressure/max TCP buffer space, default 31744 32256 32768
-
-### CORE settings (mostly for socket and UDP effect)
-net.core.rmem_max = 524287 # maximum receive socket buffer size, default 131071
-net.core.wmem_max = 524287 # maximum send socket buffer size, default 131071
-net.core.rmem_default = 524287 # default receive socket buffer size, default 65535
-net.core.wmem_default = 524287 # default send socket buffer size, default 65535
-net.core.optmem_max = 524287 # maximum amount of option memory buffers, default 10240
-net.core.netdev_max_backlog = 300000 # number of unprocessed input packets before kernel starts dropping them, default 300
----End of performance tuning file---
+Contents
+=======
+- 1. Introduction
+- 2. Identifying the adapter/interface
+- 3. Features supported
+- 4. Command line parameters
+- 5. Performance suggestions
+- 6. Available Downloads
+
+
+1. Introduction:
+This Linux driver supports Neterion's Xframe I PCI-X 1.0 and
+Xframe II PCI-X 2.0 adapters. It supports several features
+such as jumbo frames, MSI/MSI-X, checksum offloads, TSO, UFO and so on.
+See below for complete list of features.
+All features are supported for both IPv4 and IPv6.
+
+2. Identifying the adapter/interface:
+a. Insert the adapter(s) in your system.
+b. Build and load driver
+# insmod s2io.ko
+c. View log messages
+# dmesg | tail -40
+You will see messages similar to:
+eth3: Neterion Xframe I 10GbE adapter (rev 3), Version 2.0.9.1, Intr type INTA
+eth4: Neterion Xframe II 10GbE adapter (rev 2), Version 2.0.9.1, Intr type INTA
+eth4: Device is on 64 bit 133MHz PCIX(M1) bus
+
+The above messages identify the adapter type(Xframe I/II), adapter revision,
+driver version, interface name(eth3, eth4), Interrupt type(INTA, MSI, MSI-X).
+In case of Xframe II, the PCI/PCI-X bus width and frequency are displayed
+as well.
+
+To associate an interface with a physical adapter use "ethtool -p <ethX>".
+The corresponding adapter's LED will blink multiple times.
+
+3. Features supported:
+a. Jumbo frames. Xframe I/II supports MTU upto 9600 bytes,
+modifiable using ifconfig command.
+
+b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit
+and receive, TSO.
+
+c. Multi-buffer receive mode. Scattering of packet across multiple
+buffers. Currently driver supports 2-buffer mode which yields
+significant performance improvement on certain platforms(SGI Altix,
+IBM xSeries).
+
+d. MSI/MSI-X. Can be enabled on platforms which support this feature
+(IA64, Xeon) resulting in noticeable performance improvement(upto 7%
+on certain platforms).
+
+e. NAPI. Compile-time option(CONFIG_S2IO_NAPI) for better Rx interrupt
+moderation.
+
+f. Statistics. Comprehensive MAC-level and software statistics displayed
+using "ethtool -S" option.
+
+g. Multi-FIFO/Ring. Supports up to 8 transmit queues and receive rings,
+with multiple steering options.
+
+4. Command line parameters
+a. tx_fifo_num
+Number of transmit queues
+Valid range: 1-8
+Default: 1
+
+b. rx_ring_num
+Number of receive rings
+Valid range: 1-8
+Default: 1
+
+c. tx_fifo_len
+Size of each transmit queue
+Valid range: Total length of all queues should not exceed 8192
+Default: 4096
+
+d. rx_ring_sz
+Size of each receive ring(in 4K blocks)
+Valid range: Limited by memory on system
+Default: 30
+
+e. intr_type
+Specifies interrupt type. Possible values 1(INTA), 2(MSI), 3(MSI-X)
+Valid range: 1-3
+Default: 1
+
+5. Performance suggestions
+General:
+a. Set MTU to maximum(9000 for switch setup, 9600 in back-to-back configuration)
+b. Set TCP windows size to optimal value.
+For instance, for MTU=1500 a value of 210K has been observed to result in
+good performance.
+# sysctl -w net.ipv4.tcp_rmem="210000 210000 210000"
+# sysctl -w net.ipv4.tcp_wmem="210000 210000 210000"
+For MTU=9000, TCP window size of 10 MB is recommended.
+# sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"
+# sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"
+
+Transmit performance:
+a. By default, the driver respects BIOS settings for PCI bus parameters.
+However, you may want to experiment with PCI bus parameters
+max-split-transactions(MOST) and MMRBC (use setpci command).
+A MOST value of 2 has been found optimal for Opterons and 3 for Itanium.
+It could be different for your hardware.
+Set MMRBC to 4K**.
+
+For example you can set
+For opteron
+#setpci -d 17d5:* 62=1d
+For Itanium
+#setpci -d 17d5:* 62=3d
+
+For detailed description of the PCI registers, please see Xframe User Guide.
+
+b. Ensure Transmit Checksum offload is enabled. Use ethtool to set/verify this
+parameter.
+c. Turn on TSO(using "ethtool -K")
+# ethtool -K <ethX> tso on
+
+Receive performance:
+a. By default, the driver respects BIOS settings for PCI bus parameters.
+However, you may want to set PCI latency timer to 248.
+#setpci -d 17d5:* LATENCY_TIMER=f8
+For detailed description of the PCI registers, please see Xframe User Guide.
+b. Use 2-buffer mode. This results in large performance boost on
+on certain platforms(eg. SGI Altix, IBM xSeries).
+c. Ensure Receive Checksum offload is enabled. Use "ethtool -K ethX" command to
+set/verify this option.
+d. Enable NAPI feature(in kernel configuration Device Drivers ---> Network
+device support ---> Ethernet (10000 Mbit) ---> S2IO 10Gbe Xframe NIC) to
+bring down CPU utilization.
+
+** For AMD opteron platforms with 8131 chipset, MMRBC=1 and MOST=1 are
+recommended as safe parameters.
+For more information, please review the AMD8131 errata at
+http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/26310.pdf
+
+6. Available Downloads
+Neterion "s2io" driver in Red Hat and Suse 2.6-based distributions is kept up
+to date, also the latest "s2io" code (including support for 2.4 kernels) is
+available via "Support" link on the Neterion site: http://www.neterion.com.
+
+For Xframe User Guide (Programming manual), visit ftp site ns1.s2io.com,
+user: linuxdocs password: HALdocs
+
+7. Support
+For further support please contact either your 10GbE Xframe NIC vendor (IBM,
+HP, SGI etc.) or click on the "Support" link on the Neterion site:
+http://www.neterion.com.
diff --git a/MAINTAINERS b/MAINTAINERS
index 983f9e9..f08a143 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -910,6 +910,15 @@ L: linux-fbdev-devel@lists.sourceforge.n
W: http://linux-fbdev.sourceforge.net/
S: Maintained
+FREESCALE SOC FS_ENET DRIVER
+P: Pantelis Antoniou
+M: pantelis.antoniou@gmail.com
+P: Vitaly Bordug
+M: vbordug@ru.mvista.com
+L: linuxppc-embedded@ozlabs.org
+L: netdev@vger.kernel.org
+S: Maintained
+
FILE LOCKING (flock() and fcntl()/lockf())
P: Matthew Wilcox
M: matthew@wil.cx
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 57edae4..1958d9e 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1203,7 +1203,7 @@ config IBM_EMAC_RX_SKB_HEADROOM
config IBM_EMAC_PHY_RX_CLK_FIX
bool "PHY Rx clock workaround"
- depends on IBM_EMAC && (405EP || 440GX || 440EP)
+ depends on IBM_EMAC && (405EP || 440GX || 440EP || 440GR)
help
Enable this if EMAC attached to a PHY which doesn't generate
RX clock if there is no link, if this is the case, you will
@@ -2258,17 +2258,6 @@ config S2IO_NAPI
If in doubt, say N.
-config 2BUFF_MODE
- bool "Use 2 Buffer Mode on Rx side."
- depends on S2IO
- ---help---
- On enabling the 2 buffer mode, the received frame will be
- split into 2 parts before being DMA'ed to the hosts memory.
- The parts are the ethernet header and ethernet payload.
- This is useful on systems where DMA'ing to to unaligned
- physical memory loactions comes with a heavy price.
- If not sure please say N.
-
endmenu
if !UML
diff --git a/drivers/net/fec_8xx/Kconfig b/drivers/net/fec_8xx/Kconfig
index db36ac3..4560026 100644
--- a/drivers/net/fec_8xx/Kconfig
+++ b/drivers/net/fec_8xx/Kconfig
@@ -1,6 +1,6 @@
config FEC_8XX
tristate "Motorola 8xx FEC driver"
- depends on NET_ETHERNET && 8xx && (NETTA || NETPHONE)
+ depends on NET_ETHERNET
select MII
config FEC_8XX_GENERIC_PHY
@@ -12,3 +12,9 @@ config FEC_8XX_DM9161_PHY
bool "Support DM9161 PHY"
depends on FEC_8XX
default n
+
+config FEC_8XX_LXT971_PHY
+ bool "Support LXT971/LXT972 PHY"
+ depends on FEC_8XX
+ default n
+
diff --git a/drivers/net/fec_8xx/fec_mii.c b/drivers/net/fec_8xx/fec_mii.c
index 803eb09..3b44ac1 100644
--- a/drivers/net/fec_8xx/fec_mii.c
+++ b/drivers/net/fec_8xx/fec_mii.c
@@ -203,6 +203,39 @@ static void dm9161_shutdown(struct net_d
#endif
+#ifdef CONFIG_FEC_8XX_LXT971_PHY
+
+/* Support for LXT971/972 PHY */
+
+#define MII_LXT971_PCR 16 /* Port Control Register */
+#define MII_LXT971_SR2 17 /* Status Register 2 */
+#define MII_LXT971_IER 18 /* Interrupt Enable Register */
+#define MII_LXT971_ISR 19 /* Interrupt Status Register */
+#define MII_LXT971_LCR 20 /* LED Control Register */
+#define MII_LXT971_TCR 30 /* Transmit Control Register */
+
+static void lxt971_startup(struct net_device *dev)
+{
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+ fec_mii_write(dev, fep->mii_if.phy_id, MII_LXT971_IER, 0x00F2);
+}
+
+static void lxt971_ack_int(struct net_device *dev)
+{
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+ fec_mii_read(dev, fep->mii_if.phy_id, MII_LXT971_ISR);
+}
+
+static void lxt971_shutdown(struct net_device *dev)
+{
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+ fec_mii_write(dev, fep->mii_if.phy_id, MII_LXT971_IER, 0x0000);
+}
+#endif
+
/**********************************************************************************/
static const struct phy_info phy_info[] = {
@@ -215,6 +248,15 @@ static const struct phy_info phy_info[]
.shutdown = dm9161_shutdown,
},
#endif
+#ifdef CONFIG_FEC_8XX_LXT971_PHY
+ {
+ .id = 0x0001378e,
+ .name = "LXT971/972",
+ .startup = lxt971_startup,
+ .ack_int = lxt971_ack_int,
+ .shutdown = lxt971_shutdown,
+ },
+#endif
#ifdef CONFIG_FEC_8XX_GENERIC_PHY
{
.id = 0,
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index 44fac73..9342d5b 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -130,7 +130,7 @@ static int fs_enet_rx_napi(struct net_de
skb = fep->rx_skbuff[curidx];
- dma_unmap_single(fep->dev, skb->data,
+ dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp),
L1_CACHE_ALIGN(PKT_MAXBUF_SIZE),
DMA_FROM_DEVICE);
@@ -144,7 +144,7 @@ static int fs_enet_rx_napi(struct net_de
skb = fep->rx_skbuff[curidx];
- dma_unmap_single(fep->dev, skb->data,
+ dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp),
L1_CACHE_ALIGN(PKT_MAXBUF_SIZE),
DMA_FROM_DEVICE);
@@ -268,7 +268,7 @@ static int fs_enet_rx_non_napi(struct ne
skb = fep->rx_skbuff[curidx];
- dma_unmap_single(fep->dev, skb->data,
+ dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp),
L1_CACHE_ALIGN(PKT_MAXBUF_SIZE),
DMA_FROM_DEVICE);
@@ -278,7 +278,7 @@ static int fs_enet_rx_non_napi(struct ne
skb = fep->rx_skbuff[curidx];
- dma_unmap_single(fep->dev, skb->data,
+ dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp),
L1_CACHE_ALIGN(PKT_MAXBUF_SIZE),
DMA_FROM_DEVICE);
@@ -399,7 +399,8 @@ static void fs_enet_tx(struct net_device
fep->stats.collisions++;
/* unmap */
- dma_unmap_single(fep->dev, skb->data, skb->len, DMA_TO_DEVICE);
+ dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp),
+ skb->len, DMA_TO_DEVICE);
/*
* Free the sk buffer associated with this last transmit.
@@ -547,17 +548,19 @@ void fs_cleanup_bds(struct net_device *d
{
struct fs_enet_private *fep = netdev_priv(dev);
struct sk_buff *skb;
+ cbd_t *bdp;
int i;
/*
* Reset SKB transmit buffers.
*/
- for (i = 0; i < fep->tx_ring; i++) {
+ for (i = 0, bdp = fep->tx_bd_base; i < fep->tx_ring; i++, bdp++) {
if ((skb = fep->tx_skbuff[i]) == NULL)
continue;
/* unmap */
- dma_unmap_single(fep->dev, skb->data, skb->len, DMA_TO_DEVICE);
+ dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp),
+ skb->len, DMA_TO_DEVICE);
fep->tx_skbuff[i] = NULL;
dev_kfree_skb(skb);
@@ -566,12 +569,12 @@ void fs_cleanup_bds(struct net_device *d
/*
* Reset SKB receive buffers
*/
- for (i = 0; i < fep->rx_ring; i++) {
+ for (i = 0, bdp = fep->rx_bd_base; i < fep->rx_ring; i++, bdp++) {
if ((skb = fep->rx_skbuff[i]) == NULL)
continue;
/* unmap */
- dma_unmap_single(fep->dev, skb->data,
+ dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp),
L1_CACHE_ALIGN(PKT_MAXBUF_SIZE),
DMA_FROM_DEVICE);
diff --git a/drivers/net/ibm_emac/ibm_emac.h b/drivers/net/ibm_emac/ibm_emac.h
index 28c476f..644edbf 100644
--- a/drivers/net/ibm_emac/ibm_emac.h
+++ b/drivers/net/ibm_emac/ibm_emac.h
@@ -26,7 +26,8 @@
/* This is a simple check to prevent use of this driver on non-tested SoCs */
#if !defined(CONFIG_405GP) && !defined(CONFIG_405GPR) && !defined(CONFIG_405EP) && \
!defined(CONFIG_440GP) && !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && \
- !defined(CONFIG_440EP) && !defined(CONFIG_NP405H)
+ !defined(CONFIG_440EP) && !defined(CONFIG_NP405H) && !defined(CONFIG_440SPE) && \
+ !defined(CONFIG_440GR)
#error "Unknown SoC. Please, check chip user manual and make sure EMAC defines are OK"
#endif
@@ -246,6 +247,25 @@ struct emac_regs {
#define EMAC_STACR_PCDA_SHIFT 5
#define EMAC_STACR_PRA_MASK 0x1f
+/*
+ * For the 440SPe, AMCC inexplicably changed the polarity of
+ * the "operation complete" bit in the MII control register.
+ */
+#if defined(CONFIG_440SPE)
+static inline int emac_phy_done(u32 stacr)
+{
+ return !(stacr & EMAC_STACR_OC);
+};
+#define EMAC_STACR_START EMAC_STACR_OC
+
+#else /* CONFIG_440SPE */
+static inline int emac_phy_done(u32 stacr)
+{
+ return stacr & EMAC_STACR_OC;
+};
+#define EMAC_STACR_START 0
+#endif /* !CONFIG_440SPE */
+
/* EMACx_TRTR */
#if !defined(CONFIG_IBM_EMAC4)
#define EMAC_TRTR_SHIFT 27
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c
index 943fbd1..eb7d694 100644
--- a/drivers/net/ibm_emac/ibm_emac_core.c
+++ b/drivers/net/ibm_emac/ibm_emac_core.c
@@ -87,10 +87,11 @@ MODULE_LICENSE("GPL");
*/
static u32 busy_phy_map;
-#if defined(CONFIG_IBM_EMAC_PHY_RX_CLK_FIX) && (defined(CONFIG_405EP) || defined(CONFIG_440EP))
+#if defined(CONFIG_IBM_EMAC_PHY_RX_CLK_FIX) && \
+ (defined(CONFIG_405EP) || defined(CONFIG_440EP) || defined(CONFIG_440GR))
/* 405EP has "EMAC to PHY Control Register" (CPC0_EPCTL) which can help us
* with PHY RX clock problem.
- * 440EP has more sane SDR0_MFR register implementation than 440GX, which
+ * 440EP/440GR has more sane SDR0_MFR register implementation than 440GX, which
* also allows controlling each EMAC clock
*/
static inline void EMAC_RX_CLK_TX(int idx)
@@ -100,7 +101,7 @@ static inline void EMAC_RX_CLK_TX(int id
#if defined(CONFIG_405EP)
mtdcr(0xf3, mfdcr(0xf3) | (1 << idx));
-#else /* CONFIG_440EP */
+#else /* CONFIG_440EP || CONFIG_440GR */
SDR_WRITE(DCRN_SDR_MFR, SDR_READ(DCRN_SDR_MFR) | (0x08000000 >> idx));
#endif
@@ -546,7 +547,7 @@ static int __emac_mdio_read(struct ocp_e
/* Wait for management interface to become idle */
n = 10;
- while (!(in_be32(&p->stacr) & EMAC_STACR_OC)) {
+ while (!emac_phy_done(in_be32(&p->stacr))) {
udelay(1);
if (!--n)
goto to;
@@ -556,11 +557,12 @@ static int __emac_mdio_read(struct ocp_e
out_be32(&p->stacr,
EMAC_STACR_BASE(emac_opb_mhz()) | EMAC_STACR_STAC_READ |
(reg & EMAC_STACR_PRA_MASK)
- | ((id & EMAC_STACR_PCDA_MASK) << EMAC_STACR_PCDA_SHIFT));
+ | ((id & EMAC_STACR_PCDA_MASK) << EMAC_STACR_PCDA_SHIFT)
+ | EMAC_STACR_START);
/* Wait for read to complete */
n = 100;
- while (!((r = in_be32(&p->stacr)) & EMAC_STACR_OC)) {
+ while (!emac_phy_done(r = in_be32(&p->stacr))) {
udelay(1);
if (!--n)
goto to;
@@ -594,7 +596,7 @@ static void __emac_mdio_write(struct ocp
/* Wait for management interface to be idle */
n = 10;
- while (!(in_be32(&p->stacr) & EMAC_STACR_OC)) {
+ while (!emac_phy_done(in_be32(&p->stacr))) {
udelay(1);
if (!--n)
goto to;
@@ -605,11 +607,11 @@ static void __emac_mdio_write(struct ocp
EMAC_STACR_BASE(emac_opb_mhz()) | EMAC_STACR_STAC_WRITE |
(reg & EMAC_STACR_PRA_MASK) |
((id & EMAC_STACR_PCDA_MASK) << EMAC_STACR_PCDA_SHIFT) |
- (val << EMAC_STACR_PHYD_SHIFT));
+ (val << EMAC_STACR_PHYD_SHIFT) | EMAC_STACR_START);
/* Wait for write to complete */
n = 100;
- while (!(in_be32(&p->stacr) & EMAC_STACR_OC)) {
+ while (!emac_phy_done(in_be32(&p->stacr))) {
udelay(1);
if (!--n)
goto to;
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.h b/drivers/net/ibm_emac/ibm_emac_mal.h
index 15b0bda..2a2d3b2 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.h
+++ b/drivers/net/ibm_emac/ibm_emac_mal.h
@@ -32,9 +32,10 @@
* reflect the fact that 40x and 44x have slightly different MALs. --ebs
*/
#if defined(CONFIG_405GP) || defined(CONFIG_405GPR) || defined(CONFIG_405EP) || \
- defined(CONFIG_440EP) || defined(CONFIG_NP405H)
+ defined(CONFIG_440EP) || defined(CONFIG_440GR) || defined(CONFIG_NP405H)
#define MAL_VERSION 1
-#elif defined(CONFIG_440GP) || defined(CONFIG_440GX) || defined(CONFIG_440SP)
+#elif defined(CONFIG_440GP) || defined(CONFIG_440GX) || defined(CONFIG_440SP) || \
+ defined(CONFIG_440SPE)
#define MAL_VERSION 2
#else
#error "Unknown SoC, please check chip manual and choose MAL 'version'"
diff --git a/drivers/net/ibm_emac/ibm_emac_phy.c b/drivers/net/ibm_emac/ibm_emac_phy.c
index a27e49c..67935dd 100644
--- a/drivers/net/ibm_emac/ibm_emac_phy.c
+++ b/drivers/net/ibm_emac/ibm_emac_phy.c
@@ -236,12 +236,16 @@ static struct mii_phy_def genmii_phy_def
};
/* CIS8201 */
+#define MII_CIS8201_10BTCSR 0x16
+#define TENBTCSR_ECHO_DISABLE 0x2000
#define MII_CIS8201_EPCR 0x17
#define EPCR_MODE_MASK 0x3000
#define EPCR_GMII_MODE 0x0000
#define EPCR_RGMII_MODE 0x1000
#define EPCR_TBI_MODE 0x2000
#define EPCR_RTBI_MODE 0x3000
+#define MII_CIS8201_ACSR 0x1c
+#define ACSR_PIN_PRIO_SELECT 0x0004
static int cis8201_init(struct mii_phy *phy)
{
@@ -269,6 +273,14 @@ static int cis8201_init(struct mii_phy *
}
phy_write(phy, MII_CIS8201_EPCR, epcr);
+
+ /* MII regs override strap pins */
+ phy_write(phy, MII_CIS8201_ACSR,
+ phy_read(phy, MII_CIS8201_ACSR) | ACSR_PIN_PRIO_SELECT);
+
+ /* Disable TX_EN -> CRS echo mode, otherwise 10/HDX doesn't work */
+ phy_write(phy, MII_CIS8201_10BTCSR,
+ phy_read(phy, MII_CIS8201_10BTCSR) | TENBTCSR_ECHO_DISABLE);
return 0;
}
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index 70fe81a..be31922 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -22,8 +22,8 @@
*************************************************************************/
#define DRV_NAME "pcnet32"
-#define DRV_VERSION "1.31a"
-#define DRV_RELDATE "12.Sep.2005"
+#define DRV_VERSION "1.31c"
+#define DRV_RELDATE "01.Nov.2005"
#define PFX DRV_NAME ": "
static const char *version =
@@ -260,6 +260,11 @@ static int homepna[MAX_UNITS];
* v1.31 02 Sep 2005 Hubert WS Lin <wslin@tw.ibm.c0m> added set_ringparam().
* v1.31a 12 Sep 2005 Hubert WS Lin <wslin@tw.ibm.c0m> set min ring size to 4
* to allow loopback test to work unchanged.
+ * v1.31b 06 Oct 2005 Don Fry changed alloc_ring to show name of device
+ * if allocation fails
+ * v1.31c 01 Nov 2005 Don Fry Allied Telesyn 2700/2701 FX are 100Mbit only.
+ * Force 100Mbit FD if Auto (ASEL) is selected.
+ * See Bugzilla 2669 and 4551.
*/
@@ -408,7 +413,7 @@ static int pcnet32_get_regs_len(struct n
static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
void *ptr);
static void pcnet32_purge_tx_ring(struct net_device *dev);
-static int pcnet32_alloc_ring(struct net_device *dev);
+static int pcnet32_alloc_ring(struct net_device *dev, char *name);
static void pcnet32_free_ring(struct net_device *dev);
@@ -669,15 +674,17 @@ static int pcnet32_set_ringparam(struct
lp->rx_mod_mask = lp->rx_ring_size - 1;
lp->rx_len_bits = (i << 4);
- if (pcnet32_alloc_ring(dev)) {
+ if (pcnet32_alloc_ring(dev, dev->name)) {
pcnet32_free_ring(dev);
+ spin_unlock_irqrestore(&lp->lock, flags);
return -ENOMEM;
}
spin_unlock_irqrestore(&lp->lock, flags);
if (pcnet32_debug & NETIF_MSG_DRV)
- printk(KERN_INFO PFX "Ring Param Settings: RX: %d, TX: %d\n", lp->rx_ring_size, lp->tx_ring_size);
+ printk(KERN_INFO PFX "%s: Ring Param Settings: RX: %d, TX: %d\n",
+ dev->name, lp->rx_ring_size, lp->tx_ring_size);
if (netif_running(dev))
pcnet32_open(dev);
@@ -981,7 +988,11 @@ static void pcnet32_get_regs(struct net_
*buff++ = a->read_csr(ioaddr, 114);
/* read bus configuration registers */
- for (i=0; i<36; i++) {
+ for (i=0; i<30; i++) {
+ *buff++ = a->read_bcr(ioaddr, i);
+ }
+ *buff++ = 0; /* skip bcr30 so as not to hang 79C976 */
+ for (i=31; i<36; i++) {
*buff++ = a->read_bcr(ioaddr, i);
}
@@ -1340,7 +1351,8 @@ pcnet32_probe1(unsigned long ioaddr, int
}
lp->a = *a;
- if (pcnet32_alloc_ring(dev)) {
+ /* prior to register_netdev, dev->name is not yet correct */
+ if (pcnet32_alloc_ring(dev, pci_name(lp->pci_dev))) {
ret = -ENOMEM;
goto err_free_ring;
}
@@ -1448,48 +1460,63 @@ err_release_region:
}
-static int pcnet32_alloc_ring(struct net_device *dev)
+/* if any allocation fails, caller must also call pcnet32_free_ring */
+static int pcnet32_alloc_ring(struct net_device *dev, char *name)
{
struct pcnet32_private *lp = dev->priv;
- if ((lp->tx_ring = pci_alloc_consistent(lp->pci_dev, sizeof(struct pcnet32_tx_head) * lp->tx_ring_size,
- &lp->tx_ring_dma_addr)) == NULL) {
+ lp->tx_ring = pci_alloc_consistent(lp->pci_dev,
+ sizeof(struct pcnet32_tx_head) * lp->tx_ring_size,
+ &lp->tx_ring_dma_addr);
+ if (lp->tx_ring == NULL) {
if (pcnet32_debug & NETIF_MSG_DRV)
- printk(KERN_ERR PFX "Consistent memory allocation failed.\n");
+ printk("\n" KERN_ERR PFX "%s: Consistent memory allocation failed.\n",
+ name);
return -ENOMEM;
}
- if ((lp->rx_ring = pci_alloc_consistent(lp->pci_dev, sizeof(struct pcnet32_rx_head) * lp->rx_ring_size,
- &lp->rx_ring_dma_addr)) == NULL) {
+ lp->rx_ring = pci_alloc_consistent(lp->pci_dev,
+ sizeof(struct pcnet32_rx_head) * lp->rx_ring_size,
+ &lp->rx_ring_dma_addr);
+ if (lp->rx_ring == NULL) {
if (pcnet32_debug & NETIF_MSG_DRV)
- printk(KERN_ERR PFX "Consistent memory allocation failed.\n");
+ printk("\n" KERN_ERR PFX "%s: Consistent memory allocation failed.\n",
+ name);
return -ENOMEM;
}
- if (!(lp->tx_dma_addr = kmalloc(sizeof(dma_addr_t) * lp->tx_ring_size, GFP_ATOMIC))) {
+ lp->tx_dma_addr = kmalloc(sizeof(dma_addr_t) * lp->tx_ring_size,
+ GFP_ATOMIC);
+ if (!lp->tx_dma_addr) {
if (pcnet32_debug & NETIF_MSG_DRV)
- printk(KERN_ERR PFX "Memory allocation failed.\n");
+ printk("\n" KERN_ERR PFX "%s: Memory allocation failed.\n", name);
return -ENOMEM;
}
memset(lp->tx_dma_addr, 0, sizeof(dma_addr_t) * lp->tx_ring_size);
- if (!(lp->rx_dma_addr = kmalloc(sizeof(dma_addr_t) * lp->rx_ring_size, GFP_ATOMIC))) {
+ lp->rx_dma_addr = kmalloc(sizeof(dma_addr_t) * lp->rx_ring_size,
+ GFP_ATOMIC);
+ if (!lp->rx_dma_addr) {
if (pcnet32_debug & NETIF_MSG_DRV)
- printk(KERN_ERR PFX "Memory allocation failed.\n");
+ printk("\n" KERN_ERR PFX "%s: Memory allocation failed.\n", name);
return -ENOMEM;
}
memset(lp->rx_dma_addr, 0, sizeof(dma_addr_t) * lp->rx_ring_size);
- if (!(lp->tx_skbuff = kmalloc(sizeof(struct sk_buff *) * lp->tx_ring_size, GFP_ATOMIC))) {
+ lp->tx_skbuff = kmalloc(sizeof(struct sk_buff *) * lp->tx_ring_size,
+ GFP_ATOMIC);
+ if (!lp->tx_skbuff) {
if (pcnet32_debug & NETIF_MSG_DRV)
- printk(KERN_ERR PFX "Memory allocation failed.\n");
+ printk("\n" KERN_ERR PFX "%s: Memory allocation failed.\n", name);
return -ENOMEM;
}
memset(lp->tx_skbuff, 0, sizeof(struct sk_buff *) * lp->tx_ring_size);
- if (!(lp->rx_skbuff = kmalloc(sizeof(struct sk_buff *) * lp->rx_ring_size, GFP_ATOMIC))) {
+ lp->rx_skbuff = kmalloc(sizeof(struct sk_buff *) * lp->rx_ring_size,
+ GFP_ATOMIC);
+ if (!lp->rx_skbuff) {
if (pcnet32_debug & NETIF_MSG_DRV)
- printk(KERN_ERR PFX "Memory allocation failed.\n");
+ printk("\n" KERN_ERR PFX "%s: Memory allocation failed.\n", name);
return -ENOMEM;
}
memset(lp->rx_skbuff, 0, sizeof(struct sk_buff *) * lp->rx_ring_size);
@@ -1592,12 +1619,18 @@ pcnet32_open(struct net_device *dev)
val |= 0x10;
lp->a.write_csr (ioaddr, 124, val);
- /* Allied Telesyn AT 2700/2701 FX looses the link, so skip that */
+ /* Allied Telesyn AT 2700/2701 FX are 100Mbit only and do not negotiate */
if (lp->pci_dev->subsystem_vendor == PCI_VENDOR_ID_AT &&
- (lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2700FX ||
- lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2701FX)) {
- printk(KERN_DEBUG "%s: Skipping PHY selection.\n", dev->name);
- } else {
+ (lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2700FX ||
+ lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2701FX)) {
+ if (lp->options & PCNET32_PORT_ASEL) {
+ lp->options = PCNET32_PORT_FD | PCNET32_PORT_100;
+ if (netif_msg_link(lp))
+ printk(KERN_DEBUG "%s: Setting 100Mb-Full Duplex.\n",
+ dev->name);
+ }
+ }
+ {
/*
* 24 Jun 2004 according AMD, in order to change the PHY,
* DANAS (or DISPM for 79C976) must be set; then select the speed,
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index ad93b0d..5eab9c4 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -61,6 +61,9 @@ int mdiobus_register(struct mii_bus *bus
for (i = 0; i < PHY_MAX_ADDR; i++) {
struct phy_device *phydev;
+ if (bus->phy_mask & (1 << i))
+ continue;
+
phydev = get_phy_device(bus, i);
if (IS_ERR(phydev))
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 3f5e93a..9c49354 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -30,6 +30,8 @@
* in the driver.
* rx_ring_sz: This defines the number of descriptors each ring can have. This
* is also an array of size 8.
+ * rx_ring_mode: This defines the operation mode of all 8 rings. The valid
+ * values are 1, 2 and 3.
* tx_fifo_num: This defines the number of Tx FIFOs thats used int the driver.
* tx_fifo_len: This too is an array of 8. Each element defines the number of
* Tx descriptors that can be associated with each corresponding FIFO.
@@ -65,12 +67,15 @@
#include "s2io.h"
#include "s2io-regs.h"
-#define DRV_VERSION "Version 2.0.9.1"
+#define DRV_VERSION "Version 2.0.9.3"
/* S2io Driver name & version. */
static char s2io_driver_name[] = "Neterion";
static char s2io_driver_version[] = DRV_VERSION;
+int rxd_size[4] = {32,48,48,64};
+int rxd_count[4] = {127,85,85,63};
+
static inline int RXD_IS_UP2DT(RxD_t *rxdp)
{
int ret;
@@ -104,7 +109,7 @@ static inline int rx_buffer_level(nic_t
mac_control = &sp->mac_control;
if ((mac_control->rings[ring].pkt_cnt - rxb_size) > 16) {
level = LOW;
- if (rxb_size <= MAX_RXDS_PER_BLOCK) {
+ if (rxb_size <= rxd_count[sp->rxd_mode]) {
level = PANIC;
}
}
@@ -296,6 +301,7 @@ static unsigned int rx_ring_sz[MAX_RX_RI
{[0 ...(MAX_RX_RINGS - 1)] = 0 };
static unsigned int rts_frm_len[MAX_RX_RINGS] =
{[0 ...(MAX_RX_RINGS - 1)] = 0 };
+static unsigned int rx_ring_mode = 1;
static unsigned int use_continuous_tx_intrs = 1;
static unsigned int rmac_pause_time = 65535;
static unsigned int mc_pause_threshold_q0q3 = 187;
@@ -304,6 +310,7 @@ static unsigned int shared_splits;
static unsigned int tmac_util_period = 5;
static unsigned int rmac_util_period = 5;
static unsigned int bimodal = 0;
+static unsigned int l3l4hdr_size = 128;
#ifndef CONFIG_S2IO_NAPI
static unsigned int indicate_max_pkts;
#endif
@@ -357,10 +364,8 @@ static int init_shared_mem(struct s2io_n
int i, j, blk_cnt, rx_sz, tx_sz;
int lst_size, lst_per_page;
struct net_device *dev = nic->dev;
-#ifdef CONFIG_2BUFF_MODE
unsigned long tmp;
buffAdd_t *ba;
-#endif
mac_info_t *mac_control;
struct config_param *config;
@@ -458,7 +463,8 @@ static int init_shared_mem(struct s2io_n
/* Allocation and initialization of RXDs in Rings */
size = 0;
for (i = 0; i < config->rx_ring_num; i++) {
- if (config->rx_cfg[i].num_rxd % (MAX_RXDS_PER_BLOCK + 1)) {
+ if (config->rx_cfg[i].num_rxd %
+ (rxd_count[nic->rxd_mode] + 1)) {
DBG_PRINT(ERR_DBG, "%s: RxD count of ", dev->name);
DBG_PRINT(ERR_DBG, "Ring%d is not a multiple of ",
i);
@@ -467,11 +473,15 @@ static int init_shared_mem(struct s2io_n
}
size += config->rx_cfg[i].num_rxd;
mac_control->rings[i].block_count =
- config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1);
- mac_control->rings[i].pkt_cnt =
- config->rx_cfg[i].num_rxd - mac_control->rings[i].block_count;
+ config->rx_cfg[i].num_rxd /
+ (rxd_count[nic->rxd_mode] + 1 );
+ mac_control->rings[i].pkt_cnt = config->rx_cfg[i].num_rxd -
+ mac_control->rings[i].block_count;
}
- size = (size * (sizeof(RxD_t)));
+ if (nic->rxd_mode == RXD_MODE_1)
+ size = (size * (sizeof(RxD1_t)));
+ else
+ size = (size * (sizeof(RxD3_t)));
rx_sz = size;
for (i = 0; i < config->rx_ring_num; i++) {
@@ -486,15 +496,15 @@ static int init_shared_mem(struct s2io_n
mac_control->rings[i].nic = nic;
mac_control->rings[i].ring_no = i;
- blk_cnt =
- config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1);
+ blk_cnt = config->rx_cfg[i].num_rxd /
+ (rxd_count[nic->rxd_mode] + 1);
/* Allocating all the Rx blocks */
for (j = 0; j < blk_cnt; j++) {
-#ifndef CONFIG_2BUFF_MODE
- size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t));
-#else
- size = SIZE_OF_BLOCK;
-#endif
+ rx_block_info_t *rx_blocks;
+ int l;
+
+ rx_blocks = &mac_control->rings[i].rx_blocks[j];
+ size = SIZE_OF_BLOCK; //size is always page size
tmp_v_addr = pci_alloc_consistent(nic->pdev, size,
&tmp_p_addr);
if (tmp_v_addr == NULL) {
@@ -504,11 +514,24 @@ static int init_shared_mem(struct s2io_n
* memory that was alloced till the
* failure happened.
*/
- mac_control->rings[i].rx_blocks[j].block_virt_addr =
- tmp_v_addr;
+ rx_blocks->block_virt_addr = tmp_v_addr;
return -ENOMEM;
}
memset(tmp_v_addr, 0, size);
+ rx_blocks->block_virt_addr = tmp_v_addr;
+ rx_blocks->block_dma_addr = tmp_p_addr;
+ rx_blocks->rxds = kmalloc(sizeof(rxd_info_t)*
+ rxd_count[nic->rxd_mode],
+ GFP_KERNEL);
+ for (l=0; l<rxd_count[nic->rxd_mode];l++) {
+ rx_blocks->rxds[l].virt_addr =
+ rx_blocks->block_virt_addr +
+ (rxd_size[nic->rxd_mode] * l);
+ rx_blocks->rxds[l].dma_addr =
+ rx_blocks->block_dma_addr +
+ (rxd_size[nic->rxd_mode] * l);
+ }
+
mac_control->rings[i].rx_blocks[j].block_virt_addr =
tmp_v_addr;
mac_control->rings[i].rx_blocks[j].block_dma_addr =
@@ -528,62 +551,58 @@ static int init_shared_mem(struct s2io_n
blk_cnt].block_dma_addr;
pre_rxd_blk = (RxD_block_t *) tmp_v_addr;
- pre_rxd_blk->reserved_1 = END_OF_BLOCK; /* last RxD
- * marker.
- */
-#ifndef CONFIG_2BUFF_MODE
pre_rxd_blk->reserved_2_pNext_RxD_block =
(unsigned long) tmp_v_addr_next;
-#endif
pre_rxd_blk->pNext_RxD_Blk_physical =
(u64) tmp_p_addr_next;
}
}
-
-#ifdef CONFIG_2BUFF_MODE
- /*
- * Allocation of Storages for buffer addresses in 2BUFF mode
- * and the buffers as well.
- */
- for (i = 0; i < config->rx_ring_num; i++) {
- blk_cnt =
- config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1);
- mac_control->rings[i].ba = kmalloc((sizeof(buffAdd_t *) * blk_cnt),
+ if (nic->rxd_mode >= RXD_MODE_3A) {
+ /*
+ * Allocation of Storages for buffer addresses in 2BUFF mode
+ * and the buffers as well.
+ */
+ for (i = 0; i < config->rx_ring_num; i++) {
+ blk_cnt = config->rx_cfg[i].num_rxd /
+ (rxd_count[nic->rxd_mode]+ 1);
+ mac_control->rings[i].ba =
+ kmalloc((sizeof(buffAdd_t *) * blk_cnt),
GFP_KERNEL);
- if (!mac_control->rings[i].ba)
- return -ENOMEM;
- for (j = 0; j < blk_cnt; j++) {
- int k = 0;
- mac_control->rings[i].ba[j] = kmalloc((sizeof(buffAdd_t) *
- (MAX_RXDS_PER_BLOCK + 1)),
- GFP_KERNEL);
- if (!mac_control->rings[i].ba[j])
+ if (!mac_control->rings[i].ba)
return -ENOMEM;
- while (k != MAX_RXDS_PER_BLOCK) {
- ba = &mac_control->rings[i].ba[j][k];
-
- ba->ba_0_org = (void *) kmalloc
- (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);
- if (!ba->ba_0_org)
- return -ENOMEM;
- tmp = (unsigned long) ba->ba_0_org;
- tmp += ALIGN_SIZE;
- tmp &= ~((unsigned long) ALIGN_SIZE);
- ba->ba_0 = (void *) tmp;
-
- ba->ba_1_org = (void *) kmalloc
- (BUF1_LEN + ALIGN_SIZE, GFP_KERNEL);
- if (!ba->ba_1_org)
+ for (j = 0; j < blk_cnt; j++) {
+ int k = 0;
+ mac_control->rings[i].ba[j] =
+ kmalloc((sizeof(buffAdd_t) *
+ (rxd_count[nic->rxd_mode] + 1)),
+ GFP_KERNEL);
+ if (!mac_control->rings[i].ba[j])
return -ENOMEM;
- tmp = (unsigned long) ba->ba_1_org;
- tmp += ALIGN_SIZE;
- tmp &= ~((unsigned long) ALIGN_SIZE);
- ba->ba_1 = (void *) tmp;
- k++;
+ while (k != rxd_count[nic->rxd_mode]) {
+ ba = &mac_control->rings[i].ba[j][k];
+
+ ba->ba_0_org = (void *) kmalloc
+ (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL);
+ if (!ba->ba_0_org)
+ return -ENOMEM;
+ tmp = (unsigned long)ba->ba_0_org;
+ tmp += ALIGN_SIZE;
+ tmp &= ~((unsigned long) ALIGN_SIZE);
+ ba->ba_0 = (void *) tmp;
+
+ ba->ba_1_org = (void *) kmalloc
+ (BUF1_LEN + ALIGN_SIZE, GFP_KERNEL);
+ if (!ba->ba_1_org)
+ return -ENOMEM;
+ tmp = (unsigned long) ba->ba_1_org;
+ tmp += ALIGN_SIZE;
+ tmp &= ~((unsigned long) ALIGN_SIZE);
+ ba->ba_1 = (void *) tmp;
+ k++;
+ }
}
}
}
-#endif
/* Allocation and initialization of Statistics block */
size = sizeof(StatInfo_t);
@@ -669,11 +688,7 @@ static void free_shared_mem(struct s2io_
kfree(mac_control->fifos[i].list_info);
}
-#ifndef CONFIG_2BUFF_MODE
- size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t));
-#else
size = SIZE_OF_BLOCK;
-#endif
for (i = 0; i < config->rx_ring_num; i++) {
blk_cnt = mac_control->rings[i].block_count;
for (j = 0; j < blk_cnt; j++) {
@@ -685,29 +700,31 @@ static void free_shared_mem(struct s2io_
break;
pci_free_consistent(nic->pdev, size,
tmp_v_addr, tmp_p_addr);
+ kfree(mac_control->rings[i].rx_blocks[j].rxds);
}
}
-#ifdef CONFIG_2BUFF_MODE
- /* Freeing buffer storage addresses in 2BUFF mode. */
- for (i = 0; i < config->rx_ring_num; i++) {
- blk_cnt =
- config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1);
- for (j = 0; j < blk_cnt; j++) {
- int k = 0;
- if (!mac_control->rings[i].ba[j])
- continue;
- while (k != MAX_RXDS_PER_BLOCK) {
- buffAdd_t *ba = &mac_control->rings[i].ba[j][k];
- kfree(ba->ba_0_org);
- kfree(ba->ba_1_org);
- k++;
+ if (nic->rxd_mode >= RXD_MODE_3A) {
+ /* Freeing buffer storage addresses in 2BUFF mode. */
+ for (i = 0; i < config->rx_ring_num; i++) {
+ blk_cnt = config->rx_cfg[i].num_rxd /
+ (rxd_count[nic->rxd_mode] + 1);
+ for (j = 0; j < blk_cnt; j++) {
+ int k = 0;
+ if (!mac_control->rings[i].ba[j])
+ continue;
+ while (k != rxd_count[nic->rxd_mode]) {
+ buffAdd_t *ba =
+ &mac_control->rings[i].ba[j][k];
+ kfree(ba->ba_0_org);
+ kfree(ba->ba_1_org);
+ k++;
+ }
+ kfree(mac_control->rings[i].ba[j]);
}
- kfree(mac_control->rings[i].ba[j]);
+ kfree(mac_control->rings[i].ba);
}
- kfree(mac_control->rings[i].ba);
}
-#endif
if (mac_control->stats_mem) {
pci_free_consistent(nic->pdev,
@@ -1894,20 +1911,19 @@ static int start_nic(struct s2io_nic *ni
val64 = readq(&bar0->prc_ctrl_n[i]);
if (nic->config.bimodal)
val64 |= PRC_CTRL_BIMODAL_INTERRUPT;
-#ifndef CONFIG_2BUFF_MODE
- val64 |= PRC_CTRL_RC_ENABLED;
-#else
- val64 |= PRC_CTRL_RC_ENABLED | PRC_CTRL_RING_MODE_3;
-#endif
+ if (nic->rxd_mode == RXD_MODE_1)
+ val64 |= PRC_CTRL_RC_ENABLED;
+ else
+ val64 |= PRC_CTRL_RC_ENABLED | PRC_CTRL_RING_MODE_3;
writeq(val64, &bar0->prc_ctrl_n[i]);
}
-#ifdef CONFIG_2BUFF_MODE
- /* Enabling 2 buffer mode by writing into Rx_pa_cfg reg. */
- val64 = readq(&bar0->rx_pa_cfg);
- val64 |= RX_PA_CFG_IGNORE_L2_ERR;
- writeq(val64, &bar0->rx_pa_cfg);
-#endif
+ if (nic->rxd_mode == RXD_MODE_3B) {
+ /* Enabling 2 buffer mode by writing into Rx_pa_cfg reg. */
+ val64 = readq(&bar0->rx_pa_cfg);
+ val64 |= RX_PA_CFG_IGNORE_L2_ERR;
+ writeq(val64, &bar0->rx_pa_cfg);
+ }
/*
* Enabling MC-RLDRAM. After enabling the device, we timeout
@@ -2090,6 +2106,41 @@ static void stop_nic(struct s2io_nic *ni
}
}
+int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb)
+{
+ struct net_device *dev = nic->dev;
+ struct sk_buff *frag_list;
+ u64 tmp;
+
+ /* Buffer-1 receives L3/L4 headers */
+ ((RxD3_t*)rxdp)->Buffer1_ptr = pci_map_single
+ (nic->pdev, skb->data, l3l4hdr_size + 4,
+ PCI_DMA_FROMDEVICE);
+
+ /* skb_shinfo(skb)->frag_list will have L4 data payload */
+ skb_shinfo(skb)->frag_list = dev_alloc_skb(dev->mtu + ALIGN_SIZE);
+ if (skb_shinfo(skb)->frag_list == NULL) {
+ DBG_PRINT(ERR_DBG, "%s: dev_alloc_skb failed\n ", dev->name);
+ return -ENOMEM ;
+ }
+ frag_list = skb_shinfo(skb)->frag_list;
+ frag_list->next = NULL;
+ tmp = (u64) frag_list->data;
+ tmp += ALIGN_SIZE;
+ tmp &= ~ALIGN_SIZE;
+ frag_list->data = (void *) tmp;
+ frag_list->tail = (void *) tmp;
+
+ /* Buffer-2 receives L4 data payload */
+ ((RxD3_t*)rxdp)->Buffer2_ptr = pci_map_single(nic->pdev,
+ frag_list->data, dev->mtu,
+ PCI_DMA_FROMDEVICE);
+ rxdp->Control_2 |= SET_BUFFER1_SIZE_3(l3l4hdr_size + 4);
+ rxdp->Control_2 |= SET_BUFFER2_SIZE_3(dev->mtu);
+
+ return SUCCESS;
+}
+
/**
* fill_rx_buffers - Allocates the Rx side skbs
* @nic: device private variable
@@ -2117,18 +2168,12 @@ int fill_rx_buffers(struct s2io_nic *nic
struct sk_buff *skb;
RxD_t *rxdp;
int off, off1, size, block_no, block_no1;
- int offset, offset1;
u32 alloc_tab = 0;
u32 alloc_cnt;
mac_info_t *mac_control;
struct config_param *config;
-#ifdef CONFIG_2BUFF_MODE
- RxD_t *rxdpnext;
- int nextblk;
u64 tmp;
buffAdd_t *ba;
- dma_addr_t rxdpphys;
-#endif
#ifndef CONFIG_S2IO_NAPI
unsigned long flags;
#endif
@@ -2138,8 +2183,6 @@ int fill_rx_buffers(struct s2io_nic *nic
config = &nic->config;
alloc_cnt = mac_control->rings[ring_no].pkt_cnt -
atomic_read(&nic->rx_bufs_left[ring_no]);
- size = dev->mtu + HEADER_ETHERNET_II_802_3_SIZE +
- HEADER_802_2_SIZE + HEADER_SNAP_SIZE;
while (alloc_tab < alloc_cnt) {
block_no = mac_control->rings[ring_no].rx_curr_put_info.
@@ -2148,159 +2191,145 @@ int fill_rx_buffers(struct s2io_nic *nic
block_index;
off = mac_control->rings[ring_no].rx_curr_put_info.offset;
off1 = mac_control->rings[ring_no].rx_curr_get_info.offset;
-#ifndef CONFIG_2BUFF_MODE
- offset = block_no * (MAX_RXDS_PER_BLOCK + 1) + off;
- offset1 = block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1;
-#else
- offset = block_no * (MAX_RXDS_PER_BLOCK) + off;
- offset1 = block_no1 * (MAX_RXDS_PER_BLOCK) + off1;
-#endif
- rxdp = mac_control->rings[ring_no].rx_blocks[block_no].
- block_virt_addr + off;
- if ((offset == offset1) && (rxdp->Host_Control)) {
- DBG_PRINT(INTR_DBG, "%s: Get and Put", dev->name);
+ rxdp = mac_control->rings[ring_no].
+ rx_blocks[block_no].rxds[off].virt_addr;
+
+ if ((block_no == block_no1) && (off == off1) &&
+ (rxdp->Host_Control)) {
+ DBG_PRINT(INTR_DBG, "%s: Get and Put",
+ dev->name);
DBG_PRINT(INTR_DBG, " info equated\n");
goto end;
}
-#ifndef CONFIG_2BUFF_MODE
- if (rxdp->Control_1 == END_OF_BLOCK) {
+ if (off && (off == rxd_count[nic->rxd_mode])) {
mac_control->rings[ring_no].rx_curr_put_info.
block_index++;
+ if (mac_control->rings[ring_no].rx_curr_put_info.
+ block_index == mac_control->rings[ring_no].
+ block_count)
+ mac_control->rings[ring_no].rx_curr_put_info.
+ block_index = 0;
+ block_no = mac_control->rings[ring_no].
+ rx_curr_put_info.block_index;
+ if (off == rxd_count[nic->rxd_mode])
+ off = 0;
mac_control->rings[ring_no].rx_curr_put_info.
- block_index %= mac_control->rings[ring_no].block_count;
- block_no = mac_control->rings[ring_no].rx_curr_put_info.
- block_index;
- off++;
- off %= (MAX_RXDS_PER_BLOCK + 1);
- mac_control->rings[ring_no].rx_curr_put_info.offset =
- off;
- rxdp = (RxD_t *) ((unsigned long) rxdp->Control_2);
+ offset = off;
+ rxdp = mac_control->rings[ring_no].
+ rx_blocks[block_no].block_virt_addr;
DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n",
dev->name, rxdp);
}
#ifndef CONFIG_S2IO_NAPI
spin_lock_irqsave(&nic->put_lock, flags);
mac_control->rings[ring_no].put_pos =
- (block_no * (MAX_RXDS_PER_BLOCK + 1)) + off;
+ (block_no * (rxd_count[nic->rxd_mode] + 1)) + off;
spin_unlock_irqrestore(&nic->put_lock, flags);
#endif
-#else
- if (rxdp->Host_Control == END_OF_BLOCK) {
- mac_control->rings[ring_no].rx_curr_put_info.
- block_index++;
- mac_control->rings[ring_no].rx_curr_put_info.block_index
- %= mac_control->rings[ring_no].block_count;
- block_no = mac_control->rings[ring_no].rx_curr_put_info
- .block_index;
- off = 0;
- DBG_PRINT(INTR_DBG, "%s: block%d at: 0x%llx\n",
- dev->name, block_no,
- (unsigned long long) rxdp->Control_1);
- mac_control->rings[ring_no].rx_curr_put_info.offset =
- off;
- rxdp = mac_control->rings[ring_no].rx_blocks[block_no].
- block_virt_addr;
- }
-#ifndef CONFIG_S2IO_NAPI
- spin_lock_irqsave(&nic->put_lock, flags);
- mac_control->rings[ring_no].put_pos = (block_no *
- (MAX_RXDS_PER_BLOCK + 1)) + off;
- spin_unlock_irqrestore(&nic->put_lock, flags);
-#endif
-#endif
-
-#ifndef CONFIG_2BUFF_MODE
- if (rxdp->Control_1 & RXD_OWN_XENA)
-#else
- if (rxdp->Control_2 & BIT(0))
-#endif
- {
+ if ((rxdp->Control_1 & RXD_OWN_XENA) &&
+ ((nic->rxd_mode >= RXD_MODE_3A) &&
+ (rxdp->Control_2 & BIT(0)))) {
mac_control->rings[ring_no].rx_curr_put_info.
- offset = off;
+ offset = off;
goto end;
}
-#ifdef CONFIG_2BUFF_MODE
- /*
- * RxDs Spanning cache lines will be replenished only
- * if the succeeding RxD is also owned by Host. It
- * will always be the ((8*i)+3) and ((8*i)+6)
- * descriptors for the 48 byte descriptor. The offending
- * decsriptor is of-course the 3rd descriptor.
- */
- rxdpphys = mac_control->rings[ring_no].rx_blocks[block_no].
- block_dma_addr + (off * sizeof(RxD_t));
- if (((u64) (rxdpphys)) % 128 > 80) {
- rxdpnext = mac_control->rings[ring_no].rx_blocks[block_no].
- block_virt_addr + (off + 1);
- if (rxdpnext->Host_Control == END_OF_BLOCK) {
- nextblk = (block_no + 1) %
- (mac_control->rings[ring_no].block_count);
- rxdpnext = mac_control->rings[ring_no].rx_blocks
- [nextblk].block_virt_addr;
- }
- if (rxdpnext->Control_2 & BIT(0))
- goto end;
- }
-#endif
+ /* calculate size of skb based on ring mode */
+ size = dev->mtu + HEADER_ETHERNET_II_802_3_SIZE +
+ HEADER_802_2_SIZE + HEADER_SNAP_SIZE;
+ if (nic->rxd_mode == RXD_MODE_1)
+ size += NET_IP_ALIGN;
+ else if (nic->rxd_mode == RXD_MODE_3B)
+ size = dev->mtu + ALIGN_SIZE + BUF0_LEN + 4;
+ else
+ size = l3l4hdr_size + ALIGN_SIZE + BUF0_LEN + 4;
-#ifndef CONFIG_2BUFF_MODE
- skb = dev_alloc_skb(size + NET_IP_ALIGN);
-#else
- skb = dev_alloc_skb(dev->mtu + ALIGN_SIZE + BUF0_LEN + 4);
-#endif
- if (!skb) {
+ /* allocate skb */
+ skb = dev_alloc_skb(size);
+ if(!skb) {
DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name);
DBG_PRINT(ERR_DBG, "memory to allocate SKBs\n");
if (first_rxdp) {
wmb();
first_rxdp->Control_1 |= RXD_OWN_XENA;
}
- return -ENOMEM;
+ return -ENOMEM ;
+ }
+ if (nic->rxd_mode == RXD_MODE_1) {
+ /* 1 buffer mode - normal operation mode */
+ memset(rxdp, 0, sizeof(RxD1_t));
+ skb_reserve(skb, NET_IP_ALIGN);
+ ((RxD1_t*)rxdp)->Buffer0_ptr = pci_map_single
+ (nic->pdev, skb->data, size, PCI_DMA_FROMDEVICE);
+ rxdp->Control_2 &= (~MASK_BUFFER0_SIZE_1);
+ rxdp->Control_2 |= SET_BUFFER0_SIZE_1(size);
+
+ } else if (nic->rxd_mode >= RXD_MODE_3A) {
+ /*
+ * 2 or 3 buffer mode -
+ * Both 2 buffer mode and 3 buffer mode provides 128
+ * byte aligned receive buffers.
+ *
+ * 3 buffer mode provides header separation where in
+ * skb->data will have L3/L4 headers where as
+ * skb_shinfo(skb)->frag_list will have the L4 data
+ * payload
+ */
+
+ memset(rxdp, 0, sizeof(RxD3_t));
+ ba = &mac_control->rings[ring_no].ba[block_no][off];
+ skb_reserve(skb, BUF0_LEN);
+ tmp = (u64)(unsigned long) skb->data;
+ tmp += ALIGN_SIZE;
+ tmp &= ~ALIGN_SIZE;
+ skb->data = (void *) (unsigned long)tmp;
+ skb->tail = (void *) (unsigned long)tmp;
+
+ ((RxD3_t*)rxdp)->Buffer0_ptr =
+ pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN,
+ PCI_DMA_FROMDEVICE);
+ rxdp->Control_2 = SET_BUFFER0_SIZE_3(BUF0_LEN);
+ if (nic->rxd_mode == RXD_MODE_3B) {
+ /* Two buffer mode */
+
+ /*
+ * Buffer2 will have L3/L4 header plus
+ * L4 payload
+ */
+ ((RxD3_t*)rxdp)->Buffer2_ptr = pci_map_single
+ (nic->pdev, skb->data, dev->mtu + 4,
+ PCI_DMA_FROMDEVICE);
+
+ /* Buffer-1 will be dummy buffer not used */
+ ((RxD3_t*)rxdp)->Buffer1_ptr =
+ pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN,
+ PCI_DMA_FROMDEVICE);
+ rxdp->Control_2 |= SET_BUFFER1_SIZE_3(1);
+ rxdp->Control_2 |= SET_BUFFER2_SIZE_3
+ (dev->mtu + 4);
+ } else {
+ /* 3 buffer mode */
+ if (fill_rxd_3buf(nic, rxdp, skb) == -ENOMEM) {
+ dev_kfree_skb_irq(skb);
+ if (first_rxdp) {
+ wmb();
+ first_rxdp->Control_1 |=
+ RXD_OWN_XENA;
+ }
+ return -ENOMEM ;
+ }
+ }
+ rxdp->Control_2 |= BIT(0);
}
-#ifndef CONFIG_2BUFF_MODE
- skb_reserve(skb, NET_IP_ALIGN);
- memset(rxdp, 0, sizeof(RxD_t));
- rxdp->Buffer0_ptr = pci_map_single
- (nic->pdev, skb->data, size, PCI_DMA_FROMDEVICE);
- rxdp->Control_2 &= (~MASK_BUFFER0_SIZE);
- rxdp->Control_2 |= SET_BUFFER0_SIZE(size);
rxdp->Host_Control = (unsigned long) (skb);
if (alloc_tab & ((1 << rxsync_frequency) - 1))
rxdp->Control_1 |= RXD_OWN_XENA;
off++;
- off %= (MAX_RXDS_PER_BLOCK + 1);
- mac_control->rings[ring_no].rx_curr_put_info.offset = off;
-#else
- ba = &mac_control->rings[ring_no].ba[block_no][off];
- skb_reserve(skb, BUF0_LEN);
- tmp = ((unsigned long) skb->data & ALIGN_SIZE);
- if (tmp)
- skb_reserve(skb, (ALIGN_SIZE + 1) - tmp);
-
- memset(rxdp, 0, sizeof(RxD_t));
- rxdp->Buffer2_ptr = pci_map_single
- (nic->pdev, skb->data, dev->mtu + BUF0_LEN + 4,
- PCI_DMA_FROMDEVICE);
- rxdp->Buffer0_ptr =
- pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN,
- PCI_DMA_FROMDEVICE);
- rxdp->Buffer1_ptr =
- pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN,
- PCI_DMA_FROMDEVICE);
-
- rxdp->Control_2 = SET_BUFFER2_SIZE(dev->mtu + 4);
- rxdp->Control_2 |= SET_BUFFER0_SIZE(BUF0_LEN);
- rxdp->Control_2 |= SET_BUFFER1_SIZE(1); /* dummy. */
- rxdp->Control_2 |= BIT(0); /* Set Buffer_Empty bit. */
- rxdp->Host_Control = (u64) ((unsigned long) (skb));
- if (alloc_tab & ((1 << rxsync_frequency) - 1))
- rxdp->Control_1 |= RXD_OWN_XENA;
- off++;
+ if (off == (rxd_count[nic->rxd_mode] + 1))
+ off = 0;
mac_control->rings[ring_no].rx_curr_put_info.offset = off;
-#endif
- rxdp->Control_2 |= SET_RXD_MARKER;
+ rxdp->Control_2 |= SET_RXD_MARKER;
if (!(alloc_tab & ((1 << rxsync_frequency) - 1))) {
if (first_rxdp) {
wmb();
@@ -2325,6 +2354,67 @@ int fill_rx_buffers(struct s2io_nic *nic
return SUCCESS;
}
+static void free_rxd_blk(struct s2io_nic *sp, int ring_no, int blk)
+{
+ struct net_device *dev = sp->dev;
+ int j;
+ struct sk_buff *skb;
+ RxD_t *rxdp;
+ mac_info_t *mac_control;
+ buffAdd_t *ba;
+
+ mac_control = &sp->mac_control;
+ for (j = 0 ; j < rxd_count[sp->rxd_mode]; j++) {
+ rxdp = mac_control->rings[ring_no].
+ rx_blocks[blk].rxds[j].virt_addr;
+ skb = (struct sk_buff *)
+ ((unsigned long) rxdp->Host_Control);
+ if (!skb) {
+ continue;
+ }
+ if (sp->rxd_mode == RXD_MODE_1) {
+ pci_unmap_single(sp->pdev, (dma_addr_t)
+ ((RxD1_t*)rxdp)->Buffer0_ptr,
+ dev->mtu +
+ HEADER_ETHERNET_II_802_3_SIZE
+ + HEADER_802_2_SIZE +
+ HEADER_SNAP_SIZE,
+ PCI_DMA_FROMDEVICE);
+ memset(rxdp, 0, sizeof(RxD1_t));
+ } else if(sp->rxd_mode == RXD_MODE_3B) {
+ ba = &mac_control->rings[ring_no].
+ ba[blk][j];
+ pci_unmap_single(sp->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer0_ptr,
+ BUF0_LEN,
+ PCI_DMA_FROMDEVICE);
+ pci_unmap_single(sp->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer1_ptr,
+ BUF1_LEN,
+ PCI_DMA_FROMDEVICE);
+ pci_unmap_single(sp->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer2_ptr,
+ dev->mtu + 4,
+ PCI_DMA_FROMDEVICE);
+ memset(rxdp, 0, sizeof(RxD3_t));
+ } else {
+ pci_unmap_single(sp->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer0_ptr, BUF0_LEN,
+ PCI_DMA_FROMDEVICE);
+ pci_unmap_single(sp->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer1_ptr,
+ l3l4hdr_size + 4,
+ PCI_DMA_FROMDEVICE);
+ pci_unmap_single(sp->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer2_ptr, dev->mtu,
+ PCI_DMA_FROMDEVICE);
+ memset(rxdp, 0, sizeof(RxD3_t));
+ }
+ dev_kfree_skb(skb);
+ atomic_dec(&sp->rx_bufs_left[ring_no]);
+ }
+}
+
/**
* free_rx_buffers - Frees all Rx buffers
* @sp: device private variable.
@@ -2337,77 +2427,17 @@ int fill_rx_buffers(struct s2io_nic *nic
static void free_rx_buffers(struct s2io_nic *sp)
{
struct net_device *dev = sp->dev;
- int i, j, blk = 0, off, buf_cnt = 0;
- RxD_t *rxdp;
- struct sk_buff *skb;
+ int i, blk = 0, buf_cnt = 0;
mac_info_t *mac_control;
struct config_param *config;
-#ifdef CONFIG_2BUFF_MODE
- buffAdd_t *ba;
-#endif
mac_control = &sp->mac_control;
config = &sp->config;
for (i = 0; i < config->rx_ring_num; i++) {
- for (j = 0, blk = 0; j < config->rx_cfg[i].num_rxd; j++) {
- off = j % (MAX_RXDS_PER_BLOCK + 1);
- rxdp = mac_control->rings[i].rx_blocks[blk].
- block_virt_addr + off;
-
-#ifndef CONFIG_2BUFF_MODE
- if (rxdp->Control_1 == END_OF_BLOCK) {
- rxdp =
- (RxD_t *) ((unsigned long) rxdp->
- Control_2);
- j++;
- blk++;
- }
-#else
- if (rxdp->Host_Control == END_OF_BLOCK) {
- blk++;
- continue;
- }
-#endif
+ for (blk = 0; blk < rx_ring_sz[i]; blk++)
+ free_rxd_blk(sp,i,blk);
- if (!(rxdp->Control_1 & RXD_OWN_XENA)) {
- memset(rxdp, 0, sizeof(RxD_t));
- continue;
- }
-
- skb =
- (struct sk_buff *) ((unsigned long) rxdp->
- Host_Control);
- if (skb) {
-#ifndef CONFIG_2BUFF_MODE
- pci_unmap_single(sp->pdev, (dma_addr_t)
- rxdp->Buffer0_ptr,
- dev->mtu +
- HEADER_ETHERNET_II_802_3_SIZE
- + HEADER_802_2_SIZE +
- HEADER_SNAP_SIZE,
- PCI_DMA_FROMDEVICE);
-#else
- ba = &mac_control->rings[i].ba[blk][off];
- pci_unmap_single(sp->pdev, (dma_addr_t)
- rxdp->Buffer0_ptr,
- BUF0_LEN,
- PCI_DMA_FROMDEVICE);
- pci_unmap_single(sp->pdev, (dma_addr_t)
- rxdp->Buffer1_ptr,
- BUF1_LEN,
- PCI_DMA_FROMDEVICE);
- pci_unmap_single(sp->pdev, (dma_addr_t)
- rxdp->Buffer2_ptr,
- dev->mtu + BUF0_LEN + 4,
- PCI_DMA_FROMDEVICE);
-#endif
- dev_kfree_skb(skb);
- atomic_dec(&sp->rx_bufs_left[i]);
- buf_cnt++;
- }
- memset(rxdp, 0, sizeof(RxD_t));
- }
mac_control->rings[i].rx_curr_put_info.block_index = 0;
mac_control->rings[i].rx_curr_get_info.block_index = 0;
mac_control->rings[i].rx_curr_put_info.offset = 0;
@@ -2513,7 +2543,7 @@ static void rx_intr_handler(ring_info_t
{
nic_t *nic = ring_data->nic;
struct net_device *dev = (struct net_device *) nic->dev;
- int get_block, get_offset, put_block, put_offset, ring_bufs;
+ int get_block, put_block, put_offset;
rx_curr_get_info_t get_info, put_info;
RxD_t *rxdp;
struct sk_buff *skb;
@@ -2532,21 +2562,22 @@ static void rx_intr_handler(ring_info_t
get_block = get_info.block_index;
put_info = ring_data->rx_curr_put_info;
put_block = put_info.block_index;
- ring_bufs = get_info.ring_len+1;
- rxdp = ring_data->rx_blocks[get_block].block_virt_addr +
- get_info.offset;
- get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
- get_info.offset;
+ rxdp = ring_data->rx_blocks[get_block].rxds[get_info.offset].virt_addr;
#ifndef CONFIG_S2IO_NAPI
spin_lock(&nic->put_lock);
put_offset = ring_data->put_pos;
spin_unlock(&nic->put_lock);
#else
- put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) +
+ put_offset = (put_block * (rxd_count[nic->rxd_mode] + 1)) +
put_info.offset;
#endif
- while (RXD_IS_UP2DT(rxdp) &&
- (((get_offset + 1) % ring_bufs) != put_offset)) {
+ while (RXD_IS_UP2DT(rxdp)) {
+ /* If your are next to put index then it's FIFO full condition */
+ if ((get_block == put_block) &&
+ (get_info.offset + 1) == put_info.offset) {
+ DBG_PRINT(ERR_DBG, "%s: Ring Full\n",dev->name);
+ break;
+ }
skb = (struct sk_buff *) ((unsigned long)rxdp->Host_Control);
if (skb == NULL) {
DBG_PRINT(ERR_DBG, "%s: The skb is ",
@@ -2555,46 +2586,52 @@ static void rx_intr_handler(ring_info_t
spin_unlock(&nic->rx_lock);
return;
}
-#ifndef CONFIG_2BUFF_MODE
- pci_unmap_single(nic->pdev, (dma_addr_t)
- rxdp->Buffer0_ptr,
+ if (nic->rxd_mode == RXD_MODE_1) {
+ pci_unmap_single(nic->pdev, (dma_addr_t)
+ ((RxD1_t*)rxdp)->Buffer0_ptr,
dev->mtu +
HEADER_ETHERNET_II_802_3_SIZE +
HEADER_802_2_SIZE +
HEADER_SNAP_SIZE,
PCI_DMA_FROMDEVICE);
-#else
- pci_unmap_single(nic->pdev, (dma_addr_t)
- rxdp->Buffer0_ptr,
+ } else if (nic->rxd_mode == RXD_MODE_3B) {
+ pci_unmap_single(nic->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer0_ptr,
BUF0_LEN, PCI_DMA_FROMDEVICE);
- pci_unmap_single(nic->pdev, (dma_addr_t)
- rxdp->Buffer1_ptr,
+ pci_unmap_single(nic->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer1_ptr,
BUF1_LEN, PCI_DMA_FROMDEVICE);
- pci_unmap_single(nic->pdev, (dma_addr_t)
- rxdp->Buffer2_ptr,
- dev->mtu + BUF0_LEN + 4,
+ pci_unmap_single(nic->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer2_ptr,
+ dev->mtu + 4,
PCI_DMA_FROMDEVICE);
-#endif
+ } else {
+ pci_unmap_single(nic->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer0_ptr, BUF0_LEN,
+ PCI_DMA_FROMDEVICE);
+ pci_unmap_single(nic->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer1_ptr,
+ l3l4hdr_size + 4,
+ PCI_DMA_FROMDEVICE);
+ pci_unmap_single(nic->pdev, (dma_addr_t)
+ ((RxD3_t*)rxdp)->Buffer2_ptr,
+ dev->mtu, PCI_DMA_FROMDEVICE);
+ }
rx_osm_handler(ring_data, rxdp);
get_info.offset++;
- ring_data->rx_curr_get_info.offset =
- get_info.offset;
- rxdp = ring_data->rx_blocks[get_block].block_virt_addr +
- get_info.offset;
- if (get_info.offset &&
- (!(get_info.offset % MAX_RXDS_PER_BLOCK))) {
+ ring_data->rx_curr_get_info.offset = get_info.offset;
+ rxdp = ring_data->rx_blocks[get_block].
+ rxds[get_info.offset].virt_addr;
+ if (get_info.offset == rxd_count[nic->rxd_mode]) {
get_info.offset = 0;
- ring_data->rx_curr_get_info.offset
- = get_info.offset;
+ ring_data->rx_curr_get_info.offset = get_info.offset;
get_block++;
- get_block %= ring_data->block_count;
- ring_data->rx_curr_get_info.block_index
- = get_block;
+ if (get_block == ring_data->block_count)
+ get_block = 0;
+ ring_data->rx_curr_get_info.block_index = get_block;
rxdp = ring_data->rx_blocks[get_block].block_virt_addr;
}
- get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) +
- get_info.offset;
#ifdef CONFIG_S2IO_NAPI
nic->pkts_to_process -= 1;
if (!nic->pkts_to_process)
@@ -3044,7 +3081,7 @@ int s2io_set_swapper(nic_t * sp)
int wait_for_msix_trans(nic_t *nic, int i)
{
- XENA_dev_config_t __iomem *bar0 = nic->bar0;
+ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
u64 val64;
int ret = 0, cnt = 0;
@@ -3065,7 +3102,7 @@ int wait_for_msix_trans(nic_t *nic, int
void restore_xmsi_data(nic_t *nic)
{
- XENA_dev_config_t __iomem *bar0 = nic->bar0;
+ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
u64 val64;
int i;
@@ -3083,7 +3120,7 @@ void restore_xmsi_data(nic_t *nic)
void store_xmsi_data(nic_t *nic)
{
- XENA_dev_config_t __iomem *bar0 = nic->bar0;
+ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
u64 val64, addr, data;
int i;
@@ -3106,7 +3143,7 @@ void store_xmsi_data(nic_t *nic)
int s2io_enable_msi(nic_t *nic)
{
- XENA_dev_config_t __iomem *bar0 = nic->bar0;
+ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
u16 msi_ctrl, msg_val;
struct config_param *config = &nic->config;
struct net_device *dev = nic->dev;
@@ -3156,7 +3193,7 @@ int s2io_enable_msi(nic_t *nic)
int s2io_enable_msi_x(nic_t *nic)
{
- XENA_dev_config_t __iomem *bar0 = nic->bar0;
+ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0;
u64 tx_mat, rx_mat;
u16 msi_control; /* Temp variable */
int ret, i, j, msix_indx = 1;
@@ -5537,16 +5574,7 @@ static int rx_osm_handler(ring_info_t *r
((unsigned long) rxdp->Host_Control);
int ring_no = ring_data->ring_no;
u16 l3_csum, l4_csum;
-#ifdef CONFIG_2BUFF_MODE
- int buf0_len = RXD_GET_BUFFER0_SIZE(rxdp->Control_2);
- int buf2_len = RXD_GET_BUFFER2_SIZE(rxdp->Control_2);
- int get_block = ring_data->rx_curr_get_info.block_index;
- int get_off = ring_data->rx_curr_get_info.offset;
- buffAdd_t *ba = &ring_data->ba[get_block][get_off];
- unsigned char *buff;
-#else
- u16 len = (u16) ((RXD_GET_BUFFER0_SIZE(rxdp->Control_2)) >> 48);;
-#endif
+
skb->dev = dev;
if (rxdp->Control_1 & RXD_T_CODE) {
unsigned long long err = rxdp->Control_1 & RXD_T_CODE;
@@ -5563,19 +5591,36 @@ static int rx_osm_handler(ring_info_t *r
rxdp->Host_Control = 0;
sp->rx_pkt_count++;
sp->stats.rx_packets++;
-#ifndef CONFIG_2BUFF_MODE
- sp->stats.rx_bytes += len;
-#else
- sp->stats.rx_bytes += buf0_len + buf2_len;
-#endif
+ if (sp->rxd_mode == RXD_MODE_1) {
+ int len = RXD_GET_BUFFER0_SIZE_1(rxdp->Control_2);
-#ifndef CONFIG_2BUFF_MODE
- skb_put(skb, len);
-#else
- buff = skb_push(skb, buf0_len);
- memcpy(buff, ba->ba_0, buf0_len);
- skb_put(skb, buf2_len);
-#endif
+ sp->stats.rx_bytes += len;
+ skb_put(skb, len);
+
+ } else if (sp->rxd_mode >= RXD_MODE_3A) {
+ int get_block = ring_data->rx_curr_get_info.block_index;
+ int get_off = ring_data->rx_curr_get_info.offset;
+ int buf0_len = RXD_GET_BUFFER0_SIZE_3(rxdp->Control_2);
+ int buf2_len = RXD_GET_BUFFER2_SIZE_3(rxdp->Control_2);
+ unsigned char *buff = skb_push(skb, buf0_len);
+
+ buffAdd_t *ba = &ring_data->ba[get_block][get_off];
+ sp->stats.rx_bytes += buf0_len + buf2_len;
+ memcpy(buff, ba->ba_0, buf0_len);
+
+ if (sp->rxd_mode == RXD_MODE_3A) {
+ int buf1_len = RXD_GET_BUFFER1_SIZE_3(rxdp->Control_2);
+
+ skb_put(skb, buf1_len);
+ skb->len += buf2_len;
+ skb->data_len += buf2_len;
+ skb->truesize += buf2_len;
+ skb_put(skb_shinfo(skb)->frag_list, buf2_len);
+ sp->stats.rx_bytes += buf1_len;
+
+ } else
+ skb_put(skb, buf2_len);
+ }
if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) &&
(sp->rx_csum)) {
@@ -5711,6 +5756,7 @@ MODULE_VERSION(DRV_VERSION);
module_param(tx_fifo_num, int, 0);
module_param(rx_ring_num, int, 0);
+module_param(rx_ring_mode, int, 0);
module_param_array(tx_fifo_len, uint, NULL, 0);
module_param_array(rx_ring_sz, uint, NULL, 0);
module_param_array(rts_frm_len, uint, NULL, 0);
@@ -5722,6 +5768,7 @@ module_param(shared_splits, int, 0);
module_param(tmac_util_period, int, 0);
module_param(rmac_util_period, int, 0);
module_param(bimodal, bool, 0);
+module_param(l3l4hdr_size, int , 0);
#ifndef CONFIG_S2IO_NAPI
module_param(indicate_max_pkts, int, 0);
#endif
@@ -5843,6 +5890,13 @@ Defaulting to INTA\n");
sp->pdev = pdev;
sp->high_dma_flag = dma_flag;
sp->device_enabled_once = FALSE;
+ if (rx_ring_mode == 1)
+ sp->rxd_mode = RXD_MODE_1;
+ if (rx_ring_mode == 2)
+ sp->rxd_mode = RXD_MODE_3B;
+ if (rx_ring_mode == 3)
+ sp->rxd_mode = RXD_MODE_3A;
+
sp->intr_type = dev_intr_type;
if ((pdev->device == PCI_DEVICE_ID_HERC_WIN) ||
@@ -5895,7 +5949,7 @@ Defaulting to INTA\n");
config->rx_ring_num = rx_ring_num;
for (i = 0; i < MAX_RX_RINGS; i++) {
config->rx_cfg[i].num_rxd = rx_ring_sz[i] *
- (MAX_RXDS_PER_BLOCK + 1);
+ (rxd_count[sp->rxd_mode] + 1);
config->rx_cfg[i].ring_priority = i;
}
@@ -6090,9 +6144,6 @@ Defaulting to INTA\n");
DBG_PRINT(ERR_DBG, "(rev %d), Version %s",
get_xena_rev_id(sp->pdev),
s2io_driver_version);
-#ifdef CONFIG_2BUFF_MODE
- DBG_PRINT(ERR_DBG, ", Buffer mode %d",2);
-#endif
switch(sp->intr_type) {
case INTA:
DBG_PRINT(ERR_DBG, ", Intr type INTA");
@@ -6125,9 +6176,6 @@ Defaulting to INTA\n");
DBG_PRINT(ERR_DBG, "(rev %d), Version %s",
get_xena_rev_id(sp->pdev),
s2io_driver_version);
-#ifdef CONFIG_2BUFF_MODE
- DBG_PRINT(ERR_DBG, ", Buffer mode %d",2);
-#endif
switch(sp->intr_type) {
case INTA:
DBG_PRINT(ERR_DBG, ", Intr type INTA");
@@ -6148,6 +6196,12 @@ Defaulting to INTA\n");
sp->def_mac_addr[0].mac_addr[4],
sp->def_mac_addr[0].mac_addr[5]);
}
+ if (sp->rxd_mode == RXD_MODE_3B)
+ DBG_PRINT(ERR_DBG, "%s: 2-Buffer mode support has been "
+ "enabled\n",dev->name);
+ if (sp->rxd_mode == RXD_MODE_3A)
+ DBG_PRINT(ERR_DBG, "%s: 3-Buffer mode support has been "
+ "enabled\n",dev->name);
/* Initialize device name */
strcpy(sp->name, dev->name);
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 1cc24b5..419aad7 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -418,7 +418,7 @@ typedef struct list_info_hold {
void *list_virt_addr;
} list_info_hold_t;
-/* Rx descriptor structure */
+/* Rx descriptor structure for 1 buffer mode */
typedef struct _RxD_t {
u64 Host_Control; /* reserved for host */
u64 Control_1;
@@ -439,49 +439,54 @@ typedef struct _RxD_t {
#define SET_RXD_MARKER vBIT(THE_RXD_MARK, 0, 2)
#define GET_RXD_MARKER(ctrl) ((ctrl & SET_RXD_MARKER) >> 62)
-#ifndef CONFIG_2BUFF_MODE
-#define MASK_BUFFER0_SIZE vBIT(0x3FFF,2,14)
-#define SET_BUFFER0_SIZE(val) vBIT(val,2,14)
-#else
-#define MASK_BUFFER0_SIZE vBIT(0xFF,2,14)
-#define MASK_BUFFER1_SIZE vBIT(0xFFFF,16,16)
-#define MASK_BUFFER2_SIZE vBIT(0xFFFF,32,16)
-#define SET_BUFFER0_SIZE(val) vBIT(val,8,8)
-#define SET_BUFFER1_SIZE(val) vBIT(val,16,16)
-#define SET_BUFFER2_SIZE(val) vBIT(val,32,16)
-#endif
-
#define MASK_VLAN_TAG vBIT(0xFFFF,48,16)
#define SET_VLAN_TAG(val) vBIT(val,48,16)
#define SET_NUM_TAG(val) vBIT(val,16,32)
-#ifndef CONFIG_2BUFF_MODE
-#define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & vBIT(0x3FFF,2,14)))
-#else
-#define RXD_GET_BUFFER0_SIZE(Control_2) (u8)((Control_2 & MASK_BUFFER0_SIZE) \
- >> 48)
-#define RXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER1_SIZE) \
- >> 32)
-#define RXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER2_SIZE) \
- >> 16)
+
+} RxD_t;
+/* Rx descriptor structure for 1 buffer mode */
+typedef struct _RxD1_t {
+ struct _RxD_t h;
+
+#define MASK_BUFFER0_SIZE_1 vBIT(0x3FFF,2,14)
+#define SET_BUFFER0_SIZE_1(val) vBIT(val,2,14)
+#define RXD_GET_BUFFER0_SIZE_1(_Control_2) \
+ (u16)((_Control_2 & MASK_BUFFER0_SIZE_1) >> 48)
+ u64 Buffer0_ptr;
+} RxD1_t;
+/* Rx descriptor structure for 3 or 2 buffer mode */
+
+typedef struct _RxD3_t {
+ struct _RxD_t h;
+
+#define MASK_BUFFER0_SIZE_3 vBIT(0xFF,2,14)
+#define MASK_BUFFER1_SIZE_3 vBIT(0xFFFF,16,16)
+#define MASK_BUFFER2_SIZE_3 vBIT(0xFFFF,32,16)
+#define SET_BUFFER0_SIZE_3(val) vBIT(val,8,8)
+#define SET_BUFFER1_SIZE_3(val) vBIT(val,16,16)
+#define SET_BUFFER2_SIZE_3(val) vBIT(val,32,16)
+#define RXD_GET_BUFFER0_SIZE_3(Control_2) \
+ (u8)((Control_2 & MASK_BUFFER0_SIZE_3) >> 48)
+#define RXD_GET_BUFFER1_SIZE_3(Control_2) \
+ (u16)((Control_2 & MASK_BUFFER1_SIZE_3) >> 32)
+#define RXD_GET_BUFFER2_SIZE_3(Control_2) \
+ (u16)((Control_2 & MASK_BUFFER2_SIZE_3) >> 16)
#define BUF0_LEN 40
#define BUF1_LEN 1
-#endif
u64 Buffer0_ptr;
-#ifdef CONFIG_2BUFF_MODE
u64 Buffer1_ptr;
u64 Buffer2_ptr;
-#endif
-} RxD_t;
+} RxD3_t;
+
/* Structure that represents the Rx descriptor block which contains
* 128 Rx descriptors.
*/
-#ifndef CONFIG_2BUFF_MODE
typedef struct _RxD_block {
-#define MAX_RXDS_PER_BLOCK 127
- RxD_t rxd[MAX_RXDS_PER_BLOCK];
+#define MAX_RXDS_PER_BLOCK_1 127
+ RxD1_t rxd[MAX_RXDS_PER_BLOCK_1];
u64 reserved_0;
#define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL
@@ -492,18 +497,13 @@ typedef struct _RxD_block {
* the upper 32 bits should
* be 0 */
} RxD_block_t;
-#else
-typedef struct _RxD_block {
-#define MAX_RXDS_PER_BLOCK 85
- RxD_t rxd[MAX_RXDS_PER_BLOCK];
-#define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL
- u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd
- * in this blk */
- u64 pNext_RxD_Blk_physical; /* Phy ponter to next blk. */
-} RxD_block_t;
#define SIZE_OF_BLOCK 4096
+#define RXD_MODE_1 0
+#define RXD_MODE_3A 1
+#define RXD_MODE_3B 2
+
/* Structure to hold virtual addresses of Buf0 and Buf1 in
* 2buf mode. */
typedef struct bufAdd {
@@ -512,7 +512,6 @@ typedef struct bufAdd {
void *ba_0;
void *ba_1;
} buffAdd_t;
-#endif
/* Structure which stores all the MAC control parameters */
@@ -539,10 +538,17 @@ typedef struct {
typedef tx_curr_get_info_t tx_curr_put_info_t;
+
+typedef struct rxd_info {
+ void *virt_addr;
+ dma_addr_t dma_addr;
+}rxd_info_t;
+
/* Structure that holds the Phy and virt addresses of the Blocks */
typedef struct rx_block_info {
- RxD_t *block_virt_addr;
+ void *block_virt_addr;
dma_addr_t block_dma_addr;
+ rxd_info_t *rxds;
} rx_block_info_t;
/* pre declaration of the nic structure */
@@ -578,10 +584,8 @@ typedef struct ring_info {
int put_pos;
#endif
-#ifdef CONFIG_2BUFF_MODE
/* Buffer Address store. */
buffAdd_t **ba;
-#endif
nic_t *nic;
} ring_info_t;
@@ -647,8 +651,6 @@ typedef struct {
/* Default Tunable parameters of the NIC. */
#define DEFAULT_FIFO_LEN 4096
-#define SMALL_RXD_CNT 30 * (MAX_RXDS_PER_BLOCK+1)
-#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1)
#define SMALL_BLK_CNT 30
#define LARGE_BLK_CNT 100
@@ -678,6 +680,7 @@ struct msix_info_st {
/* Structure representing one instance of the NIC */
struct s2io_nic {
+ int rxd_mode;
#ifdef CONFIG_S2IO_NAPI
/*
* Count of packets to be processed in a given iteration, it will be indicated
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 750c016..849ac88 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -2040,7 +2040,7 @@ static int mpi_send_packet (struct net_d
return 1;
}
-static void get_tx_error(struct airo_info *ai, u32 fid)
+static void get_tx_error(struct airo_info *ai, s32 fid)
{
u16 status;
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 72cb67b..92a9696 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -72,6 +72,9 @@ struct mii_bus {
/* list of all PHYs on bus */
struct phy_device *phy_map[PHY_MAX_ADDR];
+ /* Phy addresses to be ignored when probing */
+ u32 phy_mask;
+
/* Pointer to an array of interrupts, each PHY's
* interrupt at the index matching its address */
int *irq;
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [git patches] 2.6.x net driver updates
@ 2005-10-29 18:21 Jeff Garzik
0 siblings, 0 replies; 33+ messages in thread
From: Jeff Garzik @ 2005-10-29 18:21 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: netdev, linux-kernel
Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to receive the following random collection of updates and new drivers:
MAINTAINERS | 8
drivers/net/Kconfig | 77
drivers/net/Makefile | 3
drivers/net/acenic.c | 6
drivers/net/amd8111e.c | 0
drivers/net/amd8111e.h | 0
drivers/net/au1000_eth.c | 6
drivers/net/b44.c | 28
drivers/net/bmac.c | 6
drivers/net/bnx2.c | 12
drivers/net/e1000/e1000_ethtool.c | 7
drivers/net/e1000/e1000_main.c | 9
drivers/net/eepro.c | 7
drivers/net/fs_enet/Kconfig | 20
drivers/net/fs_enet/Makefile | 10
drivers/net/fs_enet/fs_enet-main.c | 1226 ++++++++++
drivers/net/fs_enet/fs_enet-mii.c | 507 ++++
drivers/net/fs_enet/fs_enet.h | 245 ++
drivers/net/fs_enet/mac-fcc.c | 578 ++++
drivers/net/fs_enet/mac-fec.c | 653 +++++
drivers/net/fs_enet/mac-scc.c | 524 ++++
drivers/net/fs_enet/mii-bitbang.c | 405 +++
drivers/net/fs_enet/mii-fixed.c | 92
drivers/net/hamradio/mkiss.c | 6
drivers/net/ibm_emac/Makefile | 13
drivers/net/ibm_emac/ibm_emac.h | 418 +--
drivers/net/ibm_emac/ibm_emac_core.c | 3414 +++++++++++++++--------------
drivers/net/ibm_emac/ibm_emac_core.h | 313 +-
drivers/net/ibm_emac/ibm_emac_debug.c | 377 +--
drivers/net/ibm_emac/ibm_emac_debug.h | 63
drivers/net/ibm_emac/ibm_emac_mal.c | 674 +++--
drivers/net/ibm_emac/ibm_emac_mal.h | 336 ++
drivers/net/ibm_emac/ibm_emac_phy.c | 335 +-
drivers/net/ibm_emac/ibm_emac_phy.h | 105
drivers/net/ibm_emac/ibm_emac_rgmii.c | 201 +
drivers/net/ibm_emac/ibm_emac_rgmii.h | 68
drivers/net/ibm_emac/ibm_emac_tah.c | 111
drivers/net/ibm_emac/ibm_emac_tah.h | 96
drivers/net/ibm_emac/ibm_emac_zmii.c | 255 ++
drivers/net/ibm_emac/ibm_emac_zmii.h | 114
drivers/net/ibmveth.c | 186 -
drivers/net/ibmveth.h | 23
drivers/net/irda/donauboe.c | 6
drivers/net/irda/irda-usb.c | 6
drivers/net/irda/irport.c | 3
drivers/net/irda/sir_dev.c | 3
drivers/net/irda/vlsi_ir.c | 3
drivers/net/mace.c | 6
drivers/net/ne2k-pci.c | 1
drivers/net/ni65.c | 9
drivers/net/pcmcia/pcnet_cs.c | 6
drivers/net/rrunner.c | 6
drivers/net/s2io.c | 13
drivers/net/saa9730.c | 8
drivers/net/sis190.c | 2
drivers/net/sis900.c | 16
drivers/net/smc91x.c | 4
drivers/net/starfire.c | 4
drivers/net/sundance.c | 62
drivers/net/tg3.c | 91
drivers/net/tg3.h | 12
drivers/net/tulip/de2104x.c | 6
drivers/net/tulip/tulip_core.c | 6
drivers/net/via-velocity.c | 6
drivers/net/wireless/airo.c | 48
drivers/net/wireless/airo_cs.c | 4
drivers/net/wireless/atmel.c | 6
drivers/net/wireless/atmel_cs.c | 3
drivers/net/wireless/hermes.c | 38
drivers/net/wireless/hermes.h | 2
drivers/net/wireless/hostap/hostap_ioctl.c | 9
drivers/net/wireless/ipw2200.c | 4
drivers/net/wireless/orinoco.c | 13
drivers/net/wireless/prism54/islpci_dev.c | 3
drivers/net/wireless/prism54/islpci_eth.c | 13
drivers/net/wireless/prism54/oid_mgt.c | 9
drivers/net/wireless/strip.c | 38
include/linux/fs_enet_pd.h | 136 +
include/linux/pci_ids.h | 2
include/net/ax25.h | 3
include/net/netrom.h | 3
81 files changed, 8958 insertions(+), 3192 deletions(-)
Akinobu Mita:
s2io: kconfig help fix
Al Viro:
s2io iomem annotations
Alan Cox:
Better fixup for the orinoco driver
Alexey Dobriyan:
starfire: free_irq() on error path of netdev_open()
Andrew Morton:
[netdrvr b44] include linux/dma-mapping.h to eliminate warning
revert "orinoco: Information leakage due to incorrect padding"
Ashutosh Naik:
e1000: Fixes e1000_suspend warning when CONFIG_PM is not enabled
Aurelien Jarno:
sis190.c: fix multicast MAC filter
Deepak Saxena:
Fix CS89x0 KConfig for IXDP2X01
Eugene Surovegin:
New PowerPC 4xx on-chip ethernet controller driver
Add MAINTAINER entry for the new PowerPC 4xx on-chip ethernet controller driver
Florin Malita:
eepro.c: module_param_array cleanup
Jeff Garzik:
[git] change permissions on drivers/net/amd8111e.[ch] to 0644,
Jesper Juhl:
drivers/net: Remove pointless checks for NULL prior to calling kfree()
Komuro:
pcnet_cs: fix mii init code for older DL10019 based cards
[netdrvr] ne2k-pci based card does not support bus-mastering.
Martin J. Bligh:
e1000: remove warning about e1000_suspend
Matthew Wilcox:
b44 reports wrong advertised flags
Michael Chan:
tg3: add 5714/5715 support
tg3: fix ASF heartbeat
tg3: update version and minor fixes
Nicolas Pitre:
smc91x: shut down power after probing
Panagiotis Issaris:
ipw2200: Missing kmalloc check
Pantelis Antoniou:
Add fs_enet ethernet network driver, for several embedded platforms.
Patrick McHardy:
prism54: Free skb after disabling interrupts
Pavel Machek:
b44: fix suspend/resume
Philippe De Muyter:
sundance: fix DFE-580TX Tx Underrun
Ravikiran G Thirumalai:
e1000: use vmalloc_node()
Roger While:
[wireless prism54] Fix frame length
Santiago Leon:
ibmveth fix bonding
ibmveth fix buffer pool management
ibmveth fix buffer replenishing
ibmveth lockless TX
ibmveth fix failed addbuf
Tobias Klauser:
drivers/net/tg3: Use the DMA_{32,64}BIT_MASK constants
Vasily Averin:
sis900: come alive after temporary memory shortage
^ permalink raw reply [flat|nested] 33+ messages in thread
* [git patches] 2.6.x net driver updates
@ 2005-10-28 0:42 Jeff Garzik
0 siblings, 0 replies; 33+ messages in thread
From: Jeff Garzik @ 2005-10-28 0:42 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: netdev, linux-kernel
Please pull from 'upstream' branch of
master.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
to receive the following misc. updates, many of them minor fixes, and a
ton of accumulated wireless updates.
drivers/net/gianfar_phy.c | 661 ------------
drivers/net/gianfar_phy.h | 213 ----
drivers/net/hamradio/mkiss.h | 62 -
Documentation/networking/bonding.txt | 5
drivers/net/8139cp.c | 5
drivers/net/8139too.c | 5
drivers/net/Kconfig | 23
drivers/net/Makefile | 4
drivers/net/au1000_eth.c | 13
drivers/net/b44.c | 136 ++
drivers/net/b44.h | 2
drivers/net/bonding/bond_main.c | 57 +
drivers/net/declance.c | 37
drivers/net/e100.c | 4
drivers/net/e1000/e1000.h | 74 +
drivers/net/e1000/e1000_ethtool.c | 95 +
drivers/net/e1000/e1000_hw.c | 220 +++-
drivers/net/e1000/e1000_hw.h | 96 +
drivers/net/e1000/e1000_main.c | 1082 +++++++++++++++-----
drivers/net/e1000/e1000_param.c | 10
drivers/net/epic100.c | 4
drivers/net/forcedeth.c | 310 +++--
drivers/net/gianfar.c | 412 +------
drivers/net/gianfar.h | 30
drivers/net/gianfar_ethtool.c | 100 +
drivers/net/gianfar_mii.c | 219 ++++
drivers/net/gianfar_mii.h | 45
drivers/net/hamradio/Kconfig | 1
drivers/net/hamradio/bpqether.c | 9
drivers/net/hamradio/mkiss.c | 182 ++-
drivers/net/hp100.c | 48
drivers/net/irda/stir4200.c | 7
drivers/net/ixgb/ixgb_ethtool.c | 8
drivers/net/ixgb/ixgb_main.c | 3
drivers/net/lne390.c | 2
drivers/net/mii.c | 15
drivers/net/mipsnet.c | 371 ++++++
drivers/net/mipsnet.h | 127 ++
drivers/net/ne.c | 15
drivers/net/ne2k-pci.c | 2
drivers/net/ns83820.c | 3
drivers/net/pcnet32.c | 278 ++++-
drivers/net/phy/Kconfig | 8
drivers/net/phy/phy.c | 8
drivers/net/phy/phy_device.c | 3
drivers/net/r8169.c | 2
drivers/net/rionet.c | 574 ++++++++++
drivers/net/s2io-regs.h | 11
drivers/net/s2io.c | 801 ++++++++++++---
drivers/net/s2io.h | 50
drivers/net/sb1250-mac.c | 1380 +++++++++++++-------------
drivers/net/sgiseeq.c | 37
drivers/net/skge.c | 2
drivers/net/sundance.c | 53
drivers/net/tokenring/ibmtr.c | 9
drivers/net/tokenring/olympic.c | 2
drivers/net/tokenring/tms380tr.c | 3
drivers/net/tulip/de2104x.c | 5
drivers/net/typhoon.c | 7
drivers/net/via-rhine.c | 38
drivers/net/wan/cosa.c | 6
drivers/net/wan/cycx_drv.c | 7
drivers/net/wan/cycx_main.c | 2
drivers/net/wan/cycx_x25.c | 5
drivers/net/wan/dscc4.c | 23
drivers/net/wan/farsync.c | 27
drivers/net/wan/hdlc_fr.c | 2
drivers/net/wan/lmc/lmc_debug.c | 10
drivers/net/wan/lmc/lmc_media.c | 8
drivers/net/wan/pc300.h | 16
drivers/net/wan/pc300_drv.c | 87 -
drivers/net/wan/pc300_tty.c | 18
drivers/net/wan/sdla.c | 20
drivers/net/wan/sdla_fr.c | 4
drivers/net/wan/sdla_x25.c | 8
drivers/net/wan/sdladrv.c | 16
drivers/net/wan/syncppp.c | 10
drivers/net/wireless/airo.c | 37
drivers/net/wireless/airport.c | 19
drivers/net/wireless/atmel.c | 24
drivers/net/wireless/hermes.c | 11
drivers/net/wireless/hermes.h | 111 +-
drivers/net/wireless/hostap/hostap.c | 6
drivers/net/wireless/hostap/hostap_80211_rx.c | 43
drivers/net/wireless/hostap/hostap_80211_tx.c | 28
drivers/net/wireless/hostap/hostap_ap.c | 80 -
drivers/net/wireless/hostap/hostap_ap.h | 6
drivers/net/wireless/hostap/hostap_cs.c | 50
drivers/net/wireless/hostap/hostap_hw.c | 22
drivers/net/wireless/hostap/hostap_ioctl.c | 23
drivers/net/wireless/hostap/hostap_pci.c | 21
drivers/net/wireless/hostap/hostap_plx.c | 11
drivers/net/wireless/hostap/hostap_wlan.h | 2
drivers/net/wireless/ipw2100.c | 24
drivers/net/wireless/ipw2100.h | 2
drivers/net/wireless/ipw2200.c | 27
drivers/net/wireless/ipw2200.h | 4
drivers/net/wireless/netwave_cs.c | 185 ---
drivers/net/wireless/orinoco.c | 235 +---
drivers/net/wireless/orinoco.h | 16
drivers/net/wireless/orinoco_cs.c | 110 +-
drivers/net/wireless/orinoco_nortel.c | 20
drivers/net/wireless/orinoco_pci.c | 18
drivers/net/wireless/orinoco_plx.c | 18
drivers/net/wireless/orinoco_tmd.c | 18
drivers/net/wireless/prism54/isl_ioctl.c | 10
drivers/net/wireless/prism54/islpci_dev.c | 10
drivers/net/wireless/prism54/islpci_dev.h | 2
drivers/net/wireless/prism54/islpci_mgt.c | 5
drivers/net/wireless/ray_cs.c | 46
drivers/net/wireless/spectrum_cs.c | 79 -
drivers/net/wireless/wavelan.c | 8
drivers/net/wireless/wavelan.p.h | 4
drivers/net/wireless/wavelan_cs.c | 8
drivers/net/wireless/wavelan_cs.p.h | 4
drivers/net/wireless/wl3501.h | 2
drivers/s390/net/qeth.h | 45
drivers/s390/net/qeth_fs.h | 12
drivers/s390/net/qeth_main.c | 419 +++++--
drivers/s390/net/qeth_mpc.c | 6
drivers/s390/net/qeth_mpc.h | 15
drivers/s390/net/qeth_sys.c | 28
include/asm-mips/sgi/hpc3.h | 40
include/linux/cyclomx.h | 2
include/linux/cycx_drv.h | 1
include/linux/ibmtr.h | 4
include/linux/if_arp.h | 1
include/linux/mii.h | 1
include/linux/netdevice.h | 6
include/linux/sdladrv.h | 4
include/linux/wanpipe.h | 9
include/net/ieee80211.h | 523 +++++++--
include/net/ieee80211_crypt.h | 38
include/net/ieee80211_radiotap.h | 231 ++++
include/net/syncppp.h | 1
net/ieee80211/Makefile | 3
net/ieee80211/ieee80211_crypt.c | 59 -
net/ieee80211/ieee80211_crypt_ccmp.c | 75 -
net/ieee80211/ieee80211_crypt_tkip.c | 150 +-
net/ieee80211/ieee80211_crypt_wep.c | 26
net/ieee80211/ieee80211_geo.c | 141 ++
net/ieee80211/ieee80211_module.c | 65 -
net/ieee80211/ieee80211_rx.c | 610 ++++++++---
net/ieee80211/ieee80211_tx.c | 321 ++++--
net/ieee80211/ieee80211_wx.c | 372 +++++--
145 files changed, 8163 insertions(+), 4651 deletions(-)
Adrian Bunk:
drivers/net/wan/: possible cleanups
Andrew Morton:
e1000_intr build fix
s2io build fix
e1000 build fix
Andy Fleming:
[netdrvr gianfar] use new phy layer
Ayaz Abdulla:
[netdrvr forcedeth] scatter gather and segmentation offload support
Dale Farnsworth:
mii: Add test for GigE support
Hong Liu:
Fixed problem with not being able to decrypt/encrypt broadcast packets.
Fixed oops if an uninitialized key is used for encryption.
Hubert WS Lin:
pcnet32: set_ringparam implementation
pcnet32: set min ring size to 4
Ivo van Doorn:
This will move the ieee80211_is_ofdm_rate function to the ieee80211.h
Currently the info_element is parsed by 2 seperate functions, this
When an assoc_resp is received the network structure is not completely
James Ketrenos:
Fixed some endian issues with 802.11 header usage in ieee80211_rx.c
ieee80211 quality scaling algorithm extension handler
ieee80211 Added wireless spy support
Changed 802.11 headers to use ieee80211_info_element[0]
ieee80211 Removed ieee80211_info_element_hdr
ieee80211 Cleanup memcpy parameters.
ieee80211 Switched to sscanf in store_debug_level
ieee80211 Fixed type-o of abg_ture -> abg_true
Updated ipw2200 to compile with ieee80211 abg_ture to abg_true change
ieee80211: Updated ipw2100 to be compatible with ieee80211_hdr changes
ieee80211: Updated ipw2100 to be compatible with ieee80211's hard_start_xmit change
ieee80211: Updated ipw2200 to be compatible with ieee80211_hdr changes
ieee80211: Updated ipw2200 to be compatible with ieee80211's hard_start_xmit change.
ieee80211: Updated atmel to be compatible with ieee80211_hdr changes
ieee80211: Fixed a kernel oops on module unload
ieee80211: Hardware crypto and fragmentation offload support
ieee80211: Fix time calculation, switching to use jiffies_to_msecs
ieee80211: Fix kernel Oops when module unload
ieee80211: Allow drivers to fix an issue when using wpa_supplicant with WEP
ieee82011: Added WE-18 support to default wireless extension handler
ieee80211: Renamed ieee80211_hdr to ieee80211_hdr_3addr
ieee80211: adds support for the creation of RTS packets
ieee82011: Added ieee80211_tx_frame to convert generic 802.11 data frames, and callbacks
ieee80211: Fix TKIP, repeated fragmentation problem, and payload_size reporting
ieee80211: Return NETDEV_TX_BUSY when QoS buffer full
ieee80211: Add QoS (WME) support to the ieee80211 subsystem
ieee80211: Added ieee80211_geo to provide helper functions
ieee80211: Added ieee80211_radiotap.h
ieee80211: Additional fixes for endian-aware types
ieee80211: "extern inline" to "static inline"
ieee80211: Type-o, capbility definition for QoS, and ERP parsing
ieee80211: Mixed PTK/GTK CCMP/TKIP support
ieee80211: Keep auth mode unchanged after iwconfig key off/on cycle
ieee80211: Updated copyright dates
ieee80211: Updated hostap to be compatible with ieee80211_hdr changes
ieee80211: Updated hostap to be compatible with extra_prefix_len changes
ieee82011: Remove WIRELESS_EXT ifdefs
ieee80211: Added subsystem version string and reporting via MODULE_VERSION
ieee80211: Added handle_deauth() callback, enhanced tkip/ccmp support of varying hw/sw offload
ieee80211: added IE comments, reason_code to reason, removed info_element from ieee80211_disassoc
ieee80211: in-tree driver updates to sync with latest ieee80211 series
ieee80211: update orinoco, wl3501 drivers for latest struct naming
Lindent and trailing whitespace script executed ieee80211 subsystem
Update version ieee80211 stamp to 1.1.6
ieee80211 build fix
Jean Tourrilhes:
hostap: Add support for WE-19
hostap: Use GFP_ATOMIC to get rid of weird might_sleep issue
hostap: Remove iwe_stream_add_event kludge
Jeff Garzik:
[netdrvr] delete CONFIG_PHYCONTROL
Remove WIRELESS_EXT ifdefs from several wireless drivers.
[wireless airo] remove needed dma_addr_t obfuscation
e1000: fix warnings
Jiri Benc:
ieee80211: division by zero fix
John Linville:
[netdrvr s2io] Add a MODULE_VERSION entry
John W. Linville:
8139cp: support ETHTOOL_GPERMADDR
8139too: support ETHTOOL_GPERMADDR
b44: support ETHTOOL_GPERMADDR
e1000: support ETHTOOL_GPERMADDR
e100: support ETHTOOL_GPERMADDR
forcedeth: support ETHTOOL_GPERMADDR
ixgb: support ETHTOOL_GPERMADDR
ne2k-pci: support ETHTOOL_GPERMADDR
pcnet32: support ETHTOOL_GPERMADDR
r8169: support ETHTOOL_GPERMADDR
skge: support ETHTOOL_GPERMADDR
sundance: support ETHTOOL_GPERMADDR
via-rhine: support ETHTOOL_GPERMADDR
s2io: change strncpy length arg to use size of target
bonding: replicate IGMP traffic in activebackup mode
via-rhine: change mdelay to msleep and remove from ISR path
epic100: fix counting of work_done in epic_poll
bonding: fix typos in bonding documentation
8139too: fix resume for Realtek 8100B/8139D
bonding: cleanup comment for mode 1 IGMP xmit hack
b44: alternate allocation option for DMA descriptors
orinoco: remove redundance skb length check before padding
sundance: remove if (1) { ... } block in sundance_probe1
sundance: expand reset mask
sundance: include MII address 0 in PHY probe
Jouni Malinen:
hostap: Remove hw specific dev_open/close handlers
hostap: Fix hostap_pci build with PRISM2_IO_DEBUG
hostap: Do not free local->hw_priv before unregistering netdev
hostap: Unregister netdevs before freeing local data
Mallikarjuna R Chilakala:
e1000: Support for 82571 and 82572 controllers
e1000: multi-queue defines/modification to data structures
e1000: implementation of the multi-queue feature
e1000: Enable custom configuration bits for 82571/2 controllers
e1000: Fixes for packet split related issues
e1000: Added msleep_interruptible delay
e1000: Flush shadow RAM
e1000: Driver version, white space, comments, device id & other
Manfred Spraul:
forcedeth: add hardware tx checksumming
Mateusz Berezecki:
[wireless ipw2200] remove redundant return statement
Matt Porter:
Add rapidio net driver
Michael Buesch:
ieee80211 subsystem:
Michael Wu:
This patch fixes a typo in ieee80211.h: ieee82011_deauth -> ieee80211_deauth
Michal Schmidt:
airo: fix resume
Nishanth Aravamudan:
drivers/net: fix-up schedule_timeout() usage
Pavel Roskin:
orinoco: WE-18 support
orinoco: Remove conditionals that are useless in the kernel drivers.
orinoco: Don't include <net/ieee80211.h> twice.
orinoco: Update PCMCIA ID's.
orinoco: Remove inneeded system includes.
orinoco: Make nortel_pci_hw_init() static.
orinoco: Fix memory leak and unneeded unlock in orinoco_join_ap()
orinoco: orinoco_send_wevents() could return without unlocking.
orinoco: Remove unneeded forward declarations.
orinoco: Annotate endianess of variables and structure members.
orinoco: Read only needed data in __orinoco_ev_txexc().
orinoco: Bump version to 0.15rc3.
hostap: Fix pci_driver name for hostap_plx and hostap_pci
Ralf Baechle:
AX.25: Delete debug printk from mkiss driver
AX.25: Convert mkiss.c to DEFINE_RWLOCK
rcu in bpqether driver.
SMACK support for mkiss
Initialize the .owner field the tty_ldisc structure.
sb1250-mac: Check the actual setting for reporting hw checksumming.
sb1250-mac: Ensure 16-byte alignment of the descriptor ring.
au1000_eth: Misc Au1000 net driver fixes.
de2104x: Resurrect Cobalt support for 2.6.
sgiseeq: Fix resource handling.
sgiseeq: Configure PIO and DMA timing requests.
declance: Convert to irqreturn_t.
declance: Fix mapping of device.
declance: Deal with the bloody KSEG vs CKSEG horror...
declance: Use physical addresses at the interface level.
ne: Support for RBHMA4500 eval board.
mipsnet: Virtual ethernet driver for MIPSsim.
Remove unused header.
sb1250-mac: Get rid of all the funny SBMAC_WRITECSR and SBMAC_READCSR macros.
sb1250-mac: Whitespace cleanup.
sb1250-mac: PHY probing fixes.
Randy Dunlap:
Fix implicit nocast warnings in ieee80211 code:
Ravinandan Arakali:
S2io: MSI/MSI-X support (runtime configurable)
ravinandan.arakali@neterion.com:
S2io: Offline diagnostics fixes
Tobias Klauser:
Replace drivers/net/wan custom ctype macros with standard ones
Ursula Braun:
s390: introducing support in qeth for new OSA CHPID type OSN
viro@ZenIV.linux.org.uk:
lne390 bogus casts
C99 initializers in ray_cs.c
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-06-18 20:04 ` Jeff Garzik
@ 2005-06-18 20:23 ` Linus Torvalds
0 siblings, 0 replies; 33+ messages in thread
From: Linus Torvalds @ 2005-06-18 20:23 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Netdev List, Linux Kernel
On Sat, 18 Jun 2005, Jeff Garzik wrote:
>
> I re-did the merge locally, as a test, finalizing with 'git commit'
> rather than 'git-commit-tree ...' and the parent info came out correct.
> FWIW.
Well, you can certainly do it by hand with git-commit-tree too, you just
need to make sure that you give all the relevant parents, ie something
like
git-commit-tree $(git-write-tree) -p HEAD -p MERGE_HEAD
will do the right thing too (and is what "git commit" ends up doing in the
end, of course).
In fact, the "git commit" script will _only_ handle the merge case of
having done a single "git pull", and if you do anything more complex that
has more than two parents, you'll have to go back to scripting the use of
git-commit-tree by hand.
I've considered trying to automate this a bit more: right now it really
does depend on people and scripts always getting the parents right, but at
least in theory I could embed the parent information in the "index" file
at least as an additional safety-measure.
However, I'm not entirely sure that is a good idea: the current approach
is _extremely_ flexible, exactly because it allows you to do anything you
want with parents. That flexibility can be nice, but it's obviously also
what makes it a bit dangerous.
So the git approach is "give them rope", with a few scripts that handle
the normal cases right. That's the unix way, after all..
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-06-18 18:48 ` Linus Torvalds
@ 2005-06-18 20:04 ` Jeff Garzik
2005-06-18 20:23 ` Linus Torvalds
0 siblings, 1 reply; 33+ messages in thread
From: Jeff Garzik @ 2005-06-18 20:04 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, Netdev List, Linux Kernel
Linus Torvalds wrote:
> Ok, I ended up re-doing the merge by hand (ie I fetched all the other
> parts, ignored your top entry, and just merged the previous one manually).
>
> I'm pushing out the result now, can you verify that the r8192.c file looks
> like you expected it to look? I think it should be the same thing you
> ended up with except for fixed parents, but...
Looks good here, thanks.
I re-did the merge locally, as a test, finalizing with 'git commit'
rather than 'git-commit-tree ...' and the parent info came out correct.
FWIW.
Jeff
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-06-18 18:36 ` Jeff Garzik
@ 2005-06-18 18:48 ` Linus Torvalds
2005-06-18 20:04 ` Jeff Garzik
0 siblings, 1 reply; 33+ messages in thread
From: Linus Torvalds @ 2005-06-18 18:48 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Netdev List, Linux Kernel
On Sat, 18 Jun 2005, Jeff Garzik wrote:
>
> Linus Torvalds wrote:
> > I'm hoping my earlier pulls on your trees haven't resulted in these kinds
> > of history losses before, and that this was the first time you did a merge
> > and didn't specify the parents properly. Pls confirm..
>
> You're being overly paranoid :)
>
> This netdev-2.6.git episode was the first time I ever tried to use the
> conflict merging. I didn't know git had improved to the point where
> "git commit" without any arguments would actually get things right.
>
> All the other merges used the vanilla git-pull-script with no
> modifications. Presumably it does the right thing :)
Yes.
Ok, I ended up re-doing the merge by hand (ie I fetched all the other
parts, ignored your top entry, and just merged the previous one manually).
I'm pushing out the result now, can you verify that the r8192.c file looks
like you expected it to look? I think it should be the same thing you
ended up with except for fixed parents, but...
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-06-18 18:24 ` Linus Torvalds
@ 2005-06-18 18:36 ` Jeff Garzik
2005-06-18 18:48 ` Linus Torvalds
0 siblings, 1 reply; 33+ messages in thread
From: Jeff Garzik @ 2005-06-18 18:36 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, Netdev List, Linux Kernel
Linus Torvalds wrote:
> I'm hoping my earlier pulls on your trees haven't resulted in these kinds
> of history losses before, and that this was the first time you did a merge
> and didn't specify the parents properly. Pls confirm..
You're being overly paranoid :)
This netdev-2.6.git episode was the first time I ever tried to use the
conflict merging. I didn't know git had improved to the point where
"git commit" without any arguments would actually get things right.
All the other merges used the vanilla git-pull-script with no
modifications. Presumably it does the right thing :)
Jeff
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-06-18 18:06 ` Linus Torvalds
@ 2005-06-18 18:24 ` Linus Torvalds
2005-06-18 18:36 ` Jeff Garzik
0 siblings, 1 reply; 33+ messages in thread
From: Linus Torvalds @ 2005-06-18 18:24 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Netdev List, Linux Kernel
On Sat, 18 Jun 2005, Linus Torvalds wrote:
>
> Your parent information was crap, meaning that when I pulled, I had to
> re-merge. In fact, I'm going to undo this pull entirely, because of this -
> it's simply _wrong_. You claim to have done a merge and indeed your "data"
> is merged, but your history is totally buggered because you didn't do the
> proper parents.
Btw, this is serious. If you don't do proper parenting, you may have the
right _data_ in the tree, but because you lost sight of where that data
came from, all the commits leading up to that data (from the branch that
wasn't properly marked as a parent) are worthless and no longer reachable.
In other words, it means that all the history leading up to the merge was
just lost, and you end up with just a magic "all these changes suddenly
appeared" patch that claims to be a merge, but is really just a big patch.
It also means that "git prune" will just delete the unreachable commits,
since they are clearly not connected to anything any more. Also, any
intermediate file contents (that were only reachable through those
commits) are also unreachable and thus pruned. You literally end up with a
situation where the "merge" is 100% equivalent to just taking the final
patch, and applying it on top of the other head.
This may be the reason why you've had problems with "git prune". Your
tree histories may be buggered, and you've lost the merges with me.
Quite frankly, I'd never have noticed, except:
- because the history was buggered, the automated merge didn't find the
proper nearest parent, and thus it ended up finding a parent much
further back in history, which in turn meant that a trivial merge
wasn't trivial any more, and I got a merge conflict on the
drivers/net/r8169.c file.
- actually looking at the history (with gitk, or by looking at how many
parents the commits have with "git log --pretty=raw") made it obvious
that your "merge" had only one parent.
This, btw, is one reason why I suggest against multiple branches, and run
git-fsck-cache --unreachable religiously. A bad merge with lost parents
normally causes unreachable commits, and that's a sure sign of trouble.
However, in your usage schenario, those commits are reachable in the
branch they originated in, and you mix it all up, so you'll never see the
warning signs.
I'm hoping my earlier pulls on your trees haven't resulted in these kinds
of history losses before, and that this was the first time you did a merge
and didn't specify the parents properly. Pls confirm..
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-06-18 17:51 ` Linus Torvalds
@ 2005-06-18 18:06 ` Linus Torvalds
2005-06-18 18:24 ` Linus Torvalds
0 siblings, 1 reply; 33+ messages in thread
From: Linus Torvalds @ 2005-06-18 18:06 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Netdev List, Linux Kernel
On Sat, 18 Jun 2005, Linus Torvalds wrote:
> On Sat, 18 Jun 2005, Jeff Garzik wrote:
> >
> > GIT NOTE 1: The top-of-tree cset is the result of my use of the new git
> > conflict merging code. It seemed to work quite nicely. I did:
> >
> > git-pull-script $vanilla_linus_repo # conflicts appeared
> > vi drivers/net/r8169.c # fix conflict
> > git-update-cache drivers/net/r8169.c
> > git-commit-tree ...
>
> The last step can be just "git commit", and it will do the right thing
> these days (and with a nice big warnign that it looks like you're
> committing a merge).
In fact, your last commit was broken, exactly because you had _not_ done
this part right.
Your parent information was crap, meaning that when I pulled, I had to
re-merge. In fact, I'm going to undo this pull entirely, because of this -
it's simply _wrong_. You claim to have done a merge and indeed your "data"
is merged, but your history is totally buggered because you didn't do the
proper parents.
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
[not found] <42B456E2.8000500@pobox.com>
@ 2005-06-18 17:51 ` Linus Torvalds
2005-06-18 18:06 ` Linus Torvalds
0 siblings, 1 reply; 33+ messages in thread
From: Linus Torvalds @ 2005-06-18 17:51 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Netdev List, Linux Kernel
On Sat, 18 Jun 2005, Jeff Garzik wrote:
>
> GIT NOTE 1: The top-of-tree cset is the result of my use of the new git
> conflict merging code. It seemed to work quite nicely. I did:
>
> git-pull-script $vanilla_linus_repo # conflicts appeared
> vi drivers/net/r8169.c # fix conflict
> git-update-cache drivers/net/r8169.c
> git-commit-tree ...
The last step can be just "git commit", and it will do the right thing
these days (and with a nice big warnign that it looks like you're
committing a merge).
In fact, it's much preferable that you use "git commit", because it will
also then remove the old MERGE_HEAD if the commit was successful, leaving
the state proper (so that subsequent "git commit" things don't think it's
a merge). It also makes it less likely that you forget your parents.
Maybe.
> GIT NOTE 2: After doing a lot of simple+automatic merging, over time, I
> have a lot of .merge_* files. Would be nice is git-resolve-script, or
> whomever, would clean up after itself.
Yeah, something as simple as
rm -f .merge_file_*
in git-resolve-script should fix it..
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-05-24 7:29 ` Jeff Garzik
2005-05-24 7:46 ` Linus Torvalds
@ 2005-05-24 7:55 ` David Lang
1 sibling, 0 replies; 33+ messages in thread
From: David Lang @ 2005-05-24 7:55 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Linus Torvalds, Andrew Morton, Netdev, Linux Kernel
On Tue, 24 May 2005, Jeff Garzik wrote:
> Linus Torvalds wrote:
>>
>> On Tue, 24 May 2005, Jeff Garzik wrote:
>>
>>> You are getting precisely the same thing you got under BitKeeper: pull
>>> from X, you get my tree, which was composed from $N repositories. The
>>> tree you pull was created by my running 'bk pull' locally $N times.
>>
>>
>> No. Under BK, you had DIFFERENT TREES.
>>
>> What does that mean? They had DIFFERENT NAMES.
>>
>> Which meant that the commit message was MEANINGFUL.
>
> Ok, I'll fix the commit message.
>
> As for different trees, I'm afraid you've written something that is _too
> useful_ to be used in that manner.
>
> Git has brought with it a _major_ increase in my productivity because I can
> now easily share ~50 branches with 50 different kernel hackers, without
> spending all day running rsync. Suddenly my kernel development is a whole
> lot more _open_ to the world, with a single "./push". And it's awesome.
>
> That wasn't possible before with BitKeeper, just due to sheer network
> overhead of 50 trees. With BitKeeper, the _only_ thing that kernel hackers
> and users could get from me is a mush tree with everything merged into a big
> 'ALL' repository.
couldn't you just have your multiple 'trees' use the same object
repository directory (still a single group of files to push), but still
have your trees with different names? it would be just a little more then
the copy of the HEAD object (you'd have to change the name in it), but it
should be easily scriptable)
or is there a limit in git that I'm overlooking that would prohibit this?
David Lang
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-05-24 7:29 ` Jeff Garzik
@ 2005-05-24 7:46 ` Linus Torvalds
2005-05-24 7:55 ` David Lang
1 sibling, 0 replies; 33+ messages in thread
From: Linus Torvalds @ 2005-05-24 7:46 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Netdev, Linux Kernel
On Tue, 24 May 2005, Jeff Garzik wrote:
>
> Ok, I'll fix the commit message.
>
> As for different trees, I'm afraid you've written something that is _too
> useful_ to be used in that manner.
I really think you'll eventually confuse yourself terminally, but as long
as the commit messages end up being meaningful, your "mush everything
together" clearly is the thing that is going to perform best.
> Git has brought with it a _major_ increase in my productivity because I
> can now easily share ~50 branches with 50 different kernel hackers,
> without spending all day running rsync.
Hey, I'm happy it works for you, but are you sure those 50 other kernel
hackers aren't confused?
IOW, your work model is pretty extreme, and I'm much more worried about
mixing up trees by mistake than about the technical side of git per se.
That's also why I think it's important that the commit logs are
meaningful: they do end up containing the SHA1 key, so clearly "all the
information" is there, but if something gets mixed up, I'd like some human
to be able to eventualyl say "Aaahhh.. _that's_ where it got mixed up".
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-05-24 6:48 ` Linus Torvalds
@ 2005-05-24 7:29 ` Jeff Garzik
2005-05-24 7:46 ` Linus Torvalds
2005-05-24 7:55 ` David Lang
0 siblings, 2 replies; 33+ messages in thread
From: Jeff Garzik @ 2005-05-24 7:29 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, Netdev, Linux Kernel
Linus Torvalds wrote:
>
> On Tue, 24 May 2005, Jeff Garzik wrote:
>
>>You are getting precisely the same thing you got under BitKeeper: pull
>>from X, you get my tree, which was composed from $N repositories. The
>>tree you pull was created by my running 'bk pull' locally $N times.
>
>
> No. Under BK, you had DIFFERENT TREES.
>
> What does that mean? They had DIFFERENT NAMES.
>
> Which meant that the commit message was MEANINGFUL.
Ok, I'll fix the commit message.
As for different trees, I'm afraid you've written something that is _too
useful_ to be used in that manner.
Git has brought with it a _major_ increase in my productivity because I
can now easily share ~50 branches with 50 different kernel hackers,
without spending all day running rsync. Suddenly my kernel development
is a whole lot more _open_ to the world, with a single "./push". And
it's awesome.
That wasn't possible before with BitKeeper, just due to sheer network
overhead of 50 trees. With BitKeeper, the _only_ thing that kernel
hackers and users could get from me is a mush tree with everything
merged into a big 'ALL' repository.
So I'll continue to be the oddball, because more people can work in
parallel with me that way. I'll just have to make sure the commit
messages look right to you.
Jeff
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-05-24 6:34 ` Jeff Garzik
@ 2005-05-24 6:50 ` Linus Torvalds
0 siblings, 0 replies; 33+ messages in thread
From: Linus Torvalds @ 2005-05-24 6:50 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Netdev, Linux Kernel
On Tue, 24 May 2005, Jeff Garzik wrote:
>
> You really can't beat
>
> cp .git/refs/heads/master .git/refs/heads/new-branch
>
> as the fastest way to create a new branch off the tip.
So? It's the fastest, but it's also BROKEN. Exactly because the way you do
things, the merge messages are meaningless.
So fix your merge messages.
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-05-24 6:25 ` Jeff Garzik
@ 2005-05-24 6:48 ` Linus Torvalds
2005-05-24 7:29 ` Jeff Garzik
0 siblings, 1 reply; 33+ messages in thread
From: Linus Torvalds @ 2005-05-24 6:48 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Netdev, Linux Kernel
On Tue, 24 May 2005, Jeff Garzik wrote:
>
> You are getting precisely the same thing you got under BitKeeper: pull
> from X, you get my tree, which was composed from $N repositories. The
> tree you pull was created by my running 'bk pull' locally $N times.
No. Under BK, you had DIFFERENT TREES.
What does that mean? They had DIFFERENT NAMES.
Which meant that the commit message was MEANINGFUL.
> Ultimately, you appear to be complaining about:
>
> * your own git-pull-script, which doesn't record the $2 (branch)
> argument in the commit message.
Yes, because _my_ pull script is meant to work with the way _I_ have told
people (including you) they should work.
The fact that you mush everything up in one tree _despite_ me having told
you that isn't a good thing to do is the problem.
Git can technically do it, but then you shouldn't use my scripts, which
aren't written for that behaviour.
> Hey, I didn't write git-pull-script, I just use it :)
You don't use it, you MIS-use it. Which is what I'm complaining about.
> Switching heads around? It sounds like you did not pull from the branch
> I mentioned.
No, I pulled exactly from the head you mentioned.
In fact, go look at YOUR OWN changelog. And then compare that changelog to
the changelog you had when you used BK, and realize that IT IS NOT AT ALL
EQUIVALENT. You used to have valid changelogs, even for the merge heads.
You don't any more:
Automatic merge of /spare/repo/netdev-2.6/.git
Automatic merge of /spare/repo/netdev-2.6/.git
Automatic merge of /spare/repo/netdev-2.6/.git
Automatic merge of /spare/repo/netdev-2.6/.git
Merge of /spare/repo/netdev-2.6/.git
See a pattern?
Your BK usage was equivalent to having multiple GIT repositories.
Linus
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-05-24 6:08 ` Linus Torvalds
2005-05-24 6:25 ` Jeff Garzik
@ 2005-05-24 6:34 ` Jeff Garzik
2005-05-24 6:50 ` Linus Torvalds
1 sibling, 1 reply; 33+ messages in thread
From: Jeff Garzik @ 2005-05-24 6:34 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, Netdev, Linux Kernel
Linus Torvalds wrote:
> I don't understand why you don't use different trees, like you did with
> BK. You can share the object directory with the different trees, but the
You really can't beat
cp .git/refs/heads/master .git/refs/heads/new-branch
as the fastest way to create a new branch off the tip.
Jeff
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
2005-05-24 6:08 ` Linus Torvalds
@ 2005-05-24 6:25 ` Jeff Garzik
2005-05-24 6:48 ` Linus Torvalds
2005-05-24 6:34 ` Jeff Garzik
1 sibling, 1 reply; 33+ messages in thread
From: Jeff Garzik @ 2005-05-24 6:25 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, Netdev, Linux Kernel
Linus Torvalds wrote:
>
> On Tue, 24 May 2005, Jeff Garzik wrote:
>
>
>>Please pull the 'for-linus' branch from
>>
>>rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
>
>
> Is this really what you meant to do? There's seven merges there, none of
> which have _any_ information about _what_ you merged, because you've mixed
> everything up in one tree, so that there's absolutely no record of the
> fact that you actually had seven different repositories that you pulled..
>
> That sucks, Jeff.
>
> I don't understand why you don't use different trees, like you did with
> BK. You can share the object directory with the different trees, but the
> way you work now, it all looks like mush.
>
> Even if you don't get confused youself, you sure are confusing everybody
> else with it..
You are getting precisely the same thing you got under BitKeeper: pull
from X, you get my tree, which was composed from $N repositories. The
tree you pull was created by my running 'bk pull' locally $N times.
Ultimately, you appear to be complaining about:
* your own git-pull-script, which doesn't record the $2 (branch)
argument in the commit message.
* the fact that my changelog includes the merge csets that were
present-but-invisible by my BitKeeper submissions. i.e. I lack a
shortlog that filters out merge csets.
> Anyway, if you really want to work this way, with one big mushed-together
> thing that has different heads that you keep track of, can you _please_ at
> least make the commit message tell what you're doing. It's not a complex
Hey, I didn't write git-pull-script, I just use it :)
> script, and you're definitely mis-using it as things stand now by
> switching heads around inside one repository, and not telling other people
> about it.
Switching heads around? It sounds like you did not pull from the branch
I mentioned. This is how git-pull-script pulls from a branch:
git-pull-script \
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git\
refs/heads/for-linus
Jeff
^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: [git patches] 2.6.x net driver updates
[not found] <4292BA66.8070806@pobox.com>
@ 2005-05-24 6:08 ` Linus Torvalds
2005-05-24 6:25 ` Jeff Garzik
2005-05-24 6:34 ` Jeff Garzik
0 siblings, 2 replies; 33+ messages in thread
From: Linus Torvalds @ 2005-05-24 6:08 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Netdev, Linux Kernel
On Tue, 24 May 2005, Jeff Garzik wrote:
> Please pull the 'for-linus' branch from
>
> rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
Is this really what you meant to do? There's seven merges there, none of
which have _any_ information about _what_ you merged, because you've mixed
everything up in one tree, so that there's absolutely no record of the
fact that you actually had seven different repositories that you pulled..
That sucks, Jeff.
I don't understand why you don't use different trees, like you did with
BK. You can share the object directory with the different trees, but the
way you work now, it all looks like mush.
Even if you don't get confused youself, you sure are confusing everybody
else with it..
Anyway, if you really want to work this way, with one big mushed-together
thing that has different heads that you keep track of, can you _please_ at
least make the commit message tell what you're doing. It's not a complex
script, and you're definitely mis-using it as things stand now by
switching heads around inside one repository, and not telling other people
about it.
--- side note ---
Also, the way you work, I think you actually may want to do a multi-parent
merge. That is, you may want to merge multiple parents in _one_ commit,
rather than having seven commits for it.
The way to do that is to just do "git-read-tree -m" (and the subsequent
merge) several times. You do not have to commit in between each step, you
just need to remember the parents, and then you do the final commit with
git-commit-tree $result_tree -p $head -p $p1 -p $p2 -p $p3 ...
ie you build up a commit command line that grows one more "-p xxxx" for
each parent you have merged. That requires a bit more work, but as it is,
your merges just look like crap.
--- end side note ----
Please?
Linus
----
commit fd3fac6ffe20bc6ca75b3ad38be0a8be6666b5d3
tree 49b4cfa6c95094612438b1ddeb0c9511a19125fe
parent c97f5a778ed33aef8f62496d7b82ba3cb896a587
parent b3dd65f958354226275522b5a64157834bdc5415
author <jgarzik@pretzel.yyz.us> Tue, 24 May 2005 00:47:58 -0400
committer Jeff Garzik <jgarzik@pobox.com> Tue, 24 May 2005 00:47:58 -0400
Automatic merge of /spare/repo/netdev-2.6/.git
commit c97f5a778ed33aef8f62496d7b82ba3cb896a587
tree c72dbed812b0ffa83700a1896895714248407daf
parent 09fc75b6757852798969e7585456499784a982e1
parent 1bcd315362e215a72b56d1330bbf32f1c74eefb5
author <jgarzik@pretzel.yyz.us> Tue, 24 May 2005 00:47:43 -0400
committer Jeff Garzik <jgarzik@pobox.com> Tue, 24 May 2005 00:47:43 -0400
Automatic merge of /spare/repo/netdev-2.6/.git
commit 09fc75b6757852798969e7585456499784a982e1
tree 60a2d2893cb757307edf0a0c450689610644cac2
parent b5545f2a2d915f5b6d86fb57e6ccc96b3010259e
parent ac79c82e793bc2440c4765e5eb1b834d2c18edf2
author <jgarzik@pretzel.yyz.us> Tue, 24 May 2005 00:47:28 -0400
committer Jeff Garzik <jgarzik@pobox.com> Tue, 24 May 2005 00:47:28 -0400
Automatic merge of /spare/repo/netdev-2.6/.git
commit b5545f2a2d915f5b6d86fb57e6ccc96b3010259e
tree 0ece2dd139d1fa4a6b0c5f61fc2be75692d0ea47
parent f180e742711ce512e62161436d166eb4df92b34d
parent 2648345fcbadfae8e7113112ff9402e465a184dc
author <jgarzik@pretzel.yyz.us> Tue, 24 May 2005 00:47:20 -0400
committer Jeff Garzik <jgarzik@pobox.com> Tue, 24 May 2005 00:47:20 -0400
Automatic merge of /spare/repo/netdev-2.6/.git
commit f180e742711ce512e62161436d166eb4df92b34d
tree 21fcfc0ca4a47776bc1182898d9b394529aa1daf
parent 7b5c2db59567052805771e1de2ad4e089b88c847
parent 042e2fb70006f135469d546726451b7d14768980
author <jgarzik@pretzel.yyz.us> Tue, 24 May 2005 00:47:12 -0400
committer Jeff Garzik <jgarzik@pobox.com> Tue, 24 May 2005 00:47:12 -0400
Automatic merge of /spare/repo/netdev-2.6/.git
commit 7b5c2db59567052805771e1de2ad4e089b88c847
tree d18dc44dcfd34a99ac11a83e6d324730784b7d81
parent 02dd6b49b3f75dacfa7eddf7f2faa8b810906e47
parent 9092f46b5aed4515d9a427d5dab3be1584851f07
author <jgarzik@pretzel.yyz.us> Tue, 24 May 2005 00:45:05 -0400
committer Jeff Garzik <jgarzik@pobox.com> Tue, 24 May 2005 00:45:05 -0400
Merge of /spare/repo/netdev-2.6/.git
commit 02dd6b49b3f75dacfa7eddf7f2faa8b810906e47
tree 240cfa2396a6ed006ee28f3848b4cceebfc35b11
parent 187a1a94d629621d1471b42308e63573b1150773
parent dfa1b73ffb414b64dc0452260132a090eb25bf52
author <jgarzik@pretzel.yyz.us> Tue, 24 May 2005 00:44:49 -0400
committer Jeff Garzik <jgarzik@pobox.com> Tue, 24 May 2005 00:44:49 -0400
Automatic merge of /spare/repo/netdev-2.6/.git
^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2006-01-14 5:05 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-09 17:10 [git patches] 2.6.x net driver updates Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2006-01-12 22:13 Jeff Garzik
2006-01-12 22:30 ` Linus Torvalds
2006-01-12 22:39 ` Andrew Morton
2006-01-12 22:46 ` Linus Torvalds
2006-01-13 17:56 ` Roman Zippel
2006-01-13 19:23 ` Jens Axboe
2006-01-13 19:28 ` Sam Ravnborg
2006-01-13 19:36 ` Jens Axboe
2006-01-14 2:29 ` Adrian Bunk
2006-01-14 5:05 ` Randy.Dunlap
2006-01-12 22:42 ` Jeff Garzik
2006-01-12 23:14 ` Adrian Bunk
2006-01-03 16:41 Jeff Garzik
2005-11-09 6:53 Jeff Garzik
2005-11-05 19:58 Jeff Garzik
2005-10-29 18:21 Jeff Garzik
2005-10-28 0:42 Jeff Garzik
[not found] <42B456E2.8000500@pobox.com>
2005-06-18 17:51 ` Linus Torvalds
2005-06-18 18:06 ` Linus Torvalds
2005-06-18 18:24 ` Linus Torvalds
2005-06-18 18:36 ` Jeff Garzik
2005-06-18 18:48 ` Linus Torvalds
2005-06-18 20:04 ` Jeff Garzik
2005-06-18 20:23 ` Linus Torvalds
[not found] <4292BA66.8070806@pobox.com>
2005-05-24 6:08 ` Linus Torvalds
2005-05-24 6:25 ` Jeff Garzik
2005-05-24 6:48 ` Linus Torvalds
2005-05-24 7:29 ` Jeff Garzik
2005-05-24 7:46 ` Linus Torvalds
2005-05-24 7:55 ` David Lang
2005-05-24 6:34 ` Jeff Garzik
2005-05-24 6:50 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).