Date: Sat, 10 Dec 2011 00:59:38 +0530 From: Naresh <gbal.naresh@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org> Subject: Re: Firmware upgrade for CNA Message-ID: <BC7F085F-7B4A-4FF0-AD3C-36147B4AA233@gmail.com> In-Reply-To: <201112090749.07012.jhb@freebsd.org> References: <9E03496F-B9A3-499E-9C50-9F0D1EC6FF4F@gmail.com> <201112090749.07012.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks John. Sent from my iPhone On 09-Dec-2011, at 6:19 PM, John Baldwin <jhb@freebsd.org> wrote: > On Sunday, December 04, 2011 1:04:12 pm Naresh wrote: >> Hi All, >>=20 >> Our product is a CNA i.e it supports both 10G Ethernet and Storage. We ne= ed to provide firmware upgrade facility through our FreeBSD nic driver. >>=20 >> The driver should be able to flash any version of the firmware when provi= ded. >>=20 >> Asuuming driver is already loaded flashing steps should be something like= =20 >> 1) User will invoke flashing by providing the image name and file path. >> 2) Driver should load the image from the path and start flashing. >> 3) Return the flashing status to the user. >>=20 >> I looked into load_firmware FreeBSD mechanism. But it requires image to b= e=20 >> converted to loadable module, load image module and then invoke driver us= ing sysctl to start flashing.=20 >>=20 >> Is there any standard way other than load_firmware ? Can we open and read= a file in the driver? >>=20 >> In Linux, we copy the image to /lib/firmware and invoke flashing using so= mething like "ethtool -f eth0 image".=20 >> Then kernel loads the image file from=20 >> /lib/firmware to a data buffer and invokes the driver. The driver then fl= ashes and return status. >>=20 >> Is there a approach in FreeBSD something similar to Linux ? >=20 > There is not a framework along those lines, no. However, you could provid= e an > ioctl which accepts a data buffer and have a small userland utility that t= akes > the filename as an argument, loads it into a local buffer, then invokes yo= ur > ioctl. >=20 > --=20 > John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BC7F085F-7B4A-4FF0-AD3C-36147B4AA233>