1. 08 1月, 2010 1 次提交
  2. 04 12月, 2009 3 次提交
  3. 02 12月, 2009 1 次提交
  4. 30 11月, 2009 3 次提交
  5. 26 11月, 2009 1 次提交
  6. 19 11月, 2009 2 次提交
  7. 07 11月, 2009 1 次提交
    • A
      net, compat_ioctl: handle socket ioctl abuses in tty drivers · 9646e7ce
      Arnd Bergmann 提交于
      Slip and a few other drivers use the same ioctl numbers on
      tty devices that are normally meant for sockets. This causes
      problems with our compat_ioctl handling that tries to convert
      the data structures in a different format.
      
      Fortunately, these five drivers all use 32 bit compatible
      data structures in the ioctl numbers, so we can just add
      a trivial compat_ioctl conversion function to each of them.
      
      SIOCSIFENCAP and SIOCGIFENCAP do not need to live in
      fs/compat_ioctl.c after this any more, and they are not
      used on any sockets.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9646e7ce
  8. 19 10月, 2009 1 次提交
  9. 14 10月, 2009 1 次提交
  10. 13 10月, 2009 1 次提交
  11. 12 10月, 2009 1 次提交
  12. 12 9月, 2009 1 次提交
    • J
      drivers/net/wan: introduce missing kfree · 966a5d1b
      Julia Lawall 提交于
      Error handling code following a kmalloc should free the allocated data.
      
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,f1,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...x...+> }
      (
      x->f1 = E
      |
       (x->f1 == NULL || ...)
      |
       f(...,x->f1,...)
      )
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      966a5d1b
  13. 07 9月, 2009 3 次提交
    • K
      IXP42x HSS support for setting internal clock rate · 5dbc4650
      Krzysztof Halasa 提交于
      HSS usually uses external clocks, so it's not a big deal. Internal clock
      is used for direct DTE-DTE connections and when the DCE doesn't provide
      it's own clock.
      
      This also depends on the oscillator frequency. Intel seems to have
      calculated the clock register settings for 33.33 MHz (66.66 MHz timer
      base). Their settings seem quite suboptimal both in terms of average
      frequency (60 ppm is unacceptable for G.703 applications, their primary
      intended usage(?)) and jitter.
      
      Many (most?) platforms use a 33.333 MHz oscillator, a 10 ppm difference
      from Intel's base.
      
      Instead of creating static tables, I've created a procedure to program
      the HSS clock register. The register consists of 3 parts (A, B, C).
      The average frequency (= bit rate) is:
      66.66x MHz / (A  + (B + 1) / (C + 1))
      The procedure aims at the closest average frequency, possibly at the
      cost of increased jitter. Nobody would be able to directly drive an
      unbufferred transmitter with a HSS anyway, and the frequency error is
      what it really counts.
      
      I've verified the above with an oscilloscope on IXP425. It seems IXP46x
      and possibly IXP43x use a bit different clock generation algorithm - it
      looks like the avg frequency is:
      (on IXP465) 66.66x MHz / (A  + B / (C + 1)).
      Also they use much greater precomputed A and B - on IXP425 it would
      simply result in more jitter, but I don't know how does it work on
      IXP46x (perhaps 3 least significant bits aren't used?).
      
      Anyway it looks that they were aiming for exactly +60 ppm or -60 ppm,
      while <1 ppm is typically possible (with a synchronized clock, of
      course).
      
      The attached patch makes it possible to set almost any bit rate
      (my IXP425 533 MHz quits at > 22 Mb/s if a single port is used, and the
      minimum is ca. 65 Kb/s).
      
      This is independent of MVIP (multi-E1/T1 on one HSS) mode.
      Signed-off-by: NKrzysztof Hałasa <khc@pm.waw.pl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5dbc4650
    • K
      WAN: remove deprecated PCI_DEVICE_ID from PCI200SYN driver. · 32e6a0c8
      Krzysztof Halasa 提交于
      PCI200SYN has its own PCI subsystem device ID for 3+ years, now it's
      time to remove the generic PLX905[02] ID from the driver. Anyone with
      old EEPROM data will have to run the upgrade.
      
      Having the generic PLX905[02] (PCI-local bus bridge) ID is harmful
      as the driver tries to handle other devices based on these bridges.
      Signed-off-by: NKrzysztof Halasa <khc@pm.waw.pl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32e6a0c8
    • S
      wan: dlci/sdla transmit return dehacking · 38482428
      Stephen Hemminger 提交于
      This is a brute force removal of the wierd slave interface done for
      DLCI -> SDLA transmit. Before it was using non-standard return values
      and freeing skb in caller.  This changes it to using normal return
      values, and freeing in the callee.  Luckly only one driver pair was
      doing this. Not tested on real hardware, in fact I wonder if this
      driver pair is even being used by any users.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38482428
  14. 04 9月, 2009 1 次提交
    • D
      WAN: dscc4: Fix warning pointing out a bug. · fab4e763
      David S. Miller 提交于
      Noticed by Stephen Rothwell:
      
      	Today's linux-next build (x86_64 allmodconfig gcc-4.4.0)
      	produced this warning:
      
      	drivers/net/wan/dscc4.c: In function 'dscc4_rx_skb':
      	drivers/net/wan/dscc4.c:670: warning: suggest parentheses around comparison in operand of '|'
      
      	which actually points out a bug, I think.  It is doing
      		(x & (y | z)) != y | z
      	when it probably means
      		(x & (y | z)) != (y | z)
      
      	Introduced by commit 5de3fcab
      	("WAN: bit and/or confusion").
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fab4e763
  15. 01 9月, 2009 1 次提交
  16. 31 8月, 2009 1 次提交
  17. 29 8月, 2009 1 次提交
  18. 14 8月, 2009 1 次提交
  19. 09 7月, 2009 1 次提交
  20. 06 7月, 2009 3 次提交
  21. 17 6月, 2009 1 次提交
  22. 13 6月, 2009 2 次提交
  23. 29 5月, 2009 1 次提交
  24. 25 5月, 2009 1 次提交
  25. 24 5月, 2009 1 次提交
  26. 19 5月, 2009 1 次提交
    • E
      net: release dst entry in dev_hard_start_xmit() · 93f154b5
      Eric Dumazet 提交于
      One point of contention in high network loads is the dst_release() performed
      when a transmited skb is freed. This is because NIC tx completion calls
      dev_kree_skb() long after original call to dev_queue_xmit(skb).
      
      CPU cache is cold and the atomic op in dst_release() stalls. On SMP, this is
      quite visible if one CPU is 100% handling softirqs for a network device,
      since dst_clone() is done by other cpus, involving cache line ping pongs.
      
      It seems right place to release dst is in dev_hard_start_xmit(), for most
      devices but ones that are virtual, and some exceptions.
      
      David Miller suggested to define a new device flag, set in alloc_netdev_mq()
      (so that most devices set it at init time), and carefuly unset in devices
      which dont want a NULL skb->dst in their ndo_start_xmit().
      
      List of devices that must clear this flag is :
      
      - loopback device, because it calls netif_rx() and quoting Patrick :
          "ip_route_input() doesn't accept loopback addresses, so loopback packets
           already need to have a dst_entry attached."
      - appletalk/ipddp.c : needs skb->dst in its xmit function
      
      - And all devices that call again dev_queue_xmit() from their xmit function
      (as some classifiers need skb->dst) : bonding, vlan, macvlan, eql, ifb, hdlc_fr
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93f154b5
  27. 09 5月, 2009 1 次提交
  28. 17 4月, 2009 1 次提交
    • A
      wan/pc300_drv: convert to net_device_ops · d32da050
      Alexander Beregalov 提交于
      On Fri, Apr 17, 2009 at 05:23:02AM +0400, Alexander Beregalov wrote:
      >
      > Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
      > ---
      >  drivers/net/wan/pc300_drv.c |   22 ++++++++++++++--------
      >  1 files changed, 14 insertions(+), 8 deletions(-)
      >
      > diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
      > index c23fde0..df10a4c 100644
      > --- a/drivers/net/wan/pc300_drv.c
      > +++ b/drivers/net/wan/pc300_drv.c
      > @@ -225,6 +225,7 @@ static char rcsid[] =
      >  #include <linux/skbuff.h>
      >  #include <linux/if_arp.h>
      >  #include <linux/netdevice.h>
      > +#include <linux/etherdevice.h>
      >  #include <linux/spinlock.h>
      >  #include <linux/if.h>
      >  #include <net/arp.h>
      > @@ -3246,6 +3247,18 @@ static inline void show_version(void)
      >  		rcsvers, rcsdate, __DATE__, __TIME__);
      >  }				/* show_version */
      >
      > +static const struct net_device_ops cpc_netdev_ops = {
      > +	.ndo_init		= NULL,
      > +	.ndo_open		= cpc_open,
      > +	.ndo_stop		= cpc_close,
      > +	.ndo_tx_timeout		= cpc_tx_timeout,
      > +	.ndo_set_multicast_list	= NULL,
      
      In this case ndo_init and ndo_set_multicast_list
      are not needed.
      
      >From 1507a5a797a5f0005696a9bf10e390caca9c3800 Mon Sep 17 00:00:00 2001
      From: Alexander Beregalov <a.beregalov@gmail.com>
      Date: Fri, 17 Apr 2009 05:45:48 +0400
      Subject: [PATCH] wan/pc300_drv: convert to net_device_ops
      Signed-off-by: NAlexander Beregalov <a.beregalov@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d32da050
  29. 07 4月, 2009 2 次提交