[rfc patch] libertas: fix if_spi_prog_helper_firmware()

Colin McCabe cmccabe at alumni.cmu.edu
Thu Aug 26 13:04:45 EDT 2010


On Wed, Aug 25, 2010 at 8:37 PM, Ben Hutchings <ben at decadent.org.uk> wrote:
> On Wed, 2010-08-25 at 20:26 -0700, Colin McCabe wrote:
>> On Tue, Aug 24, 2010 at 5:15 AM, Ben Hutchings <ben at decadent.org.uk> wrote:
>> > On Tue, 2010-08-24 at 14:07 +0200, Dan Carpenter wrote:
>> >> The indenting is not correct here.  I don't have this hardware and I'm
>> >> just guessing as to what was intended.  I think that if there is an
>> >> error we should return an error code, but if there isn't an error we
>> >> should return success directly without releasing the firmware.
>> > [...]
>> >
>> > The driver doesn't use or refer to the firmware image once it's copied
>> > into device RAM, so this just leaks the firmware.
>> >
>> > The driver *should* keep a reference so it can restore the firmware
>> > after suspend/resume without filesystem access (which is likely to
>> > deadlock).
>>
>> Well, if all you want to do is put the device into "deep sleep" mode,
>> you will not need a firmware reload after waking it up.
> [...]
>
> I was thinking of system suspend/resume, which could remove all power
> from the device.
>

Ok, that makes sense.

Colin



More information about the libertas-dev mailing list