Prepare for future support of saving hwtstamp source in PTP xarray by
introducing HWTSTAMP_SOURCE_UNSPEC to hwtstamp_source enum, setting it
to 0 to match old behavior of no source defined.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-5-b5317f50df2a@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Change the API to select MAC default time stamping instead of the PHY.
Indeed the PHY is closer to the wire therefore theoretically it has less
delay than the MAC timestamping but the reality is different. Due to lower
time stamping clock frequency, latency in the MDIO bus and no PHC hardware
synchronization between different PHY, the PHY PTP is often less precise
than the MAC. The exception is for PHY designed specially for PTP case but
these devices are not very widespread. For not breaking the compatibility
default_timestamp flag has been introduced in phy_device that is set by
the phy driver to know we are using the old API behavior.
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-4-b5317f50df2a@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
the missing dependency to OF (Niklas Söderlund)
- Add suspend/resume support on k3_j72xx_bandgap and take the
opportunity to remove a unneeded delay in the init time code path
(Théo Lebrun)
- Fix thermal zone definition for MT8186 and MT8188 (Julien Panis)
- Convert hisilicon-thermal.txt to dt-schema (Abdulrasaq Lawani)
- Add the DT bindings for the X1E80100 temperature sensor (Abel Vesa)
- Fix the thermal zone node name regular expression in the DT schema
(Krzysztof Kozlowski)
- Take into account some production platforms may not have calibration
data. Deal with it with a default value instead of failing the
initialization (Chen-Yu Tsai)
- Fix the sensor cell size on the Exynos platform (Krzysztof Kozlowski)
- Bring the common definition of '#thermal-sensor-cells' property in
order to simplify the bindings on all the platforms where this
change makes sense and do some minor cleanups (Krzysztof Kozlowski)
- Fix a race between removal and clock disable on the broadcom driver
(Krzysztof Kozlowski)
- Drop 'trips' node as required from the thermal zone bindings in
order to fix the remaining warnings appearing with thermal zone
whithout trip points defined (Rob Herring)
- Simplify all the drivers where dev_err_probe() can apply (Krzysztof
Kozlowski)
- Cleanup code related to stih416 as this platform is not described
anywhere (Raphael Gallais-Pou)
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEGn3N4YVz0WNVyHskqDIjiipP6E8FAmaVNb8ACgkQqDIjiipP
6E/eIgf8CJavAB//zBlqpR1aqfz1mkkBXFCpcBsjlMcc1X88eKa5uFvDjhrlYt7F
lFATC+r2KyXJ6/827/CTYd/GUw1aQwakTV2RfMzXrl/VYkzX/qnZif7Q2TQ1Vcjr
n+AHxnB5HogtGj5GblGsP4anYJ3li4g2vpbUc2GH6KZdyIGp2UKXEzw3Ap1qujKL
uw8wb6wUqYMmhoMQsoqhsPPYtpzyqt39AF/DDDZcriM1RwRibBrFpvQQsEzKpW60
NFDf1QW9gtgcepiMwTGG0EIDy7BJC7I0gY7FlAzvQHMUoZuzZt+vVuLchQX5VH4V
03jG6N5WPA3sTJw9AwyweDt7CKsi/w==
=Opek
-----END PGP SIGNATURE-----
Merge tag 'thermal-v6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux into thermal
Merge thermal drivers updates for 6.11-rc1 from Daniel Lezcano:
"- Group all Renesas drivers inside a dedicated sub directory and add
the missing dependency to OF (Niklas Söderlund)
- Add suspend/resume support on k3_j72xx_bandgap and take the
opportunity to remove a unneeded delay in the init time code path
(Théo Lebrun)
- Fix thermal zone definition for MT8186 and MT8188 (Julien Panis)
- Convert hisilicon-thermal.txt to dt-schema (Abdulrasaq Lawani)
- Add the DT bindings for the X1E80100 temperature sensor (Abel Vesa)
- Fix the thermal zone node name regular expression in the DT schema
(Krzysztof Kozlowski)
- Take into account some production platforms may not have calibration
data. Deal with it with a default value instead of failing the
initialization (Chen-Yu Tsai)
- Fix the sensor cell size on the Exynos platform (Krzysztof Kozlowski)
- Bring the common definition of '#thermal-sensor-cells' property in
order to simplify the bindings on all the platforms where this
change makes sense and do some minor cleanups (Krzysztof Kozlowski)
- Fix a race between removal and clock disable on the broadcom driver
(Krzysztof Kozlowski)
- Drop 'trips' node as required from the thermal zone bindings in
order to fix the remaining warnings appearing with thermal zone
whithout trip points defined (Rob Herring)
- Simplify all the drivers where dev_err_probe() can apply (Krzysztof
Kozlowski)
- Cleanup code related to stih416 as this platform is not described
anywhere (Raphael Gallais-Pou)"
* tag 'thermal-v6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (45 commits)
thermal/drivers/sti: Cleanup code related to stih416
thermal/drivers/generic-adc: Simplify with dev_err_probe()
thermal/drivers/generic-adc: Simplify probe() with local dev variable
thermal/drivers/qcom-tsens: Simplify with dev_err_probe()
thermal/drivers/qcom-spmi-adc-tm5: Simplify with dev_err_probe()
thermal/drivers/imx: Simplify with dev_err_probe()
thermal/drivers/imx: Simplify probe() with local dev variable
thermal/drivers/hisi: Simplify with dev_err_probe()
thermal/drivers/exynos: Simplify with dev_err_probe()
thermal/drivers/exynos: Simplify probe() with local dev variable
thermal/drivers/broadcom: Simplify with dev_err_probe()
thermal/drivers/broadcom: Simplify probe() with local dev variable
thermal/drivers/broadcom: Fix race between removal and clock disable
dt-bindings: thermal: Drop 'trips' node as required
dt-bindings: thermal: qoriq: reference thermal-sensor schema
dt-bindings: thermal: cleanup examples indentation
dt-bindings: thermal: simplify few bindings
dt-bindings: thermal: ti,j72xx: reference thermal-sensor schema
dt-bindings: thermal: ti,am654: reference thermal-sensor schema
dt-bindings: thermal: st,stm32: reference thermal-sensor schema
...
Initialize the completion before the mailbox channel is requested.
Fixes: 389711b374 ("firmware: Add Turris Mox rWTM firmware driver")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
The wait_for_completion_timeout() function returns 0 if timed out, and a
positive value if completed. Fix the usage of this function.
Fixes: 389711b374 ("firmware: Add Turris Mox rWTM firmware driver")
Fixes: 2eab59cf0d ("firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Do not complete the "command done" completion if there are no waiters.
This can happen if a wait_for_completion() timed out or was interrupted.
Fixes: 389711b374 ("firmware: Add Turris Mox rWTM firmware driver")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Several recent patches added static stubs to btmtk.h without the inline
keyword, which causes instances of -Wunused-function when those stubs
are not used anywhere in a file that includes the header:
In file included from drivers/bluetooth/btusb.c:28:
drivers/bluetooth/btmtk.h:254:13: warning: 'btmtk_fw_get_filename' defined but not used [-Wunused-function]
254 | static void btmtk_fw_get_filename(char *buf, size_t size, u32 dev_id,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btmtk.h:249:12: warning: 'btmtk_process_coredump' defined but not used [-Wunused-function]
249 | static int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btmtk.h:243:12: warning: 'btmtk_register_coredump' defined but not used [-Wunused-function]
243 | static int btmtk_register_coredump(struct hci_dev *hdev, const char *name,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btmtk.h:233:12: warning: 'btmtk_setup_firmware' defined but not used [-Wunused-function]
233 | static int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname,
| ^~~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btmtk.h:227:12: warning: 'btmtk_setup_firmware_79xx' defined but not used [-Wunused-function]
227 | static int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Add inline to all the stubs in btmtk.h (even ones that do not currently
have any warnings associated with them) to ensure there are never unused
function warnings from these stubs, as is customary for the kernel.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This fixes the following build error introduced by b80f4e3b8c
("Bluetooth: hci_qca: schedule a devm action for disabling the clock"):
drivers/bluetooth/hci_qca.c: In function ‘qca_serdev_remove’:
drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
2501 | default:
| ^~~~~~~
Fixes: b80f4e3b8c ("Bluetooth: hci_qca: schedule a devm action for disabling the clock")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
In preparation for using the power sequencing subsystem on sm8650 boards
and X13s laptop let's make pwrseq the default for wcn7850 and wcn6855.
Both these models require an enable GPIO so we can safely assume that if
the property is not there, then we should try to get the power
sequencer. Due to how the pwrseq lookup works - checking the provider at
run-time - we cannot really do it the other way around as we'd get stuck
forever on -EPROBE_DEFER.
If the relevant OF node does have the 'enable-gpios' property, we
fallback to the existing code for backward compatibility with older DTs.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If the device has a power sequencing handle, use it first. Otherwise
fall back to whatever code already exists.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Now that all three branches of the switch end up doing the same thing,
we can move the call to hci_uart_register_device() past it and unify the
error message.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
In preparation for unduplicating the hci_uart registration code,
schedule a devres action for disabling the SUSCLK rather than doing it
manually.
We cannot really use devm_clk_get_enabled() as we also set the rate
before enabling the clock. While this should in theory work, I don't
want to risk breaking existing users. One solution for the future is to
add devm_clk_get_enabled_with_rate() to the clock framework.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Drop the inputs from the host and instead expect the Bluetooth node to
consume the outputs of the internal PMU. This model is closer to reality
than how we represent it now.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This fixes the warnings 'nxp_serdev_resume' and 'nxp_serdev_suspend'
defined but not used.
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407100518.06Xxq5PK-lkp@intel.com/
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds handling for system suspend and resume. While the host enters
suspend state, the driver will drive the chip into low power state.
Similarly when system is resuming, the driver will wake up the chip.
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds support for IW615 chipset with it's bootloader signature
and firmware file.
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Timestamping software or hardware flags are often used as a group,
therefore adding these masks will ease future use.
I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and
not used at all.
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-1-b5317f50df2a@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This adds support for AW693 A1 chipset with it's bootloader signature
and firmware file.
No firmware name change needed for AW693 A0 chipset.
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This patch implements functions for ISO data send and receive in btusb
driver for MediaTek's controller.
MediaTek defines a specific interrupt endpoint for ISO data transmissin
because the characteristics of interrupt endpoint are similar to the
application of ISO data which can support guaranteed transmissin
bandwidth, enough maximum data length and error checking mechanism.
Driver sets up ISO interface and endpoints in btusb_mtk_setup and clears
the setup in btusb_mtk_shutdown. These flow can't move to btmtk.c due to
btusb_driver is only defined in btusb.c when claiming/relaesing interface.
ISO packet anchor stops when driver suspending and resubmit interrupt urb
for ISO data when driver resuming.
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Move btusb_recv_acl_mtk from btusb.c to btmtk.c which holds
vendor specific stuff and would make btusb.c clean.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Move btusb_mtk_[setup, shutdown] and related function from
btusb.c to btmtk.c which holds vendor specific stuff and
would make btusb.c clean.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Move btusb_mtk_hci_wmt_sync from btusb.c to btmtk.c which holds
vendor specific stuff and would make btusb.c clean.
Add usb.h header to btmtksdio.c/btmtkuart.c for usb related element
defined in btmtk.h
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add suspend/resum callback function in btusb_data which are reserved
for vendor specific usage during suspend/resume. hdev->suspend will be
added before stop traffic in btusb_suspend and hdev-> resume will be
added after resubmit urb in btusb_resume.
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Rename btmediatek_data to have a consistent prefix throughout the driver.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Update the code to immediately return an error code if accessing a
related register fails. This ensures that our desired logic for
subsequent register operations is maintained and allows us to promptly
catch any unexpected errors.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Remove the unnecessary goto tag whether there is an error or not, we have
to free the buffer at the end of the function.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This removes the dependencies of hci_req_init and hci_request_cancel_all
from hci_sync.c.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This moves handling of interleave_scan work to hci_sync.c since
hci_request.c is deprecated.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This replaces the instance of hci_prepare_cmd with hci_cmd_sync_alloc
since the former is part of hci_request.c which is considered
deprecated.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
hci_request functions are considered deprecated so this replaces the
usage of hci_req_sync with hci_inquiry_sync.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This helps validating DTS files. Introduced changes:
1. Dropped serial details from example
2. Added required example include
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
__hci_cmd_sync_status shall only be used if hci_req_sync_lock is _not_
required which is not the case of hci_dev_cmd so it needs to use
hci_cmd_sync_status which uses hci_req_sync_lock internally.
Fixes: f1a8f402f1 ("Bluetooth: L2CAP: Fix deadlock")
Reported-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Remove unused and set but otherwise unused 'discovery_old_state'
and 'sco_last_tx' members of 'struct hci_dev'. The first one is
a leftover after commit 182ee45da0 ("Bluetooth: hci_sync: Rework
hci_suspend_notifier"); the second one is originated from ancient
2.4.19 and I was unable to find any actual use since that.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
We unnecessarily fallthrough the case for QCA6390 when initializing the
device and hit the condition where - due to the lack of the enable-gpio
- we disable power management despite using the power sequencer. We don't
need to look for clocks on this model so it makes more sense to just
register the hci device and break the switch.
Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fixes: 9a15ce6857 ("Bluetooth: qca: use the power sequencer for QCA6390")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # RB5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
BT_HCIUART_QCA, which is a bool and an HCI UART component, uses now
power sequencing, so we need to be sure BT_HCIUART_QCA=y and
POWER_SEQUENCING=m cannot happen:
/usr/bin/aarch64-linux-gnu-ld: drivers/bluetooth/hci_qca.o: in function `qca_serdev_probe':
drivers/bluetooth/hci_qca.c:2401:(.text+0xc48): undefined reference to `devm_pwrseq_get'
/usr/bin/aarch64-linux-gnu-ld: drivers/bluetooth/hci_qca.o: in function `qca_power_shutdown':
drivers/bluetooth/hci_qca.c:2192:(.text+0x29e8): undefined reference to `pwrseq_power_off'
/usr/bin/aarch64-linux-gnu-ld: drivers/bluetooth/hci_qca.o: in function `qca_power_on':
drivers/bluetooth/hci_qca.c:1808:(.text+0x3390): undefined reference to `pwrseq_power_on'
Fixes: 9a15ce6857 ("Bluetooth: qca: use the power sequencer for QCA6390")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fixes: f3b845e0ae ("Bluetooth: btintel: Add support to download intermediate loader")
Cc: Kiran K <kiran.k@intel.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Use the pwrseq subsystem's consumer API to run the power-up sequence for
the Bluetooth module of the QCA6390 package.
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD, SM8650-QRD & SM8650-HDK
Tested-by: Caleb Connolly <caleb.connolly@linaro.org> # OnePlus 8T
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
QCA6390 has a compatible listed in the bindings but is missing the
regulators description. Add the missing supply property and list the
required ones in the allOf section.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmZpT80ACgkQEacuoBRx
13IftRAAq6VS7HWQ07npHeBp1YGuw/+3zjymS4esPoDouhMVeuNpsqqy7Y7JaaZ9
kLHi0FxdFH2qDZ8ATDqGm8UntORH4ugvXt/bphZiEXh6dFINDCIUmFITx/08MJc3
t6myhtWQTGgzGWZ+rlYGLPLOXwhQeYp9xNKt5ddQzRtPWuZxYnkwORr8hPlO8CqE
3XqF1ctf/j6UtQRxZEGLAvvatVlxPEnGxjnVfd7ShavjMvmxhYIAaBS0hg7tbLjx
M9Q3iXn+n+0/XfCteZ05I4wq//HaQ2BUpUfxOp0kBOXB5BukaUk68xBV55PtG/ZT
wfK8jtOV3iHV2np0hbRK3TZvqjpD00qRDOZGRGgPM5V6HmxJCvaLBBTC8S7vrwad
8t+WhXq1XeDVc0qcY3Alo+s3ECOyHsntCAvFywu8iF9unE0lWB6DIW98uOPTXTDM
z+/VPDi+Wk6NY8LM6BqIXmoST5pjlo8FVytGpkwSG3pSGzFW9kj2sylvp8HvGnmf
K0u43d5oeTSUvHUH5c5vtSwRgVM4Hcnm4w+tzdnY8rpZiVfuzg0iIVAShPJ1i4Qv
P2Cw+4+G+sklV9HfYGSQcS203B+qYZfDQ5GqtzA9Pxx2gks2Qokm6mHIAVmlKqEY
HZC5Dfplq5vLoHuyuS5mPvAC/EgsOjRnTK5qw9j7vCvdheWfosg=
=Ft39
-----END PGP SIGNATURE-----
Merge tag 'pwrseq-initial-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into HEAD
Initial implementation of the power sequencing subsystem for linux v6.11
The same name is set when allocating the netdevice structure in the
alloc_etherdev_mq()->alloc_etherrdev_mqs() function. Therefore, there
is no need to manually set it.
This fixes CheckPatch warnings:
WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
strcpy(dev->name, "eth%d");
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://patch.msgid.link/20240713170920.863171-1-olek2@wp.pl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Pawel Dembicki says:
====================
net: dsa: vsc73xx: Implement VLAN operations
This patch series is a result of splitting a larger patch series [0],
where some parts was merged before.
The first patch implements port state configuration, which is required
for bridge functionality. STP frames are not forwarded at this moment.
BPDU frames are only forwarded from/to the PI/SI interface.
For more information, see chapter 2.7.1 (CPU Forwarding) in the
datasheet.
Patches 2, 7-9 and 11 provide a basic implementation of tag_8021q
functionality with QinQ support, without VLAN filtering in
the bridge and simple VLAN awareness in VLAN filtering mode.
Patches 3-6 came from Vladimir Oltean. They prepare for making
tag8021q more common. VSC73XX uses very similar tag recognition,
and some code from tag_sja1105 could be moved to tag_8021q for
common use.
Patch 10 is preparation for use tag_8021q bridge functions as generic
implementation of the 'ds->ops->port_bridge_*()'.
Patch 12 is required to avoid problem with learning on standalone ports.
[0] https://patchwork.kernel.org/project/netdevbpf/list/?series=841034&state=%2A&archive=both
====================
Link: https://patch.msgid.link/20240713211620.1125910-1-paweldembicki@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This patch implements .port_pre_bridge_flags() and .port_bridge_flags(),
which are required for properly treating the BR_LEARNING flag. Also,
.port_stp_state_set() is tweaked and now disables learning for standalone
ports.
Disabling learning for standalone ports is required to avoid situations
where one port sees traffic originating from another, which could cause
packet drops.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20240713211620.1125910-13-paweldembicki@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This patch adds bridge support for the vsc73xx driver.
The vsc73xx requires minimal operations and ithe generic
dsa_tag_8021q_bridge_* API is sufficient.
The forwarding matrix is managed by vsc73xx_port_stp_state_set() ->
vsc73xx_refresh_fwd_map()i routine, which is called immediately after
.port_bridge_join() and .port_bridge_leave().
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://patch.msgid.link/20240713211620.1125910-12-paweldembicki@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
The 'dsa_tag_8021q_bridge_join' could be used as a generic implementation
of the 'ds->ops->port_bridge_join()' function. However, it is necessary
to synchronize their arguments.
This patch also moves the 'tx_fwd_offload' flag configuration line into
'dsa_tag_8021q_bridge_join' body. Currently, every (sja1105) driver sets
it, and the future vsc73xx implementation will also need it for
simplification.
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20240713211620.1125910-11-paweldembicki@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Max number of bridges in tag8021q implementation is strictly limited
by VBID size: 3 bits. But zero is reserved and only 7 values can be used.
This patch adds define which describe maximum possible value.
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20240713211620.1125910-10-paweldembicki@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>