diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2016-10-22 13:32:27 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-08 17:29:57 -0500 |
commit | caf4ebcbe7fda6cb96cdf64d4dd624356c03e437 (patch) | |
tree | cde8649e794eb29b4b39d57371b786aafe3d6665 /drivers/message/fusion | |
parent | 36fe90b0f0bdc9d030e88ba2153f3c8d6b6a5964 (diff) |
scsi: fusion: print lan address via %pMR
LAN MAC addresses can be printed directly using %pMR specifier.
Cc: Sathya Prakash <sathya.prakash@broadcom.com>
Cc: Chaitra P B <chaitra.basappa@broadcom.com>
Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 89c7ed16b4df..f82745c6cdf7 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -2585,10 +2585,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) | |||
2585 | (void) GetLanConfigPages(ioc); | 2585 | (void) GetLanConfigPages(ioc); |
2586 | a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; | 2586 | a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; |
2587 | dprintk(ioc, printk(MYIOC_s_DEBUG_FMT | 2587 | dprintk(ioc, printk(MYIOC_s_DEBUG_FMT |
2588 | "LanAddr = %02X:%02X:%02X" | 2588 | "LanAddr = %pMR\n", ioc->name, a)); |
2589 | ":%02X:%02X:%02X\n", | ||
2590 | ioc->name, a[5], a[4], | ||
2591 | a[3], a[2], a[1], a[0])); | ||
2592 | } | 2589 | } |
2593 | break; | 2590 | break; |
2594 | 2591 | ||
@@ -6783,8 +6780,7 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v) | |||
6783 | if (ioc->bus_type == FC) { | 6780 | if (ioc->bus_type == FC) { |
6784 | if (ioc->pfacts[p].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) { | 6781 | if (ioc->pfacts[p].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) { |
6785 | u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; | 6782 | u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; |
6786 | seq_printf(m, " LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n", | 6783 | seq_printf(m, " LanAddr = %pMR\n", a); |
6787 | a[5], a[4], a[3], a[2], a[1], a[0]); | ||
6788 | } | 6784 | } |
6789 | seq_printf(m, " WWN = %08X%08X:%08X%08X\n", | 6785 | seq_printf(m, " WWN = %08X%08X:%08X%08X\n", |
6790 | ioc->fc_port_page0[p].WWNN.High, | 6786 | ioc->fc_port_page0[p].WWNN.High, |
@@ -6861,8 +6857,7 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh | |||
6861 | 6857 | ||
6862 | if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) { | 6858 | if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) { |
6863 | u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; | 6859 | u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; |
6864 | y += sprintf(buffer+len+y, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X", | 6860 | y += sprintf(buffer+len+y, ", LanAddr=%pMR", a); |
6865 | a[5], a[4], a[3], a[2], a[1], a[0]); | ||
6866 | } | 6861 | } |
6867 | 6862 | ||
6868 | y += sprintf(buffer+len+y, ", IRQ=%d", ioc->pci_irq); | 6863 | y += sprintf(buffer+len+y, ", IRQ=%d", ioc->pci_irq); |
@@ -6896,8 +6891,7 @@ static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int | |||
6896 | 6891 | ||
6897 | if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) { | 6892 | if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) { |
6898 | u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; | 6893 | u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow; |
6899 | seq_printf(m, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X", | 6894 | seq_printf(m, ", LanAddr=%pMR", a); |
6900 | a[5], a[4], a[3], a[2], a[1], a[0]); | ||
6901 | } | 6895 | } |
6902 | 6896 | ||
6903 | seq_printf(m, ", IRQ=%d", ioc->pci_irq); | 6897 | seq_printf(m, ", IRQ=%d", ioc->pci_irq); |