22 Nov, 2019
2 commits
-
In the implementation of hci_connect_le_scan() when conn is added via
hci_conn_add(), if hci_explicit_conn_params_set() fails the allocated
memory for conn is leaked. Use hci_conn_del() to release it.Fixes: f75113a26008 ("Bluetooth: add hci_connect_le_scan")
Signed-off-by: Navid Emamdoost
Signed-off-by: Marcel Holtmann -
When utilizing BDADDR_PROPERTY and INVALID_BDADDR quirks together it
results in an unconfigured controller even if the bootloader provides
a valid address. Fix this by allowing a bootloader provided address
to mark the controller as configured.Signed-off-by: Marcel Holtmann
Tested-by: Andre Heider
Signed-off-by: Johan Hedberg
21 Nov, 2019
2 commits
-
This patch adds the device ID for the BCM4335A0 module
(part of the AMPAK AP6335 WIFI/Bluetooth combo)hciconfig output:
```
hci1: Type: Primary Bus: UART
BD Address: 43:35:B0:07:1F:AC ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:5079 acl:0 sco:0 events:567 errors:0
TX bytes:69065 acl:0 sco:0 commands:567 errors:0
Features: 0xbf 0xfe 0xcf 0xff 0xdf 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: 'alarm'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 4.0 (0x6) Revision: 0x161
LMP Version: 4.0 (0x6) Subversion: 0x4106
Manufacturer: Broadcom Corporation (15)
```Signed-off-by: Mohammad Rasim
Signed-off-by: Marcel Holtmann -
Available in the Ampak AP6335 WiFi/Bluetooth combo
Signed-off-by: Mohammad Rasim
Signed-off-by: Marcel Holtmann
19 Nov, 2019
2 commits
-
We used to take a lock in amp_physical_cfm() but then we moved it to
the caller function. Unfortunately the unlock on this error path was
overlooked so it leads to a double unlock.Fixes: a514b17fab51 ("Bluetooth: Refactor locking in amp_physical_cfm")
Signed-off-by: Dan Carpenter
Signed-off-by: Marcel Holtmann -
Add the device ID for the WiFi/BT/FM combo chip BCM4334 (rev B0).
The chip seems to use 43:34:b0:00:00:00 as default address,
so add it to the list of default addresses and leave it up
to the user to configure a valid one.Signed-off-by: Stephan Gerhold
Signed-off-by: Marcel Holtmann
15 Nov, 2019
1 commit
-
If setup() fails a reference for runtime PM has already
been taken. Proper use of the error handling in btusb_open()is needed.
You cannot just return.Fixes: ace31982585a3 ("Bluetooth: btusb: Add setup callback for chip init on USB")
Signed-off-by: Oliver Neukum
Signed-off-by: Marcel Holtmann
13 Nov, 2019
33 commits
-
Stefan Wahren says:
====================
ARM: Enable GENET support for RPi 4Raspberry Pi 4 uses the broadcom genet chip in version five.
This chip has a dma controller integrated. Up to now the maximal
burst size was hard-coded to 0x10. But it turns out that Raspberry Pi 4
does only work with the smaller maximal burst size of 0x8.Additionally the patch series has some IRQ retrieval improvements and
adds support for a missing PHY mode.This series based on Matthias Brugger's V1 series [1].
[1] - https://patchwork.kernel.org/cover/11186193/
Changes in V5:
- address Doug's commentChanges in V4:
- rebased on current net-next
- remove RGMII_ID support
- remove fixes tag from patch 1
- add Florian's suggestions to patch 5Changes in V3:
- introduce SoC-specific compatibles for GENET (incl. dt-binding)
- use platform_get_irq_optional for optional IRQ
- remove Fixes tag from IRQ error handling change
- move most of MDIO stuff to bcm2711.dtsiChanges in V2:
- add 2 fixes for IRQ retrieval
- add support for missing PHY modes
- declare PHY mode RGMII RXID based on the default settings
- add alias to allow firmware append the MAC address
====================Signed-off-by: David S. Miller
-
This adds the missing support for the PHY mode RGMII_RXID.
It's necessary for the Raspberry Pi 4.Signed-off-by: Stefan Wahren
Acked-by: Florian Fainelli
Signed-off-by: David S. Miller -
The register access in bcmgenet_mii_config() is a little bit opaque and
not easy to extend. In preparation for the missing RGMII PHY modes
move all the phy name assignments into the switch statement and the
register access to the end of the function. This make the code easier
to read and extend.Signed-off-by: Stefan Wahren
Signed-off-by: David S. Miller -
The BCM2711 needs a different maximum DMA burst length. If not set
accordingly a timeout in the transmit queue happens and no package
can be sent. So use the new compatible to derive this value.Until now the GENET HW version was used as the platform identifier.
This doesn't work with SoC-specific modifications, so introduce a proper
platform data structure.Signed-off-by: Stefan Wahren
Acked-by: Florian Fainelli
Reviewed-by: Matthias Brugger
Signed-off-by: David S. Miller -
The BCM2711 has some modifications to the GENET v5. So add this SoC
specific compatible.Suggested-by: Florian Fainelli
Signed-off-by: Stefan Wahren
Reviewed-by: Florian Fainelli
Acked-by: Rob Herring
Signed-off-by: David S. Miller -
This fixes the error handling for the mandatory IRQs. There is no need
for the error message anymore, this is now handled by platform_get_irq.Signed-off-by: Stefan Wahren
Acked-by: Florian Fainelli
Signed-off-by: David S. Miller -
As platform_get_irq() now prints an error when the interrupt does not
exist, we are getting a confusing error message in case the optional
WOL IRQ is not defined:bcmgenet fd58000.ethernet: IRQ index 2 not found
Fix this by using the platform_get_irq_optional().
Signed-off-by: Stefan Wahren
Acked-by: Florian Fainelli
Signed-off-by: David S. Miller -
Sometimes it can be quite opaque even for me why the driver decided to
reset the switch. So instead of adding dump_stack() calls each time for
debugging, just add a reset reason to sja1105_static_config_reload
calls which gets printed to the console.Signed-off-by: Vladimir Oltean
Reviewed-by: Florian Fainelli
Signed-off-by: David S. Miller -
Matthias Schiffer says:
====================
Implement get_link_ksettings for VXLAN and bridgeMesh routing protocol batman-adv (in particular the new BATMAN_V algorithm)
uses the link speed reported by get_link_ksettings to determine a path
metric for wired links. In the mesh framework Gluon [1], we layer VXLAN
and sometimes bridge interfaces on our Ethernet links.These patches implement get_link_ksettings for these two interface types.
While this is obviously not accurate for bridges with multiple active
ports, it's much better than having no estimate at all (and in the
particular setup of Gluon, bridges with a single port aren't completely
uncommon).[1] https://github.com/freifunk-gluon/gluon
====================Signed-off-by: David S. Miller
-
We return the maximum speed of all active ports. This matches how the link
speed would give an upper limit for traffic to/from any single peer if the
bridge were replaced with a hardware switch.Signed-off-by: Matthias Schiffer
Signed-off-by: David S. Miller -
Similar to VLAN and similar drivers, we can forward get_link_ksettings to
the lower dev if we have one to get meaningful speed/duplex data.Signed-off-by: Matthias Schiffer
Signed-off-by: David S. Miller -
It is possible for a switch driver to use NET_DSA_TAG_8021Q as a valid
DSA tagging protocol since it registers itself as such, unfortunately
since there are not xmit or rcv functions provided, the lack of a xmit()
function will lead to a NPD in dsa_slave_xmit() to start with.net/dsa/tag_8021q.c is only comprised of a set of helper functions at
the moment, but is not a fully autonomous or functional tagging "driver"
(though it could become later on). We do not have any users of
NET_DSA_TAG_8021Q so now is a good time to make sure there are not
issues being encountered by making this file strictly a place holder for
helper functions.Reviewed-by: Vladimir Oltean
Signed-off-by: Florian Fainelli
Signed-off-by: David S. Miller -
In commit 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address
hash values"), the 32-bit node address only generated after one second
trial period expired. However the self's addr in struct tipc_monitor do
not update according to node address generated. This lead to it is
always zero as initial value. As result, sorting algorithm using this
value does not work as expected, neither neighbor monitoring framework.In this commit, we add a fix to update self's addr when 32-bit node
address generated.Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values")
Acked-by: Jon Maloy
Signed-off-by: Hoang Le
Signed-off-by: David S. Miller -
Pablo Neira Ayuso says:
====================
netfilter flowtable hardware offloadThe following patchset adds hardware offload support for the flowtable
infrastructure [1]. This infrastructure provides a fast datapath for
the classic Linux forwarding path that users can enable through policy,
eg.table inet x {
flowtable f {
hook ingress priority 10 devices = { eth0, eth1 }
flags offload
}
chain y {
type filter hook forward priority 0; policy accept;
ip protocol tcp flow offload @f
}
}This example above enables the fastpath for TCP traffic between devices
eth0 and eth1. Users can turn on the hardware offload through the
'offload' flag from the flowtable definition. If this new flag is not
specified, the software flowtable datapath is used.This patchset is composed of 4 preparation patches:
room to extend this infrastructure, eg. accelerate bridge forwarding.
And 2 patches to add the hardware offload control and data planes:
hardware offload. This includes a new NFTA_FLOWTABLE_FLAGS netlink
attribute to convey the optional NF_FLOWTABLE_HW_OFFLOAD flag.
API available at net/core/flow_offload.h to represent the flow
through two flow_rule objects to configure an exact 5-tuple matching
on each direction plus the corresponding forwarding actions, that is,
the MAC address, NAT and checksum updates; and port redirection in
order to configure the hardware datapath. This patch only supports
for IPv4 support and statistics collection for flow aging as an initial
step.This patchset introduces a new flow_block callback type that needs to be
set up to configure the flowtable hardware offload.The first client of this infrastructure follows up after this batch.
I would like to thank Mellanox for developing the first upstream driver
to use this infrastructure.[1] Documentation/networking/nf_flowtable.txt
====================Signed-off-by: David S. Miller
-
This patch adds the dataplane hardware offload to the flowtable
infrastructure. Three new flags represent the hardware state of this
flow:* FLOW_OFFLOAD_HW: This flow entry resides in the hardware.
* FLOW_OFFLOAD_HW_DYING: This flow entry has been scheduled to be remove
from hardware. This might be triggered by either packet path (via TCP
RST/FIN packet) or via aging.
* FLOW_OFFLOAD_HW_DEAD: This flow entry has been already removed from
the hardware, the software garbage collector can remove it from the
software flowtable.This patch supports for:
* IPv4 only.
* Aging via FLOW_CLS_STATS, no packet and byte counter synchronization
at this stage.This patch also adds the action callback that specifies how to convert
the flow entry into the flow_rule object that is passed to the driver.Signed-off-by: Pablo Neira Ayuso
Signed-off-by: David S. Miller -
This patch adds the NFTA_FLOWTABLE_FLAGS attribute that allows users to
specify the NF_FLOWTABLE_HW_OFFLOAD flag. This patch also adds a new
setup interface for the flowtable type to perform the flowtable offload
block callback configuration.Signed-off-by: Pablo Neira Ayuso
Signed-off-by: David S. Miller -
This patch adds the infrastructure to support for flow entry types.
The initial type is NF_FLOW_OFFLOAD_ROUTE that stores the routing
information into the flow entry to define a fastpath for the classic
forwarding path.Signed-off-by: Pablo Neira Ayuso
Signed-off-by: David S. Miller -
Move rcu_head to struct flow_offload, then remove the flow_offload_entry
structure definition.Signed-off-by: Pablo Neira Ayuso
Signed-off-by: David S. Miller -
Drivers do not have access to the flow_offload structure, hence remove
this union from this flow_offload object as well as the original comment
on top of it.Signed-off-by: Pablo Neira Ayuso
Signed-off-by: David S. Miller -
Simplify this code by storing the pointer to conntrack object in the
flow_offload structure.Signed-off-by: Pablo Neira Ayuso
Signed-off-by: David S. Miller -
Added tests for 'cmp' extended match rules.
Signed-off-by: Roman Mashak
Signed-off-by: David S. Miller -
…etooth/bluetooth-next
Johan Hedberg says:
====================
pull request: linux-bluetooth 2019-11-11Here's one more bluetooth-next pull request for the 5.5 kernel release.
- Several fixes for LE advertising
- Added PM support to hci_qca driver
- Added support for WCN3991 SoC in hci_qca driver
- Added DT bindings for BCM43540 module
- A few other small cleanups/fixes
====================Signed-off-by: David S. Miller <davem@davemloft.net>
-
…x/kernel/git/mkl/linux-can-next
Marc Kleine-Budde says:
====================
pull-request: can-next 2019-10-07this is a pull request for net-next/master consisting of 32 patches.
The first patch is by Gustavo A. R. Silva and removes unused code in the
generic CAN infrastructure.The next three patches target the mcp251x driver. The one by Andy
Shevchenko removes the legacy platform data support from the driver. The
other two are by Timo Schlüßler and reset the device only when needed,
to prevent glitches on the output when GPIO support is added.I'm contributing two patches fixing checkpatch warnings in the
c_can_platform and peak_canfd driver.Stephane Grosjean's patch for the peak_canfd driver adds hw timestamps
support in rx skbs.The next three patches target the xilinx_can driver. One patch by me to
fix checkpatch warnings, one patch by Anssi Hannula to avoid non
requested bus error frames, and a patch by YueHaibing that switches the
driver to devm_platform_ioremap_resource().Pankaj Sharma contributes two patches for the m_can driver, the first
one adds support for one shot mode, the other support for handling
arbitration errors.Followed by four patches by YueHaibing, switching the grcan, ifi, rcar,
and sun4i drivers to devm_platform_ioremap_resource()I'm contributing cleanup patches for the rx-offload helper, while Joakim
Zhang's patch prepares the rx-offload helper for CAN-FD support. The rx
offload users flexcan and ti_hecc are converted accordingly.The remaining twelve patches target the flexcan driver. First Joakim
Zhang switches the driver to devm_platform_ioremap_resource(). The
remaining eleven patch are by me and clean up the abstract the access of
the iflag1 and iflag2 register both for RX and TX mailboxes. This is a
preparation for the upcoming CAN-FD support.
====================Signed-off-by: David S. Miller <davem@davemloft.net>
-
The sfc driver can drop packets processed with XDP, notably when running
out of buffer space on XDP_TX, or returning an unknown XDP action.
This increments the rx_xdp_bad_drops ethtool counter.Call trace_xdp_exception everywhere rx_xdp_bad_drops is incremented,
except for fragmented RX packets as the XDP program hasn't run yet.
This allows it to easily be monitored from userspace.This mirrors the behavior of other drivers.
Signed-off-by: Arthur Fabre
Acked-by: Edward Cree
Signed-off-by: David S. Miller -
When do randbuilding, we got this warning:
WARNING: unmet direct dependencies detected for PTP_1588_CLOCK
Depends on [n]: NET [=y] && POSIX_TIMERS [=n]
Selected by [y]:
- PTP_1588_CLOCK_IDTCM [=y]Make PTP_1588_CLOCK_IDTCM depends on PTP_1588_CLOCK to fix this.
Fixes: 3a6ba7dc7799 ("ptp: Add a ptp clock driver for IDT ClockMatrix.")
Signed-off-by: YueHaibing
Reviewed-by: Vincent Cheng
Signed-off-by: David S. Miller -
after commit 4097e9d250fb ("net: sched: don't use tc_action->order during
action dump"), 'act->order' is initialized but then it's no more read, so
we can just remove this member of struct tc_action.CC: Ivan Vecera
Signed-off-by: Davide Caratti
Acked-by: Jiri Pirko
Reviewed-by: Ivan Vecera
Signed-off-by: David S. Miller -
There is a stray semicolon in an if statement that will cause a dev_err
message to be printed unconditionally. Fix this by removing the stray
semicolon.Addresses-Coverity: ("Stay semicolon")
Fixes: f0942e00a1ab ("net: dsa: mv88e6xxx: Add support for port mirroring")
Signed-off-by: Colin Ian King
Reviewed-by: Andrew Lunn
Signed-off-by: David S. Miller -
Aya Levin says:
====================
Update devlink binary outputThis series changes the devlink binary interface:
-The first patch forces binary values to be enclosed in an array. In
addition, devlink_fmsg_binary_pair_put breaks the binary value into
chunks to comply with devlink's restriction for value length.
-The second patch removes redundant code and uses the fixed devlink
interface (devlink_fmsg_binary_pair_put).
-The third patch make self test to use the updated devlink
interface.
-The fourth, adds a verification of dumping a very large binary
content. This test verifies breaking the data into chunks in a valid
JSON output.Series was generated against net-next commit:
ca22d6977b9b Merge branch 'stmmac-next'
====================Signed-off-by: David S. Miller
-
Add a test of 2 PAGEs size (exceeds devlink previous length limitation)
of binary data on a 'devlink health dump show' command. Set binary length
to 8192, issue a dump show command and clear it.Signed-off-by: Aya Levin
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller -
Update dummy reporter's output to use updated devlink interface of
binary fmsg pair.Signed-off-by: Aya Levin
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller -
Remove redundant code from fw_fatal reporter's dump callback. Use
updated devlink interface of binary fmsg pair which breaks the output
into chunks internally.Signed-off-by: Aya Levin
Acked-by: Jiri Pirko
Acked-by: Saeed Mahameed
Signed-off-by: David S. Miller -
Devlink supports pair output of name and value. When the value is
binary, it must be presented in an array. If the length of the binary
value exceeds fmsg limitation, break the value into chunks internally.Signed-off-by: Aya Levin
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller -
When building with SFP disabled, the stub for sfp_bus_add_upstream()
missed "inline". Add it.Fixes: 727b3668b730 ("net: sfp: rework upstream interface")
Signed-off-by: Russell King
Reviewed-by: Andrew Lunn
Signed-off-by: David S. Miller