Commit 852a91e8 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.127pre7

parent c8cff325
......@@ -1653,6 +1653,8 @@ static int set_serial_info(struct async_struct * info,
return -EPERM;
state->flags = ((state->flags & ~ASYNC_USR_MASK) |
(new_serial.flags & ASYNC_USR_MASK));
info->flags = ((state->flags & ~ASYNC_USR_MASK) |
(info->flags & ASYNC_USR_MASK));
state->custom_divisor = new_serial.custom_divisor;
goto check_and_exit;
}
......@@ -1660,8 +1662,9 @@ static int set_serial_info(struct async_struct * info,
new_serial.irq = irq_cannonicalize(new_serial.irq);
if ((new_serial.irq >= NR_IRQS) || (new_serial.port > 0xffff) ||
(new_serial.type < PORT_UNKNOWN) ||
(new_serial.type > PORT_MAX)) {
(new_serial.baud_base == 0) || (new_serial.type < PORT_UNKNOWN) ||
(new_serial.type > PORT_MAX) || (new_serial.type == PORT_CIRRUS) ||
(new_serial.type == PORT_STARTECH)) {
return -EINVAL;
}
......
......@@ -105,9 +105,8 @@ int parport_probe(struct parport *port, char *buffer, int len)
switch (parport_ieee1284_nibble_mode_ok(port, 4)) {
case 1:
current->state=TASK_INTERRUPTIBLE;
current->timeout=jiffies+1;
schedule(); /* HACK: wait 10ms because printer seems to
* ack wrong */
schedule_timeout(1); /* HACK: wait 10ms because printer seems to
* ack wrong */
result = read_polled(port, buffer, len);
break;
case 0:
......
......@@ -124,10 +124,8 @@ static char old_hardware = 0;
static void sleep(unsigned howlong)
{
current->timeout = jiffies + 1;
current->state = TASK_INTERRUPTIBLE;
schedule();
current->timeout = 0;
schedule_timeout(1);
}
static unsigned char sscape_read(struct sscape_info *devc, int reg)
......
......@@ -520,9 +520,7 @@ server->conn_pid);
/*
* Wait for the new connection.
*/
current->timeout = jiffies + 5*HZ;
interruptible_sleep_on(&server->wait);
current->timeout = 0;
interruptible_sleep_on_timeout(&server->wait, 5*HZ);
if (signal_pending(current))
printk("smb_retry: caught signal\n");
......@@ -1602,10 +1600,8 @@ ff_dir_handle, ff_resume_key, ff_lastname, mask);
/* Windows 95 is not able to deliver answers
* to FIND_NEXT fast enough, so sleep 0.2 sec
*/
current->timeout = jiffies + HZ / 5;
current->state = TASK_INTERRUPTIBLE;
schedule();
current->timeout = 0;
schedule_timeout(HZ/5);
}
}
......
......@@ -88,9 +88,16 @@ typedef struct {
* can "mix" irq-safe locks - any writer needs to get a
* irq-safe write-lock, but readers can get non-irqsafe
* read-locks.
*
* Gcc-2.7.x has a nasty bug with empty initializers.
*/
typedef struct { } rwlock_t;
#define RW_LOCK_UNLOCKED (rwlock_t) { }
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
typedef struct { } rwlock_t;
#define RW_LOCK_UNLOCKED (rwlock_t) { }
#else
typedef struct { int gcc_is_buggy; } rwlock_t;
#define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
#endif
#define read_lock(lock) do { } while(0)
#define read_unlock(lock) do { } while(0)
......
......@@ -23,8 +23,6 @@ extern unsigned long event;
#include <linux/capability.h>
#include <linux/securebits.h>
#define JIFFIES_OFFSET (-3600*HZ)
/*
* cloning flags:
*/
......
......@@ -42,11 +42,11 @@ struct serial_struct {
#define PORT_16450 2
#define PORT_16550 3
#define PORT_16550A 4
#define PORT_CIRRUS 5
#define PORT_CIRRUS 5 /* usurped by cyclades.c */
#define PORT_16650 6
#define PORT_16650V2 7
#define PORT_16750 8
#define PORT_STARTECH 9
#define PORT_STARTECH 9 /* usurped by cyclades.c */
#define PORT_MAX 9
struct serial_uart_config {
......@@ -87,7 +87,7 @@ struct serial_uart_config {
#define ASYNC_LOW_LATENCY 0x2000 /* Request low latency behaviour */
#define ASYNC_FLAGS 0x2FFF /* Possible legal async flags */
#define ASYNC_FLAGS 0x3FFF /* Possible legal async flags */
#define ASYNC_USR_MASK 0x3430 /* Legal flags that non-privileged
* users can set or reset */
......
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