[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<DM6PR12MB45161C82F43B67AD8EDB950BD87C2@DM6PR12MB4516.namprd12.prod.outlook.com>
Date: Wed, 31 Jan 2024 15:48:47 +0000
From: Danielle Ratson <danieller@...dia.com>
To: Andrew Lunn <andrew@...n.ch>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "davem@...emloft.net"
<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"corbet@....net" <corbet@....net>, "linux@...linux.org.uk"
<linux@...linux.org.uk>, "sdf@...gle.com" <sdf@...gle.com>,
"kory.maincent@...tlin.com" <kory.maincent@...tlin.com>,
"maxime.chevallier@...tlin.com" <maxime.chevallier@...tlin.com>,
"vladimir.oltean@....com" <vladimir.oltean@....com>,
"przemyslaw.kitszel@...el.com" <przemyslaw.kitszel@...el.com>,
"ahmed.zaki@...el.com" <ahmed.zaki@...el.com>, "richardcochran@...il.com"
<richardcochran@...il.com>, "shayagr@...zon.com" <shayagr@...zon.com>,
"paul.greenwalt@...el.com" <paul.greenwalt@...el.com>, "jiri@...nulli.us"
<jiri@...nulli.us>, "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, mlxsw
<mlxsw@...dia.com>, Petr Machata <petrm@...dia.com>, Ido Schimmel
<idosch@...dia.com>
Subject: RE: [RFC PATCH net-next 9/9] ethtool: Add ability to flash
transceiver modules' firmware
> Subject: Re: [RFC PATCH net-next 9/9] ethtool: Add ability to flash transceiver
> modules' firmware
>
> > +static int
> > +module_flash_fw_schedule(struct net_device *dev,
> > + struct ethtool_module_fw_flash_params *params,
> > + struct netlink_ext_ack *extack)
> > +{
> > + const struct ethtool_ops *ops = dev->ethtool_ops;
> > + struct ethtool_module_fw_flash *module_fw;
> > + int err;
> > +
> > + if (!ops->set_module_eeprom_by_page ||
> > + !ops->get_module_eeprom_by_page) {
> > + NL_SET_ERR_MSG(extack,
> > + "Flashing module firmware is not supported by
> this device");
> > + return -EOPNOTSUPP;
> > + }
> > +
> > + if (dev->module_fw_flash_in_progress) {
> > + NL_SET_ERR_MSG(extack, "Module firmware flashing already
> in progress");
> > + return -EBUSY;
> > + }
> > +
> > + module_fw = kzalloc(sizeof(*module_fw), GFP_KERNEL);
> > + if (!module_fw)
> > + return -ENOMEM;
> > +
> > + module_fw->params = *params;
> > + err = request_firmware(&module_fw->fw, module_fw-
> >params.file_name,
> > + &dev->dev);
>
> How big are these firmware blobs?
>
> Ideally we want to be able to use the same API to upgrade things like GPON
> modules, which often run an openwrt image, and they are plugged into a cable
> modem which does not have too much RAM.
>
> Given that the interface to the EEPROM is using 128 byte 1/2 pages, would it
> be possible to use request_partial_firmware_into_buf() to read it on demand,
> rather than all at once?
>
> Andrew
OK, Ill handle that in the actual version.
Thanks.
Powered by blists - more mailing lists