diff options
author | Jayamohan Kallickal <jayamohank@gmail.com> | 2013-09-28 15:35:40 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-10-25 09:58:04 +0100 |
commit | 6c83185a72e5a00a927c324e72f7341590a30f2b (patch) | |
tree | e86b8f2fc7a612995623cd4367720e2052ab82ca /drivers/scsi/be2iscsi/be_iscsi.c | |
parent | e074d20f9bce54f64dcb43eb2772fde4a4d68171 (diff) |
[SCSI] be2iscsi: Fix repeated issue of MAC ADDR get IOCTL
Storing MAC ADDR of each function in it's priv structure to
avoid issuing MAC_ADDR get IOCTL. Based on a flag set/unset
it's decided if MAC_ADDR is stored in priv structure or IOCTL
needs to be issued.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_iscsi.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_iscsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index ef36be003f67..2496ea7dab78 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -840,7 +840,7 @@ int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba) struct be_cmd_get_nic_conf_resp resp; int rc; - if (strlen(phba->mac_address)) + if (phba->mac_addr_set) return sysfs_format_mac(buf, phba->mac_address, ETH_ALEN); memset(&resp, 0, sizeof(resp)); @@ -848,6 +848,7 @@ int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba) if (rc) return rc; + phba->mac_addr_set = true; memcpy(phba->mac_address, resp.mac_address, ETH_ALEN); return sysfs_format_mac(buf, phba->mac_address, ETH_ALEN); } |