Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3454
b: refs/heads/master
c: e8c0eee
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Garzik authored and Jeff Garzik committed Jun 26, 2005
1 parent 5e80bb7 commit dcf1dd7
Show file tree
Hide file tree
Showing 20 changed files with 661 additions and 1,720 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aef7b83c92dd0b7e994805440655d1d64147287b
refs/heads/master: e8c0eee96801f3c3f577b377b89ab01ab36ba7b6
6 changes: 2 additions & 4 deletions trunk/drivers/net/3c505.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,8 +1317,7 @@ static int __init elp_sense(struct net_device *dev)
if (orig_HSR & DIR) {
/* If HCR.DIR is up, we pull it down. HSR.DIR should follow. */
outb(0, dev->base_addr + PORT_CONTROL);
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(30*HZ/100);
msleep(300);
if (inb_status(addr) & DIR) {
if (elp_debug > 0)
printk(notfound_msg, 2);
Expand All @@ -1327,8 +1326,7 @@ static int __init elp_sense(struct net_device *dev)
} else {
/* If HCR.DIR is down, we pull it up. HSR.DIR should follow. */
outb(DIR, dev->base_addr + PORT_CONTROL);
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(30*HZ/100);
msleep(300);
if (!(inb_status(addr) & DIR)) {
if (elp_debug > 0)
printk(notfound_msg, 3);
Expand Down
21 changes: 11 additions & 10 deletions trunk/drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#include <linux/etherdevice.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
Expand Down Expand Up @@ -1515,22 +1516,22 @@ static void cp_get_ethtool_stats (struct net_device *dev,
struct ethtool_stats *estats, u64 *tmp_stats)
{
struct cp_private *cp = netdev_priv(dev);
unsigned int work = 100;
int i;

memset(cp->nic_stats, 0, sizeof(struct cp_dma_stats));

/* begin NIC statistics dump */
cpw32(StatsAddr + 4, (cp->nic_stats_dma >> 16) >> 16);
cpw32(StatsAddr, (cp->nic_stats_dma & 0xffffffff) | DumpStats);
cpr32(StatsAddr);

while (work-- > 0) {
for (i = 0; i < 1000; i++) {
if ((cpr32(StatsAddr) & DumpStats) == 0)
break;
cpu_relax();
udelay(10);
}

if (cpr32(StatsAddr) & DumpStats)
return /* -EIO */;
cpw32(StatsAddr, 0);
cpw32(StatsAddr + 4, 0);

i = 0;
tmp_stats[i++] = le64_to_cpu(cp->nic_stats->tx_ok);
Expand Down Expand Up @@ -1732,19 +1733,19 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)

/* Configure DMA attributes. */
if ((sizeof(dma_addr_t) > 4) &&
!pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL) &&
!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) {
!pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) &&
!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
pci_using_dac = 1;
} else {
pci_using_dac = 0;

rc = pci_set_dma_mask(pdev, 0xffffffffULL);
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
if (rc) {
printk(KERN_ERR PFX "No usable DMA configuration, "
"aborting.\n");
goto err_out_res;
}
rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL);
rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
if (rc) {
printk(KERN_ERR PFX "No usable consistent DMA configuration, "
"aborting.\n");
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,6 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
{
struct slave *slave, *start_at;
struct bonding *bond = dev->priv;
struct ethhdr *data = (struct ethhdr *)skb->data;
int slave_agg_no;
int slaves_in_agg;
int agg_id;
Expand Down Expand Up @@ -2377,7 +2376,7 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
goto out;
}

slave_agg_no = (data->h_dest[5]^bond->dev->dev_addr[5]) % slaves_in_agg;
slave_agg_no = bond->xmit_hash_policy(skb, dev, slaves_in_agg);

bond_for_each_slave(bond, slave, i) {
struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator;
Expand Down
Loading

0 comments on commit dcf1dd7

Please sign in to comment.