Skip to content

Commit

Permalink
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…davem/net-2.6

Conflicts:
	drivers/net/wireless/iwlwifi/iwl-3945.h
	drivers/net/wireless/iwlwifi/iwl-tx.c
	drivers/net/wireless/iwlwifi/iwl3945-base.c
  • Loading branch information
davem330 committed Jul 31, 2009
2 parents a33bc5c + 0a92457 commit df597ef
Show file tree
Hide file tree
Showing 34 changed files with 185 additions and 104 deletions.
4 changes: 2 additions & 2 deletions Documentation/DocBook/kernel-hacking.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ printk(KERN_INFO "i = %u\n", i);
</para>

<programlisting>
__u32 ipaddress;
printk(KERN_INFO "my ip: %d.%d.%d.%d\n", NIPQUAD(ipaddress));
__be32 ipaddress;
printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
</programlisting>

<para>
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/3c515.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,9 @@ static int corkscrew_open(struct net_device *dev)
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
vp->rx_ring[i].addr = isa_virt_to_bus(skb->data);
}
vp->rx_ring[i - 1].next = isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */
if (i != 0)
vp->rx_ring[i - 1].next =
isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */
outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr);
}
if (vp->full_bus_master_tx) { /* Boomerang bus master Tx. */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/at1700.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr)
pos3 = mca_read_stored_pos( slot, 3 );
pos4 = mca_read_stored_pos( slot, 4 );

for (l_i = 0; l_i < 0x09; l_i++)
for (l_i = 0; l_i < 8; l_i++)
if (( pos3 & 0x07) == at1700_ioaddr_pattern[l_i])
break;
ioaddr = at1700_mca_probe_list[l_i];
Expand Down
23 changes: 21 additions & 2 deletions drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static int cnic_send_nlmsg(struct cnic_local *cp, u32 type,
}

rcu_read_lock();
ulp_ops = rcu_dereference(cp->ulp_ops[CNIC_ULP_ISCSI]);
ulp_ops = rcu_dereference(cnic_ulp_tbl[CNIC_ULP_ISCSI]);
if (ulp_ops)
ulp_ops->iscsi_nl_send_msg(cp->dev, msg_type, buf, len);
rcu_read_unlock();
Expand Down Expand Up @@ -319,6 +319,20 @@ static int cnic_abort_prep(struct cnic_sock *csk)
return 0;
}

static void cnic_uio_stop(void)
{
struct cnic_dev *dev;

read_lock(&cnic_dev_lock);
list_for_each_entry(dev, &cnic_dev_list, list) {
struct cnic_local *cp = dev->cnic_priv;

if (cp->cnic_uinfo)
cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
}
read_unlock(&cnic_dev_lock);
}

int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops)
{
struct cnic_dev *dev;
Expand Down Expand Up @@ -390,6 +404,9 @@ int cnic_unregister_driver(int ulp_type)
}
read_unlock(&cnic_dev_lock);

if (ulp_type == CNIC_ULP_ISCSI)
cnic_uio_stop();

rcu_assign_pointer(cnic_ulp_tbl[ulp_type], NULL);

mutex_unlock(&cnic_lock);
Expand Down Expand Up @@ -632,7 +649,6 @@ static void cnic_free_resc(struct cnic_dev *dev)
int i = 0;

if (cp->cnic_uinfo) {
cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
while (cp->uio_dev != -1 && i < 15) {
msleep(100);
i++;
Expand Down Expand Up @@ -1057,6 +1073,9 @@ static void cnic_ulp_stop(struct cnic_dev *dev)
struct cnic_local *cp = dev->cnic_priv;
int if_type;

if (cp->cnic_uinfo)
cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);

rcu_read_lock();
for (if_type = 0; if_type < MAX_CNIC_ULP_TYPE; if_type++) {
struct cnic_ulp_ops *ulp_ops;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/eepro.c
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ int __init init_module(void)
printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)\n");
}

for (i = 0; io[i] != -1 && i < MAX_EEPRO; i++) {
for (i = 0; i < MAX_EEPRO && io[i] != -1; i++) {
dev = alloc_etherdev(sizeof(struct eepro_local));
if (!dev)
break;
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/eexpress.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,13 +1474,13 @@ static void eexp_hw_init586(struct net_device *dev)
outw(0x0000, ioaddr + 0x800c);
outw(0x0000, ioaddr + 0x800e);

for (i = 0; i < (sizeof(start_code)); i+=32) {
for (i = 0; i < ARRAY_SIZE(start_code) * 2; i+=32) {
int j;
outw(i, ioaddr + SM_PTR);
for (j = 0; j < 16; j+=2)
for (j = 0; j < 16 && (i+j)/2 < ARRAY_SIZE(start_code); j+=2)
outw(start_code[(i+j)/2],
ioaddr+0x4000+j);
for (j = 0; j < 16; j+=2)
for (j = 0; j < 16 && (i+j+16)/2 < ARRAY_SIZE(start_code); j+=2)
outw(start_code[(i+j+16)/2],
ioaddr+0x8000+j);
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/fealnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,8 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
if (np->flags == HAS_MII_XCVR) {
int phy, phy_idx = 0;

for (phy = 1; phy < 32 && phy_idx < 4; phy++) {
for (phy = 1; phy < 32 && phy_idx < ARRAY_SIZE(np->phys);
phy++) {
int mii_status = mdio_read(dev, phy, 1);

if (mii_status != 0xffff && mii_status != 0x0000) {
Expand Down
10 changes: 4 additions & 6 deletions drivers/net/gianfar_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,8 @@ static int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals
return -EINVAL;
}

priv->rxic = mk_ic_value(
gfar_usecs2ticks(priv, cvals->rx_coalesce_usecs),
cvals->rx_max_coalesced_frames);
priv->rxic = mk_ic_value(cvals->rx_max_coalesced_frames,
gfar_usecs2ticks(priv, cvals->rx_coalesce_usecs));

/* Set up tx coalescing */
if ((cvals->tx_coalesce_usecs == 0) ||
Expand All @@ -390,9 +389,8 @@ static int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals
return -EINVAL;
}

priv->txic = mk_ic_value(
gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs),
cvals->tx_max_coalesced_frames);
priv->txic = mk_ic_value(cvals->tx_max_coalesced_frames,
gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs));

gfar_write(&priv->regs->rxic, 0);
if (priv->rxcoalescing)
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ixgbe/ixgbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000
#define IXGBE_TX_FLAGS_VLAN_SHIFT 16

#define IXGBE_MAX_RSC_INT_RATE 162760

/* wrapper around a pointer to a socket buffer,
* so a DMA handle can be stored along with the buffer */
struct ixgbe_tx_buffer {
Expand Down
11 changes: 7 additions & 4 deletions drivers/net/ixgbe/ixgbe_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,10 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
* any other value means disable eitr, which is best
* served by setting the interrupt rate very high
*/
adapter->eitr_param = IXGBE_MAX_INT_RATE;
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
adapter->eitr_param = IXGBE_MAX_RSC_INT_RATE;
else
adapter->eitr_param = IXGBE_MAX_INT_RATE;
adapter->itr_setting = 0;
}

Expand All @@ -2004,13 +2007,13 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)

ethtool_op_set_flags(netdev, data);

if (!(adapter->flags & IXGBE_FLAG2_RSC_CAPABLE))
if (!(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE))
return 0;

/* if state changes we need to update adapter->flags and reset */
if ((!!(data & ETH_FLAG_LRO)) !=
(!!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED))) {
adapter->flags ^= IXGBE_FLAG2_RSC_ENABLED;
(!!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED))) {
adapter->flags2 ^= IXGBE_FLAG2_RSC_ENABLED;
if (netif_running(netdev))
ixgbe_reinit_locked(adapter);
else
Expand Down
42 changes: 31 additions & 11 deletions drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,11 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector,
* @skb: skb currently being received and modified
**/
static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter,
u32 status_err, struct sk_buff *skb)
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{
u32 status_err = le32_to_cpu(rx_desc->wb.upper.status_error);

skb->ip_summed = CHECKSUM_NONE;

/* Rx csum disabled */
Expand All @@ -532,6 +535,16 @@ static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter,
return;

if (status_err & IXGBE_RXDADV_ERR_TCPE) {
u16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info;

/*
* 82599 errata, UDP frames with a 0 checksum can be marked as
* checksum errors.
*/
if ((pkt_info & IXGBE_RXDADV_PKTTYPE_UDP) &&
(adapter->hw.mac.type == ixgbe_mac_82599EB))
return;

adapter->hw_csum_rx_error++;
return;
}
Expand Down Expand Up @@ -769,7 +782,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
prefetch(next_rxd);
cleaned_count++;

if (adapter->flags & IXGBE_FLAG2_RSC_CAPABLE)
if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)
rsc_count = ixgbe_get_rsc_count(rx_desc);

if (rsc_count) {
Expand Down Expand Up @@ -805,7 +818,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
goto next_desc;
}

ixgbe_rx_checksum(adapter, staterr, skb);
ixgbe_rx_checksum(adapter, rx_desc, skb);

/* probably a little skewed due to removing CRC */
total_rx_bytes += skb->len;
Expand Down Expand Up @@ -2025,7 +2038,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype);
}
} else {
if (!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED) &&
if (!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) &&
(netdev->mtu <= ETH_DATA_LEN))
rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE;
else
Expand Down Expand Up @@ -2154,7 +2167,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl);
}

if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED) {
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
/* Enable 82599 HW-RSC */
for (i = 0; i < adapter->num_rx_queues; i++) {
j = adapter->rx_ring[i].reg_idx;
Expand Down Expand Up @@ -3801,8 +3814,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598;
} else if (hw->mac.type == ixgbe_mac_82599EB) {
adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599;
adapter->flags |= IXGBE_FLAG2_RSC_CAPABLE;
adapter->flags |= IXGBE_FLAG2_RSC_ENABLED;
adapter->flags2 |= IXGBE_FLAG2_RSC_CAPABLE;
adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
adapter->ring_feature[RING_F_FDIR].indices =
IXGBE_MAX_FDIR_INDICES;
Expand Down Expand Up @@ -5349,12 +5362,19 @@ static int ixgbe_del_sanmac_netdev(struct net_device *dev)
static void ixgbe_netpoll(struct net_device *netdev)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
int i;

disable_irq(adapter->pdev->irq);
adapter->flags |= IXGBE_FLAG_IN_NETPOLL;
ixgbe_intr(adapter->pdev->irq, netdev);
if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
for (i = 0; i < num_q_vectors; i++) {
struct ixgbe_q_vector *q_vector = adapter->q_vector[i];
ixgbe_msix_clean_many(0, q_vector);
}
} else {
ixgbe_intr(adapter->pdev->irq, netdev);
}
adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL;
enable_irq(adapter->pdev->irq);
}
#endif

Expand Down Expand Up @@ -5600,7 +5620,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
if (pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA;

if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED)
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
netdev->features |= NETIF_F_LRO;

/* make sure the EEPROM is good */
Expand Down
7 changes: 7 additions & 0 deletions drivers/net/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ void netxen_free_sw_resources(struct netxen_adapter *adapter)
kfree(recv_ctx->rds_rings);

skip_rds:
if (recv_ctx->sds_rings == NULL)
goto skip_sds;

for(ring = 0; ring < adapter->max_sds_rings; ring++)
recv_ctx->sds_rings[ring].consumer = 0;

skip_sds:
if (adapter->tx_ring == NULL)
return;

Expand Down
1 change: 1 addition & 0 deletions drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,7 @@ static void *pppoe_seq_next(struct seq_file *seq, void *v, loff_t *pos)
else {
int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote);

po = NULL;
while (++hash < PPPOE_HASH_SIZE) {
po = pn->hash_table[hash];
if (po)
Expand Down
13 changes: 11 additions & 2 deletions drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -2060,8 +2060,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
}
}

pci_set_master(pdev);

/* ioremap MMIO region */
ioaddr = ioremap(pci_resource_start(pdev, region), R8169_REGS_SIZE);
if (!ioaddr) {
Expand Down Expand Up @@ -2089,6 +2087,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)

RTL_W16(IntrStatus, 0xffff);

pci_set_master(pdev);

/* Identify chip attached to board */
rtl8169_get_mac_version(tp, ioaddr);

Expand Down Expand Up @@ -3874,6 +3874,15 @@ static void rtl_shutdown(struct pci_dev *pdev)
spin_unlock_irq(&tp->lock);

if (system_state == SYSTEM_POWER_OFF) {
/* WoL fails with some 8168 when the receiver is disabled. */
if (tp->features & RTL_FEATURE_WOL) {
pci_clear_master(pdev);

RTL_W8(ChipCmd, CmdRxEnb);
/* PCI commit */
RTL_R8(ChipCmd);
}

pci_wake_from_d3(pdev, true);
pci_set_power_state(pdev, PCI_D3hot);
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/smc91x.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ static inline void SMC_outw(u16 val, void __iomem *ioaddr, int reg)
#define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l))
#define SMC_IRQ_FLAGS (-1) /* from resource */

#elif defined(CONFIG_MACH_LOGICPD_PXA270)
#elif defined(CONFIG_MACH_LOGICPD_PXA270) \
|| defined(CONFIG_MACH_NOMADIK_8815NHK)

#define SMC_CAN_USE_8BIT 0
#define SMC_CAN_USE_16BIT 1
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/tokenring/ibmtr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,7 @@ static int __init ibmtr_init(void)

find_turbo_adapters(io);

for (i = 0; io[i] && (i < IBMTR_MAX_ADAPTERS); i++) {
for (i = 0; i < IBMTR_MAX_ADAPTERS && io[i]; i++) {
struct net_device *dev;
irq[i] = 0;
mem[i] = 0;
Expand Down
Loading

0 comments on commit df597ef

Please sign in to comment.