Search Linux Wireless

Re: [PATCH 2/4] brcmfmac: get RAM info right before downloading PCIe firmware

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

 



On 2/26/2019 2:11 PM, Rafał Miłecki wrote:
From: Rafał Miłecki <rafal@xxxxxxxxxx>

It's important as brcmf_chip_get_raminfo() also makes sure that memory
is properly setup. Without it the firmware could report invalid RAM
address like 0x04000001.

During a normal brcmfmac lifetime brcmf_chip_get_raminfo() is called on
probe by the brcmf_chip_recognition(). This change allows implementing
further improvements like handling errors by resetting a device with
the brcmf_pcie_reset_device() and redownloading a firmware afterwards.

Thanks, Rafał

How about avoiding the ramsize adjustment in redownloading scenario. We could add a reinit field in devinfo and check that.

	/* Some of the firmwares have the size of the memory of the device
	 * defined inside the firmware. This is because part of the memory in
	 * the device is shared and the devision is determined by FW. Parse
	 * the firmware and adjust the chip memory size now.
	 */
	if (!devinfo->reinit)
		brcmf_pcie_adjust_ramsize(devinfo, (u8 *)fw->data, fw->size);

Regards,
Arend

Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
---
  drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 6 ++++--
  drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h | 1 +
  drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 6 ++++++
  3 files changed, 11 insertions(+), 2 deletions(-)





[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