]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Nov 2008 23:07:40 +0000 (15:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Nov 2008 23:07:40 +0000 (15:07 -0800)
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] xen: fix xen_get_eflags.
  [IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
  [IA64] remove duplicate include iommu.h
  [IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
  [IA64] Rationalize kernel mode alignment checking

55 files changed:
Documentation/networking/phy.txt
arch/mips/include/asm/mach-rc32434/gpio.h
arch/mips/include/asm/mach-rc32434/rb.h
arch/mips/include/asm/time.h
arch/mips/kernel/csrc-r4k.c
arch/mips/mm/sc-ip22.c
arch/mips/mti-malta/malta-amon.c
arch/mips/rb532/devices.c
arch/mips/rb532/gpio.c
arch/parisc/kernel/ptrace.c
arch/x86/include/asm/uaccess_64.h
arch/x86/kernel/io_apic.c
arch/x86/kernel/reboot.c
drivers/net/atlx/atl2.c
drivers/net/ipg.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/jme.c
drivers/net/mv643xx_eth.c
drivers/net/phy/phy_device.c
drivers/net/sh_eth.c
drivers/net/smc911x.c
drivers/net/usb/asix.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-rx.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/libertas_tf/if_usb.c
drivers/pci/intel-iommu.c
drivers/usb/gadget/f_rndis.c
drivers/usb/host/ehci-pci.c
drivers/usb/mon/mon_bin.c
drivers/usb/musb/musb_host.c
drivers/usb/serial/cp2101.c
drivers/usb/storage/unusual_devs.h
fs/cifs/CHANGES
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/file.c
fs/cifs/misc.c
fs/cifs/readdir.c
include/net/mac80211.h
kernel/trace/ftrace.c
kernel/trace/ring_buffer.c
kernel/trace/trace.c
net/core/pktgen.c
net/ipv4/af_inet.c
net/ipv4/ipmr.c
net/ipv4/udp.c
net/ipv6/ip6mr.c
net/ipv6/proc.c
net/mac80211/mlme.c
net/phonet/af_phonet.c
net/sched/sch_api.c
net/sched/sch_generic.c
net/sunrpc/auth_generic.c

index 8df6a7b0e66cdfd3b1de96ed038a062b71be8008..88bb71b46da4217b8704bf10b8ccae68d1ad832d 100644 (file)
@@ -96,7 +96,7 @@ Letting the PHY Abstraction Layer do Everything
    static void adjust_link(struct net_device *dev);
  
  Next, you need to know the device name of the PHY connected to this device. 
- The name will look something like, "phy0:0", where the first number is the
+ The name will look something like, "0:00", where the first number is the
  bus id, and the second is the PHY's address on that bus.  Typically,
  the bus is responsible for making its ID unique.
  
index c8e554eafce355775c96f96e898ebc7ed168ece7..b5cf6457305a5812bf4a973a03453a6bc53b0527 100644 (file)
@@ -84,5 +84,7 @@ extern void set_434_reg(unsigned reg_offs, unsigned bit, unsigned len, unsigned
 extern unsigned get_434_reg(unsigned reg_offs);
 extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask);
 extern unsigned char get_latch_u5(void);
+extern void rb532_gpio_set_ilevel(int bit, unsigned gpio);
+extern void rb532_gpio_set_istat(int bit, unsigned gpio);
 
 #endif /* _RC32434_GPIO_H_ */
index 79e8ef67d0d397eb38ce223cd27160bec0a8a548..f25a8491670329ec0298e97bb8685bea31a7a02b 100644 (file)
 #define BTCS           0x010040
 #define BTCOMPARE      0x010044
 #define GPIOBASE       0x050000
-#define GPIOCFG                0x050004
-#define GPIOD          0x050008
-#define GPIOILEVEL     0x05000C
-#define GPIOISTAT      0x050010
-#define GPIONMIEN      0x050014
-#define IMASK6         0x038038
+/* Offsets relative to GPIOBASE */
+#define GPIOFUNC       0x00
+#define GPIOCFG                0x04
+#define GPIOD          0x08
+#define GPIOILEVEL     0x0C
+#define GPIOISTAT      0x10
+#define GPIONMIEN      0x14
+#define IMASK6         0x38
 #define LO_WPX         (1 << 0)
 #define LO_ALE         (1 << 1)
 #define LO_CLE         (1 << 2)
index d3bd5c5aa2ecd0ae1fa34c9083debcac6c4107e0..9601ea95054283dc3d3ed42fb14930da9f426c01 100644 (file)
@@ -63,7 +63,7 @@ static inline int mips_clockevent_init(void)
 /*
  * Initialize the count register as a clocksource
  */
-#ifdef CONFIG_CEVT_R4K
+#ifdef CONFIG_CSRC_R4K
 extern int init_mips_clocksource(void);
 #else
 static inline int init_mips_clocksource(void)
index 86e026f067bc566c2bbd9620763e2ab6428e836a..74fb74583b4e7e83eec6fdb7d328be7436dd4398 100644 (file)
@@ -27,7 +27,7 @@ int __init init_mips_clocksource(void)
        if (!cpu_has_counter || !mips_hpt_frequency)
                return -ENXIO;
 
-       /* Calclate a somewhat reasonable rating value */
+       /* Calculate a somewhat reasonable rating value */
        clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
 
        clocksource_set_clock(&clocksource_mips, mips_hpt_frequency);
index 1f602a110e101e9e54bcd4c1426cec9659eaaa23..13adb578211062d99a30c1733e7fb452d49052b2 100644 (file)
@@ -161,7 +161,7 @@ static inline int __init indy_sc_probe(void)
 
 /* XXX Check with wje if the Indy caches can differenciate between
    writeback + invalidate and just invalidate.  */
-struct bcache_ops indy_sc_ops = {
+static struct bcache_ops indy_sc_ops = {
        .bc_enable = indy_sc_enable,
        .bc_disable = indy_sc_disable,
        .bc_wback_inv = indy_sc_wback_invalidate,
index 96236bf33838a20ef8ab147472adba28faf51bb9..df9e526312a24ce4772cb3a332dcab66c3927a50 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/init.h>
 #include <linux/smp.h>
 
-#include <asm-mips/addrspace.h>
-#include <asm-mips/mips-boards/launch.h>
-#include <asm-mips/mipsmtregs.h>
+#include <asm/addrspace.h>
+#include <asm/mips-boards/launch.h>
+#include <asm/mipsmtregs.h>
 
 int amon_cpu_avail(int cpu)
 {
index 2f22d714d5b09487c5535f49cce0018dcda4d070..c1c29181bd4641de62977a19107a4d5ad64734c0 100644 (file)
@@ -118,7 +118,7 @@ static struct platform_device cf_slot0 = {
 /* Resources and device for NAND */
 static int rb532_dev_ready(struct mtd_info *mtd)
 {
-       return readl(IDT434_REG_BASE + GPIOD) & GPIO_RDY;
+       return gpio_get_value(GPIO_RDY);
 }
 
 static void rb532_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
index 70c4a6726377ded624a426ca683df1511dd62bc2..0e84c8ab6a3932b39adbfbe2cb8144fae39ba51d 100644 (file)
 struct rb532_gpio_chip {
        struct gpio_chip chip;
        void __iomem     *regbase;
-       void            (*set_int_level)(struct gpio_chip *chip, unsigned offset, int value);
-       int             (*get_int_level)(struct gpio_chip *chip, unsigned offset);
-       void            (*set_int_status)(struct gpio_chip *chip, unsigned offset, int value);
-       int             (*get_int_status)(struct gpio_chip *chip, unsigned offset);
 };
 
 struct mpmc_device dev3;
@@ -111,15 +107,47 @@ unsigned char get_latch_u5(void)
 }
 EXPORT_SYMBOL(get_latch_u5);
 
+/* rb532_set_bit - sanely set a bit
+ *
+ * bitval: new value for the bit
+ * offset: bit index in the 4 byte address range
+ * ioaddr: 4 byte aligned address being altered
+ */
+static inline void rb532_set_bit(unsigned bitval,
+               unsigned offset, void __iomem *ioaddr)
+{
+       unsigned long flags;
+       u32 val;
+
+       bitval = !!bitval;              /* map parameter to {0,1} */
+
+       local_irq_save(flags);
+
+       val = readl(ioaddr);
+       val &= ~( ~bitval << offset );   /* unset bit if bitval == 0 */
+       val |=  (  bitval << offset );   /* set bit if bitval == 1 */
+       writel(val, ioaddr);
+
+       local_irq_restore(flags);
+}
+
+/* rb532_get_bit - read a bit
+ *
+ * returns the boolean state of the bit, which may be > 1
+ */
+static inline int rb532_get_bit(unsigned offset, void __iomem *ioaddr)
+{
+       return (readl(ioaddr) & (1 << offset));
+}
+
 /*
  * Return GPIO level */
 static int rb532_gpio_get(struct gpio_chip *chip, unsigned offset)
 {
-       u32                     mask = 1 << offset;
        struct rb532_gpio_chip  *gpch;
 
        gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       return readl(gpch->regbase + GPIOD) & mask;
+       return rb532_get_bit(offset, gpch->regbase + GPIOD);
 }
 
 /*
@@ -128,23 +156,10 @@ static int rb532_gpio_get(struct gpio_chip *chip, unsigned offset)
 static void rb532_gpio_set(struct gpio_chip *chip,
                                unsigned offset, int value)
 {
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     tmp;
        struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpvr;
 
        gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       gpvr = gpch->regbase + GPIOD;
-
-       local_irq_save(flags);
-       tmp = readl(gpvr);
-       if (value)
-               tmp |= mask;
-       else
-               tmp &= ~mask;
-       writel(tmp, gpvr);
-       local_irq_restore(flags);
+       rb532_set_bit(value, offset, gpch->regbase + GPIOD);
 }
 
 /*
@@ -152,21 +167,14 @@ static void rb532_gpio_set(struct gpio_chip *chip,
  */
 static int rb532_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
 {
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     value;
        struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpdr;
 
        gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       gpdr = gpch->regbase + GPIOCFG;
 
-       local_irq_save(flags);
-       value = readl(gpdr);
-       value &= ~mask;
-       writel(value, gpdr);
-       local_irq_restore(flags);
+       if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC))
+               return 1;       /* alternate function, GPIOCFG is ignored */
 
+       rb532_set_bit(0, offset, gpch->regbase + GPIOCFG);
        return 0;
 }
 
@@ -176,117 +184,60 @@ static int rb532_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
 static int rb532_gpio_direction_output(struct gpio_chip *chip,
                                        unsigned offset, int value)
 {
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     tmp;
        struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpdr;
 
        gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       writel(mask, gpch->regbase + GPIOD);
-       gpdr = gpch->regbase + GPIOCFG;
 
-       local_irq_save(flags);
-       tmp = readl(gpdr);
-       tmp |= mask;
-       writel(tmp, gpdr);
-       local_irq_restore(flags);
+       if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC))
+               return 1;       /* alternate function, GPIOCFG is ignored */
 
+       /* set the initial output value */
+       rb532_set_bit(value, offset, gpch->regbase + GPIOD);
+
+       rb532_set_bit(1, offset, gpch->regbase + GPIOCFG);
        return 0;
 }
 
-/*
- * Set the GPIO interrupt level
- */
-static void rb532_gpio_set_int_level(struct gpio_chip *chip,
-                                       unsigned offset, int value)
-{
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     tmp;
-       struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpil;
-
-       gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       gpil = gpch->regbase + GPIOILEVEL;
-
-       local_irq_save(flags);
-       tmp = readl(gpil);
-       if (value)
-               tmp |= mask;
-       else
-               tmp &= ~mask;
-       writel(tmp, gpil);
-       local_irq_restore(flags);
-}
+static struct rb532_gpio_chip rb532_gpio_chip[] = {
+       [0] = {
+               .chip = {
+                       .label                  = "gpio0",
+                       .direction_input        = rb532_gpio_direction_input,
+                       .direction_output       = rb532_gpio_direction_output,
+                       .get                    = rb532_gpio_get,
+                       .set                    = rb532_gpio_set,
+                       .base                   = 0,
+                       .ngpio                  = 32,
+               },
+       },
+};
 
 /*
- * Get the GPIO interrupt level
+ * Set GPIO interrupt level
  */
-static int rb532_gpio_get_int_level(struct gpio_chip *chip, unsigned offset)
+void rb532_gpio_set_ilevel(int bit, unsigned gpio)
 {
-       u32                     mask = 1 << offset;
-       struct rb532_gpio_chip  *gpch;
-
-       gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       return readl(gpch->regbase + GPIOILEVEL) & mask;
+       rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOILEVEL);
 }
+EXPORT_SYMBOL(rb532_gpio_set_ilevel);
 
 /*
- * Set the GPIO interrupt status
+ * Set GPIO interrupt status
  */
-static void rb532_gpio_set_int_status(struct gpio_chip *chip,
-                               unsigned offset, int value)
+void rb532_gpio_set_istat(int bit, unsigned gpio)
 {
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     tmp;
-       struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpis;
-
-       gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       gpis = gpch->regbase + GPIOISTAT;
-
-       local_irq_save(flags);
-       tmp = readl(gpis);
-       if (value)
-               tmp |= mask;
-       else
-               tmp &= ~mask;
-       writel(tmp, gpis);
-       local_irq_restore(flags);
+       rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOISTAT);
 }
+EXPORT_SYMBOL(rb532_gpio_set_istat);
 
 /*
- * Get the GPIO interrupt status
+ * Configure GPIO alternate function
  */
-static int rb532_gpio_get_int_status(struct gpio_chip *chip, unsigned offset)
+static void rb532_gpio_set_func(int bit, unsigned gpio)
 {
-       u32                     mask = 1 << offset;
-       struct rb532_gpio_chip  *gpch;
-
-       gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       return readl(gpch->regbase + GPIOISTAT) & mask;
+       rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOFUNC);
 }
 
-static struct rb532_gpio_chip rb532_gpio_chip[] = {
-       [0] = {
-               .chip = {
-                       .label                  = "gpio0",
-                       .direction_input        = rb532_gpio_direction_input,
-                       .direction_output       = rb532_gpio_direction_output,
-                       .get                    = rb532_gpio_get,
-                       .set                    = rb532_gpio_set,
-                       .base                   = 0,
-                       .ngpio                  = 32,
-               },
-               .get_int_level          = rb532_gpio_get_int_level,
-               .set_int_level          = rb532_gpio_set_int_level,
-               .get_int_status         = rb532_gpio_get_int_status,
-               .set_int_status         = rb532_gpio_set_int_status,
-       },
-};
-
 int __init rb532_gpio_init(void)
 {
        struct resource *r;
@@ -310,9 +261,11 @@ int __init rb532_gpio_init(void)
                return -ENXIO;
        }
 
-       /* Set the interrupt status and level for the CF pin */
-       rb532_gpio_set_int_level(&rb532_gpio_chip->chip, CF_GPIO_NUM, 1);
-       rb532_gpio_set_int_status(&rb532_gpio_chip->chip, CF_GPIO_NUM, 0);
+       /* configure CF_GPIO_NUM as CFRDY IRQ source */
+       rb532_gpio_set_func(0, CF_GPIO_NUM);
+       rb532_gpio_direction_input(&rb532_gpio_chip->chip, CF_GPIO_NUM);
+       rb532_gpio_set_ilevel(1, CF_GPIO_NUM);
+       rb532_gpio_set_istat(0, CF_GPIO_NUM);
 
        return 0;
 }
index 90904f9dfc504fb1e0337abb196b1617006ce514..927db3668b6ffd6bec55e8a1b90d099f5cd7a1dc 100644 (file)
@@ -183,10 +183,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
  * being 64 bit in both cases.
  */
 
-static long translate_usr_offset(long offset)
+static compat_ulong_t translate_usr_offset(compat_ulong_t offset)
 {
        if (offset < 0)
-               return -1;
+               return sizeof(struct pt_regs);
        else if (offset <= 32*4)        /* gr[0..31] */
                return offset * 2 + 4;
        else if (offset <= 32*4+32*8)   /* gr[0..31] + fr[0..31] */
@@ -194,7 +194,7 @@ static long translate_usr_offset(long offset)
        else if (offset < sizeof(struct pt_regs)/2 + 32*4)
                return offset * 2 + 4 - 32*8;
        else
-               return -1;
+               return sizeof(struct pt_regs);
 }
 
 long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
@@ -209,7 +209,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                if (addr & (sizeof(compat_uint_t)-1))
                        break;
                addr = translate_usr_offset(addr);
-               if (addr < 0)
+               if (addr >= sizeof(struct pt_regs))
                        break;
 
                tmp = *(compat_uint_t *) ((char *) task_regs(child) + addr);
@@ -236,7 +236,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                        if (addr & (sizeof(compat_uint_t)-1))
                                break;
                        addr = translate_usr_offset(addr);
-                       if (addr < 0)
+                       if (addr >= sizeof(struct pt_regs))
                                break;
                        if (addr >= PT_FR0 && addr <= PT_FR31 + 4) {
                                /* Special case, fp regs are 64 bits anyway */
index 664f15280f14354dc057e1d97954db6baab4b959..f8cfd00db450f2e0f948ce7128a2d44867aebf59 100644 (file)
@@ -46,7 +46,7 @@ int __copy_from_user(void *dst, const void __user *src, unsigned size)
                return ret;
        case 10:
                __get_user_asm(*(u64 *)dst, (u64 __user *)src,
-                              ret, "q", "", "=r", 16);
+                              ret, "q", "", "=r", 10);
                if (unlikely(ret))
                        return ret;
                __get_user_asm(*(u16 *)(8 + (char *)dst),
index 7a3f2028e2eb9e01a757a93b0de5b2e4f77f3634..c9513e1ff28d3b79fd5fd5806cd41a0eb33a29c0 100644 (file)
@@ -1140,6 +1140,20 @@ static void __clear_irq_vector(int irq)
 
        cfg->vector = 0;
        cpus_clear(cfg->domain);
+
+       if (likely(!cfg->move_in_progress))
+               return;
+       cpus_and(mask, cfg->old_domain, cpu_online_map);
+       for_each_cpu_mask_nr(cpu, mask) {
+               for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS;
+                                                               vector++) {
+                       if (per_cpu(vector_irq, cpu)[vector] != irq)
+                               continue;
+                       per_cpu(vector_irq, cpu)[vector] = -1;
+                       break;
+               }
+       }
+       cfg->move_in_progress = 0;
 }
 
 void __setup_vector_irq(int cpu)
index 724adfc63cb9a7b60d6ee5c82efd919fe237f69c..cc5a2545dd41c0ce42b96eafffe85230773162e4 100644 (file)
@@ -169,6 +169,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
                        DMI_MATCH(DMI_BOARD_NAME, "0KW626"),
                },
        },
+       {   /* Handle problems with rebooting on Dell Optiplex 330 with 0KP561 */
+               .callback = set_bios_reboot,
+               .ident = "Dell OptiPlex 330",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
+                       DMI_MATCH(DMI_BOARD_NAME, "0KP561"),
+               },
+       },
        {       /* Handle problems with rebooting on Dell 2400's */
                .callback = set_bios_reboot,
                .ident = "Dell PowerEdge 2400",
index f5bdc92c1a658932cb2de2663e8aad88478c9da6..8571e8c0bc67b9973e16a8a85aa92b00049faed6 100644 (file)
@@ -1690,9 +1690,11 @@ static int atl2_resume(struct pci_dev *pdev)
 
        ATL2_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0);
 
-       err = atl2_request_irq(adapter);
-       if (netif_running(netdev) && err)
-               return err;
+       if (netif_running(netdev)) {
+               err = atl2_request_irq(adapter);
+               if (err)
+                       return err;
+       }
 
        atl2_reset_hw(&adapter->hw);
 
index 7373dafbb3f7d3f9d06ed71a785b840a5e236c87..059369885be1c71c96ea1cbf5807659c7fdba793 100644 (file)
@@ -1112,7 +1112,7 @@ static void ipg_nic_rx_free_skb(struct net_device *dev)
                struct ipg_rx *rxfd = sp->rxd + entry;
 
                pci_unmap_single(sp->pdev,
-                       le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN),
+                       le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN,
                        sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
                dev_kfree_skb_irq(sp->rx_buff[entry]);
                sp->rx_buff[entry] = NULL;
@@ -1179,7 +1179,7 @@ static int ipg_nic_rx_check_error(struct net_device *dev)
                 */
                if (sp->rx_buff[entry]) {
                        pci_unmap_single(sp->pdev,
-                               le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN),
+                               le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN,
                                sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
 
                        dev_kfree_skb_irq(sp->rx_buff[entry]);
@@ -1246,7 +1246,7 @@ static void ipg_nic_rx_with_start(struct net_device *dev,
        if (jumbo->found_start)
                dev_kfree_skb_irq(jumbo->skb);
 
-       pci_unmap_single(pdev, le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN),
+       pci_unmap_single(pdev, le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN,
                         sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
 
        skb_put(skb, sp->rxfrag_size);
@@ -1349,7 +1349,7 @@ static int ipg_nic_rx_jumbo(struct net_device *dev)
                unsigned int entry = curr % IPG_RFDLIST_LENGTH;
                struct ipg_rx *rxfd = sp->rxd + entry;
 
-               if (!(rxfd->rfs & le64_to_cpu(IPG_RFS_RFDDONE)))
+               if (!(rxfd->rfs & cpu_to_le64(IPG_RFS_RFDDONE)))
                        break;
 
                switch (ipg_nic_rx_check_frame_type(dev)) {
index 7548fb7360d9a611827bd602262223d687dc3702..36f2bb666bf7e4a8d471f932cddd2ae67b66485a 100644 (file)
@@ -1287,7 +1287,34 @@ static void ixgbe_set_itr(struct ixgbe_adapter *adapter)
        return;
 }
 
-static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter);
+/**
+ * ixgbe_irq_disable - Mask off interrupt generation on the NIC
+ * @adapter: board private structure
+ **/
+static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter)
+{
+       IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~0);
+       IXGBE_WRITE_FLUSH(&adapter->hw);
+       if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
+               int i;
+               for (i = 0; i < adapter->num_msix_vectors; i++)
+                       synchronize_irq(adapter->msix_entries[i].vector);
+       } else {
+               synchronize_irq(adapter->pdev->irq);
+       }
+}
+
+/**
+ * ixgbe_irq_enable - Enable default interrupt generation settings
+ * @adapter: board private structure
+ **/
+static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter)
+{
+       u32 mask;
+       mask = IXGBE_EIMS_ENABLE_MASK;
+       IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
+       IXGBE_WRITE_FLUSH(&adapter->hw);
+}
 
 /**
  * ixgbe_intr - legacy mode Interrupt Handler
@@ -1393,35 +1420,6 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
        }
 }
 
-/**
- * ixgbe_irq_disable - Mask off interrupt generation on the NIC
- * @adapter: board private structure
- **/
-static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter)
-{
-       IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~0);
-       IXGBE_WRITE_FLUSH(&adapter->hw);
-       if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
-               int i;
-               for (i = 0; i < adapter->num_msix_vectors; i++)
-                       synchronize_irq(adapter->msix_entries[i].vector);
-       } else {
-               synchronize_irq(adapter->pdev->irq);
-       }
-}
-
-/**
- * ixgbe_irq_enable - Enable default interrupt generation settings
- * @adapter: board private structure
- **/
-static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter)
-{
-       u32 mask;
-       mask = IXGBE_EIMS_ENABLE_MASK;
-       IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
-       IXGBE_WRITE_FLUSH(&adapter->hw);
-}
-
 /**
  * ixgbe_configure_msi_and_legacy - Initialize PIN (INTA...) and MSI interrupts
  *
index 81c6cdc3851f8afd54d3319df5e6e9b99d516a25..665e70d620fc3cc6b7337c825a7e41f6d422c4b6 100644 (file)
@@ -912,23 +912,23 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx)
                skb_put(skb, framesize);
                skb->protocol = eth_type_trans(skb, jme->dev);
 
-               if (jme_rxsum_ok(jme, rxdesc->descwb.flags))
+               if (jme_rxsum_ok(jme, le16_to_cpu(rxdesc->descwb.flags)))
                        skb->ip_summed = CHECKSUM_UNNECESSARY;
                else
                        skb->ip_summed = CHECKSUM_NONE;
 
-               if (rxdesc->descwb.flags & RXWBFLAG_TAGON) {
+               if (rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_TAGON)) {
                        if (jme->vlgrp) {
                                jme->jme_vlan_rx(skb, jme->vlgrp,
-                                       le32_to_cpu(rxdesc->descwb.vlan));
+                                       le16_to_cpu(rxdesc->descwb.vlan));
                                NET_STAT(jme).rx_bytes += 4;
                        }
                } else {
                        jme->jme_rx(skb);
                }
 
-               if ((le16_to_cpu(rxdesc->descwb.flags) & RXWBFLAG_DEST) ==
-                               RXWBFLAG_DEST_MUL)
+               if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_DEST)) ==
+                   cpu_to_le16(RXWBFLAG_DEST_MUL))
                        ++(NET_STAT(jme).multicast);
 
                jme->dev->last_rx = jiffies;
@@ -961,7 +961,7 @@ jme_process_receive(struct jme_adapter *jme, int limit)
                rxdesc = rxring->desc;
                rxdesc += i;
 
-               if ((rxdesc->descwb.flags & RXWBFLAG_OWN) ||
+               if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) ||
                !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL))
                        goto out;
 
@@ -1763,10 +1763,9 @@ jme_expand_header(struct jme_adapter *jme, struct sk_buff *skb)
 }
 
 static int
-jme_tx_tso(struct sk_buff *skb,
-               u16 *mss, u8 *flags)
+jme_tx_tso(struct sk_buff *skb, __le16 *mss, u8 *flags)
 {
-       *mss = skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT;
+       *mss = cpu_to_le16(skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT);
        if (*mss) {
                *flags |= TXFLAG_LSEN;
 
@@ -1826,11 +1825,11 @@ jme_tx_csum(struct jme_adapter *jme, struct sk_buff *skb, u8 *flags)
 }
 
 static inline void
-jme_tx_vlan(struct sk_buff *skb, u16 *vlan, u8 *flags)
+jme_tx_vlan(struct sk_buff *skb, __le16 *vlan, u8 *flags)
 {
        if (vlan_tx_tag_present(skb)) {
                *flags |= TXFLAG_TAGON;
-               *vlan = vlan_tx_tag_get(skb);
+               *vlan = cpu_to_le16(vlan_tx_tag_get(skb));
        }
 }
 
index b9dcdbd369f87b87e5e9e12650e50d7ada6d9465..e513f76f2a9f6d1cd55cc8d190d679b36f5872da 100644 (file)
@@ -899,7 +899,8 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force)
                if (skb != NULL) {
                        if (skb_queue_len(&mp->rx_recycle) <
                                        mp->default_rx_ring_size &&
-                           skb_recycle_check(skb, mp->skb_size))
+                           skb_recycle_check(skb, mp->skb_size +
+                                       dma_get_cache_alignment() - 1))
                                __skb_queue_head(&mp->rx_recycle, skb);
                        else
                                dev_kfree_skb(skb);
@@ -2435,8 +2436,8 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev)
        struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data;
 
        if (pd == NULL || pd->shared_smi == NULL) {
-               mdiobus_free(msp->smi_bus);
                mdiobus_unregister(msp->smi_bus);
+               mdiobus_free(msp->smi_bus);
        }
        if (msp->err_interrupt != NO_IRQ)
                free_irq(msp->err_interrupt, msp);
index 8fb1faca883aef9126b547f09ecf830e4feb1562..55bc24b234e324899b444298aeb37c847c8a9ba0 100644 (file)
@@ -564,20 +564,32 @@ EXPORT_SYMBOL(genphy_restart_aneg);
  */
 int genphy_config_aneg(struct phy_device *phydev)
 {
-       int result = 0;
+       int result;
 
-       if (AUTONEG_ENABLE == phydev->autoneg) {
-               int result = genphy_config_advert(phydev);
+       if (AUTONEG_ENABLE != phydev->autoneg)
+               return genphy_setup_forced(phydev);
+
+       result = genphy_config_advert(phydev);
+
+       if (result < 0) /* error */
+               return result;
 
-               if (result < 0) /* error */
-                       return result;
+       if (result == 0) {
+               /* Advertisment hasn't changed, but maybe aneg was never on to
+                * begin with?  Or maybe phy was isolated? */
+               int ctl = phy_read(phydev, MII_BMCR);
+
+               if (ctl < 0)
+                       return ctl;
+
+               if (!(ctl & BMCR_ANENABLE) || (ctl & BMCR_ISOLATE))
+                       result = 1; /* do restart aneg */
+       }
 
-               /* Only restart aneg if we are advertising something different
-                * than we were before.  */
-               if (result > 0)
-                       result = genphy_restart_aneg(phydev);
-       } else
-               result = genphy_setup_forced(phydev);
+       /* Only restart aneg if we are advertising something different
+        * than we were before.  */
+       if (result > 0)
+               result = genphy_restart_aneg(phydev);
 
        return result;
 }
index a24bb68887ab24eb399137d8d6cf45366fa2b704..59f242a6771497619e36f51cc424ef9a61e2036d 100644 (file)
@@ -927,7 +927,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
        struct sh_eth_private *mdp = netdev_priv(ndev);
        struct sh_eth_txdesc *txdesc;
        u32 entry;
-       int flags;
+       unsigned long flags;
 
        spin_lock_irqsave(&mdp->lock, flags);
        if ((mdp->cur_tx - mdp->dirty_tx) >= (TX_RING_SIZE - 4)) {
@@ -1141,7 +1141,7 @@ static int sh_mdio_init(struct net_device *ndev, int id)
        /* Hook up MII support for ethtool */
        mdp->mii_bus->name = "sh_mii";
        mdp->mii_bus->parent = &ndev->dev;
-       mdp->mii_bus->id[0] = id;
+       snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%x", id);
 
        /* PHY IRQ */
        mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
index 1f26ab0e7986533386a821870c30290222c387ba..b185cd12269c1d9a1a8ff102cedd226d7695d48a 100644 (file)
@@ -1813,7 +1813,7 @@ static int __init smc911x_probe(struct net_device *dev)
        val = SMC_GET_BYTE_TEST(lp);
        DBG(SMC_DEBUG_MISC, "%s: endian probe returned 0x%04x\n", CARDNAME, val);
        if (val != 0x87654321) {
-               printk(KERN_ERR "Invalid chip endian 0x08%x\n",val);
+               printk(KERN_ERR "Invalid chip endian 0x%08x\n",val);
                retval = -ENODEV;
                goto err_out;
        }
index e12cdb4543b406f543e6e363dd43dcef20918db7..de57490103fcd05e58a8610d7fb77b3dbc0ffc20 100644 (file)
@@ -1102,12 +1102,14 @@ static int ax88178_link_reset(struct usbnet *dev)
        mode = AX88178_MEDIUM_DEFAULT;
 
        if (ecmd.speed == SPEED_1000)
-               mode |= AX_MEDIUM_GM | AX_MEDIUM_ENCK;
+               mode |= AX_MEDIUM_GM;
        else if (ecmd.speed == SPEED_100)
                mode |= AX_MEDIUM_PS;
        else
                mode &= ~(AX_MEDIUM_PS | AX_MEDIUM_GM);
 
+       mode |= AX_MEDIUM_ENCK;
+
        if (ecmd.duplex == DUPLEX_FULL)
                mode |= AX_MEDIUM_FD;
        else
index 8d690a0eb1a967722508942d9fdd90225c98be47..444c5cc05f03c671c2548a4f87ffef55c3c8f0d0 100644 (file)
@@ -1384,7 +1384,7 @@ void iwl_rx_handle(struct iwl_priv *priv)
 
                rxq->queue[i] = NULL;
 
-               pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr,
+               pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr,
                                            priv->hw_params.rx_buf_size,
                                            PCI_DMA_FROMDEVICE);
                pkt = (struct iwl_rx_packet *)rxb->skb->data;
@@ -1436,8 +1436,8 @@ void iwl_rx_handle(struct iwl_priv *priv)
                        rxb->skb = NULL;
                }
 
-               pci_unmap_single(priv->pci_dev, rxb->dma_addr,
-                                priv->hw_params.rx_buf_size,
+               pci_unmap_single(priv->pci_dev, rxb->real_dma_addr,
+                                priv->hw_params.rx_buf_size + 256,
                                 PCI_DMA_FROMDEVICE);
                spin_lock_irqsave(&rxq->lock, flags);
                list_add_tail(&rxb->list, &priv->rxq.rx_used);
@@ -2341,7 +2341,6 @@ static void iwl_bg_alive_start(struct work_struct *data)
        mutex_lock(&priv->mutex);
        iwl_alive_start(priv);
        mutex_unlock(&priv->mutex);
-       ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
 }
 
 static void iwl4965_bg_rf_kill(struct work_struct *work)
index c018121085e937dd210d2048f549f6cbcf6b0dfd..9966d4e384ce75d37264345431be2122a5304c68 100644 (file)
@@ -89,7 +89,8 @@ extern struct iwl_cfg iwl5100_abg_cfg;
 #define        DEFAULT_LONG_RETRY_LIMIT  4U
 
 struct iwl_rx_mem_buffer {
-       dma_addr_t dma_addr;
+       dma_addr_t real_dma_addr;
+       dma_addr_t aligned_dma_addr;
        struct sk_buff *skb;
        struct list_head list;
 };
index 7cde9d76ff5df438b335996f1b602cf4e14dd9dc..0509c16dbe758b32e1a23db7da1a09100493b0c8 100644 (file)
@@ -204,7 +204,7 @@ int iwl_rx_queue_restock(struct iwl_priv *priv)
                list_del(element);
 
                /* Point to Rx buffer via next RBD in circular buffer */
-               rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->dma_addr);
+               rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->aligned_dma_addr);
                rxq->queue[rxq->write] = rxb;
                rxq->write = (rxq->write + 1) & RX_QUEUE_MASK;
                rxq->free_count--;
@@ -251,7 +251,7 @@ void iwl_rx_allocate(struct iwl_priv *priv)
                rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
 
                /* Alloc a new receive buffer */
-               rxb->skb = alloc_skb(priv->hw_params.rx_buf_size,
+               rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256,
                                __GFP_NOWARN | GFP_ATOMIC);
                if (!rxb->skb) {
                        if (net_ratelimit())
@@ -266,9 +266,17 @@ void iwl_rx_allocate(struct iwl_priv *priv)
                list_del(element);
 
                /* Get physical address of RB/SKB */
-               rxb->dma_addr =
-                   pci_map_single(priv->pci_dev, rxb->skb->data,
-                          priv->hw_params.rx_buf_size, PCI_DMA_FROMDEVICE);
+               rxb->real_dma_addr = pci_map_single(
+                                       priv->pci_dev,
+                                       rxb->skb->data,
+                                       priv->hw_params.rx_buf_size + 256,
+                                       PCI_DMA_FROMDEVICE);
+               /* dma address must be no more than 36 bits */
+               BUG_ON(rxb->real_dma_addr & ~DMA_BIT_MASK(36));
+               /* and also 256 byte aligned! */
+               rxb->aligned_dma_addr = ALIGN(rxb->real_dma_addr, 256);
+               skb_reserve(rxb->skb, rxb->aligned_dma_addr - rxb->real_dma_addr);
+
                list_add_tail(&rxb->list, &rxq->rx_free);
                rxq->free_count++;
        }
@@ -300,8 +308,8 @@ void iwl_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
        for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) {
                if (rxq->pool[i].skb != NULL) {
                        pci_unmap_single(priv->pci_dev,
-                                        rxq->pool[i].dma_addr,
-                                        priv->hw_params.rx_buf_size,
+                                        rxq->pool[i].real_dma_addr,
+                                        priv->hw_params.rx_buf_size + 256,
                                         PCI_DMA_FROMDEVICE);
                        dev_kfree_skb(rxq->pool[i].skb);
                }
@@ -354,8 +362,8 @@ void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
                 * to an SKB, so we need to unmap and free potential storage */
                if (rxq->pool[i].skb != NULL) {
                        pci_unmap_single(priv->pci_dev,
-                                        rxq->pool[i].dma_addr,
-                                        priv->hw_params.rx_buf_size,
+                                        rxq->pool[i].real_dma_addr,
+                                        priv->hw_params.rx_buf_size + 256,
                                         PCI_DMA_FROMDEVICE);
                        priv->alloc_rxb_skb--;
                        dev_kfree_skb(rxq->pool[i].skb);
index 285b53e7e261af8b70cbc447382b0e5369b86bbe..45a6b0c356953f1d88c32747b322d0dbc253756f 100644 (file)
@@ -6012,7 +6012,6 @@ static void iwl3945_bg_alive_start(struct work_struct *data)
        mutex_lock(&priv->mutex);
        iwl3945_alive_start(priv);
        mutex_unlock(&priv->mutex);
-       ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
 }
 
 static void iwl3945_bg_rf_kill(struct work_struct *work)
index 1cc03a8dd67acdfaca7c93a09c39b02428565c1f..59634c33b1f9194f4e10ed8fc36e2d9aed30ef4e 100644 (file)
@@ -331,7 +331,7 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp,
        /* Fill the receive configuration URB and initialise the Rx call back */
        usb_fill_bulk_urb(cardp->rx_urb, cardp->udev,
                          usb_rcvbulkpipe(cardp->udev, cardp->ep_in),
-                         (void *) (skb->tail),
+                         skb_tail_pointer(skb),
                          MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, cardp);
 
        cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET;
index a2692724b68ffe04382bdd8a2d15c4774511c47d..5c8baa43ac9c5ed86bde043702af795d37dcf2b8 100644 (file)
@@ -1655,12 +1655,14 @@ int __init init_dmars(void)
                        iommu->flush.flush_context = __iommu_flush_context;
                        iommu->flush.flush_iotlb = __iommu_flush_iotlb;
                        printk(KERN_INFO "IOMMU 0x%Lx: using Register based "
-                              "invalidation\n", drhd->reg_base_addr);
+                              "invalidation\n",
+                              (unsigned long long)drhd->reg_base_addr);
                } else {
                        iommu->flush.flush_context = qi_flush_context;
                        iommu->flush.flush_iotlb = qi_flush_iotlb;
                        printk(KERN_INFO "IOMMU 0x%Lx: using Queued "
-                              "invalidation\n", drhd->reg_base_addr);
+                              "invalidation\n",
+                              (unsigned long long)drhd->reg_base_addr);
                }
        }
 
index 659b3d9671c4fe3f0f31220cb4b3bde514d88d2b..428b5993575a9126104da3ec32ea695e7881c9e8 100644 (file)
@@ -172,7 +172,6 @@ static struct usb_interface_descriptor rndis_data_intf __initdata = {
        .bDescriptorType =      USB_DT_INTERFACE,
 
        /* .bInterfaceNumber = DYNAMIC */
-       .bAlternateSetting =    1,
        .bNumEndpoints =        2,
        .bInterfaceClass =      USB_CLASS_CDC_DATA,
        .bInterfaceSubClass =   0,
@@ -303,7 +302,7 @@ static void rndis_response_available(void *_rndis)
        __le32                          *data = req->buf;
        int                             status;
 
-       if (atomic_inc_return(&rndis->notify_count))
+       if (atomic_inc_return(&rndis->notify_count) != 1)
                return;
 
        /* Send RNDIS RESPONSE_AVAILABLE notification; a
index c46a58f9181ded00f97627f076277fd32db9ff79..9d0ea573aef60c3e45afb3dec145c5f0f4ed843b 100644 (file)
@@ -66,6 +66,8 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
 {
        struct ehci_hcd         *ehci = hcd_to_ehci(hcd);
        struct pci_dev          *pdev = to_pci_dev(hcd->self.controller);
+       struct pci_dev          *p_smbus;
+       u8                      rev;
        u32                     temp;
        int                     retval;
 
@@ -166,6 +168,25 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
                        pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
                }
                break;
+       case PCI_VENDOR_ID_ATI:
+               /* SB700 old version has a bug in EHCI controller,
+                * which causes usb devices lose response in some cases.
+                */
+               if (pdev->device == 0x4396) {
+                       p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
+                                                PCI_DEVICE_ID_ATI_SBX00_SMBUS,
+                                                NULL);
+                       if (!p_smbus)
+                               break;
+                       rev = p_smbus->revision;
+                       if ((rev == 0x3a) || (rev == 0x3b)) {
+                               u8 tmp;
+                               pci_read_config_byte(pdev, 0x53, &tmp);
+                               pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
+                       }
+                       pci_dev_put(p_smbus);
+               }
+               break;
        }
 
        ehci_reset(ehci);
index c9de3f027aab07a9907b331f25c7723ac012d8e3..e06810aef2dfedbec54f8b232b4219d79fba5536 100644 (file)
@@ -687,7 +687,10 @@ static ssize_t mon_bin_read(struct file *file, char __user *buf,
        }
 
        if (rp->b_read >= sizeof(struct mon_bin_hdr)) {
-               step_len = min(nbytes, (size_t)ep->len_cap);
+               step_len = ep->len_cap;
+               step_len -= rp->b_read - sizeof(struct mon_bin_hdr);
+               if (step_len > nbytes)
+                       step_len = nbytes;
                offset = rp->b_out + PKT_SIZE;
                offset += rp->b_read - sizeof(struct mon_bin_hdr);
                if (offset >= rp->b_size)
index e45e70bcc5e2ea1c79610ad7f754a8029e922ccd..cc64462d4c4ee0ee97e5271afa3769bdfdab7686 100644 (file)
@@ -1757,7 +1757,7 @@ static int musb_schedule(
                }
        }
        /* use bulk reserved ep1 if no other ep is free */
-       if (best_end > 0 && qh->type == USB_ENDPOINT_XFER_BULK) {
+       if (best_end < 0 && qh->type == USB_ENDPOINT_XFER_BULK) {
                hw_ep = musb->bulk_ep;
                if (is_in)
                        head = &musb->in_bulk;
index 9035d7256b03570a63203994d0fc031ea59e0a22..cfaf1f0855351c110a13a0c9c0287b79702d722b 100644 (file)
@@ -56,6 +56,7 @@ static void cp2101_shutdown(struct usb_serial *);
 static int debug;
 
 static struct usb_device_id id_table [] = {
+       { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */
        { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
        { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
        { USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
index d4e5fc86e43c679eee20ee64e5334cfd2eceda66..6da9a7a962a8a2790b30dd3f25fa952aec763ec8 100644 (file)
@@ -167,6 +167,13 @@ UNUSUAL_DEV(  0x0421, 0x005d, 0x0001, 0x0600,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
 
+/* Patch for Nokia 5310 capacity */
+UNUSUAL_DEV(  0x0421, 0x006a, 0x0000, 0x0591,
+               "Nokia",
+               "5310",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY ),
+
 /* Reported by Mario Rettig <mariorettig@web.de> */
 UNUSUAL_DEV(  0x0421, 0x042e, 0x0100, 0x0100,
                "Nokia",
@@ -233,14 +240,14 @@ UNUSUAL_DEV(  0x0421, 0x0495, 0x0370, 0x0370,
                US_FL_MAX_SECTORS_64 ),
 
 /* Reported by Cedric Godin <cedric@belbone.be> */
-UNUSUAL_DEV(  0x0421, 0x04b9, 0x0551, 0x0551,
+UNUSUAL_DEV(  0x0421, 0x04b9, 0x0500, 0x0551,
                "Nokia",
                "5300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
 
 /* Reported by Richard Nauber <RichardNauber@web.de> */
-UNUSUAL_DEV(  0x0421, 0x04fa, 0x0601, 0x0601,
+UNUSUAL_DEV(  0x0421, 0x04fa, 0x0550, 0x0660,
                "Nokia",
                "6300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
index 8855331b2fba551984776b30b1747b80a98607f1..e078b7aea1431d648b9b6dd6df5313b0b2cc738a 100644 (file)
@@ -8,7 +8,11 @@ handling fcntl(F_SETLEASE).  Convert cifs to using blocking tcp
 sends, and also let tcp autotune the socket send and receive buffers.
 This reduces the number of EAGAIN errors returned by TCP/IP in
 high stress workloads (and the number of retries on socket writes
-when sending large SMBWriteX requests).
+when sending large SMBWriteX requests).  Fix case in which a portion of
+data can in some cases not get written to the file on the server before the
+file is closed.  Fix DFS parsing to properly handle path consumed field,
+and to handle certain codepage conversions better.  Fix mount and
+umount race that can cause oops in mount or umount or reconnect.
 
 Version 1.54
 ------------
index f1ae1f57c30dcbfd86de17dcbb46bcc9c3991e71..c57c0565547fa99058e9a192796123a419309066 100644 (file)
@@ -606,7 +606,15 @@ GLOBAL_EXTERN struct list_head             cifs_tcp_ses_list;
  * changes to the tcon->tidStatus should be done while holding this lock.
  */
 GLOBAL_EXTERN rwlock_t         cifs_tcp_ses_lock;
-GLOBAL_EXTERN rwlock_t GlobalSMBSeslock;  /* protects list inserts on 3 above */
+
+/*
+ * This lock protects the cifs_file->llist and cifs_file->flist
+ * list operations, and updates to some flags (cifs_file->invalidHandle)
+ * It will be moved to either use the tcon->stat_lock or equivalent later.
+ * If cifs_tcp_ses_lock and the lock below are both needed to be held, then
+ * the cifs_tcp_ses_lock must be grabbed first and released last.
+ */
+GLOBAL_EXTERN rwlock_t GlobalSMBSeslock;
 
 GLOBAL_EXTERN struct list_head GlobalOplock_Q;
 
index bdda46dd435a0d9fd8c6d0d692e7b98be4390cc6..2af8626ced435c10bea3654e38570f7decaa8a7d 100644 (file)
@@ -295,7 +295,7 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
           check for tcp and smb session status done differently
           for those three - in the calling routine */
        if (tcon) {
-               if (tcon->need_reconnect) {
+               if (tcon->tidStatus == CifsExiting) {
                        /* only tree disconnect, open, and write,
                          (and ulogoff which does not have tcon)
                          are allowed as we start force umount */
index 6449e1aae621aa2721a1f5a5bd12338ac2890b6c..b691b893a848a8d4d74c1e0ecce800d561b99b67 100644 (file)
@@ -488,12 +488,13 @@ int cifs_close(struct inode *inode, struct file *file)
        pTcon = cifs_sb->tcon;
        if (pSMBFile) {
                struct cifsLockInfo *li, *tmp;
-
+               write_lock(&GlobalSMBSeslock);
                pSMBFile->closePend = true;
                if (pTcon) {
                        /* no sense reconnecting to close a file that is
                           already closed */
                        if (!pTcon->need_reconnect) {
+                               write_unlock(&GlobalSMBSeslock);
                                timeout = 2;
                                while ((atomic_read(&pSMBFile->wrtPending) != 0)
                                        && (timeout <= 2048)) {
@@ -510,12 +511,15 @@ int cifs_close(struct inode *inode, struct file *file)
                                        timeout *= 4;
                                }
                                if (atomic_read(&pSMBFile->wrtPending))
-                                       cERROR(1,
-                                               ("close with pending writes"));
-                               rc = CIFSSMBClose(xid, pTcon,
+                                       cERROR(1, ("close with pending write"));
+                               if (!pTcon->need_reconnect &&
+                                   !pSMBFile->invalidHandle)
+                                       rc = CIFSSMBClose(xid, pTcon,
                                                  pSMBFile->netfid);
-                       }
-               }
+                       } else
+                               write_unlock(&GlobalSMBSeslock);
+               } else
+                       write_unlock(&GlobalSMBSeslock);
 
                /* Delete any outstanding lock records.
                   We'll lose them when the file is closed anyway. */
@@ -587,15 +591,18 @@ int cifs_closedir(struct inode *inode, struct file *file)
                pTcon = cifs_sb->tcon;
 
                cFYI(1, ("Freeing private data in close dir"));
+               write_lock(&GlobalSMBSeslock);
                if (!pCFileStruct->srch_inf.endOfSearch &&
                    !pCFileStruct->invalidHandle) {
                        pCFileStruct->invalidHandle = true;
+                       write_unlock(&GlobalSMBSeslock);
                        rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid);
                        cFYI(1, ("Closing uncompleted readdir with rc %d",
                                 rc));
                        /* not much we can do if it fails anyway, ignore rc */
                        rc = 0;
-               }
+               } else
+                       write_unlock(&GlobalSMBSeslock);
                ptmp = pCFileStruct->srch_inf.ntwrk_buf_start;
                if (ptmp) {
                        cFYI(1, ("closedir free smb buf in srch struct"));
index addd1dcc2d79513ab6404e6a530d6927cbe71eee..9ee3f689c2b0c0f78468082658d0aad8cf56791c 100644 (file)
@@ -555,12 +555,14 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
                                continue;
 
                        cifs_stats_inc(&tcon->num_oplock_brks);
+                       write_lock(&GlobalSMBSeslock);
                        list_for_each(tmp2, &tcon->openFileList) {
                                netfile = list_entry(tmp2, struct cifsFileInfo,
                                                     tlist);
                                if (pSMB->Fid != netfile->netfid)
                                        continue;
 
+                               write_unlock(&GlobalSMBSeslock);
                                read_unlock(&cifs_tcp_ses_lock);
                                cFYI(1, ("file id match, oplock break"));
                                pCifsInode = CIFS_I(netfile->pInode);
@@ -576,6 +578,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
 
                                return true;
                        }
+                       write_unlock(&GlobalSMBSeslock);
                        read_unlock(&cifs_tcp_ses_lock);
                        cFYI(1, ("No matching file for oplock break"));
                        return true;
index 58d57299f2a08c432625f9be298e731e2fa7bae0..9f51f9bf0292f4a67aee9ca82aae2f6d3b6cc5d0 100644 (file)
@@ -741,11 +741,14 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
           (index_to_find < first_entry_in_buffer)) {
                /* close and restart search */
                cFYI(1, ("search backing up - close and restart search"));
+               write_lock(&GlobalSMBSeslock);
                if (!cifsFile->srch_inf.endOfSearch &&
                    !cifsFile->invalidHandle) {
                        cifsFile->invalidHandle = true;
+                       write_unlock(&GlobalSMBSeslock);
                        CIFSFindClose(xid, pTcon, cifsFile->netfid);
-               }
+               } else
+                       write_unlock(&GlobalSMBSeslock);
                if (cifsFile->srch_inf.ntwrk_buf_start) {
                        cFYI(1, ("freeing SMB ff cache buf on search rewind"));
                        if (cifsFile->srch_inf.smallBuf)
index 8856e2d60e9fe5cc04e83445e2b9ea5a6f63f031..73d81bc6aa75e94eb5ce87cb26326e5093cafa1a 100644 (file)
  * not do so then mac80211 may add this under certain circumstances.
  */
 
-/**
- * enum ieee80211_notification_type - Low level driver notification
- * @IEEE80211_NOTIFY_RE_ASSOC: start the re-association sequence
- */
-enum ieee80211_notification_types {
-       IEEE80211_NOTIFY_RE_ASSOC,
-};
-
 /**
  * struct ieee80211_ht_bss_info - describing BSS's HT characteristics
  *
@@ -1797,18 +1789,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid);
 void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
                                     u16 tid);
 
-/**
- * ieee80211_notify_mac - low level driver notification
- * @hw: pointer as obtained from ieee80211_alloc_hw().
- * @notif_type: enum ieee80211_notification_types
- *
- * This function must be called by low level driver to inform mac80211 of
- * low level driver status change or force mac80211 to re-assoc for low
- * level driver internal error that require re-assoc.
- */
-void ieee80211_notify_mac(struct ieee80211_hw *hw,
-                         enum ieee80211_notification_types  notif_type);
-
 /**
  * ieee80211_find_sta - find a station
  *
index e60205722d0c6abff35b05a033fe895a606d0551..78db083390f07baa7993c48d9fc0f7a635c769d0 100644 (file)
@@ -326,96 +326,89 @@ ftrace_record_ip(unsigned long ip)
 
 static int
 __ftrace_replace_code(struct dyn_ftrace *rec,
-                     unsigned char *old, unsigned char *new, int enable)
+                     unsigned char *nop, int enable)
 {
        unsigned long ip, fl;
+       unsigned char *call, *old, *new;
 
        ip = rec->ip;
 
-       if (ftrace_filtered && enable) {
+       /*
+        * If this record is not to be traced and
+        * it is not enabled then do nothing.
+        *
+        * If this record is not to be traced and
+        * it is enabled then disabled it.
+        *
+        */
+       if (rec->flags & FTRACE_FL_NOTRACE) {
+               if (rec->flags & FTRACE_FL_ENABLED)
+                       rec->flags &= ~FTRACE_FL_ENABLED;
+               else
+                       return 0;
+
+       } else if (ftrace_filtered && enable) {
                /*
-                * If filtering is on:
-                *
-                * If this record is set to be filtered and
-                * is enabled then do nothing.
-                *
-                * If this record is set to be filtered and
-                * it is not enabled, enable it.
-                *
-                * If this record is not set to be filtered
-                * and it is not enabled do nothing.
-                *
-                * If this record is set not to trace then
-                * do nothing.
-                *
-                * If this record is set not to trace and
-                * it is enabled then disable it.
-                *
-                * If this record is not set to be filtered and
-                * it is enabled, disable it.
+                * Filtering is on:
                 */
 
-               fl = rec->flags & (FTRACE_FL_FILTER | FTRACE_FL_NOTRACE |
-                                  FTRACE_FL_ENABLED);
+               fl = rec->flags & (FTRACE_FL_FILTER | FTRACE_FL_ENABLED);
 
-               if ((fl ==  (FTRACE_FL_FILTER | FTRACE_FL_ENABLED)) ||
-                   (fl ==  (FTRACE_FL_FILTER | FTRACE_FL_NOTRACE)) ||
-                   !fl || (fl == FTRACE_FL_NOTRACE))
+               /* Record is filtered and enabled, do nothing */
+               if (fl == (FTRACE_FL_FILTER | FTRACE_FL_ENABLED))
                        return 0;
 
-               /*
-                * If it is enabled disable it,
-                * otherwise enable it!
-                */
-               if (fl & FTRACE_FL_ENABLED) {
-                       /* swap new and old */
-                       new = old;
-                       old = ftrace_call_replace(ip, FTRACE_ADDR);
+               /* Record is not filtered and is not enabled do nothing */
+               if (!fl)
+                       return 0;
+
+               /* Record is not filtered but enabled, disable it */
+               if (fl == FTRACE_FL_ENABLED)
                        rec->flags &= ~FTRACE_FL_ENABLED;
-               } else {
-                       new = ftrace_call_replace(ip, FTRACE_ADDR);
+               else
+               /* Otherwise record is filtered but not enabled, enable it */
                        rec->flags |= FTRACE_FL_ENABLED;
-               }
        } else {
+               /* Disable or not filtered */
 
                if (enable) {
-                       /*
-                        * If this record is set not to trace and is
-                        * not enabled, do nothing.
-                        */
-                       fl = rec->flags & (FTRACE_FL_NOTRACE | FTRACE_FL_ENABLED);
-                       if (fl == FTRACE_FL_NOTRACE)
-                               return 0;
-
-                       new = ftrace_call_replace(ip, FTRACE_ADDR);
-               } else
-                       old = ftrace_call_replace(ip, FTRACE_ADDR);
-
-               if (enable) {
+                       /* if record is enabled, do nothing */
                        if (rec->flags & FTRACE_FL_ENABLED)
                                return 0;
+
                        rec->flags |= FTRACE_FL_ENABLED;
+
                } else {
+
+                       /* if record is not enabled do nothing */
                        if (!(rec->flags & FTRACE_FL_ENABLED))
                                return 0;
+
                        rec->flags &= ~FTRACE_FL_ENABLED;
                }
        }
 
+       call = ftrace_call_replace(ip, FTRACE_ADDR);
+
+       if (rec->flags & FTRACE_FL_ENABLED) {
+               old = nop;
+               new = call;
+       } else {
+               old = call;
+               new = nop;
+       }
+
        return ftrace_modify_code(ip, old, new);
 }
 
 static void ftrace_replace_code(int enable)
 {
        int i, failed;
-       unsigned char *new = NULL, *old = NULL;
+       unsigned char *nop = NULL;
        struct dyn_ftrace *rec;
        struct ftrace_page *pg;
 
-       if (enable)
-               old = ftrace_nop_replace();
-       else
-               new = ftrace_nop_replace();
+       nop = ftrace_nop_replace();
 
        for (pg = ftrace_pages_start; pg; pg = pg->next) {
                for (i = 0; i < pg->index; i++) {
@@ -433,7 +426,7 @@ static void ftrace_replace_code(int enable)
                                unfreeze_record(rec);
                        }
 
-                       failed = __ftrace_replace_code(rec, old, new, enable);
+                       failed = __ftrace_replace_code(rec, nop, enable);
                        if (failed && (rec->flags & FTRACE_FL_CONVERTED)) {
                                rec->flags |= FTRACE_FL_FAILED;
                                if ((system_state == SYSTEM_BOOTING) ||
@@ -534,8 +527,7 @@ static void ftrace_startup(void)
 
        mutex_lock(&ftrace_start_lock);
        ftrace_start++;
-       if (ftrace_start == 1)
-               command |= FTRACE_ENABLE_CALLS;
+       command |= FTRACE_ENABLE_CALLS;
 
        if (saved_ftrace_func != ftrace_trace_function) {
                saved_ftrace_func = ftrace_trace_function;
@@ -734,6 +726,9 @@ t_next(struct seq_file *m, void *v, loff_t *pos)
                    ((iter->flags & FTRACE_ITER_FAILURES) &&
                     !(rec->flags & FTRACE_FL_FAILED)) ||
 
+                   ((iter->flags & FTRACE_ITER_FILTER) &&
+                    !(rec->flags & FTRACE_FL_FILTER)) ||
+
                    ((iter->flags & FTRACE_ITER_NOTRACE) &&
                     !(rec->flags & FTRACE_FL_NOTRACE))) {
                        rec = NULL;
@@ -1186,7 +1181,7 @@ ftrace_regex_release(struct inode *inode, struct file *file, int enable)
 
        mutex_lock(&ftrace_sysctl_lock);
        mutex_lock(&ftrace_start_lock);
-       if (iter->filtered && ftrace_start && ftrace_enabled)
+       if (ftrace_start && ftrace_enabled)
                ftrace_run_update_code(FTRACE_ENABLE_CALLS);
        mutex_unlock(&ftrace_start_lock);
        mutex_unlock(&ftrace_sysctl_lock);
index 036456cbb4f7e1ceecf929e37ed6de581866abda..f780e9552f913e5b9674a218b148f27364e82723 100644 (file)
@@ -617,6 +617,7 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size)
                list_del_init(&page->list);
                free_buffer_page(page);
        }
+       mutex_unlock(&buffer->mutex);
        return -ENOMEM;
 }
 
index 697eda36b86a54e902a2289d2adf767ca1278460..d86e3252f3000024cfaf31c63ffbee765dafac53 100644 (file)
@@ -1936,6 +1936,7 @@ __tracing_open(struct inode *inode, struct file *file, int *ret)
                        ring_buffer_read_finish(iter->buffer_iter[cpu]);
        }
        mutex_unlock(&trace_types_lock);
+       kfree(iter);
 
        return ERR_PTR(-ENOMEM);
 }
index a47f5bad110dc99ae7218df0a034a72459ef9e31..8997e912aaaf4854b4f3e027e3b2ea496b9d1de3 100644 (file)
@@ -1973,13 +1973,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
 
        /* make sure that we don't pick a non-existing transmit queue */
        ntxq = pkt_dev->odev->real_num_tx_queues;
-       if (ntxq > num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) {
-               printk(KERN_WARNING "pktgen: WARNING: QUEUE_MAP_CPU "
-                      "disabled because CPU count (%d) exceeds number "
-                      "of tx queues (%d) on %s\n", num_online_cpus(), ntxq,
-                      pkt_dev->odev->name);
-               pkt_dev->flags &= ~F_QUEUE_MAP_CPU;
-       }
+
        if (ntxq <= pkt_dev->queue_map_min) {
                printk(KERN_WARNING "pktgen: WARNING: Requested "
                       "queue_map_min (zero-based) (%d) exceeds valid range "
@@ -2202,6 +2196,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev)
                }
                pkt_dev->cur_queue_map = t;
        }
+       pkt_dev->cur_queue_map  = pkt_dev->cur_queue_map % pkt_dev->odev->real_num_tx_queues;
 }
 
 /* Increment/randomize headers according to flags and current values
index 1fbff5fa424101fb463905be71d1cc06299fa74c..1aa2dc9e380ec237c3a4abc8d1e29911bc09dacb 100644 (file)
@@ -1117,6 +1117,7 @@ int inet_sk_rebuild_header(struct sock *sk)
                        },
                },
                .proto = sk->sk_protocol,
+               .flags = inet_sk_flowi_flags(sk),
                .uli_u = {
                        .ports = {
                                .sport = inet->sport,
index b42e082cc17048ddcdee7103f933c6123c663111..25924b1eb2efd22ae3c70f4d7e4606f7f30771e4 100644 (file)
@@ -1945,13 +1945,14 @@ int __init ip_mr_init(void)
                goto proc_cache_fail;
 #endif
        return 0;
-reg_notif_fail:
-       kmem_cache_destroy(mrt_cachep);
 #ifdef CONFIG_PROC_FS
-proc_vif_fail:
-       unregister_netdevice_notifier(&ip_mr_notifier);
 proc_cache_fail:
        proc_net_remove(&init_net, "ip_mr_vif");
+proc_vif_fail:
+       unregister_netdevice_notifier(&ip_mr_notifier);
 #endif
+reg_notif_fail:
+       del_timer(&ipmr_expire_timer);
+       kmem_cache_destroy(mrt_cachep);
        return err;
 }
index cf02701ced48091d9eecb6765fe80934a3dc73c8..98c1fd09be88c352c29b9f2229cd81fd695f4460 100644 (file)
@@ -633,6 +633,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
                                                .saddr = saddr,
                                                .tos = tos } },
                                    .proto = sk->sk_protocol,
+                                   .flags = inet_sk_flowi_flags(sk),
                                    .uli_u = { .ports =
                                               { .sport = inet->sport,
                                                 .dport = dport } } };
index 52a7eb0e2c2c0e8fb65b2136828c0f827da7b360..0524769632e7f0593e8e17d0c575793aa5ebce66 100644 (file)
@@ -224,7 +224,7 @@ static struct file_operations ip6mr_vif_fops = {
        .open    = ip6mr_vif_open,
        .read    = seq_read,
        .llseek  = seq_lseek,
-       .release = seq_release,
+       .release = seq_release_private,
 };
 
 static void *ipmr_mfc_seq_start(struct seq_file *seq, loff_t *pos)
@@ -338,7 +338,7 @@ static struct file_operations ip6mr_mfc_fops = {
        .open    = ipmr_mfc_open,
        .read    = seq_read,
        .llseek  = seq_lseek,
-       .release = seq_release,
+       .release = seq_release_private,
 };
 #endif
 
index 07f0b76e74270317a747dbe8ee77e86b3a9b1838..97c17fdd6f755958f8de47159cf47f7df25ab0ab 100644 (file)
@@ -132,7 +132,7 @@ static struct snmp_mib snmp6_udplite6_list[] = {
 
 static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib)
 {
-       static char name[32];
+       char name[32];
        int i;
 
        /* print by name -- deprecated items */
@@ -144,7 +144,7 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib)
                p = icmp6type2name[icmptype];
                if (!p) /* don't print un-named types here */
                        continue;
-               (void) snprintf(name, sizeof(name)-1, "Icmp6%s%s",
+               snprintf(name, sizeof(name), "Icmp6%s%s",
                        i & 0x100 ? "Out" : "In", p);
                seq_printf(seq, "%-32s\t%lu\n", name,
                        snmp_fold_field(mib, i));
@@ -157,7 +157,7 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib)
                val = snmp_fold_field(mib, i);
                if (!val)
                        continue;
-               (void) snprintf(name, sizeof(name)-1, "Icmp6%sType%u",
+               snprintf(name, sizeof(name), "Icmp6%sType%u",
                        i & 0x100 ?  "Out" : "In", i & 0xff);
                seq_printf(seq, "%-32s\t%lu\n", name, val);
        }
index 14d165f0df75ff90e1ec9648b4454245cdbcd153..409bb771623671c8274fd0e25683665b13e53fdd 100644 (file)
@@ -2560,25 +2560,3 @@ void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)
                ieee80211_restart_sta_timer(sdata);
        rcu_read_unlock();
 }
-
-/* driver notification call */
-void ieee80211_notify_mac(struct ieee80211_hw *hw,
-                         enum ieee80211_notification_types  notif_type)
-{
-       struct ieee80211_local *local = hw_to_local(hw);
-       struct ieee80211_sub_if_data *sdata;
-
-       switch (notif_type) {
-       case IEEE80211_NOTIFY_RE_ASSOC:
-               rtnl_lock();
-               list_for_each_entry(sdata, &local->interfaces, list) {
-                       if (sdata->vif.type != NL80211_IFTYPE_STATION)
-                               continue;
-
-                       ieee80211_sta_req_auth(sdata, &sdata->u.sta);
-               }
-               rtnl_unlock();
-               break;
-       }
-}
-EXPORT_SYMBOL(ieee80211_notify_mac);
index 7ab30f668b5a8226a6342118c96322e33f04a0c4..9d211f12582ba90882ae9f272a6896b716d83af4 100644 (file)
 #include <net/phonet/phonet.h>
 #include <net/phonet/pn_dev.h>
 
-static struct net_proto_family phonet_proto_family;
-static struct phonet_protocol *phonet_proto_get(int protocol);
-static inline void phonet_proto_put(struct phonet_protocol *pp);
+/* Transport protocol registration */
+static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
+static DEFINE_SPINLOCK(proto_tab_lock);
+
+static struct phonet_protocol *phonet_proto_get(int protocol)
+{
+       struct phonet_protocol *pp;
+
+       if (protocol >= PHONET_NPROTO)
+               return NULL;
+
+       spin_lock(&proto_tab_lock);
+       pp = proto_tab[protocol];
+       if (pp && !try_module_get(pp->prot->owner))
+               pp = NULL;
+       spin_unlock(&proto_tab_lock);
+
+       return pp;
+}
+
+static inline void phonet_proto_put(struct phonet_protocol *pp)
+{
+       module_put(pp->prot->owner);
+}
 
 /* protocol family functions */
 
@@ -375,10 +396,6 @@ static struct packet_type phonet_packet_type = {
        .func = phonet_rcv,
 };
 
-/* Transport protocol registration */
-static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
-static DEFINE_SPINLOCK(proto_tab_lock);
-
 int __init_or_module phonet_proto_register(int protocol,
                                                struct phonet_protocol *pp)
 {
@@ -412,27 +429,6 @@ void phonet_proto_unregister(int protocol, struct phonet_protocol *pp)
 }
 EXPORT_SYMBOL(phonet_proto_unregister);
 
-static struct phonet_protocol *phonet_proto_get(int protocol)
-{
-       struct phonet_protocol *pp;
-
-       if (protocol >= PHONET_NPROTO)
-               return NULL;
-
-       spin_lock(&proto_tab_lock);
-       pp = proto_tab[protocol];
-       if (pp && !try_module_get(pp->prot->owner))
-               pp = NULL;
-       spin_unlock(&proto_tab_lock);
-
-       return pp;
-}
-
-static inline void phonet_proto_put(struct phonet_protocol *pp)
-{
-       module_put(pp->prot->owner);
-}
-
 /* Module registration */
 static int __init phonet_init(void)
 {
index b16ad2972c6b527dc2013a5dfb4108ad35ef8197..6ab4a2f92ca0b390849547e8e93f99b07e6d4a6b 100644 (file)
@@ -417,6 +417,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct qdisc_size_table *stab)
        struct nlattr *nest;
 
        nest = nla_nest_start(skb, TCA_STAB);
+       if (nest == NULL)
+               goto nla_put_failure;
        NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts);
        nla_nest_end(skb, nest);
 
index 93cd30ce65011d2b84541277c15664ed6287fc3d..cdcd16fcfeda463c0e9057d288f1b0910070648b 100644 (file)
@@ -270,6 +270,8 @@ static void dev_watchdog_down(struct net_device *dev)
 void netif_carrier_on(struct net_device *dev)
 {
        if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) {
+               if (dev->reg_state == NETREG_UNINITIALIZED)
+                       return;
                linkwatch_fire_event(dev);
                if (netif_running(dev))
                        __netdev_watchdog_up(dev);
@@ -285,8 +287,11 @@ EXPORT_SYMBOL(netif_carrier_on);
  */
 void netif_carrier_off(struct net_device *dev)
 {
-       if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state))
+       if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) {
+               if (dev->reg_state == NETREG_UNINITIALIZED)
+                       return;
                linkwatch_fire_event(dev);
+       }
 }
 EXPORT_SYMBOL(netif_carrier_off);
 
index 744b79fdcb19dac256b1dea5b26dc6e87f208f07..4028502f052858b1d66af4b31c17d641c16fac0b 100644 (file)
@@ -133,13 +133,29 @@ static int
 generic_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
 {
        struct generic_cred *gcred = container_of(cred, struct generic_cred, gc_base);
+       int i;
 
        if (gcred->acred.uid != acred->uid ||
            gcred->acred.gid != acred->gid ||
-           gcred->acred.group_info != acred->group_info ||
            gcred->acred.machine_cred != acred->machine_cred)
-               return 0;
+               goto out_nomatch;
+
+       /* Optimisation in the case where pointers are identical... */
+       if (gcred->acred.group_info == acred->group_info)
+               goto out_match;
+
+       /* Slow path... */
+       if (gcred->acred.group_info->ngroups != acred->group_info->ngroups)
+               goto out_nomatch;
+       for (i = 0; i < gcred->acred.group_info->ngroups; i++) {
+               if (GROUP_AT(gcred->acred.group_info, i) !=
+                               GROUP_AT(acred->group_info, i))
+                       goto out_nomatch;
+       }
+out_match:
        return 1;
+out_nomatch:
+       return 0;
 }
 
 void __init rpc_init_generic_auth(void)