Search Linux Wireless

Re: [PATCH] wifi: wilc1000: Add proper error handling for remaining CMD52

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/22/24 11:11 AM, Alexis Lothoré wrote:

Hi,

diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
index 5262c8846c13d..170470d1c2092 100644
--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
+++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
@@ -769,8 +769,10 @@ static int wilc_sdio_init(struct wilc *wilc, bool resume)
static int wilc_sdio_read_size(struct wilc *wilc, u32 *size)
  {
-	u32 tmp;
+	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
  	struct sdio_cmd52 cmd;
+	u32 tmp;
+	int ret;
/**
  	 *      Read DMA count in words
@@ -780,12 +782,20 @@ static int wilc_sdio_read_size(struct wilc *wilc, u32 *size)
  	cmd.raw = 0;
  	cmd.address = WILC_SDIO_INTERRUPT_DATA_SZ_REG;
  	cmd.data = 0;
-	wilc_sdio_cmd52(wilc, &cmd);
+	ret = wilc_sdio_cmd52(wilc, &cmd);
+	if (ret) {
+		dev_err(&func->dev, "Fail cmd 52, set DATA_SZ[0] register...\n");

I don't get the log message, why "set" DATA_SZ[0] ? This helper is rather trying
to read it. Same for the other logs added below
Fixed in V2 , s@set@get@ , thanks !




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux