]> err.no Git - linux-2.6/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Fri, 26 May 2006 22:13:33 +0000 (15:13 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 26 May 2006 22:13:33 +0000 (15:13 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET]: dev.c comment fixes
  [IPV6] ROUTE: Don't try less preferred routes for on-link routes.
  [IRDA]: *_DONGLE should depend on IRTTY_SIR
  [MAINTAINERS]: Add entry for netem

arch/i386/kernel/syscall_table.S
arch/powerpc/platforms/powermac/setup.c
drivers/char/tpm/tpm_tis.c
drivers/i2c/busses/scx200_acb.c
drivers/infiniband/hw/mthca/mthca_srq.c
drivers/input/touchscreen/ads7846.c
drivers/md/md.c
drivers/spi/spi_s3c24xx.c
fs/affs/namei.c
include/asm-alpha/termbits.h
include/asm-powerpc/termbits.h

index f48bef15b4f0dd5de72d4bbcc39f8c4f881947b6..af56987f69b02503c82cdc2a48660f56db02153a 100644 (file)
@@ -315,3 +315,4 @@ ENTRY(sys_call_table)
        .long sys_splice
        .long sys_sync_file_range
        .long sys_tee                   /* 315 */
+       .long sys_vmsplice
index 4d15e396655c1a095ab8c4a5df6600e054ab4c99..b9200fb078157f3498e16f4be98e92a5b8d8194d 100644 (file)
@@ -463,11 +463,23 @@ static int pmac_pm_finish(suspend_state_t state)
        return 0;
 }
 
+static int pmac_pm_valid(suspend_state_t state)
+{
+       switch (state) {
+       case PM_SUSPEND_DISK:
+               return 1;
+       /* can't do any other states via generic mechanism yet */
+       default:
+               return 0;
+       }
+}
+
 static struct pm_ops pmac_pm_ops = {
        .pm_disk_mode   = PM_DISK_SHUTDOWN,
        .prepare        = pmac_pm_prepare,
        .enter          = pmac_pm_enter,
        .finish         = pmac_pm_finish,
+       .valid          = pmac_pm_valid,
 };
 
 #endif /* CONFIG_SOFTWARE_SUSPEND */
index f621168f38aec754a418cf4390d9460506a08dec..8ea70625f7ea08bbf2714933cf2e58acd1da44bf 100644 (file)
@@ -457,10 +457,6 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
        }
 
        vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0));
-       if ((vendor & 0xFFFF) == 0xFFFF) {
-               rc = -ENODEV;
-               goto out_err;
-       }
 
        /* Default timeouts */
        chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
index a140e4536a4ee277fb7fe89e46fa9fdac847debf..766cc969c4d0c784abd0ef926363f2c37c7d735f 100644 (file)
@@ -491,7 +491,7 @@ static struct pci_device_id divil_pci[] = {
 
 #define MSR_LBAR_SMB           0x5140000B
 
-static int scx200_add_cs553x(void)
+static __init int scx200_add_cs553x(void)
 {
        u32     low, hi;
        u32     smb_base;
index 1ea433291fa71883e06fa0743c3f9fd443fe55bd..b292fefa3b411924ea29d693da19f75bf5187ffd 100644 (file)
@@ -490,26 +490,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
 
        first_ind = srq->first_free;
 
-       for (nreq = 0; wr; ++nreq, wr = wr->next) {
-               if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) {
-                       nreq = 0;
-
-                       doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift);
-                       doorbell[1] = cpu_to_be32(srq->srqn << 8);
-
-                       /*
-                        * Make sure that descriptors are written
-                        * before doorbell is rung.
-                        */
-                       wmb();
-
-                       mthca_write64(doorbell,
-                                     dev->kar + MTHCA_RECEIVE_DOORBELL,
-                                     MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
-
-                       first_ind = srq->first_free;
-               }
-
+       for (nreq = 0; wr; wr = wr->next) {
                ind = srq->first_free;
 
                if (ind < 0) {
@@ -569,6 +550,26 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
 
                srq->wrid[ind]  = wr->wr_id;
                srq->first_free = next_ind;
+
+               ++nreq;
+               if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) {
+                       nreq = 0;
+
+                       doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift);
+                       doorbell[1] = cpu_to_be32(srq->srqn << 8);
+
+                       /*
+                        * Make sure that descriptors are written
+                        * before doorbell is rung.
+                        */
+                       wmb();
+
+                       mthca_write64(doorbell,
+                                     dev->kar + MTHCA_RECEIVE_DOORBELL,
+                                     MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
+
+                       first_ind = srq->first_free;
+               }
        }
 
        if (likely(nreq)) {
index 1494175ac6fe43d0666e3cfed2426cfb0e622ed5..161afddd0f44396da88402f0af5bb2b9445f1a74 100644 (file)
 
 
 /*
- * This code has been tested on an ads7846 / N770 device.
+ * This code has been heavily tested on a Nokia 770, and lightly
+ * tested on other ads7846 devices (OSK/Mistral, Lubbock).
  * Support for ads7843 and ads7845 has only been stubbed in.
  *
- * Not yet done:  How accurate are the temperature and voltage
- * readings? (System-specific calibration should support
- * accuracy of 0.3 degrees C; otherwise it's 2.0 degrees.)
- *
  * IRQ handling needs a workaround because of a shortcoming in handling
  * edge triggered IRQs on some platforms like the OMAP1/2. These
  * platforms don't handle the ARM lazy IRQ disabling properly, thus we
@@ -248,10 +245,13 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)
 
        if (req->msg.status)
                status = req->msg.status;
+
+       /* on-wire is a must-ignore bit, a BE12 value, then padding */
        sample = be16_to_cpu(req->sample);
-       sample = sample >> 4;
-       kfree(req);
+       sample = sample >> 3;
+       sample &= 0x0fff;
 
+       kfree(req);
        return status ? status : sample;
 }
 
@@ -336,13 +336,13 @@ static void ads7846_rx(void *ads)
        u16                     x, y, z1, z2;
        unsigned long           flags;
 
-       /* adjust:  12 bit samples (left aligned), built from
-        * two 8 bit values writen msb-first.
+       /* adjust:  on-wire is a must-ignore bit, a BE12 value, then padding;
+        * built from two 8 bit values written msb-first.
         */
-       x = be16_to_cpu(ts->tc.x) >> 4;
-       y = be16_to_cpu(ts->tc.y) >> 4;
-       z1 = be16_to_cpu(ts->tc.z1) >> 4;
-       z2 = be16_to_cpu(ts->tc.z2) >> 4;
+       x = (be16_to_cpu(ts->tc.x) >> 3) & 0x0fff;
+       y = (be16_to_cpu(ts->tc.y) >> 3) & 0x0fff;
+       z1 = (be16_to_cpu(ts->tc.z1) >> 3) & 0x0fff;
+       z2 = (be16_to_cpu(ts->tc.z2) >> 3) & 0x0fff;
 
        /* range filtering */
        if (x == MAX_12BIT)
@@ -420,7 +420,7 @@ static void ads7846_debounce(void *ads)
 
        m = &ts->msg[ts->msg_idx];
        t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list);
-       val = (*(u16 *)t->rx_buf) >> 3;
+       val = (be16_to_cpu(*(__be16 *)t->rx_buf) >> 3) & 0x0fff;
        if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) {
                /* Repeat it, if this was the first read or the read
                 * wasn't consistent enough. */
@@ -469,7 +469,7 @@ static void ads7846_timer(unsigned long handle)
        spin_lock_irq(&ts->lock);
 
        if (unlikely(ts->msg_idx && !ts->pendown)) {
-               /* measurment cycle ended */
+               /* measurement cycle ended */
                if (!device_suspended(&ts->spi->dev)) {
                        ts->irq_disabled = 0;
                        enable_irq(ts->spi->irq);
@@ -495,11 +495,10 @@ static irqreturn_t ads7846_irq(int irq, void *handle, struct pt_regs *regs)
        spin_lock_irqsave(&ts->lock, flags);
        if (likely(ts->get_pendown_state())) {
                if (!ts->irq_disabled) {
-                       /* REVISIT irq logic for many ARM chips has cloned a
-                        * bug wherein disabling an irq in its handler won't
-                        * work;(it's disabled lazily, and too late to work.
-                        * until all their irq logic is fixed, we must shadow
-                        * that state here.
+                       /* The ARM do_simple_IRQ() dispatcher doesn't act
+                        * like the other dispatchers:  it will report IRQs
+                        * even after they've been disabled.  We work around
+                        * that here.  (The "generic irq" framework may help...)
                         */
                        ts->irq_disabled = 1;
                        disable_irq(ts->spi->irq);
@@ -609,16 +608,20 @@ static int __devinit ads7846_probe(struct spi_device *spi)
                return -EINVAL;
        }
 
+       /* REVISIT when the irq can be triggered active-low, or if for some
+        * reason the touchscreen isn't hooked up, we don't need to access
+        * the pendown state.
+        */
        if (pdata->get_pendown_state == NULL) {
                dev_dbg(&spi->dev, "no get_pendown_state function?\n");
                return -EINVAL;
        }
 
-       /* We'd set the wordsize to 12 bits ... except that some controllers
-        * will then treat the 8 bit command words as 12 bits (and drop the
-        * four MSBs of the 12 bit result).  Result: inputs must be shifted
-        * to discard the four garbage LSBs.
+       /* We'd set TX wordsize 8 bits and RX wordsize to 13 bits ... except
+        * that even if the hardware can do that, the SPI controller driver
+        * may not.  So we stick to very-portable 8 bit words, both RX and TX.
         */
+       spi->bits_per_word = 8;
 
        ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL);
        input_dev = input_allocate_device();
@@ -772,7 +775,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)
 
        if (request_irq(spi->irq, ads7846_irq,
                        SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING,
-                       spi->dev.bus_id, ts)) {
+                       spi->dev.driver->name, ts)) {
                dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
                err = -EBUSY;
                goto err_free_mem;
index 3ca3cfb03a7e28078e125509ed858587f403d00f..ec802913f9776ffe2744e21c052e9b26ba337a0b 100644 (file)
@@ -5028,8 +5028,10 @@ static int md_notify_reboot(struct notifier_block *this,
                printk(KERN_INFO "md: stopping all md devices.\n");
 
                ITERATE_MDDEV(mddev,tmp)
-                       if (mddev_trylock(mddev))
+                       if (mddev_trylock(mddev)) {
                                do_md_stop (mddev, 1);
+                               mddev_unlock(mddev);
+                       }
                /*
                 * certain more exotic SCSI devices are known to be
                 * volatile wrt too early system reboots. While the
index 9de4b5a04d70f20d34698a7750544467e0ef31ff..5fc14563ee3a98f523c277be23246074d2407849 100644 (file)
@@ -405,7 +405,7 @@ static int s3c24xx_spi_remove(struct platform_device *dev)
 
 static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg)
 {
-       struct s3c24xx_spi *hw = platform_get_drvdata(dev);
+       struct s3c24xx_spi *hw = platform_get_drvdata(pdev);
 
        clk_disable(hw->clk);
        return 0;
@@ -413,7 +413,7 @@ static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg)
 
 static int s3c24xx_spi_resume(struct platform_device *pdev)
 {
-       struct s3c24xx_spi *hw = platform_get_drvdata(dev);
+       struct s3c24xx_spi *hw = platform_get_drvdata(pdev);
 
        clk_enable(hw->clk);
        return 0;
index d4c2d636c479dc2aaaa986656a8659424aac56a6..a42143ca01698e1ba64769d5d9eb1bc0aa095320 100644 (file)
@@ -416,10 +416,9 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
                        return retval;
        }
 
-       retval = -EIO;
        bh = affs_bread(sb, old_dentry->d_inode->i_ino);
        if (!bh)
-               goto done;
+               return -EIO;
 
        /* Remove header from its parent directory. */
        affs_lock_dir(old_dir);
index f4837fa29420428a5b4c70c7b360b467bd49fae0..5541101b58aef8c962ebc416539daefe12cc3fd8 100644 (file)
@@ -148,6 +148,7 @@ struct termios {
 #define HUPCL  00040000
 
 #define CLOCAL 00100000
+#define CMSPAR   010000000000          /* mark or space (stick) parity */
 #define CRTSCTS          020000000000          /* flow control */
 
 /* c_lflag bits */
index ebf6055481dcb0f4547ecd5c9f1d6e7c1afea896..6d533b07aaf52daa3e1911df34fffcc6bf788d4d 100644 (file)
@@ -153,6 +153,7 @@ struct termios {
 #define HUPCL  00040000
 
 #define CLOCAL 00100000
+#define CMSPAR   010000000000          /* mark or space (stick) parity */
 #define CRTSCTS          020000000000          /* flow control */
 
 /* c_lflag bits */