19 May, 2011

1 commit

  • Some embedded devices like the Netgear WNDR3300 have two SSB based cards
    without an own sprom on the pci bus. We have to provide two different
    fallback sproms for these and this was not possible with the old solution.
    In the bcm47xx architecture the sprom data is stored in the nvram in the
    main flash storage. The architecture code will be able to fill the sprom
    with the stored data based on the bus where the device was found.

    The bcm63xx code should do the same thing as before, just using the new
    API.

    Acked-by: Michael Buesch
    Cc: netdev@vger.kernel.org
    Cc: linux-wireless@vger.kernel.org
    Cc: Florian Fainelli
    Signed-off-by: Hauke Mehrtens
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/2362/
    Signed-off-by: Ralf Baechle

    Hauke Mehrtens
     

31 Mar, 2011

1 commit


19 Feb, 2011

1 commit


10 Feb, 2011

1 commit


03 Dec, 2010

1 commit


19 Nov, 2010

1 commit


17 Nov, 2010

2 commits


05 Jun, 2010

1 commit

  • In kernel Bugzilla #15825 (2 users), in a wireless mailing list thread
    (http://lists.infradead.org/pipermail/b43-dev/2010-May/000124.html), and on a
    netbook owned by John Linville
    (http://marc.info/?l=linux-wireless&m=127230751408818&w=4), there are reports
    of ssb failing to detect an SPROM at the normal location. After studying the
    MMIO trace dump for the Broadcom wl driver, it was determined that the affected
    boxes had a relocated SPROM.

    This patch fixes all systems that have reported this problem.

    Signed-off-by: Larry Finger
    Cc: Stable
    Signed-off-by: John W. Linville

    Larry Finger
     

29 May, 2010

1 commit

  • Ethernet driver b44 does register ssb by it's pcihost_wrapper
    and doesn't set ssb_chipcommon. A check on this value
    introduced with commit d53cdbb94a52a920d5420ed64d986c3523a56743
    and ea2db495f92ad2cf3301623e60cb95b4062bc484 triggers:

    BUG: unable to handle kernel NULL pointer dereference at 00000010
    IP: [] ssb_is_sprom_available+0x16/0x30

    Signed-off-by: Christoph Fritz
    Signed-off-by: John W. Linville

    Christoph Fritz
     

06 May, 2010

1 commit


27 Apr, 2010

3 commits

  • Signed-off-by: Rafał Miłecki
    Signed-off-by: John W. Linville

    Rafał Miłecki
     
  • Our offset handling becomes even a little more hackish now. For some reason I
    do not understand all offsets as inrelative. It assumes base offset is 0x1000
    but it will work for now as we make offsets relative anyway by removing base
    0x1000. Should be cleaner however.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: John W. Linville

    Rafał Miłecki
     
  • Attempting to read registers that don't exist on the SSB bus can cause
    hangs on some boxes. At least some b43 devices are 'in the wild' that
    don't have SPROMs at all. When the SSB bus support loads, it attempts
    to read these (non-existant) SPROMs and causes hard hangs on the box --
    no console output, etc.

    This patch adds some intelligence to determine whether or not the SPROM
    is present before attempting to read it. This avoids those hard hangs
    on those devices with no SPROM attached to their SSB bus. The
    SSB-attached devices (e.g. b43, et al.) won't work, but at least the box
    will survive to test further patches. :-)

    Signed-off-by: John W. Linville
    Signed-off-by: Rafał Miłecki
    Cc: Larry Finger
    Cc: Michael Buesch

    John W. Linville
     

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
     

15 Sep, 2009

1 commit


20 Aug, 2009

1 commit


14 Aug, 2009

1 commit


06 Mar, 2009

1 commit

  • This adds SSB functionality to register a fallback SPROM image from the
    architecture setup code.

    Weird architectures exist that have half-assed SSB devices without SPROM attached to
    their PCI busses. The architecture can register a fallback SPROM image that is
    used if no SPROM is found on the SSB device.

    Signed-off-by: Michael Buesch
    Cc: Florian Fainelli
    Signed-off-by: John W. Linville

    Michael Buesch
     

30 Jan, 2009

1 commit


30 Aug, 2008

2 commits

  • Only rev 1 and 2 ssb SPROMs have fields named et0mac and et1mac;
    however, all of the extraction routines extract pseudo data for these
    fields from regions that are all 1's resulting in a hardware address
    of FF:FF:FF:FF:FF:FF. This patch forces such a fill at the beginning of
    the data extraction process, and only does the formal extraction if the
    SPROM rev is 1 or 2.

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Larry Finger
     
  • Although a revision 5 SPROM has not been seen in the wild, the
    open-source portion of the MIPS driver 4.150.10.5 describes its
    layout, which is mostly inherited from revision 4. This patch
    implements the differences.

    Signed-off-by: Larry Finger
    Acked-by: Michael Buesch
    Signed-off-by: John W. Linville

    Larry Finger
     

08 May, 2008

1 commit

  • The current code checks for the special signature that signifies
    a revision 4 SPROM. Now that a rev. 8 SPROM with a 440-byte length
    has been found that may not have any special code, this check could
    be relaxed. With this patch, if the CRC is incorrect for a 256-byte
    SPROM, the code will immediately check for a 440-byte SPROM. If there
    is still a CRC error, the size is set to 440 bytes, which allows dumping
    of most of any 512-byte SPROM if one is encountered.

    Signed-off-by: Larry Finger
    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Larry.Finger@lwfinger.net
     

24 Apr, 2008

1 commit

  • In the SSB SPROM a field set to all ones means the value
    is not defined in the SPROM.
    In case of the boardflags, we need to set them to zero
    to avoid confusing drivers. Drivers will only check the
    flags by ANDing.

    Signed-off-by: Larry Finger
    Signed-off-by: Gabor Stefanik
    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Larry Finger
     

09 Apr, 2008

1 commit

  • This adds support for block based I/O to SSB.
    This is needed in order to efficiently support PIO data
    transfers to the card.
    The block-I/O support is only compiled, if it's selected by the
    weird driver that needs it. So there's no overhead for sane devices.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     

14 Mar, 2008

1 commit


01 Mar, 2008

1 commit


29 Jan, 2008

5 commits

  • Add boardflags-high.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • This fixes extraction of some values from the SPROM.
    It mainly fixes extraction of antenna related values, which
    is needed for another b43 fix sent later.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • The old, now unused, data structures and SPROM extraction routines
    are removed.

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Larry Finger
     
  • In disagreement with the SPROM specs, revision 3 devices appear to have
    moved the MAC address.

    Change ssb to handle the revision 4 SPROM, which is a different size.
    This change in size is handled by adding a new variable to the ssb_sprom
    struct and using it whenever possible. For those routines that do not
    have access to this structure, a 'u16 size' argument is added.

    The new PCI_ID for the BCM4328 is also added.

    Testing of the Revision 4 SPROM, which is used on the BCM4328, was done
    by Michael Gerdau .

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Larry Finger
     
  • The SPROM's for various devices utilizing the Sonics Silicon Backplane come
    with various revisions. The Revision 2 SPROM inherited the data layout of 1, and
    Revision 3 inherited the layout of 2. The first instance of Revision 4 has
    now been found in a BCM4328 wireless LAN card. This device does not inherit any
    layout from previous versions. Although it was possible to create a data
    structure that kept all the old layouts, we decided to start fresh, keep only
    those SPROM variables that are used by the drivers that utilize ssb, and to
    do the conversion in such a manner that neither compilation or execution will
    be affected if a bisection lands in the middle of these changes, while keeping
    the patches as small as possible.

    In this patch, the sprom structures are changed while maintaining the old ones.

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Larry Finger
     

11 Oct, 2007

3 commits

  • This fixes all Sparse warnings in SSB.
    No semantics change.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Michael Buesch
     
  • On a PCI bus use ioreadX() and iowriteX().
    We map the I/O space with pci_iomap(), so we must use the correct
    accessor functions, too.
    readX() and writeX() are not guaranteed to accept the cookie returned
    from pci_iomap() (though, it currently works on most architectures).

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Michael Buesch
     
  • SSB is an SoC bus used in a number of embedded devices. The most
    well-known of these devices is probably the Linksys WRT54G, but there
    are others as well. The bus is also used internally on the BCM43xx
    and BCM44xx devices from Broadcom.

    This patch also includes support for SSB ID tables in modules, so
    that SSB drivers can be loaded automatically.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Michael Buesch