Commit 375db481 authored by Linus Torvalds's avatar Linus Torvalds

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:
  gigaset: include cleanup cleanup
  packet : remove init_net restriction
  WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver.
  ip: Fix ip_dev_loopback_xmit()
  net: dev_pick_tx() fix
  fib: suppress lockdep-RCU false positive in FIB trie.
  tun: orphan an skb on tx
  forcedeth: fix tx limit2 flag check
  iwlwifi: work around bogus active chains detection
parents 73c6c7fb b91ecb00
...@@ -14,11 +14,6 @@ ...@@ -14,11 +14,6 @@
*/ */
#include "gigaset.h" #include "gigaset.h"
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
*/ */
#include "gigaset.h" #include "gigaset.h"
#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/isdn/capilli.h> #include <linux/isdn/capilli.h>
......
...@@ -14,10 +14,8 @@ ...@@ -14,10 +14,8 @@
*/ */
#include "gigaset.h" #include "gigaset.h"
#include <linux/ctype.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/slab.h>
/* Version Information */ /* Version Information */
#define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers" #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers"
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/ctype.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/usb.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/ppp_defs.h> #include <linux/ppp_defs.h>
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "gigaset.h" #include "gigaset.h"
#include <linux/isdnif.h> #include <linux/isdnif.h>
#include <linux/slab.h>
#define HW_HDR_LEN 2 /* Header size used to store ack info */ #define HW_HDR_LEN 2 /* Header size used to store ack info */
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "gigaset.h" #include "gigaset.h"
#include <linux/gigaset_dev.h> #include <linux/gigaset_dev.h>
#include <linux/tty.h>
#include <linux/tty_flip.h> #include <linux/tty_flip.h>
/*** our ioctls ***/ /*** our ioctls ***/
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
*/ */
#include "gigaset.h" #include "gigaset.h"
#include <linux/ctype.h>
static ssize_t show_cidmode(struct device *dev, static ssize_t show_cidmode(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
......
...@@ -11,13 +11,10 @@ ...@@ -11,13 +11,10 @@
*/ */
#include "gigaset.h" #include "gigaset.h"
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/tty.h>
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/slab.h>
/* Version Information */ /* Version Information */
#define DRIVER_AUTHOR "Tilman Schmidt" #define DRIVER_AUTHOR "Tilman Schmidt"
......
...@@ -16,10 +16,6 @@ ...@@ -16,10 +16,6 @@
*/ */
#include "gigaset.h" #include "gigaset.h"
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
......
...@@ -5899,7 +5899,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i ...@@ -5899,7 +5899,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
/* Limit the number of tx's outstanding for hw bug */ /* Limit the number of tx's outstanding for hw bug */
if (id->driver_data & DEV_NEED_TX_LIMIT) { if (id->driver_data & DEV_NEED_TX_LIMIT) {
np->tx_limit = 1; np->tx_limit = 1;
if ((id->driver_data & DEV_NEED_TX_LIMIT2) && if (((id->driver_data & DEV_NEED_TX_LIMIT2) == DEV_NEED_TX_LIMIT2) &&
pci_dev->revision >= 0xA2) pci_dev->revision >= 0xA2)
np->tx_limit = 0; np->tx_limit = 0;
} }
......
...@@ -387,6 +387,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -387,6 +387,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
} }
} }
/* Orphan the skb - required as we might hang on to it
* for indefinite time. */
skb_orphan(skb);
/* Enqueue packet */ /* Enqueue packet */
skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb); skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb);
dev->trans_start = jiffies; dev->trans_start = jiffies;
......
...@@ -628,9 +628,15 @@ static void ppp_stop(struct net_device *dev) ...@@ -628,9 +628,15 @@ static void ppp_stop(struct net_device *dev)
ppp_cp_event(dev, PID_LCP, STOP, 0, 0, 0, NULL); ppp_cp_event(dev, PID_LCP, STOP, 0, 0, 0, NULL);
} }
static void ppp_close(struct net_device *dev)
{
ppp_tx_flush();
}
static struct hdlc_proto proto = { static struct hdlc_proto proto = {
.start = ppp_start, .start = ppp_start,
.stop = ppp_stop, .stop = ppp_stop,
.close = ppp_close,
.type_trans = ppp_type_trans, .type_trans = ppp_type_trans,
.ioctl = ppp_ioctl, .ioctl = ppp_ioctl,
.netif_rx = ppp_rx, .netif_rx = ppp_rx,
......
...@@ -808,6 +808,18 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, ...@@ -808,6 +808,18 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv,
} }
} }
/*
* The above algorithm sometimes fails when the ucode
* reports 0 for all chains. It's not clear why that
* happens to start with, but it is then causing trouble
* because this can make us enable more chains than the
* hardware really has.
*
* To be safe, simply mask out any chains that we know
* are not on the device.
*/
active_chains &= priv->hw_params.valid_rx_ant;
num_tx_chains = 0; num_tx_chains = 0;
for (i = 0; i < NUM_RX_CHAINS; i++) { for (i = 0; i < NUM_RX_CHAINS; i++) {
/* loops on all the bits of /* loops on all the bits of
......
...@@ -1989,10 +1989,14 @@ static struct netdev_queue *dev_pick_tx(struct net_device *dev, ...@@ -1989,10 +1989,14 @@ static struct netdev_queue *dev_pick_tx(struct net_device *dev,
if (dev->real_num_tx_queues > 1) if (dev->real_num_tx_queues > 1)
queue_index = skb_tx_hash(dev, skb); queue_index = skb_tx_hash(dev, skb);
if (sk && sk->sk_dst_cache) if (sk) {
struct dst_entry *dst = rcu_dereference(sk->sk_dst_cache);
if (dst && skb_dst(skb) == dst)
sk_tx_queue_set(sk, queue_index); sk_tx_queue_set(sk, queue_index);
} }
} }
}
skb_set_queue_mapping(skb, queue_index); skb_set_queue_mapping(skb, queue_index);
return netdev_get_tx_queue(dev, queue_index); return netdev_get_tx_queue(dev, queue_index);
......
...@@ -209,7 +209,9 @@ static inline struct node *tnode_get_child_rcu(struct tnode *tn, unsigned int i) ...@@ -209,7 +209,9 @@ static inline struct node *tnode_get_child_rcu(struct tnode *tn, unsigned int i)
{ {
struct node *ret = tnode_get_child(tn, i); struct node *ret = tnode_get_child(tn, i);
return rcu_dereference(ret); return rcu_dereference_check(ret,
rcu_read_lock_held() ||
lockdep_rtnl_is_held());
} }
static inline int tnode_child_length(const struct tnode *tn) static inline int tnode_child_length(const struct tnode *tn)
......
...@@ -120,7 +120,7 @@ static int ip_dev_loopback_xmit(struct sk_buff *newskb) ...@@ -120,7 +120,7 @@ static int ip_dev_loopback_xmit(struct sk_buff *newskb)
newskb->pkt_type = PACKET_LOOPBACK; newskb->pkt_type = PACKET_LOOPBACK;
newskb->ip_summed = CHECKSUM_UNNECESSARY; newskb->ip_summed = CHECKSUM_UNNECESSARY;
WARN_ON(!skb_dst(newskb)); WARN_ON(!skb_dst(newskb));
netif_rx(newskb); netif_rx_ni(newskb);
return 0; return 0;
} }
......
...@@ -108,7 +108,7 @@ static int ip6_dev_loopback_xmit(struct sk_buff *newskb) ...@@ -108,7 +108,7 @@ static int ip6_dev_loopback_xmit(struct sk_buff *newskb)
newskb->ip_summed = CHECKSUM_UNNECESSARY; newskb->ip_summed = CHECKSUM_UNNECESSARY;
WARN_ON(!skb_dst(newskb)); WARN_ON(!skb_dst(newskb));
netif_rx(newskb); netif_rx_ni(newskb);
return 0; return 0;
} }
......
...@@ -2169,8 +2169,6 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd, ...@@ -2169,8 +2169,6 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
case SIOCGIFDSTADDR: case SIOCGIFDSTADDR:
case SIOCSIFDSTADDR: case SIOCSIFDSTADDR:
case SIOCSIFFLAGS: case SIOCSIFFLAGS:
if (!net_eq(sock_net(sk), &init_net))
return -ENOIOCTLCMD;
return inet_dgram_ops.ioctl(sock, cmd, arg); return inet_dgram_ops.ioctl(sock, cmd, arg);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment