17 Oct, 2012

1 commit

  • Remove non-UAPI Kbuild files that have become empty as a result of UAPI
    disintegration. They used to have only header-y lines in them and those have
    now moved to the Kbuild files in the corresponding uapi/ directories.

    Possibly these should not be removed but rather have a comment inserted to say
    they are intentionally left blank. This would make it easier to add generated
    header lines in future without having to restore the infrastructure.

    Note that at this point not all the UAPI disintegration parts have been merged,
    so it is likely that more empty Kbuild files will turn up.

    It is probably necessary to make the files non-empty to prevent the patch
    program from automatically deleting them when it reduces them to nothing.

    Signed-off-by: David Howells

    David Howells
     

09 Oct, 2012

1 commit


16 Mar, 2012

1 commit

  • The header includes a lot of stuff, and
    it in turn gets a lot of use just for the basic "struct device"
    which appears so often.

    Clean up the users as follows:

    1) For those headers only needing "struct device" as a pointer
    in fcn args, replace the include with exactly that.

    2) For headers not really using anything from device.h, simply
    delete the include altogether.

    3) For headers relying on getting device.h implicitly before
    being included themselves, now explicitly include device.h

    4) For files in which doing #1 or #2 uncovers an implicit
    dependency on some other header, fix by explicitly adding
    the required header(s).

    Any C files that were implicitly relying on device.h to be
    present have already been dealt with in advance.

    Total removals from #1 and #2: 51. Total additions coming
    from #3: 9. Total other implicit dependencies from #4: 7.

    As of 3.3-rc1, there were 110, so a net removal of 42 gives
    about a 38% reduction in device.h presence in include/*

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

30 Mar, 2010

1 commit

  • …it 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: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

19 Oct, 2009

4 commits

  • Add support for the WiMAX device in the Intel WiFi/WiMAX Link 6050
    Series; this involves:

    - adding the device ID to bind to and an endpoint mapping for the
    driver to use.

    - at probe() time, some things are set depending on the device id:

    + the list of firmware names to try

    + mapping of endpoints

    Signed-off-by: Dirk Brandewie
    Signed-off-by: Inaky Perez-Gonzalez

    Dirk Brandewie
     
  • The i2400m based devices can get in a sort of a deadlock some times;
    when they boot, they send a reboot "barker" (a magic number) and then
    the driver has to echo that same barker to ack reception
    (echo/ack). Then the device does a final ack by sending an ACK barker.

    The first time this happens, we don't know ahead of time with barker
    the device is going to send, as different device models and SKUs will
    send different barker depending on the EEPROM programming.

    If the device has sent the barker before the driver has been able to
    read it, the driver looses, as it doesn't know which barker it has to
    echo/ack back. With older devices, we tried a couple of combinations
    and that always worked; but now, with adding support for more, in
    which we have an unlimited number of new barkers, that is not an
    option.

    So we rework said case so that when the device gets stuck, we just
    cycle through all the known types until one forces the device to send
    an ack. Otherwise, the driver gives up and aborts.

    Signed-off-by: Inaky Perez-Gonzalez

    Inaky Perez-Gonzalez
     
  • The i2400m based devices can boot two main types of firmware images:
    signed and non-signed. Signed images have signature data included that
    must match that of a certificate stored in the device.

    Currently the code is making the decission on what type of firmware
    load (signed vs non-signed) is going to be loaded based on a hardcoded
    decission in __i2400m_ack_verify(), based on the barker the device
    sent upon boot.

    This is not flexible enough as future hardware will emit more barkers;
    thus the bit has to be set in a place where there is better knowledge
    of what is going on. This will be done in follow-up commits -- however
    this patch paves the way for it.

    So the querying of the mode is packed into i2400m_boot_is_signed();
    the main changes are just using i2400m_boot_is_signed() to determine
    the method to follow and setting i2400m->sboot in
    i2400m_is_boot_barker(). The modifications in i2400m_dnload_init() and
    i2400m_dnload_finalize() are just reorganizing the order of the if
    blocks and thus look larger than they really are.

    Signed-off-by: Inaky Perez-Gonzalez

    Inaky Perez-Gonzalez
     
  • Add "debug" module options to all the wimax modules (including
    drivers) so that the debug levels can be set upon kernel boot or
    module load time.

    This is needed as currently there was a limitation where the debug
    levels could only be set when a device was succesfully
    enumerated. This made it difficult to debug issues that made a device
    not probe properly.

    Signed-off-by: Inaky Perez-Gonzalez

    Inaky Perez-Gonzalez
     

11 Jun, 2009

1 commit


02 Mar, 2009

4 commits

  • Allow the device to give the driver RX data with reorder information.

    When that is done, the device will indicate the driver if a packet has
    to be held in a (sorted) queue. It will also tell the driver when held
    packets have to be released to the OS.

    This is done to improve the WiMAX-protocol level retransmission
    support when missing frames are detected.

    The code docs provide details about the implementation.

    In general, this just hooks into the RX path in rx.c; if a packet with
    the reorder bit in the RX header is detected, the reorder information
    in the header is extracted and one of the four main reorder operations
    are executed. In one case (queue) no packet will be delivered to the
    networking stack, just queued, whereas in the others (reset, update_ws
    and queue_update_ws), queued packet might be delivered depending on
    the window start for the specific queue.

    The modifications to files other than rx.c are:

    - control.c: during device initialization, enable reordering support
    if the rx_reorder_disabled module parameter is not enabled

    - driver.c: expose a rx_reorder_disable module parameter and call
    i2400m_rx_setup/release() to initialize/shutdown RX reorder
    support.

    - i2400m.h: introduce members in 'struct i2400m' needed for
    implementing reorder support.

    - linux/i2400m.h: introduce TLVs, commands and constant definitions
    related to RX reorder

    Last but not least, the rx reorder code includes an small circular log
    where the last N reorder operations are recorded to be displayed in
    case of inconsistency. Otherwise diagnosing issues would be almost
    impossible.

    Signed-off-by: Inaky Perez-Gonzalez
    Signed-off-by: David S. Miller

    Inaky Perez-Gonzalez
     
  • Newer i2400m firmwares (>= v1.4) extend the data RX protocol so that
    each packet has a 16 byte header. This header is mainly used to
    implement host reordeing (which is addressed in later commits).

    However, this header also allows us to overwrite it (once data has
    been extracted) with an Ethernet header and deliver to the networking
    stack without having to reallocate the skb (as it happened in fw
    Signed-off-by: David S. Miller

    Inaky Perez-Gonzalez
     
  • Cc: inaky.perez-gonzalez@intel.com
    Cc: linux-wimax@intel.com
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Kay Sievers
    Signed-off-by: Inaky Perez-Gonzalez
    Signed-off-by: David S. Miller

    Kay Sievers
     
  • For power saving reasons, WiMAX links can be put in idle mode while
    connected after a certain time of the link not being used for tx or
    rx. In this mode, the device pages the base-station regularly and when
    data is ready to be transmitted, the link is revived.

    This patch allows the user to control the time the device has to be
    idle before it decides to go to idle mode from a sysfs
    interace.

    It also updates the initialization code to acknowledge the module
    variable 'idle_mode_disabled' when the firmware is a newer version
    (upcoming 1.4 vs 2.6.29's v1.3).

    The method for setting the idle mode timeout in the older firmwares is
    much more limited and can be only done at initialization time. Thus,
    the sysfs file will return -ENOSYS on older ones.

    Signed-off-by: Inaky Perez-Gonzalez
    Signed-off-by: David S. Miller

    Inaky Perez-Gonzalez
     

08 Jan, 2009

3 commits

  • These two files are what user space can use to establish communication
    with the WiMAX kernel API and to speak the Intel 2400m Wireless WiMAX
    connection's control protocol.

    Signed-off-by: Inaky Perez-Gonzalez
    Cc: David Woodhouse
    Signed-off-by: Greg Kroah-Hartman

    Inaky Perez-Gonzalez
     
  • The wimax/i2400m.h defines the structures and constants for the
    host-device protocols:

    - boot / firmware upload protocol

    - general data transport protocol

    - control protocol

    It is done in such a way that can also be used verbatim by user space.

    drivers/net/wimax/i2400m.h defines all the APIs used by the core,
    bus-generic driver (i2400m) and the bus specific drivers
    (i2400m-BUSNAME). It also gives a roadmap to the driver
    implementation.

    debug-levels.h adds the core driver's debug settings.

    Signed-off-by: Inaky Perez-Gonzalez
    Signed-off-by: Greg Kroah-Hartman

    Inaky Perez-Gonzalez
     
  • This file contains a simple debug framework that is used in the stack;
    it allows the debug level to be controlled at compile-time (so the
    debug code is optimized out) and at run-time (for what wasn't compiled
    out).

    This is eventually going to be moved to use dynamic_printk(). Just
    need to find time to do it.

    Signed-off-by: Inaky Perez-Gonzalez
    Signed-off-by: Greg Kroah-Hartman

    Inaky Perez-Gonzalez