Skip to content

Commit

Permalink
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (23 commits)
  iwlwifi: fix rf_kill state inconsistent during suspend and resume
  b43: Fix rfkill radio LED
  bcm43xx_debugfs sscanf fix
  libertas: select WIRELESS_EXT
  iwlwifi3945/4965: fix rate control algo reference leak
  ieee80211_rate: missed unlock
  wireless/ipw2200.c: add __dev{init,exit} annotations
  zd1211rw: Fix alignment problems
  libertas: add Dan Williams as maintainer
  sis190 endianness
  ucc_geth: really fix section mismatch
  pcnet_cs: add new id
  ixgb: make sure jumbos stay enabled after reset
  Net: ibm_newemac, remove SPIN_LOCK_UNLOCKED
  net: smc911x: shut up compiler warnings
  ucc_geth: minor whitespace fix
  drivers/net/s2io.c section fixes
  drivers/net/sis190.c section fix
  hamachi endianness fixes
  e100: free IRQ to remove warningwhenrebooting
  ...
  • Loading branch information
Linus Torvalds committed Dec 18, 2007
2 parents ededa4d + 8085106 commit c63a119
Show file tree
Hide file tree
Showing 24 changed files with 168 additions and 91 deletions.
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2489,6 +2489,12 @@ M: mtk.manpages@gmail.com
W: ftp://ftp.kernel.org/pub/linux/docs/manpages
S: Maintained

MARVELL LIBERTAS WIRELESS DRIVER
P: Dan Williams
M: dcbw@redhat.com
L: libertas-dev@lists.infradead.org
S: Maintained

MARVELL MV643XX ETHERNET DRIVER
P: Dale Farnsworth
M: dale@farnsworth.org
Expand Down
5 changes: 4 additions & 1 deletion drivers/net/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2737,8 +2737,9 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
pci_enable_wake(pdev, PCI_D3cold, 0);
}

pci_disable_device(pdev);
free_irq(pdev->irq, netdev);

pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);

return 0;
Expand Down Expand Up @@ -2780,6 +2781,8 @@ static void e100_shutdown(struct pci_dev *pdev)
pci_enable_wake(pdev, PCI_D3cold, 0);
}

free_irq(pdev->irq, netdev);

pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);
}
Expand Down
70 changes: 37 additions & 33 deletions drivers/net/hamachi.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ KERN_INFO " Further modifications by Keith Underwood <keithu@parl.clemson.edu>
/* Condensed bus+endian portability operations. */
#if ADDRLEN == 64
#define cpu_to_leXX(addr) cpu_to_le64(addr)
#define leXX_to_cpu(addr) le64_to_cpu(addr)
#else
#define cpu_to_leXX(addr) cpu_to_le32(addr)
#define leXX_to_cpu(addr) le32_to_cpu(addr)
#endif


Expand Down Expand Up @@ -465,12 +467,12 @@ enum intr_status_bits {

/* The Hamachi Rx and Tx buffer descriptors. */
struct hamachi_desc {
u32 status_n_length;
__le32 status_n_length;
#if ADDRLEN == 64
u32 pad;
u64 addr;
__le64 addr;
#else
u32 addr;
__le32 addr;
#endif
};

Expand Down Expand Up @@ -874,13 +876,13 @@ static int hamachi_open(struct net_device *dev)

#if ADDRLEN == 64
/* writellll anyone ? */
writel(cpu_to_le64(hmp->rx_ring_dma), ioaddr + RxPtr);
writel(cpu_to_le64(hmp->rx_ring_dma) >> 32, ioaddr + RxPtr + 4);
writel(cpu_to_le64(hmp->tx_ring_dma), ioaddr + TxPtr);
writel(cpu_to_le64(hmp->tx_ring_dma) >> 32, ioaddr + TxPtr + 4);
writel(hmp->rx_ring_dma, ioaddr + RxPtr);
writel(hmp->rx_ring_dma >> 32, ioaddr + RxPtr + 4);
writel(hmp->tx_ring_dma, ioaddr + TxPtr);
writel(hmp->tx_ring_dma >> 32, ioaddr + TxPtr + 4);
#else
writel(cpu_to_le32(hmp->rx_ring_dma), ioaddr + RxPtr);
writel(cpu_to_le32(hmp->tx_ring_dma), ioaddr + TxPtr);
writel(hmp->rx_ring_dma, ioaddr + RxPtr);
writel(hmp->tx_ring_dma, ioaddr + TxPtr);
#endif

/* TODO: It would make sense to organize this as words since the card
Expand Down Expand Up @@ -1019,8 +1021,8 @@ static inline int hamachi_tx(struct net_device *dev)
skb = hmp->tx_skbuff[entry];
if (skb) {
pci_unmap_single(hmp->pci_dev,
hmp->tx_ring[entry].addr, skb->len,
PCI_DMA_TODEVICE);
leXX_to_cpu(hmp->tx_ring[entry].addr),
skb->len, PCI_DMA_TODEVICE);
dev_kfree_skb(skb);
hmp->tx_skbuff[entry] = NULL;
}
Expand Down Expand Up @@ -1071,10 +1073,10 @@ static void hamachi_tx_timeout(struct net_device *dev)
{
printk(KERN_DEBUG " Rx ring %p: ", hmp->rx_ring);
for (i = 0; i < RX_RING_SIZE; i++)
printk(" %8.8x", (unsigned int)hmp->rx_ring[i].status_n_length);
printk(" %8.8x", le32_to_cpu(hmp->rx_ring[i].status_n_length));
printk("\n"KERN_DEBUG" Tx ring %p: ", hmp->tx_ring);
for (i = 0; i < TX_RING_SIZE; i++)
printk(" %4.4x", hmp->tx_ring[i].status_n_length);
printk(" %4.4x", le32_to_cpu(hmp->tx_ring[i].status_n_length));
printk("\n");
}

Expand All @@ -1099,14 +1101,15 @@ static void hamachi_tx_timeout(struct net_device *dev)
struct sk_buff *skb;

if (i >= TX_RING_SIZE - 1)
hmp->tx_ring[i].status_n_length = cpu_to_le32(
DescEndRing |
(hmp->tx_ring[i].status_n_length & 0x0000FFFF));
hmp->tx_ring[i].status_n_length =
cpu_to_le32(DescEndRing) |
(hmp->tx_ring[i].status_n_length &
cpu_to_le32(0x0000ffff));
else
hmp->tx_ring[i].status_n_length &= 0x0000ffff;
hmp->tx_ring[i].status_n_length &= cpu_to_le32(0x0000ffff);
skb = hmp->tx_skbuff[i];
if (skb){
pci_unmap_single(hmp->pci_dev, hmp->tx_ring[i].addr,
pci_unmap_single(hmp->pci_dev, leXX_to_cpu(hmp->tx_ring[i].addr),
skb->len, PCI_DMA_TODEVICE);
dev_kfree_skb(skb);
hmp->tx_skbuff[i] = NULL;
Expand All @@ -1128,7 +1131,8 @@ static void hamachi_tx_timeout(struct net_device *dev)
struct sk_buff *skb = hmp->rx_skbuff[i];

if (skb){
pci_unmap_single(hmp->pci_dev, hmp->rx_ring[i].addr,
pci_unmap_single(hmp->pci_dev,
leXX_to_cpu(hmp->rx_ring[i].addr),
hmp->rx_buf_sz, PCI_DMA_FROMDEVICE);
dev_kfree_skb(skb);
hmp->rx_skbuff[i] = NULL;
Expand Down Expand Up @@ -1420,7 +1424,7 @@ static irqreturn_t hamachi_interrupt(int irq, void *dev_instance)
/* Free the original skb. */
if (skb){
pci_unmap_single(hmp->pci_dev,
hmp->tx_ring[entry].addr,
leXX_to_cpu(hmp->tx_ring[entry].addr),
skb->len,
PCI_DMA_TODEVICE);
dev_kfree_skb_irq(skb);
Expand Down Expand Up @@ -1500,11 +1504,11 @@ static int hamachi_rx(struct net_device *dev)
if (desc_status & DescOwn)
break;
pci_dma_sync_single_for_cpu(hmp->pci_dev,
desc->addr,
leXX_to_cpu(desc->addr),
hmp->rx_buf_sz,
PCI_DMA_FROMDEVICE);
buf_addr = (u8 *) hmp->rx_skbuff[entry]->data;
frame_status = le32_to_cpu(get_unaligned((s32*)&(buf_addr[data_size - 12])));
frame_status = le32_to_cpu(get_unaligned((__le32*)&(buf_addr[data_size - 12])));
if (hamachi_debug > 4)
printk(KERN_DEBUG " hamachi_rx() status was %8.8x.\n",
frame_status);
Expand All @@ -1518,9 +1522,9 @@ static int hamachi_rx(struct net_device *dev)
dev->name, desc, &hmp->rx_ring[hmp->cur_rx % RX_RING_SIZE]);
printk(KERN_WARNING "%s: Oversized Ethernet frame -- next status %x/%x last status %x.\n",
dev->name,
hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length & 0xffff0000,
hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length & 0x0000ffff,
hmp->rx_ring[(hmp->cur_rx-1) % RX_RING_SIZE].status_n_length);
le32_to_cpu(hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length) & 0xffff0000,
le32_to_cpu(hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length) & 0x0000ffff,
le32_to_cpu(hmp->rx_ring[(hmp->cur_rx-1) % RX_RING_SIZE].status_n_length));
hmp->stats.rx_length_errors++;
} /* else Omit for prototype errata??? */
if (frame_status & 0x00380000) {
Expand Down Expand Up @@ -1566,7 +1570,7 @@ static int hamachi_rx(struct net_device *dev)
#endif
skb_reserve(skb, 2); /* 16 byte align the IP header */
pci_dma_sync_single_for_cpu(hmp->pci_dev,
hmp->rx_ring[entry].addr,
leXX_to_cpu(hmp->rx_ring[entry].addr),
hmp->rx_buf_sz,
PCI_DMA_FROMDEVICE);
/* Call copy + cksum if available. */
Expand All @@ -1579,12 +1583,12 @@ static int hamachi_rx(struct net_device *dev)
+ entry*sizeof(*desc), pkt_len);
#endif
pci_dma_sync_single_for_device(hmp->pci_dev,
hmp->rx_ring[entry].addr,
leXX_to_cpu(hmp->rx_ring[entry].addr),
hmp->rx_buf_sz,
PCI_DMA_FROMDEVICE);
} else {
pci_unmap_single(hmp->pci_dev,
hmp->rx_ring[entry].addr,
leXX_to_cpu(hmp->rx_ring[entry].addr),
hmp->rx_buf_sz, PCI_DMA_FROMDEVICE);
skb_put(skb = hmp->rx_skbuff[entry], pkt_len);
hmp->rx_skbuff[entry] = NULL;
Expand Down Expand Up @@ -1787,21 +1791,21 @@ static int hamachi_close(struct net_device *dev)
for (i = 0; i < RX_RING_SIZE; i++) {
skb = hmp->rx_skbuff[i];
hmp->rx_ring[i].status_n_length = 0;
hmp->rx_ring[i].addr = 0xBADF00D0; /* An invalid address. */
if (skb) {
pci_unmap_single(hmp->pci_dev,
hmp->rx_ring[i].addr, hmp->rx_buf_sz,
PCI_DMA_FROMDEVICE);
leXX_to_cpu(hmp->rx_ring[i].addr),
hmp->rx_buf_sz, PCI_DMA_FROMDEVICE);
dev_kfree_skb(skb);
hmp->rx_skbuff[i] = NULL;
}
hmp->rx_ring[i].addr = cpu_to_leXX(0xBADF00D0); /* An invalid address. */
}
for (i = 0; i < TX_RING_SIZE; i++) {
skb = hmp->tx_skbuff[i];
if (skb) {
pci_unmap_single(hmp->pci_dev,
hmp->tx_ring[i].addr, skb->len,
PCI_DMA_TODEVICE);
leXX_to_cpu(hmp->tx_ring[i].addr),
skb->len, PCI_DMA_TODEVICE);
dev_kfree_skb(skb);
hmp->tx_skbuff[i] = NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ibm_newemac/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "core.h"

static spinlock_t emac_dbg_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(emac_dbg_lock);

static void emac_desc_dump(struct emac_instance *p)
{
Expand Down
16 changes: 14 additions & 2 deletions drivers/net/ixgb/ixgb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,22 @@ ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog)
void
ixgb_reset(struct ixgb_adapter *adapter)
{
struct ixgb_hw *hw = &adapter->hw;

ixgb_adapter_stop(&adapter->hw);
if(!ixgb_init_hw(&adapter->hw))
ixgb_adapter_stop(hw);
if (!ixgb_init_hw(hw))
DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n");

/* restore frame size information */
IXGB_WRITE_REG(hw, MFS, hw->max_frame_size << IXGB_MFS_SHIFT);
if (hw->max_frame_size >
IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) {
u32 ctrl0 = IXGB_READ_REG(hw, CTRL0);
if (!(ctrl0 & IXGB_CTRL0_JFE)) {
ctrl0 |= IXGB_CTRL0_JFE;
IXGB_WRITE_REG(hw, CTRL0, ctrl0);
}
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions drivers/net/pcmcia/pcnet_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,7 @@ static struct pcmcia_device_id pcnet_ids[] = {
PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"),
PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"),
PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "tamarack.cis"),
PCMCIA_DEVICE_PROD_ID12("Ethernet", "CF Size PC Card", 0x00b2e941, 0x43ac239b),
PCMCIA_DEVICE_PROD_ID123("Fast Ethernet", "CF Size PC Card", "1.0",
0xb4be14e3, 0x43ac239b, 0x0877b627),
PCMCIA_DEVICE_NULL
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/s2io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3737,7 +3737,7 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
}

/* Handle software interrupt used during MSI(X) test */
static irqreturn_t __devinit s2io_test_intr(int irq, void *dev_id)
static irqreturn_t s2io_test_intr(int irq, void *dev_id)
{
struct s2io_nic *sp = dev_id;

Expand All @@ -3748,7 +3748,7 @@ static irqreturn_t __devinit s2io_test_intr(int irq, void *dev_id)
}

/* Test interrupt path by forcing a a software IRQ */
static int __devinit s2io_test_msi(struct s2io_nic *sp)
static int s2io_test_msi(struct s2io_nic *sp)
{
struct pci_dev *pdev = sp->pdev;
struct XENA_dev_config __iomem *bar0 = sp->bar0;
Expand Down
10 changes: 5 additions & 5 deletions drivers/net/sis190.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ static inline void sis190_map_to_asic(struct RxDesc *desc, dma_addr_t mapping,
static inline void sis190_make_unusable_by_asic(struct RxDesc *desc)
{
desc->PSize = 0x0;
desc->addr = 0xdeadbeef;
desc->addr = cpu_to_le32(0xdeadbeef);
desc->size &= cpu_to_le32(RingEnd);
wmb();
desc->status = 0x0;
Expand Down Expand Up @@ -580,7 +580,7 @@ static int sis190_rx_interrupt(struct net_device *dev,
struct RxDesc *desc = tp->RxDescRing + entry;
u32 status;

if (desc->status & OWNbit)
if (le32_to_cpu(desc->status) & OWNbit)
break;

status = le32_to_cpu(desc->PSize);
Expand Down Expand Up @@ -1381,7 +1381,7 @@ static int __devinit sis190_mii_probe(struct net_device *dev)
return rc;
}

static void __devexit sis190_mii_remove(struct net_device *dev)
static void sis190_mii_remove(struct net_device *dev)
{
struct sis190_private *tp = netdev_priv(dev);

Expand Down Expand Up @@ -1538,9 +1538,9 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,

/* Get MAC address from EEPROM */
for (i = 0; i < MAC_ADDR_LEN / 2; i++) {
__le16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i);
u16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i);

((u16 *)dev->dev_addr)[i] = le16_to_cpu(w);
((__le16 *)dev->dev_addr)[i] = cpu_to_le16(w);
}

sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo));
Expand Down
9 changes: 7 additions & 2 deletions drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,13 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)

sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg);

/* Flush Rx MAC FIFO on any flow control or error */
sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR);
if (hw->chip_id == CHIP_ID_YUKON_XL) {
/* Hardware errata - clear flush mask */
sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), 0);
} else {
/* Flush Rx MAC FIFO on any flow control or error */
sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR);
}

/* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug */
reg = RX_GMF_FL_THR_DEF + 1;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/smc911x.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@



#if SMC_USE_PXA_DMA
#ifdef SMC_USE_PXA_DMA
#define SMC_USE_DMA

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/starfire.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ static void set_rx_mode(struct net_device *dev)
if (vlan_group_get_device(np->vlgrp, i)) {
if (vlan_count >= 32)
break;
writew(cpu_to_be16(i), filter_addr);
writew(i, filter_addr);
filter_addr += 16;
vlan_count++;
}
Expand Down
Loading

0 comments on commit c63a119

Please sign in to comment.