Skip to content

Commit

Permalink
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/jgarzik/netdev-2.6
  • Loading branch information
Linus Torvalds committed Jan 31, 2006
2 parents 70b4d63 + c6f0d75 commit 0827f2b
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 109 deletions.
4 changes: 2 additions & 2 deletions arch/ppc/syslib/mv64x60.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static struct platform_device mpsc1_device = {
};
#endif

#ifdef CONFIG_MV643XX_ETH
#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
static struct resource mv64x60_eth_shared_resources[] = {
[0] = {
.name = "ethernet shared base",
Expand Down Expand Up @@ -456,7 +456,7 @@ static struct platform_device *mv64x60_pd_devs[] __initdata = {
&mpsc0_device,
&mpsc1_device,
#endif
#ifdef CONFIG_MV643XX_ETH
#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
&mv64x60_eth_shared_device,
#endif
#ifdef CONFIG_MV643XX_ETH_0
Expand Down
28 changes: 25 additions & 3 deletions drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2034,13 +2034,28 @@ config SKGE
It does not support the link failover and network management
features that "portable" vendor supplied sk98lin driver does.

This driver supports adapters based on the original Yukon chipset:
Marvell 88E8001, Belkin F5D5005, CNet GigaCard, DLink DGE-530T,
Linksys EG1032/EG1064, 3Com 3C940/3C940B, SysKonnect SK-9871/9872.

It does not support the newer Yukon2 chipset: a separate driver,
sky2, is provided for Yukon2-based adapters.

To compile this driver as a module, choose M here: the module
will be called skge. This is recommended.

config SKY2
tristate "SysKonnect Yukon2 support (EXPERIMENTAL)"
depends on PCI && EXPERIMENTAL
select CRC32
---help---
This driver support the Marvell Yukon 2 Gigabit Ethernet adapter.
This driver supports Gigabit Ethernet adapters based on the the
Marvell Yukon 2 chipset:
Marvell 88E8021/88E8022/88E8035/88E8036/88E8038/88E8050/88E8052/
88E8053/88E8055/88E8061/88E8062, SysKonnect SK-9E21D/SK-9S21

This driver does not support the original Yukon chipset: a seperate
driver, skge, is provided for Yukon-based adapters.

To compile this driver as a module, choose M here: the module
will be called sky2. This is recommended.
Expand All @@ -2050,8 +2065,15 @@ config SK98LIN
depends on PCI
---help---
Say Y here if you have a Marvell Yukon or SysKonnect SK-98xx/SK-95xx
compliant Gigabit Ethernet Adapter. The following adapters are supported
by this driver:
compliant Gigabit Ethernet Adapter.

This driver supports the original Yukon chipset. A cleaner driver is
also available (skge) which seems to work better than this one.

This driver does not support the newer Yukon2 chipset. A seperate
driver, sky2, is provided to support Yukon2-based adapters.

The following adapters are supported by this driver:
- 3Com 3C940 Gigabit LOM Ethernet Adapter
- 3Com 3C941 Gigabit LOM Ethernet Adapter
- Allied Telesyn AT-2970LX Gigabit Ethernet Adapter
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/acenic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,8 @@ static int __devinit ace_init(struct net_device *dev)

mac1 = 0;
for(i = 0; i < 4; i++) {
int tmp;

mac1 = mac1 << 8;
tmp = read_eeprom_byte(dev, 0x8c+i);
if (tmp < 0) {
Expand All @@ -1012,6 +1014,8 @@ static int __devinit ace_init(struct net_device *dev)
}
mac2 = 0;
for(i = 4; i < 8; i++) {
int tmp;

mac2 = mac2 << 8;
tmp = read_eeprom_byte(dev, 0x8c+i);
if (tmp < 0) {
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,6 @@ static int b44_open(struct net_device *dev)
b44_init_rings(bp);
b44_init_hw(bp);

netif_carrier_off(dev);
b44_check_phy(bp);

err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev);
Expand Down Expand Up @@ -1464,7 +1463,7 @@ static int b44_close(struct net_device *dev)
#endif
b44_halt(bp);
b44_free_rings(bp);
netif_carrier_off(bp->dev);
netif_carrier_off(dev);

spin_unlock_irq(&bp->lock);

Expand Down Expand Up @@ -2000,6 +1999,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
dev->irq = pdev->irq;
SET_ETHTOOL_OPS(dev, &b44_ethtool_ops);

netif_carrier_off(dev);

err = b44_get_invariants(bp);
if (err) {
printk(KERN_ERR PFX "Problem fetching invariants of chip, "
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ static int bond_update_speed_duplex(struct slave *slave)
slave->duplex = DUPLEX_FULL;

if (slave_dev->ethtool_ops) {
u32 res;
int res;

if (!slave_dev->ethtool_ops->get_settings) {
return -1;
Expand Down
108 changes: 47 additions & 61 deletions drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ static int mv643xx_eth_receive_queue(struct net_device *dev)
netif_rx(skb);
#endif
}
dev->last_rx = jiffies;
}

return received_packets;
Expand All @@ -461,7 +462,7 @@ static int mv643xx_eth_receive_queue(struct net_device *dev)
*/

static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id,
struct pt_regs *regs)
struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
struct mv643xx_private *mp = netdev_priv(dev);
Expand Down Expand Up @@ -1047,16 +1048,15 @@ static int mv643xx_poll(struct net_device *dev, int *budget)

static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb)
{
unsigned int frag;
skb_frag_t *fragp;
unsigned int frag;
skb_frag_t *fragp;

for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
fragp = &skb_shinfo(skb)->frags[frag];
if (fragp->size <= 8 && fragp->page_offset & 0x7)
return 1;

}
return 0;
for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
fragp = &skb_shinfo(skb)->frags[frag];
if (fragp->size <= 8 && fragp->page_offset & 0x7)
return 1;
}
return 0;
}


Expand Down Expand Up @@ -2137,26 +2137,26 @@ static void eth_port_set_multicast_list(struct net_device *dev)
*/
if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI)) {
for (table_index = 0; table_index <= 0xFC; table_index += 4) {
/* Set all entries in DA filter special multicast
* table (Ex_dFSMT)
* Set for ETH_Q0 for now
* Bits
* 0 Accept=1, Drop=0
* 3-1 Queue ETH_Q0=0
* 7-4 Reserved = 0;
*/
mv_write(MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);

/* Set all entries in DA filter other multicast
* table (Ex_dFOMT)
* Set for ETH_Q0 for now
* Bits
* 0 Accept=1, Drop=0
* 3-1 Queue ETH_Q0=0
* 7-4 Reserved = 0;
*/
mv_write(MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
}
/* Set all entries in DA filter special multicast
* table (Ex_dFSMT)
* Set for ETH_Q0 for now
* Bits
* 0 Accept=1, Drop=0
* 3-1 Queue ETH_Q0=0
* 7-4 Reserved = 0;
*/
mv_write(MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);

/* Set all entries in DA filter other multicast
* table (Ex_dFOMT)
* Set for ETH_Q0 for now
* Bits
* 0 Accept=1, Drop=0
* 3-1 Queue ETH_Q0=0
* 7-4 Reserved = 0;
*/
mv_write(MV643XX_ETH_DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
}
return;
}

Expand Down Expand Up @@ -2617,7 +2617,6 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
struct eth_tx_desc *current_descriptor;
struct eth_tx_desc *first_descriptor;
u32 command;
unsigned long flags;

/* Do not process Tx ring in case of Tx ring resource error */
if (mp->tx_resource_err)
Expand All @@ -2634,8 +2633,6 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
return ETH_ERROR;
}

spin_lock_irqsave(&mp->lock, flags);

mp->tx_ring_skbs++;
BUG_ON(mp->tx_ring_skbs > mp->tx_ring_size);

Expand Down Expand Up @@ -2685,15 +2682,11 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
mp->tx_resource_err = 1;
mp->tx_curr_desc_q = tx_first_desc;

spin_unlock_irqrestore(&mp->lock, flags);

return ETH_QUEUE_LAST_RESOURCE;
}

mp->tx_curr_desc_q = tx_next_desc;

spin_unlock_irqrestore(&mp->lock, flags);

return ETH_OK;
}
#else
Expand All @@ -2704,14 +2697,11 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
int tx_desc_used;
struct eth_tx_desc *current_descriptor;
unsigned int command_status;
unsigned long flags;

/* Do not process Tx ring in case of Tx ring resource error */
if (mp->tx_resource_err)
return ETH_QUEUE_FULL;

spin_lock_irqsave(&mp->lock, flags);

mp->tx_ring_skbs++;
BUG_ON(mp->tx_ring_skbs > mp->tx_ring_size);

Expand Down Expand Up @@ -2742,12 +2732,9 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
/* Check for ring index overlap in the Tx desc ring */
if (tx_desc_curr == tx_desc_used) {
mp->tx_resource_err = 1;

spin_unlock_irqrestore(&mp->lock, flags);
return ETH_QUEUE_LAST_RESOURCE;
}

spin_unlock_irqrestore(&mp->lock, flags);
return ETH_OK;
}
#endif
Expand Down Expand Up @@ -2898,8 +2885,10 @@ static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,
p_pkt_info->return_info = mp->rx_skb[rx_curr_desc];
p_pkt_info->l4i_chk = p_rx_desc->buf_size;

/* Clean the return info field to indicate that the packet has been */
/* moved to the upper layers */
/*
* Clean the return info field to indicate that the
* packet has been moved to the upper layers
*/
mp->rx_skb[rx_curr_desc] = NULL;

/* Update current index in data structure */
Expand Down Expand Up @@ -2980,7 +2969,7 @@ struct mv643xx_stats {
};

#define MV643XX_STAT(m) sizeof(((struct mv643xx_private *)0)->m), \
offsetof(struct mv643xx_private, m)
offsetof(struct mv643xx_private, m)

static const struct mv643xx_stats mv643xx_gstrings_stats[] = {
{ "rx_packets", MV643XX_STAT(stats.rx_packets) },
Expand Down Expand Up @@ -3131,9 +3120,8 @@ mv643xx_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
return 0;
}

static void
mv643xx_get_drvinfo(struct net_device *netdev,
struct ethtool_drvinfo *drvinfo)
static void mv643xx_get_drvinfo(struct net_device *netdev,
struct ethtool_drvinfo *drvinfo)
{
strncpy(drvinfo->driver, mv643xx_driver_name, 32);
strncpy(drvinfo->version, mv643xx_driver_version, 32);
Expand All @@ -3142,39 +3130,37 @@ mv643xx_get_drvinfo(struct net_device *netdev,
drvinfo->n_stats = MV643XX_STATS_LEN;
}

static int
mv643xx_get_stats_count(struct net_device *netdev)
static int mv643xx_get_stats_count(struct net_device *netdev)
{
return MV643XX_STATS_LEN;
}

static void
mv643xx_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats, uint64_t *data)
static void mv643xx_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats, uint64_t *data)
{
struct mv643xx_private *mp = netdev->priv;
int i;

eth_update_mib_counters(mp);

for(i = 0; i < MV643XX_STATS_LEN; i++) {
for (i = 0; i < MV643XX_STATS_LEN; i++) {
char *p = (char *)mp+mv643xx_gstrings_stats[i].stat_offset;
data[i] = (mv643xx_gstrings_stats[i].sizeof_stat ==
data[i] = (mv643xx_gstrings_stats[i].sizeof_stat ==
sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p;
}
}

static void
mv643xx_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data)
static void mv643xx_get_strings(struct net_device *netdev, uint32_t stringset,
uint8_t *data)
{
int i;

switch(stringset) {
case ETH_SS_STATS:
for (i=0; i < MV643XX_STATS_LEN; i++) {
memcpy(data + i * ETH_GSTRING_LEN,
mv643xx_gstrings_stats[i].stat_string,
ETH_GSTRING_LEN);
memcpy(data + i * ETH_GSTRING_LEN,
mv643xx_gstrings_stats[i].stat_string,
ETH_GSTRING_LEN);
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/s2io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3586,7 +3586,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
txdp->Buffer_Pointer = (u64) pci_map_page
(sp->pdev, frag->page, frag->page_offset,
frag->size, PCI_DMA_TODEVICE);
txdp->Control_1 |= TXD_BUFFER0_SIZE(frag->size);
txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size);
if (skb_shinfo(skb)->ufo_size)
txdp->Control_1 |= TXD_UFO_EN;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/hostap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ config HOSTAP_PCI

config HOSTAP_CS
tristate "Host AP driver for Prism2/2.5/3 PC Cards"
depends on PCMCIA!=n && HOSTAP
depends on PCMCIA && HOSTAP
---help---
Host AP driver's version for Prism2/2.5/3 PC Cards.

Expand Down
Loading

0 comments on commit 0827f2b

Please sign in to comment.