1. 12 5月, 2010 3 次提交
  2. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  3. 09 2月, 2010 1 次提交
  4. 22 1月, 2010 1 次提交
  5. 12 12月, 2009 1 次提交
  6. 04 11月, 2009 3 次提交
    • I
      wimax/i2400m: handle USB stalls · faf57162
      Inaky Perez-Gonzalez 提交于
      When the device stalls, clear it and retry; if it keeps failing too
      often, reset the device.
      
      This specially happens when running on virtual machines; the real
      hardware doesn't seem to trip on stalls too much, except for a few
      reports in the mailing list (still to be confirmed this is the cause,
      although it seems likely.
      
      NOTE: it is not clear if the URB has to be resubmitted fully or start
      only at the offset of the first transaction sent. Can't find
      documentation to clarify one end or the other.
      
      Tests that just resubmit the whole URB seemed to work in my
      environment.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      faf57162
    • I
      wimax/i2400m: Fix USB timeout specifications (to ms from HZ) · 296bd4bd
      Inaky Perez-Gonzalez 提交于
      The USB code was incorrectly specifiying timeouts to be in jiffies vs
      msecs. On top of that, lower it to 200ms, as 1s is really too long
      (doesn't allow the watchdog to trip a reset if the device timesout too
      often).
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      296bd4bd
    • I
      wimax/i2400m: introduce i2400m_reset(), stopping TX and carrier · c931ceeb
      Inaky Perez-Gonzalez 提交于
      Currently the i2400m driver was resetting by just calling
      i2400m->bus_reset(). However, this was missing stopping the TX queue
      and downing the carrier. This was causing, for the corner case of the
      driver reseting a device that refuses to go out of idle mode, that a
      few packets would be queued and more than one reset would go through,
      making the recovery a wee bit messy.
      
      To avoid introducing the same cleanup in all the bus-specific driver,
      introduced a i2400m_reset() function that takes care of house cleaning
      and then calling the bus-level reset implementation.
      
      The bulk of the changes in all files are just to rename the call from
      i2400m->bus_reset() to i2400m_reset().
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      c931ceeb
  7. 19 10月, 2009 12 次提交
  8. 12 9月, 2009 1 次提交
    • M
      net: Add DEVTYPE support for Ethernet based devices · 384912ed
      Marcel Holtmann 提交于
      The Ethernet framing is used for a lot of devices these days. Most
      prominent are WiFi and WiMAX based devices. However for userspace
      application it is important to classify these devices correctly and
      not only see them as Ethernet devices. The daemons like HAL, DeviceKit
      or even NetworkManager with udev support tries to do the classification
      in userspace with a lot trickery and extra system calls. This is not
      good and actually reaches its limitations. Especially since the kernel
      does know the type of the Ethernet device it is pretty stupid.
      
      To solve this problem the underlying device type needs to be set and
      then the value will be exported as DEVTYPE via uevents and available
      within udev.
      
        # cat /sys/class/net/wlan0/uevent
        DEVTYPE=wlan
        INTERFACE=wlan0
        IFINDEX=5
      
      This is similar to subsystems like USB and SCSI that distinguish
      between hosts, devices, disks, partitions etc.
      
      The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
      device type. All device types are free form, but for convenience the
      same strings as used with RFKILL are choosen.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      384912ed
  9. 12 6月, 2009 1 次提交
  10. 11 6月, 2009 1 次提交
    • I
      wimax/i2400m: Allow bus-specific driver to specify retry count · ecddfd5e
      Inaky Perez-Gonzalez 提交于
      The code that sets up the i2400m (firmware load and general driver
      setup after it) includes a couple of retry loops.
      
      The SDIO device sometimes can get in more complicated corners than the
      USB one (due to its interaction with other SDIO functions), that
      require trying a few more times.
      
      To solve that, without having a failing USB device taking longer to be
      considered dead, allow the retry counts to be specified by the
      bus-specific driver, which the general driver takes as a parameter.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      ecddfd5e
  11. 29 5月, 2009 1 次提交
    • I
      wimax/i2400m: usb: fix device reset on autosuspend while not yet idle · 2618ab77
      Inaky Perez-Gonzalez 提交于
      When the i2400m is connected to a network, the host interface (USB)
      cannot be suspended. For that to happen, the device has to have
      negotiated with the basestation to put the link on IDLE state.
      
      If the host tries to put the device in standby while it is connected
      but not idle, the device resets, as the driver should not do that.
      
      To avoid triggering that, when the USB susbsytem requires the driver
      to autosuspend the device, the driver checks if the device is not yet
      idle. If it is not, the request is requested (will be retried again
      later on after the autosuspend timeout). At some point the device will
      enter idle and the request will succeed (unless of course, there is
      network traffic, but at that point, there is no idle neither in the
      link or the host interface).
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      2618ab77
  12. 22 5月, 2009 1 次提交
    • I
      wimax/i2400m: usb: fix device reset on autosuspend while not yet idle · e069c0cf
      Inaky Perez-Gonzalez 提交于
      When the i2400m is connected to a network, the host interface (USB)
      cannot be suspended. For that to happen, the device has to have
      negotiated with the basestation to put the link on IDLE state.
      
      If the host tries to put the device in standby while it is connected
      but not idle, the device resets, as the driver should not do that.
      
      To avoid triggering that, when the USB susbsytem requires the driver
      to autosuspend the device, the driver checks if the device is not yet
      idle. If it is not, the request is rejected (will be retried again
      later on after the autosuspend timeout). At some point the device will
      enter idle and the request will succeed (unless of course, there is
      network traffic, but at that point, there is no idle neither in the
      link or the host interface).
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      e069c0cf
  13. 02 3月, 2009 1 次提交
    • I
      wimax/i2400m: add the ability to fallback to other firmware files if the default is not there · 1039abbc
      Inaky Perez-Gonzalez 提交于
      In order to support backwards compatibility with older firmwares when
      a driver is updated by a new kernel release, the i2400m bus drivers
      can declare a list of firmware files they can work with (in general
      these will be each a different version). The firmware loader will try
      them in sequence until one loads.
      
      Thus, if a user doesn't have the latest and greatest firmware that a
      newly installed kernel would require, the driver would fall back to
      the firmware from a previous release.
      
      To support this, the i2400m->bus_fw_name is changed to be a NULL
      terminated array firmware file names (and renamed to bus_fw_names) and
      we add a new entry (i2400m->fw_name) that points to the name of the
      firmware being currently used. All code that needs to print the
      firmware file name uses i2400m->fw_name instead of the old
      i2400m->bus_fw_name.
      
      The code in i2400m_dev_bootstrap() that loads the firmware is changed
      with an iterator over the firmware file name list that tries to load
      each form user space, using the first one that succeeds in
      request_firmware() (and thus stopping the iteration).
      
      The USB and SDIO bus drivers are updated to take advantage of this and
      reflect which firmwares they support.
      Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1039abbc
  14. 01 2月, 2009 1 次提交
  15. 09 1月, 2009 1 次提交
  16. 08 1月, 2009 1 次提交