Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 23 Mar 2007 02:34:09 +0000 (19:34 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 23 Mar 2007 02:34:09 +0000 (19:34 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NETFILTER]: nat: avoid rerouting packets if only XFRM policy key changed
  [NETFILTER]: nf_conntrack_netlink: add missing dependency on NF_NAT
  [NET]: fix up misplaced inlines.
  [SCTP]: Correctly reset ssthresh when restarting association
  [BRIDGE]: Fix fdb RCU race
  [NET]: Fix fib_rules dump race
  [XFRM]: ipsecv6 needs a space when printing audit record.
  [X25] x25_forward_call(): fix NULL dereferences
  [SCTP]: Reset some transport and association variables on restart
  [SCTP]: Increment error counters on user requested HBs.
  [SCTP]: Clean up stale data during association restart
  [IrDA]: Calling ppp_unregister_channel() from process context
  [IrDA]: irttp_dup spin_lock initialisation
  [IrDA]: Delay needed when uploading firmware chunks

18 files changed:
Documentation/crypto/api-intro.txt
arch/i386/kernel/i8253.c
arch/ia64/kernel/crash.c
arch/ia64/kernel/setup.c
arch/ia64/mm/contig.c
arch/ia64/mm/discontig.c
arch/ia64/mm/init.c
arch/ia64/sn/kernel/setup.c
crypto/scatterwalk.c
crypto/tcrypt.c
drivers/infiniband/hw/cxgb3/iwch_provider.c
drivers/infiniband/hw/ehca/ehca_irq.c
drivers/infiniband/hw/ipath/ipath_fs.c
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_ib.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
include/asm-ia64/meminit.h

index e41a79a..9b84b80 100644 (file)
@@ -60,7 +60,7 @@ Here's an example of how to use the API:
        desc.tfm = tfm;
        desc.flags = 0;
        
-       if (crypto_hash_digest(&desc, &sg, 2, result))
+       if (crypto_hash_digest(&desc, sg, 2, result))
                fail();
        
        crypto_free_hash(tfm);
index 5cbb776..10cef5c 100644 (file)
@@ -47,9 +47,17 @@ static void init_pit_timer(enum clock_event_mode mode,
                outb(LATCH >> 8 , PIT_CH0);     /* MSB */
                break;
 
-       case CLOCK_EVT_MODE_ONESHOT:
+       /*
+        * Avoid unnecessary state transitions, as it confuses
+        * Geode / Cyrix based boxen.
+        */
        case CLOCK_EVT_MODE_SHUTDOWN:
+               if (evt->mode == CLOCK_EVT_MODE_UNUSED)
+                       break;
        case CLOCK_EVT_MODE_UNUSED:
+               if (evt->mode == CLOCK_EVT_MODE_SHUTDOWN)
+                       break;
+       case CLOCK_EVT_MODE_ONESHOT:
                /* One shot setup */
                outb_p(0x38, PIT_MODE);
                udelay(10);
index 7d1bbb4..80a94e7 100644 (file)
@@ -164,7 +164,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
 
        nd = (struct ia64_mca_notify_die *)args->err;
        /* Reason code 1 means machine check rendezous*/
-       if ((val == DIE_INIT_MONARCH_ENTER || DIE_INIT_SLAVE_ENTER) &&
+       if ((val == DIE_INIT_MONARCH_ENTER || val == DIE_INIT_SLAVE_ENTER) &&
                 nd->sos->rv_rc == 1)
                return NOTIFY_DONE;
 
index 339e8a5..69b9bb3 100644 (file)
@@ -692,12 +692,15 @@ struct seq_operations cpuinfo_op = {
        .show =         show_cpuinfo
 };
 
-static char brandname[128];
+#define MAX_BRANDS     8
+static char brandname[MAX_BRANDS][128];
 
 static char * __cpuinit
 get_model_name(__u8 family, __u8 model)
 {
+       static int overflow;
        char brand[128];
+       int i;
 
        memcpy(brand, "Unknown", 8);
        if (ia64_pal_get_brand_info(brand)) {
@@ -709,12 +712,17 @@ get_model_name(__u8 family, __u8 model)
                        case 2: memcpy(brand, "Madison up to 9M cache", 23); break;
                }
        }
-       if (brandname[0] == '\0')
-               return strcpy(brandname, brand);
-       else if (strcmp(brandname, brand) == 0)
-               return brandname;
-       else
-               return kstrdup(brand, GFP_KERNEL);
+       for (i = 0; i < MAX_BRANDS; i++)
+               if (strcmp(brandname[i], brand) == 0)
+                       return brandname[i];
+       for (i = 0; i < MAX_BRANDS; i++)
+               if (brandname[i][0] == '\0')
+                       return strcpy(brandname[i], brand);
+       if (overflow++ == 0)
+               printk(KERN_ERR
+                      "%s: Table overflow. Some processor model information will be missing\n",
+                      __FUNCTION__);
+       return "Unknown";
 }
 
 static void __cpuinit
index fb0f469..44ce5ed 100644 (file)
@@ -96,26 +96,6 @@ void show_mem(void)
 /* physical address where the bootmem map is located */
 unsigned long bootmap_start;
 
-/**
- * find_max_pfn - adjust the maximum page number callback
- * @start: start of range
- * @end: end of range
- * @arg: address of pointer to global max_pfn variable
- *
- * Passed as a callback function to efi_memmap_walk() to determine the highest
- * available page frame number in the system.
- */
-int
-find_max_pfn (unsigned long start, unsigned long end, void *arg)
-{
-       unsigned long *max_pfnp = arg, pfn;
-
-       pfn = (PAGE_ALIGN(end - 1) - PAGE_OFFSET) >> PAGE_SHIFT;
-       if (pfn > *max_pfnp)
-               *max_pfnp = pfn;
-       return 0;
-}
-
 /**
  * find_bootmap_location - callback to find a memory area for the bootmap
  * @start: start of region
@@ -177,9 +157,10 @@ find_memory (void)
        reserve_memory();
 
        /* first find highest page frame number */
-       max_pfn = 0;
-       efi_memmap_walk(find_max_pfn, &max_pfn);
-
+       min_low_pfn = ~0UL;
+       max_low_pfn = 0;
+       efi_memmap_walk(find_max_min_low_pfn, NULL);
+       max_pfn = max_low_pfn;
        /* how many bytes to cover all the pages */
        bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT;
 
@@ -189,7 +170,8 @@ find_memory (void)
        if (bootmap_start == ~0UL)
                panic("Cannot find %ld bytes for bootmap\n", bootmap_size);
 
-       bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn);
+       bootmap_size = init_bootmem_node(NODE_DATA(0),
+                       (bootmap_start >> PAGE_SHIFT), 0, max_pfn);
 
        /* Free all available memory, then mark bootmem-map as being in use. */
        efi_memmap_walk(filter_rsvd_memory, free_bootmem);
index 11a2d88..872da7a 100644 (file)
@@ -88,9 +88,6 @@ static int __init build_node_maps(unsigned long start, unsigned long len,
                bdp->node_low_pfn = max(epfn, bdp->node_low_pfn);
        }
 
-       min_low_pfn = min(min_low_pfn, bdp->node_boot_start>>PAGE_SHIFT);
-       max_low_pfn = max(max_low_pfn, bdp->node_low_pfn);
-
        return 0;
 }
 
@@ -438,6 +435,7 @@ void __init find_memory(void)
        /* These actually end up getting called by call_pernode_memory() */
        efi_memmap_walk(filter_rsvd_memory, build_node_maps);
        efi_memmap_walk(filter_rsvd_memory, find_pernode_space);
+       efi_memmap_walk(find_max_min_low_pfn, NULL);
 
        for_each_online_node(node)
                if (mem_data[node].bootmem_data.node_low_pfn) {
index f225dd7..c8da621 100644 (file)
@@ -648,6 +648,22 @@ count_reserved_pages (u64 start, u64 end, void *arg)
        return 0;
 }
 
+int
+find_max_min_low_pfn (unsigned long start, unsigned long end, void *arg)
+{
+       unsigned long pfn_start, pfn_end;
+#ifdef CONFIG_FLATMEM
+       pfn_start = (PAGE_ALIGN(__pa(start))) >> PAGE_SHIFT;
+       pfn_end = (PAGE_ALIGN(__pa(end - 1))) >> PAGE_SHIFT;
+#else
+       pfn_start = GRANULEROUNDDOWN(__pa(start)) >> PAGE_SHIFT;
+       pfn_end = GRANULEROUNDUP(__pa(end - 1)) >> PAGE_SHIFT;
+#endif
+       min_low_pfn = min(min_low_pfn, pfn_start);
+       max_low_pfn = max(max_low_pfn, pfn_end);
+       return 0;
+}
+
 /*
  * Boot command-line option "nolwsys" can be used to disable the use of any light-weight
  * system call handler.  When this option is in effect, all fsyscalls will end up bubbling
index bd5373d..a9bed5c 100644 (file)
@@ -348,8 +348,7 @@ sn_scan_pcdp(void)
                        continue;       /* not PCI interconnect */
 
                if (if_pci.translation & PCDP_PCI_TRANS_IOPORT)
-                       vga_console_iobase =
-                               if_pci.ioport_tra | __IA64_UNCACHED_OFFSET;
+                       vga_console_iobase = if_pci.ioport_tra;
 
                if (if_pci.translation & PCDP_PCI_TRANS_MMIO)
                        vga_console_membase =
@@ -429,7 +428,8 @@ void __init sn_setup(char **cmdline_p)
         *      bus containing the VGA console.
         */
        if (vga_console_iobase) {
-               io_space[0].mmio_base = vga_console_iobase;
+               io_space[0].mmio_base =
+                       (unsigned long) ioremap(vga_console_iobase, 0);
                io_space[0].sparse = 0;
        }
 
index 35172d3..a664231 100644 (file)
@@ -91,6 +91,8 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
                memcpy_dir(buf, vaddr, len_this_page, out);
                scatterwalk_unmap(vaddr, out);
 
+               scatterwalk_advance(walk, nbytes);
+
                if (nbytes == len_this_page)
                        break;
 
@@ -99,7 +101,5 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
 
                scatterwalk_pagedone(walk, out, 1);
        }
-
-       scatterwalk_advance(walk, nbytes);
 }
 EXPORT_SYMBOL_GPL(scatterwalk_copychunks);
index f5e9da3..8eaa5aa 100644 (file)
@@ -768,7 +768,7 @@ static void test_deflate(void)
        tv = (void *)tvmem;
 
        tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC);
-       if (tfm == NULL) {
+       if (IS_ERR(tfm)) {
                printk("failed to load transform for deflate\n");
                return;
        }
index f2774ae..24e0df0 100644 (file)
@@ -545,11 +545,14 @@ static int iwch_reregister_phys_mem(struct ib_mr *mr,
                php = to_iwch_pd(pd);
        if (mr_rereg_mask & IB_MR_REREG_ACCESS)
                mh.attr.perms = iwch_ib_to_tpt_access(acc);
-       if (mr_rereg_mask & IB_MR_REREG_TRANS)
+       if (mr_rereg_mask & IB_MR_REREG_TRANS) {
                ret = build_phys_page_list(buffer_list, num_phys_buf,
                                           iova_start,
                                           &total_size, &npages,
                                           &shift, &page_list);
+               if (ret)
+                       return ret;
+       }
 
        ret = iwch_reregister_mem(rhp, php, &mh, shift, page_list, npages);
        kfree(page_list);
index 20f36bf..f284be1 100644 (file)
@@ -66,7 +66,9 @@
 static void queue_comp_task(struct ehca_cq *__cq);
 
 static struct ehca_comp_pool* pool;
+#ifdef CONFIG_HOTPLUG_CPU
 static struct notifier_block comp_pool_callback_nb;
+#endif
 
 static inline void comp_event_callback(struct ehca_cq *cq)
 {
@@ -733,6 +735,7 @@ static void take_over_work(struct ehca_comp_pool *pool,
 
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
 static int comp_pool_callback(struct notifier_block *nfb,
                              unsigned long action,
                              void *hcpu)
@@ -775,6 +778,7 @@ static int comp_pool_callback(struct notifier_block *nfb,
 
        return NOTIFY_OK;
 }
+#endif
 
 int ehca_create_comp_pool(void)
 {
@@ -805,9 +809,11 @@ int ehca_create_comp_pool(void)
                }
        }
 
+#ifdef CONFIG_HOTPLUG_CPU
        comp_pool_callback_nb.notifier_call = comp_pool_callback;
        comp_pool_callback_nb.priority =0;
        register_cpu_notifier(&comp_pool_callback_nb);
+#endif
 
        printk(KERN_INFO "eHCA scaling code enabled\n");
 
@@ -821,7 +827,9 @@ void ehca_destroy_comp_pool(void)
        if (!ehca_scaling_code)
                return;
 
+#ifdef CONFIG_HOTPLUG_CPU
        unregister_cpu_notifier(&comp_pool_callback_nb);
+#endif
 
        for (i = 0; i < NR_CPUS; i++) {
                if (cpu_online(i))
index 5b40a84..ed55979 100644 (file)
@@ -451,12 +451,18 @@ bail:
        return ret;
 }
 
-static void remove_file(struct dentry *parent, char *name)
+static int remove_file(struct dentry *parent, char *name)
 {
        struct dentry *tmp;
+       int ret;
 
        tmp = lookup_one_len(name, parent, strlen(name));
 
+       if (IS_ERR(tmp)) {
+               ret = PTR_ERR(tmp);
+               goto bail;
+       }
+
        spin_lock(&dcache_lock);
        spin_lock(&tmp->d_lock);
        if (!(d_unhashed(tmp) && tmp->d_inode)) {
@@ -469,6 +475,14 @@ static void remove_file(struct dentry *parent, char *name)
                spin_unlock(&tmp->d_lock);
                spin_unlock(&dcache_lock);
        }
+
+       ret = 0;
+bail:
+       /*
+        * We don't expect clients to care about the return value, but
+        * it's there if they need it.
+        */
+       return ret;
 }
 
 static int remove_device_files(struct super_block *sb,
index 3484e8b..e70492d 100644 (file)
@@ -452,7 +452,7 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
                           skb->len, tx->mtu);
                ++priv->stats.tx_dropped;
                ++priv->stats.tx_errors;
-               ipoib_cm_skb_too_long(dev, skb, tx->mtu - INFINIBAND_ALEN);
+               ipoib_cm_skb_too_long(dev, skb, tx->mtu - IPOIB_ENCAP_LEN);
                return;
        }
 
@@ -1095,7 +1095,7 @@ static void ipoib_cm_stale_task(struct work_struct *work)
                /* List if sorted by LRU, start from tail,
                 * stop when we see a recently used entry */
                p = list_entry(priv->cm.passive_ids.prev, typeof(*p), list);
-               if (time_after_eq(jiffies, p->jiffies + IPOIB_CM_RX_TIMEOUT))
+               if (time_before_eq(jiffies, p->jiffies + IPOIB_CM_RX_TIMEOUT))
                        break;
                list_del_init(&p->list);
                spin_unlock_irqrestore(&priv->lock, flags);
index f2aa923..ba0ee5c 100644 (file)
@@ -328,9 +328,9 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
        struct ipoib_tx_buf *tx_req;
        u64 addr;
 
-       if (unlikely(skb->len > priv->mcast_mtu + INFINIBAND_ALEN)) {
+       if (unlikely(skb->len > priv->mcast_mtu + IPOIB_ENCAP_LEN)) {
                ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n",
-                          skb->len, priv->mcast_mtu + INFINIBAND_ALEN);
+                          skb->len, priv->mcast_mtu + IPOIB_ENCAP_LEN);
                ++priv->stats.tx_dropped;
                ++priv->stats.tx_errors;
                ipoib_cm_skb_too_long(dev, skb, priv->mcast_mtu);
index f9dbc6f..0741c6d 100644 (file)
@@ -380,7 +380,7 @@ static void path_rec_completion(int status,
        struct net_device *dev = path->dev;
        struct ipoib_dev_priv *priv = netdev_priv(dev);
        struct ipoib_ah *ah = NULL;
-       struct ipoib_neigh *neigh;
+       struct ipoib_neigh *neigh, *tn;
        struct sk_buff_head skqueue;
        struct sk_buff *skb;
        unsigned long flags;
@@ -418,7 +418,7 @@ static void path_rec_completion(int status,
                while ((skb = __skb_dequeue(&path->queue)))
                        __skb_queue_tail(&skqueue, skb);
 
-               list_for_each_entry(neigh, &path->neigh_list, list) {
+               list_for_each_entry_safe(neigh, tn, &path->neigh_list, list) {
                        kref_get(&path->ah->ref);
                        neigh->ah = path->ah;
                        memcpy(&neigh->dgid.raw, &path->pathrec.dgid.raw,
index 56c87a8..54fbead 100644 (file)
@@ -644,6 +644,9 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
        struct ipoib_dev_priv *priv = netdev_priv(dev);
        int ret = 0;
 
+       if (test_and_clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
+               ib_sa_free_multicast(mcast->mc);
+
        if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) {
                ipoib_dbg_mcast(priv, "leaving MGID " IPOIB_GID_FMT "\n",
                                IPOIB_GID_ARG(mcast->mcmember.mgid));
@@ -655,9 +658,6 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
                        ipoib_warn(priv, "ipoib_mcast_detach failed (result = %d)\n", ret);
        }
 
-       if (test_and_clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
-               ib_sa_free_multicast(mcast->mc);
-
        return 0;
 }
 
index 21ec5f3..3a62878 100644 (file)
@@ -36,6 +36,7 @@ extern void reserve_memory (void);
 extern void find_initrd (void);
 extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg);
 extern void efi_memmap_init(unsigned long *, unsigned long *);
+extern int find_max_min_low_pfn (unsigned long , unsigned long, void *);
 
 extern unsigned long vmcore_find_descriptor_size(unsigned long address);
 extern int reserve_elfcorehdr(unsigned long *start, unsigned long *end);