Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soundwire: bus: add more details to track failed transfers

The current error log does not provide details on the type of
transfers and which address/count was requested. All this information
can help locate in which parts of the configuration process an error
occurred.

Co-developed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20210115053738.22630-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Bard Liao and committed by
Vinod Koul
ec475187 6f206833

+4 -2
+4 -2
drivers/soundwire/bus.c
··· 267 267 268 268 ret = do_transfer(bus, msg); 269 269 if (ret != 0 && ret != -ENODATA) 270 - dev_err(bus->dev, "trf on Slave %d failed:%d\n", 271 - msg->dev_num, ret); 270 + dev_err(bus->dev, "trf on Slave %d failed:%d %s addr %x count %d\n", 271 + msg->dev_num, ret, 272 + (msg->flags & SDW_MSG_FLAG_WRITE) ? "write" : "read", 273 + msg->addr, msg->len); 272 274 273 275 if (msg->page) 274 276 sdw_reset_page(bus, msg->dev_num);