> -----Original Message----- > From: David Miller <da...@davemloft.net> > Sent: Monday, July 29, 2019 11:34 PM > To: Sudarsana Reddy Kalluru <skall...@marvell.com> > Cc: netdev@vger.kernel.org; Michal Kalderon <mkalde...@marvell.com>; > Ariel Elior <ael...@marvell.com> > Subject: Re: [PATCH net-next v3 2/2] qed: Add driver API for flashing the > config attributes. > > From: Sudarsana Reddy Kalluru <skall...@marvell.com> > Date: Sat, 27 Jul 2019 18:55:49 -0700 > > > @@ -2268,6 +2330,9 @@ static int qed_nvm_flash(struct qed_dev *cdev, > const char *name) > > rc = qed_nvm_flash_image_access(cdev, &data, > > &check_resp); > > break; > > + case QED_NVM_FLASH_CMD_NVM_CFG_ID: > > + rc = qed_nvm_flash_cfg_write(cdev, &data); > > + break;
> > default: > > DP_ERR(cdev, "Unknown command %08x\n", > cmd_type); > > I don't see how any existing portable interface can cause this new code to > actually be used. > > You have to explain this to me. The API qed_nvm_flash() is used to flash the user provided data (e.g., Management FW) to the required partitions of the adapter. - Format of the input file would be - file signature info, followed by one or more data sets. - Each data set is represented with the header followed by its contents. Header captures info such as command name (e.g., FILE_START), data size etc., which specifies how to handle the data. The API qed_nvm_flash() validates the user provided input file, parses the data sets and handles each accordingly. Here one of the data sets (preferably the last one) could be nvm-attributes page (with cmd-id = QED_NVM_FLASH_CMD_NVM_CHANGE).