1. 30 4月, 2013 7 次提交
  2. 29 4月, 2013 7 次提交
  3. 27 4月, 2013 14 次提交
  4. 26 4月, 2013 8 次提交
  5. 25 4月, 2013 4 次提交
    • V
      net: fix address check in rtnl_fdb_del · 37fe0660
      Vlad Yasevich 提交于
      Commit 6681712d
      	vxlan: generalize forwarding tables
      
      relaxed the address checks in rtnl_fdb_del() to use is_zero_ether_addr().
      This allows users to add multicast addresses using the fdb API.  However,
      the check in rtnl_fdb_del() still uses a more strict
      is_valid_ether_addr() which rejects multicast addresses.  Thus it
      is possible to add an fdb that can not be later removed.
      Relax the check in rtnl_fdb_del() as well.
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      37fe0660
    • S
      net/cpsw: fix irq_disable() with threaded interrupts · a11fbba9
      Sebastian Siewior 提交于
      During high throughput it is likely that we receive both: an RX and TX
      interrupt. The normal behaviour is that once we enter the ISR the
      interrupts are disabled in the IRQ chip and so the ISR is invoked only
      once and the interrupt line is disabled once. It will be re-enabled
      after napi completes.
      With threaded interrupts on the other hand the interrupt the interrupt
      is disabled immediately and the ISR is marked for "later". By having TX
      and RX interrupt marked pending we invoke them both and disable the
      interrupt line twice. The napi callback is still executed once and so
      after it completes we remain with interrupts disabled.
      
      The initial patch simply removed the cpsw_{enable|disable}_irq() calls
      and it worked well on my AM335X ES1.0 (beagle bone). On ES2.0 (beagle
      bone black) it caused an never ending interrupt (even after the mask via
      cpsw_intr_disable()) according to Mugunthan V N. Since I don't have the
      ES2.0 and no idea what is going on this patch tracks the state of the
      irq_disable() call and execute it only when not yet done.
      The book keeping is done on the first struct since with dual_emac we can
      have two of those and only one interrupt line.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a11fbba9
    • S
      net/cpsw: optimize the for_each_slave_macro() · 6e6ceaed
      Sebastian Siewior 提交于
      text    data     bss     dec     hex filename
      15530      92       4   15626    3d0a cpsw.o.before
      15478      92       4   15574    3cd6 cpsw.o.after
      
      52 bytes smaller, 13 for each invocation.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e6ceaed
    • S
      net/cpsw: make sure modules remove does not leak any ressources · d1bd9acf
      Sebastian Siewior 提交于
      This driver does not clean up properly after leaving. Here is a list:
      - Use unregister_netdev(). free_netdev() is good but not enough
      - Use the above also on the other ndev in case of dual mac
      - Free data.slave_data. The name of the strucre makes it look like
        it is platform_data but it is not. It is just a trick!
      - Free all irqs. Again: freeing one irq is good start, but freeing all
        of them is better.
      
      With this rmmod & modprobe of cpsw seems to work. The remaining issue
      is:
      |WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0x9c/0xd4()
      |sysfs: cannot create duplicate filename '/devices/ocp.2/4a100000.ethernet/4a101000.mdio'
      |WARNING: at lib/kobject.c:196 kobject_add_internal+0x1a4/0x1c8()
      
      comming from of_platform_populate() and I am not sure that this belongs
      here.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1bd9acf