Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88018
b: refs/heads/master
c: 209261c
h: refs/heads/master
v: v3
  • Loading branch information
Grant Grundler authored and Jeff Garzik committed Mar 29, 2008
1 parent 0b64703 commit 486a408
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 43 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: e8e16b706e8406f1ab3bccab16932ebc513896d8
refs/heads/master: 209261c019f56d77f6a0cc38048e9a6f25867589
1 change: 0 additions & 1 deletion trunk/drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,6 @@ static int fs_open(struct atm_vcc *atm_vcc)
/* Docs are vague about this atm_hdr field. By the way, the FS
* chip makes odd errors if lower bits are set.... -- REW */
tc->atm_hdr = (vpi << 20) | (vci << 4);
tmc0 = 0;
{
int pcr = atm_pcr_goal (txtp);

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ static ssize_t bonding_store_slaves(struct device *d,

if (command[0] == '-') {
dev = NULL;
original_mtu = 0;
bond_for_each_slave(bond, slave, i)
if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) {
dev = slave->dev;
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/net/tulip/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ int __devinit tulip_read_eeprom(struct net_device *dev, int location, int addr_l
void __iomem *ee_addr = tp->base_addr + CSR9;
int read_cmd = location | (EE_READ_CMD << addr_len);

/* If location is past the end of what we can address, don't
* read some other location (ie truncate). Just return zero.
*/
if (location > (1 << addr_len) - 1)
return 0;

iowrite32(EE_ENB & ~EE_CS, ee_addr);
iowrite32(EE_ENB, ee_addr);

Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/net/tulip/tulip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
EEPROM.
*/
ee_data = tp->eeprom;
memset(ee_data, 0, sizeof(tp->eeprom));
sum = 0;
if (chip_idx == LC82C168) {
for (i = 0; i < 3; i++) {
Expand All @@ -1458,8 +1459,12 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
/* A serial EEPROM interface, we read now and sort it out later. */
int sa_offset = 0;
int ee_addr_size = tulip_read_eeprom(dev, 0xff, 8) & 0x40000 ? 8 : 6;
int ee_max_addr = ((1 << ee_addr_size) - 1) * sizeof(u16);

for (i = 0; i < sizeof(tp->eeprom); i+=2) {
if (ee_max_addr > sizeof(tp->eeprom))
ee_max_addr = sizeof(tp->eeprom);

for (i = 0; i < ee_max_addr ; i += sizeof(u16)) {
u16 data = tulip_read_eeprom(dev, i/2, ee_addr_size);
ee_data[i] = data & 0xff;
ee_data[i + 1] = data >> 8;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wan/lapbether.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct lapbethdev {
struct net_device_stats stats; /* some statistics */
};

static LIST_HEAD(lapbeth_devices);
static struct list_head lapbeth_devices = LIST_HEAD_INIT(lapbeth_devices);

/* ------------------------------------------------------------------------ */

Expand Down
6 changes: 2 additions & 4 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1074,14 +1074,12 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
}

/* Use this variant when it is known for sure that it
* is executing from hardware interrupt context or with hardware interrupts
* disabled.
* is executing from interrupt context.
*/
extern void dev_kfree_skb_irq(struct sk_buff *skb);

/* Use this variant in places where it could be invoked
* from either hardware interrupt or other context, with hardware interrupts
* either disabled or enabled.
* either from interrupt or non-interrupt context.
*/
extern void dev_kfree_skb_any(struct sk_buff *skb);

Expand Down
1 change: 1 addition & 0 deletions trunk/include/net/llc.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ struct llc_sap {

extern struct list_head llc_sap_list;
extern rwlock_t llc_sap_list_lock;
extern unsigned char llc_station_mac_sa[ETH_ALEN];

extern int llc_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/hci_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static struct hci_sec_filter hci_sec_filter = {
};

static struct bt_sock_list hci_sk_list = {
.lock = __RW_LOCK_UNLOCKED(hci_sk_list.lock)
.lock = RW_LOCK_UNLOCKED
};

/* Send frame to RAW socket */
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static u32 l2cap_feat_mask = 0x0000;
static const struct proto_ops l2cap_sock_ops;

static struct bt_sock_list l2cap_sk_list = {
.lock = __RW_LOCK_UNLOCKED(l2cap_sk_list.lock)
.lock = RW_LOCK_UNLOCKED
};

static void __l2cap_sock_close(struct sock *sk, int reason);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/rfcomm/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
static const struct proto_ops rfcomm_sock_ops;

static struct bt_sock_list rfcomm_sk_list = {
.lock = __RW_LOCK_UNLOCKED(rfcomm_sk_list.lock)
.lock = RW_LOCK_UNLOCKED
};

static void rfcomm_sock_close(struct sock *sk);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
static const struct proto_ops sco_sock_ops;

static struct bt_sock_list sco_sk_list = {
.lock = __RW_LOCK_UNLOCKED(sco_sk_list.lock)
.lock = RW_LOCK_UNLOCKED
};

static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent);
Expand Down
3 changes: 0 additions & 3 deletions trunk/net/ipv4/inet_fragment.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ EXPORT_SYMBOL(inet_frags_fini);
void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f)
{
nf->low_thresh = 0;

local_bh_disable();
inet_frag_evictor(nf, f);
local_bh_enable();
}
EXPORT_SYMBOL(inet_frags_exit_net);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/ip_forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ int ip_forward(struct sk_buff *skb)
if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
goto sr_failed;

if (unlikely(skb->len > dst_mtu(&rt->u.dst) && !skb_is_gso(skb) &&
if (unlikely(skb->len > dst_mtu(&rt->u.dst) &&
(ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) {
IP_INC_STATS(IPSTATS_MIB_FRAGFAILS);
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/ipv6/netfilter/nf_conntrack_reasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ static __inline__ void fq_kill(struct nf_ct_frag6_queue *fq)

static void nf_ct_frag6_evictor(void)
{
local_bh_disable();
inet_frag_evictor(&nf_init_frags, &nf_frags);
local_bh_enable();
}

static void nf_ct_frag6_expire(unsigned long data)
Expand Down
8 changes: 7 additions & 1 deletion trunk/net/llc/llc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
LIST_HEAD(llc_sap_list);
DEFINE_RWLOCK(llc_sap_list_lock);

unsigned char llc_station_mac_sa[ETH_ALEN];

/**
* llc_sap_alloc - allocates and initializes sap.
*
Expand All @@ -35,8 +37,8 @@ static struct llc_sap *llc_sap_alloc(void)
struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC);

if (sap) {
/* sap->laddr.mac - leave as a null, it's filled by bind */
sap->state = LLC_SAP_STATE_ACTIVE;
memcpy(sap->laddr.mac, llc_station_mac_sa, ETH_ALEN);
rwlock_init(&sap->sk_list.lock);
atomic_set(&sap->refcnt, 1);
}
Expand Down Expand Up @@ -165,6 +167,10 @@ static int __init llc_init(void)
if (dev != NULL)
dev = next_net_device(dev);

if (dev != NULL)
memcpy(llc_station_mac_sa, dev->dev_addr, ETH_ALEN);
else
memset(llc_station_mac_sa, 0, ETH_ALEN);
dev_add_pack(&llc_packet_type);
dev_add_pack(&llc_tr_packet_type);
return 0;
Expand Down
6 changes: 1 addition & 5 deletions trunk/net/llc/llc_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,8 @@ static inline int llc_fixup_skb(struct sk_buff *skb)
skb_pull(skb, llc_len);
if (skb->protocol == htons(ETH_P_802_2)) {
__be16 pdulen = eth_hdr(skb)->h_proto;
s32 data_size = ntohs(pdulen) - llc_len;
u16 data_size = ntohs(pdulen) - llc_len;

if (data_size < 0 ||
((skb_tail_pointer(skb) -
(u8 *)pdu) - llc_len) < data_size)
return 0;
if (unlikely(pskb_trim_rcsum(skb, data_size)))
return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/llc/llc_station.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static int llc_station_ac_send_null_dsap_xid_c(struct sk_buff *skb)
goto out;
llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, 0, LLC_PDU_CMD);
llc_pdu_init_as_xid_cmd(nskb, LLC_XID_NULL_CLASS_2, 127);
rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, skb->dev->dev_addr);
rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, llc_station_mac_sa);
if (unlikely(rc))
goto free;
llc_station_send_pdu(nskb);
Expand All @@ -283,7 +283,7 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb)
llc_pdu_decode_ssap(skb, &dsap);
llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);
llc_pdu_init_as_xid_rsp(nskb, LLC_XID_NULL_CLASS_2, 127);
rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da);
if (unlikely(rc))
goto free;
llc_station_send_pdu(nskb);
Expand All @@ -307,7 +307,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb)
llc_pdu_decode_ssap(skb, &dsap);
llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);
llc_pdu_init_as_test_rsp(nskb, skb);
rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da);
if (unlikely(rc))
goto free;
llc_station_send_pdu(nskb);
Expand Down
18 changes: 3 additions & 15 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,22 +184,10 @@ static inline int qdisc_restart(struct net_device *dev)

void __qdisc_run(struct net_device *dev)
{
unsigned long start_time = jiffies;

while (qdisc_restart(dev)) {
if (netif_queue_stopped(dev))
break;

/*
* Postpone processing if
* 1. another process needs the CPU;
* 2. we've been doing it for too long.
*/
if (need_resched() || jiffies != start_time) {
netif_schedule(dev);
do {
if (!qdisc_restart(dev))
break;
}
}
} while (!netif_queue_stopped(dev));

clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
}
Expand Down

0 comments on commit 486a408

Please sign in to comment.