mbox series

[v5,00/11] ieee802154: Better Tx error handling

Message ID 20220406153441.1667375-1-miquel.raynal@bootlin.com (mailing list archive)
Headers show
Series ieee802154: Better Tx error handling | expand

Message

Miquel Raynal April 6, 2022, 3:34 p.m. UTC
The idea here is to provide a fully synchronous Tx API and also be able
to be sure that a transfer has finished. This will be used later by
another series. However, while working on this task, it appeared
necessary to first rework the way MLME errors were (not) propagated to
the upper layers. This small series tries to tackle exactly that, before
introducing the synchronous API.

Changes in v5:
* Introduced a new helper which should be used upon bus errors. We don't
  ask users to provide an error code (which would be misleading) and
  instead forward IEEE802154_SYSTEM_ERROR which is our generic code.
* Dropped most of my changes in the at86rf320 driver in ordre to do
  things a little bit differently:
  - the existing error path is renamed to clearly identify that it
    handles bus errors.
  - trac errors are handled in a separate path and the core helper is
    used to return the trac value.
* Merged the revert commit with the following commit forwarding trac
  errors to the core.

Changes in v4:
* Reverted the at86rf320 patch introducing trac values for debugfs
  purposes as suggested by Alex. Reintroduced some of its content in a
  subsequent patch to filter out offloaded transmission error cases.
* Used IEEE802154_SYSTEM_ERROR as a non specific error code.

Changes in v3:
* Split the series into two parts, this is the "error handling" halve.
* Reworked the error path to not handle the ifs_handling situation
  anymore.
* Enhanced the list of MLME status codes available.
* Improved the error handling by collecting the error codes, somethimes
  by changing device drivers directly to propagate these MLME
  statuses. Then, once in the core, save one global Tx status value so
  that in the case of synchronous transfers we can check the return
  value and eventually error out.
* Prevented the core to stop the device before the end of the last
  transmission to avoid deadlocks by just sync'ing the last Tx
  transfer.

Changes in v2:
* Adapted with the changes already merged/refused.

Miquel Raynal (11):
  net: ieee802154: Enhance/fix the names of the MLME return codes
  net: ieee802154: Fill the list of MLME return codes
  net: mac802154: Save a global error code on transmissions
  net: mac802154: Create a transmit error helper
  net: mac802154: Create a transmit bus error helper
  net: ieee802154: at86rf230: Rename the asynchronous error helper
  net: ieee802154: at86rf230: Call _xmit_bus_error() when a bus error
    occurs
  net: ieee802154: at86rf230: Drop debugfs support
  net: ieee802154: atusb: Call _xmit_error() when a transmission fails
  net: ieee802154: ca8210: Use core return codes instead of hardcoding
    them
  net: ieee802154: ca8210: Call _xmit_error() when a transmission fails

 drivers/net/ieee802154/Kconfig     |   7 --
 drivers/net/ieee802154/at86rf230.c | 154 ++++++------------------
 drivers/net/ieee802154/atusb.c     |   5 +-
 drivers/net/ieee802154/ca8210.c    | 182 +++++++++++------------------
 include/linux/ieee802154.h         |  81 +++++++++++--
 include/net/mac802154.h            |  19 +++
 net/mac802154/ieee802154_i.h       |   2 +
 net/mac802154/util.c               |  26 ++++-
 8 files changed, 225 insertions(+), 251 deletions(-)