Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
  ucc_geth: use correct UCCE macros
  net_dma: acquire/release dma channels on ifup/ifdown
  cxgb3: Keep LRO off if disabled when interface is down
  sfc: SFT9001: Fix condition for LNPGA power-off
  dccp ccid-3: Fix RFC reference
  smsc911x: register irq with device name, not driver name
  smsc911x: fix smsc911x_reg_read compiler warning
  forcedeth: napi schedule lock fix
  net: fix section mismatch warnings in dccp/ccids/lib/tfrc.c
  forcedeth: remove mgmt unit for mcp79 chipset
  qlge: Remove dynamic alloc of rx ring control blocks.
  qlge: Fix schedule while atomic issue.
  qlge: Remove support for device ID 8000.
  qlge: Get rid of split addresses in hardware control blocks.
  qlge: Get rid of volatile usage for shadow register.
  forcedeth: version bump and copyright
  forcedeth: xmit lock fix
  netdev: missing validate_address hooks
  netdev: add missing set_mac_address hook
  netdev: gianfar: add MII ioctl handler
  ...
  • Loading branch information
torvalds committed Jan 13, 2009
2 parents 54c2668 + 3bc5342 commit 23ead72
Show file tree
Hide file tree
Showing 59 changed files with 342 additions and 372 deletions.
1 change: 1 addition & 0 deletions drivers/net/3c503.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ static const struct net_device_ops el2_netdev_ops = {
.ndo_get_stats = eip_get_stats,
.ndo_set_multicast_list = eip_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = eip_poll,
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3109,6 +3109,8 @@ static void acpi_set_WOL(struct net_device *dev)
struct vortex_private *vp = netdev_priv(dev);
void __iomem *ioaddr = vp->ioaddr;

device_set_wakeup_enable(vp->gendev, vp->enable_wol);

if (vp->enable_wol) {
/* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */
EL3WINDOW(7);
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1821,6 +1821,7 @@ static const struct net_device_ops cp_netdev_ops = {
.ndo_open = cp_open,
.ndo_stop = cp_close,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_set_multicast_list = cp_set_rx_mode,
.ndo_get_stats = cp_get_stats,
.ndo_do_ioctl = cp_ioctl,
Expand All @@ -1832,6 +1833,7 @@ static const struct net_device_ops cp_netdev_ops = {
#ifdef BROKEN
.ndo_change_mtu = cp_change_mtu,
#endif

#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = cp_poll_controller,
#endif
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/8139too.c
Original file line number Diff line number Diff line change
Expand Up @@ -917,14 +917,14 @@ static const struct net_device_ops rtl8139_netdev_ops = {
.ndo_stop = rtl8139_close,
.ndo_get_stats = rtl8139_get_stats,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_start_xmit = rtl8139_start_xmit,
.ndo_set_multicast_list = rtl8139_set_rx_mode,
.ndo_do_ioctl = netdev_ioctl,
.ndo_tx_timeout = rtl8139_tx_timeout,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = rtl8139_poll_controller,
#endif

};

static int __devinit rtl8139_init_one (struct pci_dev *pdev,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/8390.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const struct net_device_ops ei_netdev_ops = {
.ndo_get_stats = ei_get_stats,
.ndo_set_multicast_list = ei_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ei_poll,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/8390p.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const struct net_device_ops eip_netdev_ops = {
.ndo_get_stats = eip_get_stats,
.ndo_set_multicast_list = eip_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = eip_poll,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ config 8139_OLD_RX_RESET
old RX-reset behavior. If unsure, say N.

config R6040
tristate "RDC R6040 Fast Ethernet Adapter support (EXPERIMENTAL)"
tristate "RDC R6040 Fast Ethernet Adapter support"
depends on NET_PCI && PCI
select CRC32
select MII
Expand Down
1 change: 1 addition & 0 deletions drivers/net/acenic.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ static const struct net_device_ops ace_netdev_ops = {
.ndo_get_stats = ace_get_stats,
.ndo_start_xmit = ace_start_xmit,
.ndo_set_multicast_list = ace_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = ace_set_mac_addr,
.ndo_change_mtu = ace_change_mtu,
#if ACENIC_DO_VLAN
Expand Down
1 change: 1 addition & 0 deletions drivers/net/arm/etherh.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ static const struct net_device_ops etherh_netdev_ops = {
.ndo_get_stats = ei_get_stats,
.ndo_set_multicast_list = ei_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_addr = eth_set_mac_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ei_poll,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/arm/ks8695net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,7 @@ static const struct net_device_ops ks8695_netdev_ops = {
.ndo_start_xmit = ks8695_start_xmit,
.ndo_tx_timeout = ks8695_timeout,
.ndo_set_mac_address = ks8695_set_mac,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_multicast_list = ks8695_set_multicast,
};

Expand Down
13 changes: 6 additions & 7 deletions drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
(BP)->tx_cons - (BP)->tx_prod - TX_RING_GAP(BP))
#define NEXT_TX(N) (((N) + 1) & (B44_TX_RING_SIZE - 1))

#define RX_PKT_OFFSET 30
#define RX_PKT_BUF_SZ (1536 + RX_PKT_OFFSET + 64)
#define RX_PKT_OFFSET (RX_HEADER_LEN + 2)
#define RX_PKT_BUF_SZ (1536 + RX_PKT_OFFSET)

/* minimum number of free TX descriptors required to wake up TX process */
#define B44_TX_WAKEUP_THRESH (B44_TX_RING_SIZE / 4)
Expand Down Expand Up @@ -682,7 +682,6 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
}

rh = (struct rx_header *) skb->data;
skb_reserve(skb, RX_PKT_OFFSET);

rh->len = 0;
rh->flags = 0;
Expand All @@ -693,13 +692,13 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
if (src_map != NULL)
src_map->skb = NULL;

ctrl = (DESC_CTRL_LEN & (RX_PKT_BUF_SZ - RX_PKT_OFFSET));
ctrl = (DESC_CTRL_LEN & RX_PKT_BUF_SZ);
if (dest_idx == (B44_RX_RING_SIZE - 1))
ctrl |= DESC_CTRL_EOT;

dp = &bp->rx_ring[dest_idx];
dp->ctrl = cpu_to_le32(ctrl);
dp->addr = cpu_to_le32((u32) mapping + RX_PKT_OFFSET + bp->dma_offset);
dp->addr = cpu_to_le32((u32) mapping + bp->dma_offset);

if (bp->flags & B44_FLAG_RX_RING_HACK)
b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
Expand Down Expand Up @@ -809,8 +808,8 @@ static int b44_rx(struct b44 *bp, int budget)
ssb_dma_unmap_single(bp->sdev, map,
skb_size, DMA_FROM_DEVICE);
/* Leave out rx_header */
skb_put(skb, len + RX_PKT_OFFSET);
skb_pull(skb, RX_PKT_OFFSET);
skb_put(skb, len + RX_PKT_OFFSET);
skb_pull(skb, RX_PKT_OFFSET);
} else {
struct sk_buff *copy_skb;

Expand Down
7 changes: 6 additions & 1 deletion drivers/net/cxgb3/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,17 @@ struct vlan_group;
struct adapter;
struct sge_qset;

enum { /* rx_offload flags */
T3_RX_CSUM = 1 << 0,
T3_LRO = 1 << 1,
};

struct port_info {
struct adapter *adapter;
struct vlan_group *vlan_grp;
struct sge_qset *qs;
u8 port_id;
u8 rx_csum_offload;
u8 rx_offload;
u8 nqsets;
u8 first_qset;
struct cphy phy;
Expand Down
22 changes: 14 additions & 8 deletions drivers/net/cxgb3/cxgb3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static int setup_sge_qsets(struct adapter *adap)
pi->qs = &adap->sge.qs[pi->first_qset];
for (j = pi->first_qset; j < pi->first_qset + pi->nqsets;
++j, ++qset_idx) {
set_qset_lro(dev, qset_idx, pi->rx_csum_offload);
set_qset_lro(dev, qset_idx, pi->rx_offload & T3_LRO);
err = t3_sge_alloc_qset(adap, qset_idx, 1,
(adap->flags & USING_MSIX) ? qset_idx + 1 :
irq_idx,
Expand Down Expand Up @@ -1657,17 +1657,19 @@ static u32 get_rx_csum(struct net_device *dev)
{
struct port_info *p = netdev_priv(dev);

return p->rx_csum_offload;
return p->rx_offload & T3_RX_CSUM;
}

static int set_rx_csum(struct net_device *dev, u32 data)
{
struct port_info *p = netdev_priv(dev);

p->rx_csum_offload = data;
if (!data) {
if (data) {
p->rx_offload |= T3_RX_CSUM;
} else {
int i;

p->rx_offload &= ~(T3_RX_CSUM | T3_LRO);
for (i = p->first_qset; i < p->first_qset + p->nqsets; i++)
set_qset_lro(dev, i, 0);
}
Expand Down Expand Up @@ -1830,15 +1832,18 @@ static int cxgb3_set_flags(struct net_device *dev, u32 data)
int i;

if (data & ETH_FLAG_LRO) {
if (!pi->rx_csum_offload)
if (!(pi->rx_offload & T3_RX_CSUM))
return -EINVAL;

pi->rx_offload |= T3_LRO;
for (i = pi->first_qset; i < pi->first_qset + pi->nqsets; i++)
set_qset_lro(dev, i, 1);

} else
} else {
pi->rx_offload &= ~T3_LRO;
for (i = pi->first_qset; i < pi->first_qset + pi->nqsets; i++)
set_qset_lro(dev, i, 0);
}

return 0;
}
Expand Down Expand Up @@ -1926,7 +1931,7 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
pi = adap2pinfo(adapter, i);
if (t.qset_idx >= pi->first_qset &&
t.qset_idx < pi->first_qset + pi->nqsets &&
!pi->rx_csum_offload)
!(pi->rx_offload & T3_RX_CSUM))
return -EINVAL;
}

Expand Down Expand Up @@ -2946,7 +2951,7 @@ static int __devinit init_one(struct pci_dev *pdev,
adapter->port[i] = netdev;
pi = netdev_priv(netdev);
pi->adapter = adapter;
pi->rx_csum_offload = 1;
pi->rx_offload = T3_RX_CSUM | T3_LRO;
pi->port_id = i;
netif_carrier_off(netdev);
netif_tx_stop_all_queues(netdev);
Expand All @@ -2955,6 +2960,7 @@ static int __devinit init_one(struct pci_dev *pdev,
netdev->mem_end = mmio_start + mmio_len - 1;
netdev->features |= NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO;
netdev->features |= NETIF_F_LLTX;
netdev->features |= NETIF_F_LRO;
if (pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA;

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/cxgb3/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ static void rx_eth(struct adapter *adap, struct sge_rspq *rq,
skb_pull(skb, sizeof(*p) + pad);
skb->protocol = eth_type_trans(skb, adap->port[p->iff]);
pi = netdev_priv(skb->dev);
if (pi->rx_csum_offload && p->csum_valid && p->csum == htons(0xffff) &&
if ((pi->rx_offload & T3_RX_CSUM) && p->csum_valid && p->csum == htons(0xffff) &&
!p->fragment) {
qs->port_stats[SGE_PSTAT_RX_CSUM_GOOD]++;
skb->ip_summed = CHECKSUM_UNNECESSARY;
Expand Down
19 changes: 13 additions & 6 deletions drivers/net/e1000e/ich8lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter)
}

static DEFINE_MUTEX(nvm_mutex);
static pid_t nvm_owner = -1;
static pid_t nvm_owner_pid = -1;
static char nvm_owner_name[TASK_COMM_LEN] = "";

/**
* e1000_acquire_swflag_ich8lan - Acquire software control flag
Expand All @@ -408,11 +409,15 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
might_sleep();

if (!mutex_trylock(&nvm_mutex)) {
WARN(1, KERN_ERR "e1000e mutex contention. Owned by pid %d\n",
nvm_owner);
WARN(1, KERN_ERR "e1000e mutex contention. Owned by process "
"%s (pid %d), required by process %s (pid %d)\n",
nvm_owner_name, nvm_owner_pid,
current->comm, current->pid);

mutex_lock(&nvm_mutex);
}
nvm_owner = current->pid;
nvm_owner_pid = current->pid;
strncpy(nvm_owner_name, current->comm, TASK_COMM_LEN);

while (timeout) {
extcnf_ctrl = er32(EXTCNF_CTRL);
Expand All @@ -430,7 +435,8 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
hw_dbg(hw, "FW or HW has locked the resource for too long.\n");
extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
ew32(EXTCNF_CTRL, extcnf_ctrl);
nvm_owner = -1;
nvm_owner_pid = -1;
strcpy(nvm_owner_name, "");
mutex_unlock(&nvm_mutex);
return -E1000_ERR_CONFIG;
}
Expand All @@ -454,7 +460,8 @@ static void e1000_release_swflag_ich8lan(struct e1000_hw *hw)
extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
ew32(EXTCNF_CTRL, extcnf_ctrl);

nvm_owner = -1;
nvm_owner_pid = -1;
strcpy(nvm_owner_name, "");
mutex_unlock(&nvm_mutex);
}

Expand Down
1 change: 1 addition & 0 deletions drivers/net/e2100.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ static const struct net_device_ops e21_netdev_ops = {
.ndo_get_stats = ei_get_stats,
.ndo_set_multicast_list = ei_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ei_poll,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,7 @@ static const struct net_device_ops enic_netdev_ops = {
.ndo_start_xmit = enic_hard_start_xmit,
.ndo_get_stats = enic_get_stats,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_set_multicast_list = enic_set_multicast_list,
.ndo_change_mtu = enic_change_mtu,
.ndo_vlan_rx_register = enic_vlan_rx_register,
Expand Down
Loading

0 comments on commit 23ead72

Please sign in to comment.