1. 21 Jul, 2008 40 commits
    • Adrian Bunk's avatar
      USB: remove CVS keywords · ea05af61
      Adrian Bunk authored
      This patch removes CVS keywords that weren't updated for a long time
      from comments.
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ea05af61
    • Alan Stern's avatar
      usb-storage: implement "soft" unbinding · 543f7810
      Alan Stern authored
      This patch (as1092) implements "soft" unbinding for usb-storage.  When
      the disconnect routine is called, all commands and reset delays are
      allowed to complete normally until after scsi_remove_host() returns.
      This means that the commands needed for an orderly shutdown will be
      sent through to the device.
      
      Unlike before, the driver will now execute every command that it
      accepts.  Hence there's no need for special code to catch unexecuted
      commands and fail them.
      
      The new sequence of events when disconnect runs goes as follows:
      
      	If the device is truly unplugged, set the DISCONNECTING
      	flag so we won't try to access it any more.
      
      	If the SCSI-scanning thread hasn't started up yet, prevent
      	it from doing anything by setting the new DONT_SCAN flag.
      	Then wake it up and wait for it to terminate.
      
      	Remove the SCSI host.  This unbinds the upper-level drivers,
      	doing an orderly shutdown.  Commands sent to quiesce the
      	device will be transmitted normally, unless the device is
      	unplugged.
      
      	Set the DISCONNECTING flag so that we won't accept any new
      	commands that might get submitted (there aren't supposed to be
      	any) and we won't try to access the device for resets.
      
      	Tell the control thread to exit by waking it up with no
      	pending command, and wait for it to terminate.
      
      	Go on to do all the other normal stuff: releasing resources,
      	freeing memory, and so on.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      543f7810
    • Alan Stern's avatar
      USB: implement "soft" unbinding · 9da82bd4
      Alan Stern authored
      This patch (as1091) changes the way usbcore handles interface
      unbinding.  If the interface's driver supports "soft" unbinding (a new
      flag in the driver structure) then in-flight URBs are not cancelled
      and endpoints are not disabled.  Instead the driver is allowed to
      continue communicating with the device (although of course it should
      stop before its disconnect routine returns).
      
      The purpose of this change is to allow drivers to do a clean shutdown
      when they get unbound from a device that is still plugged in.  Killing
      all the URBs and disabling the endpoints before calling the driver's
      disconnect method doesn't give the driver any control over what
      happens, and it can leave devices in indeterminate states.  For
      example, when usb-storage unbinds it doesn't want to stop while in the
      middle of transmitting a SCSI command.
      
      The soft_unbind flag is added because in the past, a number of drivers
      have experienced problems related to ongoing I/O after their disconnect
      routine returned.  Hence "soft" unbinding is made available only to
      drivers that claim to support it.
      
      The patch also replaces "interface_to_usbdev(intf)" with "udev" in a
      couple of places, a minor simplification.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9da82bd4
    • Adrian Bunk's avatar
      USB: isp1760-hcd.c: make 2 functions static · 473bca94
      Adrian Bunk authored
      This patch makes the following needlessly global functions static:
      - enqueue_an_ATL_packet()
      - enqueue_an_INT_packet()
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      Acked-by: default avatarSebastian Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      473bca94
    • Alan Stern's avatar
      usb-storage: change remaining semaphore to completion · 7119e3c3
      Alan Stern authored
      This patch (as1090) converts the one remaining semaphore in
      usb-storage into a completion.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7119e3c3
    • Alan Stern's avatar
      usb-storage: separate dynamic flags from fixed flags · 7e4d6c38
      Alan Stern authored
      This patch (as1089) separates out the dynamic atomic bitflags and the
      static bitfields in usb-storage.  Until now the two sorts of flags
      have been sharing the same word; this has always been awkward.
      
      To help prevent possible confusion, the two new fields each have a
      different name from the original.  us->fflags contains the fixed
      bitfields (mostly taken from the USB ID table in unusual_devs.h), and
      us->dflags contains the dynamic atomic bitflags (used with set_bit,
      test_bit, and so on).
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7e4d6c38
    • Alan Cox's avatar
      USB: io_ti: FIrst cut at a big clean up · 2742fd88
      Alan Cox authored
      Sort out the insane naming like "OperationalFirmwareVersion" which seems
      	designed to cause formatting problems and RSI
      Merge various common code together
      Clean up the pointlessly complex and spread about MCR handling
      
      This is really just the low hanging fruit.
      
      Needs lots of testing before it goes upstream so testers and reports
      appreciated
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2742fd88
    • Alan Stern's avatar
      USB: combine hub_quiesce and hub_stop · 4330354f
      Alan Stern authored
      This patch (as1083) combines hub_quiesce() and hub_stop() into a
      single routine.  There's no point keeping them separate since they are
      usually called together.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4330354f
    • Alan Stern's avatar
      USB: combine hub_activate and hub_restart · f2835219
      Alan Stern authored
      This patch (as1071) combines hub_activate() and hub_restart() into a
      single routine.  There's no point keeping them separate, since they
      are always called together.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f2835219
    • Alan Stern's avatar
      USB: optimize port debouncing during hub activation · 948fea37
      Alan Stern authored
      This patch (as1082) makes a small optimization to the way the hub
      driver carries out port debouncing immediately after a hub is
      activated (i.e., initialized, reset, or resumed).  If any port-change
      statuses are observed, the code will delay for a minimal debounce
      period -- thereby making a good start at debouncing all the ports at
      once.
      
      If this wasn't sufficient then khubd will debounce any port that still
      requires attention.  But in most cases it should suffice; it's rare
      for a device to need more than a minimal debounce delay.  (In the
      cases of hub initialization or reset even that is most likely not
      needed, since any devices plugged in at such times have probably been
      attached for a while.)
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      948fea37
    • Alan Stern's avatar
      USB: try to salvage lost power sessions · 8808f00c
      Alan Stern authored
      This patch (as1073) adds to khubd a way to recover from power-session
      interruption caused by transient connect-change or enable-change
      events.  After the debouncing period, khubd attempts to do a
      USB-Persist-style reset or reset-resume.  If it works, the connection
      will remain unscathed.
      
      The upshot is that we will be more immune to noise caused by EMI.  The
      grace period is on the order of 100 ms, so this won't permit recovery
      from the "accidentally knocked the USB cable out of its socket" type
      of event, but it's a start.
      
      As an added bonus, if a device was suspended when the system goes to
      sleep then we no longer need to check for power-session interruptions
      when the system wakes up.  Khubd will naturally see the status change
      while processing the device's parent hub and will do the right thing.
      
      The remote_wakeup() routine is changed; now it expects the caller to
      acquire the device lock rather than acquiring the lock itself.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8808f00c
    • Alan Stern's avatar
      USB: simplify hub_restart() logic · 6ee0b270
      Alan Stern authored
      This patch (as1081) straightens out the logic of the hub_restart()
      routine.  Each port of the hub is scanned and the driver makes sure
      that ports which are supposed to be disabled really _are_ disabled.
      Any ports with a significant change in status are flagged in
      hub->change_bits, so that khubd can focus on them without the need to
      scan all the ports a second time -- which means the hub->activating
      flag is no longer needed.
      
      Also, it is now recognized explicitly that the only reason for
      resuming a port which was not suspended is to carry out a reset-resume
      operation, which happens only in a non-CONFIG_USB_SUSPEND setting.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6ee0b270
    • Greg Kroah-Hartman's avatar
      USB: revert "don't use reset-resume if drivers don't support it" · 9e5eace7
      Greg Kroah-Hartman authored
      This reverts Linus's previous patch that is in mainline to make it
      easier for the USB hub.c patches that follow this to apply cleanly.  The
      functionality will be added back in a followon patch in this series.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9e5eace7
    • Alan Stern's avatar
      USB: debounce before unregistering · 24618b0c
      Alan Stern authored
      This patch (as1080) makes a significant change to the way khubd
      handles port connect-change and enable-change events.  Both types of
      event are now debounced, and the debouncing is carried out _before_ an
      existing usb_device is unregistered, instead of afterward.
      
      This means that drivers will have to deal with longer runs of errors
      when a device is unplugged, but they are supposed to be prepared for
      that in any case.
      
      The advantage is that when an enable-change occurs (caused for example
      by electromagnetic interference), the debouncing period will provide
      time for the cause of the problem to die away.  A simple port reset
      (added in a forthcoming patch) will then allow us to recover from the
      fault.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      24618b0c
    • Alan Stern's avatar
      USB: add new routine for checking port-resume type · b01b03f3
      Alan Stern authored
      This patch (as1070) creates a new subroutine to check whether a device
      can be resumed.  This code is needed even when CONFIG_USB_SUSPEND
      isn't set, because devices do suspend themselves when the root hub
      (and hence the entire bus) is suspended, and power sessions can get
      lost during a system sleep even without individual port suspends.
      
      The patch also fixes a loose end in USB-Persist reset-resume handling.
      When a low- or full-speed device is attached to an EHCI's companion
      controller, the port handoff during resume will cause the companion
      port's connect-status-change feature to be set.  If that flag isn't
      cleared, the port-reset code will think it indicates that the device
      has been unplugged and the reset-resume will fail.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b01b03f3
    • Harvey Harrison's avatar
    • Kay Sievers's avatar
      USB: usb dev_set_name() instead of dev->bus_id · 0031a06e
      Kay Sievers authored
      The bus_id field is going away, use the dev_set_name() function
      to set it properly.
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0031a06e
    • Kay Sievers's avatar
      USB: usb dev_name() instead of dev->bus_id · 7071a3ce
      Kay Sievers authored
      The bus_id field is going away, use the dev_name() function instead.
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7071a3ce
    • Greg Kroah-Hartman's avatar
      USB: revert "don't lose disconnections during suspend" · 36aa8117
      Greg Kroah-Hartman authored
      This reverts Alan's previous patch so that the recent Hub changes will
      apply cleanly.  The above mentioned patch was needed for 2.6.26 to work
      properly.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      36aa8117
    • Greg Kroah-Hartman's avatar
      USB: handle pci_name() being const · 1b26da15
      Greg Kroah-Hartman authored
      This changes usb_create_hcd() to be able to handle the fact that
      pci_name() has changed to a constant string.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1b26da15
    • Andrew Lunn's avatar
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · e89970aa
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        netfilter: nf_conntrack_sctp: fix sparse warnings
        netfilter: nf_nat_sip: c= is optional for session
        netfilter: xt_TCPMSS: collapse tcpmss_reverse_mtu{4,6} into one function
        netfilter: nfnetlink_log: send complete hardware header
        netfilter: xt_time: fix time's time_mt()'s use of do_div()
        netfilter: accounting rework: ct_extend + 64bit counters (v4)
        netlink: add NLA_PUT_BE64 macro
        netfilter: nf_nat_core: eliminate useless find_appropriate_src for IP_NAT_RANGE_PROTO_RANDOM
        hdlcdrv: Fix CRC calculation.
        Revert "pkt_sched: Make default qdisc nonshared-multiqueue safe."
        net: In __netif_schedule() use WARN_ON instead of BUG_ON
        net: Improve simple_tx_hash().
        pkt_sched: Remove unused variable skb in dev_deactivate_queue function.
        sunhme: Remove stop/wake TX queue calls in set-multicast-list handler.
        ucc_geth: do not touch net queue in adjust_link phylib callback
        gianfar: do not touch net queue in adjust_link phylib callback
        atl1: Do not wake queue before queue has been started.
      e89970aa
    • Randy Dunlap's avatar
      pci kernel-doc fatal error · 443bd1c4
      Randy Dunlap authored
      Fix kernel-doc comments so that they don't produce errors.
      Also cut some extraneous copy-paste text.
      
      Error(linhead//drivers/pci/pci.c:1133): duplicate section name 'Description'
      Error(linhead//drivers/pci/pci.c:1189): duplicate section name 'Description'
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      443bd1c4
    • Linus Torvalds's avatar
      Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip · 72a73693
      Linus Torvalds authored
      * 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (160 commits)
        x86: remove extra calling to get ext cpuid level
        x86: use setup_clear_cpu_cap() when disabling the lapic
        KVM: fix exception entry / build bug, on 64-bit
        x86: add unknown_nmi_panic kernel parameter
        x86, VisWS: turn into generic arch, eliminate leftover files
        x86: add ->pre_time_init to x86_quirks
        x86: extend and use x86_quirks to clean up NUMAQ code
        x86: introduce x86_quirks
        x86: improve debug printout: add target bootmem range in early_res_to_bootmem()
        Subject: devmem, x86: fix rename of CONFIG_NONPROMISC_DEVMEM
        x86: remove arch_get_ram_range
        x86: Add a debugfs interface to dump PAT memtype
        x86: Add a arch directory for x86 under debugfs
        x86: i386: reduce boot fixmap space
        i386/xen: add proper unwind annotations to xen_sysenter_target
        x86: reduce force_mwait visibility
        x86: reduce forbid_dac's visibility
        x86: fix two modpost warnings
        x86: check function status in EDD boot code
        x86_64: ia32_signal.c: remove signal number conversion
        ...
      72a73693
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm · b7e6f62f
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
        dm crypt: add merge
        dm table: remove merge_bvec sector restriction
        dm: linear add merge
        dm: introduce merge_bvec_fn
        dm snapshot: use per device mempools
        dm snapshot: fix race during exception creation
        dm snapshot: track snapshot reads
        dm mpath: fix test for reinstate_path
        dm mpath: return parameter error
        dm io: remove struct padding
        dm log: make dm_dirty_log init and exit static
        dm mpath: free path selector on invalid args
      b7e6f62f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://neil.brown.name/md · 8a392625
      Linus Torvalds authored
      * 'for-linus' of git://neil.brown.name/md: (52 commits)
        md: Protect access to mddev->disks list using RCU
        md: only count actual openers as access which prevent a 'stop'
        md: linear: Make array_size sector-based and rename it to array_sectors.
        md: Make mddev->array_size sector-based.
        md: Make super_type->rdev_size_change() take sector-based sizes.
        md: Fix check for overlapping devices.
        md: Tidy up rdev_size_store a bit:
        md: Remove some unused macros.
        md: Turn rdev->sb_offset into a sector-based quantity.
        md: Make calc_dev_sboffset() return a sector count.
        md: Replace calc_dev_size() by calc_num_sectors().
        md: Make update_size() take the number of sectors.
        md: Better control of when do_md_stop is allowed to stop the array.
        md: get_disk_info(): Don't convert between signed and unsigned and back.
        md: Simplify restart_array().
        md: alloc_disk_sb(): Return proper error value.
        md: Simplify sb_equal().
        md: Simplify uuid_equal().
        md: sb_equal(): Fix misleading printk.
        md: Fix a typo in the comment to cmd_match().
        ...
      8a392625
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 519f0141
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (48 commits)
        Input: add switch for dock events
        Input: add microphone insert switch definition
        Input: i8042 - add Arima-Rioworks HDAMB board to noloop list
        Input: sgi_btns - add support for SGI Indy volume buttons
        Input: add option to disable HP SDC driver
        Input: serio - trivial documentation fix
        Input: add new serio driver for Xilinx XPS PS2 IP
        Input: add driver for Tabletkiosk Sahara TouchIT-213 touchscreen
        Input: new driver for SGI O2 volume buttons
        Input: yealink - reliably kill urbs
        Input: q40kbd - make q40kbd_lock static
        Input: gtco - eliminate early return
        Input: i8042 - add Dritek quirk for Acer Aspire 5720
        Input: usbtouchscreen - ignore eGalax screens supporting HID protocol
        Input: i8042 - add Medion NAM 2070 to noloop blacklist
        Input: i8042 - add Gericom Bellagio to nomux blacklist
        Input: i8042 - add Acer Aspire 1360 to nomux blacklist
        Input: hp_sdc_mlc.c - make a struct static
        Input: hil_mlc.c - make code static
        Input: wistron - generate normal key event if bluetooth or wifi not present
        ...
      519f0141
    • Patrick McHardy's avatar
      netfilter: nf_conntrack_sctp: fix sparse warnings · 5547cd0a
      Patrick McHardy authored
      Introduced by a258860e (netfilter: ctnetlink: add full support for SCTP to ctnetlink):
      
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: incorrect type in argument 1 (different base types)
      net/netfilter/nf_conntrack_proto_sctp.c:483:2:    expected unsigned int [unsigned] [usertype] x
      net/netfilter/nf_conntrack_proto_sctp.c:483:2:    got restricted unsigned int const <noident>
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: incorrect type in argument 1 (different base types)
      net/netfilter/nf_conntrack_proto_sctp.c:487:2:    expected unsigned int [unsigned] [usertype] x
      net/netfilter/nf_conntrack_proto_sctp.c:487:2:    got restricted unsigned int const <noident>
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type
      net/netfilter/nf_conntrack_proto_sctp.c:532:42: warning: incorrect type in assignment (different base types)
      net/netfilter/nf_conntrack_proto_sctp.c:532:42:    expected restricted unsigned int <noident>
      net/netfilter/nf_conntrack_proto_sctp.c:532:42:    got unsigned int
      net/netfilter/nf_conntrack_proto_sctp.c:534:39: warning: incorrect type in assignment (different base types)
      net/netfilter/nf_conntrack_proto_sctp.c:534:39:    expected restricted unsigned int <noident>
      net/netfilter/nf_conntrack_proto_sctp.c:534:39:    got unsigned int
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5547cd0a
    • Herbert Xu's avatar
      netfilter: nf_nat_sip: c= is optional for session · c71529e4
      Herbert Xu authored
      According to RFC2327, the connection information is optional
      in the session description since it can be specified in the
      media description instead.
      
      My provider does exactly that and does not provide any connection
      information in the session description.  As a result the new
      kernel drops all invite responses.
      
      This patch makes it optional as documented.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c71529e4
    • Jan Engelhardt's avatar
    • Eric Leblond's avatar
      netfilter: nfnetlink_log: send complete hardware header · 72961ecf
      Eric Leblond authored
      This patch adds some fields to NFLOG to be able to send the complete
      hardware header with all necessary informations.
      It sends to userspace:
       * the type of hardware link
       * the lenght of hardware header
       * the hardware header
      Signed-off-by: default avatarEric Leblond <eric@inl.fr>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72961ecf
    • David Howells's avatar
      netfilter: xt_time: fix time's time_mt()'s use of do_div() · 280763c0
      David Howells authored
      Fix netfilter xt_time's time_mt()'s use of do_div() on an s64 by using
      div_s64() instead.
      
      This was introduced by patch ee4411a1
      ("[NETFILTER]: x_tables: add xt_time match").
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      280763c0
    • Krzysztof Piotr Oledzki's avatar
      netfilter: accounting rework: ct_extend + 64bit counters (v4) · 58401572
      Krzysztof Piotr Oledzki authored
      Initially netfilter has had 64bit counters for conntrack-based accounting, but
      it was changed in 2.6.14 to save memory. Unfortunately in-kernel 64bit counters are
      still required, for example for "connbytes" extension. However, 64bit counters
      waste a lot of memory and it was not possible to enable/disable it runtime.
      
      This patch:
       - reimplements accounting with respect to the extension infrastructure,
       - makes one global version of seq_print_acct() instead of two seq_print_counters(),
       - makes it possible to enable it at boot time (for CONFIG_SYSCTL/CONFIG_SYSFS=n),
       - makes it possible to enable/disable it at runtime by sysctl or sysfs,
       - extends counters from 32bit to 64bit,
       - renames ip_conntrack_counter -> nf_conn_counter,
       - enables accounting code unconditionally (no longer depends on CONFIG_NF_CT_ACCT),
       - set initial accounting enable state based on CONFIG_NF_CT_ACCT
       - removes buggy IPCT_COUNTER_FILLING event handling.
      
      If accounting is enabled newly created connections get additional acct extend.
      Old connections are not changed as it is not possible to add a ct_extend area
      to confirmed conntrack. Accounting is performed for all connections with
      acct extend regardless of a current state of "net.netfilter.nf_conntrack_acct".
      Signed-off-by: default avatarKrzysztof Piotr Oledzki <ole@ans.pl>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      58401572
    • Krzysztof Piotr Oledzki's avatar
      netlink: add NLA_PUT_BE64 macro · 07a7c107
      Krzysztof Piotr Oledzki authored
      Add NLA_PUT_BE64 macro required for 64bit counters in netfilter
      Signed-off-by: default avatarKrzysztof Piotr Oledzki <ole@ans.pl>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07a7c107
    • Changli Gao's avatar
    • Micah Dowty's avatar
      hdlcdrv: Fix CRC calculation. · ae6134bd
      Micah Dowty authored
      This is a trivial patch against the hdlcdrv module that fixes its CRC
      calculation. The finished CRC was overwriting the first two bytes of
      each packet rather than being appended to the end.
      
      I've tested this with 2.6.8 and 2.6.10-rc1, but hdlcdrv hasn't changed
      much recently so it should work with many other kernel versions.
      Signed-off-by: default avatarMicah Dowty <micah@navi.cx>
      Acked-by: default avatarThomas Sailer <t.sailer@alumni.ethz.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae6134bd
    • David S. Miller's avatar
      Revert "pkt_sched: Make default qdisc nonshared-multiqueue safe." · d3678b46
      David S. Miller authored
      This reverts commit a0c80b80.
      
      After discussions with Jamal and Herbert on netdev, we should
      provide at least minimal prioritization at the qdisc level
      even in multiqueue situations.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3678b46
    • Linus Torvalds's avatar
    • David S. Miller's avatar
      net: Improve simple_tx_hash(). · b6b2fed1
      David S. Miller authored
      Based upon feedback from Eric Dumazet and Andi Kleen.
      
      Cure several deficiencies in simple_tx_hash() by using
      jhash + reciprocol multiply.
      
      1) Eliminates expensive modulus operation.
      
      2) Makes hash less attackable by using random seed.
      
      3) Eliminates endianness hash distribution issues.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b6b2fed1
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 · f8b71a3a
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (44 commits)
        sparc: Remove Sparc's asm-offsets for sclow.S
        sparc64: Update defconfig.
        sparc64: Add Niagara2 RNG driver.
        sparc64: Add missing hypervisor service group numbers.
        sparc64: Remove 4MB and 512K base page size options.
        sparc64: Convert to generic helpers for IPI function calls.
        sparc: Use new '%pS' infrastructure to print symbols.
        sparc32: fix init.c allnoconfig build error
        sparc64: Config category "Processor type and features" absent
        sparc: arch/sparc/kernel/apc.c to unlocked_ioctl
        sparc: join the remaining header files
        sparc: merge header files with trivial differences
        sparc: when header files are equal use asm-sparc version
        sparc: copy sparc64 specific files to asm-sparc
        sparc: Merge asm-sparc{,64}/asi.h
        sparc: export openprom.h to userspace
        sparc: Merge asm-sparc{,64}/types.h
        sparc: Merge asm-sparc{,64}/termios.h
        sparc: Merge asm-sparc{,64}/termbits.h
        sparc: Merge asm-sparc{,64}/setup.h
        ...
      f8b71a3a