Commit d1d81bd0 authored by Oleksandr Khoshaba's avatar Oleksandr Khoshaba Committed by Martin K. Petersen

scsi: qla4xxx: print MAC and SID via %p[mM][R]

In the kernel we have nice specifier to print MAC by given pointer to
the address in a binary form.
Signed-off-by: default avatarOleksandr Khoshaba <Oleksandr.Khoshaba@gmail.com>
Acked-by: default avatarVikas Chaudhary <vikas.chaudhary@qlogic.com>
Cc: QLogic-Storage-Upstream@qlogic.com
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent caf4ebcb
...@@ -2032,10 +2032,7 @@ int qla4xxx_set_param_ddbentry(struct scsi_qla_host *ha, ...@@ -2032,10 +2032,7 @@ int qla4xxx_set_param_ddbentry(struct scsi_qla_host *ha,
ptid = (uint16_t *)&fw_ddb_entry->isid[1]; ptid = (uint16_t *)&fw_ddb_entry->isid[1];
*ptid = cpu_to_le16((uint16_t)ddb_entry->sess->target_id); *ptid = cpu_to_le16((uint16_t)ddb_entry->sess->target_id);
DEBUG2(ql4_printk(KERN_INFO, ha, "ISID [%02x%02x%02x%02x%02x%02x]\n", DEBUG2(ql4_printk(KERN_INFO, ha, "ISID [%pmR]\n", fw_ddb_entry->isid));
fw_ddb_entry->isid[5], fw_ddb_entry->isid[4],
fw_ddb_entry->isid[3], fw_ddb_entry->isid[2],
fw_ddb_entry->isid[1], fw_ddb_entry->isid[0]));
iscsi_opts = le16_to_cpu(fw_ddb_entry->iscsi_options); iscsi_opts = le16_to_cpu(fw_ddb_entry->iscsi_options);
memset(fw_ddb_entry->iscsi_alias, 0, sizeof(fw_ddb_entry->iscsi_alias)); memset(fw_ddb_entry->iscsi_alias, 0, sizeof(fw_ddb_entry->iscsi_alias));
......
...@@ -4094,12 +4094,8 @@ int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha) ...@@ -4094,12 +4094,8 @@ int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha)
ha->phy_port_num = sys_info->port_num; ha->phy_port_num = sys_info->port_num;
ha->iscsi_pci_func_cnt = sys_info->iscsi_pci_func_cnt; ha->iscsi_pci_func_cnt = sys_info->iscsi_pci_func_cnt;
DEBUG2(printk("scsi%ld: %s: " DEBUG2(printk("scsi%ld: %s: mac %pM serial %s\n",
"mac %02x:%02x:%02x:%02x:%02x:%02x " ha->host_no, __func__, ha->my_mac, ha->serial_number));
"serial %s\n", ha->host_no, __func__,
ha->my_mac[0], ha->my_mac[1], ha->my_mac[2],
ha->my_mac[3], ha->my_mac[4], ha->my_mac[5],
ha->serial_number));
status = QLA_SUCCESS; status = QLA_SUCCESS;
......
...@@ -6304,13 +6304,9 @@ static int qla4xxx_compare_tuple_ddb(struct scsi_qla_host *ha, ...@@ -6304,13 +6304,9 @@ static int qla4xxx_compare_tuple_ddb(struct scsi_qla_host *ha,
* ISID would not match firmware generated ISID. * ISID would not match firmware generated ISID.
*/ */
if (is_isid_compare) { if (is_isid_compare) {
DEBUG2(ql4_printk(KERN_INFO, ha, "%s: old ISID [%02x%02x%02x" DEBUG2(ql4_printk(KERN_INFO, ha,
"%02x%02x%02x] New ISID [%02x%02x%02x%02x%02x%02x]\n", "%s: old ISID [%pmR] New ISID [%pmR]\n",
__func__, old_tddb->isid[5], old_tddb->isid[4], __func__, old_tddb->isid, new_tddb->isid));
old_tddb->isid[3], old_tddb->isid[2], old_tddb->isid[1],
old_tddb->isid[0], new_tddb->isid[5], new_tddb->isid[4],
new_tddb->isid[3], new_tddb->isid[2], new_tddb->isid[1],
new_tddb->isid[0]));
if (memcmp(&old_tddb->isid[0], &new_tddb->isid[0], if (memcmp(&old_tddb->isid[0], &new_tddb->isid[0],
sizeof(old_tddb->isid))) sizeof(old_tddb->isid)))
...@@ -7925,10 +7921,7 @@ qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess, ...@@ -7925,10 +7921,7 @@ qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess,
rc = sprintf(buf, "%u\n", fnode_conn->keepalive_timeout); rc = sprintf(buf, "%u\n", fnode_conn->keepalive_timeout);
break; break;
case ISCSI_FLASHNODE_ISID: case ISCSI_FLASHNODE_ISID:
rc = sprintf(buf, "%02x%02x%02x%02x%02x%02x\n", rc = sprintf(buf, "%pm\n", fnode_sess->isid);
fnode_sess->isid[0], fnode_sess->isid[1],
fnode_sess->isid[2], fnode_sess->isid[3],
fnode_sess->isid[4], fnode_sess->isid[5]);
break; break;
case ISCSI_FLASHNODE_TSID: case ISCSI_FLASHNODE_TSID:
rc = sprintf(buf, "%u\n", fnode_sess->tsid); rc = sprintf(buf, "%u\n", fnode_sess->tsid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment