10 Jan, 2019
2 commits
-
It provides more meaningful messages.
Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo -
Accessing struct device is pretty useful/common so having a direct
pointer:
1) Simplifies some code
2) Makes bcma_bus_get_host_dev() unneeded
3) Allows further improvements like using dev_* printing helpersSigned-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
17 Jan, 2017
1 commit
-
This reverts commit 4c81acab3816 ("bcma: init serial console directly
from ChipCommon code") as it broke IRQ assignment. Getting IRQ with
bcma_core_irq helper on SoC requires MIPS core to be set. It happens
*after* ChipCommon initialization so we can't do this so early.This fixes a user reported regression. It wasn't critical as serial was
still somehow working but lack of IRQs was making in unreliable.Fixes: 4c81acab3816 ("bcma: init serial console directly from ChipCommon code")
Reported-by: Felix Fietkau
Cc: stable@vger.kernel.org # 4.6+
Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
11 Jul, 2016
1 commit
-
The EFI firmware on Macs contains a full-fledged network stack for
downloading OS X images from osrecovery.apple.com. Unfortunately
on Macs introduced 2011 and 2012, EFI brings up the Broadcom 4331
wireless card on every boot and leaves it enabled even after
ExitBootServices has been called. The card continues to assert its IRQ
line, causing spurious interrupts if the IRQ is shared. It also corrupts
memory by DMAing received packets, allowing for remote code execution
over the air. This only stops when a driver is loaded for the wireless
card, which may be never if the driver is not installed or blacklisted.The issue seems to be constrained to the Broadcom 4331. Chris Milsted
has verified that the newer Broadcom 4360 built into the MacBookPro11,3
(2013/2014) does not exhibit this behaviour. The chances that Apple will
ever supply a firmware fix for the older machines appear to be zero.The solution is to reset the card on boot by writing to a reset bit in
its mmio space. This must be done as an early quirk and not as a plain
vanilla PCI quirk to successfully combat memory corruption by DMAed
packets: Matthew Garrett found out in 2012 that the packets are written
to EfiBootServicesData memory (http://mjg59.dreamwidth.org/11235.html).
This type of memory is made available to the page allocator by
efi_free_boot_services(). Plain vanilla PCI quirks run much later, in
subsys initcall level. In-between a time window would be open for memory
corruption. Random crashes occurring in this time window and attributed
to DMAed packets have indeed been observed in the wild by Chris
Bainbridge.When Matthew Garrett analyzed the memory corruption issue in 2012, he
sought to fix it with a grub quirk which transitions the card to D3hot:
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=9d34bb85da56This approach does not help users with other bootloaders and while it
may prevent DMAed packets, it does not cure the spurious interrupts
emanating from the card. Unfortunately the card's mmio space is
inaccessible in D3hot, so to reset it, we have to undo the effect of
Matthew's grub patch and transition the card back to D0.Note that the quirk takes a few shortcuts to reduce the amount of code:
The size of BAR 0 and the location of the PM capability is identical
on all affected machines and therefore hardcoded. Only the address of
BAR 0 differs between models. Also, it is assumed that the BCMA core
currently mapped is the 802.11 core. The EFI driver seems to always take
care of this.Michael Büsch, Bjorn Helgaas and Matt Fleming contributed feedback
towards finding the best solution to this problem.The following should be a comprehensive list of affected models:
iMac13,1 2012 21.5" [Root Port 00:1c.3 = 8086:1e16]
iMac13,2 2012 27" [Root Port 00:1c.3 = 8086:1e16]
Macmini5,1 2011 i5 2.3 GHz [Root Port 00:1c.1 = 8086:1c12]
Macmini5,2 2011 i5 2.5 GHz [Root Port 00:1c.1 = 8086:1c12]
Macmini5,3 2011 i7 2.0 GHz [Root Port 00:1c.1 = 8086:1c12]
Macmini6,1 2012 i5 2.5 GHz [Root Port 00:1c.1 = 8086:1e12]
Macmini6,2 2012 i7 2.3 GHz [Root Port 00:1c.1 = 8086:1e12]
MacBookPro8,1 2011 13" [Root Port 00:1c.1 = 8086:1c12]
MacBookPro8,2 2011 15" [Root Port 00:1c.1 = 8086:1c12]
MacBookPro8,3 2011 17" [Root Port 00:1c.1 = 8086:1c12]
MacBookPro9,1 2012 15" [Root Port 00:1c.1 = 8086:1e12]
MacBookPro9,2 2012 13" [Root Port 00:1c.1 = 8086:1e12]
MacBookPro10,1 2012 15" [Root Port 00:1c.1 = 8086:1e12]
MacBookPro10,2 2012 13" [Root Port 00:1c.1 = 8086:1e12]For posterity, spurious interrupts caused by the Broadcom 4331 wireless
card resulted in splats like this (stacktrace omitted):irq 17: nobody cared (try booting with the "irqpoll" option)
handlers:
[] pcie_isr
[] sdhci_irq [sdhci] threaded [] sdhci_thread_irq [sdhci]
[] azx_interrupt [snd_hda_codec]
Disabling IRQ #17Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79301
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111781
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=728916
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=895951#c16
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1009819
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1098621
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1149632#c5
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1279130
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1332732
Tested-by: Konstantin Simanov # [MacBookPro8,1]
Tested-by: Lukas Wunner # [MacBookPro9,1]
Tested-by: Bryan Paradis # [MacBookPro9,2]
Tested-by: Andrew Worsley # [MacBookPro10,1]
Tested-by: Chris Bainbridge # [MacBookPro10,2]
Signed-off-by: Lukas Wunner
Acked-by: Rafał Miłecki
Acked-by: Matt Fleming
Cc: Andy Lutomirski
Cc: Bjorn Helgaas
Cc: Borislav Petkov
Cc: Brian Gerst
Cc: Chris Milsted
Cc: Denys Vlasenko
Cc: H. Peter Anvin
Cc: Josh Poimboeuf
Cc: Linus Torvalds
Cc: Matthew Garrett
Cc: Michael Buesch
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Yinghai Lu
Cc: b43-dev@lists.infradead.org
Cc: linux-pci@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: stable@vger.kernel.org
Cc: stable@vger.kernel.org # 123456789abc: x86/quirks: Apply nvidia_bugs quirk only on root bus
Cc: stable@vger.kernel.org # 123456789abc: x86/quirks: Reintroduce scanning of secondary buses
Link: http://lkml.kernel.org/r/48d0972ac82a53d460e5fce77a07b2560db95203.1465690253.git.lukas@wunner.de
[ Did minor readability edits. ]
Signed-off-by: Ingo Molnar
07 Mar, 2016
1 commit
-
This follows the way of handling other flashes and cleans code a bit. As
next task we will want to move flash code to ChipCommon driver as:
1) Flash controllers are accesible using ChipCommon registers
2) This code isn't MIPS specific
This change prepares bcma for that.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
06 Feb, 2016
1 commit
-
UART is connected to and controlled over ChipCommon core. It doesn't
have much to do with MIPS core (where we initialize it currently)
except just existing on embedded systemms. There isn't point of such
cross-core initialization (and we needed #ifdef anyway) so just handle
it in ChipCommon.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
11 Aug, 2015
1 commit
-
bus->host_pdev is part of a union so bus->host_pdev != NULL is probably
also true for PCIe devices, because there it accesses bus->host_pci. If
we access the dev member at the offset defined in struct
platform_device in struct pci_dev instead we probably get something
else.This patch adds a new function which returns the host dev struct and
NULL if we do not have a host dev. When this gets registered on MIPS
brcm47xx we do not have a host dev in some situations.
This function could also be used in other places.This problem was introduced in this commit:
commit cae761b5a6bdc597ba476a040fdcd5b4bc559b85
Author: Rafa? Mi?ecki
Date: Sun Jun 28 17:17:13 2015 +0200bcma: populate bus DT subnodes as platform_device-s
Signed-off-by: Hauke Mehrtens
Signed-off-by: Kalle Valo
13 Mar, 2015
1 commit
-
It isn't required for bcma bus on SoCs, so provide some empty functions
and allow disabling it.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
05 Mar, 2015
1 commit
-
These functions are not exported nor used anywhere, so there is no
reason to put them in public headers.
Also drop unused bcma_chipco_(suspend|resume).Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
02 Mar, 2015
3 commits
-
Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo -
Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo -
Bringing PCIe hosted bus up requires operating on host-related core.
Since we plan to support PCIe Gen 2 devices we should provide a helper
picking the correct one (PCIE or PCIE2).Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
29 Jan, 2015
1 commit
-
This allows us to drop some #ifdef magic (mess).
Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
24 Jan, 2015
2 commits
-
Starting with kernel 3.19-rc1 early registration of bcma on MIPS is done
a bit later, with memory allocator available. This allows us to simplify
code by using standard bus scanning method.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo -
This moves main bus init code to the main.c and renames old function to
make its purpose clear.
Thanks to this change we'll also be able to separate scanning from
registration (and support PCIe Gen 2 devices) in the future.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
28 Oct, 2014
1 commit
-
We were setting things like dma_dev, IRQ, etc. during core registration
only. We need such info for cores handled internally (e.g. ChipCommon)
as well.Signed-off-by: Rafał Miłecki
Acked-by: Hauke Mehrtens
Signed-off-by: John W. Linville
01 Oct, 2014
1 commit
-
This driver is used by the bcm53xx ARM SoC code. Now it is possible to
give the address of the chipcommon core in device tree and bcma will
search for all the other cores.Signed-off-by: Hauke Mehrtens
Acked-by: Arnd Bergmann
Signed-off-by: John W. Linville
10 Sep, 2014
1 commit
-
This core is used on BCM4708 to configure the PCIe and USB3 PHYs and it
contains the addresses to the Device Management unit. This will be used
by the PCIe driver first.Signed-off-by: Hauke Mehrtens
Signed-off-by: John W. Linville
05 Jan, 2014
1 commit
-
This function is used to get a specific core when there is more than
one core of that specific type. This is used in bgmac to reset all GMAC
cores.Signed-off-by: Hauke Mehrtens
Acked-by: Rafał Miłecki
Signed-off-by: David S. Miller
28 Jun, 2013
1 commit
-
Signed-off-by: Rafał Miłecki
Signed-off-by: John W. Linville
09 Feb, 2013
2 commits
-
Synchronize with 'net' in order to sort out some l2tp, wireless, and
ipv6 GRE fixes that will be built on top of in 'net-next'.Signed-off-by: David S. Miller
-
…wireless-next into for-davem
07 Feb, 2013
1 commit
-
…wireless into for-davem
05 Feb, 2013
1 commit
-
This patch unregisters the gpio chip before bcma gets unloaded.
Signed-off-by: Hauke Mehrtens
Reported-by: Piotr Haber
Signed-off-by: John W. Linville
31 Jan, 2013
1 commit
-
Signed-off-by: John W. Linville
29 Jan, 2013
1 commit
-
…wireless-next into for-davem
08 Jan, 2013
1 commit
-
This bcma_find_core_unit() is needed by the mips driver in the next
patch.Signed-off-by: Hauke Mehrtens
Signed-off-by: John W. Linville
04 Jan, 2013
1 commit
-
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.This change removes the use of __devinit, __devexit_p, and __devexit
from these drivers.Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.Cc: Bill Pemberton
Cc: "Rafał Miłecki"
Signed-off-by: Greg Kroah-Hartman
15 Dec, 2012
1 commit
-
Pull MIPS updates from Ralf Baechle:
"The MIPS bits for 3.8. This also includes a bunch fixes that were
sitting in the linux-mips.org git tree for a long time. This pull
request contains updates to several OCTEON drivers and the board
support code for BCM47XX, BCM63XX, XLP, XLR, XLS, lantiq, Loongson1B,
updates to the SSB bus support, MIPS kexec code and adds support for
kdump.When pulling this, there are two expected merge conflicts in
include/linux/bcma/bcma_driver_chipcommon.h which are trivial to
resolve, just remove the conflict markers and keep both alternatives."* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (90 commits)
MIPS: PMC-Sierra Yosemite: Remove support.
VIDEO: Newport Fix console crashes
MIPS: wrppmc: Fix build of PCI code.
MIPS: IP22/IP28: Fix build of EISA code.
MIPS: RB532: Fix build of prom code.
MIPS: PowerTV: Fix build.
MIPS: IP27: Correct fucked grammar in ops-bridge.c
MIPS: Highmem: Fix build error if CONFIG_DEBUG_HIGHMEM is disabled
MIPS: Fix potencial corruption
MIPS: Fix for warning from FPU emulation code
MIPS: Handle COP3 Unusable exception as COP1X for FP emulation
MIPS: Fix poweroff failure when HOTPLUG_CPU configured.
MIPS: MT: Fix build with CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
MIPS: Remove unused smvp.h
MIPS/EDAC: Improve OCTEON EDAC support.
MIPS: OCTEON: Add definitions for OCTEON memory contoller registers.
MIPS: OCTEON: Add OCTEON family definitions to octeon-model.h
ata: pata_octeon_cf: Use correct byte order for DMA in when built little-endian.
MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree.
MIPS: Remove usage of CEVT_R4K_LIB config option.
...
11 Dec, 2012
1 commit
-
Signed-off-by: John W. Linville
07 Dec, 2012
1 commit
-
Register the watchdog driver to the system if this is a SoC. Using the
watchdog on a non SoC device, like a PCIe card, will make the PCIe
card die when the timeout expired, but starting it again is not
supported by bcma.Signed-off-by: Hauke Mehrtens
Signed-off-by: John W. Linville
22 Nov, 2012
1 commit
-
Register a GPIO driver to access the GPIOs provided by the chip.
The GPIOs of the SoC should always start at 0 and the other GPIOs could
start at a random position. There is just one SoC in a system and when
they start at 0 the number is predictable.Signed-off-by: Hauke Mehrtens
Patchwork: http://patchwork.linux-mips.org/patch/4587
Acked-by: Florian Fainelli
22 Aug, 2012
2 commits
-
Signed-off-by: Rafał Miłecki
Signed-off-by: John W. Linville -
Signed-off-by: Rafał Miłecki
Signed-off-by: John W. Linville
18 Jul, 2012
1 commit
-
Signed-off-by: Rafał Miłecki
Signed-off-by: John W. Linville
10 Jul, 2012
1 commit
-
Having bus number printed makes it much easier to anaylze logs on
systems with more buses. For example Netgear WNDR4500 has 3 AMBA buses
in total, which makes standard log really messy.Signed-off-by: Rafał Miłecki
Signed-off-by: John W. Linville
07 Feb, 2012
3 commits
-
Some SoCs have a PCIe host controller to make it possible to attach
some other devices to it, like an other Wifi card.
This code was tested with an Netgear WNDR3400 (bcm4716 based), but
should work with all bcma based SoCs.Signed-off-by: Hauke Mehrtens
Signed-off-by: John W. Linville -
bcma_core_pci_hostmode_init() has to be in __devinit as it will call a
function in that section and so all functions calling it also have to
be in __devinit.Signed-off-by: Hauke Mehrtens
Signed-off-by: John W. Linville -
This will be needed by the host controller.
Signed-off-by: Hauke Mehrtens
Signed-off-by: John W. Linville