Linux-SCSI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] scsi: fnic: use eth_broadcast_addr() to assign broadcast address
@ 2020-07-20  8:24 linmiaohe
  2020-07-25  2:50 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: linmiaohe @ 2020-07-20  8:24 UTC (permalink / raw)
  To: satishkh, sebaddel, kartilak, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, linmiaohe

From: Miaohe Lin <linmiaohe@huawei.com>

Use eth_broadcast_addr() to assign broadcast address insetad of memset().

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 drivers/scsi/fnic/fnic_scsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 27535c90b248..03b1805b106c 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -23,6 +23,7 @@
 #include <linux/scatterlist.h>
 #include <linux/skbuff.h>
 #include <linux/spinlock.h>
+#include <linux/etherdevice.h>
 #include <linux/if_ether.h>
 #include <linux/if_vlan.h>
 #include <linux/delay.h>
@@ -275,7 +276,7 @@ int fnic_flogi_reg_handler(struct fnic *fnic, u32 fc_id)
 	}
 
 	if (fnic->ctlr.map_dest) {
-		memset(gw_mac, 0xff, ETH_ALEN);
+		eth_broadcast_addr(gw_mac);
 		format = FCPIO_FLOGI_REG_DEF_DEST;
 	} else {
 		memcpy(gw_mac, fnic->ctlr.dest_addr, ETH_ALEN);
-- 
2.19.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: fnic: use eth_broadcast_addr() to assign broadcast address
  2020-07-20  8:24 [PATCH] scsi: fnic: use eth_broadcast_addr() to assign broadcast address linmiaohe
@ 2020-07-25  2:50 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-07-25  2:50 UTC (permalink / raw)
  To: linmiaohe, kartilak, satishkh, sebaddel, jejb
  Cc: Martin K . Petersen, linux-kernel, linux-scsi

On Mon, 20 Jul 2020 16:24:58 +0800, linmiaohe wrote:

> Use eth_broadcast_addr() to assign broadcast address insetad of memset().

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: fnic: Use eth_broadcast_addr() to assign broadcast address
      https://git.kernel.org/mkp/scsi/c/51d263cbdd76

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  8:24 [PATCH] scsi: fnic: use eth_broadcast_addr() to assign broadcast address linmiaohe
2020-07-25  2:50 ` Martin K. Petersen

Linux-SCSI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-scsi/0 linux-scsi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-scsi linux-scsi/ https://lore.kernel.org/linux-scsi \
		linux-scsi@vger.kernel.org
	public-inbox-index linux-scsi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-scsi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git