From: Paul Menzel <pmenzel@molgen.mpg.de> To: lixue liang <lianglixue@greatwall.com.cn> Cc: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, kuba@kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: Re: [Intel-wired-lan] [PATCH v2 2/2] igb_main: Assign random MAC address instead of fail in case of invalid one Date: Thu, 12 May 2022 15:55:53 +0200 [thread overview] Message-ID: <d50b23b1-38b5-2522-cbf4-c360c0ed05cd@molgen.mpg.de> (raw) In-Reply-To: <20220512093918.86084-1-lianglixue@greatwall.com.cn> Dear Lixue, Thank you for sending version 2. Some more minor nits. Am 12.05.22 um 11:39 schrieb lixue liang: > In some cases, when the user uses igb_set_eeprom to modify the MAC > address to be invalid, the igb driver will fail to load. If there is no > network card device, the user must modify it to a valid MAC address by > other means. > > Since the MAC address can be modified ,then add a random valid MAC address > to replace the invalid MAC address in the driver can be workable, it can > continue to finish the loading ,and output the relevant log reminder. Please add the space after the comma. > Reported-by: kernel test robot <lkp@intel.com> This line is confusing. Maybe add that to the version change-log below the `---`. > Signed-off-by: lixue liang <lianglixue@greatwall.com.cn> > --- > drivers/net/ethernet/intel/igb/igb_main.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > index a513570c2ad6..746233befade 100644 > --- a/drivers/net/ethernet/intel/igb/igb_main.c > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > @@ -3359,10 +3359,10 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > eth_hw_addr_set(netdev, hw->mac.addr); > > if (!is_valid_ether_addr(netdev->dev_addr)) { > - eth_random_addr(netdev->dev_addr); > - memcpy(hw->mac.addr, netdev->dev_addr, netdev->addr_len); > - dev_info(&pdev->dev, > - "Invalid Mac Address, already got random Mac Address\n"); > + eth_hw_addr_random(netdev); > + ether_addr_copy(hw->mac.addr, netdev->dev_addr); > + dev_err(&pdev->dev, > + "Invalid MAC Address, already assigned random MAC Address\n"); Please spell it MAC address. > } > > igb_set_default_mac_filter(adapter); Kind regards, Paul
WARNING: multiple messages have this Message-ID (diff)
From: Paul Menzel <pmenzel@molgen.mpg.de> To: intel-wired-lan@osuosl.org Subject: [Intel-wired-lan] [PATCH v2 2/2] igb_main: Assign random MAC address instead of fail in case of invalid one Date: Thu, 12 May 2022 15:55:53 +0200 [thread overview] Message-ID: <d50b23b1-38b5-2522-cbf4-c360c0ed05cd@molgen.mpg.de> (raw) In-Reply-To: <20220512093918.86084-1-lianglixue@greatwall.com.cn> Dear Lixue, Thank you for sending version 2. Some more minor nits. Am 12.05.22 um 11:39 schrieb lixue liang: > In some cases, when the user uses igb_set_eeprom to modify the MAC > address to be invalid, the igb driver will fail to load. If there is no > network card device, the user must modify it to a valid MAC address by > other means. > > Since the MAC address can be modified ,then add a random valid MAC address > to replace the invalid MAC address in the driver can be workable, it can > continue to finish the loading ,and output the relevant log reminder. Please add the space after the comma. > Reported-by: kernel test robot <lkp@intel.com> This line is confusing. Maybe add that to the version change-log below the `---`. > Signed-off-by: lixue liang <lianglixue@greatwall.com.cn> > --- > drivers/net/ethernet/intel/igb/igb_main.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > index a513570c2ad6..746233befade 100644 > --- a/drivers/net/ethernet/intel/igb/igb_main.c > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > @@ -3359,10 +3359,10 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > eth_hw_addr_set(netdev, hw->mac.addr); > > if (!is_valid_ether_addr(netdev->dev_addr)) { > - eth_random_addr(netdev->dev_addr); > - memcpy(hw->mac.addr, netdev->dev_addr, netdev->addr_len); > - dev_info(&pdev->dev, > - "Invalid Mac Address, already got random Mac Address\n"); > + eth_hw_addr_random(netdev); > + ether_addr_copy(hw->mac.addr, netdev->dev_addr); > + dev_err(&pdev->dev, > + "Invalid MAC Address, already assigned random MAC Address\n"); Please spell it MAC address. > } > > igb_set_default_mac_filter(adapter); Kind regards, Paul
next prev parent reply other threads:[~2022-05-12 13:56 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-12 9:39 [PATCH v2 2/2] igb_main: Assign random MAC address instead of fail in case of invalid one lixue liang 2022-05-12 9:39 ` [Intel-wired-lan] " lixue liang 2022-05-12 13:55 ` Paul Menzel [this message] 2022-05-12 13:55 ` Paul Menzel 2022-05-13 3:25 ` 梁礼学 2022-05-13 3:47 ` 梁礼学 2022-05-13 5:00 ` lixue liang [not found] ` <DM6PR11MB46576A8E6EBCB81E29FA49DC9BD69@DM6PR11MB4657.namprd11.prod.outlook.com> 2022-05-25 8:30 ` Palczewski, Mateusz 2022-05-30 3:19 ` [PATCH v3 3/3] " Lixue Liang 2022-05-30 3:19 ` [Intel-wired-lan] " Lixue Liang 2022-05-30 7:47 ` Paul Menzel 2022-05-30 7:47 ` [Intel-wired-lan] " Paul Menzel 2022-05-30 10:58 ` [PATCH v3] " Lixue Liang 2022-05-30 10:58 ` [Intel-wired-lan] " Lixue Liang 2022-05-31 20:36 ` Tony Nguyen 2022-05-31 20:36 ` [Intel-wired-lan] " Tony Nguyen
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=d50b23b1-38b5-2522-cbf4-c360c0ed05cd@molgen.mpg.de \ --to=pmenzel@molgen.mpg.de \ --cc=anthony.l.nguyen@intel.com \ --cc=intel-wired-lan@lists.osuosl.org \ --cc=jesse.brandeburg@intel.com \ --cc=kuba@kernel.org \ --cc=lianglixue@greatwall.com.cn \ --cc=netdev@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.