From: Jaswinder Singh <jaswinder@infradead.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: LKML <linux-kernel@vger.kernel.org>,
David Woodhouse <dwmw2@infradead.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
kernel-janitors <kernel-janitors@vger.kernel.org>,
kernelnewbies <kernelnewbies@nl.linux.org>,
linux-scsi@vger.kernel.org, hch@infradead.org
Subject: Re: [PATCH] advansys: use request_firmware
Date: Sat, 12 Jul 2008 22:39:08 +0530 [thread overview]
Message-ID: <1215882548.19076.57.camel@jaswinder.satnam> (raw)
In-Reply-To: <20080712162921.GZ14894@parisc-linux.org>
Hello Mattew,
On Sat, 2008-07-12 at 10:29 -0600, Matthew Wilcox wrote:
> > + if (AscLoadMicroCode(iop_base, 0, &fw->data[4],
> > + fw->size - 4) != chksum) {
> > asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
> > return warn_code;
> > }
> > + release_firmware(fw);
>
Sorry, It should be :-
+ if (AscLoadMicroCode(iop_base, 0, &fw->data[4],
+ fw->size - 4) != chksum) {
asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
+ release_firmware(fw);
return warn_code;
}
+ release_firmware(fw);
warn_code |= AscInitMicroCodeVar(asc_dvc);
You can get updated patch from
http://git.infradead.org/users/jaswinder/firm-jsr-2.6.git
This is first draft, final patch will available at David's firmware tree
http://git.infradead.org/users/dwmw2/firmware-2.6.git
> You're calling release_firmware() here. I don't know if that actually
> frees the firmware when it's built-in, but if it does, then freeing the
> firmware could cause the chip to stop working if it gets reset before
> userspace is up.
Normally release_firmware will be called after loading microcode.
Even it gets reset then It will again call request_firmware and load
firmware and then frees after loading microcode.
Logically it will work same as microcode_buffer say _adv_asc3550_buf[]
when you need to load microcode you just read from _adv_asc3550_buf[]
and load it. And if reset occurs you again read from _adv_asc3550_buf[]
and then load microcode, but you keep _adv_asc3550_buf[] all the time
in memory.
In our case we just request_firmware when need to load microcode and
release_firmware after loading. So we frees the memory after loading
microcode.
So it will not stop the chip from working.
> If it is OK to call release_firmware here, then the error path is
> missing a release_firmware() call.
>
Fixed. Thanks.
If you still have some doubts, please let me know.
Thank you,
Jaswinder Singh.
next prev parent reply other threads:[~2008-07-12 17:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 9:58 Jaswinder Singh
2008-07-12 16:29 ` Matthew Wilcox
2008-07-12 17:09 ` Jaswinder Singh [this message]
2008-07-14 14:50 ` Matthew Wilcox
2008-07-14 14:56 ` David Woodhouse
2008-07-14 15:15 ` Matthew Wilcox
2008-07-14 15:22 ` David Woodhouse
2008-12-20 15:25 Jaswinder Singh
2008-12-20 15:32 ` Matthew Wilcox
2008-12-20 16:02 ` Jaswinder Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1215882548.19076.57.camel@jaswinder.satnam \
--to=jaswinder@infradead.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dwmw2@infradead.org \
--cc=hch@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®