Skip to content

Commit

Permalink
wlcore: Fix regression in wlcore_set_partition()
Browse files Browse the repository at this point in the history
The commit 3719c17 ("wlcore/wl18xx: fw logger over sdio") introduced a
regression causing the wlcore to time out and go into recovery. Reverting the
changes regarding write of the last partition size brings the module back to
it's functional state.

Fixes: 3719c17 ("wlcore/wl18xx: fw logger over sdio")
Reported-by: Ross Green <rgkernel@gmail.com>
Signed-off-by: Emil Goode <emil.fsw@goode.io>
[kvalo@codeaurora.org: improved commit log]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Emil Goode authored and Kalle Valo committed Feb 12, 2016
1 parent d76d65f commit fb724ed
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions drivers/net/wireless/ti/wlcore/io.c
Original file line number Diff line number Diff line change
@@ -175,14 +175,14 @@ int wlcore_set_partition(struct wl1271 *wl,
if (ret < 0)
goto out;

/* We don't need the size of the last partition, as it is
* automatically calculated based on the total memory size and
* the sizes of the previous partitions.
*/
ret = wlcore_raw_write32(wl, HW_PART3_START_ADDR, p->mem3.start);
if (ret < 0)
goto out;

ret = wlcore_raw_write32(wl, HW_PART3_SIZE_ADDR, p->mem3.size);
if (ret < 0)
goto out;

out:
return ret;
}
4 changes: 2 additions & 2 deletions drivers/net/wireless/ti/wlcore/io.h
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@
#define HW_PART1_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 12)
#define HW_PART2_SIZE_ADDR (HW_PARTITION_REGISTERS_ADDR + 16)
#define HW_PART2_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 20)
#define HW_PART3_SIZE_ADDR (HW_PARTITION_REGISTERS_ADDR + 24)
#define HW_PART3_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 28)
#define HW_PART3_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 24)

#define HW_ACCESS_REGISTER_SIZE 4

#define HW_ACCESS_PRAM_MAX_RANGE 0x3c000

0 comments on commit fb724ed

Please sign in to comment.