21 Sep, 2020

1 commit


13 Sep, 2019

1 commit

  • Don't populate the array pwr_info_offset on the stack but instead make it
    static const. Makes the object code smaller by 207 bytes.

    Before:
    text data bss dec hex filename
    26066 3000 64 29130 71ca drivers/ssb/pci.o

    After:
    text data bss dec hex filename
    25763 3096 64 28923 70fb drivers/ssb/pci.o

    (gcc version 9.2.1, amd64)

    Signed-off-by: Colin Ian King
    Acked-by: Michael Büsch
    Signed-off-by: Kalle Valo

    Colin Ian King
     

08 Apr, 2019

1 commit

  • mmiowb() is now implied by spin_unlock() on architectures that require
    it, so there is no reason to call it from driver code. This patch was
    generated using coccinelle:

    @mmiowb@
    @@
    - mmiowb();

    and invoked as:

    $ for d in drivers include/linux/qed sound; do \
    spatch --include-headers --sp-file mmiowb.cocci --dir $d --in-place; done

    NOTE: mmiowb() has only ever guaranteed ordering in conjunction with
    spin_unlock(). However, pairing each mmiowb() removal in this patch with
    the corresponding call to spin_unlock() is not at all trivial, so there
    is a small chance that this change may regress any drivers incorrectly
    relying on mmiowb() to order MMIO writes between CPUs using lock-free
    synchronisation. If you've ended up bisecting to this commit, you can
    reintroduce the mmiowb() calls using wmb() instead, which should restore
    the old behaviour on all architectures other than some esoteric ia64
    systems.

    Acked-by: Linus Torvalds
    Signed-off-by: Will Deacon

    Will Deacon
     

09 Aug, 2018

2 commits

  • Use the standard WARN_ON instead.
    If a small kernel is desired, WARN_ON can be disabled globally.

    Also remove SSB_DEBUG. Besides WARN_ON it only adds a tiny debug check.
    Include this check unconditionally.

    Signed-off-by: Michael Buesch
    Signed-off-by: Kalle Valo

    Michael Büsch
     
  • Replace the ssb printk wrappers by standard print helpers.
    Also remove SSB_SILENT. Nobody should use it anyway.

    Originally submitted by Joe Perches .
    Modified to add dev_... based printks.

    Signed-off-by: Michael Buesch
    Tested-by: Michael Buesch
    Cc: Joe Perches
    Signed-off-by: Kalle Valo

    Michael Büsch
     

17 Nov, 2016

1 commit


19 Jul, 2014

1 commit


16 Jul, 2014

2 commits


26 Mar, 2013

2 commits


14 Mar, 2013

1 commit

  • Since commit e565275 entitled "ssb: pci: Standardize a function to get mac
    address", the SPROM readout of the MAC has had the values flipped so that
    00:11:22:33:44:55 became 11:00:33:22:55:44. The fix has been tested on both
    little- and big-endian architectures.

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

    Larry Finger
     

07 Mar, 2013

2 commits


17 May, 2012

4 commits

  • These newly added attributes are used by brcmsmac. Now bcma should
    parse all attributes used by brcmsmac out of the sprom.

    Signed-off-by: Hauke Mehrtens
    Tested-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     
  • This attribute is now used in b43 driver and should be filled for all
    sprom versions.

    Signed-off-by: Hauke Mehrtens
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     
  • The attribute country_code and alpha2 are two different attributes in
    the sprom. country_code contains some code in an 8 bit coding and
    alpha2 contains two chars with the country code. The attributes where
    read out wrongly in the past and country_code is only available on
    sprom version 1.

    Signed-off-by: Hauke Mehrtens
    Tested-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     
  • Previously the rev contained the revision read from the pci config
    space and was used as board_rev in the wireless drivers. This is wrong
    the board_rev is only fetched from the sprom accordingly to the open
    source part of the Broadcom SDK and brcmsmac. This patch removes the
    rev from the boardinfo structure and uses the board_rev attribute from
    sprom instead. This attribute is filled by PCI, PCMCIA, SDIO and SoC
    code.

    Signed-off-by: Hauke Mehrtens
    Tested-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     

06 Mar, 2012

1 commit

  • There is no 2.4 GHz or 5GHz antenna gain stored in sprom. The sprom
    just stores the gain values for antenna 1 and 2 or 1 to 4 for more
    recent sprom versions. On old devices antenna 2 was used for 5 GHz wifi.

    Signed-off-by: Hauke Mehrtens
    Signed-off-by: John W. Linville

    Hauke Mehrtens
     

25 Jan, 2012

1 commit

  • We already extract some basic info but it's incomplete, reads info
    about the first core only. Used data structure doesn't allow easy
    adding of more cores.
    This patch adds new struct and array for storing power info. The plan
    is to: switch all extractors (including the ones using NVRAM) to new
    struct, switch drivers, then deprecate and finally drop old SSB fields.

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

    Rafał Miłecki
     

14 Dec, 2011

1 commit


26 Jul, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    fs: Merge split strings
    treewide: fix potentially dangerous trailing ';' in #defined values/expressions
    uwb: Fix misspelling of neighbourhood in comment
    net, netfilter: Remove redundant goto in ebt_ulog_packet
    trivial: don't touch files that are removed in the staging tree
    lib/vsprintf: replace link to Draft by final RFC number
    doc: Kconfig: `to be' -> `be'
    doc: Kconfig: Typo: square -> squared
    doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
    drivers/net: static should be at beginning of declaration
    drivers/media: static should be at beginning of declaration
    drivers/i2c: static should be at beginning of declaration
    XTENSA: static should be at beginning of declaration
    SH: static should be at beginning of declaration
    MIPS: static should be at beginning of declaration
    ARM: static should be at beginning of declaration
    rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
    Update my e-mail address
    PCIe ASPM: forcedly -> forcibly
    gma500: push through device driver tree
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
    - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
    - drivers/net/r8169.c (just context changes)

    Linus Torvalds
     

07 Jul, 2011

1 commit


06 Jul, 2011

3 commits

  • The SSB code reads PCI subsystem IDs from the PCI configuration registers while
    they are already stored by the PCI subsystem in the 'subsystem_{vendor|device}'
    fields of 'struct pci_dev'...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: John W. Linville

    Sergei Shtylyov
     
  • The SSB code reads PCI revision ID from the PCI configuration register while
    it's already stored by the PCI subsystem in the 'revision' field of 'struct
    pci_dev'...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: John W. Linville

    Sergei Shtylyov
     
  • The SSB code reads PCI revision ID register as 16-bit entity while the register
    is actually 8-bit only (the next 8 bits are the programming interface register).
    Fix the read and make the 'rev' field of 'struct ssb_boardinfo' 8-bit as well,
    to match the register size.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: John W. Linville

    Sergei Shtylyov
     

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