Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97657
b: refs/heads/master
c: e511710
h: refs/heads/master
i:
  97655: fd97163
v: v3
  • Loading branch information
YOSHIFUJI Hideaki committed Jun 4, 2008
1 parent b4c5e50 commit ce69bd2
Show file tree
Hide file tree
Showing 39 changed files with 107 additions and 155 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6604471db5e7a33474a7f16c64d6b118fae3e74
refs/heads/master: e51171019bb0e1f9fb57c25bd2e38ce652eaea27
2 changes: 1 addition & 1 deletion trunk/Documentation/networking/bridge.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
In order to use the Ethernet bridging functionality, you'll need the
userspace tools. These programs and documentation are available
at http://www.linux-foundation.org/en/Net:Bridge. The download page is
at http://bridge.sourceforge.net. The download page is
http://prdownloads.sourceforge.net/bridge.

If you still have questions, don't hesitate to post to the mailing list
Expand Down
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ ETHERNET BRIDGE
P: Stephen Hemminger
M: shemminger@linux-foundation.org
L: bridge@lists.linux-foundation.org
W: http://www.linux-foundation.org/en/Net:Bridge
W: http://bridge.sourceforge.net/
S: Maintained

ETHERTEAM 16I DRIVER
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,6 @@ static void atl1_intr_rx(struct atl1_adapter *adapter)
/* Good Receive */
pci_unmap_page(adapter->pdev, buffer_info->dma,
buffer_info->length, PCI_DMA_FROMDEVICE);
buffer_info->dma = 0;
skb = buffer_info->skb;
length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size);

Expand Down
10 changes: 3 additions & 7 deletions trunk/drivers/net/cs89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,11 +1394,7 @@ net_open(struct net_device *dev)
#endif
if (!result) {
printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name);
release_dma:
#if ALLOW_DMA
free_dma(dev->dma);
#endif
release_irq:
release_irq:
#if ALLOW_DMA
release_dma_buff(lp);
#endif
Expand Down Expand Up @@ -1446,12 +1442,12 @@ net_open(struct net_device *dev)
if ((result = detect_bnc(dev)) != DETECTED_NONE)
break;
printk(KERN_ERR "%s: no media detected\n", dev->name);
goto release_dma;
goto release_irq;
}
switch(result) {
case DETECTED_NONE:
printk(KERN_ERR "%s: no network cable attached to configured media\n", dev->name);
goto release_dma;
goto release_irq;
case DETECTED_RJ45H:
printk(KERN_INFO "%s: using half-duplex 10Base-T (RJ-45)\n", dev->name);
break;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
#include "myri10ge_mcp.h"
#include "myri10ge_mcp_gen_header.h"

#define MYRI10GE_VERSION_STR "1.3.99-1.347"
#define MYRI10GE_VERSION_STR "1.3.2-1.287"

MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
MODULE_AUTHOR("Maintainer: help@myri.com");
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sc92031.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
skb_copy_and_csum_dev(skb, priv->tx_bufs + entry * TX_BUF_SIZE);

len = skb->len;
if (len < ETH_ZLEN) {
if (unlikely(len < ETH_ZLEN)) {
memset(priv->tx_bufs + entry * TX_BUF_SIZE + len,
0, ETH_ZLEN - len);
len = ETH_ZLEN;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sfc/falcon_xmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static int falcon_check_xaui_link_up(struct efx_nic *efx)
tries--;
}

EFX_LOG(efx, "Failed to bring XAUI link back up in %d tries!\n",
EFX_ERR(efx, "Failed to bring XAUI link back up in %d tries!\n",
max_tries);
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/sunhme.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ static __inline__ void tx_add_log(struct happy_meal *hp, unsigned int a, unsigne
struct hme_tx_logent *tlp;
unsigned long flags;

local_irq_save(flags);
save_and_cli(flags);
tlp = &tx_log[txlog_cur_entry];
tlp->tstamp = (unsigned int)jiffies;
tlp->tx_new = hp->tx_new;
tlp->tx_old = hp->tx_old;
tlp->action = a;
tlp->status = s;
txlog_cur_entry = (txlog_cur_entry + 1) & (TX_LOG_LEN - 1);
local_irq_restore(flags);
restore_flags(flags);
}
static __inline__ void tx_dump_log(void)
{
Expand Down
10 changes: 2 additions & 8 deletions trunk/drivers/net/tulip/tulip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1729,15 +1729,12 @@ static int tulip_suspend (struct pci_dev *pdev, pm_message_t state)
if (!dev)
return -EINVAL;

if (!netif_running(dev))
goto save_state;

tulip_down(dev);
if (netif_running(dev))
tulip_down(dev);

netif_device_detach(dev);
free_irq(dev->irq, dev);

save_state:
pci_save_state(pdev);
pci_disable_device(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state));
Expand All @@ -1757,9 +1754,6 @@ static int tulip_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);

if (!netif_running(dev))
return 0;

if ((retval = pci_enable_device(pdev))) {
printk (KERN_ERR "tulip: pci_enable_device failed in resume\n");
return retval;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/ucc_geth_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ static char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
"tx-frames-ok",
"tx-excessive-differ-frames",
"tx-256-511-frames",
"tx-512-1023-frames",
"tx-1024-1518-frames",
"tx-jumbo-frames",
};
Expand Down Expand Up @@ -309,7 +308,7 @@ static void uec_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
buf += UEC_TX_FW_STATS_LEN * ETH_GSTRING_LEN;
}
if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX)
memcpy(buf, rx_fw_stat_gstrings, UEC_RX_FW_STATS_LEN *
memcpy(buf, tx_fw_stat_gstrings, UEC_RX_FW_STATS_LEN *
ETH_GSTRING_LEN);
}

Expand Down
36 changes: 5 additions & 31 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ struct virtnet_info
/* Number of input buffers, and max we've ever had. */
unsigned int num, max;

/* For cleaning up after transmission. */
struct tasklet_struct tasklet;

/* Receive & send queues. */
struct sk_buff_head recv;
struct sk_buff_head send;
Expand All @@ -71,13 +68,8 @@ static void skb_xmit_done(struct virtqueue *svq)

/* Suppress further interrupts. */
svq->vq_ops->disable_cb(svq);

/* We were waiting for more output buffers. */
netif_wake_queue(vi->dev);

/* Make sure we re-xmit last_xmit_skb: if there are no more packets
* queued, start_xmit won't be called. */
tasklet_schedule(&vi->tasklet);
}

static void receive_skb(struct net_device *dev, struct sk_buff *skb,
Expand Down Expand Up @@ -286,18 +278,6 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb)
return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb);
}

static void xmit_tasklet(unsigned long data)
{
struct virtnet_info *vi = (void *)data;

netif_tx_lock_bh(vi->dev);
if (vi->last_xmit_skb && xmit_skb(vi, vi->last_xmit_skb) == 0) {
vi->svq->vq_ops->kick(vi->svq);
vi->last_xmit_skb = NULL;
}
netif_tx_unlock_bh(vi->dev);
}

static int start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct virtnet_info *vi = netdev_priv(dev);
Expand All @@ -307,25 +287,21 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
free_old_xmit_skbs(vi);

/* If we has a buffer left over from last time, send it now. */
if (unlikely(vi->last_xmit_skb)) {
if (vi->last_xmit_skb) {
if (xmit_skb(vi, vi->last_xmit_skb) != 0) {
/* Drop this skb: we only queue one. */
vi->dev->stats.tx_dropped++;
kfree_skb(skb);
skb = NULL;
goto stop_queue;
}
vi->last_xmit_skb = NULL;
}

/* Put new one in send queue and do transmit */
if (likely(skb)) {
__skb_queue_head(&vi->send, skb);
if (xmit_skb(vi, skb) != 0) {
vi->last_xmit_skb = skb;
skb = NULL;
goto stop_queue;
}
__skb_queue_head(&vi->send, skb);
if (xmit_skb(vi, skb) != 0) {
vi->last_xmit_skb = skb;
goto stop_queue;
}
done:
vi->svq->vq_ops->kick(vi->svq);
Expand Down Expand Up @@ -452,8 +428,6 @@ static int virtnet_probe(struct virtio_device *vdev)
skb_queue_head_init(&vi->recv);
skb_queue_head_init(&vi->send);

tasklet_init(&vi->tasklet, xmit_tasklet, (unsigned long)vi);

err = register_netdev(dev);
if (err) {
pr_debug("virtio_net: registering device failed\n");
Expand Down
12 changes: 6 additions & 6 deletions trunk/include/linux/in_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
#define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC

#define RTCF_NOTIFY 0x00010000
#define RTCF_DIRECTDST 0x00020000 /* unused */
#define RTCF_DIRECTDST 0x00020000
#define RTCF_REDIRECTED 0x00040000
#define RTCF_TPROXY 0x00080000 /* unused */
#define RTCF_TPROXY 0x00080000

#define RTCF_FAST 0x00200000 /* unused */
#define RTCF_MASQ 0x00400000 /* unused */
#define RTCF_SNAT 0x00800000 /* unused */
#define RTCF_FAST 0x00200000
#define RTCF_MASQ 0x00400000
#define RTCF_SNAT 0x00800000
#define RTCF_DOREDIRECT 0x01000000
#define RTCF_DIRECTSRC 0x04000000
#define RTCF_DNAT 0x08000000
#define RTCF_BROADCAST 0x10000000
#define RTCF_MULTICAST 0x20000000
#define RTCF_REJECT 0x40000000 /* unused */
#define RTCF_REJECT 0x40000000
#define RTCF_LOCAL 0x80000000

#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/inetdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ struct in_ifaddr
__be32 ifa_address;
__be32 ifa_mask;
__be32 ifa_broadcast;
__be32 ifa_anycast;
unsigned char ifa_scope;
unsigned char ifa_flags;
unsigned char ifa_prefixlen;
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/rtnetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ enum rtattr_type_t
RTA_PREFSRC,
RTA_METRICS,
RTA_MULTIPATH,
RTA_PROTOINFO, /* no longer used */
RTA_PROTOINFO,
RTA_FLOW,
RTA_CACHEINFO,
RTA_SESSION, /* no longer used */
RTA_SESSION,
RTA_MP_ALGO, /* no longer used */
RTA_TABLE,
__RTA_MAX
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/net/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr)
* @skb: socket buffer the message is stored in
* @hdr: generic netlink message header
*/
static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr)
static inline int genlmsg_cancel(struct sk_buff *skb, void *hdr)
{
nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN);
return nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN);
}

/**
Expand Down
20 changes: 11 additions & 9 deletions trunk/include/net/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,14 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb)
* @skb: socket buffer the message is stored in
* @mark: mark to trim to
*
* Trims the message to the provided mark.
* Trims the message to the provided mark. Returns -1.
*/
static inline void nlmsg_trim(struct sk_buff *skb, const void *mark)
static inline int nlmsg_trim(struct sk_buff *skb, const void *mark)
{
if (mark)
skb_trim(skb, (unsigned char *) mark - skb->data);

return -1;
}

/**
Expand All @@ -570,11 +572,11 @@ static inline void nlmsg_trim(struct sk_buff *skb, const void *mark)
* @nlh: netlink message header
*
* Removes the complete netlink message including all
* attributes from the socket buffer again.
* attributes from the socket buffer again. Returns -1.
*/
static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh)
static inline int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh)
{
nlmsg_trim(skb, nlh);
return nlmsg_trim(skb, nlh);
}

/**
Expand Down Expand Up @@ -773,7 +775,7 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype,
int nested_len = nla_len(nla) - NLA_ALIGN(len);

if (nested_len < 0)
return -EINVAL;
return -1;
if (nested_len >= nla_attr_size(0))
return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len),
nested_len, policy);
Expand Down Expand Up @@ -1078,11 +1080,11 @@ static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start)
* @start: container attribute
*
* Removes the container attribute and including all nested
* attributes. Returns -EMSGSIZE
* attributes. Returns -1.
*/
static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
static inline int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
{
nlmsg_trim(skb, start);
return nlmsg_trim(skb, start);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,8 @@ struct sctp_af {
struct dst_entry *(*get_dst) (struct sctp_association *asoc,
union sctp_addr *daddr,
union sctp_addr *saddr);
void (*get_saddr) (struct sctp_association *asoc,
void (*get_saddr) (struct sctp_sock *sk,
struct sctp_association *asoc,
struct dst_entry *dst,
union sctp_addr *daddr,
union sctp_addr *saddr);
Expand Down
9 changes: 4 additions & 5 deletions trunk/net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -1714,8 +1714,7 @@ static int neightbl_fill_parms(struct sk_buff *skb, struct neigh_parms *parms)
return nla_nest_end(skb, nest);

nla_put_failure:
nla_nest_cancel(skb, nest);
return -EMSGSIZE;
return nla_nest_cancel(skb, nest);
}

static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
Expand Down Expand Up @@ -2058,9 +2057,9 @@ static int neigh_fill_info(struct sk_buff *skb, struct neighbour *neigh,
goto nla_put_failure;
}

ci.ndm_used = jiffies_to_clock_t(now - neigh->used);
ci.ndm_confirmed = jiffies_to_clock_t(now - neigh->confirmed);
ci.ndm_updated = jiffies_to_clock_t(now - neigh->updated);
ci.ndm_used = now - neigh->used;
ci.ndm_confirmed = now - neigh->confirmed;
ci.ndm_updated = now - neigh->updated;
ci.ndm_refcnt = atomic_read(&neigh->refcnt) - 1;
read_unlock_bh(&neigh->lock);

Expand Down
3 changes: 1 addition & 2 deletions trunk/net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,7 @@ int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics)
return nla_nest_end(skb, mx);

nla_put_failure:
nla_nest_cancel(skb, mx);
return -EMSGSIZE;
return nla_nest_cancel(skb, mx);
}

int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/core/user_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan,

end = start + skb_shinfo(skb)->frags[i].size;
copy = end - offset;
if (copy > 0) {
if ((copy = end - offset) > 0) {
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
struct page *page = frag->page;

Expand Down
Loading

0 comments on commit ce69bd2

Please sign in to comment.