Skip to content

Commit 1769af4

Browse files
Steven J. Hilldavem330
authored andcommitted
ethernet: cavium: octeon: Switch to using netdev_info().
Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com> Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f65163f commit 1769af4

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

drivers/net/ethernet/cavium/octeon/octeon_mgmt.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -705,14 +705,15 @@ static int octeon_mgmt_ioctl_hwtstamp(struct net_device *netdev,
705705
u64 clock_comp = (NSEC_PER_SEC << 32) / octeon_get_io_clock_rate();
706706
if (!ptp.s.ptp_en)
707707
cvmx_write_csr(CVMX_MIO_PTP_CLOCK_COMP, clock_comp);
708-
pr_info("PTP Clock: Using sclk reference at %lld Hz\n",
709-
(NSEC_PER_SEC << 32) / clock_comp);
708+
netdev_info(netdev,
709+
"PTP Clock using sclk reference @ %lldHz\n",
710+
(NSEC_PER_SEC << 32) / clock_comp);
710711
} else {
711712
/* The clock is already programmed to use a GPIO */
712713
u64 clock_comp = cvmx_read_csr(CVMX_MIO_PTP_CLOCK_COMP);
713-
pr_info("PTP Clock: Using GPIO %d at %lld Hz\n",
714-
ptp.s.ext_clk_in,
715-
(NSEC_PER_SEC << 32) / clock_comp);
714+
netdev_info(netdev,
715+
"PTP Clock using GPIO%d @ %lld Hz\n",
716+
ptp.s.ext_clk_in, (NSEC_PER_SEC << 32) / clock_comp);
716717
}
717718

718719
/* Enable the clock if it wasn't done already */
@@ -926,14 +927,11 @@ static void octeon_mgmt_adjust_link(struct net_device *netdev)
926927
spin_unlock_irqrestore(&p->lock, flags);
927928

928929
if (link_changed != 0) {
929-
if (link_changed > 0) {
930-
pr_info("%s: Link is up - %d/%s\n", netdev->name,
931-
phydev->speed,
932-
phydev->duplex == DUPLEX_FULL ?
933-
"Full" : "Half");
934-
} else {
935-
pr_info("%s: Link is down\n", netdev->name);
936-
}
930+
if (link_changed > 0)
931+
netdev_info(netdev, "Link is up - %d/%s\n",
932+
phydev->speed, phydev->duplex == DUPLEX_FULL ? "Full" : "Half");
933+
else
934+
netdev_info(netdev, "Link is down\n");
937935
}
938936
}
939937

0 commit comments

Comments
 (0)