Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (25 commits)
  TIPC: Removed inactive maintainer
  isdn: Cleanup Sections in PCMCIA driver elsa
  isdn: Cleanup Sections in PCMCIA driver avma1
  isdn: Cleanup Sections in PCMCIA driver teles
  isdn: Cleanup Sections in PCMCIA driver sedlbauer
  via-velocity: Fix FLOW_CNTL_TX_RX handling in set_mii_flow_control()
  netfilter: xt_hashlimit: IPV6 bugfix
  netfilter: ip6table_raw: fix table priority
  netfilter: xt_hashlimit: dl_seq_stop() fix
  af_key: return error if pfkey_xfrm_policy2msg_prep() fails
  skbuff: remove unused dma_head & dma_maps fields
  vlan: updates vlan real_num_tx_queues
  vlan: adds vlan_dev_select_queue
  igb: only use vlan_gro_receive if vlans are registered
  igb: do not modify tx_queue_len on link speed change
  igb: count Rx FIFO errors correctly
  bnx2: Use proper handler during netpoll.
  bnx2: Fix netpoll crash.
  ksz884x: fix return value of netdev_set_eeprom
  cgroups: net_cls as module
  ...
This commit is contained in:
Linus Torvalds 2010-03-25 14:06:29 -07:00
commit 126a031e43
23 changed files with 166 additions and 169 deletions

View File

@ -5423,7 +5423,6 @@ S: Maintained
F: sound/soc/codecs/twl4030* F: sound/soc/codecs/twl4030*
TIPC NETWORK LAYER TIPC NETWORK LAYER
M: Per Liden <per.liden@ericsson.com>
M: Jon Maloy <jon.maloy@ericsson.com> M: Jon Maloy <jon.maloy@ericsson.com>
M: Allan Stephens <allan.stephens@windriver.com> M: Allan Stephens <allan.stephens@windriver.com>
L: tipc-discussion@lists.sourceforge.net L: tipc-discussion@lists.sourceforge.net

View File

@ -50,7 +50,7 @@ module_param(isdnprot, int, 0);
handler. handler.
*/ */
static int avma1cs_config(struct pcmcia_device *link); static int avma1cs_config(struct pcmcia_device *link) __devinit ;
static void avma1cs_release(struct pcmcia_device *link); static void avma1cs_release(struct pcmcia_device *link);
/* /*
@ -59,7 +59,7 @@ static void avma1cs_release(struct pcmcia_device *link);
needed to manage one actual PCMCIA card. needed to manage one actual PCMCIA card.
*/ */
static void avma1cs_detach(struct pcmcia_device *p_dev); static void avma1cs_detach(struct pcmcia_device *p_dev) __devexit ;
/* /*
@ -99,7 +99,7 @@ typedef struct local_info_t {
======================================================================*/ ======================================================================*/
static int avma1cs_probe(struct pcmcia_device *p_dev) static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
{ {
local_info_t *local; local_info_t *local;
@ -140,7 +140,7 @@ static int avma1cs_probe(struct pcmcia_device *p_dev)
======================================================================*/ ======================================================================*/
static void avma1cs_detach(struct pcmcia_device *link) static void __devexit avma1cs_detach(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link); dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link);
avma1cs_release(link); avma1cs_release(link);
@ -174,7 +174,7 @@ static int avma1cs_configcheck(struct pcmcia_device *p_dev,
} }
static int avma1cs_config(struct pcmcia_device *link) static int __devinit avma1cs_config(struct pcmcia_device *link)
{ {
local_info_t *dev; local_info_t *dev;
int i; int i;
@ -282,7 +282,7 @@ static struct pcmcia_driver avma1cs_driver = {
.name = "avma1_cs", .name = "avma1_cs",
}, },
.probe = avma1cs_probe, .probe = avma1cs_probe,
.remove = avma1cs_detach, .remove = __devexit_p(avma1cs_detach),
.id_table = avma1cs_ids, .id_table = avma1cs_ids,
}; };

View File

@ -76,7 +76,7 @@ module_param(protocol, int, 0);
handler. handler.
*/ */
static int elsa_cs_config(struct pcmcia_device *link); static int elsa_cs_config(struct pcmcia_device *link) __devinit ;
static void elsa_cs_release(struct pcmcia_device *link); static void elsa_cs_release(struct pcmcia_device *link);
/* /*
@ -85,7 +85,7 @@ static void elsa_cs_release(struct pcmcia_device *link);
needed to manage one actual PCMCIA card. needed to manage one actual PCMCIA card.
*/ */
static void elsa_cs_detach(struct pcmcia_device *p_dev); static void elsa_cs_detach(struct pcmcia_device *p_dev) __devexit;
/* /*
A driver needs to provide a dev_node_t structure for each device A driver needs to provide a dev_node_t structure for each device
@ -121,7 +121,7 @@ typedef struct local_info_t {
======================================================================*/ ======================================================================*/
static int elsa_cs_probe(struct pcmcia_device *link) static int __devinit elsa_cs_probe(struct pcmcia_device *link)
{ {
local_info_t *local; local_info_t *local;
@ -166,7 +166,7 @@ static int elsa_cs_probe(struct pcmcia_device *link)
======================================================================*/ ======================================================================*/
static void elsa_cs_detach(struct pcmcia_device *link) static void __devexit elsa_cs_detach(struct pcmcia_device *link)
{ {
local_info_t *info = link->priv; local_info_t *info = link->priv;
@ -210,7 +210,7 @@ static int elsa_cs_configcheck(struct pcmcia_device *p_dev,
return -ENODEV; return -ENODEV;
} }
static int elsa_cs_config(struct pcmcia_device *link) static int __devinit elsa_cs_config(struct pcmcia_device *link)
{ {
local_info_t *dev; local_info_t *dev;
int i; int i;
@ -327,7 +327,7 @@ static struct pcmcia_driver elsa_cs_driver = {
.name = "elsa_cs", .name = "elsa_cs",
}, },
.probe = elsa_cs_probe, .probe = elsa_cs_probe,
.remove = elsa_cs_detach, .remove = __devexit_p(elsa_cs_detach),
.id_table = elsa_ids, .id_table = elsa_ids,
.suspend = elsa_suspend, .suspend = elsa_suspend,
.resume = elsa_resume, .resume = elsa_resume,

View File

@ -76,7 +76,7 @@ module_param(protocol, int, 0);
event handler. event handler.
*/ */
static int sedlbauer_config(struct pcmcia_device *link); static int sedlbauer_config(struct pcmcia_device *link) __devinit ;
static void sedlbauer_release(struct pcmcia_device *link); static void sedlbauer_release(struct pcmcia_device *link);
/* /*
@ -85,7 +85,7 @@ static void sedlbauer_release(struct pcmcia_device *link);
needed to manage one actual PCMCIA card. needed to manage one actual PCMCIA card.
*/ */
static void sedlbauer_detach(struct pcmcia_device *p_dev); static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit;
/* /*
You'll also need to prototype all the functions that will actually You'll also need to prototype all the functions that will actually
@ -129,7 +129,7 @@ typedef struct local_info_t {
======================================================================*/ ======================================================================*/
static int sedlbauer_probe(struct pcmcia_device *link) static int __devinit sedlbauer_probe(struct pcmcia_device *link)
{ {
local_info_t *local; local_info_t *local;
@ -177,7 +177,7 @@ static int sedlbauer_probe(struct pcmcia_device *link)
======================================================================*/ ======================================================================*/
static void sedlbauer_detach(struct pcmcia_device *link) static void __devexit sedlbauer_detach(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link); dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link);
@ -283,7 +283,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
static int sedlbauer_config(struct pcmcia_device *link) static int __devinit sedlbauer_config(struct pcmcia_device *link)
{ {
local_info_t *dev = link->priv; local_info_t *dev = link->priv;
win_req_t *req; win_req_t *req;
@ -441,7 +441,7 @@ static struct pcmcia_driver sedlbauer_driver = {
.name = "sedlbauer_cs", .name = "sedlbauer_cs",
}, },
.probe = sedlbauer_probe, .probe = sedlbauer_probe,
.remove = sedlbauer_detach, .remove = __devexit_p(sedlbauer_detach),
.id_table = sedlbauer_ids, .id_table = sedlbauer_ids,
.suspend = sedlbauer_suspend, .suspend = sedlbauer_suspend,
.resume = sedlbauer_resume, .resume = sedlbauer_resume,

View File

@ -57,7 +57,7 @@ module_param(protocol, int, 0);
handler. handler.
*/ */
static int teles_cs_config(struct pcmcia_device *link); static int teles_cs_config(struct pcmcia_device *link) __devinit ;
static void teles_cs_release(struct pcmcia_device *link); static void teles_cs_release(struct pcmcia_device *link);
/* /*
@ -66,7 +66,7 @@ static void teles_cs_release(struct pcmcia_device *link);
needed to manage one actual PCMCIA card. needed to manage one actual PCMCIA card.
*/ */
static void teles_detach(struct pcmcia_device *p_dev); static void teles_detach(struct pcmcia_device *p_dev) __devexit ;
/* /*
A linked list of "instances" of the teles_cs device. Each actual A linked list of "instances" of the teles_cs device. Each actual
@ -112,7 +112,7 @@ typedef struct local_info_t {
======================================================================*/ ======================================================================*/
static int teles_probe(struct pcmcia_device *link) static int __devinit teles_probe(struct pcmcia_device *link)
{ {
local_info_t *local; local_info_t *local;
@ -156,7 +156,7 @@ static int teles_probe(struct pcmcia_device *link)
======================================================================*/ ======================================================================*/
static void teles_detach(struct pcmcia_device *link) static void __devexit teles_detach(struct pcmcia_device *link)
{ {
local_info_t *info = link->priv; local_info_t *info = link->priv;
@ -200,7 +200,7 @@ static int teles_cs_configcheck(struct pcmcia_device *p_dev,
return -ENODEV; return -ENODEV;
} }
static int teles_cs_config(struct pcmcia_device *link) static int __devinit teles_cs_config(struct pcmcia_device *link)
{ {
local_info_t *dev; local_info_t *dev;
int i; int i;
@ -319,7 +319,7 @@ static struct pcmcia_driver teles_cs_driver = {
.name = "teles_cs", .name = "teles_cs",
}, },
.probe = teles_probe, .probe = teles_probe,
.remove = teles_detach, .remove = __devexit_p(teles_detach),
.id_table = teles_ids, .id_table = teles_ids,
.suspend = teles_suspend, .suspend = teles_suspend,
.resume = teles_resume, .resume = teles_resume,

View File

@ -246,6 +246,8 @@ static const struct flash_spec flash_5709 = {
MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl); MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl);
static void bnx2_init_napi(struct bnx2 *bp);
static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr) static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr)
{ {
u32 diff; u32 diff;
@ -6197,6 +6199,7 @@ bnx2_open(struct net_device *dev)
bnx2_disable_int(bp); bnx2_disable_int(bp);
bnx2_setup_int_mode(bp, disable_msi); bnx2_setup_int_mode(bp, disable_msi);
bnx2_init_napi(bp);
bnx2_napi_enable(bp); bnx2_napi_enable(bp);
rc = bnx2_alloc_mem(bp); rc = bnx2_alloc_mem(bp);
if (rc) if (rc)
@ -7643,9 +7646,11 @@ poll_bnx2(struct net_device *dev)
int i; int i;
for (i = 0; i < bp->irq_nvecs; i++) { for (i = 0; i < bp->irq_nvecs; i++) {
disable_irq(bp->irq_tbl[i].vector); struct bnx2_irq *irq = &bp->irq_tbl[i];
bnx2_interrupt(bp->irq_tbl[i].vector, &bp->bnx2_napi[i]);
enable_irq(bp->irq_tbl[i].vector); disable_irq(irq->vector);
irq->handler(irq->vector, &bp->bnx2_napi[i]);
enable_irq(irq->vector);
} }
} }
#endif #endif
@ -8207,7 +8212,7 @@ bnx2_init_napi(struct bnx2 *bp)
{ {
int i; int i;
for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { for (i = 0; i < bp->irq_nvecs; i++) {
struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; struct bnx2_napi *bnapi = &bp->bnx2_napi[i];
int (*poll)(struct napi_struct *, int); int (*poll)(struct napi_struct *, int);
@ -8276,7 +8281,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->ethtool_ops = &bnx2_ethtool_ops; dev->ethtool_ops = &bnx2_ethtool_ops;
bp = netdev_priv(dev); bp = netdev_priv(dev);
bnx2_init_napi(bp);
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);

View File

@ -22,96 +22,13 @@
#include <linux/can/dev.h> #include <linux/can/dev.h>
#include <linux/can/error.h> #include <linux/can/error.h>
#include <asm/bfin_can.h>
#include <asm/portmux.h> #include <asm/portmux.h>
#define DRV_NAME "bfin_can" #define DRV_NAME "bfin_can"
#define BFIN_CAN_TIMEOUT 100 #define BFIN_CAN_TIMEOUT 100
#define TX_ECHO_SKB_MAX 1 #define TX_ECHO_SKB_MAX 1
/*
* transmit and receive channels
*/
#define TRANSMIT_CHL 24
#define RECEIVE_STD_CHL 0
#define RECEIVE_EXT_CHL 4
#define RECEIVE_RTR_CHL 8
#define RECEIVE_EXT_RTR_CHL 12
#define MAX_CHL_NUMBER 32
/*
* bfin can registers layout
*/
struct bfin_can_mask_regs {
u16 aml;
u16 dummy1;
u16 amh;
u16 dummy2;
};
struct bfin_can_channel_regs {
u16 data[8];
u16 dlc;
u16 dummy1;
u16 tsv;
u16 dummy2;
u16 id0;
u16 dummy3;
u16 id1;
u16 dummy4;
};
struct bfin_can_regs {
/*
* global control and status registers
*/
u16 mc1; /* offset 0 */
u16 dummy1;
u16 md1; /* offset 4 */
u16 rsv1[13];
u16 mbtif1; /* offset 0x20 */
u16 dummy2;
u16 mbrif1; /* offset 0x24 */
u16 dummy3;
u16 mbim1; /* offset 0x28 */
u16 rsv2[11];
u16 mc2; /* offset 0x40 */
u16 dummy4;
u16 md2; /* offset 0x44 */
u16 dummy5;
u16 trs2; /* offset 0x48 */
u16 rsv3[11];
u16 mbtif2; /* offset 0x60 */
u16 dummy6;
u16 mbrif2; /* offset 0x64 */
u16 dummy7;
u16 mbim2; /* offset 0x68 */
u16 rsv4[11];
u16 clk; /* offset 0x80 */
u16 dummy8;
u16 timing; /* offset 0x84 */
u16 rsv5[3];
u16 status; /* offset 0x8c */
u16 dummy9;
u16 cec; /* offset 0x90 */
u16 dummy10;
u16 gis; /* offset 0x94 */
u16 dummy11;
u16 gim; /* offset 0x98 */
u16 rsv6[3];
u16 ctrl; /* offset 0xa0 */
u16 dummy12;
u16 intr; /* offset 0xa4 */
u16 rsv7[7];
u16 esr; /* offset 0xb4 */
u16 rsv8[37];
/*
* channel(mailbox) mask and message registers
*/
struct bfin_can_mask_regs msk[MAX_CHL_NUMBER]; /* offset 0x100 */
struct bfin_can_channel_regs chl[MAX_CHL_NUMBER]; /* offset 0x200 */
};
/* /*
* bfin can private data * bfin can private data
*/ */
@ -163,7 +80,7 @@ static int bfin_can_set_bittiming(struct net_device *dev)
if (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES) if (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES)
timing |= SAM; timing |= SAM;
bfin_write16(&reg->clk, clk); bfin_write16(&reg->clock, clk);
bfin_write16(&reg->timing, timing); bfin_write16(&reg->timing, timing);
dev_info(dev->dev.parent, "setting CLOCK=0x%04x TIMING=0x%04x\n", dev_info(dev->dev.parent, "setting CLOCK=0x%04x TIMING=0x%04x\n",
@ -185,11 +102,11 @@ static void bfin_can_set_reset_mode(struct net_device *dev)
bfin_write16(&reg->gim, 0); bfin_write16(&reg->gim, 0);
/* reset can and enter configuration mode */ /* reset can and enter configuration mode */
bfin_write16(&reg->ctrl, SRS | CCR); bfin_write16(&reg->control, SRS | CCR);
SSYNC(); SSYNC();
bfin_write16(&reg->ctrl, CCR); bfin_write16(&reg->control, CCR);
SSYNC(); SSYNC();
while (!(bfin_read16(&reg->ctrl) & CCA)) { while (!(bfin_read16(&reg->control) & CCA)) {
udelay(10); udelay(10);
if (--timeout == 0) { if (--timeout == 0) {
dev_err(dev->dev.parent, dev_err(dev->dev.parent,
@ -244,7 +161,7 @@ static void bfin_can_set_normal_mode(struct net_device *dev)
/* /*
* leave configuration mode * leave configuration mode
*/ */
bfin_write16(&reg->ctrl, bfin_read16(&reg->ctrl) & ~CCR); bfin_write16(&reg->control, bfin_read16(&reg->control) & ~CCR);
while (bfin_read16(&reg->status) & CCA) { while (bfin_read16(&reg->status) & CCA) {
udelay(10); udelay(10);
@ -726,7 +643,7 @@ static int bfin_can_suspend(struct platform_device *pdev, pm_message_t mesg)
if (netif_running(dev)) { if (netif_running(dev)) {
/* enter sleep mode */ /* enter sleep mode */
bfin_write16(&reg->ctrl, bfin_read16(&reg->ctrl) | SMR); bfin_write16(&reg->control, bfin_read16(&reg->control) | SMR);
SSYNC(); SSYNC();
while (!(bfin_read16(&reg->intr) & SMACK)) { while (!(bfin_read16(&reg->intr) & SMACK)) {
udelay(10); udelay(10);

View File

@ -267,7 +267,6 @@ struct igb_adapter {
/* TX */ /* TX */
struct igb_ring *tx_ring[16]; struct igb_ring *tx_ring[16];
unsigned long tx_queue_len;
u32 tx_timeout_count; u32 tx_timeout_count;
/* RX */ /* RX */

View File

@ -1105,9 +1105,6 @@ static void igb_configure(struct igb_adapter *adapter)
struct igb_ring *ring = adapter->rx_ring[i]; struct igb_ring *ring = adapter->rx_ring[i];
igb_alloc_rx_buffers_adv(ring, igb_desc_unused(ring)); igb_alloc_rx_buffers_adv(ring, igb_desc_unused(ring));
} }
adapter->tx_queue_len = netdev->tx_queue_len;
} }
/** /**
@ -1213,7 +1210,6 @@ void igb_down(struct igb_adapter *adapter)
del_timer_sync(&adapter->watchdog_timer); del_timer_sync(&adapter->watchdog_timer);
del_timer_sync(&adapter->phy_info_timer); del_timer_sync(&adapter->phy_info_timer);
netdev->tx_queue_len = adapter->tx_queue_len;
netif_carrier_off(netdev); netif_carrier_off(netdev);
/* record the stats before reset*/ /* record the stats before reset*/
@ -3106,17 +3102,13 @@ static void igb_watchdog_task(struct work_struct *work)
((ctrl & E1000_CTRL_RFCE) ? "RX" : ((ctrl & E1000_CTRL_RFCE) ? "RX" :
((ctrl & E1000_CTRL_TFCE) ? "TX" : "None"))); ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None")));
/* tweak tx_queue_len according to speed/duplex and /* adjust timeout factor according to speed/duplex */
* adjust the timeout factor */
netdev->tx_queue_len = adapter->tx_queue_len;
adapter->tx_timeout_factor = 1; adapter->tx_timeout_factor = 1;
switch (adapter->link_speed) { switch (adapter->link_speed) {
case SPEED_10: case SPEED_10:
netdev->tx_queue_len = 10;
adapter->tx_timeout_factor = 14; adapter->tx_timeout_factor = 14;
break; break;
case SPEED_100: case SPEED_100:
netdev->tx_queue_len = 100;
/* maybe add some timeout factor ? */ /* maybe add some timeout factor ? */
break; break;
} }
@ -3963,7 +3955,7 @@ void igb_update_stats(struct igb_adapter *adapter)
struct net_device_stats *net_stats = igb_get_stats(adapter->netdev); struct net_device_stats *net_stats = igb_get_stats(adapter->netdev);
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
struct pci_dev *pdev = adapter->pdev; struct pci_dev *pdev = adapter->pdev;
u32 rnbc, reg; u32 reg, mpc;
u16 phy_tmp; u16 phy_tmp;
int i; int i;
u64 bytes, packets; u64 bytes, packets;
@ -4021,7 +4013,9 @@ void igb_update_stats(struct igb_adapter *adapter)
adapter->stats.symerrs += rd32(E1000_SYMERRS); adapter->stats.symerrs += rd32(E1000_SYMERRS);
adapter->stats.sec += rd32(E1000_SEC); adapter->stats.sec += rd32(E1000_SEC);
adapter->stats.mpc += rd32(E1000_MPC); mpc = rd32(E1000_MPC);
adapter->stats.mpc += mpc;
net_stats->rx_fifo_errors += mpc;
adapter->stats.scc += rd32(E1000_SCC); adapter->stats.scc += rd32(E1000_SCC);
adapter->stats.ecol += rd32(E1000_ECOL); adapter->stats.ecol += rd32(E1000_ECOL);
adapter->stats.mcc += rd32(E1000_MCC); adapter->stats.mcc += rd32(E1000_MCC);
@ -4036,9 +4030,7 @@ void igb_update_stats(struct igb_adapter *adapter)
adapter->stats.gptc += rd32(E1000_GPTC); adapter->stats.gptc += rd32(E1000_GPTC);
adapter->stats.gotc += rd32(E1000_GOTCL); adapter->stats.gotc += rd32(E1000_GOTCL);
rd32(E1000_GOTCH); /* clear GOTCL */ rd32(E1000_GOTCH); /* clear GOTCL */
rnbc = rd32(E1000_RNBC); adapter->stats.rnbc += rd32(E1000_RNBC);
adapter->stats.rnbc += rnbc;
net_stats->rx_fifo_errors += rnbc;
adapter->stats.ruc += rd32(E1000_RUC); adapter->stats.ruc += rd32(E1000_RUC);
adapter->stats.rfc += rd32(E1000_RFC); adapter->stats.rfc += rd32(E1000_RFC);
adapter->stats.rjc += rd32(E1000_RJC); adapter->stats.rjc += rd32(E1000_RJC);
@ -5110,7 +5102,7 @@ static void igb_receive_skb(struct igb_q_vector *q_vector,
{ {
struct igb_adapter *adapter = q_vector->adapter; struct igb_adapter *adapter = q_vector->adapter;
if (vlan_tag) if (vlan_tag && adapter->vlgrp)
vlan_gro_receive(&q_vector->napi, adapter->vlgrp, vlan_gro_receive(&q_vector->napi, adapter->vlgrp,
vlan_tag, skb); vlan_tag, skb);
else else

View File

@ -6322,7 +6322,7 @@ static int netdev_set_eeprom(struct net_device *dev,
int len; int len;
if (eeprom->magic != EEPROM_MAGIC) if (eeprom->magic != EEPROM_MAGIC)
return 1; return -EINVAL;
len = (eeprom->offset + eeprom->len + 1) / 2; len = (eeprom->offset + eeprom->len + 1) / 2;
for (i = eeprom->offset / 2; i < len; i++) for (i = eeprom->offset / 2; i < len; i++)

View File

@ -1246,8 +1246,8 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
int pci_func_id = PCI_FUNC(pdev->devfn); int pci_func_id = PCI_FUNC(pdev->devfn);
uint8_t revision_id; uint8_t revision_id;
if (pdev->revision >= NX_P3_A0 && pdev->revision < NX_P3_B1) { if (pdev->revision >= NX_P3_A0 && pdev->revision <= NX_P3_B1) {
pr_warning("%s: chip revisions between 0x%x-0x%x" pr_warning("%s: chip revisions between 0x%x-0x%x "
"will not be enabled.\n", "will not be enabled.\n",
module_name(THIS_MODULE), NX_P3_A0, NX_P3_B1); module_name(THIS_MODULE), NX_P3_A0, NX_P3_B1);
return -ENODEV; return -ENODEV;

View File

@ -812,7 +812,7 @@ static void set_mii_flow_control(struct velocity_info *vptr)
case FLOW_CNTL_TX_RX: case FLOW_CNTL_TX_RX:
MII_REG_BITS_ON(ANAR_PAUSE, MII_REG_ANAR, vptr->mac_regs); MII_REG_BITS_ON(ANAR_PAUSE, MII_REG_ANAR, vptr->mac_regs);
MII_REG_BITS_ON(ANAR_ASMDIR, MII_REG_ANAR, vptr->mac_regs); MII_REG_BITS_OFF(ANAR_ASMDIR, MII_REG_ANAR, vptr->mac_regs);
break; break;
case FLOW_CNTL_DISABLE: case FLOW_CNTL_DISABLE:

View File

@ -59,6 +59,7 @@
enum nf_ip6_hook_priorities { enum nf_ip6_hook_priorities {
NF_IP6_PRI_FIRST = INT_MIN, NF_IP6_PRI_FIRST = INT_MIN,
NF_IP6_PRI_CONNTRACK_DEFRAG = -400, NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
NF_IP6_PRI_RAW = -300,
NF_IP6_PRI_SELINUX_FIRST = -225, NF_IP6_PRI_SELINUX_FIRST = -225,
NF_IP6_PRI_CONNTRACK = -200, NF_IP6_PRI_CONNTRACK = -200,
NF_IP6_PRI_MANGLE = -150, NF_IP6_PRI_MANGLE = -150,

View File

@ -190,9 +190,6 @@ struct skb_shared_info {
atomic_t dataref; atomic_t dataref;
unsigned short nr_frags; unsigned short nr_frags;
unsigned short gso_size; unsigned short gso_size;
#ifdef CONFIG_HAS_DMA
dma_addr_t dma_head;
#endif
/* Warning: this field is not always filled in (UFO)! */ /* Warning: this field is not always filled in (UFO)! */
unsigned short gso_segs; unsigned short gso_segs;
unsigned short gso_type; unsigned short gso_type;
@ -201,9 +198,6 @@ struct skb_shared_info {
struct sk_buff *frag_list; struct sk_buff *frag_list;
struct skb_shared_hwtstamps hwtstamps; struct skb_shared_hwtstamps hwtstamps;
skb_frag_t frags[MAX_SKB_FRAGS]; skb_frag_t frags[MAX_SKB_FRAGS];
#ifdef CONFIG_HAS_DMA
dma_addr_t dma_maps[MAX_SKB_FRAGS];
#endif
/* Intermediate layers must ensure that destructor_arg /* Intermediate layers must ensure that destructor_arg
* remains valid until skb destructor */ * remains valid until skb destructor */
void * destructor_arg; void * destructor_arg;

View File

@ -378,6 +378,8 @@ static void vlan_transfer_features(struct net_device *dev,
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid; vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid;
#endif #endif
vlandev->real_num_tx_queues = dev->real_num_tx_queues;
BUG_ON(vlandev->real_num_tx_queues > vlandev->num_tx_queues);
if (old_features != vlandev->features) if (old_features != vlandev->features)
netdev_features_change(vlandev); netdev_features_change(vlandev);

View File

@ -361,6 +361,14 @@ static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
return ret; return ret;
} }
static u16 vlan_dev_select_queue(struct net_device *dev, struct sk_buff *skb)
{
struct net_device *rdev = vlan_dev_info(dev)->real_dev;
const struct net_device_ops *ops = rdev->netdev_ops;
return ops->ndo_select_queue(rdev, skb);
}
static int vlan_dev_change_mtu(struct net_device *dev, int new_mtu) static int vlan_dev_change_mtu(struct net_device *dev, int new_mtu)
{ {
/* TODO: gotta make sure the underlying layer can handle it, /* TODO: gotta make sure the underlying layer can handle it,
@ -688,7 +696,8 @@ static const struct header_ops vlan_header_ops = {
.parse = eth_header_parse, .parse = eth_header_parse,
}; };
static const struct net_device_ops vlan_netdev_ops, vlan_netdev_accel_ops; static const struct net_device_ops vlan_netdev_ops, vlan_netdev_accel_ops,
vlan_netdev_ops_sq, vlan_netdev_accel_ops_sq;
static int vlan_dev_init(struct net_device *dev) static int vlan_dev_init(struct net_device *dev)
{ {
@ -722,11 +731,17 @@ static int vlan_dev_init(struct net_device *dev)
if (real_dev->features & NETIF_F_HW_VLAN_TX) { if (real_dev->features & NETIF_F_HW_VLAN_TX) {
dev->header_ops = real_dev->header_ops; dev->header_ops = real_dev->header_ops;
dev->hard_header_len = real_dev->hard_header_len; dev->hard_header_len = real_dev->hard_header_len;
dev->netdev_ops = &vlan_netdev_accel_ops; if (real_dev->netdev_ops->ndo_select_queue)
dev->netdev_ops = &vlan_netdev_accel_ops_sq;
else
dev->netdev_ops = &vlan_netdev_accel_ops;
} else { } else {
dev->header_ops = &vlan_header_ops; dev->header_ops = &vlan_header_ops;
dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN; dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN;
dev->netdev_ops = &vlan_netdev_ops; if (real_dev->netdev_ops->ndo_select_queue)
dev->netdev_ops = &vlan_netdev_ops_sq;
else
dev->netdev_ops = &vlan_netdev_ops;
} }
if (is_vlan_dev(real_dev)) if (is_vlan_dev(real_dev))
@ -865,6 +880,56 @@ static const struct net_device_ops vlan_netdev_accel_ops = {
#endif #endif
}; };
static const struct net_device_ops vlan_netdev_ops_sq = {
.ndo_select_queue = vlan_dev_select_queue,
.ndo_change_mtu = vlan_dev_change_mtu,
.ndo_init = vlan_dev_init,
.ndo_uninit = vlan_dev_uninit,
.ndo_open = vlan_dev_open,
.ndo_stop = vlan_dev_stop,
.ndo_start_xmit = vlan_dev_hard_start_xmit,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = vlan_dev_set_mac_address,
.ndo_set_rx_mode = vlan_dev_set_rx_mode,
.ndo_set_multicast_list = vlan_dev_set_rx_mode,
.ndo_change_rx_flags = vlan_dev_change_rx_flags,
.ndo_do_ioctl = vlan_dev_ioctl,
.ndo_neigh_setup = vlan_dev_neigh_setup,
.ndo_get_stats = vlan_dev_get_stats,
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
.ndo_fcoe_ddp_setup = vlan_dev_fcoe_ddp_setup,
.ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done,
.ndo_fcoe_enable = vlan_dev_fcoe_enable,
.ndo_fcoe_disable = vlan_dev_fcoe_disable,
.ndo_fcoe_get_wwn = vlan_dev_fcoe_get_wwn,
#endif
};
static const struct net_device_ops vlan_netdev_accel_ops_sq = {
.ndo_select_queue = vlan_dev_select_queue,
.ndo_change_mtu = vlan_dev_change_mtu,
.ndo_init = vlan_dev_init,
.ndo_uninit = vlan_dev_uninit,
.ndo_open = vlan_dev_open,
.ndo_stop = vlan_dev_stop,
.ndo_start_xmit = vlan_dev_hwaccel_hard_start_xmit,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = vlan_dev_set_mac_address,
.ndo_set_rx_mode = vlan_dev_set_rx_mode,
.ndo_set_multicast_list = vlan_dev_set_rx_mode,
.ndo_change_rx_flags = vlan_dev_change_rx_flags,
.ndo_do_ioctl = vlan_dev_ioctl,
.ndo_neigh_setup = vlan_dev_neigh_setup,
.ndo_get_stats = vlan_dev_get_stats,
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
.ndo_fcoe_ddp_setup = vlan_dev_fcoe_ddp_setup,
.ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done,
.ndo_fcoe_enable = vlan_dev_fcoe_enable,
.ndo_fcoe_disable = vlan_dev_fcoe_disable,
.ndo_fcoe_get_wwn = vlan_dev_fcoe_get_wwn,
#endif
};
void vlan_setup(struct net_device *dev) void vlan_setup(struct net_device *dev)
{ {
ether_setup(dev); ether_setup(dev);

View File

@ -614,7 +614,7 @@ void netpoll_print_options(struct netpoll *np)
np->name, np->local_port); np->name, np->local_port);
printk(KERN_INFO "%s: local IP %pI4\n", printk(KERN_INFO "%s: local IP %pI4\n",
np->name, &np->local_ip); np->name, &np->local_ip);
printk(KERN_INFO "%s: interface %s\n", printk(KERN_INFO "%s: interface '%s'\n",
np->name, np->dev_name); np->name, np->dev_name);
printk(KERN_INFO "%s: remote port %d\n", printk(KERN_INFO "%s: remote port %d\n",
np->name, np->remote_port); np->name, np->remote_port);
@ -661,6 +661,9 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
if ((delim = strchr(cur, '@')) == NULL) if ((delim = strchr(cur, '@')) == NULL)
goto parse_failed; goto parse_failed;
*delim = 0; *delim = 0;
if (*cur == ' ' || *cur == '\t')
printk(KERN_INFO "%s: warning: whitespace"
"is not allowed\n", np->name);
np->remote_port = simple_strtol(cur, NULL, 10); np->remote_port = simple_strtol(cur, NULL, 10);
cur = delim; cur = delim;
} }
@ -708,7 +711,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
return 0; return 0;
parse_failed: parse_failed:
printk(KERN_INFO "%s: couldn't parse config at %s!\n", printk(KERN_INFO "%s: couldn't parse config at '%s'!\n",
np->name, cur); np->name, cur);
return -1; return -1;
} }

View File

@ -13,7 +13,7 @@ static const struct xt_table packet_raw = {
.valid_hooks = RAW_VALID_HOOKS, .valid_hooks = RAW_VALID_HOOKS,
.me = THIS_MODULE, .me = THIS_MODULE,
.af = NFPROTO_IPV6, .af = NFPROTO_IPV6,
.priority = NF_IP6_PRI_FIRST, .priority = NF_IP6_PRI_RAW,
}; };
/* The work comes in here from netfilter.c. */ /* The work comes in here from netfilter.c. */

View File

@ -2129,10 +2129,9 @@ static int key_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *c
int err; int err;
out_skb = pfkey_xfrm_policy2msg_prep(xp); out_skb = pfkey_xfrm_policy2msg_prep(xp);
if (IS_ERR(out_skb)) { if (IS_ERR(out_skb))
err = PTR_ERR(out_skb); return PTR_ERR(out_skb);
goto out;
}
err = pfkey_xfrm_policy2msg(out_skb, xp, dir); err = pfkey_xfrm_policy2msg(out_skb, xp, dir);
if (err < 0) if (err < 0)
return err; return err;
@ -2148,7 +2147,6 @@ static int key_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *c
out_hdr->sadb_msg_seq = c->seq; out_hdr->sadb_msg_seq = c->seq;
out_hdr->sadb_msg_pid = c->pid; out_hdr->sadb_msg_pid = c->pid;
pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ALL, NULL, xp_net(xp)); pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ALL, NULL, xp_net(xp));
out:
return 0; return 0;
} }

View File

@ -493,6 +493,7 @@ static void hashlimit_ipv6_mask(__be32 *i, unsigned int p)
case 64 ... 95: case 64 ... 95:
i[2] = maskl(i[2], p - 64); i[2] = maskl(i[2], p - 64);
i[3] = 0; i[3] = 0;
break;
case 96 ... 127: case 96 ... 127:
i[3] = maskl(i[3], p - 96); i[3] = maskl(i[3], p - 96);
break; break;
@ -879,7 +880,8 @@ static void dl_seq_stop(struct seq_file *s, void *v)
struct xt_hashlimit_htable *htable = s->private; struct xt_hashlimit_htable *htable = s->private;
unsigned int *bucket = (unsigned int *)v; unsigned int *bucket = (unsigned int *)v;
kfree(bucket); if (!IS_ERR(bucket))
kfree(bucket);
spin_unlock_bh(&htable->lock); spin_unlock_bh(&htable->lock);
} }

View File

@ -267,7 +267,7 @@ recent_mt(const struct sk_buff *skb, const struct xt_match_param *par)
for (i = 0; i < e->nstamps; i++) { for (i = 0; i < e->nstamps; i++) {
if (info->seconds && time_after(time, e->stamps[i])) if (info->seconds && time_after(time, e->stamps[i]))
continue; continue;
if (info->hit_count && ++hits >= info->hit_count) { if (!info->hit_count || ++hits >= info->hit_count) {
ret = !ret; ret = !ret;
break; break;
} }

View File

@ -328,13 +328,16 @@ config NET_CLS_FLOW
module will be called cls_flow. module will be called cls_flow.
config NET_CLS_CGROUP config NET_CLS_CGROUP
bool "Control Group Classifier" tristate "Control Group Classifier"
select NET_CLS select NET_CLS
depends on CGROUPS depends on CGROUPS
---help--- ---help---
Say Y here if you want to classify packets based on the control Say Y here if you want to classify packets based on the control
cgroup of their process. cgroup of their process.
To compile this code as a module, choose M here: the
module will be called cls_cgroup.
config NET_EMATCH config NET_EMATCH
bool "Extended Matches" bool "Extended Matches"
select NET_CLS select NET_CLS

View File

@ -24,6 +24,25 @@ struct cgroup_cls_state
u32 classid; u32 classid;
}; };
static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss,
struct cgroup *cgrp);
static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp);
struct cgroup_subsys net_cls_subsys = {
.name = "net_cls",
.create = cgrp_create,
.destroy = cgrp_destroy,
.populate = cgrp_populate,
#ifdef CONFIG_NET_CLS_CGROUP
.subsys_id = net_cls_subsys_id,
#else
#define net_cls_subsys_id net_cls_subsys.subsys_id
#endif
.module = THIS_MODULE,
};
static inline struct cgroup_cls_state *cgrp_cls_state(struct cgroup *cgrp) static inline struct cgroup_cls_state *cgrp_cls_state(struct cgroup *cgrp)
{ {
return container_of(cgroup_subsys_state(cgrp, net_cls_subsys_id), return container_of(cgroup_subsys_state(cgrp, net_cls_subsys_id),
@ -79,14 +98,6 @@ static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
return cgroup_add_files(cgrp, ss, ss_files, ARRAY_SIZE(ss_files)); return cgroup_add_files(cgrp, ss, ss_files, ARRAY_SIZE(ss_files));
} }
struct cgroup_subsys net_cls_subsys = {
.name = "net_cls",
.create = cgrp_create,
.destroy = cgrp_destroy,
.populate = cgrp_populate,
.subsys_id = net_cls_subsys_id,
};
struct cls_cgroup_head struct cls_cgroup_head
{ {
u32 handle; u32 handle;
@ -277,12 +288,19 @@ static struct tcf_proto_ops cls_cgroup_ops __read_mostly = {
static int __init init_cgroup_cls(void) static int __init init_cgroup_cls(void)
{ {
return register_tcf_proto_ops(&cls_cgroup_ops); int ret = register_tcf_proto_ops(&cls_cgroup_ops);
if (ret)
return ret;
ret = cgroup_load_subsys(&net_cls_subsys);
if (ret)
unregister_tcf_proto_ops(&cls_cgroup_ops);
return ret;
} }
static void __exit exit_cgroup_cls(void) static void __exit exit_cgroup_cls(void)
{ {
unregister_tcf_proto_ops(&cls_cgroup_ops); unregister_tcf_proto_ops(&cls_cgroup_ops);
cgroup_unload_subsys(&net_cls_subsys);
} }
module_init(init_cgroup_cls); module_init(init_cgroup_cls);