soundwire: cadence_master: log Slave status mask on errors
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 22 May 2019 19:47:27 +0000 (14:47 -0500)
committerVinod Koul <vkoul@kernel.org>
Mon, 27 May 2019 05:23:00 +0000 (10:53 +0530)
The Slave status mask exposes 4 sticky bits. When the device loses
sync, the IP will report two status but the log will only show that
the device lost sync. The status mask has all the information needed
so let's report it instead.

Also change the resolution of the mask, using 64 bits is not needed
when you need 4.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/cadence_master.c

index e3b78768886b53b6da709921bd3fd6a33f87c4cd..d76dd24a6eaeaddf66a1b14a73a571eddec1e2e0 100644 (file)
@@ -487,7 +487,8 @@ static int cdns_update_slave_status(struct sdw_cdns *cdns,
 {
        enum sdw_slave_status status[SDW_MAX_DEVICES + 1];
        bool is_slave = false;
-       u64 slave, mask;
+       u64 slave;
+       u32 mask;
        int i, set_status;
 
        /* combine the two status */
@@ -527,7 +528,7 @@ static int cdns_update_slave_status(struct sdw_cdns *cdns,
                if (set_status > 1) {
                        dev_warn_ratelimited(cdns->dev,
                                             "Slave reported multiple Status: %d\n",
-                                            status[i]);
+                                            mask);
                        /*
                         * TODO: we need to reread the status here by
                         * issuing a PING cmd