Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Browse files Browse the repository at this point in the history
Conflicts:
	net/ipv4/inet_diag.c
  • Loading branch information
davem330 committed Nov 26, 2011
2 parents d6f03f2 + fc0b927 commit 6dec4ac
Show file tree
Hide file tree
Showing 42 changed files with 162 additions and 93 deletions.
2 changes: 1 addition & 1 deletion drivers/net/arcnet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

menuconfig ARCNET
depends on NETDEVICES && (ISA || PCI || PCMCIA)
bool "ARCnet support"
tristate "ARCnet support"
---help---
If you have a network card of this type, say Y and check out the
(arguably) beautiful poetry in
Expand Down
1 change: 0 additions & 1 deletion drivers/net/can/sja1000/peak_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/

#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ static void b44_tx(struct b44 *bp)
skb->len,
DMA_TO_DEVICE);
rp->skb = NULL;
dev_kfree_skb(skb);
dev_kfree_skb_irq(skb);
}

bp->tx_cons = cons;
Expand Down
39 changes: 38 additions & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -10327,6 +10327,43 @@ static int bnx2x_54618se_config_init(struct bnx2x_phy *phy,
return 0;
}


static void bnx2x_5461x_set_link_led(struct bnx2x_phy *phy,
struct link_params *params, u8 mode)
{
struct bnx2x *bp = params->bp;
u16 temp;

bnx2x_cl22_write(bp, phy,
MDIO_REG_GPHY_SHADOW,
MDIO_REG_GPHY_SHADOW_LED_SEL1);
bnx2x_cl22_read(bp, phy,
MDIO_REG_GPHY_SHADOW,
&temp);
temp &= 0xff00;

DP(NETIF_MSG_LINK, "54618x set link led (mode=%x)\n", mode);
switch (mode) {
case LED_MODE_FRONT_PANEL_OFF:
case LED_MODE_OFF:
temp |= 0x00ee;
break;
case LED_MODE_OPER:
temp |= 0x0001;
break;
case LED_MODE_ON:
temp |= 0x00ff;
break;
default:
break;
}
bnx2x_cl22_write(bp, phy,
MDIO_REG_GPHY_SHADOW,
MDIO_REG_GPHY_SHADOW_WR_ENA | temp);
return;
}


static void bnx2x_54618se_link_reset(struct bnx2x_phy *phy,
struct link_params *params)
{
Expand Down Expand Up @@ -11103,7 +11140,7 @@ static struct bnx2x_phy phy_54618se = {
.config_loopback = (config_loopback_t)bnx2x_54618se_config_loopback,
.format_fw_ver = (format_fw_ver_t)NULL,
.hw_reset = (hw_reset_t)NULL,
.set_link_led = (set_link_led_t)NULL,
.set_link_led = (set_link_led_t)bnx2x_5461x_set_link_led,
.phy_specific_func = (phy_specific_func_t)NULL
};
/*****************************************************************/
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6990,6 +6990,7 @@ Theotherbitsarereservedandshouldbezero*/
#define MDIO_REG_INTR_MASK 0x1b
#define MDIO_REG_INTR_MASK_LINK_STATUS (0x1 << 1)
#define MDIO_REG_GPHY_SHADOW 0x1c
#define MDIO_REG_GPHY_SHADOW_LED_SEL1 (0x0d << 10)
#define MDIO_REG_GPHY_SHADOW_LED_SEL2 (0x0e << 10)
#define MDIO_REG_GPHY_SHADOW_WR_ENA (0x1 << 15)
#define MDIO_REG_GPHY_SHADOW_AUTO_DET_MED (0x1e << 10)
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/ibm/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
#ifdef EHEA_SMALL_QUEUES
#define EHEA_MAX_CQE_COUNT 1023
#define EHEA_DEF_ENTRIES_SQ 1023
#define EHEA_DEF_ENTRIES_RQ1 4095
#define EHEA_DEF_ENTRIES_RQ1 1023
#define EHEA_DEF_ENTRIES_RQ2 1023
#define EHEA_DEF_ENTRIES_RQ3 1023
#define EHEA_DEF_ENTRIES_RQ3 511
#else
#define EHEA_MAX_CQE_COUNT 4080
#define EHEA_DEF_ENTRIES_SQ 4080
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/ethernet/ibm/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ static void ehea_update_stats(struct work_struct *work)
out_herr:
free_page((unsigned long)cb2);
resched:
schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000));
schedule_delayed_work(&port->stats_work,
round_jiffies_relative(msecs_to_jiffies(1000)));
}

static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes)
Expand Down Expand Up @@ -2434,7 +2435,8 @@ static int ehea_open(struct net_device *dev)
}

mutex_unlock(&port->port_lock);
schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000));
schedule_delayed_work(&port->stats_work,
round_jiffies_relative(msecs_to_jiffies(1000)));

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ibm/iseries_veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ static void veth_receive(struct veth_lpar_connection *cnx,

/* FIXME: do we need this? */
memset(local_list, 0, sizeof(local_list));
memset(remote_list, 0, sizeof(VETH_MAX_FRAMES_PER_MSG));
memset(remote_list, 0, sizeof(remote_list));

/* a 0 address marks the end of the valid entries */
if (senddata->addr[startchunk] == 0)
Expand Down
8 changes: 3 additions & 5 deletions drivers/net/ethernet/qlogic/qlge/qlge.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@


#define TX_DESC_PER_IOCB 8
/* The maximum number of frags we handle is based
* on PAGE_SIZE...
*/
#if (PAGE_SHIFT == 12) || (PAGE_SHIFT == 13) /* 4k & 8k pages */

#if ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2) > 0
#define TX_DESC_PER_OAL ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2)
#else /* all other page sizes */
#define TX_DESC_PER_OAL 0
Expand Down Expand Up @@ -1353,7 +1351,7 @@ struct tx_ring_desc {
struct ob_mac_iocb_req *queue_entry;
u32 index;
struct oal oal;
struct map_list map[MAX_SKB_FRAGS + 1];
struct map_list map[MAX_SKB_FRAGS + 2];
int map_cnt;
struct tx_ring_desc *next;
};
Expand Down
14 changes: 9 additions & 5 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,15 @@ static void stmmac_mmc_setup(struct stmmac_priv *priv)
unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET |
MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET;

/* Do not manage MMC IRQ (FIXME) */
/* Mask MMC irq, counters are managed in SW and registers
* are cleared on each READ eventually. */
dwmac_mmc_intr_all_mask(priv->ioaddr);
dwmac_mmc_ctrl(priv->ioaddr, mode);
memset(&priv->mmc, 0, sizeof(struct stmmac_counters));

if (priv->dma_cap.rmon) {
dwmac_mmc_ctrl(priv->ioaddr, mode);
memset(&priv->mmc, 0, sizeof(struct stmmac_counters));
} else
pr_info(" No MAC Management Counters available");
}

static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv)
Expand Down Expand Up @@ -1012,8 +1017,7 @@ static int stmmac_open(struct net_device *dev)
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
priv->xstats.threshold = tc;

if (priv->dma_cap.rmon)
stmmac_mmc_setup(priv);
stmmac_mmc_setup(priv);

/* Start the ball rolling... */
DBG(probe, DEBUG, "%s: DMA RX/TX processes started...\n", dev->name);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/phy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

menuconfig PHYLIB
bool "PHY Device support and infrastructure"
tristate "PHY Device support and infrastructure"
depends on !S390
depends on NETDEVICES
help
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/p54/p54spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,15 +588,15 @@ static void p54spi_op_stop(struct ieee80211_hw *dev)

WARN_ON(priv->fw_state != FW_STATE_READY);

cancel_work_sync(&priv->work);

p54spi_power_off(priv);
spin_lock_irqsave(&priv->tx_lock, flags);
INIT_LIST_HEAD(&priv->tx_pending);
spin_unlock_irqrestore(&priv->tx_lock, flags);

priv->fw_state = FW_STATE_OFF;
mutex_unlock(&priv->mutex);

cancel_work_sync(&priv->work);
}

static int __devinit p54spi_probe(struct spi_device *spi)
Expand Down Expand Up @@ -656,6 +656,7 @@ static int __devinit p54spi_probe(struct spi_device *spi)
init_completion(&priv->fw_comp);
INIT_LIST_HEAD(&priv->tx_pending);
mutex_init(&priv->mutex);
spin_lock_init(&priv->tx_lock);
SET_IEEE80211_DEV(hw, &spi->dev);
priv->common.open = p54spi_op_start;
priv->common.stop = p54spi_op_stop;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/prism54/isl_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
dwrq->flags = 0;
dwrq->length = 0;
}
essid->octets[essid->length] = '\0';
essid->octets[dwrq->length] = '\0';
memcpy(extra, essid->octets, dwrq->length);
kfree(essid);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt2800lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -3771,7 +3771,7 @@ static void rt2800_efuse_read(struct rt2x00_dev *rt2x00dev, unsigned int i)
/* Apparently the data is read from end to start */
rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, &reg);
/* The returned value is in CPU order, but eeprom is le */
rt2x00dev->eeprom[i] = cpu_to_le32(reg);
*(u32 *)&rt2x00dev->eeprom[i] = cpu_to_le32(reg);
rt2800_register_read_lock(rt2x00dev, EFUSE_DATA2, &reg);
*(u32 *)&rt2x00dev->eeprom[i + 2] = cpu_to_le32(reg);
rt2800_register_read_lock(rt2x00dev, EFUSE_DATA1, &reg);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/xen-netback/netback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ static int xen_netbk_tx_check_gop(struct xen_netbk *netbk,
pending_idx = *((u16 *)skb->data);
xen_netbk_idx_release(netbk, pending_idx);
for (j = start; j < i; j++) {
pending_idx = frag_get_pending_idx(&shinfo->frags[i]);
pending_idx = frag_get_pending_idx(&shinfo->frags[j]);
xen_netbk_idx_release(netbk, pending_idx);
}

Expand Down
6 changes: 3 additions & 3 deletions include/linux/pkt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/

struct tc_stats {
__u64 bytes; /* NUmber of enqueues bytes */
__u64 bytes; /* Number of enqueued bytes */
__u32 packets; /* Number of enqueued packets */
__u32 drops; /* Packets dropped because of lack of resources */
__u32 overlimits; /* Number of throttle events when this
Expand Down Expand Up @@ -297,7 +297,7 @@ struct tc_htb_glob {
__u32 debug; /* debug flags */

/* stats */
__u32 direct_pkts; /* count of non shapped packets */
__u32 direct_pkts; /* count of non shaped packets */
};
enum {
TCA_HTB_UNSPEC,
Expand Down Expand Up @@ -503,7 +503,7 @@ enum {
};
#define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1)

/* State transition probablities for 4 state model */
/* State transition probabilities for 4 state model */
struct tc_netem_gimodel {
__u32 p13;
__u32 p31;
Expand Down
7 changes: 1 addition & 6 deletions include/net/dst.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,7 @@ dst_feature(const struct dst_entry *dst, u32 feature)

static inline u32 dst_mtu(const struct dst_entry *dst)
{
u32 mtu = dst_metric_raw(dst, RTAX_MTU);

if (!mtu)
mtu = dst->ops->default_mtu(dst);

return mtu;
return dst->ops->mtu(dst);
}

/* RTT metrics are stored in milliseconds for user ABI, but used as jiffies */
Expand Down
2 changes: 1 addition & 1 deletion include/net/dst_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct dst_ops {
int (*gc)(struct dst_ops *ops);
struct dst_entry * (*check)(struct dst_entry *, __u32 cookie);
unsigned int (*default_advmss)(const struct dst_entry *);
unsigned int (*default_mtu)(const struct dst_entry *);
unsigned int (*mtu)(const struct dst_entry *);
u32 * (*cow_metrics)(struct dst_entry *, unsigned long);
void (*destroy)(struct dst_entry *);
void (*ifdown)(struct dst_entry *,
Expand Down
2 changes: 2 additions & 0 deletions include/net/inet_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
/** struct ip_options - IP Options
*
* @faddr - Saved first hop address
* @nexthop - Saved nexthop address in LSRR and SSRR
* @is_data - Options in __data, rather than skb
* @is_strictroute - Strict source route
* @srr_is_hit - Packet destination addr was our one
Expand All @@ -41,6 +42,7 @@
*/
struct ip_options {
__be32 faddr;
__be32 nexthop;
unsigned char optlen;
unsigned char srr;
unsigned char rr;
Expand Down
4 changes: 2 additions & 2 deletions include/net/route.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ struct rtable {
struct fib_info *fi; /* for client ref to shared metrics */
};

static inline bool rt_is_input_route(struct rtable *rt)
static inline bool rt_is_input_route(const struct rtable *rt)
{
return rt->rt_route_iif != 0;
}

static inline bool rt_is_output_route(struct rtable *rt)
static inline bool rt_is_output_route(const struct rtable *rt)
{
return rt->rt_route_iif == 0;
}
Expand Down
11 changes: 6 additions & 5 deletions net/caif/cffrml.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,21 @@ static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt)

static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt)
{
int tmp;
u16 chks;
u16 len;
__le16 data;

struct cffrml *this = container_obj(layr);
if (this->dofcs) {
chks = cfpkt_iterate(pkt, cffrml_checksum, 0xffff);
tmp = cpu_to_le16(chks);
cfpkt_add_trail(pkt, &tmp, 2);
data = cpu_to_le16(chks);
cfpkt_add_trail(pkt, &data, 2);
} else {
cfpkt_pad_trail(pkt, 2);
}
len = cfpkt_getlen(pkt);
tmp = cpu_to_le16(len);
cfpkt_add_head(pkt, &tmp, 2);
data = cpu_to_le16(len);
cfpkt_add_head(pkt, &data, 2);
cfpkt_info(pkt)->hdr_len += 2;
if (cfpkt_erroneous(pkt)) {
pr_err("Packet is erroneous!\n");
Expand Down
5 changes: 4 additions & 1 deletion net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -2414,7 +2414,10 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq,
struct net *net = seq_file_net(seq);
struct neigh_table *tbl = state->tbl;

pn = pn->next;
do {
pn = pn->next;
} while (pn && !net_eq(pneigh_net(pn), net));

while (!pn) {
if (++state->bucket > PNEIGH_HASHMASK)
break;
Expand Down
2 changes: 1 addition & 1 deletion net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -2279,7 +2279,7 @@ static int skb_prepare_for_shift(struct sk_buff *skb)
* @shiftlen: shift up to this many bytes
*
* Attempts to shift up to shiftlen worth of bytes, which may be less than
* the length of the skb, from tgt to skb. Returns number bytes shifted.
* the length of the skb, from skb to tgt. Returns number bytes shifted.
* It's up to caller to free skb if everything was shifted.
*
* If @tgt runs out of frags, the whole operation is aborted.
Expand Down
1 change: 1 addition & 0 deletions net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
rt = ip_route_newports(fl4, rt, orig_sport, orig_dport,
inet->inet_sport, inet->inet_dport, sk);
if (IS_ERR(rt)) {
err = PTR_ERR(rt);
rt = NULL;
goto failure;
}
Expand Down
Loading

0 comments on commit 6dec4ac

Please sign in to comment.