RFC: "failed to get pending recv messages: -125"

Steve deRosier derosier at gmail.com
Tue Nov 17 14:02:51 PST 2015


In discussing my GPIO addition patch, a hard-set delay I put in to
avoid a spurious message was noticed and it was suggested I instead
sync up with the IRQ to be able to avoid the message.

I've been looking at the code and I'm not sure that syncing up is
correct - in that the driver is already in the process of shutting
down and the error number returned by the message is ECANCELED...
which seems perfectly appropriate for the condition and the thread of
code I've followed.

It gets ECANCELED (because indeed the messages are being cancled due
to shutdown), spits out the error message and then proceedes to
cleanup.

I'm thinking that spitting the message out as an error might not be
best. Instead I propose that we only spit out the message if the
status code isn't ECANCELED, otherwise take it as appropriate and
continue with our cleanup.

Like:
diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c
b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
index fffb65b..b60e36f 100644
--- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c
+++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
@@ -2222,7 +2222,8 @@ int ath6kl_htc_rxmsg_pending_handler(struct
htc_target *target,
  }

  if (status) {
- ath6kl_err("failed to get pending recv messages: %d\n",
+ if (status != -ECANCELED)
+ ath6kl_err("failed to get pending recv messages: %d\n",
    status);

  /* cleanup any packets in sync completion queue */

Thoughts?  Anyone see a problem with this?

It's a better solution than a 300 msec delay and it seems "right".

- Steve



More information about the ath6kl mailing list