]> git.neil.brown.name Git - history.git/commitdiff
Import 2.1.127pre7 2.1.127pre7
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:17:09 +0000 (15:17 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:17:09 +0000 (15:17 -0500)
drivers/char/serial.c
drivers/pnp/parport_probe.c
drivers/sound/sscape.c
fs/smbfs/proc.c
include/asm-i386/spinlock.h
include/linux/sched.h
include/linux/serial.h

index 141a0c6974127e3e82f875286e92df4ec98e776a..497496e00f482359b0013794950eabbc595682dd 100644 (file)
@@ -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;
        }
 
index 6118eb6435bf0e1a1d3c541e33b332428658ff53..97a824fd32cae3292f6b6b8010f5e2836cd108a9 100644 (file)
@@ -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:
index 1b823692c0aa536941bce4e84ef34b24ce6c8c6e..48017eeed7bb6a9b03b5c6d7b838e3a8a944c1f0 100644 (file)
@@ -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)
index b61bb32779836e55c308eba6efbc4975c0b10745..42981d4836f7f14c24e12b2864378c0afcda649e 100644 (file)
@@ -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);
                        }
                }
 
index 9d3fec928a4271d9a28cb2104ab33de1855cd380..00e238407f6a6fc54e1434b2f77fd048b6c1f3d5 100644 (file)
@@ -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)
index 6afb955e69aa6c0ac233d884f526a4ea5111aab0..4e41d457058b53bd1782b17df4d9e24ad4258d6c 100644 (file)
@@ -23,8 +23,6 @@ extern unsigned long event;
 #include <linux/capability.h>
 #include <linux/securebits.h>
 
-#define JIFFIES_OFFSET (-3600*HZ)
-
 /*
  * cloning flags:
  */
index cee1fc11f1495d402398bcb9339c5a24d5924225..929618dd563be518dcfb1ac11c1921187658c9e3 100644 (file)
@@ -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 */