Commit 529a41e3 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  rose: Socket lock was not released before returning to user space
  hci_usb: remove code obfuscation
  drivers/net/appletalk: use time_before, time_before_eq, etc
  drivers/atm: use time_before, time_before_eq, etc
  hci_usb: do not initialize static variables to 0
  tg3: 5701 DMA corruption fix
  atm nicstar: Removal of debug code containing deprecated calls to cli()/sti()
  iwlwifi: Fix unconditional access to station->tidp[].agg.
  netfilter: Fix SIP conntrack build with NAT disabled.
  netfilter: Fix SCTP nat build.
parents c3823c47 43837b1e
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
#include <asm/string.h> #include <asm/string.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/jiffies.h>
#include "iphase.h" #include "iphase.h"
#include "suni.h" #include "suni.h"
#define swap(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8)) #define swap(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8))
...@@ -189,7 +190,7 @@ static u16 get_desc (IADEV *dev, struct ia_vcc *iavcc) { ...@@ -189,7 +190,7 @@ static u16 get_desc (IADEV *dev, struct ia_vcc *iavcc) {
int ltimeout; int ltimeout;
ia_hack_tcq (dev); ia_hack_tcq (dev);
if(((jiffies - timer)>50)||((dev->ffL.tcq_rd==dev->host_tcq_wr))){ if((time_after(jiffies,timer+50)) || ((dev->ffL.tcq_rd==dev->host_tcq_wr))) {
timer = jiffies; timer = jiffies;
i=0; i=0;
while (i < dev->num_tx_desc) { while (i < dev->num_tx_desc) {
...@@ -1225,7 +1226,7 @@ static void rx_intr(struct atm_dev *dev) ...@@ -1225,7 +1226,7 @@ static void rx_intr(struct atm_dev *dev)
iadev->rx_tmp_jif = jiffies; iadev->rx_tmp_jif = jiffies;
iadev->rxing = 0; iadev->rxing = 0;
} }
else if (((jiffies - iadev->rx_tmp_jif) > 50) && else if ((time_after(jiffies, iadev->rx_tmp_jif + 50)) &&
((iadev->rx_pkt_cnt - iadev->rx_tmp_cnt) == 0)) { ((iadev->rx_pkt_cnt - iadev->rx_tmp_cnt) == 0)) {
for (i = 1; i <= iadev->num_rx_desc; i++) for (i = 1; i <= iadev->num_rx_desc; i++)
free_desc(dev, i); free_desc(dev, i);
......
This diff is collapsed.
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
/* Options ********************************************************************/ /* Options ********************************************************************/
#undef NS_DEBUG_SPINLOCKS
#define NS_MAX_CARDS 4 /* Maximum number of NICStAR based cards #define NS_MAX_CARDS 4 /* Maximum number of NICStAR based cards
controlled by the device driver. Must controlled by the device driver. Must
be <= 5 */ be <= 5 */
...@@ -721,10 +719,6 @@ typedef struct scq_info ...@@ -721,10 +719,6 @@ typedef struct scq_info
wait_queue_head_t scqfull_waitq; wait_queue_head_t scqfull_waitq;
volatile char full; /* SCQ full indicator */ volatile char full; /* SCQ full indicator */
spinlock_t lock; /* SCQ spinlock */ spinlock_t lock; /* SCQ spinlock */
#ifdef NS_DEBUG_SPINLOCKS
volatile long has_lock;
volatile int cpu_lock;
#endif /* NS_DEBUG_SPINLOCKS */
} scq_info; } scq_info;
...@@ -810,12 +804,6 @@ typedef struct ns_dev ...@@ -810,12 +804,6 @@ typedef struct ns_dev
unsigned intcnt; /* Interrupt counter */ unsigned intcnt; /* Interrupt counter */
spinlock_t int_lock; /* Interrupt lock */ spinlock_t int_lock; /* Interrupt lock */
spinlock_t res_lock; /* Card resource lock */ spinlock_t res_lock; /* Card resource lock */
#ifdef NS_DEBUG_SPINLOCKS
volatile long has_int_lock;
volatile int cpu_int;
volatile long has_res_lock;
volatile int cpu_res;
#endif /* NS_DEBUG_SPINLOCKS */
} ns_dev; } ns_dev;
......
...@@ -62,13 +62,13 @@ ...@@ -62,13 +62,13 @@
#define URB_ZERO_PACKET 0 #define URB_ZERO_PACKET 0
#endif #endif
static int ignore = 0; static int ignore;
static int ignore_dga = 0; static int ignore_dga;
static int ignore_csr = 0; static int ignore_csr;
static int ignore_sniffer = 0; static int ignore_sniffer;
static int disable_scofix = 0; static int disable_scofix;
static int force_scofix = 0; static int force_scofix;
static int reset = 0; static int reset;
#ifdef CONFIG_BT_HCIUSB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
static int isoc = 2; static int isoc = 2;
...@@ -265,7 +265,7 @@ static int hci_usb_intr_rx_submit(struct hci_usb *husb) ...@@ -265,7 +265,7 @@ static int hci_usb_intr_rx_submit(struct hci_usb *husb)
BT_ERR("%s intr rx submit failed urb %p err %d", BT_ERR("%s intr rx submit failed urb %p err %d",
husb->hdev->name, urb, err); husb->hdev->name, urb, err);
_urb_unlink(_urb); _urb_unlink(_urb);
_urb_free(_urb); kfree(_urb);
kfree(buf); kfree(buf);
} }
return err; return err;
...@@ -302,7 +302,7 @@ static int hci_usb_bulk_rx_submit(struct hci_usb *husb) ...@@ -302,7 +302,7 @@ static int hci_usb_bulk_rx_submit(struct hci_usb *husb)
BT_ERR("%s bulk rx submit failed urb %p err %d", BT_ERR("%s bulk rx submit failed urb %p err %d",
husb->hdev->name, urb, err); husb->hdev->name, urb, err);
_urb_unlink(_urb); _urb_unlink(_urb);
_urb_free(_urb); kfree(_urb);
kfree(buf); kfree(buf);
} }
return err; return err;
...@@ -353,7 +353,7 @@ static int hci_usb_isoc_rx_submit(struct hci_usb *husb) ...@@ -353,7 +353,7 @@ static int hci_usb_isoc_rx_submit(struct hci_usb *husb)
BT_ERR("%s isoc rx submit failed urb %p err %d", BT_ERR("%s isoc rx submit failed urb %p err %d",
husb->hdev->name, urb, err); husb->hdev->name, urb, err);
_urb_unlink(_urb); _urb_unlink(_urb);
_urb_free(_urb); kfree(_urb);
kfree(buf); kfree(buf);
} }
return err; return err;
...@@ -431,7 +431,7 @@ static void hci_usb_unlink_urbs(struct hci_usb *husb) ...@@ -431,7 +431,7 @@ static void hci_usb_unlink_urbs(struct hci_usb *husb)
husb->hdev->name, _urb, _urb->type, urb); husb->hdev->name, _urb, _urb->type, urb);
kfree(urb->setup_packet); kfree(urb->setup_packet);
kfree(urb->transfer_buffer); kfree(urb->transfer_buffer);
_urb_free(_urb); kfree(_urb);
} }
} }
} }
...@@ -490,7 +490,7 @@ static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb) ...@@ -490,7 +490,7 @@ static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb)
dr = kmalloc(sizeof(*dr), GFP_ATOMIC); dr = kmalloc(sizeof(*dr), GFP_ATOMIC);
if (!dr) { if (!dr) {
_urb_free(_urb); kfree(_urb);
return -ENOMEM; return -ENOMEM;
} }
} else } else
......
...@@ -60,11 +60,6 @@ struct _urb { ...@@ -60,11 +60,6 @@ struct _urb {
struct urb urb; struct urb urb;
}; };
static inline void _urb_free(struct _urb *_urb)
{
kfree(_urb);
}
static inline void _urb_queue_init(struct _urb_queue *q) static inline void _urb_queue_init(struct _urb_queue *q)
{ {
INIT_LIST_HEAD(&q->head); INIT_LIST_HEAD(&q->head);
......
...@@ -69,6 +69,7 @@ static const char *version = ...@@ -69,6 +69,7 @@ static const char *version =
#include <linux/atalk.h> #include <linux/atalk.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/jiffies.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -503,7 +504,7 @@ static void cops_reset(struct net_device *dev, int sleep) ...@@ -503,7 +504,7 @@ static void cops_reset(struct net_device *dev, int sleep)
long snap=jiffies; long snap=jiffies;
/* Let card finish initializing, about 1/3 second */ /* Let card finish initializing, about 1/3 second */
while(jiffies-snap<HZ/3) while (time_before(jiffies, snap + HZ/3))
schedule(); schedule();
} }
else else
......
...@@ -64,8 +64,8 @@ ...@@ -64,8 +64,8 @@
#define DRV_MODULE_NAME "tg3" #define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": " #define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "3.90" #define DRV_MODULE_VERSION "3.91"
#define DRV_MODULE_RELDATE "April 12, 2008" #define DRV_MODULE_RELDATE "April 18, 2008"
#define TG3_DEF_MAC_MODE 0 #define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0 #define TG3_DEF_RX_MODE 0
...@@ -4135,11 +4135,21 @@ static int tigon3_dma_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb, ...@@ -4135,11 +4135,21 @@ static int tigon3_dma_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb,
u32 last_plus_one, u32 *start, u32 last_plus_one, u32 *start,
u32 base_flags, u32 mss) u32 base_flags, u32 mss)
{ {
struct sk_buff *new_skb = skb_copy(skb, GFP_ATOMIC); struct sk_buff *new_skb;
dma_addr_t new_addr = 0; dma_addr_t new_addr = 0;
u32 entry = *start; u32 entry = *start;
int i, ret = 0; int i, ret = 0;
if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701)
new_skb = skb_copy(skb, GFP_ATOMIC);
else {
int more_headroom = 4 - ((unsigned long)skb->data & 3);
new_skb = skb_copy_expand(skb,
skb_headroom(skb) + more_headroom,
skb_tailroom(skb), GFP_ATOMIC);
}
if (!new_skb) { if (!new_skb) {
ret = -1; ret = -1;
} else { } else {
...@@ -4462,7 +4472,9 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) ...@@ -4462,7 +4472,9 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev)
would_hit_hwbug = 0; would_hit_hwbug = 0;
if (tg3_4g_overflow_test(mapping, len)) if (tp->tg3_flags3 & TG3_FLG3_5701_DMA_BUG)
would_hit_hwbug = 1;
else if (tg3_4g_overflow_test(mapping, len))
would_hit_hwbug = 1; would_hit_hwbug = 1;
tg3_set_txd(tp, entry, mapping, len, base_flags, tg3_set_txd(tp, entry, mapping, len, base_flags,
...@@ -11339,6 +11351,38 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) ...@@ -11339,6 +11351,38 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
} }
} }
if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) {
static struct tg3_dev_id {
u32 vendor;
u32 device;
} bridge_chipsets[] = {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_0 },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1 },
{ },
};
struct tg3_dev_id *pci_id = &bridge_chipsets[0];
struct pci_dev *bridge = NULL;
while (pci_id->vendor != 0) {
bridge = pci_get_device(pci_id->vendor,
pci_id->device,
bridge);
if (!bridge) {
pci_id++;
continue;
}
if (bridge->subordinate &&
(bridge->subordinate->number <=
tp->pdev->bus->number) &&
(bridge->subordinate->subordinate >=
tp->pdev->bus->number)) {
tp->tg3_flags3 |= TG3_FLG3_5701_DMA_BUG;
pci_dev_put(bridge);
break;
}
}
}
/* The EPB bridge inside 5714, 5715, and 5780 cannot support /* The EPB bridge inside 5714, 5715, and 5780 cannot support
* DMA addresses > 40-bit. This bridge may have other additional * DMA addresses > 40-bit. This bridge may have other additional
* 57xx devices behind it in some 4-port NIC designs for example. * 57xx devices behind it in some 4-port NIC designs for example.
......
...@@ -2476,6 +2476,7 @@ struct tg3 { ...@@ -2476,6 +2476,7 @@ struct tg3 {
#define TG3_FLG3_NO_NVRAM_ADDR_TRANS 0x00000001 #define TG3_FLG3_NO_NVRAM_ADDR_TRANS 0x00000001
#define TG3_FLG3_ENABLE_APE 0x00000002 #define TG3_FLG3_ENABLE_APE 0x00000002
#define TG3_FLG3_5761_5784_AX_FIXES 0x00000004 #define TG3_FLG3_5761_5784_AX_FIXES 0x00000004
#define TG3_FLG3_5701_DMA_BUG 0x00000008
struct timer_list timer; struct timer_list timer;
u16 timer_counter; u16 timer_counter;
......
...@@ -239,28 +239,34 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf, ...@@ -239,28 +239,34 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,
"ps_status: %u\n", station->ps_status); "ps_status: %u\n", station->ps_status);
pos += scnprintf(buf + pos, bufsz - pos, "tid data:\n"); pos += scnprintf(buf + pos, bufsz - pos, "tid data:\n");
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"seq_num\t\ttxq_id\t"); "seq_num\t\ttxq_id");
#ifdef CONFIG_IWL4965_HT
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"frame_count\twait_for_ba\t"); "\tframe_count\twait_for_ba\t");
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"start_idx\tbitmap0\t"); "start_idx\tbitmap0\t");
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"bitmap1\trate_n_flags\n"); "bitmap1\trate_n_flags");
#endif
pos += scnprintf(buf + pos, bufsz - pos, "\n");
for (j = 0; j < MAX_TID_COUNT; j++) { for (j = 0; j < MAX_TID_COUNT; j++) {
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"[%d]:\t\t%u\t", j, "[%d]:\t\t%u", j,
station->tid[j].seq_number); station->tid[j].seq_number);
#ifdef CONFIG_IWL4965_HT
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"%u\t\t%u\t\t%u\t\t", "\t%u\t\t%u\t\t%u\t\t",
station->tid[j].agg.txq_id, station->tid[j].agg.txq_id,
station->tid[j].agg.frame_count, station->tid[j].agg.frame_count,
station->tid[j].agg.wait_for_ba); station->tid[j].agg.wait_for_ba);
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
"%u\t%llu\t%u\n", "%u\t%llu\t%u",
station->tid[j].agg.start_idx, station->tid[j].agg.start_idx,
(unsigned long long)station->tid[j].agg.bitmap, (unsigned long long)station->tid[j].agg.bitmap,
station->tid[j].agg.rate_n_flags); station->tid[j].agg.rate_n_flags);
#endif
pos += scnprintf(buf + pos, bufsz - pos, "\n");
} }
pos += scnprintf(buf + pos, bufsz - pos, "\n"); pos += scnprintf(buf + pos, bufsz - pos, "\n");
} }
......
...@@ -259,6 +259,7 @@ config NF_NAT_PROTO_SCTP ...@@ -259,6 +259,7 @@ config NF_NAT_PROTO_SCTP
tristate tristate
default NF_NAT && NF_CT_PROTO_SCTP default NF_NAT && NF_CT_PROTO_SCTP
depends on NF_NAT && NF_CT_PROTO_SCTP depends on NF_NAT && NF_CT_PROTO_SCTP
select LIBCRC32C
config NF_NAT_FTP config NF_NAT_FTP
tristate tristate
......
...@@ -781,7 +781,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb, ...@@ -781,7 +781,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb,
nfct_help(exp->master)->helper != nfct_help(ct)->helper || nfct_help(exp->master)->helper != nfct_help(ct)->helper ||
exp->class != class) exp->class != class)
break; break;
#ifdef CONFIG_NF_NAT_NEEDED
if (exp->tuple.src.l3num == AF_INET && !direct_rtp && if (exp->tuple.src.l3num == AF_INET && !direct_rtp &&
(exp->saved_ip != exp->tuple.dst.u3.ip || (exp->saved_ip != exp->tuple.dst.u3.ip ||
exp->saved_proto.udp.port != exp->tuple.dst.u.udp.port) && exp->saved_proto.udp.port != exp->tuple.dst.u.udp.port) &&
...@@ -791,6 +791,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb, ...@@ -791,6 +791,7 @@ static int set_expected_rtp_rtcp(struct sk_buff *skb,
tuple.dst.u.udp.port = exp->saved_proto.udp.port; tuple.dst.u.udp.port = exp->saved_proto.udp.port;
direct_rtp = 1; direct_rtp = 1;
} else } else
#endif
skip_expect = 1; skip_expect = 1;
} while (!skip_expect); } while (!skip_expect);
rcu_read_unlock(); rcu_read_unlock();
......
...@@ -760,8 +760,10 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le ...@@ -760,8 +760,10 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause,
&diagnostic); &diagnostic);
if (!rose->neighbour) if (!rose->neighbour) {
return -ENETUNREACH; err = -ENETUNREACH;
goto out_release;
}
rose->lci = rose_new_lci(rose->neighbour); rose->lci = rose_new_lci(rose->neighbour);
if (!rose->lci) { if (!rose->lci) {
......
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