Search Linux Wireless

Re: [PATCH] libertas: fix CF firmware loading

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

 



> From: Ryan Mallon <ryan@xxxxxxxxxxxxxxxx>
>
> Change the return value of if_cs_poll_while_fw_download to
> zero on success, so that the firmware loading functions also
> correctly return zero on success.
>
> Signed-off-by: Ryan Mallon <ryan@xxxxxxxxxxxxxxxx>
> Acked-by: Dan Williams <dcbw@xxxxxxxxxx>

The patch is ok, but the description is wrong.

The function is supposed to return some error back, which is 
negative, e.g. -ETIME. And callers test for (ret < 0) to find 
out about the error condition. See here:

ret = if_cs_poll_while_fw_download(card, IF_CS_C_SQ_READ_LOW, 
IF_CS_C_SQ_HELPER_OK)
if (ret < 0) {

ret = if_cs_poll_while_fw_download(card, IF_CS_C_STATUS,
                        IF_CS_C_S_CMD_DNLD_RDY);
if (ret < 0) {


ret = if_cs_poll_while_fw_download(card, IF_CS_SCRATCH, 0x5a);
if (ret < 0) {

... and so on.

That the function now returns "i", the number of iterations, is a 
remnant of old debug code, that showed me how many 
wait-iterations where needed.


So, from my point of view, the patch is completely unneeded, yet 
harmless.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux