summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve French <cifs.adm@hostme.bitkeeper.com>2004-06-07 20:47:04 -0700
committerSteve French <cifs.adm@hostme.bitkeeper.com>2004-06-07 20:47:04 -0700
commitce0025ebbefb4be36cdf6782b0127e7dca0fab3d (patch)
tree07d24cbb144a34648bd905d817705312d0272399
parentd8c2ddb6a729af7dea392cc724b3dcbfef0a87fe (diff)
parent369a536059fec1a6eef8d7e91cee4f0e9cff7b7b (diff)
Merge bk://linux.bkbits.net/linux-2.5
into hostme.bitkeeper.com:/repos/c/cifs/linux-2.5cifs
-rw-r--r--arch/ppc64/kernel/smp.c7
-rw-r--r--arch/ppc64/kernel/traps.c16
-rw-r--r--drivers/usb/core/devio.c2
-rw-r--r--drivers/usb/media/Kconfig2
-rw-r--r--drivers/usb/media/pwc-if.c9
-rw-r--r--drivers/usb/serial/cyberjack.c21
-rw-r--r--include/asm-ppc64/current.h4
-rw-r--r--include/asm-ppc64/paca.h4
-rw-r--r--include/linux/netfilter_arp.h1
-rw-r--r--include/linux/tcp.h9
-rw-r--r--include/linux/usb.h1
-rw-r--r--net/ipv4/netfilter/arp_tables.c2
-rw-r--r--net/ipv4/tcp_diag.c3
13 files changed, 41 insertions, 40 deletions
diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
index 5254a57e4e0d..7fa0e5a105b2 100644
--- a/arch/ppc64/kernel/smp.c
+++ b/arch/ppc64/kernel/smp.c
@@ -390,8 +390,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
}
/* Fixup atomic count: it exited inside IRQ handler. */
- ((struct task_struct *)paca[lcpu].xCurrent)->thread_info->preempt_count
- = 0;
+ paca[lcpu].xCurrent->thread_info->preempt_count = 0;
/* Fixup SLB round-robin so next segment (kernel) goes in segment 0 */
paca[lcpu].xStab_data.next_round_robin = 0;
@@ -817,7 +816,7 @@ static void __init smp_create_idle(unsigned int cpu)
init_idle(p, cpu);
unhash_process(p);
- paca[cpu].xCurrent = (u64)p;
+ paca[cpu].xCurrent = p;
current_set[cpu] = p->thread_info;
}
@@ -869,7 +868,7 @@ void __devinit smp_prepare_boot_cpu(void)
/* cpu_possible is set up in prom.c */
cpu_set(boot_cpuid, cpu_online_map);
- paca[boot_cpuid].xCurrent = (u64)current;
+ paca[boot_cpuid].xCurrent = current;
current_set[boot_cpuid] = current->thread_info;
}
diff --git a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c
index 7c1594d0c90d..c941b796a277 100644
--- a/arch/ppc64/kernel/traps.c
+++ b/arch/ppc64/kernel/traps.c
@@ -466,6 +466,18 @@ SingleStepException(struct pt_regs *regs)
_exception(SIGTRAP, &info, regs);
}
+/*
+ * After we have successfully emulated an instruction, we have to
+ * check if the instruction was being single-stepped, and if so,
+ * pretend we got a single-step exception. This was pointed out
+ * by Kumar Gala. -- paulus
+ */
+static inline void emulate_single_step(struct pt_regs *regs)
+{
+ if (regs->msr & MSR_SE)
+ SingleStepException(regs);
+}
+
static void dummy_perf(struct pt_regs *regs)
{
}
@@ -487,10 +499,8 @@ AlignmentException(struct pt_regs *regs)
fixed = fix_alignment(regs);
if (fixed == 1) {
- if (!user_mode(regs))
- PPCDBG(PPCDBG_ALIGNFIXUP, "fix alignment at %lx\n",
- regs->nip);
regs->nip += 4; /* skip over emulated instruction */
+ emulate_single_step(regs);
return;
}
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 51b1aebda55d..29799129af3e 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -719,7 +719,7 @@ static int proc_connectinfo(struct dev_state *ps, void __user *arg)
static int proc_resetdevice(struct dev_state *ps)
{
- return usb_reset_device(ps->dev);
+ return __usb_reset_device(ps->dev);
}
diff --git a/drivers/usb/media/Kconfig b/drivers/usb/media/Kconfig
index eba7ef348a60..00bf32230f69 100644
--- a/drivers/usb/media/Kconfig
+++ b/drivers/usb/media/Kconfig
@@ -108,7 +108,7 @@ config USB_OV511
config USB_PWC
tristate "USB Philips Cameras"
- depends on USB && VIDEO_DEV && BROKEN
+ depends on USB && VIDEO_DEV
---help---
Say Y or M here if you want to use one of these Philips & OEM
webcams:
diff --git a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c
index 4d503a20b9b8..aea703bed685 100644
--- a/drivers/usb/media/pwc-if.c
+++ b/drivers/usb/media/pwc-if.c
@@ -129,7 +129,6 @@ static struct {
static int pwc_video_open(struct inode *inode, struct file *file);
static int pwc_video_close(struct inode *inode, struct file *file);
-static int pwc_video_release(struct video_device *);
static ssize_t pwc_video_read(struct file *file, char *buf,
size_t count, loff_t *ppos);
static unsigned int pwc_video_poll(struct file *file, poll_table *wait);
@@ -1121,12 +1120,6 @@ static int pwc_video_close(struct inode *inode, struct file *file)
return 0;
}
-static int pwc_video_release(struct video_device *vfd)
-{
- Trace(TRACE_OPEN, "pwc_video_release() called. Now what?\n");
-}
-
-
/*
* FIXME: what about two parallel reads ????
* ANSWER: Not supported. You can't open the device more than once,
@@ -1855,7 +1848,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
}
}
- pdev->vdev.release = pwc_video_release;
+ pdev->vdev.release = video_device_release;
i = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, video_nr);
if (i < 0) {
Err("Failed to register as video device (%d).\n", i);
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 299daca1f10c..9ca40acd3562 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -109,7 +109,7 @@ struct cyberjack_private {
short rdtodo; /* Bytes still to read */
unsigned char wrbuf[5*64]; /* Buffer for collecting data to write */
short wrfilled; /* Overall data size we already got */
- short wrsent; /* Data akready sent */
+ short wrsent; /* Data already sent */
};
/* do some startup allocations not currently performed by usb_serial_probe() */
@@ -159,8 +159,6 @@ static int cyberjack_open (struct usb_serial_port *port, struct file *filp)
dbg("%s - usb_clear_halt", __FUNCTION__ );
usb_clear_halt(port->serial->dev, port->write_urb->pipe);
- usb_clear_halt(port->serial->dev, port->read_urb->pipe);
- usb_clear_halt(port->serial->dev, port->interrupt_in_urb->pipe);
/* force low_latency on so that our tty_push actually forces
* the data through, otherwise it is scheduled, and with high
@@ -212,7 +210,6 @@ static int cyberjack_write (struct usb_serial_port *port, int from_user, const u
unsigned long flags;
int result;
int wrexpected;
- unsigned char localbuf[CYBERJACK_LOCAL_BUF_SIZE]; /* Buffer for collecting data to write */
dbg("%s - port %d", __FUNCTION__, port->number);
dbg("%s - from_user %d", __FUNCTION__, from_user);
@@ -229,29 +226,23 @@ static int cyberjack_write (struct usb_serial_port *port, int from_user, const u
spin_lock_irqsave(&priv->lock, flags);
- if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ||
- (count>sizeof(localbuf)) ) {
- /* To much data for buffer. Reset buffer. */
+ if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
+ /* To much data for buffer. Reset buffer. */
priv->wrfilled=0;
spin_unlock_irqrestore(&priv->lock, flags);
return (0);
}
- spin_unlock_irqrestore(&priv->lock, flags);
-
/* Copy data */
if (from_user) {
- if (copy_from_user(localbuf, buf, count)) {
+ if (copy_from_user(priv->wrbuf+priv->wrfilled, buf, count)) {
+ spin_unlock_irqrestore(&priv->lock, flags);
return -EFAULT;
}
} else {
- memcpy (localbuf, buf, count);
+ memcpy (priv->wrbuf+priv->wrfilled, buf, count);
}
- spin_lock_irqsave(&priv->lock, flags);
-
- memcpy (priv->wrbuf+priv->wrfilled, localbuf, count);
-
usb_serial_debug_data (__FILE__, __FUNCTION__, count,
priv->wrbuf+priv->wrfilled);
priv->wrfilled += count;
diff --git a/include/asm-ppc64/current.h b/include/asm-ppc64/current.h
index 429487ddda16..24ea6e1ab6e8 100644
--- a/include/asm-ppc64/current.h
+++ b/include/asm-ppc64/current.h
@@ -8,13 +8,11 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
- *
- * Use r13 for current since the ppc64 ABI reserves it - Anton
*/
#include <asm/thread_info.h>
-#define get_current() ((struct task_struct *)(get_paca()->xCurrent))
+#define get_current() (get_paca()->xCurrent)
#define current get_current()
#endif /* !(_PPC64_CURRENT_H) */
diff --git a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h
index 9b6028915e34..bf38c7f01721 100644
--- a/include/asm-ppc64/paca.h
+++ b/include/asm-ppc64/paca.h
@@ -37,6 +37,8 @@ extern struct paca_struct paca[];
register struct paca_struct *local_paca asm("r13");
#define get_paca() local_paca
+struct task_struct;
+
/*============================================================================
* Name_______: paca
*
@@ -59,7 +61,7 @@ struct paca_struct {
*/
struct ItLpPaca *xLpPacaPtr; /* Pointer to LpPaca for PLIC 0x00 */
struct ItLpRegSave *xLpRegSavePtr; /* Pointer to LpRegSave for PLIC 0x08 */
- u64 xCurrent; /* Pointer to current 0x10 */
+ struct task_struct *xCurrent; /* Pointer to current 0x10 */
/* Note: the spinlock functions in arch/ppc64/lib/locks.c load lock_token and
xPacaIndex with a single lwz instruction, using the constant offset 24.
If you move either field, fix the spinlocks and rwlocks. */
diff --git a/include/linux/netfilter_arp.h b/include/linux/netfilter_arp.h
index ecb3b56a60d3..a3f8977f7f12 100644
--- a/include/linux/netfilter_arp.h
+++ b/include/linux/netfilter_arp.h
@@ -17,5 +17,4 @@
#define NF_ARP_FORWARD 2
#define NF_ARP_NUMHOOKS 3
-static DECLARE_MUTEX(arpt_mutex);
#endif /* __LINUX_ARP_NETFILTER_H */
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 6f33c87d8ab5..39e2d22619dc 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -183,6 +183,9 @@ struct tcp_info
__u32 tcpi_snd_cwnd;
__u32 tcpi_advmss;
__u32 tcpi_reordering;
+
+ __u32 tcpi_rcv_rtt;
+ __u32 tcpi_rcv_space;
};
#ifdef __KERNEL__
@@ -351,11 +354,11 @@ struct tcp_opt {
__u8 urg_mode; /* In urgent mode */
__u32 snd_up; /* Urgent pointer */
- /* The syn_wait_lock is necessary only to avoid tcp_get_info having
+ /* The syn_wait_lock is necessary only to avoid proc interface having
* to grab the main lock sock while browsing the listening hash
* (otherwise it's deadlock prone).
- * This lock is acquired in read mode only from tcp_get_info() and
- * it's acquired in write mode _only_ from code that is actively
+ * This lock is acquired in read mode only from listening_get_next()
+ * and it's acquired in write mode _only_ from code that is actively
* changing the syn_wait_queue. All readers that are holding
* the master sock lock don't need to grab this lock in read mode
* too as the syn_wait_queue writes are always protected from
diff --git a/include/linux/usb.h b/include/linux/usb.h
index cf243917d9c3..4013919efd98 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -334,6 +334,7 @@ extern void usb_put_dev(struct usb_device *dev);
/* mostly for devices emulating SCSI over USB */
extern int usb_reset_device(struct usb_device *dev);
+extern int __usb_reset_device(struct usb_device *dev);
extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index c8309d63e736..28277c90eb18 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -62,6 +62,8 @@ do { \
#include <linux/netfilter_ipv4/lockhelp.h>
#include <linux/netfilter_ipv4/listhelp.h>
+static DECLARE_MUTEX(arpt_mutex);
+
struct arpt_table_info {
unsigned int size;
unsigned int number;
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index ff047707bbb8..5506944b7e7c 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -91,6 +91,9 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
info->tcpi_snd_cwnd = tp->snd_cwnd;
info->tcpi_advmss = tp->advmss;
info->tcpi_reordering = tp->reordering;
+
+ info->tcpi_rcv_rtt = ((1000000*tp->rcv_rtt_est.rtt)/HZ)>>3;
+ info->tcpi_rcv_space = tp->rcvq_space.space;
}
static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,